Interface NotificationManager.View

  • Enclosing class:
    NotificationManager

    public static interface NotificationManager.View
    The view contract for the UI that shows and hides active notifications.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void hide​(NotificationManager.NotificationPopupHandle popup)
      Hides the active notification identified by the given popup handle.
      void hideAll()
      Hides all active notifications.
      boolean isShowing​(org.uberfire.workbench.events.NotificationEvent event)
      Checks whether the given event is currently being shown.
      void setContainer​(com.google.gwt.user.client.ui.IsWidget container)
      Set the container relative to which Notifications are to be shown.
      void setInitialSpacing​(int spacing)
      Configures the initial vertical spacing for the first notifications (see NotificationEvent.getInitialTopOffset()).
      NotificationManager.NotificationPopupHandle show​(org.uberfire.workbench.events.NotificationEvent event, com.google.gwt.user.client.Command hideCommand)
      Displays a notification with the given severity and contents.
    • Method Detail

      • setContainer

        void setContainer​(com.google.gwt.user.client.ui.IsWidget container)
        Set the container relative to which Notifications are to be shown. This should be called before either show(NotificationEvent, Command) or hide(NotificationPopupHandle) and must be passed a non-null value.
        Parameters:
        container - The container relative to which Notifications will be shown. Must not be null.
      • setInitialSpacing

        void setInitialSpacing​(int spacing)
        Configures the initial vertical spacing for the first notifications (see NotificationEvent.getInitialTopOffset()). A default value is used if this method is never invoked.
        Parameters:
        spacing - the vertical spacing in number of pixels
      • show

        NotificationManager.NotificationPopupHandle show​(org.uberfire.workbench.events.NotificationEvent event,
                                                         com.google.gwt.user.client.Command hideCommand)
        Displays a notification with the given severity and contents.
        Parameters:
        event - The notification event. Must not be null.
        hideCommand - The command that must be called when the notification is to be closed. When this command is invoked, the notification manager will change the notification status from active to acknowledged, and it will invoke the hide(NotificationPopupHandle) method with the notification handle that this method call returned.
        Returns:
        The object to pass to hide(NotificationPopupHandle) that will hide this notification. Must not return null.
      • hide

        void hide​(NotificationManager.NotificationPopupHandle popup)
        Hides the active notification identified by the given popup handle. This call is made when a notification changes state from "new" to "acknowledged." Once this call is made, the notification is still in the system, but it should not be displayed as a new notification anymore. As an analogy, if the notification was an email, this call would mark it as read.
        Parameters:
        popup - The handle for the active notification that should be hidden.
      • hideAll

        void hideAll()
        Hides all active notifications.
      • isShowing

        boolean isShowing​(org.uberfire.workbench.events.NotificationEvent event)
        Checks whether the given event is currently being shown.
        Parameters:
        event - The notification event. Must not be null.
        Returns:
        true if shown