Package com.vaadin.client.ui
Class VNotification
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.google.gwt.user.client.ui.PopupPanel
-
- com.vaadin.client.widgets.Overlay
-
- com.vaadin.client.ui.VOverlay
-
- com.vaadin.client.ui.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
VNotification.EventListener
class
VNotification.HideEvent
-
Nested classes/interfaces inherited from class com.vaadin.client.widgets.Overlay
Overlay.PositionAndSize, Overlay.ResizeAnimation
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
-
-
Field Summary
Fields Modifier and Type Field Description static Position
ASSISTIVE
Position that is only accessible for assistive devices, invisible for visual users.static Position
BOTTOM_LEFT
static Position
BOTTOM_RIGHT
static String
CAPTION
static Position
CENTERED
static Position
CENTERED_BOTTOM
static Position
CENTERED_TOP
static int
DELAY_FOREVER
static int
DELAY_NONE
static String
DESCRIPTION
static String
DETAILS
static String
STYLE_SYSTEM
static Position
TOP_LEFT
static Position
TOP_RIGHT
-
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
Constructors Constructor Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, com.google.gwt.user.client.ui.Widget owner)
static String
getDependentStyle(ApplicationConnection client, String style)
Meant for internal usage only.void
hide()
protected void
hideAfterDelay()
void
onBrowserEvent(com.google.gwt.user.client.Event event)
boolean
onEventPreview(com.google.gwt.user.client.Event event)
protected void
onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event)
void
removeEventListener(VNotification.EventListener listener)
void
setPosition(Position position)
void
show()
void
show(com.google.gwt.user.client.ui.Widget widget, Position position, String style)
void
show(Position position)
void
show(Position position, String style)
void
show(String style)
void
show(String html, Position position, String style)
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.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, isFitInWindow, isShadowEnabled, isShimElementEnabled, isSinkShadowEvents, needsShimElement, onAttach, onClose, onDetach, positionOrSizeUpdated, setFitInWindow, setHeight, setOwner, setPopupPosition, setShadowEnabled, setShadowStyle, setSinkShadowEvents, setVisible, setWidth, setZIndex, sinkEvents, updateShadowSizeAndPosition, useShadowDiv
-
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, getAnimationType, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setWidget, showRelativeTo
-
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getWidget, iterator, remove, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onLoad, removeFromParent, setLayoutData, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString
-
-
-
-
Field Detail
-
CENTERED
public static final Position CENTERED
-
CENTERED_TOP
public static final Position CENTERED_TOP
-
CENTERED_BOTTOM
public static final Position CENTERED_BOTTOM
-
TOP_LEFT
public static final Position TOP_LEFT
-
TOP_RIGHT
public static final Position TOP_RIGHT
-
BOTTOM_LEFT
public static final Position BOTTOM_LEFT
-
BOTTOM_RIGHT
public static final Position BOTTOM_RIGHT
-
CAPTION
public static final String CAPTION
- See Also:
- Constant Field Values
-
DESCRIPTION
public static final String DESCRIPTION
- See Also:
- Constant Field Values
-
DETAILS
public static final String DETAILS
- See Also:
- Constant Field Values
-
ASSISTIVE
public static final 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 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(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()
-
setPosition
public void setPosition(Position position)
-
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
- Specified by:
onBrowserEvent
in interfacecom.google.gwt.user.client.EventListener
- Overrides:
onBrowserEvent
in classcom.google.gwt.user.client.ui.Widget
-
onPreviewNativeEvent
protected void onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event)
- Overrides:
onPreviewNativeEvent
in classcom.google.gwt.user.client.ui.PopupPanel
-
onEventPreview
public boolean onEventPreview(com.google.gwt.user.client.Event event)
- Specified by:
onEventPreview
in interfacecom.google.gwt.user.client.EventPreview
- Overrides:
onEventPreview
in classcom.google.gwt.user.client.ui.PopupPanel
-
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 String getDependentStyle(ApplicationConnection client, String style)
Meant for internal usage only.- Parameters:
client
- application connectionstyle
- 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 ApplicationConnectioncaption
- The caption for the error or null to exclude the captionmessage
- The message for the error or null to exclude the messagedetails
- A details message or null to exclude the detailsurl
- A url to redirect to after the user clicks the error notification- Since:
- 7.5.1
-
-