public class VTooltip extends VOverlay
Overlay.PositionAndSize, Overlay.ResizeAnimation
com.google.gwt.user.client.ui.PopupPanel.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
Modifier and Type | Field and Description |
---|---|
static int |
TOOLTIP_EVENTS |
ADDITIONAL_CLASSNAME_ANIMATE_IN, ADDITIONAL_CLASSNAME_ANIMATE_OUT, CLASSNAME_CONTAINER, CLASSNAME_SHADOW, Z_INDEX
Constructor and Description |
---|
VTooltip()
Used to show tooltips; usually used via the singleton in
ApplicationConnection . |
Modifier and Type | Method and Description |
---|---|
void |
connectHandlersToWidget(com.google.gwt.user.client.ui.Widget widget)
Connects DOM handlers to widget that are needed for tooltip presentation.
|
int |
getCloseTimeout()
Returns the time (in ms) the tooltip should be displayed after an event
that will cause it to be closed (e.g.
|
int |
getMaxWidth()
Returns the maximum width of the tooltip popup.
|
int |
getOpenDelay()
Returns the time (in ms) that should elapse after an event triggering
tooltip showing has occurred (e.g.
|
int |
getQuickOpenDelay()
Returns the time (in ms) that should elapse before a tooltip will be
shown, in the situation when a tooltip has very recently been shown
(within
getQuickOpenDelay() ms). |
int |
getQuickOpenTimeout()
Returns the time (in ms) during which
getQuickOpenDelay() should
be used instead of getOpenDelay() . |
String |
getUniqueId()
Returns the unique id of the tooltip element.
|
void |
hide() |
void |
hideTooltip() |
void |
initializeAssistiveTooltips()
Initialize the tooltip overlay for assistive devices.
|
boolean |
isTooltipOpen()
For assistive tooltips to work correctly we must have the tooltip visible
and attached to the DOM well in advance.
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
replaceCurrentTooltip()
Replace current open tooltip with new content
|
void |
setCloseTimeout(int closeTimeout)
Sets the time (in ms) the tooltip should be displayed after an event that
will cause it to be closed (e.g.
|
void |
setMaxWidth(int maxWidth)
Sets the maximum width of the tooltip popup.
|
void |
setOpenDelay(int openDelay)
Sets the time (in ms) that should elapse after an event triggering
tooltip showing has occurred (e.g.
|
void |
setPopupPositionAndShow(com.google.gwt.user.client.ui.PopupPanel.PositionCallback callback) |
void |
setQuickOpenDelay(int quickOpenDelay)
Sets the time (in ms) that should elapse before a tooltip will be shown,
in the situation when a tooltip has very recently been shown (within
getQuickOpenDelay() ms). |
void |
setQuickOpenTimeout(int quickOpenTimeout)
Sets the time (in ms) that determines when
getQuickOpenDelay()
should be used instead of getOpenDelay() . |
void |
showAssistive(TooltipInfo info)
Show the tooltip with the provided info for assistive devices.
|
void |
updatePosition(com.google.gwt.user.client.Event event,
boolean isFocused) |
getApplicationConnection, getOverlayContainer, getOverlayContainer, setOverlayContainerLabel
center, getOwner, hide, hide, isFitInWindow, isShadowEnabled, isShimElementEnabled, isSinkShadowEvents, needsShimElement, onAttach, onClose, onDetach, positionOrSizeUpdated, setFitInWindow, setHeight, setOwner, setPopupPosition, setShadowEnabled, setShadowStyle, setSinkShadowEvents, setVisible, setWidth, setZIndex, show, sinkEvents, updateShadowSizeAndPosition, useShadowDiv
addAutoHidePartner, addCloseHandler, addPopupListener, getAnimationType, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onPreviewNativeEvent, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPreviewingAllNativeEvents, setTitle, setWidget, showRelativeTo
add, getWidget, iterator, remove, setWidget
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onLoad, removeFromParent, setLayoutData, unsinkEvents
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final int TOOLTIP_EVENTS
public VTooltip()
ApplicationConnection
. NOTE that #setOwner(Widget)} should be
called after instantiating.ApplicationConnection.getVTooltip()
public void showAssistive(TooltipInfo info)
info
- with the content of the tooltippublic void initializeAssistiveTooltips()
info
- with the content of the tooltippublic boolean isTooltipOpen()
public void hideTooltip()
public void updatePosition(com.google.gwt.user.client.Event event, boolean isFocused)
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent
in interface com.google.gwt.user.client.EventListener
onBrowserEvent
in class com.google.gwt.user.client.ui.Widget
public void replaceCurrentTooltip()
public void connectHandlersToWidget(com.google.gwt.user.client.ui.Widget widget)
widget
- Widget which DOM handlers are connectedpublic String getUniqueId()
public void setPopupPositionAndShow(com.google.gwt.user.client.ui.PopupPanel.PositionCallback callback)
setPopupPositionAndShow
in class com.google.gwt.user.client.ui.PopupPanel
public int getCloseTimeout()
public void setCloseTimeout(int closeTimeout)
closeTimeout
- The close timeout (in ms)public int getQuickOpenTimeout()
getQuickOpenDelay()
should
be used instead of getOpenDelay()
. The quick open delay is used
when the tooltip has very recently been shown, is currently hidden but
about to be shown again.public void setQuickOpenTimeout(int quickOpenTimeout)
getQuickOpenDelay()
should be used instead of getOpenDelay()
. The quick open delay
is used when the tooltip has very recently been shown, is currently
hidden but about to be shown again.quickOpenTimeout
- The quick open timeout (in ms)public int getQuickOpenDelay()
getQuickOpenDelay()
ms).public void setQuickOpenDelay(int quickOpenDelay)
getQuickOpenDelay()
ms).quickOpenDelay
- The quick open delay (in ms)public int getOpenDelay()
getQuickOpenDelay()
is used instead of this.public void setOpenDelay(int openDelay)
getQuickOpenDelay()
is used instead of this.openDelay
- The open delay (in ms)public void setMaxWidth(int maxWidth)
maxWidth
- The maximum width the tooltip popup (in pixels)public int getMaxWidth()
Copyright © 2019 Vaadin Ltd. All rights reserved.