public class Tooltip extends com.google.gwt.user.client.ui.FlowPanel implements com.google.gwt.event.dom.client.MouseOverHandler, com.google.gwt.event.dom.client.MouseOutHandler, com.google.gwt.event.dom.client.MouseDownHandler, IUpgrade
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
Constructor and Description |
---|
Tooltip(com.google.gwt.user.client.ui.Widget widget,
String text)
Setup a tooltip instance below its target and with a standard font size.
|
Tooltip(com.google.gwt.user.client.ui.Widget widget,
String text,
TooltipPosition paramPosition)
Setup a tooltip instance with a standard font size.
|
Tooltip(com.google.gwt.user.client.ui.Widget widget,
String text,
TooltipPosition paramPosition,
TooltipStyle paramStyle)
Setup a tooltip instance with all options to be indicated.
|
Modifier and Type | Method and Description |
---|---|
void |
hide()
remove the panel from its parent.
|
boolean |
isHideOnClick() |
boolean |
isUpgraded() |
void |
onLoad() |
void |
onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event) |
void |
onMouseOut(com.google.gwt.event.dom.client.MouseOutEvent event) |
void |
onMouseOver(com.google.gwt.event.dom.client.MouseOverEvent event) |
void |
setEnabled(boolean inputEnabled)
Control whether the tooltip should be displayed.
|
void |
setHideOnClick(boolean paramHideOnClick) |
void |
setTarget(com.google.gwt.user.client.ui.Widget paramTarget)
Set the target of the tooltip.
|
void |
setText(String text)
Set the text to be displayed inside the tooltip.
|
void |
show()
attach the panel to its parent.
|
void |
upgrade()
Causes the component to be upgraded.
|
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Tooltip(com.google.gwt.user.client.ui.Widget widget, String text, TooltipPosition paramPosition, TooltipStyle paramStyle)
widget
- the target element for which the tooltip is displayedtext
- the content of the tooltipparamPosition
- the anchoring option of the tooltipparamStyle
- the font size of the tooltippublic Tooltip(com.google.gwt.user.client.ui.Widget widget, String text, TooltipPosition paramPosition)
widget
- the target element for which the tooltip is displayedtext
- the content of the tooltipparamPosition
- the anchoring option of the tooltippublic Tooltip(com.google.gwt.user.client.ui.Widget widget, String text)
widget
- the target element for which the tooltip is displayedtext
- the content of the tooltippublic void setText(String text)
text
- the text to be displayed inside the tooltippublic final void onMouseOut(com.google.gwt.event.dom.client.MouseOutEvent event)
onMouseOut
in interface com.google.gwt.event.dom.client.MouseOutHandler
public final void onMouseOver(com.google.gwt.event.dom.client.MouseOverEvent event)
onMouseOver
in interface com.google.gwt.event.dom.client.MouseOverHandler
public final void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
onMouseDown
in interface com.google.gwt.event.dom.client.MouseDownHandler
public boolean isHideOnClick()
public void setHideOnClick(boolean paramHideOnClick)
paramHideOnClick
- determines if the tooltip needs to be hidden when the mouse is
pushedpublic void setEnabled(boolean inputEnabled)
true
, the tooltip will show up next time the mouse is over the
target element. If the tooltip is showing then it will be hidden
immediately.inputEnabled
- controls whether the tooltip will show up when the mouse is over
the targetpublic void setTarget(com.google.gwt.user.client.ui.Widget paramTarget)
paramTarget
- the target of the tooltippublic void onLoad()
onLoad
in class com.google.gwt.user.client.ui.Widget
public void show()
public void hide()
public void upgrade()
IUpgrade
public boolean isUpgraded()
isUpgraded
in interface IUpgrade
Copyright © 2016 com.github.ilyes4j. All rights reserved.