Package org.inspirenxe.strata.api.layout
package org.inspirenxe.strata.api.layout
Layout containers and the values that control placement.
Strata ships six containers. Each measures its children, then gives each one a slot; a child places itself
in its slot by its own HorizontalAlignment and
VerticalAlignment.
AnchorPanel: every child gets the whole content area, so children overlap and anchor themselves to its edges or center.StackPanel: children follow one another in a row or a column.GridPanel: children sit in the cells of rows and columns sized automatically, fixed, or by weight.WrapPanel: children follow one another and wrap onto a new row or column when the current one is full.AbsolutePanel: children sit at fixed positions.ScrollPanel: children larger than the panel scroll.
A Spacer is an empty component that keeps a gap, or takes the room
left in a stack panel.
To write another layout, extend CustomContainer.
-
ClassDescriptionA container that places each child at a fixed position, measured from the top-left corner of its content area (its bounds minus padding).A pair of alignments under one name.A container that gives every child the whole content area (its bounds minus padding).The direction a component's content runs in.How big a
GridPanelrow or column is.A track as large as the largest child that sits only in it.A track of a fixed size, whatever its children need.A track that takes a share of the space left after fixed and auto tracks.A container that places children in the cells of rows and columns.The cell or cells a child covers.A grid's own state in aComponentSnapshot.Where a component sits across the width of the slot its parent gives it.The direction aStackPanellays out its children, or the way a control such as a slider, separator, scroll bar or split pane runs.A container that shows part of content larger than itself and scrolls the rest into view.Whether an axis scrolls and when its scroll bar shows.A scroll panel's own state in aComponentSnapshot, and whatScrollPanel.SCROLLEDreports.An empty component that only takes up room.A container that lays its children out one after another, in a column (Orientation.VERTICAL, the default) or a row (Orientation.HORIZONTAL), with a gap between them.A stack panel's own state in aComponentSnapshot.Where a component sits across the height of the slot its parent gives it.A container that places its children one after another and starts a new line when the next child would pass the end, as chips in a tag editor or the buttons of a toolbar that narrows.A wrap panel's own state in aComponentSnapshot.