     //--------------------------------------------------------------------------
     
     /**
+     *  Returns the name of the state to be applied to the renderer. For example, a
+     *  very basic Grid item renderer would return the String "normal", "hovered", 
+     *  or "selected" to specify the renderer's state. 
+     * 
+     *  <p>A subclass of GridItemRenderer must override this method to return a value 
+     *  if the behavior desired differs from the default behavior.</p>
+     * 
+     *  @return A string specifying the name of the state to apply to the renderer. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function getCurrentRendererState():String
+    {
+        if (dragging && hasState("dragging"))
+            return "dragging";
+        
+        if (selected && showsCaret && hasState("selectedAndShowsCaret"))
+            return "selectedAndShowsCaret";
+        
+        if (hovered && showsCaret && hasState("hoveredAndShowsCaret"))
+            return "hoveredAndShowsCaret";
+        
+        if (showsCaret && hasState("normalAndShowsCaret"))
+            return "normalAndShowsCaret"; 
+        
+        if (selected && hasState("selected"))
+            return "selected";
+        
+        if (hovered && hasState("hovered"))
+            return "hovered";
+        
+        if (hasState("normal"))    
+            return "normal";
+        
+        return null;
+    }
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Methods
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  @private
+     */ 
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+        
+        if (setCurrentStateNeeded)
+        {
+            setCurrentState(getCurrentRendererState(), playTransitions); 
+            setCurrentStateNeeded = false;
+        }
+    }
+    
+    /**
      *  @inheritDoc
      */
     public function prepare(willBeRecycled:Boolean):void

    }
    
    //----------------------------------
    //  rowIndex
    //----------------------------------


        if (_selected == value)
            return;
        
        _selected = value;
        setCurrentState(getCurrentRendererState(), playTransitions);
        dispatchChangeEvent("selectedChanged");        
    }
    
