alignBy

Places the child across the column's width 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 Column, every child declaring alignBy aligns horizontally using the VerticalAlignmentLines 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.Start, and the others are placed so that their alignment lines coincide with its line. A child declaring alignBy alone in its Column is placed as it would be with Alignment.Start; a child that provides no such line sits at the column's left edge.

A column asking for its own width holds the furthest line from a child's leading edge before the shared line and the furthest remainder past it. A line a Layout child's policy provides places that child on the shared line, but does not enter the width the column 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


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 leading edge of the measured child