|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.sim.AbstractHardware
jmce.sim.AbstractPeripheral
jmce.sim.Device<java.lang.Integer>
jmce.sim.Serial
jmce.sim.terminal.Terminal
jmce.sim.terminal.SampleTerminal
public class SampleTerminal
Sample terminal implements only CR,LF,TAB,BACK-SPACE
Also implements all low level function used by more sophisticated terminal emulator like insert line, delete line etc.
Field Summary | |
---|---|
protected int |
abortKey
|
Fields inherited from class jmce.sim.terminal.Terminal |
---|
BLINK, HI, NORMAL, REVERSE, SPACE, UNDERLINE |
Fields inherited from class jmce.sim.AbstractPeripheral |
---|
cpu |
Constructor Summary | |
---|---|
SampleTerminal()
|
|
SampleTerminal(java.lang.String name)
|
Method Summary | |
---|---|
void |
clearEol()
|
void |
clearEos()
|
void |
clearFromLine()
Clear from the begin of the line to the cursor |
void |
clearToCursor()
Clear the display from the begin to the cursor |
void |
cls()
|
void |
defineFunctionKey(int k,
char c)
|
void |
defineFunctionKey(int k,
java.lang.String s)
|
void |
deleteChar()
|
void |
deleteLine()
|
void |
down()
|
int |
getAbortKey()
|
int |
getAtt()
|
int |
getAtt(int pos)
|
int |
getAtt(int r,
int c)
|
Memory |
getAttMemory()
|
int |
getChar(int pos)
|
int |
getChar(int r,
int c)
|
Memory |
getCharMemory()
|
int |
getCol()
|
boolean |
getCursor()
|
java.lang.String |
getEchoFile()
|
java.awt.Font |
getFont()
|
int |
getFontSize()
|
java.lang.String |
getFunctionKey(int k)
|
int |
getNumCol()
|
int |
getNumRow()
|
int |
getNumStatus()
|
int |
getRow()
|
int |
getScreenSize()
|
int |
getWindowSize()
|
void |
home()
|
void |
init(Hardware parent)
Initialize the hardware. |
void |
insertChar()
|
void |
insertChar(int c)
|
void |
insertLine()
|
void |
left()
|
void |
printStatusLine(int r,
java.lang.Object o)
Print a string on the status line. |
void |
putchar(int c)
|
void |
reset()
Reset the the device to the initial state. |
void |
restoreCursor()
|
void |
right()
|
void |
saveCursor()
|
void |
scrollDown(int from,
int size,
int n)
|
void |
scrollUp(int from,
int size,
int n)
|
void |
setAbortKey(int n)
|
void |
setAtt(int n)
|
void |
setChar(int pos,
int c)
|
void |
setChar(int r,
int c,
int ch)
|
void |
setCursor(int row,
int col)
|
static void |
setDefaultCRT(java.lang.Class clazz)
|
static void |
setDefaultCRT(java.lang.String name)
|
void |
setEchoFile(java.lang.String file)
|
void |
setFont(java.awt.Font font)
|
void |
setFontSize(int size)
|
void |
setNumCol(int col)
|
void |
setNumRow(int row)
|
void |
setNumStatus(int n)
|
void |
setStatusLine(int r,
int c,
java.lang.Object o)
Print a String at the specified position of the status line. |
java.lang.String |
toString()
|
void |
up()
|
void |
write(java.lang.Integer k)
Write data in the output buffer |
Methods inherited from class jmce.sim.terminal.Terminal |
---|
createTerminal |
Methods inherited from class jmce.sim.Serial |
---|
print, println, println |
Methods inherited from class jmce.sim.Device |
---|
addInputConsumer, addInputProducer, addOutputConsumer, addOutputProducer, getConnected, read, readOutput, readyRead, readyReadOutput, readyWrite, removeInputConsumer, removeOutputConsumer, setConnected, writeInput |
Methods inherited from class jmce.sim.AbstractPeripheral |
---|
idle, registerCPU, setIdle, setLive |
Methods inherited from class jmce.sim.AbstractHardware |
---|
addHardware, createFrame, destroy, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, setHardware, setHardware, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jmce.sim.Hardware |
---|
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, setHardware, setHardware, setName |
Field Detail |
---|
protected int abortKey
Constructor Detail |
---|
public SampleTerminal()
public SampleTerminal(java.lang.String name)
Method Detail |
---|
public static void setDefaultCRT(java.lang.String name) throws SIMException
SIMException
public static void setDefaultCRT(java.lang.Class clazz)
public int getFontSize()
getFontSize
in class Terminal
public void setFontSize(int size)
setFontSize
in class Terminal
public java.awt.Font getFont()
getFont
in class Terminal
public void setFont(java.awt.Font font)
setFont
in class Terminal
public void write(java.lang.Integer k) throws SIMException
Device
write
in class Device<java.lang.Integer>
SIMException
public int getNumStatus()
getNumStatus
in class Terminal
public void setNumStatus(int n)
setNumStatus
in class Terminal
public void setNumRow(int row)
setNumRow
in class Terminal
public void setNumCol(int col)
setNumCol
in class Terminal
public int getNumRow()
getNumRow
in class Terminal
public int getNumCol()
getNumCol
in class Terminal
public int getWindowSize()
public int getScreenSize()
public int getCol()
getCol
in class Terminal
public int getRow()
getRow
in class Terminal
public boolean getCursor()
getCursor
in class Terminal
public void setCursor(int row, int col)
setCursor
in class Terminal
public int getAtt()
public void setAtt(int n)
public void setChar(int r, int c, int ch) throws SIMException
SIMException
public void setChar(int pos, int c) throws SIMException
SIMException
public void setStatusLine(int r, int c, java.lang.Object o)
Terminal
setStatusLine
in class Terminal
r
- - Status linec
- - Columno
- - Object to printpublic void printStatusLine(int r, java.lang.Object o)
Terminal
The previous value of the status line will be lost. If the status line is not available no text will be print.
printStatusLine
in class Terminal
r
- - Status lineo
- - Object to printpublic void reset() throws SIMException
Hardware
reset
in interface Hardware
reset
in class AbstractHardware
SIMException
public void init(Hardware parent) throws SIMException
Hardware
init
in interface Hardware
init
in class AbstractHardware
parent
- Parent of this hardware.
SIMException
public int getAtt(int r, int c) throws SIMException
SIMException
public int getAtt(int pos) throws SIMException
SIMException
public int getChar(int r, int c) throws SIMException
SIMException
public int getChar(int pos) throws SIMException
SIMException
public void home()
public void cls()
public void saveCursor()
public void restoreCursor()
public void clearEol()
public void scrollUp(int from, int size, int n)
public void scrollDown(int from, int size, int n)
public void insertChar()
public void insertChar(int c)
public void insertLine()
public void deleteChar()
public void deleteLine()
public void clearFromLine()
public void clearToCursor()
public void clearEos()
public void up()
public void down()
public void left()
public void right()
public void putchar(int c) throws SIMException
putchar
in interface Console
putchar
in class Terminal
SIMException
public void defineFunctionKey(int k, char c)
public void defineFunctionKey(int k, java.lang.String s)
defineFunctionKey
in class Terminal
public java.lang.String getFunctionKey(int k)
getFunctionKey
in class Terminal
public Memory getCharMemory()
getCharMemory
in class Terminal
public Memory getAttMemory()
getAttMemory
in class Terminal
public java.lang.String getEchoFile()
getEchoFile
in class Terminal
public void setEchoFile(java.lang.String file)
setEchoFile
in class Terminal
public int getAbortKey()
public void setAbortKey(int n)
public java.lang.String toString()
toString
in class AbstractHardware
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |