Class HBox
java.lang.Object
io.github.somesourcecode.someguiapi.scene.Node
io.github.somesourcecode.someguiapi.scene.Parent
io.github.somesourcecode.someguiapi.scene.layout.Region
io.github.somesourcecode.someguiapi.scene.layout.Pane
io.github.somesourcecode.someguiapi.scene.layout.HBox
A layout pane that arranges its children in a horizontal row.
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the amount of horizontal space between each child node.protected voidvoidsetSpacing(int spacing) Sets the amount of horizontal space between each child node.Methods inherited from class io.github.somesourcecode.someguiapi.scene.layout.Pane
getChildrenMethods inherited from class io.github.somesourcecode.someguiapi.scene.layout.Region
getHeight, getPadding, getWidth, resize, resizeRelocate, setHeight, setPadding, setWidthMethods inherited from class io.github.somesourcecode.someguiapi.scene.Parent
getBackground, isSceneRoot, layout, lookup, lookupAll, needsLayout, nodeAt, renderPixelAt, requestLayout, setBackgroundMethods inherited from class io.github.somesourcecode.someguiapi.scene.Node
getId, getLayoutX, getLayoutY, getOnClick, getOnHotBarClick, getOnLeftClick, getOnRightClick, getOnShiftClick, getParent, getScene, getTranslateX, getTranslateY, isClipping, isVisible, lookupAll, relocate, requestParentLayout, setClipping, setId, setLayoutX, setLayoutY, setOnClick, setOnHotBarClick, setOnLeftClick, setOnRightClick, setOnShiftClick, setTranslateX, setTranslateY, setVisible
-
Constructor Details
-
HBox
public HBox()Constructs a new HBox with a spacing of 0.- Since:
- 1.0.0
-
HBox
public HBox(int spacing) Constructs a new HBox with the given spacing.- Parameters:
spacing- the horizontal spacing between children- Since:
- 1.0.0
-
HBox
Constructs a new HBox with the given children.- Parameters:
children- the children of the HBox- Since:
- 1.0.0
-
HBox
Constructs a new HBox with the given spacing and children.- Parameters:
spacing- the horizontal spacing between childrenchildren- the children of the HBox- Since:
- 1.0.0
-
-
Method Details
-
getSpacing
public int getSpacing()Returns the amount of horizontal space between each child node.- Returns:
- the horizontal spacing between children
- Since:
- 1.0.0
-
setSpacing
public void setSpacing(int spacing) Sets the amount of horizontal space between each child node.- Parameters:
spacing- the horizontal spacing between children- Since:
- 1.0.0
-
layoutChildren
protected void layoutChildren()- Overrides:
layoutChildrenin classParent
-