|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.telnet.term.console.ConsoleTerm
public class ConsoleTerm
Implements the interface
.
Field Summary | |
---|---|
private TermIOBuffer |
buffer . |
private LinkedList<CharSequence> |
history . |
private CharSequence |
historyBuffer . |
private int |
historyCursor . |
private TermIO |
io . |
private Logger |
log . |
private TermIOWriter |
writer . |
Constructor Summary | |
---|---|
ConsoleTerm(TermIO io) |
Method Summary | |
---|---|
void |
addToHistory(CharSequence line) Append a line to the term history. |
Appendable |
append(char c) |
Screenable |
append(CharSequence s) |
Appendable |
append(CharSequence csq, int start, int end) |
Screenable |
append(Style style) |
void |
close() |
Screenable |
cls() |
void |
flush() Flush the stream. |
CharSequence |
getBuffer() Returns the current buffer content to the cursor; |
Appendable |
getDirectBuffer() Returns the direct buffer, any char appended in the returned appendable will translate into an insertion in the buffer. |
int |
getHeight() Returns the screen height in chars. |
String |
getProperty(String name) Retrieves the value of a property specified by this Term |
int |
getWidth() Returns the screen width in chars. |
TermEvent |
read() Read the next term event. |
boolean |
releaseAlternateBuffer() Release control of the alternate buffer. |
void |
setEcho(boolean echo) Set the echo mode on the term. |
boolean |
takeAlternateBuffer() Take control of the alternate buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Logger log
private final LinkedList<CharSequence> history
private CharSequence historyBuffer
private int historyCursor
private final TermIO io
private final TermIOBuffer buffer
private final TermIOWriter writer
Constructor Detail |
---|
public ConsoleTerm(TermIO io)
Method Detail |
---|
public int getWidth()
ScreenContext
getWidth
in interface ScreenContext
public int getHeight()
ScreenContext
getHeight
in interface ScreenContext
public String getProperty(String name)
Term
getProperty
in interface Term
name
- name of the term propertypublic void setEcho(boolean echo)
Term
setEcho
in interface Term
echo
- the echo modepublic boolean takeAlternateBuffer() throws IOException
Term
ScreenContext.flush()
method is invoked.
takeAlternateBuffer
in interface Term
IOException
public boolean releaseAlternateBuffer() throws IOException
Term
ScreenContext.flush()
method is invoked.
releaseAlternateBuffer
in interface Term
IOException
public TermEvent read() throws IOException
Term
read
in interface Term
IOException
- any io exceptionpublic Appendable getDirectBuffer()
Term
getDirectBuffer
in interface Term
public void addToHistory(CharSequence line)
Term
addToHistory
in interface Term
line
- the history line to appendpublic CharSequence getBuffer()
Term
getBuffer
in interface Term
public void flush()
ScreenContext
flush
in interface ScreenContext
public void close()
close
in interface Closeable
public Screenable append(CharSequence s) throws IOException
append
in interface Appendable
IOException
public Appendable append(char c) throws IOException
append
in interface Appendable
IOException
public Appendable append(CharSequence csq, int start, int end) throws IOException
append
in interface Appendable
IOException
public Screenable append(Style style) throws IOException
append
in interface Screenable
IOException
public Screenable cls() throws IOException
cls
in interface Screenable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |