com.extjs.gxt.ui.client.widget.tips
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.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.BoxComponent
                  extended by com.extjs.gxt.ui.client.widget.Container<T>
                      extended by com.extjs.gxt.ui.client.widget.ScrollContainer<Component>
                          extended by com.extjs.gxt.ui.client.widget.LayoutContainer
                              extended by com.extjs.gxt.ui.client.widget.ContentPanel
                                  extended by com.extjs.gxt.ui.client.widget.tips.Tip
                                      extended by com.extjs.gxt.ui.client.widget.tips.ToolTip
All Implemented Interfaces:
Observable, IconSupport, 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.IsWidget
Direct Known Subclasses:
QuickTip

public class ToolTip
extends Tip

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


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
protected  El anchorEl
           
protected  java.lang.String anchorStyle
           
protected  com.google.gwt.user.client.Timer dismissTimer
           
protected  com.google.gwt.user.client.Timer hideTimer
           
protected  Listener<ComponentEvent> listener
           
protected  com.google.gwt.user.client.Timer showTimer
           
protected  Component target
           
protected  Point targetXY
           
protected  java.lang.String text
           
protected  java.lang.String title
           
protected  ToolTipConfig toolTipConfig
           
 
Fields inherited from class com.extjs.gxt.ui.client.widget.tips.Tip
constrainPosition, quickShowInterval
 
Fields inherited from class com.extjs.gxt.ui.client.widget.ContentPanel
bbarStyle, bodStyle, body, bwrap, bwrapStyle, collapseStyle, fbar, footerStyle, frame, head, headerStyle, headerTextStyle, tbarStyle
 
Fields inherited from class com.extjs.gxt.ui.client.widget.Container
attachChildren, enableLayout, layoutExecuted, layoutNeeded, layoutOnAttach, layoutOnChange
 
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width
 
Fields inherited from class com.extjs.gxt.ui.client.widget.Component
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ToolTip()
          Creates a new tool tip.
ToolTip(Component target)
          Creates a new tool tip.
ToolTip(Component target, ToolTipConfig config)
          Creates a new tool tip for the given target.
 
Method Summary
protected  void afterRender()
          Called after the component has been rendered and is attached for the first time.
protected  void clearTimer(java.lang.String timer)
           
protected  void clearTimers()
           
protected  void delayHide()
           
protected  void delayShow()
           
protected  java.lang.String getAnchorAlign()
           
protected  int[] getOffsets()
           
 int getQuickShowInterval()
          Returns the quick show interval.
 ToolTipConfig getToolTipConfig()
          Returns the current tool tip config.
 void hide()
          Hide this component.
 void initTarget(Component target)
           
protected  void onMouseMove(ComponentEvent ce)
           
protected  void onRender(com.google.gwt.user.client.Element target, int index)
          Subclasses must override and ensure setElement is called for lazy rendered components.
protected  void onTargetOut(ComponentEvent ce)
           
protected  void onTargetOver(ComponentEvent ce)
           
protected  void onWindowResize(int width, int height)
           
 void setQuickShowInterval(int quickShowInterval)
          Sets the quick show interval (defaults to 250).
 void show()
          Show this component.
 void showAt(int x, int y)
          Shows this tip at the specified position.
protected  void syncAnchor()
           
 void update(ToolTipConfig config)
          Updates the tool tip with the given config.
protected  void updateContent()
           
 
Methods inherited from class com.extjs.gxt.ui.client.widget.tips.Tip
doAutoWidth, getMaxWidth, getMinWidth, isClosable, onDisable, setClosable, setMaxWidth, setMinWidth, showAt
 
Methods inherited from class com.extjs.gxt.ui.client.widget.ContentPanel
addButton, adjustBodySize, afterCollapse, afterExpand, collapse, createStyles, doAttachChildren, doDetachChildren, expand, getAnimCollapse, getBody, getBodyBorder, getBodyStyle, getBottomComponent, getButtonAlign, getButtonBar, getCollapseBtn, getCollapsible, getElement, getFrame, getFrameHeight, getFrameSize, getFrameWidth, getHeader, getHeading, getIcon, getInnerHeight, getInnerWidth, getLayoutTarget, getMinButtonWidth, getTitleCollapse, getTitleText, getTopComponent, initTools, isCollapsed, isExpanded, isFooter, isHeaderVisible, isHideCollapseTool, layoutBars, notifyHide, notifyShow, onClick, onCollapse, onComponentEvent, onEnable, onExpand, onResize, remove, setAnimCollapse, setBodyBorder, setBodyStyle, setBodyStyleName, setBottomComponent, setButtonAlign, setCollapsible, setExpanded, setFooter, setFrame, setHeaderVisible, setHeading, setHideCollapseTool, setIcon, setIconStyle, setInsetBorder, setMinButtonWidth, setTitleCollapse, setTopComponent, setUrl
 
Methods inherited from class com.extjs.gxt.ui.client.widget.LayoutContainer
add, add, addText, findComponent, getLayout, getWindowResizeDelay, insert, insert, isLayoutOnChange, isMonitorWindowResize, layout, layout, onBlur, onFocus, remove, removeAll, setLayout, setLayoutData, setLayoutOnChange, setMonitorWindowResize, setWindowResizeDelay
 
