com.mindbright.terminal
public class Screen extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int[][] |
attributes |
protected boolean |
autoLF |
protected boolean |
autoReverseWrap |
protected boolean |
autoWrap |
protected boolean[] |
autowraps |
protected int |
cols |
protected boolean |
complexScroll |
protected int |
curAttr |
protected int |
curAttrSave |
protected int |
curCol |
protected int |
curColSave |
protected int |
curRow |
protected int |
curRowSave |
protected static boolean |
DEBUG |
protected int[] |
defaultAttribs |
protected char |
defaultChar |
protected char[] |
defaultChars |
protected DisplayView |
display |
static int |
GRAVITY_NORTHWEST |
static int |
GRAVITY_SOUTHWEST |
protected boolean |
hasSelection |
protected boolean |
insertMode |
static int |
MAX_COLS |
static int |
MAX_ROWS |
static int |
MAX_SAVED_LINES |
static int |
MIN_COLS |
static int |
MIN_ROWS |
protected int |
rows |
protected int[][] |
save_attributes |
protected boolean[] |
save_autowraps |
protected int |
save_cols |
protected int |
save_rows |
protected char[][] |
save_screen |
protected int |
saveLines |
protected char[][] |
screen |
protected int |
selectBottomCol |
protected int |
selectBottomRow |
protected int |
selectClickRow |
protected boolean |
selectClickState |
protected int |
selectTopCol |
protected int |
selectTopRow |
protected static char[] |
spacerow |
protected boolean[] |
tabStops |
protected int |
visTop |
protected int |
windowBottom |
protected int |
windowLeft |
protected int |
windowRight |
protected int |
windowTop |
protected static int[] |
zerorow |
Constructor and Description |
---|
Screen(int rows,
int cols) |
Screen(int rows,
int cols,
char defaultChar,
int defaultAttrib) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
addSpaces(int start,
int end) |
protected void |
checkWrap() |
void |
clearAbove() |
void |
clearAllAttributes() |
void |
clearAllTabs() |
void |
clearBelow() |
void |
clearLeft() |
void |
clearLine() |
void |
clearRight() |
void |
clearSaveLines() |
void |
clearScreen() |
void |
clearTab(int col) |
void |
cursorBackward(int n) |
void |
cursorDown(int n) |
void |
cursorForward(int n) |
void |
cursorIndex(int n) |
void |
cursorIndexRev(int n) |
void |
cursorRestore() |
void |
cursorSave() |
void |
cursorSetPos(int v,
int h,
boolean relative) |
void |
cursorUp(int n) |
void |
deleteChars(int n) |
void |
deleteLines(int n) |
void |
doBackTabs(int n) |
void |
doBS() |
void |
doClickSelect(int row,
int col,
java.lang.String selectDelims) |
void |
doCR() |
void |
doLF() |
protected boolean |
doMatch(java.lang.String findStr,
char firstChar,
char[] chars,
int idx,
boolean caseSens,
int len) |
void |
doTab() |
void |
doTabs(int n) |
void |
eraseChars(int n) |
void |
fillScreen(char c) |
int[] |
getAttribsAt(int row) |
int[] |
getAttribsAt(int row,
boolean screenRelative) |
boolean |
getAttribute(int attr) |
char[] |
getCharsAt(int row) |
char[] |
getCharsAt(int row,
boolean screenRelative) |
int |
getCols() |
protected java.lang.String |
getContents(int startRow,
int startCol,
int endRow,
int endCol,
java.lang.String eol) |
int |
getCurCol() |
int |
getCurRow() |
int |
getCursorCol() |
int |
getCursorH() |
int |
getCursorRow() |
int |
getCursorV() |
int |
getRows() |
int |
getSaveLines() |
int |
getScreenTop() |
int |
getSelectBottomCol() |
int |
getSelectBottomRow() |
java.lang.String |
getSelection(java.lang.String eol) |
int |
getSelectTopCol() |
int |
getSelectTopRow() |
int |
getTotalLines() |
int |
getVisTop() |
int |
getWindowBottom() |
int |
getWindowLeft() |
int |
getWindowRight() |
int |
getWindowTop() |
void |
insertChars(int n) |
void |
insertLines(int n) |
protected boolean |
isIntersectingSelect(int topRow,
int topCol,
int bottomRow,
int bottomCol) |
protected int[] |
makeAttribLine() |
protected char[] |
makeCharLine() |
protected int |
nextPrintedChar(int row,
int col) |
protected int |
prevPrintedChar(int row,
int col) |
void |
resetClickSelect() |
void |
resetSelection() |
void |
resetTabs() |
void |
resetWindow() |
void |
resize(int newRows,
int newCols) |
void |
resizeBuffers(int rows,
int cols) |
boolean |
screenRestore() |
boolean |
screenSave() |
void |
scrollDown(int n) |
protected void |
scrollSelection(int n) |
void |
scrollUp(int n) |
SearchContext |
search(SearchContext lastContext,
java.lang.String key,
boolean reverse,
boolean caseSens) |
void |
selectAll() |
void |
setAttribute(int attr,
boolean val) |
void |
setAutoLF(boolean set) |
void |
setAutoReverseWrap(boolean set) |
void |
setAutoWrap(boolean set) |
void |
setBackgroundColor(int c) |
protected void |
setCursorPosition(int row,
int col) |
void |
setDisplay(DisplayView display) |
void |
setForegroundColor(int c) |
void |
setInsertMode(boolean set) |
boolean |
setSaveLines(int n) |
void |
setSelection(int anchorRow,
int anchorCol,
int endRow,
int endCol) |
void |
setTab(int col) |
void |
setWindow(int top,
int bottom) |
void |
setWindow(int top,
int left,
int bottom,
int right) |
protected void |
updateDirtyArea(int top,
int left,
int bottom,
int right) |
void |
writeChar(char c) |
void |
writeChar(char c,
int attr) |
void |
writeChar(char c,
int attr,
boolean insert) |
void |
writeLineDrawChar(char c) |
protected static final boolean DEBUG
public static final int GRAVITY_SOUTHWEST
public static final int GRAVITY_NORTHWEST
public static final int MIN_ROWS
public static final int MIN_COLS
public static final int MAX_COLS
public static final int MAX_ROWS
public static final int MAX_SAVED_LINES
protected int rows
protected int cols
protected int windowTop
protected int windowBottom
protected int windowLeft
protected int windowRight
protected boolean complexScroll
protected int curRow
protected int curCol
protected int selectTopRow
protected int selectTopCol
protected int selectBottomRow
protected int selectBottomCol
protected boolean hasSelection
protected int selectClickRow
protected boolean selectClickState
protected int curAttr
protected boolean autoLF
protected boolean autoWrap
protected boolean autoReverseWrap
protected boolean insertMode
protected int curRowSave
protected int curColSave
protected int curAttrSave
protected char[][] screen
protected int[][] attributes
protected boolean[] autowraps
protected char defaultChar
protected char[] defaultChars
protected int[] defaultAttribs
protected int saveLines
protected int visTop
protected static final char[] spacerow
protected static final int[] zerorow
protected boolean[] tabStops
protected DisplayView display
protected char[][] save_screen
protected int[][] save_attributes
protected boolean[] save_autowraps
protected int save_rows
protected int save_cols
public Screen(int rows, int cols)
public Screen(int rows, int cols, char defaultChar, int defaultAttrib)
public void setDisplay(DisplayView display)
protected void updateDirtyArea(int top, int left, int bottom, int right)
protected void setCursorPosition(int row, int col)
public int getSaveLines()
public boolean screenSave()
public boolean screenRestore()
public boolean setSaveLines(int n)
public void clearSaveLines()
protected char[] makeCharLine()
protected int[] makeAttribLine()
public void resizeBuffers(int rows, int cols)
public void writeLineDrawChar(char c)
public void writeChar(char c)
public void writeChar(char c, int attr)
public void writeChar(char c, int attr, boolean insert)
public int getCursorRow()
public int getCursorCol()
public int getScreenTop()
public int getTotalLines()
public char[] getCharsAt(int row)
public char[] getCharsAt(int row, boolean screenRelative)
public int[] getAttribsAt(int row)
public int[] getAttribsAt(int row, boolean screenRelative)
public void setAutoLF(boolean set)
public void setAutoWrap(boolean set)
public void setAutoReverseWrap(boolean set)
public void setInsertMode(boolean set)
public int getVisTop()
public int getCurRow()
public int getCurCol()
public int getSelectTopRow()
public int getSelectTopCol()
public int getSelectBottomRow()
public int getSelectBottomCol()
public int getRows()
public int getCols()
protected void checkWrap()
public void fillScreen(char c)
public void doBS()
public void doTab()
public void doTabs(int n)
public void doBackTabs(int n)
public void setTab(int col)
public void clearTab(int col)
public void resetTabs()
public void clearAllTabs()
public void doCR()
public void doLF()
public void resetWindow()
public void setWindow(int top, int bottom)
public void setWindow(int top, int left, int bottom, int right)
public int getWindowTop()
public int getWindowBottom()
public int getWindowLeft()
public int getWindowRight()
public int getCursorV()
public int getCursorH()
public void cursorSetPos(int v, int h, boolean relative)
public void cursorUp(int n)
public void cursorDown(int n)
public void cursorForward(int n)
public void cursorBackward(int n)
public void cursorIndex(int n)
public void cursorIndexRev(int n)
public void cursorSave()
public void cursorRestore()
public void scrollUp(int n)
public void scrollDown(int n)
public void clearBelow()
public void clearAbove()
public void clearScreen()
public void clearRight()
public void clearLeft()
public void clearLine()
public void eraseChars(int n)
public void insertChars(int n)
public void deleteChars(int n)
public void insertLines(int n)
public void deleteLines(int n)
public void setAttribute(int attr, boolean val)
public boolean getAttribute(int attr)
public void setForegroundColor(int c)
public void setBackgroundColor(int c)
public void clearAllAttributes()
public void resize(int newRows, int newCols)
protected int nextPrintedChar(int row, int col)
protected int prevPrintedChar(int row, int col)
protected java.lang.String addSpaces(int start, int end)
protected boolean isIntersectingSelect(int topRow, int topCol, int bottomRow, int bottomCol)
public void resetSelection()
public void selectAll()
protected void scrollSelection(int n)
public void setSelection(int anchorRow, int anchorCol, int endRow, int endCol)
public java.lang.String getSelection(java.lang.String eol)
protected java.lang.String getContents(int startRow, int startCol, int endRow, int endCol, java.lang.String eol)
public void resetClickSelect()
public void doClickSelect(int row, int col, java.lang.String selectDelims)
public SearchContext search(SearchContext lastContext, java.lang.String key, boolean reverse, boolean caseSens)
protected boolean doMatch(java.lang.String findStr, char firstChar, char[] chars, int idx, boolean caseSens, int len)