Class TextNode

java.lang.Object
dev.prozilla.pine.core.component.Component
dev.prozilla.pine.core.component.ui.TextNode
All Implemented Interfaces:
Lifecycle, Printable, ApplicationContext, ApplicationProvider, ComponentsContext, ComponentsProvider, EntityContext, EntityProvider, SceneContext, SceneProvider

public class TextNode extends Component
A component for rendering text in the UI.
  • Field Details

    • text

      public String text
    • font

      public Font font
    • size

      public Vector2i size
      Result of size calculation
  • Constructor Details

    • TextNode

      public TextNode()
    • TextNode

      public TextNode(String text)
  • Method Details

    • getName

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

      public void setFont(String fontPath, int size)
    • setFont

      public void setFont(String fontPath)
    • setFont

      public void setFont(Font font)
      Setter for the font of this text.
    • setText

      public void setText(String text)
    • calculateSize

      public void calculateSize()
      Calculates the size of this text.