BorderPanelScope

sealed interface BorderPanelScope

The receiver of a BorderPanel's content, through which a child declares which region of that panel it occupies.

Children are written plainly; the region a child names here rides along on its modifier:

BorderPanel {
Toolbar(modifier = SwingModifier.north())
Editor()
StatusBar(modifier = SwingModifier.south())
}

Two families of region are available:

Prefer one family for a given edge: pairing, e.g., north with pageStart attaches two children and the orientation-aware one is laid out at the top. center is shared by both families.

A region holds one child. The last region named in a chain is the one that child occupies. Where two children name the same region, the second to be registered takes it and the panel lays nothing out for the first.

See also

Functions

Link copied to clipboard

Places the child in the middle of the panel, filling everything the edge regions leave (BorderLayout.CENTER).

Link copied to clipboard

Places the child down the right side of the panel, at the width it prefers and the height the top and bottom regions leave (BorderLayout.EAST).

Link copied to clipboard

Places the child down the trailing side of the panel (right in LTR, left in RTL); wins that side over east/west (BorderLayout.LINE_END).

Link copied to clipboard

Places the child down the leading side of the panel (left in LTR, right in RTL); wins that side over west/east (BorderLayout.LINE_START).

Link copied to clipboard

Places the child across the top of the panel, at the height it prefers and the panel's full width (BorderLayout.NORTH).

Link copied to clipboard

Places the child across the bottom of the panel, orientation-aware; wins the bottom edge over south (BorderLayout.PAGE_END).

Link copied to clipboard

Places the child across the top of the panel, orientation-aware; wins the top edge over north (BorderLayout.PAGE_START).

Link copied to clipboard

Places the child across the bottom of the panel, at the height it prefers and the panel's full width (BorderLayout.SOUTH).

Link copied to clipboard

Places the child down the left side of the panel, at the width it prefers and the height the top and bottom regions leave (BorderLayout.WEST).