Class LayoutNode
java.lang.Object
dev.prozilla.pine.core.component.Component
dev.prozilla.pine.core.component.ui.LayoutNode
- All Implemented Interfaces:
Lifecycle
,Printable
,ApplicationContext
,ApplicationProvider
,ComponentsContext
,ComponentsProvider
,NodeContext
,EntityContext
,EntityProvider
,SceneContext
,SceneProvider
A component that groups multiple nodes together and arranges them.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
Array of node components in children of the attached entityfloat
static final EdgeAlignment
static final Direction
static final LayoutNode.Distribution
static final Dimension
Distance between elements. -
Constructor Summary
ConstructorsConstructorDescriptionLayoutNode
(Direction direction) LayoutNode
(Direction direction, EdgeAlignment alignment) LayoutNode
(Direction direction, EdgeAlignment alignment, LayoutNode.Distribution distribution) -
Method Summary
Methods inherited from class dev.prozilla.pine.core.component.Component
destroy, equals, getApplication, getEntity, getScene, hashCode, setActive, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.prozilla.pine.core.ApplicationProvider
getConfig, getInput, getLogger, getModManager, getRenderer, getTimer, getTracker, getWindow
Methods inherited from interface dev.prozilla.pine.core.component.ComponentsProvider
getComponent, getComponentInParent, getComponentInParent, getComponents, getComponentsInChildren
Methods inherited from interface dev.prozilla.pine.core.entity.EntityContext
isDescendantOf
Methods inherited from interface dev.prozilla.pine.core.entity.EntityProvider
getChildWithTag, getFirstChild, getLastChild, getParentWithTag, getTransform, isDescendantOf
Methods inherited from interface dev.prozilla.pine.common.Lifecycle
init, init, input, input, render, render, update, update
Methods inherited from interface dev.prozilla.pine.core.scene.SceneProvider
getCameraData, getWorld
-
Field Details
-
direction
-
alignment
-
distribution
-
arrangeChildren
public boolean arrangeChildren -
currentGap
public float currentGap -
gap
Distance between elements. -
innerSize
-
totalChildrenSize
-
childNodes
Array of node components in children of the attached entity -
node
-
DEFAULT_GAP
-
DEFAULT_DIRECTION
-
DEFAULT_ALIGNMENT
-
DEFAULT_DISTRIBUTION
-
-
Constructor Details
-
LayoutNode
public LayoutNode() -
LayoutNode
-
LayoutNode
-
LayoutNode
public LayoutNode(Direction direction, EdgeAlignment alignment, LayoutNode.Distribution distribution)
-
-
Method Details
-
getName
-
getChildComponents
public void getChildComponents()Finds and stores node components in children to be used in calculations later. -
getNode
-
getGap
public float getGap() -
getX
public float getX()- Specified by:
getX
in interfaceNodeContext
-
getY
public float getY()- Specified by:
getY
in interfaceNodeContext
-
getWidth
public float getWidth()- Specified by:
getWidth
in interfaceNodeContext
-
getHeight
public float getHeight()- Specified by:
getHeight
in interfaceNodeContext
-