public static interface Notifications.NotificationBuilder
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCaption() |
java.util.function.Consumer<Notifications.CloseEvent> |
getCloseListener() |
ContentMode |
getContentMode() |
java.lang.String |
getDescription() |
int |
getHideDelayMs() |
Notifications.Position |
getPosition() |
java.lang.String |
getStyleName() |
Notifications.NotificationType |
getType() |
void |
show()
Shows notification.
|
Notifications.NotificationBuilder |
withCaption(java.lang.String caption)
Sets notification caption.
|
Notifications.NotificationBuilder |
withCloseListener(java.util.function.Consumer<Notifications.CloseEvent> closeListener)
Sets the listener that will be fired when notification will be closed.
|
Notifications.NotificationBuilder |
withContentMode(ContentMode contentMode)
Sets content mode for caption and description of notification.
|
Notifications.NotificationBuilder |
withDescription(java.lang.String description)
Sets notification description.
|
Notifications.NotificationBuilder |
withHideDelayMs(int hideDelayMs)
Sets the delay before the notification disappears.
|
Notifications.NotificationBuilder |
withPosition(Notifications.Position position)
Sets position of notification.
|
Notifications.NotificationBuilder |
withStyleName(java.lang.String styleName)
Sets CSS class name for notification DOM element.
|
Notifications.NotificationBuilder |
withType(Notifications.NotificationType type)
Sets type of notification.
|
Notifications.NotificationBuilder withCaption(java.lang.String caption)
caption
- captionjava.lang.String getCaption()
Notifications.NotificationBuilder withDescription(java.lang.String description)
description
- descriptionjava.lang.String getDescription()
Notifications.NotificationBuilder withType(Notifications.NotificationType type)
type
- typeNotifications.NotificationType getType()
Notifications.NotificationBuilder withContentMode(ContentMode contentMode)
contentMode
- content modeContentMode getContentMode()
Notifications.NotificationBuilder withStyleName(java.lang.String styleName)
styleName
- CSS class namejava.lang.String getStyleName()
Notifications.NotificationBuilder withPosition(Notifications.Position position)
position
- positionNotifications.Position getPosition()
Notifications.NotificationBuilder withHideDelayMs(int hideDelayMs)
hideDelayMs
- the desired delay in milliseconds, to
require the user to click the messageint getHideDelayMs()
Notifications.NotificationBuilder withCloseListener(java.util.function.Consumer<Notifications.CloseEvent> closeListener)
closeListener
- Notifications.CloseEvent
consumerjava.util.function.Consumer<Notifications.CloseEvent> getCloseListener()
void show()