org.crsh.text
Class Style
java.lang.Object
org.crsh.text.Style
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- Style.Composite
public abstract class Style
- extends Object
- implements Serializable
A control for the text stylistric attributes:
background color
foreground color
underline
bold
blink
A style is either a composite style or the reset
style. Styles can be composed together to form a new
style style.merge(other)
.
- See Also:
- Serialized Form
Constructor Summary |
Style()
|
reset
public static final Style reset
BOOLEANS
private static final Boolean[] BOOLEANS
- .
COLORS
private static final Color[] COLORS
- .
ALL
private static final Style.Composite[][][][][] ALL
- [bold][underline][blink][foreground][background].
Style
public Style()
style
public static Style.Composite style(Color foreground)
style
public static Style.Composite style(Color foreground,
Color background)
style
public static Style.Composite style(Decoration decoration,
Color foreground,
Color background)
style
public static Style.Composite style(Boolean bold,
Boolean underline,
Boolean blink,
Color foreground,
Color background)
style
public static Style.Composite style()
- Create a new blank style.
- Returns:
- the style
style
public static Style.Composite style(Decoration decoration)
style
public static Style.Composite style(Decoration decoration,
Color foreground)
merge
public abstract Style merge(Style s)
throws NullPointerException
- Throws:
NullPointerException
toAnsiSequence
public CharSequence toAnsiSequence()
writeAnsiTo
public abstract void writeAnsiTo(Appendable appendable)
throws IOException
- Throws:
IOException
toString
public abstract String toString()
- Overrides:
toString
in class Object
Copyright © 2015 eXo Platform SAS. All Rights Reserved.