StyleSet<StyleSet.Set>
public static class StyleSet.Set extends Object implements StyleSet<StyleSet.Set>
StyleSet.Set
Modifier and Type | Method | Description |
---|---|---|
StyleSet.Set |
clearModifiers() |
Removes all active modifiers
|
StyleSet.Set |
disableModifiers(SGR... modifiers) |
Removes zero or more modifiers from the set of currently active modifiers
|
StyleSet.Set |
enableModifiers(SGR... modifiers) |
Adds zero or more modifiers to the set of currently active modifiers
|
EnumSet<SGR> |
getActiveModifiers() |
Returns all the SGR codes that are currently active
|
TextColor |
getBackgroundColor() |
Returns the current background color
|
TextColor |
getForegroundColor() |
Returns the current foreground color
|
StyleSet.Set |
setBackgroundColor(TextColor backgroundColor) |
Updates the current background color
|
StyleSet.Set |
setForegroundColor(TextColor foregroundColor) |
Updates the current foreground color
|
StyleSet.Set |
setModifiers(EnumSet<SGR> modifiers) |
Sets the active modifiers to exactly the set passed in to this method.
|
StyleSet.Set |
setStyleFrom(StyleSet<?> source) |
copy colors and set of SGR codes
|
public Set()
public Set(StyleSet<?> source)
public TextColor getBackgroundColor()
StyleSet
getBackgroundColor
in interface StyleSet<StyleSet.Set>
public StyleSet.Set setBackgroundColor(TextColor backgroundColor)
StyleSet
setBackgroundColor
in interface StyleSet<StyleSet.Set>
backgroundColor
- New background colorpublic TextColor getForegroundColor()
StyleSet
getForegroundColor
in interface StyleSet<StyleSet.Set>
public StyleSet.Set setForegroundColor(TextColor foregroundColor)
StyleSet
setForegroundColor
in interface StyleSet<StyleSet.Set>
foregroundColor
- New foreground colorpublic StyleSet.Set enableModifiers(SGR... modifiers)
StyleSet
enableModifiers
in interface StyleSet<StyleSet.Set>
modifiers
- Modifiers to add to the set of currently active modifierspublic StyleSet.Set disableModifiers(SGR... modifiers)
StyleSet
disableModifiers
in interface StyleSet<StyleSet.Set>
modifiers
- Modifiers to remove from the set of currently active modifierspublic StyleSet.Set setModifiers(EnumSet<SGR> modifiers)
StyleSet
setModifiers
in interface StyleSet<StyleSet.Set>
modifiers
- Modifiers to set as activepublic StyleSet.Set clearModifiers()
StyleSet
clearModifiers
in interface StyleSet<StyleSet.Set>
public EnumSet<SGR> getActiveModifiers()
StyleSet
getActiveModifiers
in interface StyleSet<StyleSet.Set>
public StyleSet.Set setStyleFrom(StyleSet<?> source)
StyleSet
setStyleFrom
in interface StyleSet<StyleSet.Set>
source
- Modifiers to set as activeCopyright © 2020. All rights reserved.