public class ChuiPrimitives extends DriverPrimitives
Modifier and Type | Field and Description |
---|---|
private EmulatedTerminalState |
ets
Emulated terminal simulator implemented in a driver-specific manner.
|
cursorInvalid, EMPTY_CELL
Constructor and Description |
---|
ChuiPrimitives(EmulatedTerminalState ets)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
append(java.lang.String str,
Color color)
Add a string to the virtual terminal at the current cursor position.
|
boolean |
cursorAt(int x,
int y)
Position the virtual cursor during the drawing.
|
boolean |
cursorStay(int x,
int y)
Position the real cursor.
|
EmulatedTerminalState |
getEmulatedTerminalState()
Obtain the core worker that implements the emulated terminal.
|
int |
getX()
Get absolute X position of the cursor.
|
int |
getY()
Get absolute Y position of the cursor.
|
int |
screenHeight()
Gets the number of rows on the screen.
|
int |
screenWidth()
Gets the number of columns on the screen.
|
void |
sync()
Synchronize the state of the physical terminal with the state of
the virtual terminal.
|
void |
updateScreen(ScreenData screen)
Perform a bulk output operation for the whole screen at once with
output masking when desired.
|
append, borderColor, box, clearArea, drawHBorder, drawLLCorner, drawLRCorner, drawULCorner, drawURCorner, drawVBorder, getScreenBitmap, hLine, refresh, setScreenBitmap, vLine, widgetColor
cellAt, getWindowId, hasBoxBorderCorners, isCursorInvalid, setCursorInvalid
private EmulatedTerminalState ets
public ChuiPrimitives(EmulatedTerminalState ets)
ets
- Emulated terminal simulator instance used for direct drawing.public EmulatedTerminalState getEmulatedTerminalState()
public void append(java.lang.String str, Color color)
append
in class BasePrimitives
str
- The text to output.color
- The color (includes attributes) in which to output the text.
All text will be output with the same color.public boolean cursorAt(int x, int y)
cursorAt
in class BasePrimitives
x
- New cursor X.y
- New cursor Y.true
if cursor positioning succeeded.public boolean cursorStay(int x, int y)
cursorStay
in class BasePrimitives
x
- New cursor X.y
- New cursor Y.true
if cursor positioning succeeded.public int getX()
getX
in class BasePrimitives
public int getY()
getY
in class BasePrimitives
public int screenHeight()
public int screenWidth()
public void sync()
public void updateScreen(ScreenData screen)
screen
instance.
The screen container is safe for use with any UNICODE character.
updateScreen
in class BasePrimitives
screen
- Container for whole screen content and cursor position.