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 -
Method Summary
Modifier and TypeMethodDescriptionRemoves all active modifiersdisableModifiers
(SGR... modifiers) Removes zero or more modifiers from the set of currently active modifiersenableModifiers
(SGR... modifiers) Adds zero or more modifiers to the set of currently active modifiersReturns all the SGR codes that are currently activeReturns the current background colorReturns the current foreground colorsetBackgroundColor
(TextColor backgroundColor) Updates the current background colorsetForegroundColor
(TextColor foregroundColor) Updates the current foreground colorsetModifiers
(EnumSet<SGR> modifiers) Sets the active modifiers to exactly the set passed in to this method.setStyleFrom
(StyleSet<?> source) copy colors and set of SGR codes
-
Method Details
-
getBackgroundColor
TextColor getBackgroundColor()Returns the current background color- Returns:
- Current background color
-
setBackgroundColor
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
Updates the current foreground color- Parameters:
foregroundColor
- New foreground color- Returns:
- Itself
-
enableModifiers
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
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
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
Returns all the SGR codes that are currently active- Returns:
- Currently active SGR modifiers
-
setStyleFrom
copy colors and set of SGR codes- Parameters:
source
- Modifiers to set as active- Returns:
- Itself
-