public class Terminal
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
beep() |
void |
clearCursorToEndLine()
Clear from cursor to end of line
|
void |
clearCursorToEndScreen()
Clear from cursor until end of screen.
|
void |
clearCursorToStartLine()
Clear from cursor to start of line.
|
void |
clearCursorToStartScreen()
Clear from cursor to start of screen.
|
void |
clearLine()
Clear full line.
|
void |
clearScreen()
Clear terminal screen.
|
void |
dispose() |
int |
getch()
Read input character
|
boolean |
getCursorVisible() |
TerminalHandle |
getHandle() |
TVector |
getSize() |
java.lang.String |
getTitle() |
boolean |
isUTF8CharsetEncoding() |
void |
moveConsoleCursor(MoveDirection moveDirection,
int i)
Move console cursor to position.
|
KeyInput |
readInput() |
java.lang.String |
readLine()
Read line of Terminal.
|
void |
resetInputBuffer() |
void |
restoreCursorPosition() |
void |
saveCursorPosition() |
void |
setColor(Color... colors)
Sets color.
|
void |
setConsoleCursor(TVector vector)
Sets console cursor.
|
void |
setCursorVisible(boolean b) |
void |
setTextDecoration(TextDecoration t)
Sets text decoration.
|
void |
setTitle(java.lang.String s) |
void |
write(java.lang.String str)
Write terminalstring.
|
void |
writeAtPosition(java.lang.String s,
TVector vec) |
void |
writeLine(java.lang.String str)
Write line.
|
void |
writeRaw(java.lang.String s)
Write raw string.
|
public Terminal(boolean utf8) throws java.io.IOException
java.io.IOException
public Terminal() throws java.io.IOException
java.io.IOException
public void clearScreen() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
- the io exceptionjava.lang.InterruptedException
- the interrupted exceptionpublic void beep() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public void saveCursorPosition()
public void restoreCursorPosition()
public java.lang.String readLine() throws java.io.IOException
java.io.IOException
public void setTitle(java.lang.String s)
public java.lang.String getTitle()
public TerminalHandle getHandle()
public TVector getSize()
public void clearCursorToEndScreen()
public void clearCursorToStartScreen()
public void clearLine()
public int getch()
public void setCursorVisible(boolean b)
public boolean getCursorVisible()
public void clearCursorToEndLine()
public void clearCursorToStartLine()
public void write(java.lang.String str)
str
- the strpublic void writeLine(java.lang.String str)
str
- the strpublic void writeRaw(java.lang.String s)
s
- the spublic void setColor(Color... colors)
colors
- the colorspublic void setTextDecoration(TextDecoration t)
t
- the tpublic void setConsoleCursor(TVector vector)
vector
- the vectorpublic boolean isUTF8CharsetEncoding()
public void moveConsoleCursor(MoveDirection moveDirection, int i)
moveDirection
- the move directioni
- thepublic void resetInputBuffer()
public void dispose()
public void writeAtPosition(java.lang.String s, TVector vec)
public KeyInput readInput()