com.gwtext.client.widgets
Class ToolTip

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.gwtext.client.widgets.Component
              extended by com.gwtext.client.widgets.BoxComponent
                  extended by com.gwtext.client.widgets.Container
                      extended by com.gwtext.client.widgets.Panel
                          extended by com.gwtext.client.widgets.Tip
                              extended by com.gwtext.client.widgets.ToolTip
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, Observable
Direct Known Subclasses:
QuickTip

public class ToolTip
extends Tip

A standard tooltip implementation for providing additional information when hovering over a target element.


Field Summary
 
Fields inherited from class com.gwtext.client.widgets.Component
config, id
 
Constructor Summary
ToolTip()
           
ToolTip(com.google.gwt.core.client.JavaScriptObject jsObj)
           
ToolTip(java.lang.String html)
           
 
Method Summary
 void applyTo(Component component)
          Applies the tooltip to the specified target.
 void applyTo(com.google.gwt.user.client.Element target)
          Applies the tooltip to the specified target.
 void applyTo(java.lang.String elementID)
          Applies the tooltip to the specified target.
protected  com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
           
 void hide()
          Hides this tooltip if visible.
 void setAutoHide(boolean autoHide)
          True to automatically hide the tooltip after the mouse exits the target element or after the dismissDelay has expired if set (defaults to true).
 void setDismissDelay(int dismissDelay)
          Delay in milliseconds before the tooltip automatically hides (defaults to 5000).
 void setHideDelay(int hideDelay)
          Delay in milliseconds after the mouse exits the target element but before the tooltip actually hides (defaults to 200).
 void setMouseOffset(int x, int y)
          An XY offset from the mouse position where the tooltip should be shown.
 void setShowDelay(int showDelay)
          Delay in milliseconds before the tooltip displays after the mouse enters the target element (defaults to 500).
 void setTrackMouse(boolean trackMouse)
          True to have the tooltip follow the mouse as it moves over the target element (defaults to false).
 void show()
          Shows this tooltip at the current event target XY position.
 
Methods inherited from class com.gwtext.client.widgets.Tip
setClosable, setDefaultAlign, setMaxWidth, setMinWidth, setShadow, setShadow, setWidth, showAt, showBy, showBy, showBy, showBy
 
Methods inherited from class com.gwtext.client.widgets.Panel
addButton, addListener, addTool, collapse, collapse, expand, expand, getBaseCls, getBody, getBodyStyle, getBodyWrap, getBottomToolbar, getCollapsedCls, getCollapseFirst, getConfigPrototype, getFloating, getFooter, getFrameHeight, getFrameWidth, getHeader, getHtml, getIconCls, getInnerHeight, getInnerWidth, getMinButtonWidth, getShadowOffset, getTabCls, getTitle, getTopToolbar, getUpdateManager, getXType, isAnimCollapse, isAutoScroll, isBodyBorder, isBorder, isClosable, isCollapsed, isCollapsible, isFrame, isHeader, isHeaderAsText, isHideCollapseTool, isMaskDisabled, isShadow, isShim, isTitleCollapse, load, load, setAnimCollapse, setAutoLoad, setAutoLoad, setAutoScroll, setBaseCls, setBodyBorder, setBodyStyle, setBorder, setBottomToolbar, setBottomToolbar, setBottomToolbar, setButtonAlign, setButtons, setCollapsed, setCollapsedCls, setCollapseFirst, setCollapsible, setContentEl, setDraggable, setFloating, setFooter, setFrame, setHeader, setHeaderAsText, setHideCollapseTool, setHtml, setIconCls, setMargins, setMargins, setMaskDisabled, setMinButtonWidth, setPaddings, setPaddings, setShadowOffset, setShim, setTabCls, setTitle, setTitle, setTitleCollapse, setTools, setTopToolbar, setTopToolbar, setTopToolbar, toggleCollapse, toggleCollapse
 
Methods inherited from class com.gwtext.client.widgets.Container
add, add, add, add, addListener, bubble, cascade, clear, doLayout, doLayout, findBy, findByID, findByType, getActiveItem, getActiveItemID, getAutoDestroy, getBufferResize, getComponent, getComponent, getComponents, getHideBorders, getItems, getLayout, getMonitorResize, insert, iterator, remove, remove, remove, remove, removeAll, removeAll, setActiveItem, setActiveItemID, setAutoDestroy, setBufferResize, setDefaults, setHideBorders, setLayout, setMonitorResize
 
