Class ConsoleText

java.lang.Object
net.ME1312.Galaxi.Log.TextElement
net.ME1312.Galaxi.Log.ConsoleText

public class ConsoleText extends TextElement
Console Text Element Builder Class
  • Constructor Details

    • ConsoleText

      public ConsoleText()
      Create a new Text Element
    • ConsoleText

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

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

    • bold

      public ConsoleText bold(boolean value)
      Description copied from class: TextElement
      Set whether the text will be bold
      Overrides:
      bold in class TextElement
      Parameters:
      value - Bold Status
      Returns:
      Text Element
    • italic

      public ConsoleText italic(boolean value)
      Description copied from class: TextElement
      Set whether the text will be italic
      Overrides:
      italic in class TextElement
      Parameters:
      value - Italic Status
      Returns:
      Text Element
    • underline

      public ConsoleText underline(boolean value)
      Description copied from class: TextElement
      Set whether the text will be underlined
      Overrides:
      underline in class TextElement
      Parameters:
      value - Underline Status
      Returns:
      Text Element
    • strikethrough

      public ConsoleText strikethrough(boolean value)
      Description copied from class: TextElement
      Set whether the text will be struck through
      Overrides:
      strikethrough in class TextElement
      Parameters:
      value - Strike through Status
      Returns:
      Text Element
    • superscript

      public ConsoleText superscript(boolean value)
      Set whether the text will be in superscript
      Parameters:
      value - Superscript Status
      Returns:
      Text Element
    • superscript

      public boolean superscript()
      Whether the text will be in superscript
      Returns:
      Superscript Status
    • subscript

      public ConsoleText subscript(boolean value)
      Set whether the text will be in subscript
      Parameters:
      value - Subscript Status
      Returns:
      Text Element
    • subscript

      public boolean subscript()
      Whether the text will be in subscript
      Returns:
      Subscript Status
    • color

      public ConsoleText color(int color)
      Set the color of the text
      Parameters:
      color - 8-bit Text Color
      Returns:
      Text Element
    • color

      public ConsoleText color(Color color)
      Description copied from class: TextElement
      Set the color of the text
      Overrides:
      color in class TextElement
      Parameters:
      color - Text Color (or null for default)
      Returns:
      Text Element
    • backgroundColor

      public ConsoleText backgroundColor(int color)
      Set the background color of the text
      Parameters:
      color - 8-bit Background Color
      Returns:
      Text Element
    • backgroundColor

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

      public Color backgroundColor()
      Get the background color of the text
      Returns:
      Text Background Color (or null for default)
    • onClick

      public ConsoleText onClick(Runnable value)
      Run some code on click
      Parameters:
      value - Code to run
      Returns:
      Text Element
    • onClick

      public ConsoleText onClick(URL value)
      Open a link on click
      Parameters:
      value - Link to open
      Returns:
      Text Element
    • onClick

      public URL onClick()
      Get the link that will open on click
      Returns:
      Link to open
    • before

      public ConsoleText before(TextElement... elements)
      Description copied from class: TextElement
      Place elements before this element
      Overrides:
      before in class TextElement
      Parameters:
      elements - Elements to prepend
      Returns:
      Text Element
    • prepend

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

      public ConsoleText append(TextElement... elements)
      Description copied from class: TextElement
      Place elements inside this element, but behind the text
      Overrides:
      append in class TextElement
      Parameters:
      elements - Elements to insert
      Returns:
      Text Element
    • after

      public ConsoleText after(TextElement... elements)
      Description copied from class: TextElement
      Place elements after this element
      Overrides:
      after in class TextElement
      Parameters:
      elements - Elements to append
      Returns:
      Text Element