Class CmsButtonBarHandler

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

    public final class CmsButtonBarHandler
    extends java.lang.Object
    implements com.google.gwt.event.dom.client.MouseOverHandler, com.google.gwt.event.dom.client.MouseOutHandler
    Helper class for controlling visibility of button hover bars of attribute value views.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String HOVERABLE_MARKER
      CSS class used for identifying widgets which normally react to hover events in touch-only mode.
      static CmsButtonBarHandler INSTANCE
      Global instance of the button bar handler.
      static int TIMEOUT
      The timeout for hiding the buttons.
    • Method Detail

      • closeAll

        public void closeAll()
        Closes all visible button bars and menus.

      • 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)
      • addSubmenu

        protected void addSubmenu​(CmsChoiceMenuEntryWidget entryWidget)
        Adds a new submenu.

        Parameters:
        entryWidget - the entry widget whose children should be added to the submenu
      • cleanUpSubmenus

        protected void cleanUpSubmenus​(CmsChoiceMenuEntryWidget entryWidget)
        Removes unnecessary submenus when the user hovers over a given menu entry.

        Parameters:
        entryWidget - the menu entry over which the user is hovering
      • removeSubmenu

        protected void removeSubmenu​(CmsChoiceSubmenu submenu)
        Removes a submenu and hides it.

        Parameters:
        submenu - the submenu to remove
      • useClickAsFakeHover

        protected boolean useClickAsFakeHover​(com.google.gwt.user.client.EventListener source,
                                              boolean isMouseDown)
        In touch-only mode, this is used to process some clicks to trigger actions that would be normally triggered by hovering over the same GUI element.
        Parameters:
        source - the event source
        isMouseDown - true if the event is a mousedown event
        Returns:
        true if the event should be cancelled