use of com.haulmont.cuba.gui.components.ContentMode in project cuba by cuba-platform.
the class WebNotificationFacet method show.
@Override
public void show() {
Frame owner = getOwner();
if (owner == null) {
throw new IllegalStateException("Notification is not attached to Frame");
}
Notifications notifications = UiControllerUtils.getScreenContext(owner.getFrameOwner()).getNotifications();
String caption = this.caption;
if (captionProvider != null) {
caption = captionProvider.get();
}
String description = this.description;
if (descriptionProvider != null) {
description = descriptionProvider.get();
}
notifications.create(type).withCaption(caption).withDescription(description).withHideDelayMs(delayMs).withContentMode(contentMode).withHtmlSanitizer(htmlSanitizerEnabled).withStyleName(styleName).withPosition(position).withCloseListener(e -> publish(CloseEvent.class, new CloseEvent(this))).show();
}
Aggregations