Enum Class Ansi_Styling

java.lang.Object
java.lang.Enum<Ansi_Styling>
za.co.wethinkcode.robots.rendering.Ansi_Styling
All Implemented Interfaces:
Serializable, Comparable<Ansi_Styling>, Constable

public enum Ansi_Styling extends Enum<Ansi_Styling>
Nested Enum of ansi escape characters to make rendering more discoverable
  • Enum Constant Details

    • ANSI_YELLOW

      public static final Ansi_Styling ANSI_YELLOW
      Renders text in yellow. Mostly used for general purpose debugging
    • ANSI_RED

      public static final Ansi_Styling ANSI_RED
      Renders text in red. Mostly used for error messages
    • ANSI_BLUE

      public static final Ansi_Styling ANSI_BLUE
      Renders text in blue. Mostly used for network debugging
    • ANSI_GREEN

      public static final Ansi_Styling ANSI_GREEN
      Renders text in green. Mostly used for internal server pretty printing
    • ANSI_CLEAR_LINE

      public static final Ansi_Styling ANSI_CLEAR_LINE
      : Clears the current line completely.
    • ANSI_BACK_UP

      public static final Ansi_Styling ANSI_BACK_UP
      : Moves the cursor up by one line.
    • ANSI_START_OF_LINE

      public static final Ansi_Styling ANSI_START_OF_LINE
      : Returns the cursor to the start of the current line to overwrite
    • ANSI_ITALICS

      public static final Ansi_Styling ANSI_ITALICS
      : Turns text into italics
    • ANSI_BOLD

      public static final Ansi_Styling ANSI_BOLD
      Turns text into bold
    • ANSI_STRIKETHROUGH

      public static final Ansi_Styling ANSI_STRIKETHROUGH
      Allows text to be struck through
    • ANSI_YELLOW_BG

      public static final Ansi_Styling ANSI_YELLOW_BG
      Background of text is set to yellow
    • ANSI_GREEN_BG

      public static final Ansi_Styling ANSI_GREEN_BG
      Background of text is set to green
    • ANSI_RED_BG

      public static final Ansi_Styling ANSI_RED_BG
      Background of text is set to green
    • ANSI_DEFAULT_BG

      public static final Ansi_Styling ANSI_DEFAULT_BG
      Background of the terminal is reset
    • ANSI_RESET

      public static final Ansi_Styling ANSI_RESET
      Resets a style back to default
  • Method Details

    • values

      public static Ansi_Styling[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Ansi_Styling valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public String getCode()
    • makeItalic

      public static String makeItalic(String message)
    • makeBold

      public static String makeBold(String message)
    • moveTextOnScreen

      public static String moveTextOnScreen(String message, int howFar)