Class FlowPane
java.lang.Object
io.github.somesourcecode.someguiapi.scene.Node
io.github.somesourcecode.someguiapi.scene.Parent
io.github.somesourcecode.someguiapi.scene.pane.Region
io.github.somesourcecode.someguiapi.scene.pane.Pane
io.github.somesourcecode.someguiapi.scene.pane.FlowPane
A layout pane that arranges its children in a flow, wrapping at the pane's bounds.
A horizontal FlowPane (the default) will lay out nodes in rows, wrapping at the width of the pane. A vertical FlowPane will lay out nodes in columns, wrapping at the height of the pane. If the FlowPane has padding set, the nodes will be laid out within those insets.
-
Constructor Summary
ConstructorsConstructorDescriptionFlowPane()Constructs a new FlowPane with horizontal orientation.FlowPane(int hGap, int vGap) Constructs a new FlowPane with the given horizontal and vertical gaps.Constructs a new FlowPane with the given horizontal and vertical gaps and children.Constructs a new FlowPane with the given children.FlowPane(Orientation orientation) Constructs a new FlowPane with the given orientation.FlowPane(Orientation orientation, int hGap, int vGap) Constructs a new FlowPane with the given orientation, horizontal and vertical gaps.FlowPane(Orientation orientation, int hGap, int vGap, Node... children) Constructs a new FlowPane with the given orientation, horizontal and vertical gaps, and children.FlowPane(Orientation orientation, Node... children) Constructs a new FlowPane with the given orientation and children. -
Method Summary
Modifier and TypeMethodDescriptionintgetHGap()Returns the amount of space between each node in a horizontal FlowPane or the space between each column in a vertical FlowPane.Returns the orientation of the flow pane.intgetVGap()Returns the amount of space between each node in a vertical FlowPane or the space between each row in a horizontal FlowPane.protected voidvoidsetHGap(int hGap) Sets the amount of space between each node in a horizontal FlowPane or the space between each column in a vertical FlowPane.voidsetOrientation(Orientation orientation) Sets the orientation of the flow pane.voidsetVGap(int vGap) Sets the amount of space between each node in a vertical FlowPane or the space between each row in a horizontal FlowPane.Methods inherited from class io.github.somesourcecode.someguiapi.scene.pane.Pane
getChildrenMethods inherited from class io.github.somesourcecode.someguiapi.scene.pane.Region
getHeight, getPadding, getWidth, resize, resizeRelocate, setHeight, setPadding, setWidthMethods inherited from class io.github.somesourcecode.someguiapi.scene.Parent
getBackground, layout, nodeAt, pixelAt, setBackgroundMethods inherited from class io.github.somesourcecode.someguiapi.scene.Node
getLayoutX, getLayoutY, getOnClick, getOnHotBarClick, getOnLeftClick, getOnRightClick, getOnShiftClick, getParent, getTranslateX, getTranslateY, isClipping, isVisible, relocate, setClipping, setLayoutX, setLayoutY, setOnClick, setOnHotBarClick, setOnLeftClick, setOnRightClick, setOnShiftClick, setParent, setTranslateX, setTranslateY, setVisible
-
Constructor Details
-
FlowPane
public FlowPane()Constructs a new FlowPane with horizontal orientation. -
FlowPane
Constructs a new FlowPane with the given orientation.- Parameters:
orientation- the orientation of the flow pane
-
FlowPane
public FlowPane(int hGap, int vGap) Constructs a new FlowPane with the given horizontal and vertical gaps.- Parameters:
hGap- the horizontal gap between nodesvGap- the vertical gap between nodes
-
FlowPane
Constructs a new FlowPane with the given orientation, horizontal and vertical gaps.- Parameters:
orientation- the orientation of the flow panehGap- the horizontal gap between nodesvGap- the vertical gap between nodes
-
FlowPane
Constructs a new FlowPane with the given children.- Parameters:
children- the children of the flow pane
-
FlowPane
Constructs a new FlowPane with the given orientation and children.- Parameters:
orientation- the orientation of the flow panechildren- the children of the flow pane
-
FlowPane
Constructs a new FlowPane with the given horizontal and vertical gaps and children.- Parameters:
hGap- the horizontal gap between nodesvGap- the vertical gap between nodeschildren- the children of the flow pane
-
FlowPane
Constructs a new FlowPane with the given orientation, horizontal and vertical gaps, and children.- Parameters:
orientation- the orientation of the flow panehGap- the horizontal gap between nodesvGap- the vertical gap between nodeschildren- the children of the flow pane
-
-
Method Details
-
getOrientation
Returns the orientation of the flow pane.- Returns:
- the orientation of the flow pane
-
setOrientation
Sets the orientation of the flow pane.- Parameters:
orientation- the orientation of the flow pane
-
getHGap
public int getHGap()Returns the amount of space between each node in a horizontal FlowPane or the space between each column in a vertical FlowPane.- Returns:
- the horizontal gap between nodes
-
setHGap
public void setHGap(int hGap) Sets the amount of space between each node in a horizontal FlowPane or the space between each column in a vertical FlowPane.- Parameters:
hGap- the horizontal gap between nodes
-
getVGap
public int getVGap()Returns the amount of space between each node in a vertical FlowPane or the space between each row in a horizontal FlowPane.- Returns:
- the vertical gap between nodes
-
setVGap
public void setVGap(int vGap) Sets the amount of space between each node in a vertical FlowPane or the space between each row in a horizontal FlowPane.- Parameters:
vGap- the vertical gap between nodes
-
layoutChildren
protected void layoutChildren()- Overrides:
layoutChildrenin classParent
-