com.mindbright.terminal
Class TerminalVT100Style
java.lang.Object
com.mindbright.terminal.TerminalVT100Style
- All Implemented Interfaces:
- CompatTerminal, DisplayModel, Terminal
- public class TerminalVT100Style
- extends java.lang.Object
- implements Terminal, CompatTerminal, DisplayModel
Fields inherited from interface com.mindbright.terminal.CompatTerminal |
ATTR_BGCOLOR, ATTR_BLINKING, ATTR_BOLD, ATTR_FGCOLOR, ATTR_INVERSE, ATTR_INVISIBLE, ATTR_LOWINTENSITY, ATTR_UNDERLINE, OPT_ASCII_LDC, OPT_AUTO_LF, OPT_AUTO_WRAP, OPT_COPY_CRNL, OPT_COPY_SEL, OPT_DEC132COLS, OPT_DECCOLM, OPT_INSERTMODE, OPT_LAST_OPT, OPT_LOCAL_ECHO, OPT_LOCAL_PGKEYS, OPT_MAP_CTRLSP, OPT_PASSTHRU_PRN, OPT_REV_VIDEO, OPT_REV_WRAP, OPT_SCROLL_SI, OPT_SCROLL_SK, OPT_VIS_BELL, OPT_VIS_CURSOR |
Fields inherited from interface com.mindbright.terminal.DisplayModel |
ATTR_BGCOLOR, ATTR_BLINKING, ATTR_BOLD, ATTR_CHARDRAWN, ATTR_CHARNOTDRAWN, ATTR_DWIDTH_L, ATTR_DWIDTH_R, ATTR_FGCOLOR, ATTR_INVERSE, ATTR_INVISIBLE, ATTR_LINEDRAW, ATTR_LOWINTENSITY, ATTR_SELECTED, ATTR_UNDERLINE, MASK_ATTR, MASK_BGCOL, MASK_FGCOL, SHIFT_BGCOL, SHIFT_FGCOL |
Method Summary |
void |
clearAbove()
|
void |
clearAllAttributes()
|
void |
clearAllTabs()
|
void |
clearBelow()
|
void |
clearLeft()
|
void |
clearLine()
|
void |
clearRight()
|
void |
clearSaveLines()
|
void |
clearScreen()
|
void |
clearTab(int col)
|
void |
close()
|
int |
cols()
|
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 |
doBell()
|
void |
doBS()
|
void |
doClickSelect(int visTop,
int row,
int col,
java.lang.String selectDelims)
|
void |
doCR()
|
void |
doLF()
|
void |
doTab()
|
void |
doTabs(int n)
|
void |
eraseChars(int n)
|
void |
fillScreen(char c)
|
void |
fromHost(char c)
|
int[] |
getAttribs(int visTop,
int row)
|
boolean |
getAttribute(int attr)
|
int |
getBufferRows()
|
char[] |
getChars(int visTop,
int row)
|
int |
getCols()
|
int |
getCursorH()
|
int |
getCursorV()
|
java.lang.String |
getDefaultProperty(java.lang.String key)
|
int |
getDisplayCols()
|
int |
getDisplayRows()
|
boolean |
getOption(int opt)
|
TerminalOption[] |
getOptions()
|
java.util.Properties |
getProperties()
|
java.lang.String |
getProperty(java.lang.String key)
|
boolean |
getPropsChanged()
|
int |
getRows()
|
java.lang.String |
getSelection(java.lang.String eol)
|
static Terminal |
getTerminal(java.lang.String type)
|
static TerminalOption[] |
getTerminalOptions()
|
static java.lang.String[] |
getTerminalTypes()
|
int |
getWindowBottom()
|
int |
getWindowLeft()
|
int |
getWindowRight()
|
int |
getWindowTop()
|
void |
insertChars(int n)
|
void |
insertLines(int n)
|
void |
keyHandler(char c,
int virtualKey,
int modifiers)
|
void |
mouseHandler(int visTop,
int x,
int y,
boolean press,
int modifiers)
|
void |
paste(java.lang.String selection)
|
void |
printScreen()
|
void |
reset()
|
void |
resetClickSelect()
|
void |
resetInterpreter()
|
void |
resetSelection()
|
void |
resetTabs()
|
void |
resetWindow()
|
void |
ringBell()
|
int |
rows()
|
void |
scrollDown(int n)
|
void |
scrollUp(int n)
|
SearchContext |
search(SearchContext lastContext,
java.lang.String key,
boolean reverse,
boolean caseSens)
|
void |
selectAll()
|
void |
sendBytes(byte[] b)
|
void |
setAttribute(int attr,
boolean val)
|
void |
setAttributeBold(boolean set)
|
void |
setBackgroundColor(int c)
|
void |
setCursorPos(int row,
int col)
|
void |
setDisplay(DisplayView display)
|
void |
setDumbMode(boolean dumb)
|
void |
setForegroundColor(int c)
|
void |
setInputCharset(java.lang.String charset)
|
void |
setOption(int opt,
boolean value)
|
void |
setProperties(java.util.Properties newProps)
|
boolean |
setProperty(java.lang.String key,
java.lang.String value)
|
boolean |
setProperty(java.lang.String key,
java.lang.String value,
boolean forceSet)
|
void |
setPropsChanged(boolean value)
|
boolean |
setSaveLines(int lines)
|
void |
setSelection(int row1,
int col1,
int row2,
int col2)
|
void |
setSelection(int visTop,
int row1,
int col1,
int row2,
int col2)
|
boolean |
setSize(int rows,
int cols)
|
void |
setTab(int col)
|
boolean |
setTerminalType(java.lang.String type)
|
void |
setTerminalWindow(TerminalWindow termWin)
|
void |
setTitle(java.lang.String title)
|
void |
setUpdate(boolean enabled)
|
void |
setWindow(int top,
int bottom)
|
void |
setWindow(int top,
int right,
int bottom,
int left)
|
void |
startPrinter()
|
void |
stopPrinter()
|
java.lang.String |
terminalType()
|
void |
typedChar(char c)
|
void |
write(char c)
|
void |
write(char[] c,
int off,
int len)
|
void |
write(java.lang.String str)
|
void |
writeLineDrawChar(char c)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TerminalVT100Style
public TerminalVT100Style(TerminalInterpreter interpreter)
getTerminalTypes
public static java.lang.String[] getTerminalTypes()
getTerminal
public static Terminal getTerminal(java.lang.String type)
getTerminalOptions
public static TerminalOption[] getTerminalOptions()
terminalType
public java.lang.String terminalType()
- Specified by:
terminalType
in interface Terminal
setTerminalType
public boolean setTerminalType(java.lang.String type)
- Specified by:
setTerminalType
in interface Terminal
setDumbMode
public void setDumbMode(boolean dumb)
- Specified by:
setDumbMode
in interface Terminal
close
public void close()
- Specified by:
close
in interface Terminal
reset
public void reset()
- Specified by:
reset
in interface Terminal
getRows
public int getRows()
- Specified by:
getRows
in interface Terminal
getCols
public int getCols()
- Specified by:
getCols
in interface Terminal
paste
public void paste(java.lang.String selection)
- Specified by:
paste
in interface Terminal
keyHandler
public void keyHandler(char c,
int virtualKey,
int modifiers)
- Specified by:
keyHandler
in interface Terminal
mouseHandler
public void mouseHandler(int visTop,
int x,
int y,
boolean press,
int modifiers)
- Specified by:
mouseHandler
in interface Terminal
setInputCharset
public void setInputCharset(java.lang.String charset)
throws java.lang.IllegalArgumentException
- Specified by:
setInputCharset
in interface Terminal
- Throws:
java.lang.IllegalArgumentException
setUpdate
public void setUpdate(boolean enabled)
- Specified by:
setUpdate
in interface Terminal
fromHost
public void fromHost(char c)
- Specified by:
fromHost
in interface Terminal
setSize
public boolean setSize(int rows,
int cols)
- Specified by:
setSize
in interface Terminal
setSaveLines
public boolean setSaveLines(int lines)
- Specified by:
setSaveLines
in interface Terminal
clearSaveLines
public void clearSaveLines()
- Specified by:
clearSaveLines
in interface Terminal
doClickSelect
public void doClickSelect(int visTop,
int row,
int col,
java.lang.String selectDelims)
- Specified by:
doClickSelect
in interface Terminal
getSelection
public java.lang.String getSelection(java.lang.String eol)
- Specified by:
getSelection
in interface Terminal
setSelection
public void setSelection(int visTop,
int row1,
int col1,
int row2,
int col2)
- Specified by:
setSelection
in interface Terminal
setSelection
public void setSelection(int row1,
int col1,
int row2,
int col2)
- Specified by:
setSelection
in interface Terminal
selectAll
public void selectAll()
- Specified by:
selectAll
in interface Terminal
resetSelection
public void resetSelection()
- Specified by:
resetSelection
in interface Terminal
resetClickSelect
public void resetClickSelect()
- Specified by:
resetClickSelect
in interface Terminal
setTerminalWindow
public void setTerminalWindow(TerminalWindow termWin)
- Specified by:
setTerminalWindow
in interface Terminal
setDisplay
public void setDisplay(DisplayView display)
- Specified by:
setDisplay
in interface Terminal
setProperties
public void setProperties(java.util.Properties newProps)
- Specified by:
setProperties
in interface Terminal
setProperty
public boolean setProperty(java.lang.String key,
java.lang.String value)
setProperty
public boolean setProperty(java.lang.String key,
java.lang.String value,
boolean forceSet)
- Specified by:
setProperty
in interface Terminal
getProperties
public java.util.Properties getProperties()
- Specified by:
getProperties
in interface Terminal
getProperty
public java.lang.String getProperty(java.lang.String key)
- Specified by:
getProperty
in interface Terminal
getPropsChanged
public boolean getPropsChanged()
- Specified by:
getPropsChanged
in interface Terminal
setPropsChanged
public void setPropsChanged(boolean value)
- Specified by:
setPropsChanged
in interface Terminal
getDefaultProperty
public java.lang.String getDefaultProperty(java.lang.String key)
- Specified by:
getDefaultProperty
in interface Terminal
getOptions
public TerminalOption[] getOptions()
- Specified by:
getOptions
in interface Terminal
setAttributeBold
public void setAttributeBold(boolean set)
- Specified by:
setAttributeBold
in interface Terminal
ringBell
public void ringBell()
- Specified by:
ringBell
in interface Terminal
setCursorPos
public void setCursorPos(int row,
int col)
- Specified by:
setCursorPos
in interface Terminal
getChars
public char[] getChars(int visTop,
int row)
- Specified by:
getChars
in interface DisplayModel
getAttribs
public int[] getAttribs(int visTop,
int row)
- Specified by:
getAttribs
in interface DisplayModel
getDisplayRows
public int getDisplayRows()
- Specified by:
getDisplayRows
in interface DisplayModel
getDisplayCols
public int getDisplayCols()
- Specified by:
getDisplayCols
in interface DisplayModel
getBufferRows
public int getBufferRows()
- Specified by:
getBufferRows
in interface DisplayModel
setTitle
public void setTitle(java.lang.String title)
- Specified by:
setTitle
in interface CompatTerminal
rows
public int rows()
- Specified by:
rows
in interface CompatTerminal
cols
public int cols()
- Specified by:
cols
in interface CompatTerminal
fillScreen
public void fillScreen(char c)
- Specified by:
fillScreen
in interface CompatTerminal
write
public void write(char c)
- Specified by:
write
in interface CompatTerminal
write
public void write(char[] c,
int off,
int len)
- Specified by:
write
in interface CompatTerminal
write
public void write(java.lang.String str)
- Specified by:
write
in interface CompatTerminal
writeLineDrawChar
public void writeLineDrawChar(char c)
- Specified by:
writeLineDrawChar
in interface CompatTerminal
typedChar
public void typedChar(char c)
- Specified by:
typedChar
in interface CompatTerminal
sendBytes
public void sendBytes(byte[] b)
- Specified by:
sendBytes
in interface CompatTerminal
doBell
public void doBell()
- Specified by:
doBell
in interface CompatTerminal
doBS
public void doBS()
- Specified by:
doBS
in interface CompatTerminal
doTab
public void doTab()
- Specified by:
doTab
in interface CompatTerminal
doTabs
public void doTabs(int n)
- Specified by:
doTabs
in interface CompatTerminal
doBackTabs
public void doBackTabs(int n)
- Specified by:
doBackTabs
in interface CompatTerminal
setTab
public void setTab(int col)
- Specified by:
setTab
in interface CompatTerminal
clearTab
public void clearTab(int col)
- Specified by:
clearTab
in interface CompatTerminal
resetTabs
public void resetTabs()
- Specified by:
resetTabs
in interface CompatTerminal
clearAllTabs
public void clearAllTabs()
- Specified by:
clearAllTabs
in interface CompatTerminal
doCR
public void doCR()
- Specified by:
doCR
in interface CompatTerminal
doLF
public void doLF()
- Specified by:
doLF
in interface CompatTerminal
resetInterpreter
public void resetInterpreter()
- Specified by:
resetInterpreter
in interface CompatTerminal
resetWindow
public void resetWindow()
- Specified by:
resetWindow
in interface CompatTerminal
setWindow
public void setWindow(int top,
int bottom)
- Specified by:
setWindow
in interface CompatTerminal
setWindow
public void setWindow(int top,
int right,
int bottom,
int left)
- Specified by:
setWindow
in interface CompatTerminal
getWindowTop
public int getWindowTop()
- Specified by:
getWindowTop
in interface CompatTerminal
getWindowBottom
public int getWindowBottom()
- Specified by:
getWindowBottom
in interface CompatTerminal
getWindowLeft
public int getWindowLeft()
- Specified by:
getWindowLeft
in interface CompatTerminal
getWindowRight
public int getWindowRight()
- Specified by:
getWindowRight
in interface CompatTerminal
getCursorV
public int getCursorV()
- Specified by:
getCursorV
in interface CompatTerminal
getCursorH
public int getCursorH()
- Specified by:
getCursorH
in interface CompatTerminal
cursorSetPos
public void cursorSetPos(int v,
int h,
boolean relative)
- Specified by:
cursorSetPos
in interface CompatTerminal
cursorUp
public void cursorUp(int n)
- Specified by:
cursorUp
in interface CompatTerminal
cursorDown
public void cursorDown(int n)
- Specified by:
cursorDown
in interface CompatTerminal
cursorForward
public void cursorForward(int n)
- Specified by:
cursorForward
in interface CompatTerminal
cursorBackward
public void cursorBackward(int n)
- Specified by:
cursorBackward
in interface CompatTerminal
cursorIndex
public void cursorIndex(int n)
- Specified by:
cursorIndex
in interface CompatTerminal
cursorIndexRev
public void cursorIndexRev(int n)
- Specified by:
cursorIndexRev
in interface CompatTerminal
cursorSave
public void cursorSave()
- Specified by:
cursorSave
in interface CompatTerminal
cursorRestore
public void cursorRestore()
- Specified by:
cursorRestore
in interface CompatTerminal
scrollUp
public void scrollUp(int n)
- Specified by:
scrollUp
in interface CompatTerminal
scrollDown
public void scrollDown(int n)
- Specified by:
scrollDown
in interface CompatTerminal
clearBelow
public void clearBelow()
- Specified by:
clearBelow
in interface CompatTerminal
clearAbove
public void clearAbove()
- Specified by:
clearAbove
in interface CompatTerminal
clearScreen
public void clearScreen()
- Specified by:
clearScreen
in interface Terminal
clearRight
public void clearRight()
- Specified by:
clearRight
in interface CompatTerminal
clearLeft
public void clearLeft()
- Specified by:
clearLeft
in interface CompatTerminal
clearLine
public void clearLine()
- Specified by:
clearLine
in interface Terminal
eraseChars
public void eraseChars(int n)
- Specified by:
eraseChars
in interface CompatTerminal
insertChars
public void insertChars(int n)
- Specified by:
insertChars
in interface CompatTerminal
insertLines
public void insertLines(int n)
- Specified by:
insertLines
in interface CompatTerminal
deleteChars
public void deleteChars(int n)
- Specified by:
deleteChars
in interface CompatTerminal
deleteLines
public void deleteLines(int n)
- Specified by:
deleteLines
in interface CompatTerminal
printScreen
public void printScreen()
- Specified by:
printScreen
in interface CompatTerminal
startPrinter
public void startPrinter()
- Specified by:
startPrinter
in interface CompatTerminal
stopPrinter
public void stopPrinter()
- Specified by:
stopPrinter
in interface CompatTerminal
setOption
public void setOption(int opt,
boolean value)
- Specified by:
setOption
in interface CompatTerminal
getOption
public boolean getOption(int opt)
- Specified by:
getOption
in interface CompatTerminal
search
public SearchContext search(SearchContext lastContext,
java.lang.String key,
boolean reverse,
boolean caseSens)
- Specified by:
search
in interface Terminal
setAttribute
public void setAttribute(int attr,
boolean val)
- Specified by:
setAttribute
in interface CompatTerminal
getAttribute
public boolean getAttribute(int attr)
- Specified by:
getAttribute
in interface CompatTerminal
setForegroundColor
public void setForegroundColor(int c)
- Specified by:
setForegroundColor
in interface CompatTerminal
setBackgroundColor
public void setBackgroundColor(int c)
- Specified by:
setBackgroundColor
in interface CompatTerminal
clearAllAttributes
public void clearAllAttributes()
- Specified by:
clearAllAttributes
in interface CompatTerminal