layout

abstract fun layout(width: Int, height: Int, alignmentLines: Map<AlignmentLine, Int> = emptyMap(), placementBlock: PlacementScope.() -> Unit): MeasureResult

The extent this policy or modifier settled on, with placementBlock as the block that places what it measured.

Return

what this layout settled on.

Parameters

width

the width this layout measured itself to. A parent sees this extent coerced into the constraints it offered, while Swing ultimately receives this raw extent.

height

the height this layout measured itself to. A parent sees this extent coerced into the constraints it offered, while Swing ultimately receives this raw extent.

alignmentLines

lines this layout provides to its parent, which reads them through Placeable.get. A line named here takes the place of that line of what this layout places; each other line comes from what it places, where it places it.

placementBlock

places what this layout measured: a policy's children relative to the container's inner rectangle, a modifier's content relative to the modifier's box

Throws

if either extent is negative