Methods inherited from class com.extjs.gxt.ui.client.widget.ScrollContainer
addScrollListener, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Container
add, adjustIndex, adopt, createContainerEvent, disable, doLayout, doLayout, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, insert, isLayoutNeeded, iterator, onAfterLayout, onAttach, onBeforeLayoutExcecuted, onInsert, onLayoutExcecuted, onRemove, orphan, remove, removeAll, scrollIntoView, setLayoutNeeded, wrapWidget
 
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent
adjustPosition, adjustSize, createComponentEvent, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onHide, onPosition, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Component
addAttachable, addListener, addPlugin, addStyleName, addStyleOnOver, addWidgetListener, applyState, assertAfterRender, assertPreRender, beforeRender, blur, clearState, createObservable, disableContextMenu, disableEvents, disableTextSelection, el, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, frame, getAriaSupport, getBaseStyle, getBorders, getContextMenu, getData, getElement, getFocusEl, getFocusSupport, getHideMode, getId, getItemId, getListeners, getModel, getObservable, getPlugins, getState, getStateId, getTabIndex, getTitle, getToolTip, hasListeners, hasListeners, hideToolTip, initState, isDisabledEvents, isDisableTextSelection, isEnabled, isMasked, isRendered, isStateful, isVisible, isVisible, mask, mask, mask, onBrowserEvent, onDetach, onDetachHelper, onEnsureDebugId, onHideContextMenu, onLoad, onRightClick, onShowContextMenu, previewEvent, recalculate, removeAllListeners, removeAttachagle, removeFromParent, removeListener, removeStyleName, removeStyleOnOver, removeSwallow, removeToolTip, removeWidgetListener, render, render, repaint, saveState, setAriaRole, setAriaState, setAriaSupport, setBorders, setContextMenu, setData, setEl, setElement, setElement, setEnabled, setFiresEvents, setHideMode, setId, setIntStyleAttribute, setItemId, setModel, setParent, setStateful, setStateId, setStyleAttribute, setStyleName, setTabIndex, setTitle, setToolTip, setToolTip, setVisible, setZIndex, sinkEvents, swallowEvent, swallowEvent, toString, unframe, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

anchorEl

protected El anchorEl

anchorStyle

protected java.lang.String anchorStyle

dismissTimer

protected com.google.gwt.user.client.Timer dismissTimer

hideTimer

protected com.google.gwt.user.client.Timer hideTimer

listener

protected Listener<ComponentEvent> listener

showTimer

protected com.google.gwt.user.client.Timer showTimer

target

protected Component target

targetXY

protected Point targetXY

title

protected java.lang.String title

text

protected java.lang.String text

toolTipConfig

protected ToolTipConfig toolTipConfig
Constructor Detail

ToolTip

public ToolTip()
Creates a new tool tip.


ToolTip

public ToolTip(Component target)
Creates a new tool tip.

Parameters:
target - the target widget

ToolTip

public ToolTip(Component target,
               ToolTipConfig config)
Creates a new tool tip for the given target.

Parameters:
target - the target widget
Method Detail

getQuickShowInterval

public int getQuickShowInterval()
Returns the quick show interval.

Returns:
the quick show interval

getToolTipConfig

public ToolTipConfig getToolTipConfig()
Returns the current tool tip config.

Returns:
the tool tip config

hide

public void hide()
Description copied from class: Component
Hide this component. Fires the BeforeHide event before the component is hidden, the fires the Hide event after the component is hidden.

Overrides:
hide in class Tip

initTarget

public void initTarget(Component target)

setQuickShowInterval

public void setQuickShowInterval(int quickShowInterval)
Sets the quick show interval (defaults to 250).

Parameters:
quickShowInterval - the quick show interval

show

public void show()
Description copied from class: Component
Show this component. Fires the BeforeShow event before the component is made visible, then fires the Show event after the component is visible.

Overrides:
show in class Component

showAt

public void showAt(int x,
                   int y)
Description copied from class: Tip
Shows this tip at the specified position.

Overrides:
showAt in class Tip
Parameters:
x - the x coordinate
y - the y coordinate

update

public void update(ToolTipConfig config)
Updates the tool tip with the given config.

Parameters:
config - the tool tip config

afterRender

protected void afterRender()
Description copied from class: Component
Called after the component has been rendered and is attached for the first time. At this time, the component will be part of the DOM which is required when retrieving location and offsets.

Overrides:
afterRender in class ScrollContainer<Component>

clearTimer

protected void clearTimer(java.lang.String timer)

clearTimers

protected void clearTimers()

delayHide

protected void delayHide()

delayShow

protected void delayShow()

getAnchorAlign

protected java.lang.String getAnchorAlign()

getOffsets

protected int[] getOffsets()

onMouseMove

protected void onMouseMove(ComponentEvent ce)

onRender

protected void onRender(com.google.gwt.user.client.Element target,
                        int index)
Description copied from class: Component
Subclasses must override and ensure setElement is called for lazy rendered components.

Overrides:
onRender in class Tip
Parameters:
target - the target element
index - the insert location

onTargetOut

protected void onTargetOut(ComponentEvent ce)

onTargetOver

protected void onTargetOver(ComponentEvent ce)

onWindowResize

protected void onWindowResize(int width,
                              int height)
Overrides:
onWindowResize in class Component

syncAnchor

protected void syncAnchor()

updateContent

protected void updateContent()
Overrides:
updateContent in class Tip