Class CmsFieldTooltip
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Composite
-
- org.opencms.gwt.client.ui.input.form.CmsFieldTooltip
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.IsRenderable
,com.google.gwt.user.client.ui.IsWidget
public class CmsFieldTooltip extends com.google.gwt.user.client.ui.Composite
Tooltip widget for element setting help texts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsFieldTooltip.Data
Data needed to create a tooltip.static class
CmsFieldTooltip.Handler
Event handler for managing tooltip visibility.protected static interface
CmsFieldTooltip.I_UiBinder
The ui binder interface for this widget.
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gwt.user.client.ui.HTML
m_label
The label with the help text.
-
Constructor Summary
Constructors Constructor Description CmsFieldTooltip(CmsFieldTooltip.Data data)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsFieldTooltip.Data
getData()
Gets the tooltip data.static CmsFieldTooltip.Handler
getHandler()
Gets the handler instance.com.google.gwt.user.client.ui.HTML
getLabel()
Gets the label for the help text.boolean
isPersistent()
Checks if the tooltip is persistent, i.e.void
makePersistent()
Makes the tooltip persistent, i.e.static void
position(com.google.gwt.dom.client.Element elem, com.google.gwt.dom.client.Element referenceElement)
Positions the tooltip.-
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
-
-
-
Field Detail
-
m_label
@UiField protected com.google.gwt.user.client.ui.HTML m_label
The label with the help text.
-
-
Constructor Detail
-
CmsFieldTooltip
public CmsFieldTooltip(CmsFieldTooltip.Data data)
Creates a new instance.- Parameters:
data
- the tooltip data
-
-
Method Detail
-
getHandler
public static CmsFieldTooltip.Handler getHandler()
Gets the handler instance.- Returns:
- the handler instance
-
position
public static void position(com.google.gwt.dom.client.Element elem, com.google.gwt.dom.client.Element referenceElement)
Positions the tooltip.- Parameters:
elem
- the tooltip elementreferenceElement
- the tooltip icon element
-
getData
public CmsFieldTooltip.Data getData()
Gets the tooltip data.- Returns:
- the tooltip data
-
getLabel
public com.google.gwt.user.client.ui.HTML getLabel()
Gets the label for the help text.- Returns:
- the label for the help text
-
isPersistent
public boolean isPersistent()
Checks if the tooltip is persistent, i.e. it can no longer be closed by leaving the button with the mouse cursor, but needs to be closed by clicking somewhere else.- Returns:
- true if the tooltip is persistent
-
makePersistent
public void makePersistent()
Makes the tooltip persistent, i.e. it can no longer be closed by leaving the button with the mouse cursor, but needs to be closed by clicking somewhere else.
-
-