public class TDisplayDrawer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TDisplayDrawer.Queue
The type Queue.
|
Constructor and Description |
---|
TDisplayDrawer(TComponent component,
TVector pos,
TerminalScreen screen)
Instantiates a new drawer
|
Modifier and Type | Method and Description |
---|---|
static void |
addTaskToQueue(DrawQueue task)
Add custom task to queue.
|
void |
addToQueue(DrawQueue task)
Add drawertask to queue.
|
void |
dispose()
Close drawing.
|
static void |
disposeRenderer()
Deprecated.
|
TVector |
getBufferedOriginalDisplaySize()
Gets display size of component add.
|
TVector |
getBufferedOriginalSize()
Gets original size of component.
|
TComponent |
getComponent()
Gets the handling component.
|
TVector |
getCurrentPosition()
Gets current position in screen.
|
TVector |
getOriginalPosition()
Gets original position of component.
|
TerminalScreen |
getScreen()
Gets screen.
|
Terminal |
getTerminal()
Gets terminal instance.
|
int |
getXDifferenceToMaxPosition()
Gets x difference to end position of display.
|
int |
getXDifferenceToMinPosition()
Gets x difference to 0,0 position.
|
int |
getYDifferenceToMaxPosition()
Gets y difference to end position of display.
|
int |
getYDifferenceToMinPosition()
Gets y difference to 0,0 position.
|
boolean |
hasSavedCursorPosition()
Has saved a cursor position.
|
static boolean |
isCalledFromQueue()
Is called from queue boolean.
|
boolean |
isDisplaying()
Is displaying.
|
void |
loadColors()
Load colors from component or default.
|
void |
loadColors(TComponent component)
Load colors from specific component.
|
void |
loadDefaultColors()
Load default colors from screen.
|
void |
point()
Point the cursor on component position to write on this position.
|
void |
point(TVector vec)
Point the cursor on custom position to write on this position.
|
void |
remove()
Remove paint of component.
|
void |
removeCursorPositionSave()
Remove cursor position save.
|
void |
reset()
Reset colors and text decorations.
|
void |
restoreCursorPosition()
Restore cursor position.
|
void |
saveCursorPosition()
Save cursor position.
|
void |
setColors(Color... colors)
Sets colors to terminal.
|
void |
setCurrentPosition(TVector currentPosition)
Sets current position of component.
|
void |
write(java.lang.String s)
Write text.
|
void |
writeAtPosition(java.lang.String s)
Write at position.
|
void |
writeAtPosition(java.lang.String s,
TVector vec)
Write at position.
|
public TDisplayDrawer(TComponent component, TVector pos, TerminalScreen screen)
component
- the componentpos
- the posscreen
- the screenpublic TVector getCurrentPosition()
public void setCurrentPosition(TVector currentPosition)
currentPosition
- the current position as vectorpublic TVector getOriginalPosition()
public TVector getBufferedOriginalSize()
public TVector getBufferedOriginalDisplaySize()
public TComponent getComponent()
public Terminal getTerminal()
public TerminalScreen getScreen()
public int getXDifferenceToMinPosition()
public int getYDifferenceToMinPosition()
public int getXDifferenceToMaxPosition()
public int getYDifferenceToMaxPosition()
public boolean isDisplaying()
public void point()
public void point(TVector vec)
vec
- the vecpublic void write(java.lang.String s)
s
- the textpublic void setColors(Color... colors)
colors
- the colorspublic void loadColors()
public void loadColors(TComponent component)
component
- the componentpublic void loadDefaultColors()
public void reset()
public void writeAtPosition(java.lang.String s)
s
- the textpublic void writeAtPosition(java.lang.String s, TVector vec)
s
- the textvec
- the position as vectorpublic boolean hasSavedCursorPosition()
public void restoreCursorPosition()
public void saveCursorPosition()
public void removeCursorPositionSave()
public void dispose()
public void remove()
public void addToQueue(DrawQueue task)
task
- the taskpublic static void addTaskToQueue(DrawQueue task)
task
- the task (can be null)public static boolean isCalledFromQueue()
@Deprecated public static void disposeRenderer()