Module com.googlecode.lanterna
Class VirtualTerminalTextGraphics
- java.lang.Object
-
- com.googlecode.lanterna.graphics.AbstractTextGraphics
-
- com.googlecode.lanterna.terminal.virtual.VirtualTerminalTextGraphics
-
- All Implemented Interfaces:
StyleSet<TextGraphics>,TextGraphics
class VirtualTerminalTextGraphics extends AbstractTextGraphics
Implementation ofTextGraphicsforVirtualTerminal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.googlecode.lanterna.graphics.StyleSet
StyleSet.Set
-
-
Field Summary
Fields Modifier and Type Field Description private DefaultVirtualTerminalvirtualTerminal-
Fields inherited from class com.googlecode.lanterna.graphics.AbstractTextGraphics
activeModifiers, backgroundColor, foregroundColor, tabBehaviour
-
-
Constructor Summary
Constructors Constructor Description VirtualTerminalTextGraphics(DefaultVirtualTerminal virtualTerminal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextCharactergetCharacter(int column, int row)Returns the character at the specific position in the terminal.TextCharactergetCharacter(TerminalPosition position)Returns the character at the specific position in the terminal.TerminalSizegetSize()Returns the size of the area that this text graphic can write to.TextGraphicssetCharacter(int columnIndex, int rowIndex, TextCharacter textCharacter)Sets the character at the current position to the specified value, without using the current colors and modifiers of this TextGraphics.-
Methods inherited from class com.googlecode.lanterna.graphics.AbstractTextGraphics
clearModifiers, disableModifiers, drawImage, drawImage, drawLine, drawLine, drawLine, drawLine, drawRectangle, drawRectangle, drawTriangle, drawTriangle, enableModifiers, fill, fillRectangle, fillRectangle, fillTriangle, fillTriangle, getActiveModifiers, getBackgroundColor, getForegroundColor, getTabBehaviour, newTextGraphics, putCSIStyledString, putCSIStyledString, putString, putString, putString, putString, putString, setBackgroundColor, setCharacter, setCharacter, setCharacter, setForegroundColor, setModifiers, setStyleFrom, setTabBehaviour
-
-
-
-
Field Detail
-
virtualTerminal
private final DefaultVirtualTerminal virtualTerminal
-
-
Constructor Detail
-
VirtualTerminalTextGraphics
VirtualTerminalTextGraphics(DefaultVirtualTerminal virtualTerminal)
-
-
Method Detail
-
setCharacter
public TextGraphics setCharacter(int columnIndex, int rowIndex, TextCharacter textCharacter)
Description copied from interface:TextGraphicsSets the character at the current position to the specified value, without using the current colors and modifiers of this TextGraphics.- Parameters:
columnIndex- column of the location to set the characterrowIndex- row of the location to set the charactertextCharacter- Character data to set at the current position- Returns:
- Itself
-
getCharacter
public TextCharacter getCharacter(TerminalPosition position)
Description copied from interface:TextGraphicsReturns the character at the specific position in the terminal. May returnnullif the TextGraphics implementation doesn't support it or doesn't know what the character is.- Specified by:
getCharacterin interfaceTextGraphics- Overrides:
getCharacterin classAbstractTextGraphics- Parameters:
position- Position to return the character for- Returns:
- The text character at the specified position or
nullif not available
-
getCharacter
public TextCharacter getCharacter(int column, int row)
Description copied from interface:TextGraphicsReturns the character at the specific position in the terminal. May returnnullif the TextGraphics implementation doesn't support it or doesn't know what the character is.- Parameters:
column- Column to return the character forrow- Row to return the character for- Returns:
- The text character at the specified position or
nullif not available
-
getSize
public TerminalSize getSize()
Description copied from interface:TextGraphicsReturns the size of the area that this text graphic can write to. Any attempts of placing characters outside of this area will be silently ignored.- Returns:
- Size of the writable area that this TextGraphics can write too
-
-