Serializable, Comparable<String>, org.refcodes.mixin.CodeAccessor<String>public enum AnsiEscapeCode extends Enum<AnsiEscapeCode> implements org.refcodes.mixin.CodeAccessor<String>
String instances. Set a color e.g. with prepending
FG_BLUE_BRIGHT to your String and appending RESET
to reset the current ANSI console's state (an ANSI console remembers your
settings till them are overwritten or reseted). The codes found here
represent just a few possibilities which we placed here as them are used here
and there throughout the REFCODES.ORG artifacts. For professional ANSI escape
code handling see fusesource' jansi API at
"https://github.com/fusesource/jansi".org.refcodes.mixin.CodeAccessor.CodeBuilder<V extends Object,B extends org.refcodes.mixin.CodeAccessor.CodeBuilder<V,B>>, org.refcodes.mixin.CodeAccessor.CodeMutator<V extends Object>, org.refcodes.mixin.CodeAccessor.CodeProperty<V extends Object>| Enum Constant | Description |
|---|---|
ESC |
The ANSI Escape-Code with which each ANSI escape sequence is commenced.
|
FG_BLUE_BRIGHT |
Sets a bright blue foreground (text) color.
|
FG_BLUE_BRIGHT_BOLD |
Sets a bright blue foreground (text) color.
|
FG_DEFAULT_BRIGHT |
Sets a default bright foreground (text) color.
|
FG_GREEN_BRIGHT |
Sets a bright green foreground (text) color.
|
FG_RED |
Sets a red foreground (text) color.
|
FG_RED_BRIGHT |
Sets a bright red foreground (text) color.
|
FG_RED_BRIGHT_BOLD |
Sets a bright red foreground (text) color.
|
FG_WHITE |
Sets a white foreground (text) color.
|
FG_WHITE_BRIGHT_BG_BLACK |
Sets a bright white foreground (text) with a black background color.
|
FG_WHITE_BRIGHT_BG_RED |
Sets a bright white foreground (text) with a red background color.
|
FG_WHITE_UNDERLINE |
Sets a white underlined foreground (text) color.
|
FG_YELLOW_BRIGHT_BG_BLUE_BRIGHT |
Sets a bright yellow foreground (text) with a bright blue background color.
|
RESET |
Reset the current ANSI console's color settings to default settings.
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
getCode() |
|
String |
toEscaped() |
Returns the escaped ANSI Escape-Code to be printable without triggering
the actual ANSI escape commands.
|
static AnsiEscapeCode |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static AnsiEscapeCode[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AnsiEscapeCode RESET
public static final AnsiEscapeCode FG_WHITE
public static final AnsiEscapeCode FG_WHITE_UNDERLINE
public static final AnsiEscapeCode FG_WHITE_BRIGHT_BG_BLACK
public static final AnsiEscapeCode FG_RED_BRIGHT_BOLD
public static final AnsiEscapeCode FG_WHITE_BRIGHT_BG_RED
public static final AnsiEscapeCode FG_GREEN_BRIGHT
public static final AnsiEscapeCode FG_RED
public static final AnsiEscapeCode FG_BLUE_BRIGHT_BOLD
public static final AnsiEscapeCode FG_DEFAULT_BRIGHT
public static final AnsiEscapeCode FG_BLUE_BRIGHT
public static final AnsiEscapeCode FG_RED_BRIGHT
public static final AnsiEscapeCode FG_YELLOW_BRIGHT_BG_BLUE_BRIGHT
public static final AnsiEscapeCode ESC
public static AnsiEscapeCode[] values()
for (AnsiEscapeCode c : AnsiEscapeCode.values()) System.out.println(c);
public static AnsiEscapeCode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getCode()
getCode in interface org.refcodes.mixin.CodeAccessor<String>public String toEscaped()
Copyright © 2018. All rights reserved.