Class LayoutNode
java.lang.Object
dev.prozilla.pine.core.component.Component
dev.prozilla.pine.core.component.ui.LayoutNode
- All Implemented Interfaces:
Destructible,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 TypeFieldDescriptionbooleanArray of node components in children of the attached entityfloatstatic final EdgeAlignmentstatic final Directionstatic final LayoutNode.Distributionstatic final DimensionDistance 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.prozilla.pine.core.ApplicationProvider
getAudioDevice, getConfig, getInput, getLogger, getModManager, getRenderer, getTimer, getTracker, getWindowMethods inherited from interface dev.prozilla.pine.core.component.ComponentsProvider
getComponent, getComponentInParent, getComponentInParent, getComponents, getComponentsInChildrenMethods inherited from interface dev.prozilla.pine.core.entity.EntityContext
isDescendantOfMethods inherited from interface dev.prozilla.pine.core.entity.EntityProvider
getChildWithTag, getFirstChild, getLastChild, getParentWithTag, getTransform, isDescendantOfMethods 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:
getXin interfaceNodeContext
-
getY
public float getY()- Specified by:
getYin interfaceNodeContext
-
getWidth
public float getWidth()- Specified by:
getWidthin interfaceNodeContext
-
getHeight
public float getHeight()- Specified by:
getHeightin interfaceNodeContext
-