java.lang.Object
javafx.stage.Window
javafx.stage.PopupWindow
javafx.stage.Popup
com.amirali.fxdialogs.notifications.PopupNotification
- All Implemented Interfaces:
- javafx.event.EventTarget
- Direct Known Subclasses:
- SimplePopupNotification
public class PopupNotification
extends javafx.stage.Popup
- 
Property SummaryPropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration>elapsed duration of the total duration as a read only property
 returns zero value if timer isn't started yetjavafx.beans.property.ObjectProperty<javafx.util.Duration>notification display duration as a propertyjavafx.beans.property.StringPropertyid of the notification as a propertyjavafx.beans.property.ObjectProperty<javafx.geometry.Insets>margin propertyProperties inherited from class javafx.stage.PopupWindowanchorLocation, anchorX, anchorY, autoFix, autoHide, consumeAutoHidingEvents, hideOnEscape, onAutoHide, ownerNode, ownerWindowProperties inherited from class javafx.stage.WindoweventDispatcher, focused, forceIntegerRenderScale, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, opacity, outputScaleX, outputScaleY, renderScaleX, renderScaleY, scene, showing, width, x, y
- 
Nested Class SummaryNested classes/interfaces inherited from class javafx.stage.PopupWindowjavafx.stage.PopupWindow.AnchorLocation
- 
Constructor SummaryConstructorsConstructorDescriptionPopupNotification(@NotNull javafx.util.Duration duration, javafx.scene.Node... nodes) initial notificationPopupNotification(javafx.scene.Node... nodes) initial notification
- 
Method SummaryModifier and TypeMethodDescriptioncalculates notification positionjavafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration>elapsed duration of the total duration as a read only property
 returns zero value if timer isn't started yetjavafx.beans.property.ObjectProperty<javafx.util.Duration>notification display duration as a propertyjavafx.util.Durationelapsed duration of the total duration
 returns zero value if timer isn't started yetjavafx.util.Durationnotification display durationgetId()id of the notificationjavafx.geometry.Insetsgets margin of the notificationjavafx.beans.property.StringPropertyid of the notification as a propertyjavafx.beans.property.ObjectProperty<javafx.geometry.Insets>margin propertyvoidsetDuration(@NotNull javafx.util.Duration duration) sets the notification display durationvoidsets id of the notificationvoidsetMargin(@NotNull javafx.geometry.Insets margin) sets margin of the notificationvoidsetPosition(@NotNull NotificationPosition position) sets position of the PopupNotification on the screenvoidsets the notification sound from Sounds and plays when notification is shown
 Note: You need to add javafx.media dependency to use soundsvoidsets the notification sound from custom file path and plays when notification is shown
 Note: You need to add javafx.media dependency to use soundsMethods inherited from class javafx.stage.PopupgetContentMethods inherited from class javafx.stage.PopupWindowanchorLocationProperty, anchorXProperty, anchorYProperty, autoFixProperty, autoHideProperty, consumeAutoHidingEventsProperty, getAnchorLocation, getAnchorX, getAnchorY, getConsumeAutoHidingEvents, getOnAutoHide, getOwnerNode, getOwnerWindow, hide, hideOnEscapeProperty, isAutoFix, isAutoHide, isHideOnEscape, onAutoHideProperty, ownerNodeProperty, ownerWindowProperty, setAnchorLocation, setAnchorX, setAnchorY, setAutoFix, setAutoHide, setConsumeAutoHidingEvents, setHideOnEscape, setOnAutoHide, setScene, show, show, showMethods inherited from class javafx.stage.WindowaddEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, forceIntegerRenderScaleProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getOutputScaleX, getOutputScaleY, getProperties, getRenderScaleX, getRenderScaleY, getScene, getUserData, getWidth, getWindows, getX, getY, hasProperties, heightProperty, isFocused, isForceIntegerRenderScale, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, outputScaleXProperty, outputScaleYProperty, removeEventFilter, removeEventHandler, renderScaleXProperty, renderScaleYProperty, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setForceIntegerRenderScale, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setRenderScaleX, setRenderScaleY, setUserData, setWidth, setX, setY, show, showingProperty, sizeToScene, widthProperty, xProperty, yProperty
- 
Property Details- 
marginpublic javafx.beans.property.ObjectProperty<javafx.geometry.Insets> marginPropertymargin property- See Also:
 
- 
durationpublic javafx.beans.property.ObjectProperty<javafx.util.Duration> durationPropertynotification display duration as a property- See Also:
 
- 
currentTimepublic javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> currentTimePropertyelapsed duration of the total duration as a read only property
 returns zero value if timer isn't started yet- See Also:
 
- 
idpublic javafx.beans.property.StringProperty idPropertyid of the notification as a property- See Also:
 
 
- 
- 
Constructor Details- 
PopupNotificationpublic PopupNotification(javafx.scene.Node... nodes) initial notification- Parameters:
- nodes- content of the notification
 
- 
PopupNotificationpublic PopupNotification(@NotNull @NotNull javafx.util.Duration duration, javafx.scene.Node... nodes) initial notification- Parameters:
- nodes- content of the notification
- duration- display duration
 
 
- 
- 
Method Details- 
calculatePositioncalculates notification position- Returns:
- Delta
 
- 
setPositionsets position of the PopupNotification on the screen- Parameters:
- position- NotificationPosition
 
- 
setMarginpublic void setMargin(@NotNull @NotNull javafx.geometry.Insets margin) sets margin of the notification- Parameters:
- margin- Insets
 
- 
getMarginpublic javafx.geometry.Insets getMargin()gets margin of the notification- Returns:
- Insets
 
- 
marginPropertypublic javafx.beans.property.ObjectProperty<javafx.geometry.Insets> marginProperty()margin property- See Also:
 
- 
setSoundsets the notification sound from Sounds and plays when notification is shown
 Note: You need to add javafx.media dependency to use sounds- Parameters:
- sound- default notification sounds
 
- 
setSoundsets the notification sound from custom file path and plays when notification is shown
 Note: You need to add javafx.media dependency to use sounds- Parameters:
- path- custom file path
 
- 
setDurationpublic void setDuration(@NotNull @NotNull javafx.util.Duration duration) sets the notification display duration- Parameters:
- duration- display duration
 
- 
getDurationpublic javafx.util.Duration getDuration()notification display duration- Returns:
- Duration
 
- 
durationPropertypublic javafx.beans.property.ObjectProperty<javafx.util.Duration> durationProperty()notification display duration as a property- See Also:
 
- 
getCurrentTimepublic javafx.util.Duration getCurrentTime()elapsed duration of the total duration
 returns zero value if timer isn't started yet- Returns:
- Duration
 
- 
currentTimePropertypublic javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> currentTimeProperty()elapsed duration of the total duration as a read only property
 returns zero value if timer isn't started yet- See Also:
 
- 
setIdsets id of the notification- Parameters:
- id- id of the notification
 
- 
getIdid of the notification- Returns:
- String
 
- 
idPropertypublic javafx.beans.property.StringProperty idProperty()id of the notification as a property- See Also:
 
 
-