Package org.jline.builtins
Class Styles
- java.lang.Object
-
- org.jline.builtins.Styles
-
public class Styles extends java.lang.Object
Provides styling utilities for JLine applications.This class contains methods and constants for working with terminal styles and colors. It supports various style formats including:
- LS_COLORS format for file listings
- Help text styling
- Print styling
- Syntax highlighting
The class provides parsers for different style formats and resolvers to apply styles to text in the terminal.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Styles.StyleCompiler
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.List<java.lang.String>
ANSI_STYLES
static java.lang.String
NANORC_THEME
-
Constructor Summary
Constructors Constructor Description Styles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StyleResolver
helpStyle()
Gets a StyleResolver for help text using HELP_COLORS format.static boolean
isStylePattern(java.lang.String style)
static StyleResolver
lsStyle()
Gets a StyleResolver for file listings using LS_COLORS format.static StyleResolver
prntStyle()
Gets a StyleResolver for print output using PRNT_COLORS format.static StyleResolver
style(java.lang.String style)
static StyleResolver
style(java.lang.String name, java.lang.String defStyle)
-
-
-
Field Detail
-
NANORC_THEME
public static final java.lang.String NANORC_THEME
- See Also:
- Constant Field Values
-
ANSI_STYLES
protected static final java.util.List<java.lang.String> ANSI_STYLES
-
-
Method Detail
-
lsStyle
public static StyleResolver lsStyle()
Gets a StyleResolver for file listings using LS_COLORS format.This method creates a StyleResolver that applies styles to file listings based on the LS_COLORS environment variable or default styles if not set.
- Returns:
- a StyleResolver for file listings
-
helpStyle
public static StyleResolver helpStyle()
Gets a StyleResolver for help text using HELP_COLORS format.This method creates a StyleResolver that applies styles to help text based on the HELP_COLORS environment variable or default styles if not set.
- Returns:
- a StyleResolver for help text
-
prntStyle
public static StyleResolver prntStyle()
Gets a StyleResolver for print output using PRNT_COLORS format.This method creates a StyleResolver that applies styles to print output based on the PRNT_COLORS environment variable or default styles if not set.
- Returns:
- a StyleResolver for print output
-
isStylePattern
public static boolean isStylePattern(java.lang.String style)
-
style
public static StyleResolver style(java.lang.String name, java.lang.String defStyle)
-
style
public static StyleResolver style(java.lang.String style)
-
-