      */
     private var inSetLayoutBoundsSize:Boolean = false;
 
+    /**
+     *  @private
+     *  Temporarily stores the values of styles specified with setStyle() until 
+     *  moduleFactory is set.
+     */
+    private var deferredSetStyles:Object = null;
+
     //--------------------------------------------------------------------------
     //
     //  Properties 

    //
    //  IStyleClient Methods and Properties
    //  (source code from mx.controls.dataGridClassses.DataGridItemRenderer.as)
    //  The original code in initProtoChain() has been modified at calls to 
    //  addStyleDeclarationToProtoChain().
    //-------------------------------------------------------------------------- 
    
    /**

    //
    //--------------------------------------------------------------------------
    
    [Bindable(style="true")]
    /**
     *  @private 
     */
    override public function getStyle(styleProp:String):*
    {
        // If a moduleFactory has not be set yet, first check for any deferred
        // styles. If there are no deferred styles or the styleProp is not in 
        // the deferred styles, the look in the proto chain.
        if (!moduleFactory)
        {
            if (deferredSetStyles && deferredSetStyles[styleProp] !== undefined)
                return deferredSetStyles[styleProp];
        }
        
        return super.getStyle(styleProp);
    }
    
    /**
     *  @copy mx.core.UIComponent#setStyle()
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5
     *  @productversion Flex 4.5
     */
    override public function setStyle(styleProp:String, newValue:*):void
    {
        // If there is no module factory then defer the set
        // style until a module factory is set.
        if (moduleFactory)
        {
            StyleProtoChain.setStyle(this, styleProp, newValue);
        }
        else
        {
            if (!deferredSetStyles)
                deferredSetStyles = new Object();
            deferredSetStyles[styleProp] = newValue;
        }   
    }
        
    /**
     *  @private
     */
