NotificationsBuilder

Supporting class to use Notifications with DSL.

Functions

Link copied to clipboard
fun actions(vararg actions: Action)

Specify the actions that should be shown in the notification as buttons.

Link copied to clipboard
fun darkStyle()

Specify that the notification should use the built-in dark styling, rather than the default 'modena' notification style.

Link copied to clipboard

Specify that the close button in the top-right corner of the notification should not be shown.

Link copied to clipboard
fun onAction(action: (ActionEvent) -> Unit)

Specify what to do when the user clicks on the notification.

Link copied to clipboard
fun threshold(threshold: Int, thresholdNotificationsBuilder: NotificationsBuilder.() -> Unit)

Alias of NotificationsBuilder.threshold with builder DSL.

fun threshold(threshold: Int, thresholdNotifications: Notifications)

Collapses all the current notifications into a single notification when the number of notifications exceed the threshold limit. A value of zero will disable the threshold behavior.

Properties

Link copied to clipboard
var graphic: Node

Specify the graphic to show in the notification.

Link copied to clipboard
var hideAfter: Duration

Specify the duration that the notification should show, after which it will be hidden.

Link copied to clipboard
var owner: Any

The dialog window owner - which can be javafx.stage.Screen, javafx.stage.Window, or javafx.scene.Node.

Link copied to clipboard
var position: Pos

Specify the position of the notification on screen, by default it is Pos.BOTTOM_RIGHT.

Link copied to clipboard

Specify the text to show in the notification.

Link copied to clipboard

Specify the title to show in the notification.