Class NotificationsImpl

java.lang.Object
io.jmix.ui.sys.NotificationsImpl
All Implemented Interfaces:
Notifications

@UIScope @Component("ui_Notifications") public class NotificationsImpl extends Object implements Notifications
  • Field Details

    • HUMANIZED_NOTIFICATION_DELAY_MSEC

      protected static final int HUMANIZED_NOTIFICATION_DELAY_MSEC
      See Also:
    • WARNING_NOTIFICATION_DELAY_MSEC

      protected static final int WARNING_NOTIFICATION_DELAY_MSEC
      See Also:
    • ui

      protected AppUI ui
    • backgroundWorker

      protected BackgroundWorker backgroundWorker
    • componentProperties

      @Autowired protected UiComponentProperties componentProperties
    • htmlSanitizer

      @Autowired protected HtmlSanitizer htmlSanitizer
  • Constructor Details

    • NotificationsImpl

      public NotificationsImpl()
  • Method Details

    • setUi

      @Autowired public void setUi(AppUI ui)
    • setBackgroundWorker

      @Autowired protected void setBackgroundWorker(BackgroundWorker backgroundWorker)
    • create

      Description copied from interface: Notifications
      Creates a notification builder.
      Example of showing a notification:
      
       notifications.create()
               .withType(NotificationType.WARNING)
               .withCaption("Alert")
               .withPosition(Notifications.Position.BOTTOM_RIGHT)
               .show();
       
      Specified by:
      create in interface Notifications
      Returns:
      notification builder
    • create

      Description copied from interface: Notifications
      Creates a notification builder with the passed notification type.
      Example of showing a notification:
      
       notifications.create(NotificationType.WARNING)
               .withCaption("Alert")
               .withDescription("Please specify name")
               .withPosition(Notifications.Position.BOTTOM_RIGHT)
               .show();
       
      Specified by:
      create in interface Notifications
      Parameters:
      type - notification type
      Returns:
      notification builder