Class Text


public final class Text extends GuiElement
This class realizes a simple GuiElement:
A Text which can be visualized on the view.
  • Constructor Details

    • Text

      public Text(IScene scene, TextOptions options)
      Create the text element.
      Parameters:
      scene - the scene
      options - the textoptions
  • Method Details

    • getText

      public String getText()
      Get the text.
      Returns:
      the text
    • setText

      public Text setText(String text)
      Set the text.
      Parameters:
      text - the new text
      Returns:
      this
    • getOptions

      public TextOptions getOptions()
      Get the text options.
      Returns:
      the options
    • setOptions

      public void setOptions(TextOptions options)
      Set the text options.
      Parameters:
      options - the new options
    • internalRender

      public void internalRender(GameGrid f)
      Description copied from class: GuiElement

      Template method that will be called periodically after being added to a IScene. Must be as performant as possible to keep the FPS low, since it will be called in every render-loop.

      Should be overwritten in sub classes for custom visualization using the GameGrid.

      Specified by:
      internalRender in class GuiElement
      Parameters:
      f - the GameGrid that represents the games field and supplies primitive drawing operations.