com.mindbright.terminal.tandem6530
Class ModeBase

java.lang.Object
  extended by com.mindbright.terminal.tandem6530.ModeBase
All Implemented Interfaces:
AsciiCodes, Mode
Direct Known Subclasses:
BlockMode, ConvMode, ProtectBlockMode

public abstract class ModeBase
extends java.lang.Object
implements Mode, AsciiCodes


Field Summary
protected static int COLUMNS
           
protected static int ROWS
           
 
Fields inherited from interface com.mindbright.terminal.tandem6530.AsciiCodes
BELL, BS, CR, DC1, DC2, DC3, DC4, ENQ, EOT, ESC, ETX, FS, GS, HT, LF, LRC, NUL, SOH
 
Constructor Summary
ModeBase()
           
 
Method Summary
 void doBackspace()
           
 void doBackTab()
           
 void doCarriageReturn()
           
 void doClearAllTabs()
           
 void doClearMemoryToSpaces()
           
 void doClearMemoryToSpaces(int startRow, int startCol, int endRow, int endColumn)
           
 void doClearTab()
           
 void doClickSelect(int row, int col, java.lang.String selectDelims)
           
 void doCursorHome()
           
 void doCursorHomeDown()
           
 void doCursorRight()
           
 void doCursorUp()
           
 void doDefineDataTypeTable(int startIndex, byte[] entries)
           
 void doDefineEnterKeyFunction(char[] str)
           
 void doDefineFieldAttribute(int row, int column, boolean useFixed, int tableRow)
           
 void doDefineVariableTable(int startIndex, FieldAttributes[] attribs)
           
 void doDeleteCharacter()
           
 void doDeleteLine()
           
 void doDisableLocalLineEditing()
           
 void doDisplayPage(int n)
           
 void doEraseToEndOfLineOrField()
           
 void doEraseToEndOfPageOrMemory()
           
 void doHTab()
           
 void doInsertCharacter()
           
 void doInsertLine()
           
 void doLineFeed()
           
 void doPageDown()
           
 void doPageUp()
           
 java.lang.String doReadCursorAddress()
           
 java.lang.String doReadWholePageOrBuffer()
           
 java.lang.String doReadWithAddress(int startRow, int startCol, int endRow, int endColumn)
           
 java.lang.String doReadWithAddressAll(int startRow, int startCol, int endRow, int endColumn)
           
 void doResetModifiedDataTags()
           
 void doResetVariableTable()
           
 void doRollDown()
           
 void doRollUp()
           
 void doSelectPage(int n)
           
 void doSetBufferAddress(int row, int column)
           
 void doSetCursorAddress(boolean displayedPage, int row, int column)
          Set cursor position.
 void doSetDefaultVideoAttribute(int attrib)
           
 void doSetMaxPageNumber(int n)
           
 void doSetTab()
           
 void doSetVideoAttribute(int attrib)
           
 void doStartField(FieldAttributes attribs)
           
 void doStartFieldExtended(FieldAttributes attribs)
           
 void doTab()
           
 int[] getAttribs(int visTop, int row)
           
 int getBufferRows()
           
 char[] getChars(int visTop, int row)
           
abstract  int getCol()
           
 int getDisplayCols()
           
 int getDisplayRows()
           
abstract  int getPage()
           
abstract  int getRow()
           
 java.lang.String getSelection(java.lang.String eol)
           
 int getVisTop()
           
 void hostChar(char c)
           
 void keyHandler(char c, int virtualKey, int modifiers)
           
 void resetClickSelect()
           
 void resetSelection()
           
 SearchContext search(SearchContext lastContext, java.lang.String key, boolean reverse, boolean caseSens)
           
 void selectAll()
           
 void setDisplay(DisplayView display)
           
 void setSelection(int row1, int col1, int row2, int col2)
           
 void switchReset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROWS

protected static final int ROWS
See Also:
Constant Field Values

COLUMNS

