|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BasicTerminalIO
Interface that represents the supported terminal oriented low-level I/O capabilities.
| Field Summary | |
|---|---|
static int |
BACKSPACE
Backspace (defining the backspace key) |
static int |
BLACK
Black |
static int |
BLUE
Blue |
static int |
COLORINIT
Color init (defining ctrl-a atm) |
static java.lang.String |
CRLF
CRLF (defining carriage+linebreak which is obligation) |
static int |
CYAN
Cyan |
static int |
DELETE
Delete (defining the del key) |
static int |
DOWN
Right (defining a direction on the terminal) |
static int |
ENTER
Enter (defining the return or enter key) |
static int |
GREEN
Green |
static int |
LEFT
Down (defining a direction on the terminal) |
static int |
LOGOUTREQUEST
Logout request (defining ctrl-d atm) |
static int |
MAGENTA
Magenta |
static int |
RED
Red |
static int |
RIGHT
Up (defining a direction on the terminal) |
static int |
TABULATOR
Tabulator (defining the tab key) |
static int |
UP
Left (defining a direction on the terminal) |
static int |
WHITE
White |
static int |
YELLOW
Yellow |
| Method Summary | |
|---|---|
void |
bell()
Method that sends a signal to the user. |
void |
close()
Closes this BasicTerminalIO. |
boolean |
defineScrollRegion(int topmargin,
int bottommargin)
Allows to define a scroll region. |
void |
eraseLine()
Method that erases the entire actual line. |
void |
eraseScreen()
Method that erases the entire screen. |
void |
eraseToBeginOfLine()
Method that erases in the actual line from the actual cursor position to the beginning of the line. |
void |
eraseToBeginOfScreen()
Method that erases in the terminal screen from the actual cursor postition to the beginning of the screen. |
void |
eraseToEndOfLine()
Method that erases in the line from the actual cursor position to the end of the line. |
void |
eraseToEndOfScreen()
Method that erases in the terminal screen from the actual cursor position to the end of the screen. |
void |
flush()
Method that ensures all written bytes to be send over the network. |
void |
forceBold(boolean b)
Method that forces bold as attribute for writing on the terminal. |
int |
getColumns()
Method to retrieve the actual columns on the clients temrinal screen. |
int |
getRows()
Method to retrieve the actual rows on the clients terminal screen. |
void |
homeCursor()
Method that places the cursor at "home", which is defining first Row,first Column. |
boolean |
isAutoflushing()
Accessor method for the autoflushing mechanism. |
boolean |
isLineWrapping()
Tests if terminal is in linewrapping mode. |
boolean |
isSignalling()
Accessor method for checking signalling attribute. |
void |
moveCursor(int direction,
int times)
Method that moves the cursor relative from the actual position given times into a given direction. |
void |
moveDown(int times)
Convenience method to move the cursor down. |
void |
moveLeft(int times)
Convenience method to move cursor to the left. |
void |
moveRight(int times)
Convenience method to move cursor to the right. |
void |
moveUp(int times)
Convenience method to move the cursor up. |
int |
read()
Method that retrieves Input from the underlying Stream, translating Terminal specific escape sequences and returning a (constant defined) key, or a character. |
void |
resetAttributes()
Method that resets all graphic rendition attributes for writing on the terminal. |
void |
resetTerminal()
Resets the terminal device. |
void |
restoreCursor()
Method that restores the last Cursor position, either client-side, or if not possible server-side. |
void |
setAutoflushing(boolean b)
Mutator method for the autoflushing mechanism. |
void |
setBackgroundColor(int color)
Method that sets the background color for writing on the terminal. |
void |
setBlink(boolean b)
Method that sets blink attribute for writing on the terminal. |
void |
setBold(boolean b)
Method that sets bold as attribute for writing on the terminal. |
void |
setCursor(int row,
int col)
Method that places the cursor on the terminal on the given absolute position. |
void |
setDefaultTerminal()
Sets the default terminal. |
void |
setForegroundColor(int color)
Method that sets the foreground color for writing to the terminal. |
void |
setItalic(boolean b)
Method that sets italic as attribute for writing on the terminal. |
void |
setLinewrapping(boolean b)
Sets the linewrapping mode. |
void |
setSignalling(boolean b)
Mutator method for the signalling attribute. |
void |
setTerminal(java.lang.String terminalname)
Sets the terminal to be used for this BasicTerminalIO. |
void |
setUnderlined(boolean b)
Method that sets underlined as attribute for writing on the terminal. |
void |
storeCursor()
Method that stores the actual Cursor position, either client-side, or if not possible server-side. |
void |
write(byte b)
Method that writes a raw byte to the terminal. |
void |
write(char ch)
Method that writes a character to the terminal. |
void |
write(java.lang.String str)
Method that writes a String to the terminal, |
| Field Detail |
|---|
static final int UP
static final int DOWN
static final int RIGHT
static final int LEFT
static final int TABULATOR
static final int DELETE
static final int BACKSPACE
static final int ENTER
static final int COLORINIT
static final int LOGOUTREQUEST
static final int BLACK
static final int RED
static final int GREEN
static final int YELLOW
static final int BLUE
static final int MAGENTA
static final int CYAN
static final int WHITE
static final java.lang.String CRLF
| Method Detail |
|---|
int read()
throws java.io.IOException
java.io.IOException
void write(byte b)
throws java.io.IOException
b - a byte value to be written.
java.io.IOException
void write(char ch)
throws java.io.IOException
ch - Character that should be written on the screen
java.io.IOException
void write(java.lang.String str)
throws java.io.IOException
str - String that should be written to the terminal.
java.io.IOException
void setCursor(int row,
int col)
throws java.io.IOException
row - Integer that represents the desired row coord.col - Integer that represents the desired column coord.
java.io.IOException
void moveCursor(int direction,
int times)
throws java.io.IOException
direction - Constant defined integer.times - Integer that represents the desired column coord.
java.io.IOException
void moveRight(int times)
throws java.io.IOException
times - Integer that represents the times the cursor should be moved.
java.io.IOExceptionmoveCursor(int, int)
void moveLeft(int times)
throws java.io.IOException
times - Integer that represents the times the cursor should be moved.
java.io.IOExceptionmoveCursor(int, int)
void moveUp(int times)
throws java.io.IOException
times - Integer that represents the times the cursor should be moved.
java.io.IOExceptionmoveCursor(int, int)
void moveDown(int times)
throws java.io.IOException
times - Integer that represents the times the cursor should be moved.
java.io.IOExceptionmoveCursor(int, int)
void homeCursor()
throws java.io.IOException
java.io.IOException
void storeCursor()
throws java.io.IOException
java.io.IOException
void restoreCursor()
throws java.io.IOException
java.io.IOException
void eraseToEndOfLine()
throws java.io.IOException
java.io.IOException
void eraseToBeginOfLine()
throws java.io.IOException
java.io.IOException
void eraseLine()
throws java.io.IOException
java.io.IOException
void eraseToEndOfScreen()
throws java.io.IOException
java.io.IOException
void eraseToBeginOfScreen()
throws java.io.IOException
java.io.IOException
void eraseScreen()
throws java.io.IOException
java.io.IOException
void setForegroundColor(int color)
throws java.io.IOException
color - Integer that represents one of the constant defined colors.
java.io.IOException
void setBackgroundColor(int color)
throws java.io.IOException
color - Integer that represents one of the constant defined colors.
java.io.IOException
void setBold(boolean b)
throws java.io.IOException
b - Boolean that flags on/off
java.io.IOExceptionvoid forceBold(boolean b)
b - Boolean that flags on/off
void setItalic(boolean b)
throws java.io.IOException
b - Boolean that flags on/off
java.io.IOException
void setUnderlined(boolean b)
throws java.io.IOException
b - Boolean that flags on/off
java.io.IOException
void setBlink(boolean b)
throws java.io.IOException
b - Boolean that flags on/off
java.io.IOException
void resetAttributes()
throws java.io.IOException
Note:
This will affect all attributes. Although these selective resets are defined
in ECMA 048 (the successor of the ANSI X3.64 standard) they are obviously not
implemented for all attributes in standard terminal emulations.
java.io.IOException
void bell()
throws java.io.IOException
java.io.IOException
void flush()
throws java.io.IOException
java.io.IOException
void close()
throws java.io.IOException
java.io.IOException
void setTerminal(java.lang.String terminalname)
throws java.io.IOException
terminalname - the name of the terminal.
java.io.IOExceptionTerminalManager
void setDefaultTerminal()
throws java.io.IOException
java.io.IOExceptionTerminalManagerint getRows()
int getColumns()
void setSignalling(boolean b)
b - Boolean that flags on(true) or off(false)boolean isSignalling()
void setAutoflushing(boolean b)
b - Boolean that flags on(true) or off(false)boolean isAutoflushing()
void resetTerminal()
throws java.io.IOException
java.io.IOException
void setLinewrapping(boolean b)
throws java.io.IOException
b - true if linewrapping on, false otherwise.
java.io.IOException
boolean isLineWrapping()
throws java.io.IOException
java.io.IOException
boolean defineScrollRegion(int topmargin,
int bottommargin)
throws java.io.IOException
topmargin - the top margin in rows.bottommargin - the bottom margin in rows.
java.io.IOException - if an I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||