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 |
fullSizeAttributesUpdated
Flag indicating requirement to update FULL-* window attributes.
|
(package private) GuiDriver |
gd
Screen driver
|
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, 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, vislist
location, mousePtr, nativeInsets, physicalLocation
ZSCORE_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 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.
|
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.
|
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)
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.
|
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.
|
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(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.
|
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, 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, window
bounds, clipRectangle, close, defaultFocus, findFrames, findFrames, getFirstVisibleFrame, getNextEnabledFrame, getNextVisibleFrame, getOwner, getOwnerOpt, getPlacementManager, getPrevEnabledFrame, getTopFrame, getTopVisibleFrame, getWindowDefaultIcon, isFocusable, isLastLeaveResult, parentOrSelfHidden, physicalBounds, processFocusEvent, reflectLocationChange, repaint, repaintDecorations, resolveTitleFont, screenLocation, screenPhysicalLocation, setLastLeaveResult, setOwner, setWindowDefaultIcon
drawInt
focusTraversable, getZOrderClass, hasFocus, hasTitle, isDisplayed, isModal, processKeyEvent, title, toString
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, cycleFocus, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getClipRect, getFocusInt, getIgnoreFocus, getLayout, getTabItemList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveToBottomInClass, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, prepareWidgets, prevFocus, reflectAncestorChange, remove, removeContainerStateListener, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, widgets, widgetsAsList, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestorId, autoResize, clear, clearWidget, clipRectangle, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getDefaultEvent, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, hidden, highlighted, ignoreAction, isCurrent, isDirectManipulationCapable, isDirectManipulationRequired, isEnabled, isHeader, isRealized, isRMBEntrySupported, isScreenLocationCached, isTabStop, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resolveFont, resolvePopupMenuId, screen, screenDimension, screenHeight, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, showPopupMenu, sync, topLevelWindow, translate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, getMessageArea, getStatusArea, isShareActivationWithOwner, resolveTitleFont, setLocation, setPhysicalLocation, setSize
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, config, defaultMousePtr, dimension, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, height, hidden, highlighted, insets, isCurrent, isDirectManipulable, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestFocus, requestFocus, requestSync, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setMousePointer, setParent, setState, setVisible, topLevelWindow, unrealize, width, window
public static java.lang.String DEFAULT_TITLE
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
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 GuiWindow
true
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 GuiWindow
public 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 GuiWindow
public Container<GuiOutputManager> getClientContentPane()
getClientContentPane
in interface GuiWindow
public void maximize(boolean postEvent)
public void resizeTo(NativePoint origin, NativeDimension size)
public void resizeTo(NativePoint origin, NativeDimension size, boolean raise)
resizeTo
in interface GuiWindow
resizeTo
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)
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.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 GuiWindow
setWindowIcon
in class TopLevelWindow<GuiOutputManager>
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 GuiWindow
loadWindowIcon
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 GuiWindow
isMaximized
in class TopLevelWindow<GuiOutputManager>
public boolean isMinimized()
isMinimized
in interface GuiWindow
isMinimized
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 GuiWindow
public 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 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 GuiWindow
resizing
flag.public boolean isResizeWorkspace()
isResizeWorkspace
in interface GuiWindow
resizeWorkspace
flag.private void setDefaultColors()
private 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 GuiWindow
CoordinatesConversion
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 GuiWindow
getTitleBar
in class TopLevelWindow<GuiOutputManager>
public Dimension getWorkspaceSize()
getWorkspaceSize
in class TitledWindow<GuiOutputManager>
public NativePoint getWorkspaceScreenLocation()
getWorkspaceScreenLocation
in interface GuiWindow
public NativeDimension getWorkspaceNativeSize()
getWorkspaceNativeSize
in interface GuiWindow
public Dimension getMaxWorkspaceSize()
getMaxWorkspaceSize
in interface GuiWindow
public void setWorkspaceNativeSize(int width, int height)
setWorkspaceNativeSize
in interface GuiWindow
width
- New workspace width.height
- New workspace height.public void setWorkspaceLocation(int x, int y)
setWorkspaceLocation
in interface GuiWindow
x
- The x location.y
- The y location.public NativeDimension getResizedSize()
getResizedSize
in interface GuiWindow
public 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 GuiWindow
public 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 HasDynamicLayout
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
.