com.extjs.gxt.ui.client.widget.tips
Class ToolTipConfig

java.lang.Object
  extended by com.extjs.gxt.ui.client.widget.tips.ToolTipConfig

public class ToolTipConfig
extends java.lang.Object

Configuration information for a tool tip.


Constructor Summary
ToolTipConfig()
          Creates a new tool tip config.
ToolTipConfig(java.lang.String text)
          Creates a new tool tip config with the given text.
ToolTipConfig(java.lang.String title, java.lang.String text)
          Creates a new tool tip config with the given title and text.
 
Method Summary
 java.lang.String getAnchor()
           
 int getAnchorOffset()
           
 int getDismissDelay()
          Returns the dismiss delay.
 int getHideDelay()
          Returns the hide delay in milliseconds.
 int[] getMouseOffset()
          Returns the mouse offset.
 Params getParams()
          Returns the params.
 int getShowDelay()
          Returns the show delay in milliseconds.
 com.google.gwt.user.client.Element getTarget()
          Returns the element the configuration will be applied to.
 Template getTemplate()
          Returns the template.
 java.lang.String getText()
          Returns the tool tip text.
 java.lang.String getTitle()
          Returns the tool tip title.
 boolean isAnchorToTarget()
           
 boolean isAutoHide()
          Returns true if auto hide is enabled.
 boolean isEnabled()
          Returns true if the tool tip is enabled.
 boolean isTrackMouse()
          Returns true if mouse tracking is enabled.
 void setAnchor(java.lang.String anchor)
           
 void setAnchorOffset(int anchorOffset)
           
 void setAnchorToTarget(boolean anchorToTarget)
           
 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 setEnabled(boolean enabled)
          Sets whether the tool tip is enabled (defaults to true).
 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[] mouseOffset)
          An XY offset from the mouse position where the tooltip should be shown (defaults to [15,18]).
 void setParams(Params params)
          The paramters to be used when a custom a template is specified.
 void setShowDelay(int showDelay)
          Delay in milliseconds before the tooltip displays after the mouse enters the target element (defaults to 500).
 void setTemplate(Template template)
          A optional template to be used to render the tool tip.
 void setText(java.lang.String text)
          The tool tip text.
 void setTitle(java.lang.String title)
          Sets the tool tip title.
 void setTrackMouse(boolean trackMouse)
          True to have the tooltip follow the mouse as it moves over the target element (defaults to false).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolTipConfig

public ToolTipConfig()
Creates a new tool tip config.


ToolTipConfig

public ToolTipConfig(java.lang.String text)
Creates a new tool tip config with the given text.

Parameters:
text - the tool tip text

ToolTipConfig

public ToolTipConfig(java.lang.String title,
                     java.lang.String text)
Creates a new tool tip config with the given title and text.

Parameters:
title - the tool tip title
text - the tool tip text
Method Detail

getDismissDelay

public int getDismissDelay()
Returns the dismiss delay.

Returns:
the dismiss delay

getHideDelay

public int getHideDelay()
Returns the hide delay in milliseconds.

Returns:
the delay

getMouseOffset

public int[] getMouseOffset()
Returns the mouse offset.

Returns:
the offset

getParams

public Params getParams()
Returns the params.

Returns:
the params

getShowDelay

public int getShowDelay()
Returns the show delay in milliseconds.

Returns:
the delay

getTarget

public com.google.gwt.user.client.Element getTarget()
Returns the element the configuration will be applied to.

Returns:
the target element

getTemplate

public Template getTemplate()
Returns the template.

Returns:
the template

getText

public java.lang.String getText()
Returns the tool tip text.

Returns:
the text

getTitle

public java.lang.String getTitle()
Returns the tool tip title.

Returns:
the title

isAutoHide

public boolean isAutoHide()
Returns true if auto hide is enabled.

Returns:
the auto hide state

isEnabled

public boolean isEnabled()
Returns true if the tool tip is enabled.

Returns:
true for enabled

isTrackMouse

public boolean isTrackMouse()
Returns true if mouse tracking is enabled.

Returns:
the mouse track state

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).

Parameters:
autoHide - the auto hide state

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

setEnabled

public void setEnabled(boolean enabled)
Sets whether the tool tip is enabled (defaults to true).

Parameters:
enabled - true to enable

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[] mouseOffset)
An XY offset from the mouse position where the tooltip should be shown (defaults to [15,18]).

Parameters:
mouseOffset - the offset

setParams

public void setParams(Params params)
The paramters to be used when a custom a template is specified.

Parameters:
params - the params

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

setTemplate

public void setTemplate(Template template)
A optional template to be used to render the tool tip. The params will be applied to the template. If specified, title and text will be added to the params before being applied to the template.

Parameters:
template - the template

setText

public void setText(java.lang.String text)
The tool tip text.

Parameters:
text - the text

setTitle

public void setTitle(java.lang.String title)
Sets the tool tip title.

Parameters:
title - the title

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 - the track mouse state

setAnchor

public void setAnchor(java.lang.String anchor)

getAnchor

public java.lang.String getAnchor()

setAnchorToTarget

public void setAnchorToTarget(boolean anchorToTarget)

isAnchorToTarget

public boolean isAnchorToTarget()

setAnchorOffset

public void setAnchorOffset(int anchorOffset)

getAnchorOffset

public int getAnchorOffset()