public class GuiOutputManager extends OutputManager<GuiPrimitives>
Modifier and Type | Field and Description |
---|---|
private BootstrapConfig |
cfg
The initial configuration of this manager.
|
private WidgetRegistry<GuiOutputManager> |
registry
Widget registry.
|
CHUI_DRIVER_BATCH, CHUI_DRIVER_CONSOLE, CHUI_DRIVER_SWING, CHUI_DRIVER_WEB, debug, defaultOutput, defaultTerminal, drawing, driver, GUI_DRIVER_SWING, GUI_DRIVER_WEB, invalidate, output
Constructor and Description |
---|
GuiOutputManager(GuiDriver driver,
BootstrapConfig cfg)
Create a new output manager instance, with the specified driver.
|
Modifier and Type | Method and Description |
---|---|
void |
activateWindow(TopLevelWindow<?> window)
Process the default window, depending on the output manager type.
|
void |
clear(Widget<?> widget)
Clear area occupied by specified widget.
|
GuiWidgetFactory |
getFactory()
Access driver-specific widget factory.
|
WidgetRegistry<GuiOutputManager> |
getRegistry()
Get the widget registry for this output manager.
|
static GuiOutputManager |
instance()
Get the context-specific instance, if it exists.
|
protected TitledWindow<?> |
overrideWindow(TopLevelWindow<?> window)
Check if the window being drawn needs to be overridden.
|
protected boolean |
raiseStopCondition(int key)
Check if the given key can raise the STOP condition.
|
void |
realizeChildWindow(int ownerId,
int windowId,
java.lang.String windowTitle,
boolean resizable,
boolean isShareActivationWithOwner)
Realize new child window.
|
void |
realizeChildWindow(int ownerId,
int windowId,
java.lang.String windowTitle,
boolean resizable,
boolean isShareActivationWithOwner,
boolean modal)
Realize new child window.
|
void |
realizeWindow(int windowId)
Realize new window, depending on the output manager type.
|
void |
releaseWindow()
On a device which allows multiple windows to be created, this allows releasing the window to
allow drawing from other threads.
|
void |
selectWindow(int windowId)
On a device which allows multiple windows to be created, this allows selecting an explicit
window before using the primitives or before drawing a widget.
|
void |
setDrawingArea(Rectangle bounds)
Limit the available drawing area to the specified boundaries.
|
void |
setStatusText(java.lang.String message)
Set status text message.
|
void |
setStatusText(Window<?> window,
java.lang.String message)
Set status text message of specified window.
|
activateBatch, beep, clear, clear, clipWith, coordinates, drawNeeded, fixCoordinates, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getClippings, getClippings, getDriver, getInstanceDriver, getInteractiveOutput, getInvalidChars, inBatchMode, init, init, initErrorWriter, initErrorWriter, isBatchInBackground, isBatchModeOverride, isChui, isInvalidate, isRedirected, markArea, newInstance, readKey, refresh, resetBitmap, resetInvalidate, resetMode, resolveWidget, restoreInvalidate, resume, saveInvalidate, screenBitmap, screenDimension, screenHeight, screenWidth, setBitmap, setCursorStatus, setInvalidate, setInvalidate, setInvalidate, setTerminalType, startScreenSearch, suspend, switchOutput, sync, terminalType
private WidgetRegistry<GuiOutputManager> registry
private final BootstrapConfig cfg
public GuiOutputManager(GuiDriver driver, BootstrapConfig cfg)
driver
- Implements low level input/output primitives. Must NOT be null
.cfg
- The initial configuration.public static GuiOutputManager instance()
null
if none exists.public void activateWindow(TopLevelWindow<?> window)
activateWindow
in class OutputManager<GuiPrimitives>
window
- A window.public void realizeWindow(int windowId)
realizeWindow
in class OutputManager<GuiPrimitives>
windowId
- A window ID to be realized.public void realizeChildWindow(int ownerId, int windowId, java.lang.String windowTitle, boolean resizable, boolean isShareActivationWithOwner)
ownerId
- The owning window ID.windowId
- A window ID to be realized.windowTitle
- Title of the realized window.resizable
- true
if the window is resizable.isShareActivationWithOwner
- Indicates whether the window shares activation state with its owner.public void realizeChildWindow(int ownerId, int windowId, java.lang.String windowTitle, boolean resizable, boolean isShareActivationWithOwner, boolean modal)
ownerId
- The owning window ID.windowId
- A window ID to be realized.windowTitle
- Title of the realized window.resizable
- true
if the window is resizable.isShareActivationWithOwner
- Indicates whether the window shares activation state with its owner.modal
- true
if this is a modal window.public void setDrawingArea(Rectangle bounds)
setDrawingArea
in class OutputManager<GuiPrimitives>
bounds
- The bounds for the drawing area.public void clear(Widget<?> widget)
clear
in class OutputManager<GuiPrimitives>
widget
- Reference widget.public GuiWidgetFactory getFactory()
getFactory
in class OutputManager<GuiPrimitives>
public WidgetRegistry<GuiOutputManager> getRegistry()
getRegistry
in class OutputManager<GuiPrimitives>
public void setStatusText(java.lang.String message)
message
- Text message.public void setStatusText(Window<?> window, java.lang.String message)
message
- Text message.window
- Window instance.protected boolean raiseStopCondition(int key)
raiseStopCondition
in class OutputManager<GuiPrimitives>
key
- The key code to be checked.true
if the key is the Key.VK_CTRL_BREAK
key.protected TitledWindow<?> overrideWindow(TopLevelWindow<?> window)
In GUI, the window
parameter is returned.
overrideWindow
in class OutputManager<GuiPrimitives>
window
- The currently active window.public void selectWindow(int windowId)
selectWindow
in class OutputManager<GuiPrimitives>
windowId
- Window ID.public void releaseWindow()
releaseWindow
in class OutputManager<GuiPrimitives>