public class ModalWindow extends TopLevelWindow<GuiOutputManager> implements GuiWindow, IsModal
TopLevelWindow.IconDataType| Modifier and Type | Field and Description |
|---|---|
protected BorderedPanelGuiImpl |
contentPane
Inner content pane.
|
protected boolean |
destroyInProgress
Destroy flag.
|
private boolean |
focusCreatedByKeyboard
Flag that indicates if a focus event was created by keyboard in the window.
|
protected GuiDriver<?,?> |
gd
Cached GUI driver reference.
|
private WidgetId |
id
Window id.
|
private Widget<GuiOutputManager> |
mousePressedSource
The last mouse pressed determined for this window.
|
private boolean |
realized
Cached realized flag.
|
private WindowTitleBar |
titleBar
The title-bar widget for this window.
|
protected BorderedPanelGuiImpl |
windowPane
Window outer frame.
|
listeners, location, mousePtr, nativeInsets, physicalLocationZSCORE_ALWAYS_ON_TOP, ZSCORE_NORMAL, ZSCORE_TOP_ONLY| Constructor and Description |
|---|
ModalWindow(java.lang.String title)
Default constructor.
|
ModalWindow(java.lang.String title,
TopLevelWindow<GuiOutputManager> owner)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CoordinatesConversion |
coordinates()
Returns the output window's coordinates conversion service.
|
void |
destroy()
Destroy this window.
|
void |
doLayout()
Lay out container.
|
void |
draw()
Draw widget.
|
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.
|
protected GuiColorResolver |
getColorResolver()
Get the color resolver.
|
Container<GuiOutputManager> |
getContentPane()
Get window content pane.
|
boolean |
getFocusCreatedByKeyboard()
Getter for the focusCreatedByKeyboard.
|
MessageAreaGuiImpl |
getGuiMessageArea()
Get the message area widget associated with this window.
|
WidgetId |
getId()
Widget ID.
|
Dimension |
getMaxWorkspaceSize()
Get the maximum size of the window workspace area.
|
MessageArea<GuiOutputManager> |
getMessageArea()
Get the message area widget associated with this window.
|
NativeDimension |
getMinSize()
Returns the window minimum size.
|
NativePoint |
getPortableMouseEventCoordinates(NativePoint point)
Get a point to represent the LAST-EVENT:X and LAST-EVENT:Y coordinates.
|
WidgetLocationRef |
getRelativeTo()
Returns the widget location relativity.
|
NativeDimension |
getResizedSize()
Determine the resized window size.
|
Dimension |
getScreenDimension()
Get dimension of screen area available for the placement of frames.
|
StatusLine<GuiOutputManager> |
getStatusArea()
Get the status area widget associated with this window.
|
WindowTitleBar |
getTitleBar()
Get the title bar widget associated witn this window.
|
NativeDimension |
getWorkspaceNativeSize()
Get the 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 window.
|
boolean |
isModal()
The method returns
true if this represents a modal window. |
boolean |
isRealized()
Returns true when the modal window has been realized.
|
boolean |
isResizeWorkspace()
Determine if this window workspace needs to be resized.
|
boolean |
isResizing()
Determine if this window is being resized.
|
void |
processEvent(Event event)
Process event and dispatch it to specific method.
|
void |
realize()
The method realizes this modal window.
|
void |
resizeTo(NativePoint origin,
NativeDimension size)
Resize the widget to the specified dimensions.
|
static TopLevelWindow<GuiOutputManager> |
resolveOwner()
Returns the expected owner of a modal window.
|
void |
setColorResolver(GuiColorResolver resolver)
Sets color resolved for the modal window.
|
void |
setFocusCreatedByKeyboard(boolean focusCreatedByKeyboard)
Setter for focusCreatedByKeyboard.
|
void |
setSize(double width,
double height)
Set container size.
|
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 window.
|
addFrame, ancestor, bounds, clipRectangle, close, defaultFocus, findFrames, findFrames, getFirstVisibleFrame, getFrames, getNextEnabledFrame, getNextVisibleFrame, getOwner, getOwnerOpt, getPlacementManager, getPrevEnabledFrame, getTopFrame, getTopVisibleFrame, getWindowDefaultIcon, isFocusable, isLastLeaveResult, isMaximized, isMinimized, loadWindowIcon, parentOrSelfHidden, physicalBounds, processFocusEvent, reflectLocationChanged, repaint, repaintDecorations, resetMousePointer, resolveTitleFont, screenLocation, screenPhysicalLocation, setLastLeaveResult, setOwner, setWindowDefaultIcon, setWindowIcon, setWindowIcon, windowdrawIntdestroyWidgets, focusTraversable, getZOrderClass, hasFocus, hasTitle, isDisplayed, processKeyEvent, setTitle, title, toStringadd, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, deregisterSelectedWidget, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, 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, setTabItemList, setWidth, startSizeChange, swap, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, widgetStateChanged, width_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestorId, autoResize, clear, clearWidget, clipRectangle, clipWith, config, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, 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, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, 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, resizeTo, resolveFont, resolvePopupMenuId, screen, screenDimension, screenHeight, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, translate, triggerLocationChanged, unregisterWidgetListener, updateSystemParent, widgetRealizedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, iconify, isDesktopMinimized, isMaximized, isMinimized, isShareActivationWithOwner, loadWindowIcon, maximize, resizeTo, resolveTitleFont, restore, setLocation, setPhysicalLocation, setWindowIconacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, config, defaultMousePtr, dimension, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, 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, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, 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, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetListener, validateDisplayValue, widgetStateChanged, width, windowmouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleaseddismiss, isDismissedwidgetsAsListprivate WidgetId id
protected BorderedPanelGuiImpl windowPane
protected BorderedPanelGuiImpl contentPane
private WindowTitleBar titleBar
private boolean focusCreatedByKeyboard
protected GuiDriver<?,?> gd
private Widget<GuiOutputManager> mousePressedSource
protected boolean destroyInProgress
private boolean realized
public ModalWindow(java.lang.String title)
title - Window title.public ModalWindow(java.lang.String title,
TopLevelWindow<GuiOutputManager> owner)
title - Window title.owner - The owner window.java.lang.IllegalArgumentException - when owner is null.public static TopLevelWindow<GuiOutputManager> resolveOwner()
TopLevelWindow instance.public void processEvent(Event event)
processEvent in interface Widget<GuiOutputManager>processEvent in class TitledWindow<GuiOutputManager>event - Event to process.public boolean hasDecorations()
hasDecorations in interface GuiWindowtrue - all modal windows have decorations, regardless if
embedded mode or not.public void doLayout()
doLayout in interface Container<GuiOutputManager>doLayout in class AbstractContainer<GuiOutputManager>public WidgetId getId()
getId in interface Widget<GuiOutputManager>getId in class AbstractWidget<GuiOutputManager>public Container<GuiOutputManager> getContentPane()
getContentPane in class TopLevelWindow<GuiOutputManager>public boolean isModal()
true if this represents a modal window.
That is a window that sits on top of other windows and takes exclusive user
input.
This implementation always returns true.
isModal in class TitledWindow<GuiOutputManager>public void draw()
draw in interface Widget<GuiOutputManager>draw in class OuterFrame<GuiOutputManager>public boolean isRealized()
isRealized in interface Widget<GuiOutputManager>isRealized in class AbstractWidget<GuiOutputManager>public WidgetLocationRef getRelativeTo()
getRelativeTo in class TopLevelWindow<GuiOutputManager>public void realize()
public void show()
show in interface Widget<GuiOutputManager>show in class TitledWindow<GuiOutputManager>public void hide()
hide in interface Widget<GuiOutputManager>hide in class TitledWindow<GuiOutputManager>public MessageAreaGuiImpl getGuiMessageArea()
getGuiMessageArea in interface GuiWindowpublic void resizeTo(NativePoint origin, NativeDimension size)
public CoordinatesConversion coordinates()
coordinates in interface GuiWindowCoordinatesConversion instance.public void setSize(double width,
double height)
setSize in interface GuiWindowsetSize in interface Container<GuiOutputManager>setSize in class AbstractContainer<GuiOutputManager>width - New width.height - New height.public boolean isResizing()
isResizing in interface GuiWindowfalse.public boolean isResizeWorkspace()
isResizeWorkspace in interface GuiWindowfalse.public NativeDimension getResizedSize()
getResizedSize in interface GuiWindowpublic 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 MessageArea<GuiOutputManager> getMessageArea()
getMessageArea in interface GuiWindownull, as modal windows don't have a message area.public StatusLine<GuiOutputManager> getStatusArea()
getStatusArea in interface GuiWindowpublic Dimension getWorkspaceSize()
getWorkspaceSize in class TitledWindow<GuiOutputManager>public NativePoint getWorkspaceScreenLocation()
getWorkspaceScreenLocation in interface GuiWindowpublic NativeDimension getWorkspaceNativeSize()
getWorkspaceNativeSize 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 Dimension getScreenDimension()
getScreenDimension in class TopLevelWindow<GuiOutputManager>Dimension which describes size of the
available screen area.public Widget<GuiOutputManager> findMouseSource(MouseEvt evt)
findMouseSource in class TitledWindow<GuiOutputManager>evt - The mouse event.null if none found.public NativePoint getPortableMouseEventCoordinates(NativePoint point)
null.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.public void destroy()
destroy in interface Widget<GuiOutputManager>destroy in class TitledWindow<GuiOutputManager>public Dimension getMaxWorkspaceSize()
getMaxWorkspaceSize in interface GuiWindowpublic NativeDimension getMinSize()
getMinSize in interface GuiWindowpublic Border<GuiOutputManager> getBorder()
null
is returned, the window has no border.public int getZOrderScore()
getZOrderScore in interface GuiWindowpublic void setColorResolver(GuiColorResolver resolver)
resolver - The resolves, may be null.public Container<GuiOutputManager> getClientContentPane()
getClientContentPane in interface GuiWindowpublic boolean getFocusCreatedByKeyboard()
getFocusCreatedByKeyboard in interface GuiWindowpublic void setFocusCreatedByKeyboard(boolean focusCreatedByKeyboard)
setFocusCreatedByKeyboard in interface GuiWindowfocusCreatedByKeyboard - The new value of focusCreatedByKeyboard.protected GuiColorResolver getColorResolver()
null by default.