|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jline.Terminal | +--jline.UnixTerminal
Terminal that is used for unix platforms. Terminal initialization
is handled by issuing the stty
command against the
/dev/tty
file to disable character echoing and enable
character input. All known unix systems (including
Linux and Macintosh OS X) support the stty
), so this
implementation should work for an reasonable POSIX system.
Constructor Summary | |
UnixTerminal()
|
Method Summary | |
boolean |
getEcho()
Returns true if the terminal will echo all characters type. |
int |
getTerminalHeight()
Returns the value of "stty size" height param. |
int |
getTerminalWidth()
Returns the value of "stty size" width param. |
void |
initializeTerminal()
Remove line-buffered input by invoking "stty -icanon min 1" against the current terminal. |
boolean |
isSupported()
Returns true if this terminal is capable of initializing the terminal to use jline. |
Methods inherited from class jline.Terminal |
getTerminal, setupTerminal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UnixTerminal()
Method Detail |
public void initializeTerminal() throws IOException, InterruptedException
initializeTerminal
in class Terminal
IOException
InterruptedException
public boolean isSupported()
Terminal
isSupported
in class Terminal
public boolean getEcho()
Terminal
getEcho
in class Terminal
public int getTerminalWidth()
getTerminalWidth
in class Terminal
public int getTerminalHeight()
getTerminalHeight
in class Terminal
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |