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:
orientation-aware: pageStart, pageEnd, lineStart, lineEnd, resolved against the panel's
ComponentOrientation(leading is the left edge under left-to-right, the right edge under right-to-left).
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
Places the child in the middle of the panel, filling everything the edge regions leave (BorderLayout.CENTER).
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).
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).
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).
Places the child across the top of the panel, at the height it prefers and the panel's full width (BorderLayout.NORTH).
Places the child across the bottom of the panel, orientation-aware; wins the bottom edge over south (BorderLayout.PAGE_END).
Places the child across the top of the panel, orientation-aware; wins the top edge over north (BorderLayout.PAGE_START).
Places the child across the bottom of the panel, at the height it prefers and the panel's full width (BorderLayout.SOUTH).
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).