Class CmsFieldTooltip.Handler
java.lang.Object
org.opencms.gwt.client.ui.input.form.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 Object
implements com.google.gwt.user.client.Event.NativePreviewHandler
Event handler for managing tooltip visibility.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the user clicks on the icon.voidCalled if the mouse moves over the button with a tooltip.voidCalled if the mouse leaves a button with a tooltip.voidCloses the tooltip.voidcloseTooltip(boolean closePersistent) Closes the active tooltip.com.google.gwt.dom.client.ElementgetTargetElement(com.google.gwt.dom.client.NativeEvent nativeEvent) Gets the target element for a native event, or null if there is no target element.voidonPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event) booleantooltipContains(com.google.gwt.dom.client.Element targetElement) Checks if the tooltip contains a given element.
-
Constructor Details
-
Handler
public Handler()Creats a new instance.
-
-
Method Details
-
buttonClick
Called when the user clicks on the icon.- Parameters:
data- the tooltip data
-
buttonHover
Called if the mouse moves over the button with a tooltip.- Parameters:
data- the tooltip data for a button
-
buttonOut
Called if the mouse leaves a button with a tooltip.- Parameters:
data- the tooltip data for the button
-
closeTooltip
Closes the tooltip. -
closeTooltip
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
- Specified by:
onPreviewNativeEventin interfacecom.google.gwt.user.client.Event.NativePreviewHandler- See Also:
-
tooltipContains
Checks if the tooltip contains a given element.- Parameters:
targetElement- the element to check- Returns:
- true if the tooltip contains an element
-