public static enum CommandLine.Help.Ansi.Style extends Enum<CommandLine.Help.Ansi.Style> implements CommandLine.Help.Ansi.IStyle
Enum Constant and Description |
---|
bg_black |
bg_blue |
bg_cyan |
bg_green |
bg_magenta |
bg_red |
bg_white |
bg_yellow |
blink |
bold |
faint |
fg_black |
fg_blue |
fg_cyan |
fg_green |
fg_magenta |
fg_red |
fg_white |
fg_yellow |
italic |
reset |
reverse |
underline |
CSI
Modifier and Type | Method and Description |
---|---|
static CommandLine.Help.Ansi.IStyle |
bg(String str)
Parses the specified style markup and returns the associated style.
|
static CommandLine.Help.Ansi.IStyle |
fg(String str)
Parses the specified style markup and returns the associated style.
|
String |
off()
Returns the ANSI escape code for turning this style off.
|
static String |
off(CommandLine.Help.Ansi.IStyle... styles)
Returns the concatenated ANSI escape codes for turning all specified styles off.
|
String |
on()
Returns the ANSI escape code for turning this style on.
|
static String |
on(CommandLine.Help.Ansi.IStyle... styles)
Returns the concatenated ANSI escape codes for turning all specified styles on.
|
static CommandLine.Help.Ansi.IStyle[] |
parse(String commaSeparatedCodes)
Parses the specified comma-separated sequence of style descriptors and returns the associated
styles.
|
static CommandLine.Help.Ansi.Style |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CommandLine.Help.Ansi.Style[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CommandLine.Help.Ansi.Style reset
public static final CommandLine.Help.Ansi.Style bold
public static final CommandLine.Help.Ansi.Style faint
public static final CommandLine.Help.Ansi.Style italic
public static final CommandLine.Help.Ansi.Style underline
public static final CommandLine.Help.Ansi.Style blink
public static final CommandLine.Help.Ansi.Style reverse
public static final CommandLine.Help.Ansi.Style fg_black
public static final CommandLine.Help.Ansi.Style fg_red
public static final CommandLine.Help.Ansi.Style fg_green
public static final CommandLine.Help.Ansi.Style fg_yellow
public static final CommandLine.Help.Ansi.Style fg_blue
public static final CommandLine.Help.Ansi.Style fg_magenta
public static final CommandLine.Help.Ansi.Style fg_cyan
public static final CommandLine.Help.Ansi.Style fg_white
public static final CommandLine.Help.Ansi.Style bg_black
public static final CommandLine.Help.Ansi.Style bg_red
public static final CommandLine.Help.Ansi.Style bg_green
public static final CommandLine.Help.Ansi.Style bg_yellow
public static final CommandLine.Help.Ansi.Style bg_blue
public static final CommandLine.Help.Ansi.Style bg_magenta
public static final CommandLine.Help.Ansi.Style bg_cyan
public static final CommandLine.Help.Ansi.Style bg_white
public static CommandLine.Help.Ansi.Style[] values()
for (CommandLine.Help.Ansi.Style c : CommandLine.Help.Ansi.Style.values()) System.out.println(c);
public static CommandLine.Help.Ansi.Style 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 on()
CommandLine.Help.Ansi.IStyle
on
in interface CommandLine.Help.Ansi.IStyle
public String off()
CommandLine.Help.Ansi.IStyle
off
in interface CommandLine.Help.Ansi.IStyle
public static String on(CommandLine.Help.Ansi.IStyle... styles)
styles
- the styles to generate ANSI escape codes forpublic static String off(CommandLine.Help.Ansi.IStyle... styles)
styles
- the styles to generate ANSI escape codes forpublic static CommandLine.Help.Ansi.IStyle fg(String str)
"fg_"
is prepended, or it may be one of the indexed colors in the 256 color palette.str
- the case-insensitive style markup to convert, e.g. "blue"
or "fg_blue"
,
or "46"
(indexed color) or "0;5;0"
(RGB components of an indexed color)public static CommandLine.Help.Ansi.IStyle bg(String str)
"bg_"
is prepended, or it may be one of the indexed colors in the 256 color palette.str
- the case-insensitive style markup to convert, e.g. "blue"
or "bg_blue"
,
or "46"
(indexed color) or "0;5;0"
(RGB components of an indexed color)public static CommandLine.Help.Ansi.IStyle[] parse(String commaSeparatedCodes)
"bg("
are delegated to
bg(String)
, others are delegated to fg(String)
.commaSeparatedCodes
- one or more descriptors, e.g. "bg(blue),underline,red"