RowScope
The receiver of a Row's content, through which a child declares its own placement in that row.
Children are written plainly; what a child declares here rides along on its modifier:
Row {
Label(text = "Status")
Panel(PanelLayout.Flow(), modifier = SwingModifier.weight(1f)) { Details() }
Button(text = "Close", onClick = ::close, modifier = SwingModifier.align(Alignment.Bottom))
}Functions
Places the child at alignment across the row's height, in place of the row's own verticalAlignment.
As alignBy(alignmentLine), with the line alignmentLineBlock works out from the measured child.
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.
Puts the child on the row's shared text baseline, which is what a label beside a text field sits on. Every child declaring it is placed so that its FirstBaseline falls on one line. A row asking for its own height holds the deepest baseline above that 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.
Declares element on the child: the LayoutModifierNode it creates measures the child between the constraints this scope's container offers and the child's own measurement, and places it in the extent it reports.
Claims weight shares of the width the row has left over once every child that claims none has taken the width it prefers. Two children weighted 1f and 2f take a third and two thirds of it. A child with an explicit maximumSize takes no more than that maximum allows; what it leaves stays empty. With fill the child occupies all the width it is granted; otherwise it occupies as much of that width as it prefers and the row's arrangement places the rest.