Package picocli
Class CommandLine.Help.ColorScheme
- java.lang.Object
-
- picocli.CommandLine.Help.ColorScheme
-
- Enclosing class:
- CommandLine.Help
public static class CommandLine.Help.ColorScheme extends Object
All usage help message are generated with a color scheme that assigns certain styles and colors to common parts of a usage message: the command name, options, positional parameters and option parameters. Users may customize these styles by creating Help with a custom color scheme.Note that these options and styles may not be rendered if ANSI escape codes are not enabled.
From 4.0, instances of this class are immutable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommandLine.Help.ColorScheme.BuilderBuilder class to createColorSchemeinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandLine.Help.Ansiansi()Returns theAnsisetting of this color scheme.List<CommandLine.Help.Ansi.IStyle>commandStyles()Returns the registered styles for commands in this color scheme.CommandLine.Help.Ansi.TextcommandText(String command)Returns a Text with all command styles applied to the specified command string.booleanequals(Object obj)inthashCode()List<CommandLine.Help.Ansi.IStyle>optionParamStyles()Returns the registered styles for option parameters in this color scheme.CommandLine.Help.Ansi.TextoptionParamText(String optionParam)Returns a Text with all optionParam styles applied to the specified optionParam string.List<CommandLine.Help.Ansi.IStyle>optionStyles()Returns the registered styles for options in this color scheme.CommandLine.Help.Ansi.TextoptionText(String option)Returns a Text with all option styles applied to the specified option string.List<CommandLine.Help.Ansi.IStyle>parameterStyles()Returns the registered styles for positional parameters in this color scheme.CommandLine.Help.Ansi.TextparameterText(String parameter)Returns a Text with all parameter styles applied to the specified parameter string.
-
-
-
Method Detail
-
commandText
public CommandLine.Help.Ansi.Text commandText(String command)
Returns a Text with all command styles applied to the specified command string.- Parameters:
command- the command string to apply the registered command styles to- Returns:
- a Text with all command styles applied to the specified command string
-
optionText
public CommandLine.Help.Ansi.Text optionText(String option)
Returns a Text with all option styles applied to the specified option string.- Parameters:
option- the option string to apply the registered option styles to- Returns:
- a Text with all option styles applied to the specified option string
-
parameterText
public CommandLine.Help.Ansi.Text parameterText(String parameter)
Returns a Text with all parameter styles applied to the specified parameter string.- Parameters:
parameter- the parameter string to apply the registered parameter styles to- Returns:
- a Text with all parameter styles applied to the specified parameter string
-
optionParamText
public CommandLine.Help.Ansi.Text optionParamText(String optionParam)
Returns a Text with all optionParam styles applied to the specified optionParam string.- Parameters:
optionParam- the option parameter string to apply the registered option parameter styles to- Returns:
- a Text with all option parameter styles applied to the specified option parameter string
-
ansi
public CommandLine.Help.Ansi ansi()
Returns theAnsisetting of this color scheme.
-
commandStyles
public List<CommandLine.Help.Ansi.IStyle> commandStyles()
Returns the registered styles for commands in this color scheme.- Since:
- 4.0
-
optionStyles
public List<CommandLine.Help.Ansi.IStyle> optionStyles()
Returns the registered styles for options in this color scheme.- Since:
- 4.0
-
parameterStyles
public List<CommandLine.Help.Ansi.IStyle> parameterStyles()
Returns the registered styles for positional parameters in this color scheme.- Since:
- 4.0
-
optionParamStyles
public List<CommandLine.Help.Ansi.IStyle> optionParamStyles()
Returns the registered styles for option parameters in this color scheme.- Since:
- 4.0
-
-