         this.moduleFactory = moduleFactory;
     }
     
-	//----------------------------------
-	//  icon
-	//----------------------------------
-
-	/**
-	 *  The internal IFlexDisplayObject that displays the icon in this renderer.
-	 */
-	protected var icon:IFlexDisplayObject;
-
-	//----------------------------------
-	//  label
-	//----------------------------------
-
-	/**
-	 *  The internal UITextField that displays the text in this renderer.
-	 */
-	protected var label:IUITextField;
-
-	//----------------------------------
-	//  listData
-	//----------------------------------
-
-	/**
-	 *  @private
-	 *  Storage for the listData property.
-	 */
-	private var _listData:ListData;
-
-	[Bindable("dataChange")]
-	
-	/**
-	 *  The implementation of the <code>listData</code> property as 
-	 *  defined by the IDropInListItemRenderer interface.
-	 *
-	 *  @see mx.controls.listClasses.IDropInListItemRenderer
-	 */
-	public function get listData():BaseListData
-	{
-		return _listData;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set listData(value:BaseListData):void
-	{
-		_listData = ListData(value);
-
-		invalidateProperties();
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Overridden methods
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
-	override protected function createChildren():void
-	{
+    //----------------------------------
+    //  icon
+    //----------------------------------
+
+    /**
+     *  The internal IFlexDisplayObject that displays the icon in this renderer.
+     */
+    protected var icon:IFlexDisplayObject;
+
+    //----------------------------------
+    //  label
+    //----------------------------------
+
+    /**
+     *  The internal UITextField that displays the text in this renderer.
+     */
+    protected var label:IUITextField;
+
+    //----------------------------------
+    //  listData
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the listData property.
+     */
+    private var _listData:ListData;
+
+    [Bindable("dataChange")]
+    
+    /**
+     *  The implementation of the <code>listData</code> property as 
+     *  defined by the IDropInListItemRenderer interface.
+     *
+     *  @see mx.controls.listClasses.IDropInListItemRenderer
+     */
+    public function get listData():BaseListData
+    {
+        return _listData;
+    }
+
+    /**
+     *  @private
+     */
+    public function set listData(value:BaseListData):void
+    {
+        _listData = ListData(value);
+
+        invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
         super.createChildren();
-	
-		createLabel(-1);
-	}
-
-	/**
-	 *  @private
-	 */
-	override protected function commitProperties():void
-	{
-		super.commitProperties();
-
-	    // if the font changed and we already created the label, we will need to 
+    
+        createLabel(-1);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        // if the font changed and we already created the label, we will need to 
         // destory it so it can be re-created, possibly in a different swf context.
-		if (hasFontContextChanged() && label != null)
-        {
-      		var index:int = getChildIndex(DisplayObject(label));
+        if (hasFontContextChanged() && label != null)
+        {
+            var index:int = getChildIndex(DisplayObject(label));
             removeLabel();
- 			createLabel(index);
-        }
-
-		// remove icon if we're recycled and now have a null data
-		if (icon && !_data)
-		{
-			removeChild(DisplayObject(icon));
-			icon = null;
-			iconClass = null;
-		}
-
-		if (_data)
-		{
-			listOwner = TileBase(_listData.owner);
-
-			if (_listData.icon)
-			{
-				var newIconClass:Class = _listData.icon;;
-
-				if (iconClass != newIconClass)
-				{
-					iconClass = newIconClass;
-
-					if (icon)
-						removeChild(DisplayObject(icon));
-
-					icon = new iconClass();
-					addChild(DisplayObject(icon));
-				}
-			}
-
-			// trace(_data.value);
-			label.text = _listData.label;
-
-			label.multiline = listOwner.variableRowHeight;
-
-			label.wordWrap = listOwner.wordWrap;
-		}
-		else
-		{
-			label.text = " ";
-			toolTip = null;
-		}
-
-	}
-
-	/**
-	 *  @private
-	 */
-	override protected function measure():void
-	{
-		super.measure();
-
-		var h:Number = 0;
-
-		if (icon)
-		{
-			h += icon.measuredHeight;
-		}
-
-		if (label.text == "" || label.text == " " || label.text == null)
-		{
-			// hide the label
-			label.explicitHeight = 0;
-			iconOnly = true;
-		}
-		else
-		{
-			// clear so we use measured value
-			label.explicitHeight = NaN;
-			h += getStyle("verticalGap")
-			iconOnly = false;
-		}
-
-		measuredHeight = label.getExplicitOrMeasuredHeight() + h;
-		
-		var paddingLeft:Number = getStyle("paddingLeft");
-		var paddingRight:Number = getStyle("paddingRight");
-
-		measuredWidth = label.getExplicitOrMeasuredWidth() + paddingLeft + paddingRight;
-		if (icon && icon.measuredWidth + paddingLeft + paddingRight > measuredWidth)
-			measuredWidth = icon.measuredWidth + paddingLeft + paddingRight;
-	}
-
-
-	/**
-	 *  @private
-	 */
-	override protected function updateDisplayList(unscaledWidth:Number,
-												  unscaledHeight:Number):void
-	{
-		super.updateDisplayList(unscaledWidth, unscaledHeight);
-
-		var verticalGap:Number = iconOnly ? 0 : getStyle("verticalGap");
-
-		var paddingLeft:Number = getStyle("paddingLeft");
-		var paddingRight:Number = getStyle("paddingRight");
-
-		if (icon)
-		{
-			icon.width = Math.min(unscaledWidth - (paddingLeft + paddingRight), icon.measuredWidth);
-			icon.height = Math.min(Math.max(unscaledHeight - verticalGap - label.getExplicitOrMeasuredHeight(), 0),
-								   icon.measuredHeight);
-			icon.x = paddingLeft + (unscaledWidth - paddingLeft - paddingRight - icon.width) / 2;
-		}
-
-		label.width = unscaledWidth - (paddingLeft + paddingRight);
-		label.height = Math.min(label.getExplicitOrMeasuredHeight(),
-								icon ?
-								Math.max(unscaledHeight - verticalGap - icon.height, 0) :
-								unscaledHeight);
-		label.x = paddingLeft;
-		
-		if (listOwner && listOwner.showDataTips)
-		{
-			// By default label is used for dataTip. We show dataTip when 
-			// text doesnot fit. If user has specified a dataTipField/dataTipFunction
-			// we always display the tip.
-			if ( label.textWidth > label.width ||
-				 (listOwner.dataTipField && listOwner.dataTipField != "label") ||
-				listOwner.dataTipFunction != null)
-			{
-				toolTip = listOwner.itemToDataTip(_data);
-			}
-			else
-			{
-				toolTip = null;
-			}
-		}
-		else
-		{
-			toolTip = null;
-		}
-
-		var startY:Number;
-		var totalHeight:Number = label.height;
-		if (icon)
-			totalHeight += icon.height + verticalGap;
-
-		var verticalAlign:String = getStyle("verticalAlign");
-		if (verticalAlign == "top")
-		{
-			startY = 0;
-			if (icon)
-			{
-				icon.y = startY;
-				startY += verticalGap + icon.height;
-			}
-			label.y = startY;
-		}
-		else if (verticalAlign == "bottom")
-		{
-			startY = unscaledHeight - label.height;
-			label.y = startY;
-			if (icon)
-			{
-				startY -= verticalGap + icon.height;
-				icon.y = startY;
-			}
-		}
-		else
-		{
-			startY = (unscaledHeight - totalHeight) / 2;
-			if (icon)
-			{
-				icon.y = startY;
-				startY += verticalGap + icon.height;
-			}
-			label.y = startY;
-		}
-
-		var labelColor:Number;
-
-		if (data && parent)
-		{
-			if (!enabled)
-				labelColor = getStyle("disabledColor");
-
-			else if (listOwner.isItemSelected(listData.uid))
-        		labelColor = getStyle("textSelectedColor");
-
-			else if (listOwner.isItemHighlighted(listData.uid))
-        		labelColor = getStyle("textRollOverColor");
-
-			else
-        		labelColor = getStyle("color");
-
-       		label.setColor(labelColor);
-		}
-	}
+            createLabel(index);
+        }
+
+        // remove icon if we're recycled and now have a null data
+        if (icon && !_data)
+        {
+            removeChild(DisplayObject(icon));
+            icon = null;
+            iconClass = null;
+        }
+
+        if (_data)
+        {
+            listOwner = TileBase(_listData.owner);
+
+            if (_listData.icon)
+            {
+                var newIconClass:Class = _listData.icon;;
+
+                if (iconClass != newIconClass)
+                {
+                    iconClass = newIconClass;
+
+                    if (icon)
+                        removeChild(DisplayObject(icon));
+
+                    icon = new iconClass();
+                    addChild(DisplayObject(icon));
+                }
+            }
+
+            // trace(_data.value);
+            label.text = _listData.label;
+
+            label.multiline = listOwner.variableRowHeight;
+
+            label.wordWrap = listOwner.wordWrap;
+        }
+        else
+        {
+            label.text = " ";
+            toolTip = null;
+        }
+
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var h:Number = 0;
+
+        if (icon)
+        {
+            h += icon.measuredHeight;
+        }
+
+        if (label.text == "" || label.text == " " || label.text == null)
+        {
+            // hide the label
+            label.explicitHeight = 0;
+            iconOnly = true;
+        }
+        else
+        {
+            // clear so we use measured value
+            label.explicitHeight = NaN;
+            h += getStyle("verticalGap")
+            iconOnly = false;
+        }
+
+        measuredHeight = label.getExplicitOrMeasuredHeight() + h;
+        
+        var paddingLeft:Number = getStyle("paddingLeft");
+        var paddingRight:Number = getStyle("paddingRight");
+
+        measuredWidth = label.getExplicitOrMeasuredWidth() + paddingLeft + paddingRight;
+        if (icon && icon.measuredWidth + paddingLeft + paddingRight > measuredWidth)
+            measuredWidth = icon.measuredWidth + paddingLeft + paddingRight;
+    }
+
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var verticalGap:Number = iconOnly ? 0 : getStyle("verticalGap");
+
+        var paddingLeft:Number = getStyle("paddingLeft");
+        var paddingRight:Number = getStyle("paddingRight");
+
+        if (icon)
+        {
+            icon.width = Math.min(unscaledWidth - (paddingLeft + paddingRight), icon.measuredWidth);
+            icon.height = Math.min(Math.max(unscaledHeight - verticalGap - label.getExplicitOrMeasuredHeight(), 0),
+                                   icon.measuredHeight);
+            icon.x = paddingLeft + (unscaledWidth - paddingLeft - paddingRight - icon.width) / 2;
+        }
+
+        label.width = unscaledWidth - (paddingLeft + paddingRight);
+        label.height = Math.min(label.getExplicitOrMeasuredHeight(),
+                                icon ?
+                                Math.max(unscaledHeight - verticalGap - icon.height, 0) :
+                                unscaledHeight);
+        label.x = paddingLeft;
+        
+        if (listOwner && listOwner.showDataTips)
+        {
+            // By default label is used for dataTip. We show dataTip when 
+            // text doesnot fit. If user has specified a dataTipField/dataTipFunction
+            // we always display the tip.
+            if ( label.textWidth > label.width ||
+                 (listOwner.dataTipField && listOwner.dataTipField != "label") ||
+                listOwner.dataTipFunction != null)
+            {
+                toolTip = listOwner.itemToDataTip(_data);
+            }
+            else
+            {
+                toolTip = null;
+            }
+        }
+        else
+        {
+            toolTip = null;
+        }
+
+        var startY:Number;
+        var totalHeight:Number = label.height;
+        if (icon)
+            totalHeight += icon.height + verticalGap;
+
+        var verticalAlign:String = getStyle("verticalAlign");
+        if (verticalAlign == "top")
+        {
+            startY = 0;
+            if (icon)
+            {
+                icon.y = startY;
+                startY += verticalGap + icon.height;
+            }
+            label.y = startY;
+        }
+        else if (verticalAlign == "bottom")
+        {
+            startY = unscaledHeight - label.height;
+            label.y = startY;
+            if (icon)
+            {
+                startY -= verticalGap + icon.height;
+                icon.y = startY;
+            }
+        }
+        else
+        {
+            startY = (unscaledHeight - totalHeight) / 2;
+            if (icon)
+            {
+                icon.y = startY;
+                startY += verticalGap + icon.height;
+            }
+            label.y = startY;
+        }
+
+        var labelColor:Number;
+
+        if (data && parent)
+        {
+            if (!enabled)
+                labelColor = getStyle("disabledColor");
+
+            else if (listOwner.isItemSelected(listData.uid))
+                labelColor = getStyle("textSelectedColor");
+
+            else if (listOwner.isItemHighlighted(listData.uid))
+                labelColor = getStyle("textRollOverColor");
+
+            else
+                labelColor = getStyle("color");
+
+            label.setColor(labelColor);
+        }
+    }
 
     //--------------------------------------------------------------------------
     //

 *  @see mx.controls.listClasses.IDropInListItemRenderer
 */
public class TileListItemRenderer extends UIComponent
								  implements IDataRenderer,
								  IDropInListItemRenderer, IListItemRenderer,
								  IFontContextComponent
{
	include "../../core/Version.as";

	//--------------------------------------------------------------------------
	//
	//  Constructor
	//
	//--------------------------------------------------------------------------

	/**
	 *  Constructor.
	 */
	public function TileListItemRenderer()
	{
		super();

		addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler);
	}

	//--------------------------------------------------------------------------
	//
	//  Variables
	//
	//--------------------------------------------------------------------------

	/**
	 *  @private
	 */
	private var listOwner:TileBase;

	/**
	 *  @private
	 */
	private var iconClass:Class;

	/**
	 *  @private
	 */
	private var iconOnly:Boolean = false;

	//--------------------------------------------------------------------------
	//
	//  Overridden properties: UIComponent
	//
	//--------------------------------------------------------------------------

    //----------------------------------
    //  baselinePosition

    {
        if (label)
        {
            removeChild(DisplayObject(label));
            label = null;
        }
    }

    //--------------------------------------------------------------------------
    //
    //  Event handlers
    //
    //--------------------------------------------------------------------------

    /**
     *  Positions the ToolTip object.
     *
     *  @param The Event object.
     */
    protected function toolTipShowHandler(event:ToolTipEvent):void
    {
        var toolTip:IToolTip = event.toolTip;

        // Calculate global position of label.
        var pt:Point = new Point(0, 0);
        pt = label.localToGlobal(pt);
        pt = stage.globalToLocal(pt);

        toolTip.move(pt.x, pt.y + (height - toolTip.height) / 2);

        var screen:Rectangle = systemManager.screen;
        var screenRight:Number = screen.x + screen.width;
        if (toolTip.x + toolTip.width > screenRight)
            toolTip.move(screenRight - toolTip.width, toolTip.y);
    }
    
    /**
     *  @private
     */
    mx_internal function getLabel():IUITextField
    {
        return label;
    }
}

}
