public interface TextGraphics
Modifier and Type | Method and Description |
---|---|
void |
applyTheme(Theme.Category category)
Applies theme-specific settings according to the category supplied.
|
void |
applyTheme(Theme.Definition themeItem)
Applies theme-specific settings according to the definition supplied.
|
void |
drawString(int column,
int row,
String string,
ScreenCharacterStyle... styles)
Draws a string to the terminal, with the first character starting at
specified coordinates and which an option list of styles applied.
|
void |
fillArea(char character)
Replaces the content of the entire TextGraphic object with one character
|
void |
fillRectangle(char character,
TerminalPosition topLeft,
TerminalSize rectangleSize)
Replaces the content of a rectangle within the TextGraphic drawing area
with a specified character
|
Terminal.Color |
getBackgroundColor() |
Terminal.Color |
getForegroundColor() |
int |
getHeight()
Height, in rows, of the TextGraphics drawing area.
|
TerminalSize |
getSize()
Size of the area the
TextGraphics can edit, as a TerminalSize object,
any attempts to draw outside of this area will be ignored. |
Theme |
getTheme() |
int |
getWidth()
Width, in columns, of the TextGraphics drawing area.
|
void |
setBackgroundColor(Terminal.Color backgroundColor) |
void |
setBoldMask(boolean enabledBoldMask) |
void |
setForegroundColor(Terminal.Color foregroundColor) |
TextGraphics |
subAreaGraphics(TerminalPosition terminalPosition)
Creates a new TextGraphics object using the same area or smaller.
|
TextGraphics |
subAreaGraphics(TerminalPosition topLeft,
TerminalSize subAreaSize)
Creates a new TextGraphics object using the same area or smaller.
|
TerminalPosition |
translateToGlobalCoordinates(TerminalPosition pointInArea)
Translates local coordinates of this TextGraphics object to global
|
void applyTheme(Theme.Category category)
category
- Category to usevoid applyTheme(Theme.Definition themeItem)
themeItem
- Definition to usevoid drawString(int column, int row, String string, ScreenCharacterStyle... styles)
column
- Column of the first character in the stringrow
- Row of the first character in the stringstring
- String to print to terminalstyles
- Which styles to apply to the stringvoid fillArea(char character)
character
- Character to fill the area withvoid fillRectangle(char character, TerminalPosition topLeft, TerminalSize rectangleSize)
character
- Character to fill the area withTerminal.Color getBackgroundColor()
Terminal.Color getForegroundColor()
int getHeight()
TerminalSize getSize()
TextGraphics
can edit, as a TerminalSize
object,
any attempts to draw outside of this area will be ignored.TextGraphics
can edit, as a TerminalSize
objectTheme getTheme()
int getWidth()
void setBackgroundColor(Terminal.Color backgroundColor)
void setBoldMask(boolean enabledBoldMask)
void setForegroundColor(Terminal.Color foregroundColor)
TextGraphics subAreaGraphics(TerminalPosition terminalPosition)
terminalPosition
- In local coordinates of the current TextGraphics,
the left-left coordinates of the new TextGraphicsTextGraphics subAreaGraphics(TerminalPosition topLeft, TerminalSize subAreaSize)
topLeft
- In local coordinates of the current TextGraphics,
the left-left coordinates of the new TextGraphicssubAreaSize
- Size of the area the new TextGraphics will coverTerminalPosition translateToGlobalCoordinates(TerminalPosition pointInArea)
pointInArea
- Point in local coordinatesCopyright © 2015. All Rights Reserved.