Home Reference Source
public class | source

TooltipBehavior

Extends:

TypedObject → TooltipBehavior

Attaches the tooltip behavior to any UI component. The behavior does not automatically trigger, however, it does wrap all the functionality needed to display a tooltip type control next to the requesting control.

Constructor Summary

Public Constructor
public

constructor(ownerComponent: *)

Member Summary

Public Members
public
public

The current tooltip object.

public

The current tooltip object trigger.

public

The spinner associates itself with this component

public

A timer that watches the mouse and destroys the tooltip when the mouse is outside the tooltip and the the trigger for more than tooltipWatcherTimeout msec interval

public

Amount of time to wait after user has moved the mouse away from the tooltip, before we destroy the tooltips.

Method Summary

Public Methods
public
public
public

kill()

public

showTooltip(relativeTo: *, tooltip: *, dataContext: *, point: *, leftOffset: *, topOffset: *, offScreenMath: *, where: *, container: *)

Displays a tooltip for the control in question.

Inherited Summary

From class TypedObject
public

typeCache: {}

public
public

Returns a list of strings that represent the object hierarchy for this object.

public

Returns true if the class name to check is in the list of class names defined for this class.

Public Constructors

public constructor(ownerComponent: *) source

Override:

TypedObject#constructor

Params:

NameTypeAttributeDescription
ownerComponent *

Public Members

public container: * source

public currentTooltip: * source

The current tooltip object.

Properties:

NameTypeAttributeDescription
currentTooltip *

public currentTooltipTrigger: * source

The current tooltip object trigger.

Properties:

NameTypeAttributeDescription
currentTooltipTrigger *

public ownerComponent: * source

The spinner associates itself with this component

Properties:

NameTypeAttributeDescription
ownerComponent *

public tooltipWatcher: * source

A timer that watches the mouse and destroys the tooltip when the mouse is outside the tooltip and the the trigger for more than tooltipWatcherTimeout msec interval

Properties:

NameTypeAttributeDescription
tooltipWatcher *

public tooltipWatcherTimeout: * source

Amount of time to wait after user has moved the mouse away from the tooltip, before we destroy the tooltips. Defaults to 500 msec.

Properties:

NameTypeAttributeDescription
tooltipWatcherTimeout *

Public Methods

public getClassNames(): string[] source

Returns a list of strings that represent the object hierarchy for this object.

Override:

TypedObject#getClassNames

Return:

string[]

public hideTooltip() source

public kill() source

public showTooltip(relativeTo: *, tooltip: *, dataContext: *, point: *, leftOffset: *, topOffset: *, offScreenMath: *, where: *, container: *) source

Displays a tooltip for the control in question. The tooltip will disappear if the mouse moves over an area that is not the 'relativeTo' component or the tooltip component.

By default, the tooltip will go away once you hover the mouse out of the trigger cell or the tooltip and stayed that way for tooltipWatcherTimeout. You may also manually remove the tooltip by calling the hideToolTip() function.

Params:

NameTypeAttributeDescription
relativeTo *

Which component to position the popup relative to

tooltip *

The popup to display

dataContext *

If the popup has a data property, it will be set to this value

point *

If you specify this, the relativeTo is ignored, and the popup appears at the exact point you specify. Please ensure that the X and Y are relative to the Grid.

leftOffset *

Whether to shift the popup left after calculating the positions, for customizing the actual position

topOffset *

Whether to shift the popup top after calculating the positions, for customizing the actual position

offScreenMath *

Whether or not to adjust the popup if it appears off screen

where *

One of three values, left, right or none. If left, positions to bottom left, if right, positions to bottom right, if none, positions right below the relativeTo component.

container *

The holder for the tooltip, defaults to UIUtils.getTopLevelApplication(). You may need to override in multi window Air apps.