ThreeRow
Lays out up to 3 children in a single row (or column), where the center node is guaranteed to be centered. left and right Nodes are aligned left and right.
All nodes are given their prefHeight, and their vertical alignment is determined by vAlignment.
center's Node.shrinkPriority determines which nodes shrink if there is insufficient room in the X direction.
Zero ->center is allocated its pref width. left and right may shrink. Non-Zero ->left and right are allocated their pref width. center may shrink.
If center's Node.shrinkPriority != 0f, then left and right are given their prefWidth
, and center may shrink if there isn't sufficient space.
Each child's Node.growPriority determines if the child is given the full height, or their preferred height.
ThreeRow originally had no orientation, and the ability to be vertical was added later.
Properties
An alias for right, useful for when orientation = VERTICAL
.
An alias for rightProperty, useful for when orientation = VERTICAL
.
The base class Node has no children, so this is an empty list.
Only used when orientation = VERTICAL
An alias for left, useful for when orientation = VERTICAL
.
An alias for leftProperty, useful for when orientation = VERTICAL
.
Only used when orientation = HORIZONTAL
Functions
Each subclass of node can determine the minimum width it requires. This can be overridden on an ad-hoc basis using overrideMinHeight. The default implementation returns 0.
Each subclass of node can determine the minimum width it requires. This can be overridden on an ad-hoc basis using overrideMinWidth. The default implementation returns 0.
Each subclass of node can determine its preferred height. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.
Each subclass of node can determine its preferred width. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.