Package org.opencms.acacia.client
Class CmsButtonBarHandler
- java.lang.Object
-
- org.opencms.acacia.client.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addSubmenu(CmsChoiceMenuEntryWidget entryWidget)
Adds a new submenu.protected void
cleanUpSubmenus(CmsChoiceMenuEntryWidget entryWidget)
Removes unnecessary submenus when the user hovers over a given menu entry.void
closeAll()
Closes all visible button bars and menus.protected CmsChoiceSubmenu
getLastSubmenu()
Gets the last entry in the current list of active submenus.void
onMouseOut(com.google.gwt.event.dom.client.MouseOutEvent event)
void
onMouseOver(com.google.gwt.event.dom.client.MouseOverEvent event)
protected void
removeSubmenu(CmsChoiceSubmenu submenu)
Removes a submenu and hides it.protected void
setWidgetService(I_CmsWidgetService widgetService)
Sets the widget service.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.
-
-
-
Field Detail
-
HOVERABLE_MARKER
public static final java.lang.String HOVERABLE_MARKER
CSS class used for identifying widgets which normally react to hover events in touch-only mode.- See Also:
- Constant Field Values
-
INSTANCE
public static final CmsButtonBarHandler INSTANCE
Global instance of the button bar handler.
-
TIMEOUT
public static final int TIMEOUT
The timeout for hiding the buttons.- See Also:
- Constant Field Values
-
-
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 interfacecom.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 interfacecom.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
-
getLastSubmenu
protected CmsChoiceSubmenu getLastSubmenu()
Gets the last entry in the current list of active submenus.- Returns:
- the last submenu
-
removeSubmenu
protected void removeSubmenu(CmsChoiceSubmenu submenu)
Removes a submenu and hides it.- Parameters:
submenu
- the submenu to remove
-
setWidgetService
protected void setWidgetService(I_CmsWidgetService widgetService)
Sets the widget service.- Parameters:
widgetService
- the widget service
-
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 sourceisMouseDown
- true if the event is a mousedown event- Returns:
- true if the event should be cancelled
-
-