- All Implemented Interfaces:
- Direct Known Subclasses:
Nested Class Summary
Method SummaryModifier and TypeMethodDescription
protected voidAllows to add activation listener to custom control.
close()Closes this window, disposes its shell, and removes this window from its window manager (if it has one).
protected voidConfigures the given shell in preparation for opening this window in it.
create()Creates this window's widgetry in a new top-level shell.
protected voidOverride to populate with notifications.
protected ControlCreates and returns this window's contents.
protected voidOverride to customize the title bar
protected MouseListenerCreates listener that shows and activates the main Eclipse window by clicking on the popup control if it was not in foreground.
protected StringOverride to return a customized name.
protected voidInitializes the location and size of this window's SWT shell after it has been created.
open()Opens this window, creating it first if it has not yet been created.
protected voidOverrides default implementation to add window activation helper.
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getInitialLocation, getInitialSize, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager
resourcesprotected LocalResourceManager resources
setParentShellprotected void setParentShell
(Shell newParentShell)Overrides default implementation to add window activation helper.
Changes the parent shell. This is only safe to use when the shell is not yet realized (i.e., created). Once the shell is created, it must be disposed (i.e., closed) before this method can be called.
createWindowActivationHelperCreates listener that shows and activates the main Eclipse window by clicking on the popup control if it was not in foreground.
Clients can override if the window activation shouldn't be added to the popup or a different behavior is desired by clicking on the popup.
parentShell- parent shell for this popup
nullif no window activation should be added to the popup
isFadingEnabledpublic boolean isFadingEnabled()
setFadingEnabledpublic void setFadingEnabled
createpublic void create()Creates this window's widgetry in a new top-level shell.
The default implementation of this framework method creates this window's shell (by calling
createShell), and its controls (by calling
createContents), then initializes this window's shell bounds (by calling
openpublic int open()Opens this window, creating it first if it has not yet been created.
If this window has been configured to block on open (
setBlockOnOpen), this method waits until the window is closed by the end user, and then it returns the window's return code; otherwise, this method returns immediately. A window's return codes are window-specific, although two standard return codes are predefined:
closepublic boolean close()Closes this window, disposes its shell, and removes this window from its window manager (if it has one).
This framework method may be extended (
super.closemust be called).
Note that in order to prevent recursive calls to this method it does not call
Shell#close(). As a result
ShellListeners will not receive a
getDelayClosepublic long getDelayClose()
setDelayClosepublic void setDelayClose
closeFadepublic void closeFade()
getPopupShellTitleprotected String getPopupShellTitle()Override to return a customized name. Default is to return the name of the product, specified by the -name (e.g. "Eclipse SDK") command line parameter that's associated with the product ID (e.g. "org.eclipse.sdk.ide"). Strips the trailing "SDK" for any name, since this part of the label is considered visual noise.
- the name to be used in the title of the popup.
getPopupShellImageprotected Image getPopupShellImage
createContentAreaprotected void createContentArea
(Composite parent)Override to populate with notifications.
parent- Parent for this component.
createTitleAreaprotected void createTitleArea
(Composite parent)Override to customize the title bar
getTitleForegroundprotected Color getTitleForeground()
configureShellprotected void configureShell
(Shell newShell)Configures the given shell in preparation for opening this window in it.
The default implementation of this framework method sets the shell's image and gives it a grid layout. Subclasses may extend or reimplement.
scheduleAutoCloseprotected void scheduleAutoClose()
addWindowActivationHelperprotected void addWindowActivationHelper
(Control control)Allows to add activation listener to custom control. The listener shows and activates the main Eclipse window by clicking on the control if the window was not in foreground.
Clients can override to disable window activation on popup clicking
createContentsCreates and returns this window's contents. Subclasses may attach any number of children to the parent. As a convenience, the return value of this method will be remembered and returned by subsequent calls to getContents(). Subclasses may modify the parent's layout if they overload getLayout() to return null.
It is common practice to create and return a single composite that contains the entire window contents.
The default implementation of this framework method creates an instance of
Composite. Subclasses may override.
initializeBoundsprotected void initializeBounds()Initializes the location and size of this window's SWT shell after it has been created.
This framework method is called by the
createframework method. The default implementation calls
getInitialLocationand passes the results to
Shell.setBounds. This is only done if the bounds of the shell have not already been modified. Subclasses may extend or reimplement.