| Package | Description |
|---|---|
| org.dominokit.domino.ui.notifications |
| Modifier and Type | Method and Description |
|---|---|
Notification |
Notification.addCloseHandler(Notification.CloseHandler closeHandler)
Add a handler to be called when a notification is closed
|
Notification |
Notification.appendContent(elemental2.dom.Node content)
Appends any kind of content to the notification body.
|
static Notification |
Notification.create(String message)
Creates a notification for the message with no specific type and default black bacjground.
|
static Notification |
Notification.create(String message,
String type)
Creates a notification for the message with the specified type/style
|
static Notification |
Notification.createDanger(String message)
Creates a notification with danger style (red background) indicating a failed operation.
|
static Notification |
Notification.createInfo(String message)
Creates a notification with success style (green background) to informative message.
|
static Notification |
Notification.createSuccess(String message)
Creates a notification with success style (green background) indicating a success operation.
|
static Notification |
Notification.createWarning(String message)
Creates a notification with success style (green background) to show warnings.
|
Notification |
Notification.duration(int duration)
for none infinite notifications, the duration defined how long the notification will remain
visible after the show transition is completed before it is automatically closed.
|
Notification |
Notification.inTransition(Transition inTransition)
Defines the animation transition to be applied to show up the notification when
show() is called. |
Notification |
Notification.outTransition(Transition outTransition)
Defines the animation transition to be applied to close up the notification when
close() is called, or the duration ends. |
Notification |
Notification.removeCloseHandler(Notification.CloseHandler closeHandler)
Removes a
Notification.CloseHandler from the currently existing close handlers. |
Notification |
Notification.setBackground(Color background)
Apply a custom background color to the notification.
|
Notification |
Notification.setClosable(boolean closable)
Use to show or hide the close button.
|
Notification |
Notification.setInfinite(boolean infinite)
When true, duration will be ignored, and the notification will only close if the
close() is called or close button is clicked. |
Notification |
Notification.setMessage(String message)
The text content of the notification
|
Notification |
Notification.setPosition(Notification.Position position)
Defines the location in which the notification will show up when
show() is
called. |
Notification |
Notification.setType(String type)
Sets specified type/style
|
Notification |
Notification.show()
Show up the notification and apply the IN transtion animation.
|
Copyright © 2019–2022 Dominokit. All rights reserved.