 {
     include "../../core/Version.as";
     
-    //--------------------------------------------------------------------------
+	//--------------------------------------------------------------------------
+	//
+	//  Static Methods
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 *  Shows the tooltip for one of the grid's item renderers.
+	 *  This is the handler for the <code>ToolTipEvent.TOOL_TIP_SHOW</code>
+	 *  event in GridItemRenderer, DefaultGridItemRenderer, and 
+	 *  UITextFieldGridItemRenderer which are installed by the corresponding
+	 *  constructors.
+	 *  The item renderer's tool tip is computed just before it is shown.
+	 * 
+	 *  If the item renderer's column <code>showDataTips<code> property is true, 
+	 *  a placeholder tool tip is registered with the tool tip manager so that 
+	 *  mouse handlers are put in place to detect when the tool tip should be
+	 *  shown by calling this handler.
+	 *   
+	 *  This handler replaces the placeholder text with the actual text and 
+	 *  resizes the tooltip before moving it into position.  
+	 *  The tip is positioned over the item renderer with the origin of the tip 
+	 *  at 0, 0, after accounting for the layoutDirection of the grid.
+	 *  
+	 *  The current target is expected to implement IGridItemRenderer and
+	 *  IUIComponent.
+	 */	
+	static mx_internal function toolTipShowHandler(event:ToolTipEvent):void
+	{
+		var toolTip:IToolTip = event.toolTip;
+		
+		const renderer:IGridItemRenderer = event.currentTarget as IGridItemRenderer;
+		if (!renderer)
+			return;
+		
+		const uiComp:IUIComponent = event.currentTarget as IUIComponent;
+		if (!uiComp)
+			return;
+		
+		// Determine if the toolTip needs to be adjusted for RTL layout.
+		const mirror:Boolean = renderer.layoutDirection == LayoutDirection.RTL;
+		
+		// Lazily compute the tooltip text and recalculate its width.
+		toolTip.text = renderer.column.itemToDataTip(renderer.data);
+		ToolTipManager.sizeTip(toolTip);
+		
+		// Move the origin of the tooltip to the origin of this item renderer
+		
+		var sm:ISystemManager = uiComp.systemManager.topLevelSystemManager;
+		var sbRoot:DisplayObject = sm.getSandboxRoot();
+		var screen:Rectangle = sm.getVisibleApplicationRect(null, true);
+		
+		const x:int = mirror ? renderer.width - toolTip.width : 0;
+		var pt:Point = new Point(x, 0);
+		
+		pt = uiComp.localToGlobal(pt);
+		pt = sbRoot.globalToLocal(pt);          
+		
+		toolTip.move(pt.x, Math.round(pt.y + (renderer.height - toolTip.height) / 2));
+		
+		const screenRight:Number = screen.x + screen.width;
+		pt.x = toolTip.x;
+		pt.y = toolTip.y;
+		pt = sbRoot.localToGlobal(pt);
+		
+		if (pt.x + toolTip.width > screenRight)
+		{
+			pt.x = toolTip.x - (pt.x + toolTip.width - screenRight);
+			toolTip.move(pt.x, toolTip.y);
+		}
+		
+		if (mirror && pt.x < 0)
+			toolTip.move(0, toolTip.y);
+	}
+         
+   //--------------------------------------------------------------------------
     //
     //  Constructor
     //

        
        setCurrentStateNeeded = true;
        
        addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler);           
    }
    
    //--------------------------------------------------------------------------

    public function discard(willBeRecycled:Boolean):void
    {
    }
            
}
}