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

public class LayoutNode extends Component implements NodeContext
A component that groups multiple nodes together and arranges them.
  • Field Details

    • direction

      public Direction direction
    • alignment

      public EdgeAlignment alignment
    • distribution

      public LayoutNode.Distribution distribution
    • arrangeChildren

      public boolean arrangeChildren
    • currentGap

      public float currentGap
    • gap

      public DimensionBase gap
      Distance between elements.
    • innerSize

      public Vector2f innerSize
    • totalChildrenSize

      public Vector2i totalChildrenSize
    • childNodes

      public List<Node> childNodes
      Array of node components in children of the attached entity
    • node

      public Node node
    • DEFAULT_GAP

      public static final Dimension DEFAULT_GAP
    • DEFAULT_DIRECTION

      public static final Direction DEFAULT_DIRECTION
    • DEFAULT_ALIGNMENT

      public static final EdgeAlignment DEFAULT_ALIGNMENT
    • DEFAULT_DISTRIBUTION

      public static final LayoutNode.Distribution DEFAULT_DISTRIBUTION
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Overrides:
      getName in class Component
    • getChildComponents

      public void getChildComponents()
      Finds and stores node components in children to be used in calculations later.
    • getNode

      public Node getNode()
    • getGap

      public float getGap()
    • getX

      public float getX()
      Specified by:
      getX in interface NodeContext
    • getY

      public float getY()
      Specified by:
      getY in interface NodeContext
    • getWidth

      public float getWidth()
      Specified by:
      getWidth in interface NodeContext
    • getHeight

      public float getHeight()
      Specified by:
      getHeight in interface NodeContext