jline
Class Terminal

java.lang.Object
  |
  +--jline.Terminal
Direct Known Subclasses:
Terminal.UnixTerminal, Terminal.WindowsTerminal

public abstract class Terminal
extends Object

Representation of the input terminal for a platform. Handles any initialization that the platform may need to perform in order to allow the ConsoleReader to correctly handle input.

Author:
Marc Prud'hommeaux

Nested Class Summary
static class Terminal.UnixTerminal
          Terminal that is used for Unix platforms.
static class Terminal.WindowsTerminal
          Terminal that is used for Windows platforms.
 
Constructor Summary
Terminal()
           
 
Method Summary
abstract  int getTerminalHeight()
          Returns the current height of the terminal (in lines)
abstract  int getTerminalWidth()
          Returns the current width of the terminal (in characters)
abstract  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.
static Terminal setupTerminal()
          Configure and return the Terminal.UnixTerminal instance for the current platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Terminal

public Terminal()
Method Detail

setupTerminal

public static Terminal setupTerminal()
Configure and return the Terminal.UnixTerminal instance for the current platform. This will 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.

See Also:
initializeTerminal()

initializeTerminal

public abstract void initializeTerminal()
                                 throws Exception
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.

Exception

getTerminalWidth

public abstract int getTerminalWidth()
Returns the current width of the terminal (in characters)


getTerminalHeight

public abstract int getTerminalHeight()
Returns the current height of the terminal (in lines)



Released under the terms of the GNU LGPL