public class ModalWindow extends TopLevelWindow<GuiOutputManager> implements GuiWindow
TopLevelWindow.IconDataType
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
protected BorderedPanel<GuiOutputManager> |
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 BorderedPanel<GuiOutputManager> |
windowPane
Window outer frame.
|
location, mousePtr, nativeInsets, physicalLocation
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.
|
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.
|
boolean |
hasDecorations()
Determine if this window can have decorations.
|
boolean |
hasTitlebar()
Check if window has title bar.
|
void |
hide()
Hide window.
|
void |
iconify()
Iconify the window.
|
void |
iconify(int sourceId)
Iconify the window.
|
void |
iconify(int sourceId,
boolean postEvent)
Iconify the 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 |
maximize()
Maximize this window.
|
void |
maximize(boolean postEvent)
Maximize this window.
|
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 |
restore()
Restore the window by raising the
WINDOW-RESTORE event. |
void |
restore(int sourceId)
Restore the window by raising the
WINDOW-RESTORE event. |
void |
restore(int sourceId,
boolean postEvent)
Restore the window by raising the
WINDOW-RESTORE event. |
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, isMaximized, loadWindowIcon, parentOrSelfHidden, physicalBounds, processEvent, processFocusEvent, repaint, repaintDecorations, resolveTitleFont, screenLocation, screenPhysicalLocation, setLocation, setOwner, setPhysicalLocation, setWindowDefaultIcon, setWindowIcon, window
drawInt
destroyWidgets, focusTraversable, getZOrderClass, hasFocus, hasTitle, isDisplayed, processKeyEvent, setTitle, title, toString
add, add, add, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, currentFocus, cycleFocus, detach, dimension, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getWidgetsList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, prepareWidgets, prevFocus, remove, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setWidth, startSizeChange, unrealize, updateSizeWorker, widgets, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestorId, autoResize, clear, clearWidget, clipRectangle, clipWith, config, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, hidden, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isEnabled, isHeader, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, screen, screenDimension, screenHeight, screenWidth, setBitmap, setEnabled, setHidden, setHighlighted, setLocation, setMousePointer, setParent, setState, setVisible, supportsCustomMousePointer, sync, topLevelWindow, translate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, isMaximized, isShareActivationWithOwner, loadWindowIcon, resizeTo, resolveTitleFont, 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, isDirectManipulable, isDisplayed, isEnabled, isFocusable, isHeader, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestFocus, requestSync, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setMousePointer, setParent, setState, setVisible, supportsCustomMousePointer, topLevelWindow, unrealize, width, window
private WidgetId id
protected BorderedPanel<GuiOutputManager> windowPane
protected BorderedPanel<GuiOutputManager> 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 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 iconify(int sourceId)
public void iconify(int sourceId, boolean postEvent)
public void restore()
WINDOW-RESTORE
event.public void restore(int sourceId)
WINDOW-RESTORE
event.public void restore(int sourceId, boolean postEvent)
WINDOW-RESTORE
event.public void maximize(boolean postEvent)
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.protected GuiColorResolver getColorResolver()
null
by default.