SplitPaneScope

sealed interface SplitPaneScope

The receiver of a SplitPane's content, through which a child declares which of the two sides it occupies.

A pane offers two sides, first and second, and holds each child on the one it names rather than among indexed children of its own. Children are written plainly; the side a child names here rides along on its modifier:

SplitPane {
Navigator(modifier = SwingModifier.first())
Editor(modifier = SwingModifier.second())
}

Under JSplitPane.HORIZONTAL_SPLIT the first side is the left, the second the right; under JSplitPane.VERTICAL_SPLIT the first side is the top, the second the bottom.

Every child names a side, and a side hosts one child: a child that names none is refused, and so are two children naming one side, which the failure names. The last side named in a chain is the one that child occupies, and a side no child names stays empty. A pass that swaps one child for another on a side is a single occupant throughout, whichever order the two changes reach the pane in.

See also

Functions

Link copied to clipboard

Places the child on the leading side of the pane: the left under a horizontal split, the top under a vertical one.

Link copied to clipboard

Places the child on the trailing side of the pane: the right under a horizontal split, the bottom under a vertical one.