protected static final int COLUMNS
See Also:
Constant Field Values
Constructor Detail

ModeBase

public ModeBase()
Method Detail

keyHandler

public void keyHandler(char c,
                       int virtualKey,
                       int modifiers)
Specified by:
keyHandler in interface Mode

hostChar

public void hostChar(char c)
Specified by:
hostChar in interface Mode

setDisplay

public void setDisplay(DisplayView display)
Specified by:
setDisplay in interface Mode

getVisTop

public int getVisTop()
Specified by:
getVisTop in interface Mode

switchReset

public void switchReset()
Specified by:
switchReset in interface Mode

doBackspace

public void doBackspace()
Specified by:
doBackspace in interface Mode

doHTab

public void doHTab()
Specified by:
doHTab in interface Mode

doTab

public void doTab()
Specified by:
doTab in interface Mode

doLineFeed

public void doLineFeed()
Specified by:
doLineFeed in interface Mode

doCarriageReturn

public void doCarriageReturn()
Specified by:
doCarriageReturn in interface Mode

doSetBufferAddress

public void doSetBufferAddress(int row,
                               int column)
Specified by:
doSetBufferAddress in interface Mode

doSetCursorAddress

public void doSetCursorAddress(boolean displayedPage,
                               int row,
                               int column)
Set cursor position. See 2-6, 3-14.

Specified by:
doSetCursorAddress in interface Mode
Parameters:
displayedPage - true to set cursor position in displayed page
row - row number, starting from 1
column - column number, starting from 1

doDefineFieldAttribute

public void doDefineFieldAttribute(int row,
                                   int column,
                                   boolean useFixed,
                                   int tableRow)
Specified by:
doDefineFieldAttribute in interface Mode

doStartField

public void doStartField(FieldAttributes attribs)
Specified by:
doStartField in interface Mode

doSetTab

public void doSetTab()
Specified by:
doSetTab in interface Mode

doClearTab

public void doClearTab()
Specified by:
doClearTab in interface Mode

doClearAllTabs

public void doClearAllTabs()
Specified by:
doClearAllTabs in interface Mode

doSetVideoAttribute

public void doSetVideoAttribute(int attrib)
Specified by:
doSetVideoAttribute in interface Mode

doSetDefaultVideoAttribute

public void doSetDefaultVideoAttribute(int attrib)
Specified by:
doSetDefaultVideoAttribute in interface Mode

doReadCursorAddress

public java.lang.String doReadCursorAddress()
Specified by:
doReadCursorAddress in interface Mode

doBackTab

public void doBackTab()
Specified by:
doBackTab in interface Mode

doSetMaxPageNumber

public void doSetMaxPageNumber(int n)
Specified by:
doSetMaxPageNumber in interface Mode

doDefineDataTypeTable

public void doDefineDataTypeTable(int startIndex,
                                  byte[] entries)
Specified by:
doDefineDataTypeTable in interface Mode

doResetVariableTable

public void doResetVariableTable()
Specified by:
doResetVariableTable in interface Mode

doDefineVariableTable

public void doDefineVariableTable(int startIndex,
                                  FieldAttributes[] attribs)
Specified by:
doDefineVariableTable in interface Mode

doDefineEnterKeyFunction

public void doDefineEnterKeyFunction(char[] str)
Specified by:
doDefineEnterKeyFunction in interface Mode

doCursorUp

public void doCursorUp()
Specified by:
doCursorUp in interface Mode

doCursorRight

public void doCursorRight()
Specified by:
doCursorRight in interface Mode

doCursorHomeDown

public void doCursorHomeDown()
Specified by:
doCursorHomeDown in interface Mode

doCursorHome

public void doCursorHome()
Specified by:
doCursorHome in interface Mode

doRollUp

public void doRollUp()
Specified by:
doRollUp in interface Mode

doRollDown

public void doRollDown()
Specified by:
doRollDown in interface Mode

doPageUp

public void doPageUp()
Specified by:
doPageUp in interface Mode

