Class CmsToolTipHandler

  • All Implemented Interfaces:
    com.google.gwt.event.dom.client.MouseMoveHandler, com.google.gwt.event.dom.client.MouseOutHandler, com.google.gwt.event.dom.client.MouseOverHandler, com.google.gwt.event.shared.EventHandler

    public class CmsToolTipHandler
    extends java.lang.Object
    implements com.google.gwt.event.dom.client.MouseOverHandler, com.google.gwt.event.dom.client.MouseMoveHandler, com.google.gwt.event.dom.client.MouseOutHandler
    A tool-tip handler. Allowing to show any HTML as a tool-tip on mouse over.

    Since:
    8.0.0
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsToolTipHandler​(com.google.gwt.event.dom.client.HasAllMouseHandlers target, java.lang.String toolTipHtml)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearShowing()
      Removes the tool-tip and mouse move and out handlers.
      java.lang.String getToolTipHtml()
      Returns the tool-tip HTML.
      boolean isShowing()
      Returns if the tool-tip is showing.
      void onMouseMove​(com.google.gwt.event.dom.client.MouseMoveEvent event)  
      void onMouseOut​(com.google.gwt.event.dom.client.MouseOutEvent event)  
      void onMouseOver​(com.google.gwt.event.dom.client.MouseOverEvent event)  
      void removeHandler()
      Removes this tool-tip handler completely.
      void setOffsetLeft​(int offsetLeft)
      Sets the tool-tip left offset.
      void setOffsetTop​(int offsetTop)
      Sets the tool-tip top offset.
      void setToolTipHtml​(java.lang.String toolTipHtml)
      Sets the tool-tip HTML.
      • Methods inherited from class java.lang.Object

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

      • CmsToolTipHandler

        public CmsToolTipHandler​(com.google.gwt.event.dom.client.HasAllMouseHandlers target,
                                 java.lang.String toolTipHtml)
        Constructor. Adds the tool-tip handler to the target.

        Parameters:
        target - the target to show the tool-tip on
        toolTipHtml - the tool-tip content
    • Method Detail

      • clearShowing

        public void clearShowing()
        Removes the tool-tip and mouse move and out handlers.

      • getToolTipHtml

        public java.lang.String getToolTipHtml()
        Returns the tool-tip HTML.

        Returns:
        the tool-tip HTML
      • isShowing

        public boolean isShowing()
        Returns if the tool-tip is showing.

        Returns:
        true if the tool-tip is showing
      • onMouseMove

        public void onMouseMove​(com.google.gwt.event.dom.client.MouseMoveEvent event)
        Specified by:
        onMouseMove in interface com.google.gwt.event.dom.client.MouseMoveHandler
        See Also:
        MouseMoveHandler.onMouseMove(com.google.gwt.event.dom.client.MouseMoveEvent)
      • onMouseOut

        public void onMouseOut​(com.google.gwt.event.dom.client.MouseOutEvent event)
        Specified by:
        onMouseOut in interface com.google.gwt.event.dom.client.MouseOutHandler
        See Also:
        MouseOutHandler.onMouseOut(com.google.gwt.event.dom.client.MouseOutEvent)
      • onMouseOver

        public void onMouseOver​(com.google.gwt.event.dom.client.MouseOverEvent event)
        Specified by:
        onMouseOver in interface com.google.gwt.event.dom.client.MouseOverHandler
        See Also:
        MouseOverHandler.onMouseOver(com.google.gwt.event.dom.client.MouseOverEvent)
      • removeHandler

        public void removeHandler()
        Removes this tool-tip handler completely. This instance will not be reusable.

      • setOffsetLeft

        public void setOffsetLeft​(int offsetLeft)
        Sets the tool-tip left offset.

        Parameters:
        offsetLeft - the tool-tip left offset to set
      • setOffsetTop

        public void setOffsetTop​(int offsetTop)
        Sets the tool-tip top offset.

        Parameters:
        offsetTop - the tool-tip top offset to set
      • setToolTipHtml

        public void setToolTipHtml​(java.lang.String toolTipHtml)
        Sets the tool-tip HTML.

        Parameters:
        toolTipHtml - the tool-tip HTML to set