         obj.inheritingStyles = inheritChain;
         obj.nonInheritingStyles = nonInheritChain;
     }
+
+    /**
+     *  @private
+     *  Implements the setStyle() logic for UIComponent and TextGraphicElement.
+     *  The 'object' parameter will be one or the other.
+     */
+    public static function setStyle(object:IStyleClient, styleProp:String,
+                                    newValue:*):void
+    {
+        if (styleProp == "styleName")
+        {
+            // Let the setter handle this one, see UIComponent.
+            object.styleName = newValue;
+
+            // Short circuit, because styleName isn't really a style.
+            return;
+        }
+
+        if (EffectManager.getEventForEffectTrigger(styleProp) != "")
+            EffectManager.setStyle(styleProp, object);
+
+        // If this UIComponent didn't previously have any inline styles,
+        // then regenerate the UIComponent's proto chain (and the proto chains
+        // of this UIComponent's descendants).
+        var isInheritingStyle:Boolean =
+            StyleManager.isInheritingStyle(styleProp);
+        var isProtoChainInitialized:Boolean =
+            object.inheritingStyles != StyleProtoChain.STYLE_UNINITIALIZED;
+        var valueChanged:Boolean = object.getStyle(styleProp) != newValue;
+        
+        if (!object.styleDeclaration)
+        {
+            object.styleDeclaration = new CSSStyleDeclaration();
+           
+            object.styleDeclaration.mx_internal::setStyle(styleProp, newValue);
+
+            // If inheritingStyles is undefined, then this object is being
+            // initialized and we haven't yet generated the proto chain.  To
+            // avoid redundant work, don't bother to create the proto chain here.
+            if (isProtoChainInitialized)
+                object.regenerateStyleCache(isInheritingStyle);
+        }
+        else
+        {
+            object.styleDeclaration.mx_internal::setStyle(styleProp, newValue);
+        }
+
+        if (isProtoChainInitialized && valueChanged)
+        {
+            object.styleChanged(styleProp);
+            object.notifyStyleChangeInChildren(styleProp, isInheritingStyle);
+        }
+    }
+
+    /**
+     *  @private
+     *  Implements the styleChanged() logic for UIComponent and TextGraphicElement.
+     *  The 'object' parameter will be one or the other.
+     */
+    public static function styleChanged(object:IInvalidating, styleProp:String):void
+    {
+        // If font changed, then invalidateProperties so
+        // we can re-create the text field in commitProperties
+        // TODO: Should hasFontContextChanged() be added to IFontContextComponent?
+        if (object is IFontContextComponent &&
+            "hasFontContextChanged" in object &&
+            object["hasFontContextChanged"]())
+        {
+            object.invalidateProperties();
+        }
+        
+        // Check to see if this is one of the style properties
+        // that is known to affect layout.
+        if (!styleProp ||
+            styleProp == "styleName" ||
+            StyleManager.isSizeInvalidatingStyle(styleProp))
+        {
+            // This style property change may affect the layout of this
+            // object. Signal the LayoutManager to re-measure the object.
+            object.invalidateSize();
+        }
+
+        // TODO: Should initThemeColor() be in some interface?
+        if (!styleProp || 
+            styleProp == "styleName" ||
+            styleProp == "themeColor")
+        {
+            if ("initThemeColor" in object)
+                object["initThemeColor"]();
+        }
+        
+        object.invalidateDisplayList();
+
+        // TODO: Unify concept of parent for UIComponents and GraphicElements
+        var parent:IInvalidating;
+        if (object is UIComponent)
+            parent = UIComponent(object).parent as IInvalidating;
+        else if ("elementHost" in object) // object is TextGraphicElement
+            parent = object["elementHost"] as IInvalidating;
+
+        if (parent)
+        {
+            if (StyleManager.isParentSizeInvalidatingStyle(styleProp))
+                parent.invalidateSize();
+
+            if (StyleManager.isParentDisplayListInvalidatingStyle(styleProp))
+                parent.invalidateDisplayList();
+        }
+    }
 }
 
 }

     *  whether the style chain has already been built or not.
     */
    public static const STYLE_UNINITIALIZED:Object = {};
    
    //--------------------------------------------------------------------------
    //
    //  Class methods
    //
    //--------------------------------------------------------------------------

    /**
     *  @private

{

import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.system.ApplicationDomain;
import flash.utils.getQualifiedClassName;
import flash.utils.getQualifiedSuperclassName;
import mx.core.ApplicationGlobals;
import mx.core.FlexVersion;
import mx.core.IFlexDisplayObject;
import mx.core.IFontContextComponent;
import mx.core.IInvalidating;
import mx.core.IFlexModuleFactory;
import mx.core.IUITextField;
import mx.core.mx_internal;
import mx.core.UIComponent;
import mx.effects.EffectManager;
import mx.managers.SystemManager;
import mx.modules.ModuleManager;
import mx.styles.IStyleClient;
import mx.styles.StyleProxy;

