public abstract class AbstractChuiDriver extends AbstractDriver<BasePrimitives,ChuiOutputManager>
direct, factory
Constructor and Description |
---|
AbstractChuiDriver(BasePrimitives direct,
java.lang.String term)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
captureMouseEvents(boolean state)
Enable or disable capture of mouse events.
|
static TerminalOptions |
convertToOptions(BootstrapConfig cfg)
Read configuration values from the bootstrap configuration and convert
these into an options instance.
|
ChuiOutputManager |
createOutputManager(BootstrapConfig cfg)
Get the
OutputManager instance associated with this driver. |
void |
handleMouseEvent(int sourceID,
java.awt.event.MouseEvent evt)
Handle the specified event, in the context of the specified widget.
|
private static int |
parseInt(java.lang.String spec,
int def)
Attempt to convert the given string into an integer using
Integer.parseInt . |
boolean |
setCursorStatus(boolean on)
Set cursor status (ON/OFF).
|
getFactory, getPrimitives, getWindowSystem, inBackgroundMode, inBatchMode, init, isChui, setBackgroundMode, setBatchMode, setTerminalType, shutdown, terminalType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beep, clear, clientReady, getChildProcessFactory, lockMousePointer, openMimeResource, propagate, readKey, resetMode, resume, resume, setControl, suspend, suspend
public AbstractChuiDriver(BasePrimitives direct, java.lang.String term)
direct
- The output primitives.term
- Terminal type string.public static TerminalOptions convertToOptions(BootstrapConfig cfg)
The following parameters are supported:
Category:Group:Key Type ----------------------- --------------------------- client:chui:rows integer client:chui:columns integer client:chui:background text which can be converted to a ColorRgb by ColorRgb.fromString() client:chui:foreground text which can be converted to a ColorRgb by ColorRgb.fromString() client:chui:selection text which can be converted to a ColorRgb by ColorRgb.fromString() client:chui:fontname text containing a monospaced (fixed width) font family name client:chui:fontsize integer
cfg
- The bootstrap configuration.public ChuiOutputManager createOutputManager(BootstrapConfig cfg)
OutputManager
instance associated with this driver.cfg
- The initial configuration for this driver.public boolean setCursorStatus(boolean on)
For GUI, this does nothing.
on
- true
- show cursor, false
- hide cursor.false
.public boolean captureMouseEvents(boolean state)
This implementation is a no-op.
state
- true
to capture mouse events, false
to ignore them.public void handleMouseEvent(int sourceID, java.awt.event.MouseEvent evt)
This implementation is a no-op.
sourceID
- The source widget ID.evt
- The mouse event.private static int parseInt(java.lang.String spec, int def)
Integer.parseInt
.spec
- String encoded number specification.def
- Default value to return if the spec cannot be parsed properly.