|
TelnetD at SF | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wimpi.telnetd.io.terminal.BasicTerminal
A basic terminal implementation with the focus on vt100 related sequences. This terminal type is most common out there, with sequences that are normally also understood by its successors.
| Field Summary | |
protected Colorizer |
m_Colorizer
|
| Fields inherited from interface net.wimpi.telnetd.io.terminal.Terminal |
A, B, BS, C, CAN, D, DEL, E, EOT, ESC, f, FF, H, HT, LE, LSB, r, SE, SEMICOLON, SGR |
| Constructor Summary | |
BasicTerminal()
Constructs an instance with an associated colorizer. |
|
| Method Summary | |
java.lang.String |
format(java.lang.String str)
Returns a "formatted" string containing terminal dependent GR escape sequences (i.e. colors and style). |
java.lang.String |
formatBold(java.lang.String str)
Returns a "bold formatted" string containing terminal dependent GR escape sequences (i.e. colors and style). |
int |
getAtomicSequenceLength()
Returns the atomic escape sequence length of the terminal implementation as integer (without counting the escape itself). |
byte[] |
getCursorMoveSequence(int direction,
int times)
Returns a terminal dependent escape sequence for a given cursor movement. |
byte[] |
getCursorPositioningSequence(int[] pos)
Returns a terminal dependent escape sequence for positioning the cursor to a given position: index 0: row coordinate index 1: column coordinate Note that home is a special positioning sequence. |
byte[] |
getEraseSequence(int eraseFunc)
Returns a terminal dependent escape sequence for a given defined erase function: erase to end of line (EEOL) erase to begin of line (EBOL) erase entire line (EEL) erase to end of screen (EEOS) erase to beginning of screen (EBOS) erase entire screen (EES) |
byte[] |
getGRSequence(int type,
int param)
Returns the terminal dependent escape sequence for a given graphics rendition request. |
byte[] |
getInitSequence()
Returns the byte sequence that will init the terminal. |
byte[] |
getScrollMarginsSequence(int topmargin,
int bottommargin)
Returns the terminal dependent escape sequence for establishing the given scrollmargins. |
byte[] |
getSpecialSequence(int function)
Returns the terminal dependent escape sequence for a given defined special function. |
abstract boolean |
supportsScrolling()
Returns if the terminal implementation supports scrolling (i.e. setting scroll margins). |
abstract boolean |
supportsSGR()
Returns if the terminal implementation supports graphics rendition (i.e. colors and styles). |
int |
translateControlCharacter(int c)
Translates a control character into terminal independent representation. |
int |
translateEscapeSequence(int[] buffer)
Translates an escape sequence into a terminal independent representation. |
byte[] |
translateIntToDigitCodes(int in)
Translates an integer to a byte sequence of its digits. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Colorizer m_Colorizer
| Constructor Detail |
public BasicTerminal()
| Method Detail |
public int translateControlCharacter(int c)
Terminal
translateControlCharacter in interface Terminalc - int read from the input stream.
public int translateEscapeSequence(int[] buffer)
Terminal
translateEscapeSequence in interface Terminalbuffer - array of integers containing a escape sequence.
public byte[] getCursorMoveSequence(int direction,
int times)
Terminal
getCursorMoveSequence in interface Terminaldirection - Direction of movement.times - Number of movements into given direction.
public byte[] getCursorPositioningSequence(int[] pos)
Terminal
getCursorPositioningSequence in interface Terminalpos - Position to move the cursor to.
TerminalIO.HOMEpublic byte[] getEraseSequence(int eraseFunc)
Terminal
getEraseSequence in interface TerminaleraseFunc - representing one of the specified erase functions.
TerminalIO.EEOL,
TerminalIO.EBOL,
TerminalIO.EEL,
TerminalIO.EEOS,
TerminalIO.EBOS,
TerminalIO.EESpublic byte[] getSpecialSequence(int function)
Terminal
getSpecialSequence in interface Terminalfunction - the special sequence defined as int in TerminalIO.
TerminalIO.STORECURSOR,
TerminalIO.RESTORECURSOR
public byte[] getGRSequence(int type,
int param)
Terminal
getGRSequence in interface Terminaltype - Type of graphics rendition request.param - Parameter to the type requested.
public byte[] getScrollMarginsSequence(int topmargin,
int bottommargin)
Terminal
getScrollMarginsSequence in interface Terminaltopmargin - upper border of the scrolling area as row coordinate.bottommargin - lower border of the scrolling area as row coordinate.
public java.lang.String format(java.lang.String str)
Terminal
format in interface Terminalstr - String to be formatted.
public java.lang.String formatBold(java.lang.String str)
Terminal
formatBold in interface Terminalstr - String to be formatted.
public byte[] getInitSequence()
Terminal
getInitSequence in interface Terminalpublic int getAtomicSequenceLength()
Terminal
getAtomicSequenceLength in interface Terminalpublic byte[] translateIntToDigitCodes(int in)
in - integer to be translated.
public abstract boolean supportsSGR()
Terminal
supportsSGR in interface Terminalpublic abstract boolean supportsScrolling()
Terminal
supportsScrolling in interface Terminal
|
TelnetD at SF | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||