Class CmsFieldTooltip.Handler

  • All Implemented Interfaces:
    com.google.gwt.event.shared.EventHandler, com.google.gwt.user.client.Event.NativePreviewHandler
    Enclosing class:
    CmsFieldTooltip

    public static class CmsFieldTooltip.Handler
    extends java.lang.Object
    implements com.google.gwt.user.client.Event.NativePreviewHandler
    Event handler for managing tooltip visibility.

    • Constructor Summary

      Constructors 
      Constructor Description
      Handler()
      Creats a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void buttonClick​(CmsFieldTooltip.Data data)
      Called when the user clicks on the icon.
      void buttonHover​(CmsFieldTooltip.Data data)
      Called if the mouse moves over the button with a tooltip.
      void buttonOut​(CmsFieldTooltip.Data data)
      Called if the mouse leaves a button with a tooltip.
      void closeTooltip()
      Closes the tooltip.
      void closeTooltip​(boolean closePersistent)
      Closes the active tooltip.
      com.google.gwt.dom.client.Element getTargetElement​(com.google.gwt.dom.client.NativeEvent nativeEvent)
      Gets the target element for a native event, or null if there is no target element.
      void onPreviewNativeEvent​(com.google.gwt.user.client.Event.NativePreviewEvent event)  
      boolean tooltipContains​(com.google.gwt.dom.client.Element targetElement)
      Checks if the tooltip contains a given element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Handler

        public Handler()
        Creats a new instance.

    • Method Detail

      • buttonHover

        public void buttonHover​(CmsFieldTooltip.Data data)
        Called if the mouse moves over the button with a tooltip.

        Parameters:
        data - the tooltip data for a button
      • buttonOut

        public void buttonOut​(CmsFieldTooltip.Data data)
        Called if the mouse leaves a button with a tooltip.

        Parameters:
        data - the tooltip data for the button
      • closeTooltip

        public void closeTooltip()
        Closes the tooltip.

      • closeTooltip

        public void closeTooltip​(boolean closePersistent)
        Closes the active tooltip.

        Parameters:
        closePersistent - true if a persistent tooltip should also be closed
      • getTargetElement

        public com.google.gwt.dom.client.Element getTargetElement​(com.google.gwt.dom.client.NativeEvent nativeEvent)
        Gets the target element for a native event, or null if there is no target element.

        Parameters:
        nativeEvent - the native event
        Returns:
        the target element, or null if there is no target element
      • onPreviewNativeEvent

        public void onPreviewNativeEvent​(com.google.gwt.user.client.Event.NativePreviewEvent event)
        Specified by:
        onPreviewNativeEvent in interface com.google.gwt.user.client.Event.NativePreviewHandler
        See Also:
        Event.NativePreviewHandler.onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent)
      • tooltipContains

        public boolean tooltipContains​(com.google.gwt.dom.client.Element targetElement)
        Checks if the tooltip contains a given element.

        Parameters:
        targetElement - the element to check
        Returns:
        true if the tooltip contains an element