Package org.jline.utils
Class AttributedStyle
- java.lang.Object
-
- org.jline.utils.AttributedStyle
-
public class AttributedStyle extends java.lang.Object
Text styling.- Author:
- Guillaume Nodet
-
-
Field Summary
Fields Modifier and Type Field Description static int
BLACK
static int
BLUE
static AttributedStyle
BOLD
static AttributedStyle
BOLD_OFF
static int
BRIGHT
static int
CYAN
static AttributedStyle
DEFAULT
static int
GREEN
static AttributedStyle
HIDDEN
static AttributedStyle
HIDDEN_OFF
static AttributedStyle
INVERSE
static AttributedStyle
INVERSE_OFF
static int
MAGENTA
static int
RED
static int
WHITE
static int
YELLOW
-
Constructor Summary
Constructors Constructor Description AttributedStyle()
AttributedStyle(long style, long mask)
AttributedStyle(AttributedStyle s)
-
Method Summary
-
-
-
Field Detail
-
BLACK
public static final int BLACK
- See Also:
- Constant Field Values
-
RED
public static final int RED
- See Also:
- Constant Field Values
-
GREEN
public static final int GREEN
- See Also:
- Constant Field Values
-
YELLOW
public static final int YELLOW
- See Also:
- Constant Field Values
-
BLUE
public static final int BLUE
- See Also:
- Constant Field Values
-
MAGENTA
public static final int MAGENTA
- See Also:
- Constant Field Values
-
CYAN
public static final int CYAN
- See Also:
- Constant Field Values
-
WHITE
public static final int WHITE
- See Also:
- Constant Field Values
-
BRIGHT
public static final int BRIGHT
- See Also:
- Constant Field Values
-
DEFAULT
public static final AttributedStyle DEFAULT
-
BOLD
public static final AttributedStyle BOLD
-
BOLD_OFF
public static final AttributedStyle BOLD_OFF
-
INVERSE
public static final AttributedStyle INVERSE
-
INVERSE_OFF
public static final AttributedStyle INVERSE_OFF
-
HIDDEN
public static final AttributedStyle HIDDEN
-
HIDDEN_OFF
public static final AttributedStyle HIDDEN_OFF
-
-
Constructor Detail
-
AttributedStyle
public AttributedStyle()
-
AttributedStyle
public AttributedStyle(AttributedStyle s)
-
AttributedStyle
public AttributedStyle(long style, long mask)
-
-
Method Detail
-
bold
public AttributedStyle bold()
-
boldOff
public AttributedStyle boldOff()
-
boldDefault
public AttributedStyle boldDefault()
-
faint
public AttributedStyle faint()
-
faintOff
public AttributedStyle faintOff()
-
faintDefault
public AttributedStyle faintDefault()
-
italic
public AttributedStyle italic()
-
italicOff
public AttributedStyle italicOff()
-
italicDefault
public AttributedStyle italicDefault()
-
underline
public AttributedStyle underline()
-
underlineOff
public AttributedStyle underlineOff()
-
underlineDefault
public AttributedStyle underlineDefault()
-
blink
public AttributedStyle blink()
-
blinkOff
public AttributedStyle blinkOff()
-
blinkDefault
public AttributedStyle blinkDefault()
-
inverse
public AttributedStyle inverse()
-
inverseNeg
public AttributedStyle inverseNeg()
-
inverseOff
public AttributedStyle inverseOff()
-
inverseDefault
public AttributedStyle inverseDefault()
-
conceal
public AttributedStyle conceal()
-
concealOff
public AttributedStyle concealOff()
-
concealDefault
public AttributedStyle concealDefault()
-
crossedOut
public AttributedStyle crossedOut()
-
crossedOutOff
public AttributedStyle crossedOutOff()
-
crossedOutDefault
public AttributedStyle crossedOutDefault()
-
foreground
public AttributedStyle foreground(int color)
-
foreground
public AttributedStyle foreground(int r, int g, int b)
-
foregroundRgb
public AttributedStyle foregroundRgb(int color)
-
foregroundOff
public AttributedStyle foregroundOff()
-
foregroundDefault
public AttributedStyle foregroundDefault()
-
background
public AttributedStyle background(int color)
-
background
public AttributedStyle background(int r, int g, int b)
-
backgroundRgb
public AttributedStyle backgroundRgb(int color)
-
backgroundOff
public AttributedStyle backgroundOff()
-
backgroundDefault
public AttributedStyle backgroundDefault()
-
hidden
public AttributedStyle hidden()
The hidden flag can be used to embed custom escape sequences. The characters are considered being 0-column long and will be printed as-is. The user is responsible for ensuring that those sequences do not move the cursor.- Returns:
- the new style
-
hiddenOff
public AttributedStyle hiddenOff()
-
hiddenDefault
public AttributedStyle hiddenDefault()
-
getStyle
public long getStyle()
-
getMask
public long getMask()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toAnsi
public java.lang.String toAnsi()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-