public class Screen
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Screen.Cursor
Represents cursor position in screen.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HISTORY_SIZE |
static int |
DEFAULT_MAX_COL |
static int |
DEFAULT_MAX_ROW |
Constructor and Description |
---|
Screen()
Creates
Screen object with default
dimensions and history size. |
Screen(int bufferSize)
Creates
Screen object givng its history size. |
Screen(int rowNum,
int colNum)
Creates
Screen object givng its dimensions. |
Screen(int rowNum,
int colNum,
int historySize)
Creates
Screen object givng its dimensions and history size. |
Screen(Screen screen)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearTabs()
Clears all tabstops in screen.
|
void |
erase()
Clears entire screen.
|
void |
erase(int row,
int col)
Clears screen area starting from provided row and column arguments to current
cursor position.
|
void |
eraseLine(int start,
int end)
Erases current cursor line giving start and end columns by resetting it's
content.
|
int |
getBottomMargin()
Returns bottom margin value.
|
Cell |
getCell(int row,
int column)
Gives access to screen cell.
|
Screen.Cursor |
getCursor()
Returns current
Cursor in screen. |
Cell[][] |
getHistory()
Represents history buffer as two dimensional array
of
Cell objects. |
int |
getMaxCol()
Returns quantity of columns in current screen.
|
int |
getMaxRow()
Returns quantity of rows in current screen.
|
int |
getUpperMargin()
Returns upper margin value.
|
boolean |
isOriginMode()
Checks if screen is in Origin mode.
|
void |
setMargins(int upperMargin,
int bottomMargin)
Sets screen margins for scrolling region.
|
void |
setOriginMode(boolean originMode)
Sets screen Origin mode.
|
Cell[][] |
toCellArray()
Represents screen as two dimensional array of
Cell objects. |
java.lang.String |
toString()
Gets String representation of this
Screen with each Row in
Screen terminated by a \r\n. |
public static final int DEFAULT_HISTORY_SIZE
public static final int DEFAULT_MAX_ROW
public static final int DEFAULT_MAX_COL
public Screen(int rowNum, int colNum, int historySize)
Screen
object givng its dimensions and history size.rowNum
- quantity of rows in screen.colNum
- quantity of columns in screen.historySize
- size of history (in rows).public Screen(int bufferSize)
Screen
object givng its history size.bufferSize
- size of history (in rows).public Screen(int rowNum, int colNum)
Screen
object givng its dimensions.rowNum
- quantity of rows in screen.colNum
- quantity of columns in screen.public Screen()
Screen
object with default
dimensions and history size.public Screen(Screen screen)
screen
- screen to by copied.public int getMaxRow()
public int getMaxCol()
public Screen.Cursor getCursor()
Cursor
in screen.Cursor
for this Screen
public Cell getCell(int row, int column)
row
- cell row number.column
- cell column number.Cell
object at specified position.public int getUpperMargin()
public int getBottomMargin()
public void setMargins(int upperMargin, int bottomMargin)
upperMargin
- upper marginbottomMargin
- bottom marginpublic boolean isOriginMode()
public void setOriginMode(boolean originMode)
originMode
- true if screen must be in Origin mode.public Cell[][] toCellArray()
Cell
objects.Cell
objects.public Cell[][] getHistory()
Cell
objects.Cell
objects.public java.lang.String toString()
Screen
with each Row
in
Screen
terminated by a \r\n.toString
in class java.lang.Object
public void eraseLine(int start, int end)
start
- 'from' column.end
- 'to' column.public void erase(int row, int col)
row
- starting row number.col
- starting column number.public void erase()
public void clearTabs()
Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved