public class ConsoleTerm extends Object implements Term
interface.| Constructor and Description |
|---|
ConsoleTerm(TermIO io) |
| Modifier and Type | Method and Description |
|---|---|
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() |
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() |
String |
getProperty(String name)
Retrieves the value of a property specified by this Term
|
int |
getWidth() |
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.
|
public ConsoleTerm(TermIO io)
public int getWidth()
getWidth in interface ScreenContextpublic int getHeight()
getHeight in interface ScreenContextpublic String getProperty(String name)
TermgetProperty in interface Termname - name of the term propertypublic void setEcho(boolean echo)
Termpublic boolean takeAlternateBuffer()
throws IOException
TermScreenContext.flush() method
is invoked.takeAlternateBuffer in interface TermIOExceptionpublic boolean releaseAlternateBuffer()
throws IOException
TermScreenContext.flush() method
is invoked.releaseAlternateBuffer in interface TermIOExceptionpublic TermEvent read() throws IOException
Termread in interface TermIOException - any io exceptionpublic Appendable getDirectBuffer()
TermgetDirectBuffer in interface Termpublic void addToHistory(CharSequence line)
TermaddToHistory in interface Termline - the history line to appendpublic CharSequence getBuffer()
Termpublic void flush()
flush in interface ScreenContextpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic Screenable append(CharSequence s) throws IOException
append in interface AppendableIOExceptionpublic Appendable append(char c) throws IOException
append in interface AppendableIOExceptionpublic Appendable append(CharSequence csq, int start, int end) throws IOException
append in interface AppendableIOExceptionpublic Screenable append(Style style) throws IOException
append in interface ScreenableIOExceptionpublic Screenable cls() throws IOException
cls in interface ScreenableIOExceptionCopyright © 2015 eXo Platform SAS. All Rights Reserved.