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.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
isWin
OS platform flag
|
private ContentPane |
pane
Content pane of the containing swing window.
|
private ChuiSimulator |
sim
Core Swing component that simulates the terminal.
|
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.
|
int |
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
getFactory, getPrimitives, getWindowSystem, inBackgroundMode, inBatchMode, init, isChui, setBackgroundMode, setBatchMode, setTerminalType, shutdown, terminalType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clientReady, lockMousePointer, openURL, propagate
private ChuiSimulator sim
private ContentPane pane
private boolean isWin
public SwingChuiDriver(BootstrapConfig config)
config
- The BootstrapConfig
configuration.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 int readKey()
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 AbstractChuiDriver
on
- true
- show cursor, false
- hide cursor.true
if operation was successful.java.lang.IllegalStateException