public static class CommandLine.Help.ColorScheme extends Object
Note that these options and styles may not be rendered if ANSI escape codes are not enabled.
Modifier and Type | Field and Description |
---|---|
List<CommandLine.Help.Ansi.IStyle> |
commandStyles |
List<CommandLine.Help.Ansi.IStyle> |
optionParamStyles |
List<CommandLine.Help.Ansi.IStyle> |
optionStyles |
List<CommandLine.Help.Ansi.IStyle> |
parameterStyles |
Constructor and Description |
---|
ColorScheme()
Constructs a new ColorScheme with
CommandLine.Help.Ansi.AUTO . |
ColorScheme(CommandLine.Help.Ansi ansi)
Constructs a new 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(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(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(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(String parameter)
Returns a Text with all parameter styles applied to the specified parameter string.
|
public final List<CommandLine.Help.Ansi.IStyle> commandStyles
public final List<CommandLine.Help.Ansi.IStyle> optionStyles
public final List<CommandLine.Help.Ansi.IStyle> parameterStyles
public final 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 notpublic 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(String command)
command
- the command string to apply the registered command styles topublic CommandLine.Help.Ansi.Text optionText(String option)
option
- the option string to apply the registered option styles topublic CommandLine.Help.Ansi.Text parameterText(String parameter)
parameter
- the parameter string to apply the registered parameter styles topublic CommandLine.Help.Ansi.Text optionParamText(String optionParam)
optionParam
- the option parameter string to apply the registered option parameter styles topublic CommandLine.Help.ColorScheme applySystemProperties()
picocli.color.commands
picocli.color.options
picocli.color.parameters
picocli.color.optionParams
Property values can be anything that CommandLine.Help.Ansi.Style.parse(String)
can handle.
public CommandLine.Help.Ansi ansi()
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.