alignBy

Places the child across the row's height so that its alignmentLine falls on the line it shares with every sibling also declaring alignBy. This is a form of align and stands in the same place on the modifier chain, so of the two the last one declared places the child. Within a Row, every child declaring alignBy aligns vertically using the HorizontalAlignmentLines it names or the values the other alignBy overload works out, forming a sibling group. At least one child of the group is placed as it would be with Alignment.Top, and the others are placed so that their alignment lines coincide with its line. A child declaring alignBy alone in its Row is placed as it would be with Alignment.Top; so is a child that provides no such line.

A row asking for its own height holds the deepest line above the shared line and the deepest remainder below it. A line a Layout child's policy provides places that child on the shared line, but does not enter the height the row asks for.

Return

this modifier with the child's placement on the shared line declared on it.

Parameters

alignmentLine

the line of the child's own that falls on the shared line

See also


abstract fun SwingModifier.alignBy(alignmentLineBlock: (Placeable) -> Int): SwingModifier

As alignBy(alignmentLine), with the line alignmentLineBlock works out from the measured child.

Return

this modifier with the child's placement on the shared line declared on it.

Parameters

alignmentLineBlock

where the line falls from the top of the measured child