Class NotificationPane

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
org.controlsfx.control.NotificationPane
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget, javafx.scene.control.Skinnable

public class NotificationPane extends javafx.scene.control.Control
The NotificationPane control is a container control that, when prompted by the show() method, will show a non-modal message to the user. The notification appears as a bar that will slide in to their application window, either from the top or the bottom of the NotificationPane (based on showFromTopProperty()) wherever that may be in the scenegraph.

Alternative Styling

As is visible in the screenshots further down this documentation, there are two different styles supported by the NotificationPane control. Firstly, there is the default style based on the JavaFX Modena look. The alternative style is what is currently referred to as the 'dark' look. To enable this functionality, simply do the following:

 
 NotificationPane notificationPane = new NotificationPane();   
 notificationPane.getStyleClass().add(NotificationPane.STYLE_CLASS_DARK);
 

Screenshots

To better explain NotificationPane, here is a table showing both the default and dark look for the NotificationPane on a Windows machine (although that shouldn't impact the visuals a great deal). Also, to show the difference between top and bottom placement, these two modes are also captured in the screenshots below:

Setting

Screenshot

Light theme from top:
Screenshot of NotificationPane - Light theme from top
Light theme from bottom:
Screenshot of NotificationPane - Light theme from bottom
Dark theme from top:
Screenshot of NotificationPane - Dark theme from top
Dark theme from bottom:
Screenshot of NotificationPane - Dark theme from bottom

Code Examples

NotificationPane is a conceptually very simple control - you simply create your user interface as you normally would, and then wrap it inside the NotificationPane. You can then show a notification bar on top of your content simply by calling show() on the notification bar. Here is an example:

 
 // Create a WebView
 WebView webView = new WebView();
 
 // Wrap it inside a NotificationPane
 NotificationPane notificationPane = new NotificationPane(webView);
 
 // and put the NotificationPane inside a Tab
 Tab tab1 = new Tab("Tab 1");
 tab1.setContent(notificationPane);
 
 // and the Tab inside a TabPane. We just have one tab here, but of course 
 // you can have more!
 TabPane tabPane = new TabPane();
 tabPane.getTabs().addAll(tab1);
 

Now that the notification pane is installed inside the tab, at some point later in you application lifecycle, you can do something like the following to have the notification bar slide into view:

 
 notificationPane.setText("Do you want to save your password?");
 notificationPane.getActions().add(new AbstractAction("Save Password") {
     public void execute(ActionEvent ae) {
         // do save...
           
         // then hide...
         notificationPane.hide();
     }
 }
See Also:
  • Property Summary

    Properties
    Type
    Property
    Description
    final javafx.beans.property.BooleanProperty
    A property representing whether the close button in the NotificationPane should be visible or not.
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    The content property represents what is shown in the scene that is not within the notification bar.
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    The graphic property represents the Node to show within the popup notification bar that appears on top of the content that is within the NotificationPane.
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>>
     
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>>
     
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>>
     
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>>
     
    final javafx.beans.property.BooleanProperty
    A property representing whether the notification bar should appear from the top or the bottom of the NotificationPane area.
    final javafx.beans.property.ReadOnlyBooleanProperty
    A read-only property that represents whether the notification bar popup should be showing to the user or not.
    final javafx.beans.property.StringProperty
    The text property represents the text to show within the popup notification bar that appears on top of the content that is within the NotificationPane.

    Properties inherited from class javafx.scene.control.Control

    contextMenu, skin, tooltip

    Properties inherited from class javafx.scene.layout.Region

    background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width

    Properties inherited from class javafx.scene.Parent

    needsLayout

    Properties inherited from class javafx.scene.Node

    accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final javafx.event.EventType<javafx.event.Event>
    Called when the NotificationPane is hidden.
    static final javafx.event.EventType<javafx.event.Event>
    Called when the NotificationPane will be hidden.
    static final javafx.event.EventType<javafx.event.Event>
    Called when the NotificationPane will be shown.
    static final javafx.event.EventType<javafx.event.Event>
    Called when the NotificationPane shows.
    static final String
    Static fields

    Fields inherited from class javafx.scene.layout.Region

    USE_COMPUTED_SIZE, USE_PREF_SIZE

    Fields inherited from class javafx.scene.Node

    BASELINE_OFFSET_SAME_AS_HEIGHT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of NotificationPane with no content, text, graphic properties set, and no actions specified.
    NotificationPane(javafx.scene.Node content)
    Creates an instance of NotificationPane with the content property set, but no text or graphic property set, and no actions specified.
  • Method Summary

    Modifier and Type
    Method
    Description
    final javafx.beans.property.BooleanProperty
    A property representing whether the close button in the NotificationPane should be visible or not.
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    The content property represents what is shown in the scene that is not within the notification bar.
    protected javafx.scene.control.Skin<?>
    final javafx.collections.ObservableList<Action>
    Observable list of actions used for the actions area of the notification bar.
    final javafx.scene.Node
     
    final javafx.scene.Node
     
    final javafx.event.EventHandler<javafx.event.Event>
    Gets the value of the onHidden property.
    final javafx.event.EventHandler<javafx.event.Event>
    Gets the value of the onHiding property.
    final javafx.event.EventHandler<javafx.event.Event>
    Gets the value of the onShowing property.
    final javafx.event.EventHandler<javafx.event.Event>
    Gets the value of the onShown property.
    final String
     
    protected final String
    getUserAgentStylesheet(Class<?> clazz, String fileName)
    A helper method that ensures that the resource based lookup of the user agent stylesheet only happens once.
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    The graphic property represents the Node to show within the popup notification bar that appears on top of the content that is within the NotificationPane.
    void
    Call this to make the notification bar disappear from the content of this NotificationPane.
    final boolean
     
    final boolean
     
    final boolean
     
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>>
     
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>>
     
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>>
     
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>>
     
    final void
    setCloseButtonVisible(boolean value)
    Sets whether the close button in NotificationPane should be visible.
    final void
    setContent(javafx.scene.Node value)
    Set the content to be shown in the scene, that is not within the notification bar.
    final void
    setGraphic(javafx.scene.Node value)
    Sets the Node to show within the popup notification bar.
    final void
    setOnHidden(javafx.event.EventHandler<javafx.event.Event> value)
    Called just after the NotificationPane has been hidden.
    final void
    setOnHiding(javafx.event.EventHandler<javafx.event.Event> value)
    Called just prior to the NotificationPane being hidden.
    final void
    setOnShowing(javafx.event.EventHandler<javafx.event.Event> value)
    Called just prior to the NotificationPane being shown.
    final void
    setOnShown(javafx.event.EventHandler<javafx.event.Event> value)
    Called just after the NotificationPane is shown.
    final void
    setShowFromTop(boolean value)
    Sets whether the notification bar should appear from the top or the bottom of the NotificationPane area.
    final void
    setText(String value)
    Sets the text to show within the popup notification bar that appears on top of the content.
    void
    Call this to make the notification bar appear on top of the content of this NotificationPane.
    void
    show(String text)
    Shows the NotificationPane with the content and text property set, but no graphic property set, and no actions specified.
    void
    show(String text, javafx.scene.Node graphic)
    Shows the NotificationPane with the content, text and graphic properties set, but no actions specified.
    void
    show(String text, javafx.scene.Node graphic, Action... actions)
    Shows the NotificationPane with the content, text and graphic property set, and the provided actions copied into the actions list.
    final javafx.beans.property.BooleanProperty
    A property representing whether the notification bar should appear from the top or the bottom of the NotificationPane area.
    final javafx.beans.property.ReadOnlyBooleanProperty
    A read-only property that represents whether the notification bar popup should be showing to the user or not.
    final javafx.beans.property.StringProperty
    The text property represents the text to show within the popup notification bar that appears on top of the content that is within the NotificationPane.

    Methods inherited from class javafx.scene.control.Control

    computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty

    Methods inherited from class javafx.scene.Parent

    getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds

    Methods inherited from class javafx.scene.Node

    accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Property Details

    • content

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> contentProperty
      The content property represents what is shown in the scene that is not within the notification bar. In other words, it is what the notification bar should appear on top of. For example, in the scenario where you are using a WebView to show to the user websites, and you want to popup up a notification bar to save a password, the content would be the WebView. Refer to the NotificationPane class documentation for more details.
      See Also:
    • text

      public final javafx.beans.property.StringProperty textProperty
      The text property represents the text to show within the popup notification bar that appears on top of the content that is within the NotificationPane.
      See Also:
    • graphic

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> graphicProperty
      The graphic property represents the Node to show within the popup notification bar that appears on top of the content that is within the NotificationPane. Despite the term 'graphic', this can be an arbitrarily complex scenegraph in its own right.
      See Also:
    • showing

      public final javafx.beans.property.ReadOnlyBooleanProperty showingProperty
      A read-only property that represents whether the notification bar popup should be showing to the user or not. To toggle visibility, use the show() and hide() methods.
      See Also:
    • showFromTop

      public final javafx.beans.property.BooleanProperty showFromTopProperty
      A property representing whether the notification bar should appear from the top or the bottom of the NotificationPane area. By default it will appear from the top, but this can be changed by setting this property to false.
      See Also:
    • onShowing

      public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>> onShowingProperty
      See Also:
    • onShown

      public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>> onShownProperty
      See Also:
    • onHiding

      public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>> onHidingProperty
      See Also:
    • onHidden

      public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>> onHiddenProperty
      See Also:
    • closeButtonVisible

      public final javafx.beans.property.BooleanProperty closeButtonVisibleProperty
      A property representing whether the close button in the NotificationPane should be visible or not. By default it will appear but this can be changed by setting this property to false.
      See Also:
  • Field Details

    • STYLE_CLASS_DARK

      public static final String STYLE_CLASS_DARK
      Static fields
      See Also:
    • ON_SHOWING

      public static final javafx.event.EventType<javafx.event.Event> ON_SHOWING
      Called when the NotificationPane will be shown.
    • ON_SHOWN

      public static final javafx.event.EventType<javafx.event.Event> ON_SHOWN
      Called when the NotificationPane shows.
    • ON_HIDING

      public static final javafx.event.EventType<javafx.event.Event> ON_HIDING
      Called when the NotificationPane will be hidden.
    • ON_HIDDEN

      public static final javafx.event.EventType<javafx.event.Event> ON_HIDDEN
      Called when the NotificationPane is hidden.
  • Constructor Details

    • NotificationPane

      public NotificationPane()
      Creates an instance of NotificationPane with no content, text, graphic properties set, and no actions specified.
    • NotificationPane

      public NotificationPane(javafx.scene.Node content)
      Creates an instance of NotificationPane with the content property set, but no text or graphic property set, and no actions specified.
      Parameters:
      content - The content to show in the NotificationPane behind where the notification bar will appear, that is, the content will notappear in the notification bar.
  • Method Details

    • createDefaultSkin

      protected javafx.scene.control.Skin<?> createDefaultSkin()
      Overrides:
      createDefaultSkin in class javafx.scene.control.Control
    • getUserAgentStylesheet

      public String getUserAgentStylesheet()
      Overrides:
      getUserAgentStylesheet in class javafx.scene.layout.Region
    • contentProperty

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> contentProperty()
      The content property represents what is shown in the scene that is not within the notification bar. In other words, it is what the notification bar should appear on top of. For example, in the scenario where you are using a WebView to show to the user websites, and you want to popup up a notification bar to save a password, the content would be the WebView. Refer to the NotificationPane class documentation for more details.
      Returns:
      A property representing the content of this NotificationPane.
    • setContent

      public final void setContent(javafx.scene.Node value)
      Set the content to be shown in the scene, that is not within the notification bar.
      Parameters:
      value -
    • getContent

      public final javafx.scene.Node getContent()
      Returns:
      The content shown in the scene.
    • textProperty

      public final javafx.beans.property.StringProperty textProperty()
      The text property represents the text to show within the popup notification bar that appears on top of the content that is within the NotificationPane.
      Returns:
      A property representing the text shown in the notification bar.
      See Also:
    • setText

      public final void setText(String value)
      Sets the text to show within the popup notification bar that appears on top of the content.
      Parameters:
      value -
    • getText

      public final String getText()
      Returns:
      the text showing within the popup notification bar that appears on top of the content.
    • graphicProperty

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> graphicProperty()
      The graphic property represents the Node to show within the popup notification bar that appears on top of the content that is within the NotificationPane. Despite the term 'graphic', this can be an arbitrarily complex scenegraph in its own right.
      Returns:
      A property representing the graphic shown in the notification bar.
      See Also:
    • setGraphic

      public final void setGraphic(javafx.scene.Node value)
      Sets the Node to show within the popup notification bar.
      Parameters:
      value -
    • getGraphic

      public final javafx.scene.Node getGraphic()
      Returns:
      the Node to show within the popup notification bar.
    • showingProperty

      public final javafx.beans.property.ReadOnlyBooleanProperty showingProperty()
      A read-only property that represents whether the notification bar popup should be showing to the user or not. To toggle visibility, use the show() and hide() methods.
      Returns:
      A property representing whether the notification bar is currently showing.
      See Also:
    • isShowing

      public final boolean isShowing()
      Returns:
      whether the notification bar is currently showing.
    • showFromTopProperty

      public final javafx.beans.property.BooleanProperty showFromTopProperty()
      A property representing whether the notification bar should appear from the top or the bottom of the NotificationPane area. By default it will appear from the top, but this can be changed by setting this property to false.
      Returns:
      A property representing where the notification bar should appear from.
      See Also:
    • setShowFromTop

      public final void setShowFromTop(boolean value)
      Sets whether the notification bar should appear from the top or the bottom of the NotificationPane area.
      Parameters:
      value -
    • isShowFromTop

      public final boolean isShowFromTop()
      Returns:
      whether the notification bar is appearing from the top or the bottom of the NotificationPane area.
    • onShowingProperty

      public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>> onShowingProperty()
      Returns:
      the onShowing property
      See Also:
    • setOnShowing

      public final void setOnShowing(javafx.event.EventHandler<javafx.event.Event> value)
      Called just prior to the NotificationPane being shown.
    • getOnShowing

      public final javafx.event.EventHandler<javafx.event.Event> getOnShowing()
      Gets the value of the onShowing property.
      Property description:
      Returns:
      the value of the onShowing property
      See Also:
    • onShownProperty

      public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>> onShownProperty()
      Returns:
      the onShown property
      See Also:
    • setOnShown

      public final void setOnShown(javafx.event.EventHandler<javafx.event.Event> value)
      Called just after the NotificationPane is shown.
    • getOnShown

      public final javafx.event.EventHandler<javafx.event.Event> getOnShown()
      Gets the value of the onShown property.
      Property description:
      Returns:
      the value of the onShown property
      See Also:
    • onHidingProperty

      public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>> onHidingProperty()
      Returns:
      the onHiding property
      See Also:
    • setOnHiding

      public final void setOnHiding(javafx.event.EventHandler<javafx.event.Event> value)
      Called just prior to the NotificationPane being hidden.
    • getOnHiding

      public final javafx.event.EventHandler<javafx.event.Event> getOnHiding()
      Gets the value of the onHiding property.
      Property description:
      Returns:
      the value of the onHiding property
      See Also:
    • onHiddenProperty

      public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.Event>> onHiddenProperty()
      Returns:
      the onHidden property
      See Also:
    • setOnHidden

      public final void setOnHidden(javafx.event.EventHandler<javafx.event.Event> value)
      Called just after the NotificationPane has been hidden.
    • getOnHidden

      public final javafx.event.EventHandler<javafx.event.Event> getOnHidden()
      Gets the value of the onHidden property.
      Property description:
      Returns:
      the value of the onHidden property
      See Also:
    • closeButtonVisibleProperty

      public final javafx.beans.property.BooleanProperty closeButtonVisibleProperty()
      A property representing whether the close button in the NotificationPane should be visible or not. By default it will appear but this can be changed by setting this property to false.
      Returns:
      A property representing whether the close button in the NotificationPane should be visible.
      See Also:
    • setCloseButtonVisible

      public final void setCloseButtonVisible(boolean value)
      Sets whether the close button in NotificationPane should be visible.
      Parameters:
      value -
    • isCloseButtonVisible

      public final boolean isCloseButtonVisible()
      Returns:
      whether the close button in NotificationPane is visible.
    • getActions

      public final javafx.collections.ObservableList<Action> getActions()
      Observable list of actions used for the actions area of the notification bar. Modifying the contents of this list will change the actions available to the user.
      Returns:
      The ObservableList of actions available to the user.
    • show

      public void show()
      Call this to make the notification bar appear on top of the content of this NotificationPane. If the notification bar is already showing this will be a no-op.
    • show

      public void show(String text)
      Shows the NotificationPane with the content and text property set, but no graphic property set, and no actions specified.
      Parameters:
      text - The text to show in the notification pane.
    • show

      public void show(String text, javafx.scene.Node graphic)
      Shows the NotificationPane with the content, text and graphic properties set, but no actions specified.
      Parameters:
      text - The text to show in the notification pane.
      graphic - The node to show in the notification pane.
    • show

      public void show(String text, javafx.scene.Node graphic, Action... actions)
      Shows the NotificationPane with the content, text and graphic property set, and the provided actions copied into the actions list.
      Parameters:
      text - The text to show in the notification pane.
      graphic - The node to show in the notification pane.
      actions - The actions to show in the notification pane.
    • hide

      public void hide()
      Call this to make the notification bar disappear from the content of this NotificationPane. If the notification bar is already hidden this will be a no-op.
    • getUserAgentStylesheet

      protected final String getUserAgentStylesheet(Class<?> clazz, String fileName)
      A helper method that ensures that the resource based lookup of the user agent stylesheet only happens once. Caches the external form of the resource.
      Parameters:
      clazz - the class used for the resource lookup
      fileName - the name of the user agent stylesheet
      Returns:
      the external form of the user agent stylesheet (the path)