java.lang.Object
com.googlecode.lanterna.graphics.TextGraphicsWriter
- All Implemented Interfaces:
StyleSet<TextGraphicsWriter>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.googlecode.lanterna.graphics.StyleSet
StyleSet.Set -
Constructor Summary
Constructors -
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 colorbooleanvoidputControlChar(char ch) setBackgroundColor(TextColor background) Updates the current background colorvoidsetCursorPosition(TerminalPosition cursorPosition) setForegroundColor(TextColor foreground) Updates the current foreground colorsetModifiers(EnumSet<SGR> modifiers) Sets the active modifiers to exactly the set passed in to this method.voidsetStyleable(boolean styleable) setStyleFrom(StyleSet<?> source) copy colors and set of SGR codesvoidsetWrapBehaviour(WrapBehaviour wrapBehaviour)
-
Constructor Details
-
TextGraphicsWriter
-
-
Method Details
-
putString
-
putControlChar
public void putControlChar(char ch) -
getCursorPosition
- Returns:
- the cursor position
-
setCursorPosition
- Parameters:
cursorPosition- the cursor position to set
-
getForegroundColor
Description copied from interface:StyleSetReturns the current foreground color- Specified by:
getForegroundColorin interfaceStyleSet<TextGraphicsWriter>- Returns:
- the foreground color
-
setForegroundColor
Description copied from interface:StyleSetUpdates the current foreground color- Specified by:
setForegroundColorin interfaceStyleSet<TextGraphicsWriter>- Parameters:
foreground- the foreground color to set- Returns:
- Itself
-
getBackgroundColor
Description copied from interface:StyleSetReturns the current background color- Specified by:
getBackgroundColorin interfaceStyleSet<TextGraphicsWriter>- Returns:
- the background color
-
setBackgroundColor
Description copied from interface:StyleSetUpdates the current background color- Specified by:
setBackgroundColorin interfaceStyleSet<TextGraphicsWriter>- Parameters:
background- the background color to set- Returns:
- Itself
-
enableModifiers
Description copied from interface:StyleSetAdds zero or more modifiers to the set of currently active modifiers- Specified by:
enableModifiersin interfaceStyleSet<TextGraphicsWriter>- Parameters:
modifiers- Modifiers to add to the set of currently active modifiers- Returns:
- Itself
-
disableModifiers
Description copied from interface:StyleSetRemoves zero or more modifiers from the set of currently active modifiers- Specified by:
disableModifiersin interfaceStyleSet<TextGraphicsWriter>- Parameters:
modifiers- Modifiers to remove from the set of currently active modifiers- Returns:
- Itself
-
setModifiers
Description copied from interface:StyleSetSets the active modifiers to exactly the set passed in to this method. Any previous state of which modifiers are enabled doesn't matter.- Specified by:
setModifiersin interfaceStyleSet<TextGraphicsWriter>- Parameters:
modifiers- Modifiers to set as active- Returns:
- Itself
-
clearModifiers
Description copied from interface:StyleSetRemoves all active modifiers- Specified by:
clearModifiersin interfaceStyleSet<TextGraphicsWriter>- Returns:
- Itself
-
getActiveModifiers
Description copied from interface:StyleSetReturns all the SGR codes that are currently active- Specified by:
getActiveModifiersin interfaceStyleSet<TextGraphicsWriter>- Returns:
- Currently active SGR modifiers
-
setStyleFrom
Description copied from interface:StyleSetcopy colors and set of SGR codes- Specified by:
setStyleFromin interfaceStyleSet<TextGraphicsWriter>- Parameters:
source- Modifiers to set as active- Returns:
- Itself
-
getWrapBehaviour
- Returns:
- the wrapBehaviour
-
setWrapBehaviour
- Parameters:
wrapBehaviour- the wrapBehaviour to set
-
isStyleable
public boolean isStyleable()- Returns:
- whether styles in strings are handled.
-
setStyleable
public void setStyleable(boolean styleable) - Parameters:
styleable- whether styles in strings should be handled.
-