flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/refactor-sprite] - First batch of refactoring
Date Wed, 27 Jul 2016 14:59:30 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/refactor-sprite [created] fc302ae42


First batch of refactoring


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/fc302ae4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/fc302ae4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/fc302ae4

Branch: refs/heads/refactor-sprite
Commit: fc302ae4231091734812fd49104e46e16e045d54
Parents: e9dbfab
Author: Harbs <harbs@in-tools.com>
Authored: Wed Jul 27 17:59:21 2016 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Wed Jul 27 17:59:21 2016 +0300

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/core/CSSShape.as  |  92 ++++++-
 .../main/flex/org/apache/flex/core/CSSSprite.as |   5 +-
 .../flex/org/apache/flex/core/CSSTextField.as   | 248 ++++++++++++++++++-
 .../org/apache/flex/core/HTMLElementWrapper.as  |  96 ++++++-
 .../main/flex/org/apache/flex/core/IChild.as    |  15 --
 .../apache/flex/core/StyleableCSSTextField.as   |   4 +-
 .../main/flex/org/apache/flex/core/UIBase.as    |  49 ++--
 .../flex/org/apache/flex/core/UIButtonBase.as   |  90 +++++--
 .../org/apache/flex/graphics/GradientEntry.as   |  21 +-
 .../main/flex/org/apache/flex/graphics/IFill.as |   5 +-
 .../org/apache/flex/graphics/IGraphicShape.as   |   4 +-
 .../flex/org/apache/flex/graphics/IStroke.as    |   6 +-
 .../flex/org/apache/flex/graphics/SolidColor.as |   9 +-
 .../apache/flex/graphics/SolidColorStroke.as    |   5 +-
 .../src/main/flex/org/apache/flex/svg/Circle.as |   5 +-
 .../flex/org/apache/flex/svg/CompoundGraphic.as |  21 +-
 .../main/flex/org/apache/flex/svg/Ellipse.as    |   4 +-
 .../flex/org/apache/flex/svg/GraphicShape.as    |   7 +-
 .../flex/org/apache/flex/svg/LinearGradient.as  |   9 +-
 .../src/main/flex/org/apache/flex/svg/Path.as   |   4 +-
 .../src/main/flex/org/apache/flex/svg/Rect.as   |   6 +-
 .../src/main/flex/org/apache/flex/svg/Text.as   |   2 +-
 .../flex/html/accessories/TextPromptBead.as     |   4 +-
 .../flex/html/beads/BackgroundImageBead.as      |   4 +-
 .../html/beads/CSSImageAndTextButtonView.as     |  12 +-
 .../apache/flex/html/beads/CSSTextButtonView.as |  12 +-
 .../org/apache/flex/html/beads/CheckBoxView.as  |   2 +-
 .../org/apache/flex/html/beads/ComboBoxView.as  |   8 +-
 .../org/apache/flex/html/beads/HRuleView.as     |   8 +-
 .../apache/flex/html/beads/HScrollBarView.as    |  31 ++-
 .../org/apache/flex/html/beads/ImageView.as     |   8 +-
 .../apache/flex/html/beads/RadioButtonView.as   |   2 +-
 32 files changed, 629 insertions(+), 169 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
index 27fa182..9e2d770 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
@@ -24,6 +24,8 @@ package org.apache.flex.core
     import org.apache.flex.core.IChild;
     import org.apache.flex.events.Event;
     import org.apache.flex.utils.CSSBorderUtils;
+    import org.apache.flex.events.Event;        
+    import org.apache.flex.events.EventDispatcher;
     
     /**
      *  The Border class is a class used internally by many
@@ -36,7 +38,7 @@ package org.apache.flex.core
      *  @productversion FlexJS 0.0
      */
     COMPILE::SWF
-	public class CSSShape extends Shape implements IStyleableObject, IChild
+	public class CSSShape extends EventDispatcher implements IStyleableObject, IChild
 	{
         /**
          *  Constructor.
@@ -48,9 +50,89 @@ package org.apache.flex.core
          */
 		public function CSSShape()
 		{
-			super();
-		}		
-        
+			_shape = new Shape();
+		}
+
+        private var _shape:Shape;
+
+        public function get shape():Shape
+        {
+            return _shape;
+        }
+        public function set shape(val:Shape):void
+        {
+            _shape = val;
+        }
+
+        private var _parent:IUIBase;
+        public function get parent():IUIBase
+        {
+            return _parent;
+        }
+        public function set parent(val:IUIBase):void
+        {
+            _parent = val;
+        }
+
+        public function get width():Number
+        {
+            return _shape.width;
+        }
+
+        public function set width(value:Number):void
+        {
+            _shape.width = value;
+        }
+
+        public function get height():Number
+        {
+            return _shape.height;
+        }
+
+        public function set height(value:Number):void
+        {
+            _shape.height = value;
+        }
+
+        public function get x():Number
+        {
+            return _shape.x;
+        }
+
+        public function set x(value:Number):void
+        {
+            _shape.x = value;
+        }
+
+        public function get y():Number
+        {
+            return _shape.y;
+        }
+
+        public function set y(value:Number):void
+        {
+            _shape.y = value;
+        }        
+
+        public function get visible():Boolean
+        {
+            return _shape.visible;
+        }
+
+        public function set visible(value:Boolean):void
+        {
+            _shape.visible = value;
+        }
+        public function get alpha():Number
+        {
+            return _shape.alpha;
+        }
+
+        public function set alpha(value:Number):void
+        {
+            _shape.alpha = value;
+        }        
+
         private var _id:String;
         
         /**
@@ -157,7 +239,7 @@ package org.apache.flex.core
          */
         public function draw(w:Number, h:Number):void
         {
-            CSSBorderUtils.draw(this.graphics, w, h, this, state, true);            
+            CSSBorderUtils.draw(shape.graphics, w, h, shape, state, true);            
         }
    	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
