LabeledFieldGroupView

ceramic.Entityceramic.Visualceramic.Quadceramic.Layerceramic.Viewceramic.LinearLayoutelements.LabeledFieldGroupView (Class)
Implements: tracker.Observable

A container that groups multiple labeled field views in a horizontal layout.

This view is designed to organize related fields together, managing their layout and providing consistent label widths across the group. It's particularly useful for creating forms with multiple related inputs on the same line.

Type Parameters

  • T: The type of labeled field views (must extend LabeledFieldView)
  • U: The underlying field view type

Features

  • Automatic layout management for grouped fields
  • Consistent label width distribution
  • Disabled state synchronization
  • Responsive width allocation

Usage Example

// Create a group of coordinate fields
var xField = new LabeledFieldView(new TextFieldView(), "X:");
var yField = new LabeledFieldView(new TextFieldView(), "Y:");
var zField = new LabeledFieldView(new TextFieldView(), "Z:");

var coordGroup = new LabeledFieldGroupView([xField, yField, zField]);
coordGroup.label = "Position";

Instance Members

elements
observedDirty: Bool

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


elements
label: String

The label text for the entire field group. Can be used to describe the purpose of the grouped fields.


elements
disabled: Bool

Whether all fields in the group are disabled. Automatically computed based on individual field states.


elements
fields: Array<elements.LabeledFieldGroupView.T>

The array of labeled field views in this group. Setting this property triggers layout recalculation.


elements
invalidateLabel(): Void

elements
invalidateDisabled(): Void

elements
new(fields: Array<elements.LabeledFieldGroupView.T>): Void

Creates a new labeled field group view.

Name Type Description
fields Array<elements.LabeledFieldGroupView.T> Array of labeled field views to group together

Private Members

elements
unobservedLabel: String

elements
unobservedDisabled: Bool

elements
emitObservedDirty(instance: LabeledFieldGroupView<elements.LabeledFieldGroupView.T, elements.LabeledFieldGroupView.U>, fromSerializedField: Bool): Void

Event when any observable value as changed on this instance.

Name Type
instance LabeledFieldGroupView<elements.LabeledFieldGroupView.T, elements.LabeledFieldGroupView.U>
fromSerializedField Bool

elements
emitLabelChange(current: String, previous: String): Void

Event when label field changes.

Name Type
current String
previous String

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

Event when disabled field changes.

Name Type
current Bool
previous Bool

elements
layout(): Void

Performs custom layout to ensure consistent label widths across fields. The first field gets a different label width than subsequent fields to maintain visual alignment.


elements
updateDisabled(): Void

Updates the disabled state by checking all child fields. The group is considered disabled only if all fields are disabled.


elements
updateStyle(): Void

Updates the visual style of the group. Currently commented out but can be used to apply themed styling.

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()