Class Flow.Builder
java.lang.Object
com.trevlar.menukit.api.element.AbstractPanelElement.Builder<Flow, Flow.Builder>
com.trevlar.menukit.api.element.Flow.Builder
- Enclosing class:
Flow
-
Field Summary
Fields inherited from class AbstractPanelElement.Builder
declId, disabledWhen, height, opaque, tooltip, visibleWhen, width, x, y -
Method Summary
Modifier and TypeMethodDescriptionadd(PanelElement child) Adds a child (or aFlow.spacer()).addAll(List<? extends PanelElement> children) Adds children, in order.boxed()Draws a card behind the children: they sitFlow.BOX_PADDINGinside it, a row Flow fills its width, the height hugs the content.build()Builds the element.crossAlign(CrossAlign align) Where each child sits on its row's line, in a row Flow.gap(int px) The gap between children, both axes.gap(int horizontal, int vertical) The gap between children in a row and between rows; in a vertical Flow, between columns and between children in a column.keepLast()In a vertical Flow that wraps, the last children keep the first column and the earliest step out into the next, to its right.protected Flow.Builderself()Returnsthisas the concrete builder.vertical()Top to bottom, wrapping into a new column to the right where the frame beside the panel ends.wrapAfter(int n) At mostnshown children in a column (in a row, in a row Flow), whatever room is left.At most as many shown children in a column (a row) asngives, read every frame; 0 or less for no cap.Methods inherited from class AbstractPanelElement.Builder
at, declId, disabledWhen, opaque, require, size, tooltip, tooltip, tooltip, visibleWhen
-
Method Details
-
self
Description copied from class:AbstractPanelElement.BuilderReturnsthisas the concrete builder.- Specified by:
selfin classAbstractPanelElement.Builder<Flow, Flow.Builder>
-
addAll
Adds children, in order. -
gap
The gap between children, both axes. Default 4. -
gap
The gap between children in a row and between rows; in a vertical Flow, between columns and between children in a column. -
vertical
Top to bottom, wrapping into a new column to the right where the frame beside the panel ends. Default: left to right, wrapping into rows. See the class notes. -
boxed
Draws a card behind the children: they sitFlow.BOX_PADDINGinside it, a row Flow fills its width, the height hugs the content. See the class notes. -
wrapAfter
At mostnshown children in a column (in a row, in a row Flow), whatever room is left. See the class notes. -
wrapAfter
At most as many shown children in a column (a row) asngives, read every frame; 0 or less for no cap. For a cap that follows the game mode or a setting. -
keepLast
In a vertical Flow that wraps, the last children keep the first column and the earliest step out into the next, to its right. Default: the first ones keep it. -
build
Description copied from class:AbstractPanelElement.BuilderBuilds the element. ThrowsIllegalStateExceptionwhen a required setting is missing.- Specified by:
buildin classAbstractPanelElement.Builder<Flow, Flow.Builder>
-