|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Core interface for a terminal window. This is implemented by the actual implementation of the terminal window.
Method Summary | |
void |
addAsEntropyGenerator(RandomSeed seed)
Casuses this terminal window to send events to the specified random seed in order to extract entropy from them |
void |
addInputListener(TerminalInputListener listener)
Add a input listener which listens to data from the user. |
void |
addOutputListener(TerminalOutputListener listener)
Add a output listener which listens to data from the server. |
void |
attachPrinter(TerminalPrinter printer)
Attach a printer to this terminal. |
void |
clearLine()
This shortcut method clears the current line. |
void |
clearScreen()
This shortcut method clears the screen. |
int |
cols()
Get the number of columns shown. |
void |
detachPrinter()
Detach the previously attached printer. |
TerminalOption[] |
getOptions()
Get the terminal options. |
java.util.Properties |
getProperties()
Get the current terminal properties |
java.lang.String |
getProperty(java.lang.String key)
Get the value of a single property. |
boolean |
getPropsChanged()
Check if any properties have changed. |
java.lang.String |
getTitle()
Get the title |
int |
hpixels()
Get the number of horizontal pixels used to represent the terminal. |
void |
printScreen()
Dump the current screen to the attached printer. |
void |
removeInputListener(TerminalInputListener listener)
Removes a previously added input listener |
void |
removeOutputListener(TerminalOutputListener listener)
Removes a previously added output listener |
void |
reset()
Reset the terminal emulator to the default state. |
void |
resetToDefaults()
Reset all properties to their default values. |
void |
ringBell()
This shortcut method rings the terminal bell. |
int |
rows()
Get the number of rows shown. |
SearchContext |
search(SearchContext lastContext,
java.lang.String key,
boolean reverse,
boolean caseSens)
Search for a string in the terminal window |
void |
sendBreak()
Send a break singal to the server. |
void |
sendBytes(byte[] b)
May be called when the user pastes data. |
void |
setAttributeBold(boolean set)
This shortcut menthod is used to enable/disable bold characters. |
void |
setCursorPos(int row,
int col)
This shortcut method moves the cursor to the given position. |
void |
setProperties(java.util.Properties newProps,
boolean merge)
Set a bunch of terminal properties |
void |
setProperty(java.lang.String key,
java.lang.String value)
Set a single terminal property. |
void |
setPropsChanged(boolean value)
Change the properties changed flag. |
void |
setTitle(java.lang.String title)
Set title of terminal window. |
void |
startPrinter()
Start dumping a log of everything which is printed on the terminal to the attached printer. |
void |
stopPrinter()
Stop printing. |
java.lang.String |
terminalType()
Get the terminal type which the window currently emulates. |
void |
typedChar(char c)
Called whn the user tpyes a character |
int |
vpixels()
Get the number of vertical pixels used to represent the terminal. |
void |
write(byte b)
Write a byte to the terminal. |
void |
write(byte[] c,
int off,
int len)
Write a bunch of bytes to the terminal. |
void |
write(char c)
Write a character to the terminal. |
void |
write(char[] c,
int off,
int len)
Write a bunch of characters to the terminal. |
void |
write(java.lang.String str)
Write a string to the terminal. |
Method Detail |
public void setTitle(java.lang.String title)
title
- the titlepublic java.lang.String getTitle()
public int rows()
public int cols()
public int vpixels()
public int hpixels()
public void write(byte b)
b
- byte to writepublic void write(char c)
The character is assumed to be in the java internal encoding.
c
- character to writepublic void write(char[] c, int off, int len)
The characters are assumed to be in the java internal encoding.
c
- array containg the characters to writeoff
- index in array of first character to writelen
- number of characters to writepublic void write(byte[] c, int off, int len)
c
- array containg the characters to writeoff
- index in array of first character to writelen
- number of characters to writepublic void write(java.lang.String str)
str
- string to writepublic void addInputListener(TerminalInputListener listener)
listener
- input listener to addpublic void removeInputListener(TerminalInputListener listener)
listener
- input listener to removepublic void addOutputListener(TerminalOutputListener listener)
listener
- output listener to addpublic void removeOutputListener(TerminalOutputListener listener)
listener
- output listener to removepublic void attachPrinter(TerminalPrinter printer)
printer
- printer to attachpublic void detachPrinter()
public void typedChar(char c)
c
- typed characterpublic void sendBytes(byte[] b)
b
- array of bytes representing characters to inputpublic void sendBreak()
public void reset()
public void printScreen()
public void startPrinter()
public void stopPrinter()
public java.lang.String terminalType()
public void setProperties(java.util.Properties newProps, boolean merge) throws java.lang.IllegalArgumentException, java.util.NoSuchElementException
newProps
- new propertiesmerge
- if true the new properties are merged with any
previous properties. If false all old properties are deleted.
java.lang.IllegalArgumentException
java.util.NoSuchElementException
public void setProperty(java.lang.String key, java.lang.String value) throws java.lang.IllegalArgumentException, java.util.NoSuchElementException
key
- property to setvalue
- value to set it to
java.lang.IllegalArgumentException
java.util.NoSuchElementException
public java.util.Properties getProperties()
public java.lang.String getProperty(java.lang.String key)
key
- name of perty to get value of
public void resetToDefaults()
public boolean getPropsChanged()
public void setPropsChanged(boolean value)
value
- new value.public TerminalOption[] getOptions()
public SearchContext search(SearchContext lastContext, java.lang.String key, boolean reverse, boolean caseSens)
lastContext
- used as a starying point, if not null, so
tha the search may continue from the last positionkey
- string to search forreverse
- if true the search is performed backwardscaseSens
- if true the key is case sensitive
null
if the key was not found.public void addAsEntropyGenerator(RandomSeed seed)
seed
- the random seed to send entropy topublic void setAttributeBold(boolean set)
The shortcut methods are used by local code to achieve certain effects without knowing which terminal emulation is active.
set
- if true turn on bold for subsequent characters.public void clearScreen()
The shortcut methods are used by local code to achieve certain effects without knowing which terminal emulation is active.
public void ringBell()
The shortcut methods are used by local code to achieve certain effects without knowing which terminal emulation is active.
public void setCursorPos(int row, int col)
The shortcut methods are used by local code to achieve certain effects without knowing which terminal emulation is active.
row
- row to place cursor oncol
- column to place cursor onpublic void clearLine()
The shortcut methods are used by local code to achieve certain effects without knowing which terminal emulation is active.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |