public class WebNotifications.NotificationBuilderImpl extends java.lang.Object implements Notifications.NotificationBuilder
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
caption |
protected ContentMode |
contentMode |
protected java.lang.String |
description |
protected int |
hideDelayMs |
protected Notifications.NotificationType |
notificationType |
protected Notifications.Position |
position |
protected java.lang.String |
styleName |
Constructor and Description |
---|
NotificationBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
protected com.vaadin.ui.Notification.Type |
convertType(Notifications.NotificationType notificationType) |
java.lang.String |
getCaption() |
ContentMode |
getContentMode() |
java.lang.String |
getDescription() |
int |
getHideDelayMs() |
Notifications.Position |
getPosition() |
java.lang.String |
getStyleName() |
Notifications.NotificationType |
getType() |
protected void |
setNotificationDelayMsec(com.vaadin.ui.Notification notification,
Notifications.NotificationType type) |
void |
show()
Shows notification.
|
Notifications.NotificationBuilder |
withCaption(java.lang.String caption)
Sets notification caption.
|
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 notificationType)
Sets type of notification.
|
protected java.lang.String caption
protected java.lang.String description
protected java.lang.String styleName
protected Notifications.Position position
protected int hideDelayMs
protected ContentMode contentMode
protected Notifications.NotificationType notificationType
public Notifications.NotificationBuilder withCaption(java.lang.String caption)
Notifications.NotificationBuilder
withCaption
in interface Notifications.NotificationBuilder
caption
- captionpublic java.lang.String getCaption()
getCaption
in interface Notifications.NotificationBuilder
public Notifications.NotificationBuilder withDescription(java.lang.String description)
Notifications.NotificationBuilder
withDescription
in interface Notifications.NotificationBuilder
description
- descriptionpublic java.lang.String getDescription()
getDescription
in interface Notifications.NotificationBuilder
public Notifications.NotificationBuilder withType(Notifications.NotificationType notificationType)
Notifications.NotificationBuilder
withType
in interface Notifications.NotificationBuilder
notificationType
- typepublic Notifications.NotificationType getType()
getType
in interface Notifications.NotificationBuilder
public Notifications.NotificationBuilder withContentMode(ContentMode contentMode)
Notifications.NotificationBuilder
withContentMode
in interface Notifications.NotificationBuilder
contentMode
- content modepublic ContentMode getContentMode()
getContentMode
in interface Notifications.NotificationBuilder
public Notifications.NotificationBuilder withStyleName(java.lang.String styleName)
Notifications.NotificationBuilder
withStyleName
in interface Notifications.NotificationBuilder
styleName
- CSS class namepublic java.lang.String getStyleName()
getStyleName
in interface Notifications.NotificationBuilder
public Notifications.NotificationBuilder withPosition(Notifications.Position position)
Notifications.NotificationBuilder
withPosition
in interface Notifications.NotificationBuilder
position
- positionpublic Notifications.Position getPosition()
getPosition
in interface Notifications.NotificationBuilder
public Notifications.NotificationBuilder withHideDelayMs(int hideDelayMs)
Notifications.NotificationBuilder
withHideDelayMs
in interface Notifications.NotificationBuilder
hideDelayMs
- the desired delay in milliseconds, to
require the user to click the messagepublic int getHideDelayMs()
getHideDelayMs
in interface Notifications.NotificationBuilder
protected com.vaadin.ui.Notification.Type convertType(Notifications.NotificationType notificationType)
protected void setNotificationDelayMsec(com.vaadin.ui.Notification notification, Notifications.NotificationType type)
public void show()
Notifications.NotificationBuilder
show
in interface Notifications.NotificationBuilder