API Docs for:
Show:

flexiciousNmsp.TooltipBehavior Class

Extends TypedObject

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

flexiciousNmsp.TooltipBehavior

()

Methods

hideTooltip Hides the current tooltip.

()

kill

()

showTooltip

(
  • relativeTo
  • tooltip
  • dataContext
  • point
  • leftOffset
  • topOffset
  • offScreenMath
  • where
  • container
)

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.

Parameters:

  • relativeTo Object

    Which component to position the popup relative to

  • tooltip Object

    The popup to display

  • dataContext Object

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

  • point Object

    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 Object

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

  • topOffset Object

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

  • offScreenMath Object

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

  • where Object

    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 Object

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

Properties

currentTooltip

UIComponent

The current tooltip object.

currentTooltipTrigger

UIComponent

The current tooltip object trigger.

ownerComponent

UIComponent

The spinner associates itself with this component

tooltipWatcher

Timer

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

tooltipWatcherTimeout

Int

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