     //--------------------------------------------------------------------------
     
     /**
-     *  Returns the instance of the renderer for the specified item. If the
-     *  the specified item is a visual item (component or IGraphicElment) that 
-     *  doesn't use an item renderer, the item itself is returned.
-     *
-     *  @param item The item whose renderer is to be returned.
+     *  Returns the instance of the renderer at the specified index. If the item 
+     *  at that index is a visual element and uses no renderer, then the visual  
+     *  element will be returned.
+     *
+     *  @param index The item index whose renderer is to be returned.
      *
      *  @return The renderer instance for the specified item. If the item
-     *          is a subclass of DisplayObject or GraphicElement and has no 
-     *          item renderer, the item itself is returned.
-     */
-    public function getItemRenderer(item:Object):Object
-    {
-        var result:Object = null;
-                    
-        if (itemRendererRegistry)
-            result = itemRendererRegistry[item];
-        
-        if (!result && item is DisplayObject)
-            result = item;
-                
-        return result;
-    }
-    
-    /**
-     *  Returns the item associated with the specified renderer.
+     *          is a visual element and has no item renderer, 
+     *          the visual element itself is returned.
+     */
+    public function getItemRenderer(index:int):Object
+    {
+        return itemRendererRegistry[index];
+    }
+    
+    /**
+     *  Returns the item index associated with the specified renderer.
      *
      *  @param renderer The renderer whose item you want to retrieve.
      *
-     *  @return The item associated with the specified renderer.
-     */
-    public function getRendererItem(renderer:Object):Object
-    {
-        // !! This implementation is really slow... 
-        var item:Object;
-        
-        for (var i:int = 0; i < dataProvider.length; i++)
-        {
-            item = dataProvider.getItemAt(i);
-            if (getItemRenderer(item) == renderer)
-                return item;
-        }
-        
-        return null;
+     *  @return The item index associated with the specified renderer, 
+     *          or -1 if there is no item associated with the passed in 
+     *          renderer.
+     */
+    public function getRendererItem(renderer:Object):int
+    {
+        return itemRendererRegistry.indexOf(renderer);
     }
     
     /**

package mx.components
{
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.ColorTransform;
import flash.geom.Matrix;
import flash.geom.Rectangle;
import flash.utils.Dictionary;

import mx.events.FlexEvent;
import mx.events.ItemExistenceChangedEvent;
import mx.graphics.Graphic;
import mx.graphics.IGraphicElement;
import mx.graphics.MaskType;
import mx.utils.MatrixUtil;
import mx.graphics.graphicsClasses.GraphicElement;
import mx.layout.ILayoutElement;
import mx.layout.BasicLayout;
import mx.layout.LayoutElementFactory;

import mx.collections.ICollectionView;
import mx.collections.IList;
import mx.components.baseClasses.GroupBase;
import mx.controls.Label;
import mx.core.IDataRenderer;
import mx.core.IDeferredInstance;
import mx.core.IFactory;
import mx.core.IVisualElement;
import mx.core.IVisualElementContainer;
import mx.core.mx_internal;
import mx.core.UIComponent;
import mx.events.CollectionEvent;
import mx.events.CollectionEventKind
import mx.events.PropertyChangeEvent;
import mx.events.PropertyChangeEventKind;
import mx.styles.IStyleClient;

/**

     */
    override public function getLayoutElementAt(index:int):ILayoutElement
    {
        var myItemRenderer:Object = getItemRenderer(index);

        return LayoutElementFactory.getLayoutElementFor(myItemRenderer);
    }
