public class ConsoleTerm extends java.lang.Object implements Term
interface.| Constructor and Description |
|---|
ConsoleTerm(TermIO io) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToHistory(java.lang.CharSequence line)
Append a line to the term history.
|
void |
close() |
void |
flush() |
java.lang.CharSequence |
getBuffer()
Returns the current buffer content to the cursor;
|
java.lang.Class<Chunk> |
getConsumedType() |
java.lang.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.
|
java.lang.String |
getProperty(java.lang.String name)
Retrieves the value of a property specified by this Term
|
int |
getWidth()
Returns the screen width in chars.
|
void |
provide(Chunk element) |
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.
|
void |
write(Chunk chunk)
Write a chunk to the screen.
|
public ConsoleTerm(TermIO io)
public int getWidth()
ScreenContextgetWidth in interface ScreenContextpublic int getHeight()
ScreenContextgetHeight in interface ScreenContextpublic java.lang.String getProperty(java.lang.String name)
TermgetProperty in interface Termname - name of the term propertypublic void setEcho(boolean echo)
Termpublic boolean takeAlternateBuffer()
throws java.io.IOException
TermFlushable.flush() method
is invoked.takeAlternateBuffer in interface Termjava.io.IOExceptionpublic boolean releaseAlternateBuffer()
throws java.io.IOException
TermFlushable.flush() method
is invoked.releaseAlternateBuffer in interface Termjava.io.IOExceptionpublic TermEvent read() throws java.io.IOException
Termpublic java.lang.Appendable getDirectBuffer()
TermgetDirectBuffer in interface Termpublic void addToHistory(java.lang.CharSequence line)
TermaddToHistory in interface Termline - the history line to appendpublic java.lang.CharSequence getBuffer()
Termpublic void flush()
flush in interface java.io.Flushablepublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic java.lang.Class<Chunk> getConsumedType()
public void write(Chunk chunk) throws java.io.IOException
ScreenContextwrite in interface ScreenContextchunk - the chunkjava.io.IOException - any io exceptionpublic void provide(Chunk element) throws java.io.IOException
java.io.IOExceptionCopyright © 2014 eXo Platform SAS. All Rights Reserved.