com.vaadin.client.ui
Class VNotification

java.lang.Object
  extended by PopupPanel
      extended by com.vaadin.client.widgets.Overlay
          extended by com.vaadin.client.ui.VOverlay
              extended by com.vaadin.client.ui.VNotification
All Implemented Interfaces:
com.google.gwt.event.logical.shared.CloseHandler<PopupPanel>, com.google.gwt.event.shared.EventHandler

public class VNotification
extends VOverlay


Nested Class Summary
static interface VNotification.EventListener
           
 class VNotification.HideEvent
           
 
Nested classes/interfaces inherited from class com.vaadin.client.widgets.Overlay
Overlay.PositionAndSize, Overlay.ResizeAnimation
 
Field Summary
static com.vaadin.shared.Position ASSISTIVE
          Position that is only accessible for assistive devices, invisible for visual users.
static com.vaadin.shared.Position BOTTOM_LEFT
           
static com.vaadin.shared.Position BOTTOM_RIGHT
           
static java.lang.String CAPTION
           
static com.vaadin.shared.Position CENTERED
           
static com.vaadin.shared.Position CENTERED_BOTTOM
           
static com.vaadin.shared.Position CENTERED_TOP
           
static int DELAY_FOREVER
           
static int DELAY_NONE
           
static java.lang.String DESCRIPTION
           
static java.lang.String DETAILS
           
static java.lang.String STYLE_SYSTEM
           
static com.vaadin.shared.Position TOP_LEFT
           
static com.vaadin.shared.Position TOP_RIGHT
           
 
Fields inherited from class com.vaadin.client.ui.VOverlay
ac, current
 
Fields inherited from class com.vaadin.client.widgets.Overlay
ADDITIONAL_CLASSNAME_ANIMATE_IN, ADDITIONAL_CLASSNAME_ANIMATE_OUT, CLASSNAME_CONTAINER, CLASSNAME_SHADOW, Z_INDEX
 
Constructor Summary
VNotification()
          Default constructor.
VNotification(int delayMsec)
          Deprecated. Use static #createNotification(int) instead to enable GWT deferred binding.
VNotification(int delayMsec, int fadeMsec, int startOpacity)
          Deprecated. Use static #createNotification(int, int, int) instead to enable GWT deferred binding.
 
Method Summary
 void addEventListener(VNotification.EventListener listener)
           
static void bringNotificationsToFront()
          Moves currently visible notifications to the top of the event preview stack.
static VNotification createNotification(int delayMsec, Widget owner)
           
static java.lang.String getDependentStyle(ApplicationConnection client, java.lang.String style)
          Meant for internal usage only.
 void hide()
           
protected  void hideAfterDelay()
           
 void onBrowserEvent(Event event)
           
 boolean onEventPreview(Event event)
           
protected  void onPreviewNativeEvent(NativePreviewEvent event)
           
 void removeEventListener(VNotification.EventListener listener)
           
 void setPosition(com.vaadin.shared.Position position)
           
 void show()
           
 void show(com.vaadin.shared.Position position)
           
 void show(com.vaadin.shared.Position position, java.lang.String style)
           
 void show(java.lang.String style)
           
 void show(Widget widget, com.vaadin.shared.Position position, java.lang.String style)
           
static void showError(ApplicationConnection connection, java.lang.String caption, java.lang.String message, java.lang.String details, java.lang.String url)
          Shows an error notification and redirects the user to the given URL when she clicks on the notification.
static void showNotification(ApplicationConnection client, UIDL notification)
           
 
Methods inherited from class com.vaadin.client.ui.VOverlay
getApplicationConnection, getOverlayContainer, getOverlayContainer, setOverlayContainerLabel
 
Methods inherited from class com.vaadin.client.widgets.Overlay
center, getOwner, hide, hide, isShadowEnabled, isShimElementEnabled, isSinkShadowEvents, needsShimElement, onAttach, onClose, onDetach, positionOrSizeUpdated, setHeight, setOwner, setPopupPosition, setShadowEnabled, setShadowStyle, setSinkShadowEvents, setVisible, setWidth, setZIndex, sinkEvents, updateShadowSizeAndPosition, useShadowDiv
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.logical.shared.CloseHandler
onClose
 

Field Detail

CENTERED

public static final com.vaadin.shared.Position CENTERED

CENTERED_TOP

public static final com.vaadin.shared.Position CENTERED_TOP

CENTERED_BOTTOM

public static final com.vaadin.shared.Position CENTERED_BOTTOM

TOP_LEFT

public static final com.vaadin.shared.Position TOP_LEFT

TOP_RIGHT

public static final com.vaadin.shared.Position TOP_RIGHT

BOTTOM_LEFT

public static final com.vaadin.shared.Position BOTTOM_LEFT

BOTTOM_RIGHT

public static final com.vaadin.shared.Position BOTTOM_RIGHT

CAPTION

public static final java.lang.String CAPTION
See Also:
Constant Field Values

DESCRIPTION

public static final java.lang.String DESCRIPTION
See Also:
Constant Field Values

DETAILS

public static final java.lang.String DETAILS
See Also:
Constant Field Values

ASSISTIVE

public static final com.vaadin.shared.Position ASSISTIVE
Position that is only accessible for assistive devices, invisible for visual users.


DELAY_FOREVER

public static final int DELAY_FOREVER
See Also:
Constant Field Values

DELAY_NONE

public static final int DELAY_NONE
See Also:
Constant Field Values

STYLE_SYSTEM

public static final java.lang.String STYLE_SYSTEM
See Also:
Constant Field Values
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(java.lang.String style)

show

public void show(com.vaadin.shared.Position position)

show

public void show(Widget widget,
                 com.vaadin.shared.Position position,
                 java.lang.String style)

show

public void show(com.vaadin.shared.Position position,
                 java.lang.String style)

hideAfterDelay

protected void hideAfterDelay()

hide

public void hide()
Overrides:
hide in class Overlay

setPosition

public void setPosition(com.vaadin.shared.Position position)

onBrowserEvent

public void onBrowserEvent(Event event)

onPreviewNativeEvent

protected void onPreviewNativeEvent(NativePreviewEvent event)

onEventPreview

public boolean onEventPreview(Event event)

addEventListener

public void addEventListener(VNotification.EventListener listener)

removeEventListener

public void removeEventListener(VNotification.EventListener listener)

showNotification

public static void showNotification(ApplicationConnection client,
                                    UIDL notification)

getDependentStyle

public static java.lang.String getDependentStyle(ApplicationConnection client,
                                                 java.lang.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,
                                               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,
                             java.lang.String caption,
                             java.lang.String message,
                             java.lang.String details,
                             java.lang.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


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.