public abstract class AbstractDriver<P extends OutputPrimitives,O extends OutputManager<P>> extends java.lang.Object implements ScreenDriver<O>
Modifier and Type | Field and Description |
---|---|
private boolean |
background
Background flag (signifies if the client is in the foreground session).
|
private boolean |
batch
Batch mode flag.
|
protected P |
direct
Direct to screen output primitives.
|
protected WidgetFactory<O> |
factory
This driver-specific widget factory
|
private boolean |
isChui
UI modality flag:
true for ChUI, false for GUI. |
private java.lang.String |
term
Terminal type name.
|
Constructor and Description |
---|
AbstractDriver(WidgetFactory<O> factory,
P direct,
boolean isChui,
java.lang.String term)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
WidgetFactory<O> |
getFactory()
Get driver-specific widget factory.
|
P |
getPrimitives()
Get driver-specific direct output primitives implementation.
|
java.lang.String |
getWindowSystem()
Get the default WINDOW-SYSTEM used by this driver.
|
boolean |
inBackgroundMode()
Checks if the current driver is running in background mode.
|
boolean |
inBatchMode()
Checks if the current driver is running in batch mode.
|
void |
init()
Initialize driver.
|
boolean |
isChui()
Get screen interface type.
|
protected void |
setBackgroundMode(boolean background)
Assigns the flag determining if the current driver is running in background mode.
|
protected void |
setBatchMode(boolean batch)
Assigns the flag determining if the current driver is running in batch mode.
|
void |
setTerminalType(java.lang.String term)
Change terminal type to specified one.
|
void |
shutdown()
Perform driver shutdown.
|
java.lang.String |
terminalType()
Obtain system/implementation specific terminal type string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beep, captureMouseEvents, clear, clientReady, createOutputManager, getChildProcessFactory, handleMouseEvent, lockMousePointer, openURL, propagate, readKey, resetMode, resume, setCursorStatus, suspend
protected WidgetFactory<O extends OutputManager<P>> factory
protected P extends OutputPrimitives direct
private boolean isChui
true
for ChUI, false
for GUI.private boolean batch
private boolean background
private java.lang.String term
public AbstractDriver(WidgetFactory<O> factory, P direct, boolean isChui, java.lang.String term)
factory
- The widget factory to use for this driver.direct
- The output primitives.isChui
- true
for ChUI, false
for GUI.term
- Terminal type string.public boolean inBatchMode()
inBatchMode
in interface ScreenDriver<O extends OutputManager<P>>
false
.public boolean inBackgroundMode()
inBackgroundMode
in interface ScreenDriver<O extends OutputManager<P>>
false
.public java.lang.String terminalType()
At present this is used to implement 4GL TERMINAL function and do some terminal-specific workarounds. At present workarounds exist for "vt320" terminal type. If implementation requires no special workarounds, then it should avoid returning "vt320" as terminal type string.
terminalType
in interface ScreenDriver<O extends OutputManager<P>>
public void setTerminalType(java.lang.String term)
setTerminalType
in interface ScreenDriver<O extends OutputManager<P>>
term
- The terminal type.public P getPrimitives()
getPrimitives
in interface ScreenDriver<O extends OutputManager<P>>
public WidgetFactory<O> getFactory()
getFactory
in interface ScreenDriver<O extends OutputManager<P>>
public void init()
init
in interface ScreenDriver<O extends OutputManager<P>>
public java.lang.String getWindowSystem()
ClientParameters
for the list
of possible values.getWindowSystem
in interface ScreenDriver<O extends OutputManager<P>>
public boolean isChui()
isChui
in interface ScreenDriver<O extends OutputManager<P>>
true
is ChUI false
is GUIpublic void shutdown()
shutdown
in interface ScreenDriver<O extends OutputManager<P>>
protected void setBatchMode(boolean batch)
batch
- The new state of the batch mode flag.protected void setBackgroundMode(boolean background)
background
- The new state of the background mode flag.