Class VTooltip

  • 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 VTooltip
    extends VOverlay
    TODO open for extension
    • Nested Class Summary

      • 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
      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

        com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
    • Constructor Summary

      Constructors 
      Constructor Description
      VTooltip()
      Used to show tooltips; usually used via the singleton in ApplicationConnection.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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)  
      • 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, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onPreviewNativeEvent, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, 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
      • Methods inherited from interface com.google.gwt.event.logical.shared.CloseHandler

        onClose
      • Methods inherited from interface com.google.gwt.event.shared.HasHandlers

        fireEvent
    • Method Detail

      • showAssistive

        public void showAssistive​(TooltipInfo info)
        Show the tooltip with the provided info for assistive devices.
        Parameters:
        info - with the content of the tooltip
      • initializeAssistiveTooltips

        public void initializeAssistiveTooltips()
        Initialize the tooltip overlay for assistive devices.
        Parameters:
        info - with the content of the tooltip
        Since:
        7.2.4
      • isTooltipOpen

        public boolean isTooltipOpen()
        For assistive tooltips to work correctly we must have the tooltip visible and attached to the DOM well in advance. For this reason both isShowing and isVisible return false positives. We can't override either of them as external code may depend on this behavior.
        Returns:
        boolean
      • hideTooltip

        public void hideTooltip()
      • hide

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

        public void updatePosition​(com.google.gwt.user.client.Event event,
                                   boolean isFocused)
      • 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
      • replaceCurrentTooltip

        public void replaceCurrentTooltip()
        Replace current open tooltip with new content
      • connectHandlersToWidget

        public void connectHandlersToWidget​(com.google.gwt.user.client.ui.Widget widget)
        Connects DOM handlers to widget that are needed for tooltip presentation.
        Parameters:
        widget - Widget which DOM handlers are connected
      • getUniqueId

        public String getUniqueId()
        Returns the unique id of the tooltip element.
        Returns:
        String containing the unique id of the tooltip, which always has a value
      • setPopupPositionAndShow

        public void setPopupPositionAndShow​(com.google.gwt.user.client.ui.PopupPanel.PositionCallback callback)
        Overrides:
        setPopupPositionAndShow in class com.google.gwt.user.client.ui.PopupPanel
      • getCloseTimeout

        public int getCloseTimeout()
        Returns the time (in ms) the tooltip should be displayed after an event that will cause it to be closed (e.g. mouse click outside the component, key down).
        Returns:
        The close timeout (in ms)
      • setCloseTimeout

        public 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. mouse click outside the component, key down).
        Parameters:
        closeTimeout - The close timeout (in ms)
      • getQuickOpenTimeout

        public int getQuickOpenTimeout()
        Returns the time (in ms) during which 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.
        Returns:
        The quick open timeout (in ms)
      • setQuickOpenTimeout

        public void setQuickOpenTimeout​(int quickOpenTimeout)
        Sets the time (in ms) that determines when 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.
        Parameters:
        quickOpenTimeout - The quick open timeout (in ms)
      • getQuickOpenDelay

        public 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).
        Returns:
        The quick open delay (in ms)
      • setQuickOpenDelay

        public 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).
        Parameters:
        quickOpenDelay - The quick open delay (in ms)
      • getOpenDelay

        public int getOpenDelay()
        Returns the time (in ms) that should elapse after an event triggering tooltip showing has occurred (e.g. mouse over) before the tooltip is shown. If a tooltip has recently been shown, then getQuickOpenDelay() is used instead of this.
        Returns:
        The open delay (in ms)
      • setOpenDelay

        public void setOpenDelay​(int openDelay)
        Sets the time (in ms) that should elapse after an event triggering tooltip showing has occurred (e.g. mouse over) before the tooltip is shown. If a tooltip has recently been shown, then getQuickOpenDelay() is used instead of this.
        Parameters:
        openDelay - The open delay (in ms)
      • setMaxWidth

        public void setMaxWidth​(int maxWidth)
        Sets the maximum width of the tooltip popup.
        Parameters:
        maxWidth - The maximum width the tooltip popup (in pixels)
      • getMaxWidth

        public int getMaxWidth()
        Returns the maximum width of the tooltip popup.
        Returns:
        The maximum width the tooltip popup (in pixels)