|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.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 org.slf4j.Logger |
log
. |
private TermIOWriter |
writer
. |
| Constructor Summary | |
|---|---|
ConsoleTerm(TermIO io)
|
|
| Method Summary | |
|---|---|
void |
addToHistory(CharSequence line)
Append a line to the term history. |
void |
close()
Close the term. |
void |
flush()
Flush the term buffer. |
CharSequence |
getBuffer()
Returns the current buffer content to the cursor; |
int |
getHeight()
Returns the term height in chars. |
Appendable |
getInsertBuffer()
Returns the insert buffer, any char appended in the returned appendable will translate into an insertion in the buffer. |
String |
getProperty(String name)
Retrieves the value of a property specified by this Term |
int |
getWidth()
Returns the term width in chars. |
void |
provide(Chunk element)
Provide an element. |
TermEvent |
read()
Read the next term event. |
void |
setEcho(boolean echo)
Set the echo mode on the term. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final org.slf4j.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()
Term
getWidth in interface Termpublic int getHeight()
Term
getHeight in interface Termpublic String getProperty(String name)
Term
getProperty in interface Termname - name of the term property
public void setEcho(boolean echo)
Term
setEcho in interface Termecho - the echo mode
public TermEvent read()
throws IOException
Term
read in interface TermIOException - any io exceptionpublic Appendable getInsertBuffer()
Term
getInsertBuffer in interface Termpublic void addToHistory(CharSequence line)
Term
addToHistory in interface Termline - the history line to appendpublic CharSequence getBuffer()
Term
getBuffer in interface Termpublic void flush()
Term
flush in interface Flushableflush in interface Termpublic void close()
TermTerm.read() operation, those thread should be unblocked.
close in interface Closeableclose in interface Term
public void provide(Chunk element)
throws IOException
Pipe
provide in interface Pipe<Chunk>element - the provided element
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||