Module com.googlecode.lanterna
Package com.googlecode.lanterna.graphics
Interface StyleSet<T extends StyleSet<T>>
-
- All Known Subinterfaces:
TextGraphics
,TextGUIGraphics
,ThemedTextGraphics
- All Known Implementing Classes:
AbstractTextGraphics
,DefaultTextGUIGraphics
,DoublePrintingTextGraphics
,NullTextGraphics
,ScreenTextGraphics
,StyleSet.Set
,SubTextGraphics
,TerminalTextGraphics
,TextGraphicsWriter
,TextGraphicsWriter.WordPart
,VirtualTerminalTextGraphics
public interface StyleSet<T extends StyleSet<T>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
StyleSet.Set
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
clearModifiers()
Removes all active modifiersT
disableModifiers(SGR... modifiers)
Removes zero or more modifiers from the set of currently active modifiersT
enableModifiers(SGR... modifiers)
Adds zero or more modifiers to the set of currently active modifiersjava.util.EnumSet<SGR>
getActiveModifiers()
Returns all the SGR codes that are currently activeTextColor
getBackgroundColor()
Returns the current background colorTextColor
getForegroundColor()
Returns the current foreground colorT
setBackgroundColor(TextColor backgroundColor)
Updates the current background colorT
setForegroundColor(TextColor foregroundColor)
Updates the current foreground colorT
setModifiers(java.util.EnumSet<SGR> modifiers)
Sets the active modifiers to exactly the set passed in to this method.T
setStyleFrom(StyleSet<?> source)
copy colors and set of SGR codes
-
-
-
Method Detail
-
getBackgroundColor
TextColor getBackgroundColor()
Returns the current background color- Returns:
- Current background color
-
setBackgroundColor
T setBackgroundColor(TextColor backgroundColor)
Updates the current background color- Parameters:
backgroundColor
- New background color- Returns:
- Itself
-
getForegroundColor
TextColor getForegroundColor()
Returns the current foreground color- Returns:
- Current foreground color
-
setForegroundColor
T setForegroundColor(TextColor foregroundColor)
Updates the current foreground color- Parameters:
foregroundColor
- New foreground color- Returns:
- Itself
-
enableModifiers
T enableModifiers(SGR... modifiers)
Adds zero or more modifiers to the set of currently active modifiers- Parameters:
modifiers
- Modifiers to add to the set of currently active modifiers- Returns:
- Itself
-
disableModifiers
T disableModifiers(SGR... modifiers)
Removes zero or more modifiers from the set of currently active modifiers- Parameters:
modifiers
- Modifiers to remove from the set of currently active modifiers- Returns:
- Itself
-
setModifiers
T setModifiers(java.util.EnumSet<SGR> modifiers)
Sets the active modifiers to exactly the set passed in to this method. Any previous state of which modifiers are enabled doesn't matter.- Parameters:
modifiers
- Modifiers to set as active- Returns:
- Itself
-
clearModifiers
T clearModifiers()
Removes all active modifiers- Returns:
- Itself
-
getActiveModifiers
java.util.EnumSet<SGR> getActiveModifiers()
Returns all the SGR codes that are currently active- Returns:
- Currently active SGR modifiers
-
-