flexiciousNmsp.TooltipBehavior Class
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
()
Item Index
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
ObjectWhich component to position the popup relative to
-
tooltip
ObjectThe popup to display
-
dataContext
ObjectIf the popup has a data property, it will be set to this value
-
point
ObjectIf 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
ObjectWhether to shift the popup left after calculating the positions, for customizing the actual position
-
topOffset
ObjectWhether to shift the popup top after calculating the positions, for customizing the actual position
-
offScreenMath
ObjectWhether or not to adjust the popup if it appears off screen
-
where
ObjectOne 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
ObjectThe 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.