Packagecom.flexicious.behaviors
Classpublic class TooltipBehavior
InheritanceTooltipBehavior Inheritance Object

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.



Public Properties
 PropertyDefined By
  currentTooltip : IUIComponent
The current tooltip object.
TooltipBehavior
  currentTooltipTrigger : IUIComponent
The current tooltip object trigger.
TooltipBehavior
  ownerComponent : IUIComponent
TooltipBehavior
  tooltipWatcherTimeout : Number = 500
Amount of time to wait after user has moved the mouse away from the tooltip, before we destroy the tooltips.
TooltipBehavior
Protected Properties
 PropertyDefined By
  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
TooltipBehavior
Public Methods
 MethodDefined By
  
TooltipBehavior(ownerComponent:IUIComponent)
TooltipBehavior
  
Hides the current tooltip.
TooltipBehavior
  
showTooltip(relativeTo:IUIComponent, tooltip:IUIComponent, dataContext:Object, point:Point = null, leftOffset:Number = 0, topOffset:Number = 0, offScreenMath:Boolean = true, where:String = left, container:Object = null):void
Displays a tooltip for the control in question.
TooltipBehavior
Protected Methods
 MethodDefined By
  
toolTipMoveHandler(event:Event):void
Dispatched by the system manager when the mouse moves and a tooltip is active...
TooltipBehavior
Property Detail
currentTooltipproperty
public var currentTooltip:IUIComponent

The current tooltip object.

currentTooltipTriggerproperty 
public var currentTooltipTrigger:IUIComponent

The current tooltip object trigger.

ownerComponentproperty 
public var ownerComponent:IUIComponent

tooltipWatcherproperty 
protected var 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

tooltipWatcherTimeoutproperty 
public var tooltipWatcherTimeout:Number = 500

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

Constructor Detail
TooltipBehavior()Constructor
public function TooltipBehavior(ownerComponent:IUIComponent)



Parameters
ownerComponent:IUIComponent
Method Detail
hideTooltip()method
public function hideTooltip():void

Hides the current tooltip.

showTooltip()method 
public function showTooltip(relativeTo:IUIComponent, tooltip:IUIComponent, dataContext:Object, point:Point = null, leftOffset:Number = 0, topOffset:Number = 0, offScreenMath:Boolean = true, where:String = left, container:Object = null):void

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

Parameters

relativeTo:IUIComponent — Which component to position the popup relative to
 
tooltip:IUIComponent — The popup to display
 
dataContext:Object — If the popup has a data property, it will be set to this value
 
point:Point (default = null) — 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:Number (default = 0) — Whether to shift the popup left after calculating the positions, for customizing the actual position
 
topOffset:Number (default = 0) — Whether to shift the popup top after calculating the positions, for customizing the actual position
 
offScreenMath:Boolean (default = true) — Whether or not to adjust the popup if it appears off screen
 
where:String (default = left) — 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 (default = null) — The holder for the tooltip, defaults to UIUtils.getTopLevelApplication(). You may need to override in multi window Air apps. 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.

toolTipMoveHandler()method 
protected function toolTipMoveHandler(event:Event):void

Dispatched by the system manager when the mouse moves and a tooltip is active...

Parameters

event:Event