public class ModalWindow extends TopLevelWindow<GuiOutputManager> implements GuiWindow, IsModal
TopLevelWindow.IconDataType
Modifier and Type | Field and Description |
---|---|
protected BorderedPanelGuiImpl |
contentPane
Inner content pane.
|
private boolean |
destroyInProgress
Destroy flag.
|
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.
|
location, mousePtr, nativeInsets, physicalLocation
ZSCORE_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.
|
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.
|
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 |
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, reflectLocationChange, repaint, repaintDecorations, resolveTitleFont, screenLocation, screenPhysicalLocation, setLastLeaveResult, setOwner, setWindowDefaultIcon, setWindowIcon, window
drawInt
destroyWidgets, focusTraversable, getZOrderClass, hasFocus, hasTitle, isDisplayed, processKeyEvent, setTitle, title, toString
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, prepareWidgets, prevFocus, reflectAncestorChange, remove, removeContainerStateListener, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestorId, autoResize, clear, clearWidget, clipRectangle, clipWith, config, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, hidden, highlighted, ignoreAction, isCurrent, isDirectManipulationCapable, isDirectManipulationRequired, isEnabled, isHeader, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, 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, resizeTo, resolveFont, resolvePopupMenuId, screen, screenDimension, screenHeight, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, translate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, iconify, isDesktopMinimized, isMaximized, isMinimized, isShareActivationWithOwner, loadWindowIcon, maximize, resizeTo, resolveTitleFont, restore, setLocation, setPhysicalLocation, setWindowIcon
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, config, defaultMousePtr, dimension, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, height, hidden, highlighted, insets, isCurrent, isDirectManipulable, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, 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, supportsCustomMousePointer, topLevelWindow, unrealize, width, window
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
dismiss, isDismissed
private WidgetId id
protected BorderedPanelGuiImpl windowPane
protected BorderedPanelGuiImpl contentPane
private WindowTitleBar titleBar
protected GuiDriver<?,?> gd
private Widget<GuiOutputManager> mousePressedSource
private 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.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 GuiWindow
true
- 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 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 GuiWindow
public void resizeTo(NativePoint origin, NativeDimension size)
public CoordinatesConversion coordinates()
coordinates
in interface GuiWindow
CoordinatesConversion
instance.public void setSize(double width, double height)
setSize
in interface GuiWindow
setSize
in interface Container<GuiOutputManager>
setSize
in class AbstractContainer<GuiOutputManager>
width
- New width.height
- New height.public boolean isResizing()
isResizing
in interface GuiWindow
false
.public boolean isResizeWorkspace()
isResizeWorkspace
in interface GuiWindow
false
.public NativeDimension getResizedSize()
getResizedSize
in interface GuiWindow
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 MessageArea<GuiOutputManager> getMessageArea()
getMessageArea
in interface GuiWindow
null
, as modal windows don't have a message area.public StatusLine<GuiOutputManager> getStatusArea()
getStatusArea
in interface GuiWindow
public Dimension getWorkspaceSize()
getWorkspaceSize
in class TitledWindow<GuiOutputManager>
public NativePoint getWorkspaceScreenLocation()
getWorkspaceScreenLocation
in interface GuiWindow
public NativeDimension getWorkspaceNativeSize()
getWorkspaceNativeSize
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 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 GuiWindow
public NativeDimension getMinSize()
getMinSize
in interface GuiWindow
public Border<GuiOutputManager> getBorder()
null
is returned, the window has no border.public int getZOrderScore()
getZOrderScore
in interface GuiWindow
public void setColorResolver(GuiColorResolver resolver)
resolver
- The resolves, may be null
.public Container<GuiOutputManager> getClientContentPane()
getClientContentPane
in interface GuiWindow
protected GuiColorResolver getColorResolver()
null
by default.