LineElement
One terminal row of differently-styled runs — the mixed-style counterpart of TextElement.
text(...) paints a whole block in one style, which cannot say "Status: " in the default colour and "OK" in green. Before this node the way to get that was row(text("Status: ").length(8), text("OK").fg(Color.Green)), i.e. a hand counted display width in the source — wrong the moment the label is translated, and wrong today for any CJK or emoji text, where one character is two columns. Here the widths are measured, not declared.
The element's own style is carried on the Line as its base layer and resolved by the renderer, so line(...).dim dims the whole row while a span that set its own colour keeps it.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Elementclass Objecttrait Matchableclass AnyShow all
Members list
Type members
Types
This node's own type, so a fluent extension gives back what it was handed: progressBar(0.5).fill.bare type-checks because .fill returns a ProgressBarElement, not an abstract Element. Every concrete node fixes it to itself with one line, type Self = ThatNodeType.
This node's own type, so a fluent extension gives back what it was handed: progressBar(0.5).fill.bare type-checks because .fill returns a ProgressBarElement, not an abstract Element. Every concrete node fixes it to itself with one line, type Self = ThatNodeType.
Attributes
Value members
Concrete methods
Places this row inside whatever width it is given; without one of these it sits at the left edge.
Places this row inside whatever width it is given; without one of these it sits at the left edge.
The alignment is carried by the Line itself rather than by the paragraph that draws it, so stacking a plain line(...) above a line(...).rightAligned in one column puts a label on the left and a total on the right with no hand-counted padding in between.
Attributes
This row centred in the columns it is given.
This row centred in the columns it is given.
Attributes
The factory-style name of this node — panel, button, scrollView — for the element-tree snapshot and any other diagnostic that has to say what a node is without reflecting over its class. Every node type declares its own; a decorator answers with the name of the node it wraps. The default is only there so a node added without one still renders — ElementTreeSnapshotSpec fails the build until the override is written.
The factory-style name of this node — panel, button, scrollView — for the element-tree snapshot and any other diagnostic that has to say what a node is without reflecting over its class. Every node type declares its own; a decorator answers with the name of the node it wraps. The default is only there so a node added without one still renders — ElementTreeSnapshotSpec fails the build until the override is written.
Attributes
- Definition Classes
This row pinned to the left edge — the default, spelled out.
This row pinned to the left edge — the default, spelled out.
Attributes
This row pinned to the right edge, which is what a column of numbers wants.
This row pinned to the right edge, which is what a column of numbers wants.
Attributes
Inherited methods
What this node is called when it is announced — button Save, checkbox agree — before the interaction states ElementHost.accessibleLabel appends. Defaults to debugName; a node with a label of its own says it.
What this node is called when it is announced — button Save, checkbox agree — before the interaction states ElementHost.accessibleLabel appends. Defaults to debugName; a node with a label of its own says it.
Attributes
- Inherited from:
- Element
The mouse pointer this node wants shown over it, when it wants one: the hand over a button or a link, the I-beam over a text field. None leaves the pointer as it is. An explicit .pointer(shape) on the node lands in props.pointerShape and takes precedence; the interactive nodes override this with their own default.
The mouse pointer this node wants shown over it, when it wants one: the hand over a button or a link, the I-beam over a text field. None leaves the pointer as it is. An explicit .pointer(shape) on the node lands in props.pointerShape and takes precedence; the interactive nodes override this with their own default.
Attributes
- Inherited from:
- Element
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
This element with style as its own — the content style on every node: a text's text, a list's body, a panel's children and inner area. A container's border is frameStyle instead. The fluent builders (.fg, .bold, .styled(...)) edit the same style rather than replacing it.
This element with style as its own — the content style on every node: a text's text, a list's body, a panel's children and inner area. A container's border is frameStyle instead. The fluent builders (.fg, .bold, .styled(...)) edit the same style rather than replacing it.
Attributes
- Inherited from:
- Element