|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rubygrapefruit.platform.internal.AbstractTerminal
net.rubygrapefruit.platform.internal.AnsiTerminal
public class AnsiTerminal
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.rubygrapefruit.platform.Terminal |
---|
Terminal.Color |
Constructor Summary | |
---|---|
AnsiTerminal(java.io.OutputStream outputStream,
Terminals.Output output)
|
Method Summary | |
---|---|
Terminal |
bold()
Switches the terminal to bold mode, if supported. |
Terminal |
clearToEndOfLine()
Clears characters from the cursor position to the end of the current line. |
Terminal |
cursorDown(int count)
Moves the cursor the given number of characters down. |
Terminal |
cursorLeft(int count)
Moves the cursor the given number of characters to the left. |
Terminal |
cursorRight(int count)
Moves the cursor the given number of characters to the right. |
Terminal |
cursorStartOfLine()
Moves the cursor to the start of the current line. |
Terminal |
cursorUp(int count)
Moves the cursor the given number of characters up. |
Terminal |
foreground(Terminal.Color color)
Sets the terminal foreground color, if supported. |
TerminalSize |
getTerminalSize()
Returns the size of the terminal. |
protected void |
init()
|
Terminal |
normal()
Switches the terminal to normal mode. |
Terminal |
reset()
Switches the terminal to normal mode and restores default colors. |
boolean |
supportsColor()
Returns true if this terminal supports setting output colors. |
boolean |
supportsCursorMotion()
Returns true if this terminal supports moving the cursor. |
boolean |
supportsTextAttributes()
Returns true if this terminal supports setting text attributes, such as bold. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AnsiTerminal(java.io.OutputStream outputStream, Terminals.Output output)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
protected void init()
init
in class AbstractTerminal
public boolean supportsTextAttributes()
Terminal
public boolean supportsColor()
Terminal
public boolean supportsCursorMotion()
Terminal
public TerminalSize getTerminalSize() throws NativeException
Terminal
NativeException
- On failure.public Terminal foreground(Terminal.Color color) throws NativeException
Terminal
NativeException
- On failure.public Terminal bold() throws NativeException
Terminal
NativeException
- On failure.public Terminal normal() throws NativeException
Terminal
NativeException
- On failure.public Terminal reset() throws NativeException
Terminal
NativeException
- On failure.public Terminal cursorLeft(int count) throws NativeException
Terminal
NativeException
- On failure, or if this terminal does not support cursor motion.public Terminal cursorRight(int count) throws NativeException
Terminal
NativeException
- On failure, or if this terminal does not support cursor motion.public Terminal cursorUp(int count) throws NativeException
Terminal
NativeException
- On failure, or if this terminal does not support cursor motion.public Terminal cursorDown(int count) throws NativeException
Terminal
NativeException
- On failure, or if this terminal does not support cursor motion.public Terminal cursorStartOfLine() throws NativeException
Terminal
NativeException
- On failure, or if this terminal does not support cursor motion.public Terminal clearToEndOfLine() throws NativeException
Terminal
NativeException
- On failure, or if this terminal does not support clearing.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |