Class AbstractNotificationPopup

  • All Implemented Interfaces:
    IShellProvider

    public abstract class AbstractNotificationPopup
    extends Window
    Since:
    0.2
    • Constructor Detail

      • AbstractNotificationPopup

        public AbstractNotificationPopup​(Display display)
      • AbstractNotificationPopup

        public AbstractNotificationPopup​(Display display,
                                         int style)
    • Method Detail

      • isFadingEnabled

        public boolean isFadingEnabled()
      • setFadingEnabled

        public void setFadingEnabled​(boolean fadingEnabled)
      • create

        public void create()
        Description copied from class: Window
        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 initializeBounds).

        Overrides:
        create in class Window
      • open

        public int open()
        Description copied from class: Window
        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: OK and CANCEL.

        Overrides:
        open in class Window
        Returns:
        the return code
        See Also:
        Window.create()
      • close

        public boolean close()
        Description copied from class: Window
        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.close must 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 shellClosed event.

        Overrides:
        close in class Window
        Returns:
        true if the window is (or was already) closed, and false if it is still open
      • getDelayClose

        public long getDelayClose()
      • setDelayClose

        public void setDelayClose​(long delayClose)
      • closeFade

        public void closeFade()
      • getPopupShellTitle

        protected 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.
        Returns:
        the name to be used in the title of the popup.
      • getPopupShellImage

        protected Image getPopupShellImage​(int maximumHeight)
      • createContentArea

        protected void createContentArea​(Composite parent)
        Override to populate with notifications.
        Parameters:
        parent - Parent for this component.
      • createTitleArea

        protected void createTitleArea​(Composite parent)
        Override to customize the title bar
      • getTitleForeground

        protected Color getTitleForeground()
      • configureShell

        protected void configureShell​(Shell newShell)
        Description copied from class: Window
        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.

        Overrides:
        configureShell in class Window
        Parameters:
        newShell - the shell
      • scheduleAutoClose

        protected void scheduleAutoClose()
      • createContents

        protected Control createContents​(Composite parent)
        Description copied from class: Window
        Creates 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:
        createContents in 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()
      • initializeBounds

        protected void initializeBounds()
        Description copied from class: Window
        Initializes the location and size of this window's SWT shell after it has been created.

        This framework method is called by the create framework method. The default implementation calls getInitialSize and getInitialLocation and 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.

        Overrides:
        initializeBounds in class Window