public abstract class AbstractTooltip extends Object implements IsWidget, HasWidgets, HasOneWidget, HasId, HasHover
HasWidgets.ForIsWidget| Constructor and Description |
|---|
AbstractTooltip(String dataTarget)
Creates the empty Tooltip
|
AbstractTooltip(String dataTarget,
String title)
Creates the tooltip with given title.
|
AbstractTooltip(String dataTarget,
Widget w)
Creates the tooltip around this widget
|
AbstractTooltip(String dataTarget,
Widget w,
String title)
Creates the tooltip around this widget with given title
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Widget child) |
HandlerRegistration |
addHiddenHandler(HiddenHandler hiddenHandler)
Adds a hidden handler to the Tooltip that will be fired when the Tooltip's hidden event is fired
|
HandlerRegistration |
addHideHandler(HideHandler hideHandler)
Adds a hide handler to the Tooltip that will be fired when the Tooltip's hide event is fired
|
HandlerRegistration |
addShowHandler(ShowHandler showHandler)
Adds a show handler to the Tooltip that will be fired when the Tooltip's show event is fired
|
HandlerRegistration |
addShownHandler(ShownHandler shownHandler)
Adds a shown handler to the Tooltip that will be fired when the Tooltip's shown event is fired
|
void |
addTooltipArrowClassName(String tooltipArrowClassName)
Add a tooltip arrow div class name
|
void |
addTooltipClassName(String tooltipClassName)
Add a tooltip div class name
|
void |
addTooltipInnerClassName(String tooltipInnerClassName)
Add a tooltip inner div class name
|
Widget |
asWidget() |
protected void |
bindJavaScriptEvents(Element e) |
protected abstract void |
call(String arg) |
void |
clear() |
protected JavaScriptObject |
createOptions(Element e,
boolean animation,
boolean html,
String selector,
String trigger,
int showDelay,
int hideDelay,
String container,
String template,
String viewportSelector,
int viewportPadding)
Create the options for the tooltip.
|
void |
destroy()
Force the Tooltip to be destroyed
|
String |
getAlternateTemplate()
Get the alternate template used to render the tooltip.
|
String |
getContainer()
Get where the hover will render it's HTML code
|
int |
getHideDelayMs()
Get the delay in MS to hide the hover component
|
String |
getId()
Gets the ID of the widget
|
Placement |
getPlacement()
Get the Placement of the hover component
|
String |
getSelector()
Get the tooltip's selector
|
int |
getShowDelayMs()
Get the delay in MS to show the hover component
|
String |
getTitle()
Gets the tooltip's display string
|
String |
getTooltipArrowClassNames()
Get the tooltip arrow div class names
|
String |
getTooltipClassNames()
Get the tooltip div class names
|
String |
getTooltipInnerClassNames()
Get the tooltip inner div class names
|
Trigger |
getTrigger()
Get the hover component's trigger
|
int |
getViewportPadding() |
String |
getViewportSelector() |
Widget |
getWidget() |
void |
hide()
Force hide the Tooltip
|
abstract void |
init()
Initializes the tooltip for use.
|
boolean |
isAnimated()
Get whether or not the hover widget will be animated
|
boolean |
isHtml()
Get whether or not the hover widget will render HTML
|
boolean |
isInitialized() |
Iterator<Widget> |
iterator() |
protected void |
onHidden(Event evt)
Can be override by subclasses to handle Tooltip's "hidden" event however
it's recommended to add an event handler to the tooltip.
|
protected void |
onHide(Event evt)
Can be override by subclasses to handle Tooltip's "hide" event however
it's recommended to add an event handler to the tooltip.
|
protected void |
onInserted(Event evt)
Can be override by subclasses to handle Tooltip's "inserted" event however
it's recommended to add an event handler to the tooltip.
|
protected void |
onShow(Event evt)
Can be override by subclasses to handle Tooltip's "show" event however
it's recommended to add an event handler to the tooltip.
|
protected void |
onShown(Event evt)
Can be override by subclasses to handle Tooltip's "shown" event however
it's recommended to add an event handler to the tooltip.
|
protected String |
prepareTemplate() |
void |
reconfigure()
Deprecated.
will be removed after the next release.
|
void |
recreate()
Recreate the tooltip/popover with a default dealy of 300ms between the call to destroy and init.
|
void |
recreate(int delay)
Recreate the tooltip/popover.
|
boolean |
remove(Widget w) |
void |
setAlternateTemplate(String alternateTemplate)
Set the alternate template used to render the tooltip.
|
void |
setContainer(String container)
Sets the custom container that the hover's HTML will render in
|
void |
setHideDelayMs(int hideDelayMs)
Set the delay in MS that the hover component takes to hide
|
void |
setHtml(SafeHtml html)
Sets the tooltip's display string in HTML format
|
void |
setId(String id)
Sets the ID on the widget
|
void |
setInitialized(boolean initialized) |
void |
setIsAnimated(boolean isAnimated)
Set whether or not to animate the displaying of the hover widget
|
void |
setIsHtml(boolean isHTML)
Set to make the hover widget display HTML code
|
void |
setPlacement(Placement placement)
Sets the placement of the hover component
|
void |
setSelector(String selector)
Set the tooltip's selector
|
void |
setShowDelayMs(int showDelayMs)
Set the delay in MS that the hover component takes to display
|
void |
setText(String text)
Deprecated.
use
setTitle(String). |
void |
setTitle(String title)
Sets the tooltip's display string
|
void |
setTooltipArrowClassNames(String tooltipArrowClassNames)
Set the tooltip arrow div class names
|
void |
setTooltipClassNames(String tooltipClassNames)
Set the tooltip div class names
|
void |
setTooltipInnerClassNames(String tooltipInnerClassNames)
Set the tooltip inner div class names
|
void |
setTrigger(Trigger trigger)
Set what will trigger the showing of the hover component
|
void |
setViewportPadding(int viewportPadding) |
void |
setViewportSelector(String viewportSelector) |
void |
setWidget(IsWidget w) |
void |
setWidget(Widget w) |
void |
show()
Force show the Tooltip
|
void |
toggle()
Toggle the Tooltip to either show/hide
|
String |
toString() |
protected abstract void |
updateTitleWhenShowing()
Update the title.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic AbstractTooltip(String dataTarget)
public AbstractTooltip(String dataTarget, String title)
title - title for the tooltippublic AbstractTooltip(String dataTarget, Widget w)
w - widget for the tooltippublic AbstractTooltip(String dataTarget, Widget w, String title)
w - widget for the tooltiptitle - title for the tooltippublic void add(Widget child)
add in interface HasWidgetspublic HandlerRegistration addHiddenHandler(HiddenHandler hiddenHandler)
hiddenHandler - HiddenHandler to handle the hidden eventpublic HandlerRegistration addHideHandler(HideHandler hideHandler)
hideHandler - HideHandler to handle the hide eventpublic HandlerRegistration addShowHandler(ShowHandler showHandler)
showHandler - ShowHandler to handle the show eventpublic HandlerRegistration addShownHandler(ShownHandler shownHandler)
shownHandler - ShownHandler to handle the shown eventpublic void addTooltipArrowClassName(String tooltipArrowClassName)
tooltipArrowClassName - a tooltip arrow div class namepublic void addTooltipClassName(String tooltipClassName)
tooltipClassName - a tooltip div class namepublic void addTooltipInnerClassName(String tooltipInnerClassName)
tooltipInnerClassName - a tooltip inner div class nameprotected void bindJavaScriptEvents(Element e)
public void clear()
clear in interface HasWidgetsprotected JavaScriptObject createOptions(Element e, boolean animation, boolean html, String selector, String trigger, int showDelay, int hideDelay, String container, String template, String viewportSelector, int viewportPadding)
public void destroy()
public String getAlternateTemplate()
public String getContainer()
getContainer in interface HasHoverpublic int getHideDelayMs()
getHideDelayMs in interface HasHoverpublic Placement getPlacement()
getPlacement in interface HasHoverpublic String getSelector()
public int getShowDelayMs()
getShowDelayMs in interface HasHoverpublic String getTitle()
public String getTooltipArrowClassNames()
public String getTooltipClassNames()
public String getTooltipInnerClassNames()
public Trigger getTrigger()
getTrigger in interface HasHoverpublic int getViewportPadding()
public String getViewportSelector()
public Widget getWidget()
getWidget in interface HasOneWidgetpublic void hide()
public abstract void init()
public boolean isAnimated()
isAnimated in interface HasHoverpublic boolean isHtml()
public boolean isInitialized()
public Iterator<Widget> iterator()
iterator in interface HasWidgetsiterator in interface Iterable<Widget>protected void onHidden(Event evt)
evt - EventHiddenEventprotected void onHide(Event evt)
evt - EventHideEventprotected void onInserted(Event evt)
evt - EventInsertedEventprotected void onShow(Event evt)
evt - EventShowEventprotected void onShown(Event evt)
evt - EventShownEventprotected String prepareTemplate()
public void reconfigure()
public void recreate()
public void recreate(int delay)
delay - the delay in ms between the call to destroy and init.public boolean remove(Widget w)
remove in interface HasWidgetspublic void setAlternateTemplate(String alternateTemplate)
alternateTemplate - the alternate template used to render the tooltippublic void setContainer(String container)
setContainer in interface HasHovercontainer - String selector of where to render the hover's HTML codepublic void setHideDelayMs(int hideDelayMs)
setHideDelayMs in interface HasHoverhideDelayMs - int number of MS to delay the hidepublic void setHtml(SafeHtml html)
text - String display string in HTML formatpublic void setInitialized(boolean initialized)
initialized - the initialized to setpublic void setIsAnimated(boolean isAnimated)
setIsAnimated in interface HasHoverisAnimated - boolean to animate or notpublic void setIsHtml(boolean isHTML)
public void setPlacement(Placement placement)
setPlacement in interface HasHoverplacement - Placement of the hover componentpublic void setSelector(String selector)
selector - the tooltip's selectorpublic void setShowDelayMs(int showDelayMs)
setShowDelayMs in interface HasHovershowDelayMs - int number of MS to delay the displaypublic void setText(String text)
setTitle(String).text - String display string.public void setTitle(String title)
title - String display stringpublic void setTooltipArrowClassNames(String tooltipArrowClassNames)
tooltipArrowClassNames - the tooltip arrow div class namespublic void setTooltipClassNames(String tooltipClassNames)
tooltipClassNames - the tooltip div class namespublic void setTooltipInnerClassNames(String tooltipInnerClassNames)
tooltipInnerClassNames - the tooltip inner div class namespublic void setTrigger(Trigger trigger)
setTrigger in interface HasHovertrigger - Trigger how the hover component will showpublic void setViewportPadding(int viewportPadding)
viewportPadding - the viewportPadding to setpublic void setViewportSelector(String viewportSelector)
viewportSelector - the viewportSelector to setpublic void setWidget(IsWidget w)
setWidget in interface AcceptsOneWidgetpublic void setWidget(Widget w)
setWidget in interface HasOneWidgetpublic void show()
public void toggle()
protected abstract void updateTitleWhenShowing()
Copyright © 2017. All rights reserved.