|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.console.jline.JLineProcessor
public class JLineProcessor
| Field Summary | |
|---|---|
private Console |
console
. |
(package private) CountDownLatch |
done
|
(package private) String |
lineSeparator
|
(package private) jline.console.ConsoleReader |
reader
|
(package private) jline.Terminal |
terminal
|
(package private) boolean |
useAlternate
Whether or not we switched on the alternate screen. |
(package private) PrintStream |
writer
|
| Constructor Summary | |
|---|---|
JLineProcessor(Shell shell,
jline.console.ConsoleReader reader,
PrintStream out)
|
|
JLineProcessor(Shell shell,
jline.console.ConsoleReader reader,
PrintStream out,
String lineSeparator)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
closed()
|
void |
cls()
Clear screen. |
void |
flush()
Flush output. |
int |
getHeight()
Returns the term height in chars. |
String |
getProperty(String name)
Retrieves the value of a property specified by this TermIO |
int |
getWidth()
Returns the term width in chars. |
void |
interrupt()
|
boolean |
moveLeft()
Move the cursor left. |
boolean |
moveRight(char c)
Move the cursor right. |
boolean |
releaseAlternateBuffer()
Release control of the alternate buffer. |
void |
run()
|
boolean |
takeAlternateBuffer()
Take control of the alternate buffer. |
void |
write(CharSequence s)
Write a string. |
void |
write(int c)
Write a char. |
void |
write(Style d)
Write a style. |
void |
writeCRLF()
Write a CRLF. |
void |
writeDel()
Delete the char under the cursor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final Console console
boolean useAlternate
final CountDownLatch done
final jline.Terminal terminal
final PrintStream writer
final jline.console.ConsoleReader reader
final String lineSeparator
| Constructor Detail |
|---|
public JLineProcessor(Shell shell,
jline.console.ConsoleReader reader,
PrintStream out)
public JLineProcessor(Shell shell,
jline.console.ConsoleReader reader,
PrintStream out,
String lineSeparator)
| Method Detail |
|---|
public void interrupt()
public void closed()
throws InterruptedException
InterruptedExceptionpublic void run()
run in interface Runnablepublic int getWidth()
ConsoleDriver
getWidth in interface ConsoleDriverpublic int getHeight()
ConsoleDriver
getHeight in interface ConsoleDriverpublic String getProperty(String name)
ConsoleDriver
getProperty in interface ConsoleDrivername - the name of the property
public boolean takeAlternateBuffer()
throws IOException
ConsoleDriverConsoleDriver.flush() method
is invoked.
takeAlternateBuffer in interface ConsoleDriverIOException
public boolean releaseAlternateBuffer()
throws IOException
ConsoleDriverConsoleDriver.flush() method
is invoked.
releaseAlternateBuffer in interface ConsoleDriverIOException
public void flush()
throws IOException
ConsoleDriver
flush in interface ConsoleDriverIOException - any io exception
public void write(CharSequence s)
throws IOException
ConsoleDriver
write in interface ConsoleDrivers - the string to write
IOException - any io exception
public void write(int c)
throws IOException
ConsoleDriver
write in interface ConsoleDriverc - the char to write
IOException - any io exception
public void write(Style d)
throws IOException
ConsoleDriver
write in interface ConsoleDriverd - the data to write
IOException - any io exception
public void writeDel()
throws IOException
ConsoleDriver
writeDel in interface ConsoleDriverIOException - any io exception
public void writeCRLF()
throws IOException
ConsoleDriver
writeCRLF in interface ConsoleDriverIOException - any io exception
public void cls()
throws IOException
ConsoleDriver
cls in interface ConsoleDriverIOException - any io exception
public boolean moveRight(char c)
throws IOException
ConsoleDriver
moveRight in interface ConsoleDriverc - the char skipped over
IOException - any io exception
public boolean moveLeft()
throws IOException
ConsoleDriver
moveLeft in interface ConsoleDriverIOException - any io exception
public void close()
throws IOException
close in interface CloseableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||