- All Implemented Interfaces:
javafx.css.Styleable
,javafx.event.EventTarget
,javafx.scene.control.Skinnable
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: | ![]() |
Light theme from bottom: | ![]() |
Dark theme from top: | ![]() |
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
PropertiesTypePropertyDescriptionfinal javafx.beans.property.BooleanProperty
A property representing whether the close button in theNotificationPane
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 theNode
to show within the popup notification bar that appears on top of thecontent
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 thecontent
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
FieldsModifier and TypeFieldDescriptionstatic 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 fieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionfinal javafx.beans.property.BooleanProperty
A property representing whether the close button in theNotificationPane
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 theonHidden
property.final javafx.event.EventHandler
<javafx.event.Event> Gets the value of theonHiding
property.final javafx.event.EventHandler
<javafx.event.Event> Gets the value of theonShowing
property.final javafx.event.EventHandler
<javafx.event.Event> Gets the value of theonShown
property.final String
getText()
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 theNode
to show within the popup notification bar that appears on top of thecontent
that is within the NotificationPane.void
hide()
Call this to make the notification bar disappear from thecontent
of thisNotificationPane
.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 inNotificationPane
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 theNode
to show within the popup notification bar.final void
setOnHidden
(javafx.event.EventHandler<javafx.event.Event> value) Called just after theNotificationPane
has been hidden.final void
setOnHiding
(javafx.event.EventHandler<javafx.event.Event> value) Called just prior to theNotificationPane
being hidden.final void
setOnShowing
(javafx.event.EventHandler<javafx.event.Event> value) Called just prior to theNotificationPane
being shown.final void
setOnShown
(javafx.event.EventHandler<javafx.event.Event> value) Called just after theNotificationPane
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
Sets the text to show within the popup notification bar that appears on top of thecontent
.void
show()
Call this to make the notification bar appear on top of thecontent
of thisNotificationPane
.void
void
void
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 thecontent
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> contentPropertyThe 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 theNotificationPane
class documentation for more details.- See Also:
-
text
public final javafx.beans.property.StringProperty textPropertyThe text property represents the text to show within the popup notification bar that appears on top of thecontent
that is within the NotificationPane.- See Also:
-
graphic
public final javafx.beans.property.ObjectProperty<javafx.scene.Node> graphicPropertyThe graphic property represents theNode
to show within the popup notification bar that appears on top of thecontent
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 showingPropertyA read-only property that represents whether the notification bar popup should be showing to the user or not. To toggle visibility, use theshow()
andhide()
methods.- See Also:
-
showFromTop
public final javafx.beans.property.BooleanProperty showFromTopPropertyA 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 closeButtonVisiblePropertyA property representing whether the close button in theNotificationPane
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
Static fields- See Also:
-
ON_SHOWING
public static final javafx.event.EventType<javafx.event.Event> ON_SHOWINGCalled when the NotificationPane will be shown. -
ON_SHOWN
public static final javafx.event.EventType<javafx.event.Event> ON_SHOWNCalled when the NotificationPane shows. -
ON_HIDING
public static final javafx.event.EventType<javafx.event.Event> ON_HIDINGCalled when the NotificationPane will be hidden. -
ON_HIDDEN
public static final javafx.event.EventType<javafx.event.Event> ON_HIDDENCalled when the NotificationPane is hidden.
-
-
Constructor Details
-
NotificationPane
public NotificationPane() -
NotificationPane
public NotificationPane(javafx.scene.Node content) Creates an instance of NotificationPane with thecontent
property set, but notext
orgraphic
property set, and noactions
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 classjavafx.scene.control.Control
-
getUserAgentStylesheet
- Overrides:
getUserAgentStylesheet
in classjavafx.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 theNotificationPane
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 thecontent
that is within the NotificationPane.- Returns:
- A property representing the text shown in the notification bar.
- See Also:
-
setText
Sets the text to show within the popup notification bar that appears on top of thecontent
.- Parameters:
value
-
-
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 theNode
to show within the popup notification bar that appears on top of thecontent
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 theNode
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 theshow()
andhide()
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 theNotificationPane
being shown. -
getOnShowing
public final javafx.event.EventHandler<javafx.event.Event> getOnShowing()Gets the value of theonShowing
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 theNotificationPane
is shown. -
getOnShown
public final javafx.event.EventHandler<javafx.event.Event> getOnShown()Gets the value of theonShown
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 theNotificationPane
being hidden. -
getOnHiding
public final javafx.event.EventHandler<javafx.event.Event> getOnHiding()Gets the value of theonHiding
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 theNotificationPane
has been hidden. -
getOnHidden
public final javafx.event.EventHandler<javafx.event.Event> getOnHidden()Gets the value of theonHidden
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 theNotificationPane
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 inNotificationPane
should be visible.- Parameters:
value
-
-
isCloseButtonVisible
public final boolean isCloseButtonVisible()- Returns:
- whether the close button in
NotificationPane
is visible.
-
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 thecontent
of thisNotificationPane
. If the notification bar is already showing this will be a no-op. -
show
Shows the NotificationPane with thecontent
andtext
property set, but nographic
property set, and noactions
specified.- Parameters:
text
- The text to show in the notification pane.
-
show
Shows the NotificationPane with thecontent
,text
andgraphic
properties set, but noactions
specified.- Parameters:
text
- The text to show in the notification pane.graphic
- The node to show in the notification pane.
-
show
Shows the NotificationPane with thecontent
,text
andgraphic
property set, and the provided actions copied into theactions
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 thecontent
of thisNotificationPane
. If the notification bar is already hidden this will be a no-op. -
getUserAgentStylesheet
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 lookupfileName
- the name of the user agent stylesheet- Returns:
- the external form of the user agent stylesheet (the path)
-