Package org.eclipse.jface.notifications

## Class NotificationPopup

- java.lang.Object
- - org.eclipse.jface.window.Window
  - - org.eclipse.jface.notifications.AbstractNotificationPopup
    - - org.eclipse.jface.notifications.NotificationPopup

All Implemented Interfaces:
  `IShellProvider`

    public class NotificationPopup
    extends AbstractNotificationPopup

NotificationPopup is a default implementation of `AbstractNotificationPopup`. Instances can be created with a fluent `NotificationPopup.Builder` api.

It covers use cases such as setting a title and/or a text as content. Also functions can be passed to create the title and/or content. More complex cases with e.g. several SWT controls should still be created by extending `AbstractNotificationPopup`.

Example:

     NotificationPopup.forDisplay(Display.getDefault()).text("A problem occurred.").title("Warning", true).open();

Since:
  0.4

### Nested Class Summary

Nested Classes
`static class` `NotificationPopup.Builder` The Builder to create NotificationPopup instances.

### Nested classes/interfaces inherited from class org.eclipse.jface.window.Window

`Window.IExceptionHandler`

### Field Summary

### Fields inherited from class org.eclipse.jface.notifications.AbstractNotificationPopup

`resources`

### Fields inherited from class org.eclipse.jface.window.Window

`CANCEL, OK, resizeHasOccurred`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`protected void` `createContentArea​(Composite parent)` Override to populate with notifications.
`protected void` `createTitleArea​(Composite parent)` Override to customize the title bar
`static NotificationPopup.Builder` `forDisplay​(Display display)` Creates a new builder instance.

### Methods inherited from class org.eclipse.jface.notifications.AbstractNotificationPopup

`close, closeFade, configureShell, create, createContents, getDelayClose, getPopupShellImage, getPopupShellTitle, getTitleForeground, initializeBounds, isFadingEnabled, open, scheduleAutoClose, setDelayClose, setFadingEnabled`

### 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, setParentShell, setReturnCode, setShellStyle, setWindowManager`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### forDisplay

    public static NotificationPopup.Builder forDisplay​(Display display)

Creates a new builder instance.

Parameters:
  `display` - the display to use
Returns:
  the builder instance

#### createTitleArea

    protected void createTitleArea​(Composite parent)

Description copied from class: `AbstractNotificationPopup`
Override to customize the title bar

Overrides:
  `createTitleArea` in class `AbstractNotificationPopup`

#### createContentArea

    protected void createContentArea​(Composite parent)

Description copied from class: `AbstractNotificationPopup`
Override to populate with notifications.

Overrides:
  `createContentArea` in class `AbstractNotificationPopup`
Parameters:
  `parent` - Parent for this component.