public class WebNotifications extends java.lang.Object implements Notifications
Modifier and Type | Class and Description |
---|---|
class |
WebNotifications.NotificationBuilderImpl |
Notifications.NotificationBuilder, Notifications.NotificationType, Notifications.Position
Modifier and Type | Field and Description |
---|---|
protected BackgroundWorker |
backgroundWorker |
protected static int |
HUMANIZED_NOTIFICATION_DELAY_MSEC |
protected AppUI |
ui |
protected static int |
WARNING_NOTIFICATION_DELAY_MSEC |
DELAY_DEFAULT, DELAY_FOREVER, DELAY_NONE
Constructor and Description |
---|
WebNotifications(AppUI ui) |
Modifier and Type | Method and Description |
---|---|
Notifications.NotificationBuilder |
create()
Creates a notification builder.
|
Notifications.NotificationBuilder |
create(Notifications.NotificationType type)
Creates a notification builder with the passed notification type.
|
protected void |
setBackgroundWorker(BackgroundWorker backgroundWorker) |
protected static final int HUMANIZED_NOTIFICATION_DELAY_MSEC
protected static final int WARNING_NOTIFICATION_DELAY_MSEC
protected AppUI ui
protected BackgroundWorker backgroundWorker
public WebNotifications(AppUI ui)
@Inject protected void setBackgroundWorker(BackgroundWorker backgroundWorker)
public Notifications.NotificationBuilder create()
Notifications
notifications.create()
.withType(NotificationType.WARNING)
.withCaption("Alert")
.withPosition(Notifications.Position.BOTTOM_RIGHT)
.show();
create
in interface Notifications
public Notifications.NotificationBuilder create(Notifications.NotificationType type)
Notifications
notifications.create(NotificationType.WARNING)
.withCaption("Alert")
.withDescription("Please specify name")
.withPosition(Notifications.Position.BOTTOM_RIGHT)
.show();
create
in interface Notifications
type
- notification type