doPageDown

public void doPageDown()
Specified by:
doPageDown in interface Mode

doClearMemoryToSpaces

public void doClearMemoryToSpaces()
Specified by:
doClearMemoryToSpaces in interface Mode

doClearMemoryToSpaces

public void doClearMemoryToSpaces(int startRow,
                                  int startCol,
                                  int endRow,
                                  int endColumn)
Specified by:
doClearMemoryToSpaces in interface Mode

doEraseToEndOfPageOrMemory

public void doEraseToEndOfPageOrMemory()
Specified by:
doEraseToEndOfPageOrMemory in interface Mode

doReadWithAddress

public java.lang.String doReadWithAddress(int startRow,
                                          int startCol,
                                          int endRow,
                                          int endColumn)
Specified by:
doReadWithAddress in interface Mode

doEraseToEndOfLineOrField

public void doEraseToEndOfLineOrField()
Specified by:
doEraseToEndOfLineOrField in interface Mode

doReadWithAddressAll

public java.lang.String doReadWithAddressAll(int startRow,
                                             int startCol,
                                             int endRow,
                                             int endColumn)
Specified by:
doReadWithAddressAll in interface Mode

doInsertLine

public void doInsertLine()
Specified by:
doInsertLine in interface Mode

doDeleteLine

public void doDeleteLine()
Specified by:
doDeleteLine in interface Mode

doDisableLocalLineEditing

public void doDisableLocalLineEditing()
Specified by:
doDisableLocalLineEditing in interface Mode

doInsertCharacter

public void doInsertCharacter()
Specified by:
doInsertCharacter in interface Mode

doDeleteCharacter

public void doDeleteCharacter()
Specified by:
doDeleteCharacter in interface Mode

doResetModifiedDataTags

public void doResetModifiedDataTags()
Specified by:
doResetModifiedDataTags in interface Mode

doReadWholePageOrBuffer

public java.lang.String doReadWholePageOrBuffer()
Specified by:
doReadWholePageOrBuffer in interface Mode

doDisplayPage

public void doDisplayPage(int n)
Specified by:
doDisplayPage in interface Mode

doSelectPage

public void doSelectPage(int n)
Specified by:
doSelectPage in interface Mode

doStartFieldExtended

public void doStartFieldExtended(FieldAttributes attribs)
Specified by:
doStartFieldExtended in interface Mode

getChars

public char[] getChars(int visTop,
                       int row)
Specified by:
getChars in interface Mode

getAttribs

public int[] getAttribs(int visTop,
                        int row)
Specified by:
getAttribs in interface Mode

getDisplayRows

public int getDisplayRows()

getDisplayCols

public int getDisplayCols()

getBufferRows

public int getBufferRows()
Specified by:
getBufferRows in interface Mode

doClickSelect

public void doClickSelect(int row,
                          int col,
                          java.lang.String selectDelims)
Specified by:
doClickSelect in interface Mode

resetClickSelect

public void resetClickSelect()
Specified by:
resetClickSelect in interface Mode

setSelection

public void setSelection(int row1,
                         int col1,
                         int row2,
                         int col2)
Specified by:
setSelection in interface Mode

selectAll

public void selectAll()
Specified by:
selectAll in interface Mode

resetSelection

public void resetSelection()
Specified by:
resetSelection in interface Mode

getSelection

public java.lang.String getSelection(java.lang.String eol)
Specified by:
getSelection in interface Mode

search

public SearchContext search(SearchContext lastContext,
                            java.lang.String key,
                            boolean reverse,
                            boolean caseSens)
Specified by:
search in interface Mode

getRow

public abstract int getRow()
Specified by:
getRow in interface Mode
Returns:
row number, starting at 1

getCol

public abstract int getCol()
Specified by:
getCol in interface Mode
Returns:
column number, starting at 1

getPage

public abstract int getPage()
Specified by:
getPage in interface Mode
Returns:
page number, starting at 1