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 TypeMethodDescriptionvoid
Called when the user clicks on the icon.void
Called if the mouse moves over the button with a tooltip.void
Called if the mouse leaves a button with a tooltip.void
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.
-
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:
onPreviewNativeEvent
in interfacecom.google.gwt.user.client.Event.NativePreviewHandler
- See Also:
-
Event.NativePreviewHandler.onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent)
-
tooltipContains
Checks if the tooltip contains a given element.- Parameters:
targetElement
- the element to check- Returns:
- true if the tooltip contains an element
-