StyleSet<TextGraphicsWriter>
public class TextGraphicsWriter extends Object implements StyleSet<TextGraphicsWriter>
StyleSet.Set
Constructor | Description |
---|---|
TextGraphicsWriter(TextGraphics backend) |
Modifier and Type | Method | Description |
---|---|---|
TextGraphicsWriter |
clearModifiers() |
Removes all active modifiers
|
TextGraphicsWriter |
disableModifiers(SGR... modifiers) |
Removes zero or more modifiers from the set of currently active modifiers
|
TextGraphicsWriter |
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
|
TerminalPosition |
getCursorPosition() |
|
TextColor |
getForegroundColor() |
Returns the current foreground color
|
WrapBehaviour |
getWrapBehaviour() |
|
boolean |
isStyleable() |
|
void |
putControlChar(char ch) |
|
TextGraphicsWriter |
putString(String string) |
|
TextGraphicsWriter |
setBackgroundColor(TextColor background) |
Updates the current background color
|
void |
setCursorPosition(TerminalPosition cursorPosition) |
|
TextGraphicsWriter |
setForegroundColor(TextColor foreground) |
Updates the current foreground color
|
TextGraphicsWriter |
setModifiers(EnumSet<SGR> modifiers) |
Sets the active modifiers to exactly the set passed in to this method.
|
void |
setStyleable(boolean styleable) |
|
TextGraphicsWriter |
setStyleFrom(StyleSet<?> source) |
copy colors and set of SGR codes
|
void |
setWrapBehaviour(WrapBehaviour wrapBehaviour) |
public TextGraphicsWriter(TextGraphics backend)
public TextGraphicsWriter putString(String string)
public void putControlChar(char ch)
public TerminalPosition getCursorPosition()
public void setCursorPosition(TerminalPosition cursorPosition)
cursorPosition
- the cursor position to setpublic TextColor getForegroundColor()
StyleSet
getForegroundColor
in interface StyleSet<TextGraphicsWriter>
public TextGraphicsWriter setForegroundColor(TextColor foreground)
StyleSet
setForegroundColor
in interface StyleSet<TextGraphicsWriter>
foreground
- the foreground color to setpublic TextColor getBackgroundColor()
StyleSet
getBackgroundColor
in interface StyleSet<TextGraphicsWriter>
public TextGraphicsWriter setBackgroundColor(TextColor background)
StyleSet
setBackgroundColor
in interface StyleSet<TextGraphicsWriter>
background
- the background color to setpublic TextGraphicsWriter enableModifiers(SGR... modifiers)
StyleSet
enableModifiers
in interface StyleSet<TextGraphicsWriter>
modifiers
- Modifiers to add to the set of currently active modifierspublic TextGraphicsWriter disableModifiers(SGR... modifiers)
StyleSet
disableModifiers
in interface StyleSet<TextGraphicsWriter>
modifiers
- Modifiers to remove from the set of currently active modifierspublic TextGraphicsWriter setModifiers(EnumSet<SGR> modifiers)
StyleSet
setModifiers
in interface StyleSet<TextGraphicsWriter>
modifiers
- Modifiers to set as activepublic TextGraphicsWriter clearModifiers()
StyleSet
clearModifiers
in interface StyleSet<TextGraphicsWriter>
public EnumSet<SGR> getActiveModifiers()
StyleSet
getActiveModifiers
in interface StyleSet<TextGraphicsWriter>
public TextGraphicsWriter setStyleFrom(StyleSet<?> source)
StyleSet
setStyleFrom
in interface StyleSet<TextGraphicsWriter>
source
- Modifiers to set as activepublic WrapBehaviour getWrapBehaviour()
public void setWrapBehaviour(WrapBehaviour wrapBehaviour)
wrapBehaviour
- the wrapBehaviour to setpublic boolean isStyleable()
public void setStyleable(boolean styleable)
styleable
- whether styles in strings should be handled.Copyright © 2020. All rights reserved.