@UIScope @Component(value="ui_Notifications") public class NotificationsImpl extends java.lang.Object implements Notifications
Modifier and Type | Class and Description |
---|---|
class |
NotificationsImpl.NotificationBuilderImpl |
Notifications.CloseEvent, Notifications.NotificationBuilder, Notifications.NotificationType, Notifications.Position
Modifier and Type | Field and Description |
---|---|
protected BackgroundWorker |
backgroundWorker |
protected UiComponentProperties |
componentProperties |
protected HtmlSanitizer |
htmlSanitizer |
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 |
---|
NotificationsImpl() |
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) |
void |
setUi(AppUI ui) |
protected static final int HUMANIZED_NOTIFICATION_DELAY_MSEC
protected static final int WARNING_NOTIFICATION_DELAY_MSEC
protected AppUI ui
protected BackgroundWorker backgroundWorker
@Autowired protected UiComponentProperties componentProperties
@Autowired protected HtmlSanitizer htmlSanitizer
@Autowired public void setUi(AppUI ui)
@Autowired 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