Methods inherited from class com.gwtext.client.widgets.BoxComponent
addListener, doOnRender, doOnRender, getAutoHeight, getAutoWidth, getBox, getBox, getHeight, getPosition, getPosition, getSize, getWidth, setAutoHeight, setAutoWidth, setHeight, setHeight, setPagePosition, setPosition, setSize, setSize, setWidth, syncSize, updateBox
 
Methods inherited from class com.gwtext.client.widgets.Component
addClass, addClassCreated, addEvent, addEvents, addListener, addListener, addListener, addPlugin, addStyleDependentName, addStyleName, afterRender, beforeDestroy, check, checkExtVer, cloneComponent, cloneComponent, cloneConfig, destroy, disable, enable, equals, error, findParentBy, findParentByType, fireEvent, focus, focus, focus, getApplyTo, getAttribute, getAttributeAsBoolean, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAutoShow, getCls, getComponentJS, getConfig, getConfigAsString, getCtCls, getDisabledClass, getEl, getElement, getElement, getElement, getHideMode, getHideParent, getId, getItemId, getJsObj, getOffsetHeight, getOffsetWidth, getOrCreateJsObj, getOwnerContainer, getRenderTo, getStateEvents, getStateId, getXTypes, hashCode, initComponent, isCreated, isDisabled, isHidden, isRendered, isVisible, isXType, isXType, onDestroy, purgeListeners, removeClass, removeStyleDependentName, removeStyleName, render, render, render, render, render, render, resumeEvents, setApplyTo, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoEl, setAutoEl, setAutoShow, setCls, setCtCls, setDisabled, setDisabledClass, setEl, setEl, setElement, setHideMode, setHideParent, setId, setRenderTo, setRenderToID, setStateEvents, setStateId, setStyle, setStyle, setStyleName, setStylePrimaryName, setVisible, suspendEvents, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
getAbsoluteLeft, getAbsoluteTop, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, setPixelSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToolTip

public ToolTip()

ToolTip

public ToolTip(java.lang.String html)

ToolTip

public ToolTip(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail

create

protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
Overrides:
create in class Tip

setAutoHide

public void setAutoHide(boolean autoHide)
True to automatically hide the tooltip after the mouse exits the target element or after the dismissDelay has expired if set (defaults to true). If closable = true a close tool button will be rendered into the tooltip header.

Parameters:
autoHide - true to auto hide

setDismissDelay

public void setDismissDelay(int dismissDelay)
Delay in milliseconds before the tooltip automatically hides (defaults to 5000). To disable automatic hiding, set dismissDelay = 0.

Parameters:
dismissDelay - the dismiss delay

setHideDelay

public void setHideDelay(int hideDelay)
Delay in milliseconds after the mouse exits the target element but before the tooltip actually hides (defaults to 200). Set to 0 for the tooltip to hide immediately.

Parameters:
hideDelay - the hide delay

setMouseOffset

public void setMouseOffset(int x,
                           int y)
An XY offset from the mouse position where the tooltip should be shown.

Parameters:
x - the X offset
y - the Y offset

setShowDelay

public void setShowDelay(int showDelay)
Delay in milliseconds before the tooltip displays after the mouse enters the target element (defaults to 500).

Parameters:
showDelay - the show delay

setTrackMouse

public void setTrackMouse(boolean trackMouse)
True to have the tooltip follow the mouse as it moves over the target element (defaults to false).

Parameters:
trackMouse - true to track mouse

hide

public void hide()
Hides this tooltip if visible.

Overrides:
hide in class Component

show

public void show()
Shows this tooltip at the current event target XY position.

Overrides:
show in class Component

applyTo

public void applyTo(com.google.gwt.user.client.Element target)
Applies the tooltip to the specified target.

Parameters:
target - the target element

applyTo

public void applyTo(java.lang.String elementID)
Applies the tooltip to the specified target. Note that the element with the specified ID must be rendered to the DOM before this call is made.

Parameters:
elementID - the target element ID

applyTo

public void applyTo(Component component)
Applies the tooltip to the specified target.

Parameters:
component - the component to apply the tooltip to