|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TerminalModel
Model for terminals - defines methods for getting/setting cells, printing text to a terminal and getting the size of the terminal and buffer.
| Method Summary | |
|---|---|
void |
clear()
Clears the terminal. |
BellStrategy |
getBellStrategy()
Gets the bell strategy. |
int |
getBufferSize()
Gets the buffer size. |
TerminalCell |
getCell(int column,
int row)
Gets a cell. |
int |
getColumns()
Gets the number of columns. |
int |
getCursorColumn()
Gets the cursor column. |
int |
getCursorRow()
Gets the cursor row. |
java.awt.Color |
getDefaultBackgroundColor()
Gets the default background color. |
java.awt.Color |
getDefaultForegroundColor()
Gets the default foreground color. |
int |
getRows()
Gets the number of rows. |
void |
moveCursorBack(int n)
Moves the cursor back n characters. |
void |
moveCursorDown(int n)
Moves the cursor down n characters. |
void |
moveCursorForward(int n)
Moves the cursor forward n characters. |
void |
moveCursorUp(int n)
Moves the cursor up n characters. |
void |
print(java.lang.String str)
Prints the specified string to the terminal at the cursor position, interpreting any escape sequences/special ASCII codes the model may support. |
void |
setBellStrategy(BellStrategy strategy)
Sets the bell strategy. |
void |
setCell(int column,
int row,
TerminalCell cell)
Sets a cell. |
void |
setCursorColumn(int column)
Sets the cursor column. |
void |
setCursorRow(int row)
Sets the cursor row. |
| Method Detail |
|---|
BellStrategy getBellStrategy()
void setBellStrategy(BellStrategy strategy)
strategy - The bell strategy.
java.lang.NullPointerException - if the strategy is null.void clear()
void moveCursorBack(int n)
n - The number of characters.
java.lang.IllegalArgumentException - if n is not positive.void moveCursorForward(int n)
n - The number of characters.
java.lang.IllegalArgumentException - if n is not positive.void moveCursorDown(int n)
n - The number of characters.
java.lang.IllegalArgumentException - if n is not positive.void moveCursorUp(int n)
n - The number of characters.
java.lang.IllegalArgumentException - if n is not positive.
void setCell(int column,
int row,
TerminalCell cell)
column - The column.row - The row.cell - The cell.
java.lang.IndexOutOfBoundsException - if the column and/or row number(s) are
out of bounds.
TerminalCell getCell(int column,
int row)
column - The column.row - The row.
java.lang.IndexOutOfBoundsException - if the column and/or row number(s) are
out of bounds.void print(java.lang.String str)
str - The string to print.
java.lang.NullPointerException - if the string is null.int getColumns()
int getRows()
int getBufferSize()
int getCursorRow()
void setCursorRow(int row)
row - The cursor row.
java.lang.IllegalArgumentException - if the row is out of the valid range.int getCursorColumn()
void setCursorColumn(int column)
column - The cursor column.
java.lang.IllegalArgumentException - if the column is out of the valid range.java.awt.Color getDefaultBackgroundColor()
java.awt.Color getDefaultForegroundColor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||