LabelView

ceramic.Entityceramic.Visualceramic.Quadceramic.Layerceramic.Viewceramic.TextViewelements.LabelView (Class)
Implements: tracker.Observable

A themed text label for UI forms and layouts.

LabelView extends TextView with theme integration and automatic styling based on the current theme and state. It provides consistent text appearance across the UI with support for bold text and disabled states.

Features:

  • Automatic theme-based styling
  • Bold text support
  • Disabled state with appropriate visual feedback
  • Consistent font and color management
  • Automatic sizing with fill width and minimum height

Example usage:

var label = new LabelView();
label.content = "Username:";
label.bold = true;
label.disabled = false;
See: TextView, Theme

Instance Members

elements
observedDirty: Bool

Default is false, automatically set to true when any of this instance's observable variables has changed.


elements
theme: Theme

Custom theme override for this label


elements
bold: Bool

Whether to display the text in bold font


elements
disabled: Bool

Whether the label appears disabled (affects text color)


elements
invalidateTheme(): Void

elements
invalidateBold(): Void

elements
invalidateDisabled(): Void

elements
new(): Void

Creates a new LabelView instance.

Initializes the label with default properties:

  • Full width with auto height
  • Minimum height of 16 pixels
  • Left alignment with center vertical alignment
  • 12pt text size with 20pt pre-rendered size
  • Automatic style updates based on theme changes

Private Members

elements
unobservedTheme: Theme

elements
unobservedBold: Bool

elements
unobservedDisabled: Bool

elements
emitObservedDirty(instance: LabelView, fromSerializedField: Bool): Void

Event when any observable value as changed on this instance.

Name Type
instance LabelView
fromSerializedField Bool

elements
emitThemeChange(current: Theme, previous: Theme): Void

Event when theme field changes.

Name Type
current Theme
previous Theme

elements
emitBoldChange(current: Bool, previous: Bool): Void

Event when bold field changes.

Name Type
current Bool
previous Bool

elements
emitDisabledChange(current: Bool, previous: Bool): Void

Event when disabled field changes.

Name Type
current Bool
previous Bool

elements
updateStyle(): Void

Updates the visual styling based on current theme and state.

Applies appropriate styling from the current theme:

  • Text color: darkTextColor when disabled, lightTextColor when enabled
  • Font: boldFont when bold is true, mediumFont otherwise

Falls back to the global context theme if no custom theme is set. This method is called automatically when theme, bold, or disabled properties change.

Metadata

Name Parameters
:build tracker.macros.ObservableMacro.build()
:autoBuild tracker.macros.ObservableMacro.build()
:build tracker.macros.EventsMacro.build()
:autoBuild tracker.macros.EventsMacro.build()
:build ceramic.macros.EntityMacro.buildForCompletion()
:autoBuild ceramic.macros.EntityMacro.buildForCompletion()