public static class CommandLine.Help.ColorScheme
extends java.lang.Object
Note that these options and styles may not be rendered if ANSI escape codes are not enabled.
| Modifier and Type | Field and Description |
|---|---|
java.util.List<CommandLine.Help.Ansi.IStyle> |
commandStyles |
java.util.List<CommandLine.Help.Ansi.IStyle> |
optionParamStyles |
java.util.List<CommandLine.Help.Ansi.IStyle> |
optionStyles |
java.util.List<CommandLine.Help.Ansi.IStyle> |
parameterStyles |
| Constructor and Description |
|---|
ColorScheme()
Constructs a new empty ColorScheme with
CommandLine.Help.Ansi.AUTO. |
ColorScheme(CommandLine.Help.Ansi ansi)
Constructs a new empty ColorScheme with the specified Ansi enabled mode.
|
| Modifier and Type | Method and Description |
|---|---|
CommandLine.Help.Ansi |
ansi() |
CommandLine.Help.ColorScheme |
applySystemProperties()
Replaces colors and styles in this scheme with ones specified in system properties, and returns this scheme.
|
CommandLine.Help.ColorScheme |
commands(CommandLine.Help.Ansi.IStyle... styles)
Adds the specified styles to the registered styles for commands in this color scheme and returns this color scheme.
|
CommandLine.Help.Ansi.Text |
commandText(java.lang.String command)
Returns a Text with all command styles applied to the specified command string.
|
CommandLine.Help.ColorScheme |
optionParams(CommandLine.Help.Ansi.IStyle... styles)
Adds the specified styles to the registered styles for option parameters in this color scheme and returns this color scheme.
|
CommandLine.Help.Ansi.Text |
optionParamText(java.lang.String optionParam)
Returns a Text with all optionParam styles applied to the specified optionParam string.
|
CommandLine.Help.ColorScheme |
options(CommandLine.Help.Ansi.IStyle... styles)
Adds the specified styles to the registered styles for options in this color scheme and returns this color scheme.
|
CommandLine.Help.Ansi.Text |
optionText(java.lang.String option)
Returns a Text with all option styles applied to the specified option string.
|
CommandLine.Help.ColorScheme |
parameters(CommandLine.Help.Ansi.IStyle... styles)
Adds the specified styles to the registered styles for positional parameters in this color scheme and returns this color scheme.
|
CommandLine.Help.Ansi.Text |
parameterText(java.lang.String parameter)
Returns a Text with all parameter styles applied to the specified parameter string.
|
public final java.util.List<CommandLine.Help.Ansi.IStyle> commandStyles
public final java.util.List<CommandLine.Help.Ansi.IStyle> optionStyles
public final java.util.List<CommandLine.Help.Ansi.IStyle> parameterStyles
public final java.util.List<CommandLine.Help.Ansi.IStyle> optionParamStyles
public ColorScheme()
CommandLine.Help.Ansi.AUTO.public ColorScheme(CommandLine.Help.Ansi ansi)
ansi - whether to emit ANSI escape codes or notCommandLine.Help.defaultColorScheme(Ansi)public CommandLine.Help.ColorScheme commands(CommandLine.Help.Ansi.IStyle... styles)
styles - the styles to add to the registered styles for commands in this color schemepublic CommandLine.Help.ColorScheme options(CommandLine.Help.Ansi.IStyle... styles)
styles - the styles to add to registered the styles for options in this color schemepublic CommandLine.Help.ColorScheme parameters(CommandLine.Help.Ansi.IStyle... styles)
styles - the styles to add to registered the styles for parameters in this color schemepublic CommandLine.Help.ColorScheme optionParams(CommandLine.Help.Ansi.IStyle... styles)
styles - the styles to add to the registered styles for option parameters in this color schemepublic CommandLine.Help.Ansi.Text commandText(java.lang.String command)
command - the command string to apply the registered command styles topublic CommandLine.Help.Ansi.Text optionText(java.lang.String option)
option - the option string to apply the registered option styles topublic CommandLine.Help.Ansi.Text parameterText(java.lang.String parameter)
parameter - the parameter string to apply the registered parameter styles topublic CommandLine.Help.Ansi.Text optionParamText(java.lang.String optionParam)
optionParam - the option parameter string to apply the registered option parameter styles topublic CommandLine.Help.ColorScheme applySystemProperties()
picocli.color.commandspicocli.color.optionspicocli.color.parameterspicocli.color.optionParamsProperty values can be anything that CommandLine.Help.Ansi.Style.parse(String) can handle.
public CommandLine.Help.Ansi ansi()