Class AbstractNotificationPopup
- All Implemented Interfaces:
- IShellProvider
- Direct Known Subclasses:
- NotificationPopup
- Since:
- 0.2
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.jface.window.WindowWindow.IExceptionHandler
- 
Field SummaryFieldsFields inherited from class org.eclipse.jface.window.WindowCANCEL, OK, resizeHasOccurred
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractNotificationPopup(Display display) AbstractNotificationPopup(Display display, int style) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddWindowActivationHelper(Control control) Allows to add activation listener to custom control.booleanclose()Closes this window, disposes its shell, and removes this window from its window manager (if it has one).voidprotected voidconfigureShell(Shell newShell) Configures the given shell in preparation for opening this window in it.voidcreate()Creates this window's widgetry in a new top-level shell.protected voidcreateContentArea(Composite parent) Override to populate with notifications.protected ControlcreateContents(Composite parent) Creates and returns this window's contents.protected voidcreateTitleArea(Composite parent) Override to customize the title barprotected MouseListenercreateWindowActivationHelper(Shell parentShell) Creates listener that shows and activates the main Eclipse window by clicking on the popup control if it was not in foreground.longprotected ImagegetPopupShellImage(int maximumHeight) protected StringOverride to return a customized name.protected Colorprotected voidInitializes the location and size of this window's SWT shell after it has been created.booleanintopen()Opens this window, creating it first if it has not yet been created.protected voidvoidsetDelayClose(long delayClose) voidsetFadingEnabled(boolean fadingEnabled) protected voidsetParentShell(Shell newParentShell) Overrides default implementation to add window activation helper.Methods inherited from class org.eclipse.jface.window.WindowcanHandleShellCloseEvent, 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
- 
Field Details- 
resources
 
- 
- 
Constructor Details- 
AbstractNotificationPopup
- 
AbstractNotificationPopup
 
- 
- 
Method Details- 
setParentShellOverrides 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. - Overrides:
- setParentShellin class- Window
- Parameters:
- newParentShell- The new parent shell; this value may be- nullif there is to be no parent.
 
- 
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. - Parameters:
- parentShell- parent shell for this popup
- Returns:
- nullif no window activation should be added to the popup
- Since:
- 0.5
 
- 
isFadingEnabledpublic boolean isFadingEnabled()
- 
setFadingEnabledpublic void setFadingEnabled(boolean fadingEnabled) 
- 
createpublic void create()Description copied from class:WindowCreates 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 callingcreateContents), then initializes this window's shell bounds (by callinginitializeBounds).
- 
openpublic int open()Description copied from class:WindowOpens 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:OKandCANCEL.
- 
closepublic boolean close()Description copied from class:WindowCloses 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 resultShellListeners will not receive ashellClosedevent.
- 
getDelayClosepublic long getDelayClose()
- 
setDelayClosepublic void setDelayClose(long delayClose) 
- 
closeFadepublic void closeFade()
- 
getPopupShellTitleOverride 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.- Returns:
- the name to be used in the title of the popup.
 
- 
getPopupShellImage
- 
createContentAreaOverride to populate with notifications.- Parameters:
- parent- Parent for this component.
 
- 
createTitleAreaOverride to customize the title bar
- 
getTitleForeground
- 
configureShellDescription copied from class:WindowConfigures 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. - Overrides:
- configureShellin class- Window
- Parameters:
- newShell- the shell
 
- 
scheduleAutoCloseprotected void scheduleAutoClose()
- 
addWindowActivationHelperAllows 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 - Since:
- 0.5
 
- 
createContentsDescription copied from class:WindowCreates 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.- Overrides:
- createContentsin class- Window
- Parameters:
- parent- the parent composite for the controls in this window. The type of layout used is determined by getLayout()
- Returns:
- the control that will be returned by subsequent calls to getContents()
 
- 
initializeBoundsprotected void initializeBounds()Description copied from class:WindowInitializes 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 callsgetInitialSizeandgetInitialLocationand passes the results toShell.setBounds. This is only done if the bounds of the shell have not already been modified. Subclasses may extend or reimplement.- Overrides:
- initializeBoundsin class- Window
 
 
-