Class TextElement

java.lang.Object
net.ME1312.Galaxi.Log.TextElement
Direct Known Subclasses:
ConsoleText

public class TextElement extends Object
Text Element Builder Class
  • Constructor Details

    • TextElement

      public TextElement()
      Create a new Text Element
    • TextElement

      public TextElement(String text)
      Create a new Text Element
      Parameters:
      text - Text
    • TextElement

      public TextElement(ObjectMap<String> element)
      Load a Text Element
      Parameters:
      element - Raw Element
  • Method Details

    • message

      public String message()
      Get the message
      Returns:
      Message
    • bold

      public TextElement bold(boolean value)
      Set whether the text will be bold
      Parameters:
      value - Bold Status
      Returns:
      Text Element
    • bold

      public boolean bold()
      Whether the text will be bold
      Returns:
      Bold Status
    • italic

      public TextElement italic(boolean value)
      Set whether the text will be italic
      Parameters:
      value - Italic Status
      Returns:
      Text Element
    • italic

      public boolean italic()
      Whether the text will be italic
      Returns:
      Italic Status
    • underline

      public TextElement underline(boolean value)
      Set whether the text will be underlined
      Parameters:
      value - Underline Status
      Returns:
      Text Element
    • underline

      public boolean underline()
      Whether the text will be underlined
      Returns:
      Bold Status
    • strikethrough

      public TextElement strikethrough(boolean value)
      Set whether the text will be struck through
      Parameters:
      value - Strike through Status
      Returns:
      Text Element
    • strikethrough

      public boolean strikethrough()
      Whether the text will be struck through
      Returns:
      Strike through Status
    • color

      public TextElement color(Color color)
      Set the color of the text
      Parameters:
      color - Text Color (or null for default)
      Returns:
      Text Element
    • color

      public Color color()
      Get the color of the text
      Returns:
      Text Color (or null for default)
    • before

      public TextElement before(TextElement... elements)
      Place elements before this element
      Parameters:
      elements - Elements to prepend
      Returns:
      Text Element
    • prepend

      public TextElement prepend(TextElement... elements)
      Place elements inside this element, but in front of the text
      Parameters:
      elements - Elements to insert
      Returns:
      Text Element
    • prepend

      public TextElement prepend(String... text)
      Add additional text before the existing text
      Parameters:
      text - Text to add
      Returns:
      Text Element
    • append

      public TextElement append(String... text)
      Add additional text behind the existing text
      Parameters:
      text - Text to add
      Returns:
      Text Element
    • append

      public TextElement append(TextElement... elements)
      Place elements inside this element, but behind the text
      Parameters:
      elements - Elements to insert
      Returns:
      Text Element
    • after

      public TextElement after(TextElement... elements)
      Place elements after this element
      Parameters:
      elements - Elements to append
      Returns:
      Text Element
    • toRaw

      public ObjectMap<String> toRaw()
      Get the Raw Element
      Returns:
      Raw Element