public class ConsoleDriver extends AbstractChuiDriver
ScreenDriver.UriPathAnchor| Modifier and Type | Field and Description |
|---|---|
private ConsoleHelper |
helper
Reference to console low-level driver.
|
private static int |
KEY_MOUSE
Special key code which denotes mouse event.
|
private static CentralLogger |
LOG
Logger.
|
static java.lang.String |
NAME
Driver name.
|
private KeyProcessor |
processor
Key processor.
|
BEEP_FILE_PATH, direct, factory| Constructor and Description |
|---|
ConsoleDriver()
Constructor.
|
ConsoleDriver(ConsolePrimitives direct,
java.lang.String term)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beep()
Generate a beep signal.
|
void |
clear()
Clear screen.
|
ChildProcessFactory |
getChildProcessFactory()
Get driver-specific child process factory.
|
java.lang.String |
getName()
Get the driver name.
|
void |
init()
Initialize driver.
|
KeyCode |
readKey()
Read the key from terminal and translate it into P2J internal
representation.
|
void |
resetMode()
Reset screen mode.
|
void |
resume()
Resume terminal after
suspend() call. |
boolean |
setCursorStatus(boolean on)
Set cursor status (ON/OFF).
|
void |
setTerminalType(java.lang.String name)
Set terminal type according to passed string.
|
void |
shutdown()
Perform driver shutdown.
|
void |
suspend()
Suspend terminal and release it for use by other applications.
|
java.lang.String |
terminalType()
Get terminal type string.
|
captureMouseEvents, convertToOptions, createOutputManager, handleMouseEvent, updateClientMetricsgetFactory, getHostByName, getHostName, getPrimitives, getWindowSystem, inBackgroundMode, inBatchMode, isChui, playBeep, setBackgroundMode, setBatchModeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchooseFiles, clientReady, deregisterWidget, isEmbeddedClient, isWeb, lockMousePointer, openMimeResource, openMimeResource, propagate, resume, setControl, setCurrentLanguage, suspend, widgetStateChangedpublic static final java.lang.String NAME
private static final int KEY_MOUSE
private static CentralLogger LOG
private KeyProcessor processor
private ConsoleHelper helper
public ConsoleDriver()
public ConsoleDriver(ConsolePrimitives direct, java.lang.String term)
direct - The output primitives.term - Terminal type string.public java.lang.String getName()
public void beep()
Implementation deoends on native layer and (in turn) from particular terminal. If terminal does not support this feature or sound in terminal is turned off, there will be no audible feedback to user.
public void clear()
public ChildProcessFactory getChildProcessFactory()
public KeyCode readKey()
KeyProcessor class.
Mouse events (which also returned from native layer) are filtered out
because mouse is not supported.null if no keys were pressed since last call.public void resetMode()
public void resume()
suspend() call.public boolean setCursorStatus(boolean on)
throws java.lang.IllegalStateException
setCursorStatus in interface ScreenDriver<ChuiOutputManager>setCursorStatus in class AbstractChuiDriveron - true - show cursor, false - hide cursor.false.java.lang.IllegalStateExceptionpublic void setTerminalType(java.lang.String name)
setTerminalType in interface ScreenDriver<ChuiOutputManager>setTerminalType in class AbstractDriver<BasePrimitives,ChuiOutputManager>name - The terminal type.public void suspend()
public java.lang.String terminalType()
terminalType in interface ScreenDriver<ChuiOutputManager>terminalType in class AbstractDriver<BasePrimitives,ChuiOutputManager>public void init()
init in interface ScreenDriver<ChuiOutputManager>init in class AbstractDriver<BasePrimitives,ChuiOutputManager>public void shutdown()
shutdown in interface ScreenDriver<ChuiOutputManager>shutdown in class AbstractDriver<BasePrimitives,ChuiOutputManager>