public class SwingChuiDriver extends AbstractChuiDriver
| Modifier and Type | Class and Description |
|---|---|
private class |
SwingChuiDriver.VT100SwingEmulator
Swing-specific implementation of the VT100 emulator child process.
|
private class |
SwingChuiDriver.VT100SwingRenderer
Swing-specific implementation of the VT100 emulator renderer.
|
ScreenDriver.UriPathAnchor| Modifier and Type | Field and Description |
|---|---|
private java.io.ByteArrayInputStream |
beepAudioData
Cached beep sound audio data.
|
private boolean |
isWin
OS platform flag
|
static java.lang.String |
NAME
Driver name.
|
private ContentPane |
pane
Content pane of the containing swing window.
|
private ChuiSimulator |
sim
Core Swing component that simulates the terminal.
|
BEEP_FILE_PATH, direct, factory| Constructor and Description |
|---|
SwingChuiDriver(BootstrapConfig config)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beep()
Provide an audible feedback to user by generating a beep signal.
|
void |
clear()
Clear screen.
|
ChildProcessFactory |
getChildProcessFactory()
Get driver-specific child process factory.
|
java.lang.String |
getName()
Get the driver name.
|
KeyCode |
readKey()
Read single keystroke from keyboard.
|
void |
resetMode()
Reset current screen mode.
|
void |
resume()
Resume normal driver operation.
|
boolean |
setCursorStatus(boolean on)
Set cursor status (ON/OFF).
|
void |
suspend()
Suspend all screen I/O operations.
|
captureMouseEvents, convertToOptions, createOutputManager, handleMouseEvent, updateClientMetricsgetFactory, getHostByName, getHostName, getPrimitives, getWindowSystem, inBackgroundMode, inBatchMode, init, isChui, playBeep, setBackgroundMode, setBatchMode, setTerminalType, shutdown, terminalTypeclone, 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 ChuiSimulator sim
private ContentPane pane
private boolean isWin
private java.io.ByteArrayInputStream beepAudioData
Clip, but in JDK 8 with PulseAudio enabled (default JDK settings), a clip
cannot be properly replayed.public SwingChuiDriver(BootstrapConfig config)
config - The BootstrapConfig configuration.public java.lang.String getName()
public void beep()
There is no specific requirements to this method and actual implementation may do nothing if there is no way to perform audible notification to the user.
public void clear()
This method should clear the screen and perform necessary flushing of the system-specific buffers if necessary. Users of this method assume that actual screen appearance as it is visible to the user is properly changed upon exit from this method.
public ChildProcessFactory getChildProcessFactory()
public KeyCode readKey()
null if no keys were pressed since last call.public void resetMode()
Upon exit from this method P2J assumes that screen is in correct state and can be used for interaction with the user.
public void resume()
public void suspend()
public boolean setCursorStatus(boolean on)
throws java.lang.IllegalStateException
The implementation of this method should show/hide actual screen cursor visible to user. Remaining code assumes that actual cursor status visible to user is properly changed upon exit from this method.
setCursorStatus in interface ScreenDriver<ChuiOutputManager>setCursorStatus in class AbstractChuiDriveron - true - show cursor, false - hide cursor.true if operation was successful.java.lang.IllegalStateException