index 5775a54..a363b9c 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
@@ -19,7 +19,6 @@
 package org.apache.flex.core
 {
     import flash.display.Graphics;
-    import flash.display.Sprite;
     
     import org.apache.flex.core.IChild;
     import org.apache.flex.events.Event;
@@ -36,7 +35,7 @@ package org.apache.flex.core
      *  @productversion FlexJS 0.0
      */
     COMPILE::SWF
-	public class CSSSprite extends Sprite implements IStyleableObject, IChild
+	public class CSSSprite extends HTMLElementWrapper implements IStyleableObject, IChild
 	{
         /**
          *  Constructor.
@@ -157,7 +156,7 @@ package org.apache.flex.core
          */
         public function draw(w:Number, h:Number):void
         {
-            CSSBorderUtils.draw(this.graphics, w, h, this, state, true);            
+            CSSBorderUtils.draw(sprite.graphics, w, h, sprite, state, true);            
         }
    	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
index c088847..a053284 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
@@ -22,6 +22,8 @@ package org.apache.flex.core
 		import flash.text.TextField;
 		import flash.text.TextFieldAutoSize;
 		import flash.text.TextFormat;
+        import org.apache.flex.events.Event;        
+        import org.apache.flex.events.EventDispatcher;
 	}
 
     import org.apache.flex.core.ValuesManager;
@@ -38,7 +40,7 @@ package org.apache.flex.core
      *  @productversion FlexJS 0.0
      */
     COMPILE::SWF
-	public class CSSTextField extends TextField
+	public class CSSTextField extends EventDispatcher
 	{
         /**
          *  Constructor.
@@ -50,9 +52,232 @@ package org.apache.flex.core
          */
 		public function CSSTextField()
 		{
-			super();
+			_textField = new TextField();
 		}
 
+        private var _textField:TextField;
+        
+        public function get textField():TextField
+        {
+            return _textField;
+        }
+        
+        public function set textField(value:TextField):void
+        {
+            _textField = value;
+        }
+
+        private var _parent:IUIBase;
+        public function get parent():IUIBase
+        {
+            return _parent;
+        }
+        public function set parent(val:IUIBase):void
+        {
+            _parent = val;
+        }
+
+        public function get width():Number
+        {
+            return _textField.width;
+        }
+
+        public function set width(value:Number):void
+        {
+            _textField.width = value;
+        }
+
+        public function get height():Number
+        {
+            return _textField.height;
+        }
+
+        public function set height(value:Number):void
+        {
+            _textField.height = value;
+        }
+
+        public function get x():Number
+        {
+            return _textField.x;
+        }
+
+        public function set x(value:Number):void
+        {
+            _textField.x = value;
+        }
+
+        public function get y():Number
+        {
+            return _textField.y;
+        }
+
+        public function set y(value:Number):void
+        {
+            _textField.y = value;
+        }
+
+        public function get visible():Boolean
+        {
+            return _textField.visible;
+        }
+
+        public function set visible(value:Boolean):void
+        {
+            _textField.visible = value;
+        }
+
+        public function get alpha():Number
+        {
+            return _textField.alpha;
+        }
+
+        public function set alpha(value:Number):void
+        {
+            _textField.alpha = value;
+        }
+
+        public function get embedFonts():Boolean
+        {
+            return _textField.embedFonts;
+        }
+
+        public function set embedFonts(value:Boolean):void
+        {
+            _textField.embedFonts = value;
+        }
+
+        public function get selectable():Boolean
+        {
+            return _textField.selectable;
+        }
+
+        public function set selectable(value:Boolean):void
+        {
+            _textField.selectable = value;
+        }
+
+        public function get type():String
+        {
+            return _textField.type;
+        }
+
+        public function set type(value:String):void
+        {
+            _textField.type = value;
+        }
+
+        public function get mouseEnabled():Boolean
+        {
+            return _textField.mouseEnabled;
+        }
+
+        public function set mouseEnabled(value:Boolean):void
+        {
+            _textField.mouseEnabled = value;
+        }
+
+        public function get autoSize():String
+        {
+            return _textField.autoSize;
+        }
+
+        public function set autoSize(value:String):void
+        {
+            _textField.autoSize = value;
+        }
+
+        public function get textColor():uint
+        {
+            return _textField.textColor;
+        }
+
+        public function set textColor(value:uint):void
+        {
+            _textField.textColor = value;
+        }
+
+        public function get textWidth():Number
+        {
+            return _textField.textWidth;
+        }
+
+        public function get textHeight():Number
+        {
+            return _textField.textHeight;
+        }
+
+        public function get wordWrap():Boolean
+        {
+            return _textField.wordWrap;
+        }
+
+        public function set wordWrap(value:Boolean):void
+        {
+            _textField.wordWrap = value;
+        }
+
+        public function get multiline():Boolean
+        {
+            return _textField.multiline;
+        }
+
+        public function set multiline(value:Boolean):void
+        {
+            _textField.multiline = value;
+        }
+
+        public function get restrict():String
+        {
+            return _textField.restrict;
+        }
+
+        public function set restrict(value:String):void
+        {
+            _textField.restrict = value;
+        }
+
+        public function get maxChars():int
+        {
+            return _textField.maxChars;
+        }
+
+        public function set maxChars(value:int):void
+        {
+            _textField.maxChars = value;
+        }
+
+        public function get displayAsPassword():Boolean
+        {
+            return _textField.displayAsPassword;
+        }
+
+        public function set displayAsPassword(value:Boolean):void
+        {
+            _textField.displayAsPassword = value;
+        }
+
+        public function get htmlText():String
+        {
+            return _textField.htmlText;
+        }
+
+        public function set htmlText(value:String):void
+        {
+            _textField.htmlText = value;
+        }
+
+        public function get name():String
+        {
+            return _textField.name;
+        }
+
+        public function set name(value:String):void
+        {
+            _textField.name = value;
+        }
+
+
         /**
          *  @private
          *  The styleParent property is set if the CSSTextField
@@ -104,7 +329,7 @@ package org.apache.flex.core
         /**
          *  @private
          */
-		override public function set text(value:String):void
+		public function set text(value:String):void
 		{
 			var sp:Object = parent;
 			if (styleParent)
@@ -127,27 +352,32 @@ package org.apache.flex.core
             var align:Object = ValuesManager.valuesImpl.getValue(sp, "text-align", styleState);
             if (align == "center")
 			{
-				autoSize = TextFieldAutoSize.NONE;
+				textField.autoSize = TextFieldAutoSize.NONE;
                 tf.align = "center";
 			}
             else if (align == "right")
 			{
                 tf.align = "right";
-				autoSize = TextFieldAutoSize.NONE;
+				textField.autoSize = TextFieldAutoSize.NONE;
 			}
             if (!parentDrawsBackground)
             {
                 var backgroundColor:Object = ValuesManager.valuesImpl.getValue(sp, "background-color", styleState);
                 if (backgroundColor != null)
                 {
-                    this.background = true;
-                    this.backgroundColor = CSSUtils.toColor(backgroundColor);
+                    textField.background = true;
+                    textField.backgroundColor = CSSUtils.toColor(backgroundColor);
                 }
             }
-			defaultTextFormat = tf;
-			super.text = value;
+			textField.defaultTextFormat = tf;
+			textField.text = value;
 		}
 
+        public function get text():String
+        {
+            return textField.text;
+        }
+
         private function updateStyles(event:Event):void
         {
             // force styles to be re-calculated

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
index 57e4ce3..d939b52 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
@@ -26,17 +26,36 @@ package org.apache.flex.core
     COMPILE::JS
     {
         import window.Event;
-        import org.apache.flex.events.Event;        
         import org.apache.flex.events.BrowserEvent;
         import org.apache.flex.events.ElementEvents;
-        import org.apache.flex.events.EventDispatcher;
         import goog.events;
         import goog.events.EventTarget;
     }
+    import org.apache.flex.events.Event;        
+    import org.apache.flex.events.EventDispatcher;
 
     COMPILE::SWF
-    public class HTMLElementWrapper extends Sprite
+    public class HTMLElementWrapper extends EventDispatcher
     {
+        public function HTMLElementWrapper()
+        {
+            _sprite = new Sprite();
+        }
+
+        private var _sprite:Sprite;
+        
+        public function get sprite():Sprite
+        {
+            return _sprite;
+        }
+        
+        public function set sprite(value:Sprite):void
+        {
+            _sprite = value;
+        }
+
+        protected var _elements:Array;
+
         /**
          * "abstract" method so we can override in JS
          * @param bead The new bead.
@@ -44,6 +63,77 @@ package org.apache.flex.core
         public function addBead(bead:IBead):void
         {            
         }
+
+        private var _parent:IUIBase;
+        public function get parent():IUIBase
+        {
+            return _parent;
+        }
+        public function set parent(val:IUIBase):void
+        {
+            _parent = val;
+        }
+
+        public function get width():Number
+        {
+            return _sprite.width;
+        }
+
+        public function set width(value:Number):void
+        {
+            _sprite.width = value;
+        }
+
+        public function get height():Number
+        {
+            return _sprite.height;
+        }
+
+        public function set height(value:Number):void
+        {
+            _sprite.height = value;
+        }
+
+        public function get x():Number
+        {
+            return _sprite.x;
+        }
+
+        public function set x(value:Number):void
+        {
+            _sprite.x = value;
+        }
+
+        public function get y():Number
+        {
+            return _sprite.y;
+        }
+
+        public function set y(value:Number):void
+        {
+            _sprite.y = value;
+        }        
+
+        public function get visible():Boolean
+        {
+            return _sprite.visible;
+        }
+
+        public function set visible(value:Boolean):void
+        {
+            _sprite.visible = value;
+        }        
+
+        public function get alpha():Number
+        {
+            return _sprite.alpha;
+        }
+
+        public function set alpha(value:Number):void
+        {
+            _sprite.alpha = value;
+        }        
+
     }
     
 	COMPILE::JS

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
index 823ecf9..9f67872 100755
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
@@ -18,10 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::SWF
-    {
-        import flash.display.DisplayObjectContainer;
-    }
     
     /**
      *  The IChild interface is the basic interface for a 
@@ -34,16 +30,6 @@ package org.apache.flex.core
      */
     public interface IChild
 	{
-        /**
-         *  The parent.
-         * 
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        COMPILE::SWF
-        function get parent():DisplayObjectContainer;
         
         /**
          *  The parent.
@@ -53,7 +39,6 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::JS
         function get parent():IUIBase;
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
index c9d69a6..874e3a7 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
@@ -66,10 +66,10 @@ package org.apache.flex.core
          */
         public var CSSParent:Object;
         
-        override public function get parent():DisplayObjectContainer
+        override public function get parent():IUIBase
         {
             if (CSSParent)
-                return CSSParent as DisplayObjectContainer;
+                return CSSParent as IUIBase;
             
             return super.parent;
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
index ff25bd0..6e74408 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
@@ -1087,13 +1087,16 @@ package org.apache.flex.core
 		{
             COMPILE::SWF
             {
+                if(_elements == null)
+                    _elements = [];
+                _elements[_elements.length] = c;
+                sprite.addChild(c.sprite);
+                c.parent = this;
                 if (c is IUIBase)
                 {
-                    addChild(IUIBase(c).element as DisplayObject);
                     IUIBase(c).addedToParent();
                 }
-                else
-                    addChild(c as DisplayObject);
+                    
             }
             COMPILE::JS
             {
@@ -1114,13 +1117,17 @@ package org.apache.flex.core
         {
             COMPILE::SWF
             {
+                if(_elements == null)
+                    _elements = [];
+                _elements.splice(index,0,c);
+
+                sprite.addChildAt(c.sprite,index);
+                c.parent = this;
+
                 if (c is IUIBase)
                 {
-                    addChildAt(IUIBase(c).element as DisplayObject, index);
                     IUIBase(c).addedToParent();
                 }
-                else
-                    addChildAt(c as DisplayObject, index);
             }
             COMPILE::JS
             {
@@ -1148,7 +1155,9 @@ package org.apache.flex.core
         {
             COMPILE::SWF
             {
-                return getChildAt(index);
+                if(_elements == null)
+                    return null;
+                return _elements[index];
             }
             COMPILE::JS
             {
@@ -1169,10 +1178,9 @@ package org.apache.flex.core
         {
             COMPILE::SWF
             {
-                if (c is IUIBase)
-                    return getChildIndex(IUIBase(c).element as DisplayObject);
-                else
-                    return getChildIndex(c as DisplayObject);
+                if(_elements == null)
+                    return -1;
+                return _elements.indexOf(c);
             }
             COMPILE::JS
             {
@@ -1199,10 +1207,14 @@ package org.apache.flex.core
         {
             COMPILE::SWF
             {
-                if (c is IUIBase)
-                    removeChild(IUIBase(c).element as DisplayObject);
-                else
-                    removeChild(c as DisplayObject);
+                if(_elements)
+                {
+                    var idx:int = _elements.indexOf(c);
+                    if(idx>=0)
+                        _elements.splice(idx,1);
+                    c.parent = null;
+                }
+                sprite.removeChild(c.sprite as DisplayObject);
             }
             COMPILE::JS
             {
@@ -1222,7 +1234,7 @@ package org.apache.flex.core
         {
             COMPILE::SWF
             {
-                return numChildren;
+                return sprite.numChildren;
             }
             COMPILE::JS
             {
@@ -1369,7 +1381,7 @@ package org.apache.flex.core
             {
                 if (!_stageProxy)
                 {
-                    _stageProxy = new StageProxy(stage);
+                    _stageProxy = new StageProxy(sprite.stage);
                     _stageProxy.addEventListener("removedFromStage", stageProxy_removedFromStageHandler);
                 }
                 
@@ -1436,7 +1448,6 @@ package org.apache.flex.core
             return positioner;
         }
         
-        
         /**
          * The HTMLElement used to position the component.
          * @flexjsignorecoercion String
@@ -1478,6 +1489,6 @@ package org.apache.flex.core
             var wrapper:IUIBase = p ? p.flexjs_wrapper as IUIBase : null;
             return wrapper;
         }
-        
+
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
index d158665..55916a9 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
@@ -29,7 +29,8 @@ package org.apache.flex.core
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
     import org.apache.flex.events.utils.MouseEventConverter;
-	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.events.EventDispatcher;
+    import org.apache.flex.events.IEventDispatcher;
 	
     //--------------------------------------
     //  Events
@@ -58,7 +59,7 @@ package org.apache.flex.core
      *  @productversion FlexJS 0.0
      */
 	COMPILE::SWF
-	public class UIButtonBase extends SimpleButton implements IStrandWithModel, IEventDispatcher, IUIBase, IStyleableObject, ILayoutChild, IFlexJSElement
+	public class UIButtonBase extends EventDispatcher implements IStrandWithModel, IEventDispatcher, IUIBase, IStyleableObject, ILayoutChild, IFlexJSElement
 	{
         /**
          *  Constructor.
@@ -70,21 +71,54 @@ package org.apache.flex.core
          */
 		public function UIButtonBase(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
 		{
-			super(upState, overState, downState, hitTestState);
+            _button = new SimpleButton(upState, overState, downState, hitTestState);
+//			super(upState, overState, downState, hitTestState);
 			// mouseChildren = true;
 			// mouseEnabled = true;
             MouseEventConverter.setupInstanceConverters(this);
 		}
-				
+
+        private var _button:SimpleButton;
+
+        public function get button():SimpleButton
+        {
+            return _button;
+        }
+        public function set button(val:SimpleButton):void
+        {
+            _button = val;
+        }
+
+        private var _parent:IUIBase;
+        public function get parent():IUIBase
+        {
+            return _parent;
+        }
+        public function set parent(val:IUIBase):void
+        {
+            _parent = val;
+        }
+
+        public function get alpha():Number
+        {
+            return _button.alpha;
+        }
+
+        public function set alpha(value:Number):void
+        {
+            _button.alpha = value;
+        }
+
+
         private var _x:Number;
         
 		/**
 		 *  @private
 		 */
-		override public function set x(value:Number):void
+		public function set x(value:Number):void
 		{
-			if (super.x != value) {
-				super.x = _x = value;
+			if (button.x != value) {
+				button.x = _x = value;
                 if (!style)
                     style = { left: value };
                 else
@@ -92,16 +126,20 @@ package org.apache.flex.core
 				dispatchEvent(new Event("xChanged"));
 			}
 		}
+        public function get x():Number
+        {
+            return _x;
+        }
 		
         private var _y:Number;
 
         /**
 		 *  @private
 		 */
-		override public function set y(value:Number):void
+		public function set y(value:Number):void
 		{
-			if (super.y != value) {
-				super.y = _y = value;
+			if (button.y != value) {
+				button.y = _y = value;
                 if (!style)
                     style = { top: value };
                 else
@@ -109,6 +147,11 @@ package org.apache.flex.core
 				dispatchEvent(new Event("yChanged"));
 			}
 		}
+
+        public function get y():Number
+        {
+            return _y;
+        }
 		
 		/**
 		 *  Retrieve the low-level bounding box y.
@@ -120,7 +163,7 @@ package org.apache.flex.core
 		 */
 		protected function get $y():Number
 		{
-			return super.y;
+			return button.y;
 		}
 		
 		private var _explicitWidth:Number;
@@ -287,7 +330,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		override public function get width():Number
+		public function get width():Number
 		{
 			if (isNaN(explicitWidth))
 			{
@@ -302,7 +345,7 @@ package org.apache.flex.core
         /**
          *  @private
          */
-		override public function set width(value:Number):void
+		public function set width(value:Number):void
 		{
 			if (explicitWidth != value)
 			{
@@ -323,7 +366,7 @@ package org.apache.flex.core
          */
 		public function get $width():Number
 		{
-			return super.width;
+			return button.width;
 		}
 		
 		private var _height:Number;
@@ -338,7 +381,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		override public function get height():Number
+		public function get height():Number
 		{
 			if (isNaN(explicitHeight))
 			{
@@ -353,7 +396,7 @@ package org.apache.flex.core
         /**
          *  @private
          */
-		override public function set height(value:Number):void
+		public function set height(value:Number):void
 		{
 			if (explicitHeight != value)
 			{
@@ -374,7 +417,7 @@ package org.apache.flex.core
          */
 		public function get $height():Number
 		{
-			return super.height;
+			return button.height;
 		}
 
         /**
@@ -462,7 +505,7 @@ package org.apache.flex.core
          */
         public function setX(value:Number):void
         {
-            super.x = value;
+            button.x = value;
         }
                 
         /**
@@ -475,19 +518,24 @@ package org.apache.flex.core
          */
         public function setY(value:Number):void
         {
-            super.y = value;
+            button.y = value;
         }
         
 		/**
 		 * @private
 		 */
         [Bindable("visibleChanged")]
-		override public function set visible(value:Boolean):void
+		public function set visible(value:Boolean):void
 		{
-			super.visible = value;
+			button.visible = value;
 			dispatchEvent(new Event(value?"show":"hide"));
 			dispatchEvent(new Event("visibleChanged"));
 		}
+
+        public function get visible():Boolean
+        {
+            return button.visible;
+        }
         
         /**
          *  @copy org.apache.flex.core.ILayoutChild#isHeightSizedToContent

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/GradientEntry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/GradientEntry.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/GradientEntry.as
index cf84e87..364d0f9 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/GradientEntry.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/GradientEntry.as
@@ -14,6 +14,11 @@
 
 package org.apache.flex.graphics
 {
+	COMPILE::SWF
+	{
+		import flash.display.Graphics;
+	}
+
 	public class GradientEntry
 	{
 		
@@ -110,23 +115,19 @@ package org.apache.flex.graphics
 		/**
 		 * Begin drawing the fill on the given shape's graphic object
 		 */
-		public function begin(s:IGraphicShape):void
+		COMPILE::SWF
+		public function begin(g:Graphics):void
 		{
-            COMPILE::SWF
-            {
-                s.graphics.beginFill(color,alpha);                    
-            }
+            g.beginFill(color,alpha);                    
 		}
 		
 		/**
 		 * End the fill
 		 */
-		public function end(s:IGraphicShape):void
+		COMPILE::SWF
+		public function end(g:Graphics):void
 		{
-            COMPILE::SWF
-            {
-    			s.graphics.endFill();
-            }
+			g.endFill();
 		}
 
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IFill.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IFill.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IFill.as
index b223431..fb0fabe 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IFill.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IFill.as
@@ -16,6 +16,7 @@ package org.apache.flex.graphics
 {
     COMPILE::SWF
     {
+        import flash.display.Graphics;
         import flash.geom.Point;
         import flash.geom.Rectangle;            
     }
@@ -23,9 +24,9 @@ package org.apache.flex.graphics
 	public interface IFill
 	{
         COMPILE::SWF
-		function begin(s:IGraphicShape,targetBounds:Rectangle, targetOrigin:Point):void;
+		function begin(s:Graphics,targetBounds:Rectangle, targetOrigin:Point):void;
         COMPILE::SWF
-		function end(s:IGraphicShape):void;
+		function end(s:Graphics):void;
         COMPILE::JS
         function addFillAttrib(s:IGraphicShape):String;
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as
index e37b7df..3135a84 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as
@@ -18,13 +18,13 @@ package org.apache.flex.graphics
 
 	COMPILE::SWF
 	{
-		import flash.display.Graphics;
+		import flash.display.Sprite;
 	}
 
 	public interface IGraphicShape extends IUIBase
 	{
 		COMPILE::SWF
-		function get graphics():Graphics;
+		function get sprite():Sprite;
 		
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IStroke.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IStroke.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IStroke.as
index fc17f24..6d87348 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IStroke.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IStroke.as
@@ -14,10 +14,14 @@
 
 package org.apache.flex.graphics
 {
+    COMPILE::SWF
+    {
+        import flash.display.Graphics;
+    }
     public interface IStroke
     {
         COMPILE::SWF
-        function apply(s:IGraphicShape):void;
+        function apply(s:Graphics):void;
         
         COMPILE::JS
         function get weight():Number;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as
index 126193a..cbf49d4 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as
@@ -18,6 +18,7 @@ package org.apache.flex.graphics
 
     COMPILE::SWF
     {
+		import flash.display.Graphics;
         import flash.geom.Point;
         import flash.geom.Rectangle;            
     }
@@ -108,15 +109,15 @@ package org.apache.flex.graphics
 		}
 		
         COMPILE::SWF
-		public function begin(s:IGraphicShape,targetBounds:Rectangle,targetOrigin:Point):void
+		public function begin(g:Graphics,targetBounds:Rectangle,targetOrigin:Point):void
 		{
-			s.graphics.beginFill(color,alpha);
+			g.beginFill(color,alpha);
 		}
 		
         COMPILE::SWF
-		public function end(s:IGraphicShape):void
+		public function end(g:Graphics):void
 		{
-			s.graphics.endFill();
+			g.endFill();
 		}
         
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as
index 4efb417..dddbea8 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as
@@ -19,6 +19,7 @@ package org.apache.flex.graphics
     COMPILE::SWF
     {
         import flash.display.CapsStyle;
+        import flash.display.Graphics;
         import flash.display.JointStyle;
     }
 
@@ -120,9 +121,9 @@ package org.apache.flex.graphics
         }
         
         COMPILE::SWF
-        public function apply(s:IGraphicShape):void
+        public function apply(g:Graphics):void
         {
-            s.graphics.lineStyle(weight,color,alpha,false,"normal",CapsStyle.SQUARE,JointStyle.MITER);
+            g.lineStyle(weight,color,alpha,false,"normal",CapsStyle.SQUARE,JointStyle.MITER);
         }
         
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Circle.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Circle.as
index 586bbfd..9fed746 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Circle.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Circle.as
@@ -18,6 +18,7 @@ package org.apache.flex.svg
 
     COMPILE::SWF
     {
+        import flash.display.Graphics;
         import flash.geom.Point;
         import flash.geom.Rectangle;            
     }
@@ -75,10 +76,10 @@ package org.apache.flex.svg
         {
             COMPILE::SWF
             {
-                graphics.clear();
+                sprite.graphics.clear();
                 applyStroke();
                 beginFill(new Rectangle(cx,cy,radius*2, radius*2),new Point(cx-radius,cy-radius));
-                graphics.drawCircle(cx,cy,radius);
+                sprite.graphics.drawCircle(cx,cy,radius);
                 endFill();
             }
             COMPILE::JS                

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/CompoundGraphic.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/CompoundGraphic.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/CompoundGraphic.as
index a57cb5a..b1f5cae 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/CompoundGraphic.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/CompoundGraphic.as
@@ -110,7 +110,8 @@ package org.apache.flex.svg
         {
             COMPILE::SWF
             {
-                graphics.clear();
+                sprite.graphics.clear();
+                sprite.removeChildren();
             }
             COMPILE::JS
             {
@@ -140,7 +141,7 @@ package org.apache.flex.svg
             {
                 applyStroke();
                 beginFill(new Rectangle(x, y, width, height), new Point(x,y) );
-                graphics.drawRect(x, y, width, height);
+                sprite.graphics.drawRect(x, y, width, height);
                 endFill();
             }
             COMPILE::JS
@@ -173,7 +174,7 @@ package org.apache.flex.svg
                 beginFill(new Rectangle(x,y,width,height), new Point(x,y));
                 radiusX *=2;
                 radiusY = isNaN(radiusY) ? radiusY : radiusY*2;
-                graphics.drawRoundRect(x,y,width,height,radiusX,radiusY);
+                sprite.graphics.drawRoundRect(x,y,width,height,radiusX,radiusY);
                 endFill();
             }
             COMPILE::JS
@@ -220,7 +221,7 @@ package org.apache.flex.svg
             {
                 applyStroke();
                 beginFill(new Rectangle(x,y,width,height), new Point(x,y));
-                graphics.drawEllipse(x,y,width,height);
+                sprite.graphics.drawEllipse(x,y,width,height);
                 endFill();
             }
             COMPILE::JS
@@ -257,7 +258,7 @@ package org.apache.flex.svg
             {
                 applyStroke();
                 beginFill(new Rectangle(x,y,radius*2, radius*2),new Point(x-radius,y-radius));
-                graphics.drawCircle(x,y,radius);
+                sprite.graphics.drawCircle(x,y,radius);
                 endFill();
             }
             COMPILE::JS
@@ -316,7 +317,7 @@ package org.apache.flex.svg
                 var bounds:Rectangle = PathHelper.getBounds(data);
                 beginFill(bounds,bounds.topLeft);
                 var graphicsPath:GraphicsPath = PathHelper.getSegments(data);
-                graphics.drawPath(graphicsPath.commands, graphicsPath.data);
+                sprite.graphics.drawPath(graphicsPath.commands, graphicsPath.data);
                 endFill();
             }
             COMPILE::JS
@@ -353,8 +354,6 @@ package org.apache.flex.svg
          * <code>beginGradientFill()</code>, or 
          * <code>beginBitmapFill()</code> method.
          * 
-         * @param graphics The Graphics object that draws the rounded rectangle.
-         *
          * @param x The horizontal position relative to the 
          * registration point of the parent display object, in pixels.
          * 
@@ -388,7 +387,7 @@ package org.apache.flex.svg
             {
                 applyStroke();
                 beginFill(new Rectangle(x,y,width,height), new Point(x,y));
-                graphics.drawRoundRectComplex(x,y,width,height,topLeftRadius,topRightRadius,bottomLeftRadius,bottomRightRadius);
+                sprite.graphics.drawRoundRectComplex(x,y,width,height,topLeftRadius,topRightRadius,bottomLeftRadius,bottomRightRadius);
                 endFill();
             }
             COMPILE::JS
@@ -475,7 +474,7 @@ package org.apache.flex.svg
         {
             applyStroke();
             beginFill(new Rectangle(x,y,width,height), new Point(x,y));
-            builder.draw(graphics);
+            builder.draw(sprite.graphics);
             endFill();
         }
         COMPILE::JS
@@ -514,7 +513,7 @@ package org.apache.flex.svg
             COMPILE::SWF
             {
                 var textField:CSSTextField = new CSSTextField();
-                addChild(textField);
+                sprite.addChild(textField.textField);
 
                 textField.selectable = false;
                 textField.type = TextFieldType.DYNAMIC;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Ellipse.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Ellipse.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Ellipse.as
index c2fbabc..65658f0 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Ellipse.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Ellipse.as
@@ -110,10 +110,10 @@ package org.apache.flex.svg
         {
             COMPILE::SWF
             {
-                graphics.clear();
+                sprite.graphics.clear();
                 applyStroke();
                 beginFill(new Rectangle(xp, yp, width, height), new Point(xp,yp));
-                graphics.drawEllipse(xp,yp,width,height);
+                sprite.graphics.drawEllipse(xp,yp,width,height);
                 endFill();                    
             }
             COMPILE::JS

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as
index c2baa41..27c35ad 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as
@@ -16,6 +16,7 @@ package org.apache.flex.svg
 {
 	COMPILE::SWF
     {
+		import flash.display.Graphics;
         import flash.geom.Point;
         import flash.geom.Rectangle;
     }
@@ -102,7 +103,7 @@ package org.apache.flex.svg
 		{
 			if(stroke)
 			{
-				stroke.apply(this);
+				stroke.apply(sprite.graphics);
 			}
 		}
 
@@ -111,7 +112,7 @@ package org.apache.flex.svg
 		{
 			if(fill)
 			{
-				fill.begin(this, targetBounds,targetOrigin);
+				fill.begin(sprite.graphics, targetBounds,targetOrigin);
 			}
 		}
 
@@ -120,7 +121,7 @@ package org.apache.flex.svg
 		{
 			if(fill)
 			{
-				fill.end(this);
+				fill.end(sprite.graphics);
 			}
 		}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/LinearGradient.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/LinearGradient.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/LinearGradient.as
index 7da2b2a..ab681ff 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/LinearGradient.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/LinearGradient.as
@@ -23,6 +23,7 @@ package org.apache.flex.svg
     COMPILE::SWF
     {
         import flash.display.GradientType;
+        import flash.display.Graphics;
         import flash.display.InterpolationMethod;
         import flash.display.SpreadMethod;
         import flash.geom.Matrix;
@@ -51,20 +52,20 @@ package org.apache.flex.svg
 		}
 		
         COMPILE::SWF
-		public function begin(s:IGraphicShape,targetBounds:Rectangle, targetOrigin:Point):void
+		public function begin(g:Graphics,targetBounds:Rectangle, targetOrigin:Point):void
 		{
 			commonMatrix.identity();
 			commonMatrix.createGradientBox(targetBounds.width,targetBounds.height,toRad(this.rotation),targetOrigin.x, targetOrigin.y);
 			
-			s.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios,
+			g.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios,
 				commonMatrix, SpreadMethod.PAD, InterpolationMethod.RGB);
 			
 		}
 		
         COMPILE::SWF
-		public function end(s:IGraphicShape):void
+		public function end(g:Graphics):void
 		{
-			s.graphics.endFill();
+			g.endFill();
 		}
         
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Path.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Path.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Path.as
index fe6b74a..d25f218 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Path.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Path.as
@@ -98,14 +98,14 @@ package org.apache.flex.svg
         {
             COMPILE::SWF
             {
-                graphics.clear();
+                sprite.graphics.clear();
                 applyStroke();
                 var bounds:Rectangle = PathHelper.getBounds(data);
                 this.width = bounds.width;
                 this.height = bounds.height;
                 beginFill(bounds,new Point(bounds.left + xp, bounds.top + yp) );
                 var graphicsPath:GraphicsPath = PathHelper.getSegments(data,xp,yp);
-                graphics.drawPath(graphicsPath.commands, graphicsPath.data);
+                sprite.graphics.drawPath(graphicsPath.commands, graphicsPath.data);
                 endFill();
             }
             COMPILE::JS

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Rect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Rect.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Rect.as
index 64f888d..514317e 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Rect.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Rect.as
@@ -107,16 +107,16 @@ package org.apache.flex.svg
 		{
             COMPILE::SWF
             {
-                graphics.clear();
+                sprite.graphics.clear();
                 applyStroke();
                 beginFill(new Rectangle(xp, yp, width, height), new Point(xp,yp));
                 if(isNaN(rx))
-                    graphics.drawRect(x, y, width, height);
+                    sprite.graphics.drawRect(x, y, width, height);
                 else
                 {
                     var dx:Number = rx*2;
                     var dy:Number = isNaN(ry) ? ry : ry*2;
-                    graphics.drawRoundRect(x, y, width, height,dx ,dy);
+                    sprite.graphics.drawRoundRect(x, y, width, height,dx ,dy);
                 }
                 endFill();                    
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Text.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Text.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Text.as
index 767de41..bdcba70 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Text.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/Text.as
@@ -59,7 +59,7 @@ package org.apache.flex.svg
             COMPILE::SWF
             {
                 _textField = new CSSTextField();
-                addChild(_textField);                    
+                sprite.addChild(_textField.textField);
             }
 		}
 		

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
index 99e2866..1c8039e 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
@@ -135,11 +135,11 @@ package org.apache.flex.html.accessories
 			var model:Object = UIBase(_strand).model;
 			
 			if (model.text != null && model.text.length > 0 ) {
-				if (promptAdded) UIBase(_strand).removeChild(promptField);
+				if (promptAdded) UIBase(_strand).sprite.removeChild(promptField.textField);
 				promptAdded = false;
 			}
 			else {
-				if (!promptAdded) UIBase(_strand).addChild(promptField);
+				if (!promptAdded) UIBase(_strand).sprite.addChild(promptField.textField);
 				promptField.text = prompt;
 				promptAdded = true;
 			}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
index 8cedc9a..71dce2c 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
@@ -89,12 +89,12 @@ package org.apache.flex.html.beads
 				loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, function (e:flash.events.Event):void { 
 					var host:UIBase = UIBase(_strand);
 					if (bitmap) {
-						host.removeChild(bitmap);
+						host.sprite.removeChild(bitmap);
 					}
 					
 					bitmap = Bitmap(LoaderInfo(e.target).content);
 					
-					host.addChildAt(bitmap,0);
+					host.sprite.addChildAt(bitmap,0);
 					
 					if (isNaN(host.explicitWidth) && isNaN(host.percentWidth))
 						host.setWidth(loader.content.width);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSImageAndTextButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSImageAndTextButtonView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSImageAndTextButtonView.as
index 12ac07d..2f7507c 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSImageAndTextButtonView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSImageAndTextButtonView.as
@@ -81,9 +81,9 @@ package org.apache.flex.html.beads
 			upTextField.autoSize = "left";
 			downTextField.autoSize = "left";
 			overTextField.autoSize = "left";
-			upSprite.addChild(upTextField);
-			downSprite.addChild(downTextField);
-			overSprite.addChild(overTextField);
+			upSprite.addChild(upTextField.textField);
+			downSprite.addChild(downTextField.textField);
+			overSprite.addChild(overTextField.textField);
 		}
 		
 		private var textModel:ImageAndTextModel;
@@ -142,10 +142,10 @@ package org.apache.flex.html.beads
             updateHitArea();
         }
         
-		private function setupSkin(sprite:Sprite, textField:TextField, state:String = null):void
+		private function setupSkin(sprite:Sprite, textField:CSSTextField, state:String = null):void
 		{
-			var sw:uint = DisplayObject(_strand).width;
-			var sh:uint = DisplayObject(_strand).height;
+			var sw:uint = IUIBase(_strand).width;
+			var sh:uint = IUIBase(_strand).height;
 			
 			textField.defaultTextFormat.leftMargin = 0;
 			textField.defaultTextFormat.rightMargin = 0;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSTextButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSTextButtonView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSTextButtonView.as
index 3150e7a..9309f3a 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSTextButtonView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSTextButtonView.as
@@ -81,9 +81,9 @@ package org.apache.flex.html.beads
 			upTextField.autoSize = "left";
 			downTextField.autoSize = "left";
 			overTextField.autoSize = "left";
-			upSprite.addChild(upTextField);
-			downSprite.addChild(downTextField);
-			overSprite.addChild(overTextField);
+			upSprite.addChild(upTextField.textField);
+			downSprite.addChild(downTextField.textField);
+			overSprite.addChild(overTextField.textField);
 		}
 		
 		private var textModel:ITextModel;
@@ -141,10 +141,10 @@ package org.apache.flex.html.beads
             updateHitArea();
         }
         
-		private function setupSkin(sprite:Sprite, textField:TextField, state:String = null):void
+		private function setupSkin(sprite:Sprite, textField:CSSTextField, state:String = null):void
 		{
-			var sw:uint = DisplayObject(_strand).width;
-			var sh:uint = DisplayObject(_strand).height;
+			var sw:uint = IUIBase(_strand).width;
+			var sh:uint = IUIBase(_strand).height;
 			
 			textField.defaultTextFormat.leftMargin = 0;
 			textField.defaultTextFormat.rightMargin = 0;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CheckBoxView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CheckBoxView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CheckBoxView.as
index a04f2bf..38fb41c 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CheckBoxView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CheckBoxView.as
@@ -76,7 +76,7 @@ package org.apache.flex.html.beads
 				var icon:Shape = new Shape();
 				icon.name = "icon";
 				s.addChild(icon);
-				s.addChild(tf);
+				s.addChild(tf.textField);
 			}
 		}
 		

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ComboBoxView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ComboBoxView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ComboBoxView.as
index e725517..82dd046 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ComboBoxView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ComboBoxView.as
@@ -132,10 +132,10 @@ package org.apache.flex.html.beads
 			drawButton( downSprite, "down", 18, 18 );
 			
 			button = new Button();
-            button.upState = upSprite;
-            button.overState = overSprite;
-            button.downState = downSprite;
-			DisplayObjectContainer(strand).addChild(button);
+            button.button.upState = upSprite;
+            button.button.overState = overSprite;
+            button.button.downState = downSprite;
+			HTMLElementWrapper(strand).sprite.addChild(button.button);
 			button.width = 18;
 			button.height = 18;
 			button.x = textInput.width;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HRuleView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HRuleView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HRuleView.as
index 3c7e092..78d158f 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HRuleView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HRuleView.as
@@ -78,10 +78,10 @@ package org.apache.flex.html.beads
 		private function handleSizeChange(event:Object):void
 		{
 			var ui:UIBase = _strand as UIBase;
-            ui.graphics.clear();
-            ui.graphics.beginFill(0);
-            ui.graphics.drawRect(0, 0, ui.width, 1);
-            ui.graphics.endFill();
+            ui.sprite.graphics.clear();
+            ui.sprite.graphics.beginFill(0);
+            ui.sprite.graphics.drawRect(0, 0, ui.width, 1);
+            ui.sprite.graphics.endFill();
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HScrollBarView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HScrollBarView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HScrollBarView.as
index 68fe11f..67bb0db 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HScrollBarView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/HScrollBarView.as
@@ -72,24 +72,29 @@ package org.apache.flex.html.beads
 		{
 			super.strand = value;
 			
-			UIBase(value).setHeight(ScrollBarView.FullSize, true);
+            var v:UIBase = UIBase(value);
+			v.setHeight(ScrollBarView.FullSize, true);
             
             // TODO: (aharui) put in values impl
 			_increment = new Button();
-			Button(_increment).addBead(new RightArrowButtonView());
-            Button(_increment).addBead(new ButtonAutoRepeatController());
+            var i:Button = _increment;
+			i.addBead(new RightArrowButtonView());
+            i.addBead(new ButtonAutoRepeatController());
 			_decrement = new Button();
-			Button(_decrement).addBead(new LeftArrowButtonView());
-            Button(_decrement).addBead(new ButtonAutoRepeatController());
-			_track = new Button();				
-			Button(_track).addBead(new HScrollBarTrackView());
-			_thumb = new Button();				
-			Button(_thumb).addBead(new HScrollBarThumbView());
+            var d:Button = _decrement;
+			d.addBead(new LeftArrowButtonView());
+            d.addBead(new ButtonAutoRepeatController());
+			_track = new Button();
+            var tr:Button = _track;
+			tr.addBead(new HScrollBarTrackView());
+			_thumb = new Button();
+            var th:Button = _thumb;
+			th.addBead(new HScrollBarThumbView());
             
-            UIBase(value).addChild(_decrement);
-            UIBase(value).addChild(_increment);
-            UIBase(value).addChild(_track);
-            UIBase(value).addChild(_thumb);
+            v.sprite.addChild(d.button);
+            v.sprite.addChild(i.button);
+            v.sprite.addChild(tr.button);
+            v.sprite.addChild(th.button);
             
             IEventDispatcher(_strand).addEventListener("widthChanged", changeHandler);
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as
index 652392a..cc68963 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as
@@ -131,12 +131,12 @@ package org.apache.flex.html.beads
 		{
             var host:UIBase = UIBase(_strand);
 			if (bitmap) {
-				host.removeChild(bitmap);
+				host.sprite.removeChild(bitmap);
 			}
 			
 			bitmap = Bitmap(LoaderInfo(event.target).content);
 			
-			host.addChild(bitmap);
+			host.sprite.addChild(bitmap);
 			
             if (host.isWidthSizedToContent())
             {
@@ -145,7 +145,7 @@ package org.apache.flex.html.beads
                     host.parent.dispatchEvent(new Event("layoutNeeded"));
             }
             else
-                bitmap.width = UIBase(_strand).width;
+                bitmap.width = host.width;
                 
             if (host.isHeightSizedToContent())
             {
@@ -154,7 +154,7 @@ package org.apache.flex.html.beads
                     host.parent.dispatchEvent(new Event("layoutNeeded"));
             }
             else
-                bitmap.height = UIBase(_strand).height;
+                bitmap.height = host.height;
                 
 		}
 		

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fc302ae4/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/RadioButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/RadioButtonView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/RadioButtonView.as
index 245c3d3..0c87a51 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/RadioButtonView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/RadioButtonView.as
@@ -68,7 +68,7 @@ package org.apache.flex.html.beads
 				var icon:Shape = new Shape();
 				icon.name = "icon";
 				s.addChild(icon);
-				s.addChild(tf);
+				s.addChild(tf.textField);
 			}
 		}
 		


Mime
View raw message