Class VNotification

  • All Implemented Interfaces:
    com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.EventPreview, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasAnimation, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.SourcesPopupEvents, Iterable<com.google.gwt.user.client.ui.Widget>

    public class VNotification
    extends VOverlay
    • Constructor Detail

      • VNotification

        public VNotification()
        Default constructor. You should use GWT.create instead.
      • VNotification

        @Deprecated
        public VNotification​(int delayMsec)
        Deprecated.
        Use static #createNotification(int) instead to enable GWT deferred binding.
        Parameters:
        delayMsec -
      • VNotification

        @Deprecated
        public VNotification​(int delayMsec,
                             int fadeMsec,
                             int startOpacity)
        Deprecated.
        Use static #createNotification(int, int, int) instead to enable GWT deferred binding.
        Parameters:
        delayMsec -
        fadeMsec -
        startOpacity -
    • Method Detail

      • show

        public void show()
        Overrides:
        show in class Overlay
      • show

        public void show​(String style)
      • show

        public void show​(Position position)
      • show

        public void show​(com.google.gwt.user.client.ui.Widget widget,
                         Position position,
                         String style)
      • hideAfterDelay

        protected void hideAfterDelay()
      • hide

        public void hide()
        Overrides:
        hide in class Overlay
      • setPosition

        public void setPosition​(Position position)
      • onBrowserEvent

        public void onBrowserEvent​(com.google.gwt.user.client.Event event)
        Specified by:
        onBrowserEvent in interface com.google.gwt.user.client.EventListener
        Overrides:
        onBrowserEvent in class com.google.gwt.user.client.ui.Widget
      • onPreviewNativeEvent

        protected void onPreviewNativeEvent​(com.google.gwt.user.client.Event.NativePreviewEvent event)
        Overrides:
        onPreviewNativeEvent in class com.google.gwt.user.client.ui.PopupPanel
      • onEventPreview

        public boolean onEventPreview​(com.google.gwt.user.client.Event event)
        Specified by:
        onEventPreview in interface com.google.gwt.user.client.EventPreview
        Overrides:
        onEventPreview in class com.google.gwt.user.client.ui.PopupPanel
      • getDependentStyle

        public static String getDependentStyle​(ApplicationConnection client,
                                               String style)
        Meant for internal usage only.
        Parameters:
        client - application connection
        style - the dependent style name
        Returns:
        the given dependent style name prefixed with current notification primary style
        Since:
        7.5.0
      • createNotification

        public static VNotification createNotification​(int delayMsec,
                                                       com.google.gwt.user.client.ui.Widget owner)
      • bringNotificationsToFront

        public static void bringNotificationsToFront()
        Moves currently visible notifications to the top of the event preview stack. Can be called when opening other overlays such as subwindows to ensure the notifications receive the events they need and don't linger indefinitely. See #7136. TODO Should this be a generic Overlay feature instead?
      • showError

        public static void showError​(ApplicationConnection connection,
                                     String caption,
                                     String message,
                                     String details,
                                     String url)
        Shows an error notification and redirects the user to the given URL when she clicks on the notification. If both message and caption are null, redirects the user to the url immediately
        Parameters:
        connection - A reference to the ApplicationConnection
        caption - The caption for the error or null to exclude the caption
        message - The message for the error or null to exclude the message
        details - A details message or null to exclude the details
        url - A url to redirect to after the user clicks the error notification
        Since:
        7.5.1