public class WindowGuiImpl extends Window<GuiOutputManager> implements GuiWindow, HasDynamicLayout
TopLevelWindow.IconDataType| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_TITLE
The default title for GUI windows.
|
private WindowDynamicLayoutIntegration |
dynamicLayout
Enabler of dynamic layout.
|
private boolean |
firstShown
Flag set when the window gets shown for the first time
|
private boolean |
focusCreatedByKeyboard
Flag that indicates if a focus event was created by keyboard in the window.
|
private java.util.List<Widget<GuiOutputManager>> |
framesToAdd
Frames added before the content pane is initialized
|
private boolean |
fullSizeAttributesUpdated
Flag indicating requirement to update FULL-* window attributes.
|
(package private) GuiDriver |
gd
Screen driver
|
private static CentralLogger |
LOG
Logger
|
private Widget<GuiOutputManager> |
mousePressedSource
The last mouse pressed determined for this window.
|
private int |
resizedHeight
The physical window height, after resize.
|
private int |
resizedWidth
The physical window width, after resize.
|
private boolean |
resizeWorkspace
Flag indicating if the resize is for the workspace or for the full window.
|
private boolean |
resizing
Flag indicating that window resizing is in progress.
|
private Dimension |
restoreDimension
The dimension before the window is maximized or minimized.
|
private NativePoint |
restoreLocation
The location before the window is maximized or minimized.
|
private boolean |
restoreMaximized
Saved window maximize state before the window is minimized.
|
private Widget |
savedFocus
The focused widget when menu is displayed, focus is restored to this widget when menu is dismissed.
|
private WindowTitleBar |
titleBar
The title-bar widget for this window.
|
private byte |
windowState
The effective window state.
|
(package private) WindowWorkSpace |
workspace
The window's workspace, where all frame drawing is done.
|
config, contentPane, helpText, INSERT_MODE_INS, INSERT_MODE_OFF, INSERT_MODE_OVR, INSERT_TEXT, insertInAmbiguousState, insertMode, isRunning, menubar, messageArea, RESERVED_LINES, ST_DEFAULT, ST_HELP, ST_INPUT, statusLine, suspend, suspendLock, vislistlisteners, location, mousePtr, nativeInsets, physicalLocationZSCORE_ALWAYS_ON_TOP, ZSCORE_NORMAL, ZSCORE_TOP_ONLY| Constructor and Description |
|---|
WindowGuiImpl(WidgetId id)
Default constructor.
|
WindowGuiImpl(WidgetId id,
WindowConfig config)
Construct a window widget based on a specific configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFrame(Widget<GuiOutputManager> widget,
double row,
double column)
Adds the frame to the window at the specified position.
|
void |
afterConfigUpdate(WindowConfig beforeUpdate)
The method is called after the configuration associated with the implementor changes.
|
private static void |
chainEvents(java.util.List<TitledWindow<?>> windows,
int sourceId,
int type)
Chain window events of the specified type, using as source the given list of windows.
|
void |
clipWith(Rectangle rect)
Determine the widget's window and add a new clipping rectangle to the bitmap.
|
CoordinatesConversion |
coordinates()
Returns the output window's coordinates conversion service.
|
Widget<GuiOutputManager> |
currentFocus(boolean recurse)
Get widget which is in focus.
|
void |
destroy()
Destroy this window.
|
protected void |
destroyWidgets()
Destroy all the widgets in this window, except frames and menus - these will be unrealized
and detached from the window.
|
void |
detach(Widget<GuiOutputManager> widget)
Detach this widget from the window's workspace.
|
void |
doLayout()
Lay out container.
|
private void |
doResizeTo(NativePoint origin,
NativeDimension size,
boolean raise)
Resize the widget to the specified dimensions.
|
void |
draw()
Draw window
|
Widget<GuiOutputManager> |
findMouseSource(MouseEvt evt)
Find the widget to which the given mouse event can be applied.
|
private void |
fireWindowStateChanged(byte oldState,
byte newState)
Notifies the registered listeners that the window state has changed.
|
Border<GuiOutputManager> |
getBorder()
Returns the window's border implementation.
|
Container<GuiOutputManager> |
getClientContentPane()
Returns the container where useful client content widgets are placed.
|
java.util.Optional<MousePtrWrapper> |
getCustomMousePointer()
Get the current custom mouse pointer if it is set
|
DynamicLayoutIntegration |
getDynamicLayout()
Returns the dynamic layout widget integration implementation.
|
MousePtrWrapper |
getEffectiveMousePointer()
Get the current effective custom mouse pointer
|
Dimension |
getEffectiveScrollableSize()
Calculates the effective size of the scrollable area of the window workspace.
|
boolean |
getFocusCreatedByKeyboard()
Getter for focusCreatedByKeyboard.
|
java.util.List<Frame<GuiOutputManager>> |
getFrames()
Returns the frames contained in this top-level window.
|
MessageAreaGuiImpl |
getGuiMessageArea()
Get the message area widget associated with this window.
|
protected int |
getInsMode()
In GUI, the insert mode is always
Window.INSERT_MODE_INS. |
Dimension |
getMaxWorkspaceSize()
Get the maximum size of the window workspace area.
|
Rectangle |
getMessageLineRectangle(int line)
Get messages area rectangle by message line index.
|
NativeDimension |
getMinSize()
Returns the window minimum size.
|
private int |
getNativeDecorationHeight()
Gets the decoration elements total height.
|
NativePoint |
getPortableMouseEventCoordinates(NativePoint point)
Get a point to represent the LAST-EVENT:X and LAST-EVENT:Y coordinates.
|
NativeDimension |
getResizedSize()
Determine the resized window size.
|
Dimension |
getScreenDimension()
Get dimension of screen area available for the placement of frames.
|
Dimension |
getScrollableSize()
Returns the preferred size of the window workspace.
|
Rectangle |
getStatusLineRectangle()
Get status area rectangle.
|
WindowTitleBar |
getTitleBar()
Get the title bar widget associated witn this window.
|
Widget<GuiOutputManager>[] |
getWidgets()
Get widgets array from first available window.
|
WindowWorkSpace |
getWorkspace()
Get the workspace area widget associated with this window.
|
NativeDimension |
getWorkspaceNativeSize()
Get the actual native size of the window workspace area.
|
NativePoint |
getWorkspaceScreenLocation()
Get the screen location of the window workspace area, in native units.
|
Dimension |
getWorkspaceSize()
Get the size of the window workspace area.
|
int |
getZOrderScore()
The method returns the window's relative z-order.
|
boolean |
hasDecorations()
Determine if this window can have decorations.
|
boolean |
hasTitlebar()
Check if window has title bar.
|
void |
hide()
Hide this window.
|
void |
hideMessage(boolean noPause)
Hides all messages displayed in the message area.
|
void |
iconify(boolean postEvent)
Iconify the window.
|
protected void |
init()
Initialize this window.
|
void |
initialize(WidgetId id,
WindowConfig cfg)
Replacement API for the logic which should exist in the widget's c'tor, but the logic
can't be executed as it depends on the widget being registered into the official registry.
|
boolean |
isDesktopMinimized()
Returns
true when the window is in the state "desktop-minimized", that is
the window is minimized but its SHOW-IN-TASKBAR attribute is set to
false. |
boolean |
isDroppable()
Checks if the given widget is able to be the target of the drop operation.
|
boolean |
isMaximized()
Check if the window is already maximized - it can't be resized.
|
boolean |
isMinimized()
Check if the window is minimized.
|
boolean |
isResizeWorkspace()
Determine if this window workspace needs to be resized.
|
boolean |
isResizing()
Determine if this window is being resized.
|
boolean |
loadWindowIcon(boolean small,
java.lang.String name)
Loads the new application icon for given window from the client side filesystem.
|
void |
maximize(boolean postEvent)
Maximize this window.
|
int |
message(java.lang.String message,
Color cs,
boolean clear,
java.lang.String[] stack)
Renders the specified message into the message line.
|
void |
moveBeforeTabItem(Widget<GuiOutputManager> widget,
Widget<GuiOutputManager> before)
Move specified widget before the widget "before".
|
void |
moveToBottom(Widget<GuiOutputManager> widget)
Move specified widget to the bottom of widget list.
|
void |
moveToTop(Widget<GuiOutputManager> widget)
Move specified widget to the top of widget list.
|
void |
processEvent(Event event)
Process event and dispatch it to specific method.
|
protected void |
reset()
Reset Window instance state.
|
protected void |
resetHelp()
Performs UI specific reset for help status line text.
|
void |
resizeTo(NativePoint origin,
NativeDimension size)
Resize the widget to the specified dimensions.
|
void |
resizeTo(NativePoint origin,
NativeDimension size,
boolean raise)
Resize the widget to the specified dimensions.
|
(package private) int |
resolveMessageAreaFont()
Resolve the font associated with the message-area.
|
(package private) int |
resolveStatusAreaFont()
Resolve the font associated with the status-area.
|
void |
restore(boolean postEvent)
Restore the window by raising the
WINDOW-RESTORE event. |
private void |
restoreFocusOnMenuClose()
Restores focus on menu close previously saved in
savedFocus. |
private void |
restoreWindowState()
Restores the window maximized state, location and dimension after the window is restored
from maximized or minimized window states.
|
private void |
saveWindowState()
Saves the window maximized state, location and dimension before the window is maximized or
minimized.
|
private void |
setDefaultColors()
Set default window BGCOLOR and FGCOLOR.
|
void |
setFocusCreatedByKeyboard(boolean focusCreatedByKeyboard)
Setter for focusCreatedByKeyboard.
|
protected void |
setInsMode(int insMode,
boolean force)
The private function to set up the global insert mode value.
|
void |
setMessageText(java.lang.String[] message,
Color[] cs)
Shows the new message text.
|
void |
setMessageText(java.lang.String[] msg,
Color[] cs,
boolean force)
Set message main worker routine.
|
protected void |
setStatusLineText(java.lang.String status,
boolean noLengthLimit)
Set the contents of the status line.
|
void |
setTitle(java.lang.String title)
Set window title.
|
boolean |
setWindowIcon(boolean small,
byte[] newIcon)
Sets the new application icon for given window on the client side.
|
boolean |
setWindowIcon(byte[] newIcon)
Sets the new application icon for given window on the client side.
|
void |
setWorkspaceLocation(int x,
int y)
Sets the window workspace location.
|
void |
setWorkspaceNativeSize(int width,
int height)
Sets the native size of the window workspace area.
|
void |
show()
Show widget.
|
void |
status(java.lang.String message,
boolean noLengthLimit)
Renders the specified message into the status line.
|
boolean |
supportsCustomMousePointer()
Check if the widget supports LOAD-MOUSE-POINTER() method
|
private void |
truncateWindowHeightQuirk()
The method implements a quirk of WINDOW widget height truncation.
|
private void |
updateFullSizeAttributes()
|
protected void |
updateSizeWorker(WidgetConfig beforeUpdate)
Instructs the widget that its size may have changed.
|
protected void |
updateSystemParent(BaseConfig bcBefore)
Updates system parent with new ID came from server.
|
private void |
updateTitleBar()
Updates the title bar, buttons system menu and icon based on the current window state.
|
ancestor, clearPutScreenInMessageArea, clearScreenDirectly, config, disableSpecial, displayMessage, drawStatusLine, enableSpecial, getContentPane, getDefaultMessage, getHelpText, getInputMessage, getInsertMode, getMenubar, getMessageArea, getMessageColor, getMessageText, getRelativeTo, getStatusArea, getStatusText, getStatusType, getTinyInputLine, hideAllFrames, isInsertInAmbiguousState, isMessageNeedPause, isMessageNull, isRepaintDisabled, isRunning, isThreeD, isTinyInputActive, message, message, message, popStatus, processStatusMessage, pushConfig, pushStatus, resume, setAutoCleared, setClearMessage, setHelp, setInsertInAmbiguousState, setInsertMode, setInsertMode, setMessageNeedPause, setPutScreenPerformed, setStatusType, setVisibility, status, statusDefault, statusInput, suspend, tinyInput, windowbounds, clipRectangle, close, defaultFocus, findFrames, findFrames, getFirstVisibleFrame, getNextEnabledFrame, getNextVisibleFrame, getOwner, getOwnerOpt, getPlacementManager, getPrevEnabledFrame, getTopFrame, getTopVisibleFrame, getWindowDefaultIcon, isFocusable, isLastLeaveResult, parentOrSelfHidden, physicalBounds, processFocusEvent, reflectLocationChanged, repaint, repaintDecorations, resetMousePointer, resolveTitleFont, screenLocation, screenPhysicalLocation, setLastLeaveResult, setOwner, setWindowDefaultIcondrawIntfocusTraversable, getZOrderClass, hasFocus, hasTitle, isDisplayed, isModal, processKeyEvent, title, toStringadd, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, cycleFocus, deregisterSelectedWidget, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getFocusInt, getIgnoreFocus, getLayout, getTabItemList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveToBottomInClass, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, reflectAncestorChange, registerSelectedWidget, remove, removeContainerStateListener, replace, requestFocus, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setPhysicalDimensionInt, setSize, setSize, setTabItemList, setWidth, startSizeChange, swap, triggerContainerStateRedrawEnabled, unrealize, widgets, widgetsAsList, widgetStateChanged, width_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestorId, autoResize, clear, clearWidget, clipRectangle, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getDefaultEvent, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, hasFocus, hasTooltip, hidden, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isEnabled, isHeader, isMouseDrag, isRealized, isRMBEntrySupported, isScreenLocationCached, isTabStop, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, requestSync, resetBitmap, resolveFont, resolvePopupMenuId, screen, screenDimension, screenHeight, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, showPopupMenu, sync, topLevelWindow, translate, triggerLocationChanged, unregisterWidgetListener, widgetRealizedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getMessageArea, getStatusArea, isShareActivationWithOwner, resolveTitleFont, setLocation, setPhysicalLocation, setSizeacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, config, defaultMousePtr, dimension, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, height, hidden, highlighted, ignoreEnable, initialHeight, initialWidth, insets, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, minimumSize, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestSync, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setMousePointer, setMousePointer, setParent, setSensitiveForUIB, setState, setVisible, setWindow, startTrigger, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetListener, validateDisplayValue, widgetStateChanged, width, windowmouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleasedwidgetsAsListprivate static final CentralLogger LOG
public static java.lang.String DEFAULT_TITLE
private boolean focusCreatedByKeyboard
private WindowTitleBar titleBar
WindowWorkSpace workspace
GuiDriver gd
private boolean resizing
private boolean resizeWorkspace
private int resizedWidth
private int resizedHeight
private Widget<GuiOutputManager> mousePressedSource
private NativePoint restoreLocation
private Dimension restoreDimension
private boolean restoreMaximized
private byte windowState
private boolean firstShown
private boolean fullSizeAttributesUpdated
private Widget savedFocus
private WindowDynamicLayoutIntegration dynamicLayout
private java.util.List<Widget<GuiOutputManager>> framesToAdd
public WindowGuiImpl(WidgetId id)
id - The widget's ID.public WindowGuiImpl(WidgetId id, WindowConfig config)
id - The widget's ID.config - Window configuration.public boolean hasDecorations()
hasDecorations in interface GuiWindowtrue if this window supports decorations with the current driver.GuiDriver.isWindowDecorationSupported()public void initialize(WidgetId id, WindowConfig cfg)
This API is called after the widget is created and added to the registry.
initialize in interface WidgetWithConfig<WindowConfig>initialize in class Window<GuiOutputManager>id - The widget's ID.cfg - The config used to initialize this widget.public void hide()
hide in interface Widget<GuiOutputManager>hide in class TitledWindow<GuiOutputManager>public void show()
show in interface Widget<GuiOutputManager>show in class TitledWindow<GuiOutputManager>public Widget<GuiOutputManager>[] getWidgets()
getWidgets in class Window<GuiOutputManager>public void detach(Widget<GuiOutputManager> widget)
detach in interface Container<GuiOutputManager>detach in class AbstractContainer<GuiOutputManager>widget - Widget to detach.java.lang.RuntimeException - when the supplied widget is not attached to this containerpublic void moveToTop(Widget<GuiOutputManager> widget)
moveToTop in interface Container<GuiOutputManager>moveToTop in class AbstractContainer<GuiOutputManager>widget - Widget to mover.public void moveToBottom(Widget<GuiOutputManager> widget)
moveToBottom in interface Container<GuiOutputManager>moveToBottom in class AbstractContainer<GuiOutputManager>widget - Widget to mover.public void moveBeforeTabItem(Widget<GuiOutputManager> widget, Widget<GuiOutputManager> before)
moveBeforeTabItem in interface Container<GuiOutputManager>moveBeforeTabItem in class AbstractContainer<GuiOutputManager>widget - Widget to move.before - The widget before to insert mover.public void doLayout()
doLayout in interface Container<GuiOutputManager>doLayout in class AbstractContainer<GuiOutputManager>public void draw()
draw in interface Widget<GuiOutputManager>draw in class Window<GuiOutputManager>public Dimension getScreenDimension()
getScreenDimension in class TopLevelWindow<GuiOutputManager>Dimension which describes size of the
available screen area.public MessageAreaGuiImpl getGuiMessageArea()
getGuiMessageArea in interface GuiWindowpublic WindowWorkSpace getWorkspace()
public Rectangle getMessageLineRectangle(int line)
getMessageLineRectangle in class Window<GuiOutputManager>line - message line specification: either 0-based line number for
specific line or -1 for the whole message area.Rectangle which describes the message
area in screen coordinates.public Rectangle getStatusLineRectangle()
getStatusLineRectangle in class Window<GuiOutputManager>Rectangle which describes the status
area in screen coordinates.public Dimension getScrollableSize()
getScrollableSize in class AbstractContainer<GuiOutputManager>public Dimension getEffectiveScrollableSize()
This implementation accounts all the visible child widgets into the area and simply determines the furthest x and y from the origin of the window workspace.
getEffectiveScrollableSize in class AbstractContainer<GuiOutputManager>public void addFrame(Widget<GuiOutputManager> widget, double row, double column)
addFrame in class Window<GuiOutputManager>widget - The handle of the frame to be added to the window.row - The row number for the upper-left frame corner.column - The column number for the upper-left frame corner.public java.util.List<Frame<GuiOutputManager>> getFrames()
getFrames in class TopLevelWindow<GuiOutputManager>public Widget<GuiOutputManager> findMouseSource(MouseEvt evt)
findMouseSource in class TitledWindow<GuiOutputManager>evt - The mouse event.null if none found.public void iconify(boolean postEvent)
public void restore(boolean postEvent)
WINDOW-RESTORE event.public int getZOrderScore()
getZOrderScore in interface GuiWindowpublic Container<GuiOutputManager> getClientContentPane()
getClientContentPane in interface GuiWindowpublic void maximize(boolean postEvent)
public void resizeTo(NativePoint origin, NativeDimension size)
public void resizeTo(NativePoint origin, NativeDimension size, boolean raise)
resizeTo in interface GuiWindowresizeTo in interface Widget<GuiOutputManager>resizeTo in class AbstractWidget<GuiOutputManager>origin - The top-left window corner new position.size - The new window size.raise - Flag indicating if the 4GL WINDOW-RESIZED event needs to be raised.public void status(java.lang.String message,
boolean noLengthLimit)
noLengthLimit flag is not set.
The method is a no-op when the status area is not displayed for this window.
status in class Window<GuiOutputManager>message - The message body to be rendered.noLengthLimit - flag indicating the status message should not be trimmedpublic void hideMessage(boolean noPause)
This method corresponds to the Progress statement
HIDE MESSAGE [NO_PAUSE]
hideMessage in class Window<GuiOutputManager>noPause - true if no pause is required before hiding
messagespublic void setMessageText(java.lang.String[] message,
Color[] cs)
Colors are ignored in Windows (GUI)
This is a no-op when this window doesn't have the message area displayed.
setMessageText in class Window<GuiOutputManager>message - Array of two text message which need to be displayed inside the
message area.cs - Array of two color specifications.public void setMessageText(java.lang.String[] msg,
Color[] cs,
boolean force)
Colors are ignored in Windows (GUI).
This is a no-op when this window doesn't have the message area displayed.
setMessageText in class Window<GuiOutputManager>msg - Message text array.cs - Message color array.force - true means force redisplaying of messages even
if message text is already null.public int message(java.lang.String message,
Color cs,
boolean clear,
java.lang.String[] stack)
message in class Window<GuiOutputManager>message - The message body to be rendered.cs - color specification.clear - If true then the line(s) on which the message will
be displayed, will be cleared first.stack - Progress stack trace. This can be null.public void destroy()
destroy in interface Widget<GuiOutputManager>destroy in class TitledWindow<GuiOutputManager>public void processEvent(Event event)
processEvent in interface Widget<GuiOutputManager>processEvent in class TitledWindow<GuiOutputManager>event - Event to process.java.lang.IllegalStateException - If window MENUBAR contains wrong widget.public boolean setWindowIcon(byte[] newIcon)
setWindowIcon in interface GuiWindowsetWindowIcon in class TopLevelWindow<GuiOutputManager>newIcon - A new icon image array data.TRUE if operation successful FALSE otherwise.public boolean setWindowIcon(boolean small,
byte[] newIcon)
setWindowIcon in class TopLevelWindow<GuiOutputManager>small - Flag indicating usage of the small icon case(16x16 in size).newIcon - A new icon image array data.TRUE if operation successful FALSE otherwise.public boolean loadWindowIcon(boolean small,
java.lang.String name)
loadWindowIcon in interface GuiWindowloadWindowIcon in class TopLevelWindow<GuiOutputManager>small - Flag indicating usage of the small icon case(16x16 in size).name - The fully qualified file name for the icon to be loaded.TRUE if operation successful FALSE otherwise.public void afterConfigUpdate(WindowConfig beforeUpdate)
afterConfigUpdate in interface ConfigOwner<WindowConfig>afterConfigUpdate in class Window<GuiOutputManager>beforeUpdate - Config reference capturing the config state before the owner's config was modified.public boolean isMaximized()
isMaximized in interface GuiWindowisMaximized in class TopLevelWindow<GuiOutputManager>public boolean isMinimized()
isMinimized in interface GuiWindowisMinimized in class TopLevelWindow<GuiOutputManager>true, false otherwise.public boolean supportsCustomMousePointer()
supportsCustomMousePointer in interface Widget<GuiOutputManager>supportsCustomMousePointer in class AbstractWidget<GuiOutputManager>true if the widget supports
LOAD-MOUSE-POINTER() methodpublic java.util.Optional<MousePtrWrapper> getCustomMousePointer()
getCustomMousePointer in interface Widget<GuiOutputManager>getCustomMousePointer in class AbstractWidget<GuiOutputManager>public MousePtrWrapper getEffectiveMousePointer()
getEffectiveMousePointer in interface Widget<GuiOutputManager>getEffectiveMousePointer in class AbstractWidget<GuiOutputManager>public NativeDimension getMinSize()
getMinSize in interface GuiWindowpublic Widget<GuiOutputManager> currentFocus(boolean recurse)
The method allows to choose whether the focused widget is searched in the nested
containers (recurse == true) or whether only this container is searched
(recurse == false).
currentFocus in interface Container<GuiOutputManager>currentFocus in class AbstractContainer<GuiOutputManager>recurse - The parameter controls whether the method should recurse to the nested
containers when searching for the focused widget.protected void updateSystemParent(BaseConfig bcBefore)
updateSystemParent in class AbstractWidget<GuiOutputManager>bcBefore - Config reference capturing the config state before the owner's config was modified.protected int getInsMode()
Window.INSERT_MODE_INS.getInsMode in class Window<GuiOutputManager>Window.INSERT_MODE_INS.protected void setStatusLineText(java.lang.String status,
boolean noLengthLimit)
noLengthLimit flag is not set.
This method is a no-op when status area is not displayed for this window.
setStatusLineText in class Window<GuiOutputManager>status - The new string to be displayed inside the status line area.noLengthLimit - flag indicating the status message should not be trimmedprotected void reset()
reset in class Window<GuiOutputManager>protected void init()
init in class Window<GuiOutputManager>protected void setInsMode(int insMode,
boolean force)
On GUI no INSERT indicator is used to display insert status.
setInsMode in class Window<GuiOutputManager>insMode - New integer value for insert mode, but is ignored.force - Whether we have to repaint the indicator even if the new mode
is the same as the old one.protected void updateSizeWorker(WidgetConfig beforeUpdate)
This implementation ignores the supplied config instance. Instead it relies
on AbstractContainer.size and Window.config() to detect whether size has changed.
updateSizeWorker in class AbstractContainer<GuiOutputManager>beforeUpdate - BaseConfig reference or null.private void truncateWindowHeightQuirk()
int resolveStatusAreaFont()
int resolveMessageAreaFont()
public boolean isResizing()
isResizing in interface GuiWindowresizing flag.public boolean isResizeWorkspace()
isResizeWorkspace in interface GuiWindowresizeWorkspace flag.private void setDefaultColors()
private static void chainEvents(java.util.List<TitledWindow<?>> windows, int sourceId, int type)
An OS event will be posted only for the first window in the list. For the others, they
will be chained via the WindowEvent.getNextEvent().
windows - The list of windows.sourceId - The root ID of the sub-tree which was iconified, and triggered iconification of
this window.type - The type of the window event to be posted.public CoordinatesConversion coordinates()
coordinates in interface GuiWindowCoordinatesConversion instance.public void setTitle(java.lang.String title)
setTitle in class TitledWindow<GuiOutputManager>title - Title to set.public boolean hasTitlebar()
hasTitlebar in class TitledWindow<GuiOutputManager>true if window has title to repaint.public WindowTitleBar getTitleBar()
getTitleBar in interface GuiWindowgetTitleBar in class TopLevelWindow<GuiOutputManager>public Dimension getWorkspaceSize()
getWorkspaceSize in class TitledWindow<GuiOutputManager>public NativePoint getWorkspaceScreenLocation()
getWorkspaceScreenLocation in interface GuiWindowpublic NativeDimension getWorkspaceNativeSize()
getWorkspaceNativeSize in interface GuiWindowpublic Dimension getMaxWorkspaceSize()
getMaxWorkspaceSize in interface GuiWindowpublic void setWorkspaceNativeSize(int width,
int height)
setWorkspaceNativeSize in interface GuiWindowwidth - New workspace width.height - New workspace height.public void setWorkspaceLocation(int x,
int y)
setWorkspaceLocation in interface GuiWindowx - The x location.y - The y location.public NativeDimension getResizedSize()
getResizedSize in interface GuiWindowpublic NativePoint getPortableMouseEventCoordinates(NativePoint point)
null is returned.getPortableMouseEventCoordinates in class AbstractWidget<GuiOutputManager>point - The point (relative to the window's top-left corner) for which the coordinates for
the portable mouse events are needed.null if such an event can't be raised.public Border<GuiOutputManager> getBorder()
null
is returned, the window has no border.public boolean isDesktopMinimized()
true when the window is in the state "desktop-minimized", that is
the window is minimized but its SHOW-IN-TASKBAR attribute is set to
false.isDesktopMinimized in interface GuiWindowpublic void clipWith(Rectangle rect)
This implementation reads WindowConfig#disableRedraw and if the flag is true
subtracts the window's workspace bounds from the input rectangle. This is to support
the WINDOW:DISABLE-REDRAW attribute. Otherwise the method calls the super implementation.
clipWith in class AbstractWidget<GuiOutputManager>rect - The clipping rectangle to be added.OutputManager.clipWith(int, Rectangle)public boolean isDroppable()
isDroppable in interface Widget<GuiOutputManager>TRUE if this widget can be droppable at this time,
FALSE otherwise.public DynamicLayoutIntegration getDynamicLayout()
getDynamicLayout in interface HasDynamicLayoutpublic boolean getFocusCreatedByKeyboard()
getFocusCreatedByKeyboard in interface GuiWindowpublic void setFocusCreatedByKeyboard(boolean focusCreatedByKeyboard)
setFocusCreatedByKeyboard in interface GuiWindowfocusCreatedByKeyboard - The new value of focusCreatedByKeyboard.protected void resetHelp()
resetHelp in class Window<GuiOutputManager>protected void destroyWidgets()
destroyWidgets in class TitledWindow<GuiOutputManager>private void updateFullSizeAttributes()
WindowConfig.fullWidthChars, WindowConfig.fullHeightChars,
WindowConfig.fullWidthPixels and WindowConfig.fullHeightPixels.
This method should be called every time the window
layout is recalculated.
In GUI the window's FULL* attributes are initialized to the current display work area contrary to 4GL documentation. It says (for FULL-HEIGHT-CHARS): "The maximum internal height of a window is the height of the screen display minus the vertical spacing required to display the border, title bar, menu bar, message area, and status area of the window."
private void updateTitleBar()
private void saveWindowState()
private void restoreWindowState()
private void doResizeTo(NativePoint origin, NativeDimension size, boolean raise)
origin - The top-left window corner new position.size - The new window size.raise - Flag indicating if the 4GL WINDOW-RESIZED event needs to be raised.private int getNativeDecorationHeight()
private void restoreFocusOnMenuClose()
savedFocus.private void fireWindowStateChanged(byte oldState,
byte newState)
oldState - The previous state of the window.newState - The new state of the window.