jline
Class WindowsTerminal

java.lang.Object
  extended byjline.Terminal
      extended byjline.WindowsTerminal

public class WindowsTerminal
extends Terminal

Terminal implementation for Microsoft Windows. Terminal initialization in initializeTerminal() is accomplished by extracting the jline_version.dll, saving it to the system temporary directoy (determined by the setting of the java.io.tmpdir System property), loading the library, and then calling the Win32 APIs SetConsoleMode and GetConsoleMode to disable character echoing.

Author:
Marc Prud'hommeaux

Constructor Summary
WindowsTerminal()
           
 
Method Summary
 boolean getEcho()
          Returns true if the terminal will echo all characters type.
 int getTerminalHeight()
          Unsupported; return the default.
 int getTerminalWidth()
          Unsupported; return the default.
 void initializeTerminal()
          Initialize any system settings that are required for the console to be able to handle input correctly, such as setting tabtop, buffered input, and character echo.
 boolean isSupported()
          Returns true if this terminal is capable of initializing the terminal to use jline.
 
Methods inherited from class jline.Terminal
getTerminal, readCharacter, setupTerminal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowsTerminal

public WindowsTerminal()
Method Detail

initializeTerminal

public void initializeTerminal()
                        throws Exception
Description copied from class: Terminal
Initialize any system settings that are required for the console to be able to handle input correctly, such as setting tabtop, buffered input, and character echo.

Specified by:
initializeTerminal in class Terminal
Throws:
Exception

isSupported

public boolean isSupported()
Description copied from class: Terminal
Returns true if this terminal is capable of initializing the terminal to use jline.

Specified by:
isSupported in class Terminal

getEcho

public boolean getEcho()
Description copied from class: Terminal
Returns true if the terminal will echo all characters type.

Specified by:
getEcho in class Terminal

getTerminalWidth

public int getTerminalWidth()
Unsupported; return the default.

Specified by:
getTerminalWidth in class Terminal
See Also:
Terminal.getTerminalWidth()

getTerminalHeight

public int getTerminalHeight()
Unsupported; return the default.

Specified by:
getTerminalHeight in class Terminal
See Also:
Terminal.getTerminalHeight()


Released under the terms of the GNU LGPL