flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [07/13] git commit: [flex-asjs] [refs/heads/develop] - remove IInitSkin. Most implementations were empty anyway, some were used to setup default beads but those should now be all driven by ValueManager requests. Added an addedToParent() method to repla
Date Tue, 16 Jul 2013 07:56:24 GMT
remove IInitSkin.  Most implementations were empty anyway, some were used to setup default beads but those should now be all driven by ValueManager requests.  Added an addedToParent() method to replace remaining work in initSkin().  It gets called when addToParent is called.  The lifecycle is thus: instantiate, set properties and beads, then addToParent


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

Branch: refs/heads/develop
Commit: 1c316d2652d8ffb982a36f6fed21a4c6267dc13f
Parents: ed706e1
Author: Alex Harui <aharui@apache.org>
Authored: Sun Jul 14 22:02:25 2013 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Sun Jul 14 22:02:25 2013 -0700

----------------------------------------------------------------------
 frameworks/as/defaults.css                      |  22 +-
 .../src/org/apache/flex/core/IBeadController.as |   4 +-
 .../as/src/org/apache/flex/core/IBeadLayout.as  |  28 +++
 .../as/src/org/apache/flex/core/IInitSkin.as    |  25 ---
 .../flex/core/ItemRendererClassFactory.as       |  23 +-
 .../as/src/org/apache/flex/core/Strand.as       | 109 ++++++++++
 .../as/src/org/apache/flex/core/UIBase.as       |  22 ++
 .../as/src/org/apache/flex/core/UIButtonBase.as | 209 +++++++++++++++++++
 .../flex/createjs/staticControls/TextButton.as  |   8 +-
 .../apache/flex/html/staticControls/Alert.as    |  14 +-
 .../apache/flex/html/staticControls/Button.as   |   6 +-
 .../apache/flex/html/staticControls/CheckBox.as | 105 +---------
 .../apache/flex/html/staticControls/ComboBox.as |  12 +-
 .../flex/html/staticControls/Container.as       |   7 +-
 .../flex/html/staticControls/ControlBar.as      |  17 +-
 .../flex/html/staticControls/DropDownList.as    |   8 +-
 .../apache/flex/html/staticControls/Label.as    |   7 +-
 .../org/apache/flex/html/staticControls/List.as |  30 +--
 .../flex/html/staticControls/NumericStepper.as  |   5 -
 .../apache/flex/html/staticControls/Panel.as    |   5 -
 .../flex/html/staticControls/RadioButton.as     | 119 +----------
 .../flex/html/staticControls/SimpleAlert.as     |  13 +-
 .../apache/flex/html/staticControls/Spinner.as  |   6 +-
 .../apache/flex/html/staticControls/TextArea.as |   6 +-
 .../flex/html/staticControls/TextButton.as      |   6 +-
 .../flex/html/staticControls/TextInput.as       |   6 +-
 .../apache/flex/html/staticControls/TitleBar.as |  13 +-
 .../flex/html/staticControls/beads/AlertView.as |   7 -
 .../html/staticControls/beads/ComboBoxView.as   |   8 +-
 .../staticControls/beads/DropDownListView.as    |   6 +-
 .../beads/IDataProviderItemRendererMapper.as    |  34 +++
 .../flex/html/staticControls/beads/ListView.as  |   7 +-
 .../staticControls/beads/NumericStepperView.as  |   2 -
 .../flex/html/staticControls/beads/PanelView.as |   2 -
 .../html/staticControls/beads/ScrollBarView.as  |  23 +-
 .../staticControls/beads/SimpleAlertView.as     |   2 -
 .../html/staticControls/beads/SpinnerView.as    |   8 +-
 .../html/staticControls/beads/TextAreaView.as   |   9 +-
 .../TextItemRendererFactoryForArrayData.as      |  23 +-
 .../beads/controllers/AlertController.as        |  52 +++++
 .../beads/controllers/ComboBoxController.as     |   4 +-
 .../beads/controllers/DropDownListController.as |   3 +-
 .../supportClasses/DropDownListList.as          |   4 +-
 .../apache/flex/utils/MXMLDataInterpreter.as    |   8 +-
 44 files changed, 582 insertions(+), 455 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/defaults.css b/frameworks/as/defaults.css
index 13fcfc1..6018eab 100644
--- a/frameworks/as/defaults.css
+++ b/frameworks/as/defaults.css
@@ -76,6 +76,7 @@ ComboBox
 {
     IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.ComboBoxModel");
     IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.ComboBoxView");
+    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.ComboBoxController");
     IPopUp: ClassReference("org.apache.flex.html.staticControls.supportClasses.DropDownListList");
 }
 
@@ -83,6 +84,7 @@ DropDownList
 {
     IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.ArraySelectionModel");
     IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.DropDownListView");
+    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.DropDownListController");
     IPopUp: ClassReference("org.apache.flex.html.staticControls.supportClasses.DropDownListList");
 }
 
@@ -101,6 +103,12 @@ Label
 List
 {
 	IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.ArraySelectionModel");
+    IBeadView:  ClassReference("org.apache.flex.html.staticControls.beads.ListBead");			
+    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.ListSingleSelectionMouseController");
+    IBeadLayout: ClassReference("org.apache.flex.html.staticControls.beads.layouts.NonVirtualVerticalScrollingLayout");
+    IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.staticControls.beads.TextItemRendererFactoryForArrayData");
+    IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
+    IItemRenderer: ClassReference("org.apache.flex.html.staticControls.supportClasses.TextFieldItemRenderer");
 }
 
 RadioButton
@@ -115,6 +123,12 @@ TextButton
     iMeasurementBead: ClassReference("org.apache.flex.html.staticControls.beads.TextButtonMeasurementBead");
 }
 
+TextFieldItemRenderer
+{
+    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.ItemRendererMouseController");
+    height: 16;
+}
+
 TextInput
 {
     IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.TextInputWithBorderBead");
@@ -125,13 +139,13 @@ TextInput
 TitleBar
 {
     IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.TitleBarModel");
-    ILayoutBead: ClassReference("org.apache.flex.html.staticControls.beads.layouts.NonVirtualHorizontalLayout");
+    IBeadLayout: ClassReference("org.apache.flex.html.staticControls.beads.layouts.NonVirtualHorizontalLayout");
     iMeasurementBead: ClassReference("org.apache.flex.html.staticControls.beads.TitleBarMeasurementBead");
 }
 
 ControlBar
 {
-    ILayoutBead: ClassReference("org.apache.flex.html.staticControls.beads.layouts.NonVirtualHorizontalLayout");
+    IBeadLayout: ClassReference("org.apache.flex.html.staticControls.beads.layouts.NonVirtualHorizontalLayout");
     iMeasurementBead: ClassReference("org.apache.flex.html.staticControls.beads.ControlBarMeasurementBead");
 }
 
@@ -152,6 +166,7 @@ SimpleAlert
 {
     iBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.AlertModel");
     IBeadView:  ClassReference("org.apache.flex.html.staticControls.beads.SimpleAlertBead");
+    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.AlertController");
     iBorderBead: ClassReference("org.apache.flex.html.staticControls.beads.SingleLineBorderBead");
     iBackgroundBead: ClassReference("org.apache.flex.html.staticControls.beads.SolidBackgroundBead");
 
@@ -165,6 +180,7 @@ Alert
 {
     iBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.AlertModel");
     IBeadView:  ClassReference("org.apache.flex.html.staticControls.beads.AlertBead");
+    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.AlertController");
     iBackgroundBead: ClassReference("org.apache.flex.html.staticControls.beads.SolidBackgroundBead");
     iBorderBead: ClassReference("org.apache.flex.html.staticControls.beads.SingleLineBorderBead");
 
@@ -183,7 +199,7 @@ Spinner
 NumericStepper
 {
     iBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.SpinnerModel");
-    IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.NumericStepperBead");
+    IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.NumericStepperView");
 
     padding: 0px;
     border-style: solid;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/core/IBeadController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/IBeadController.as b/frameworks/as/src/org/apache/flex/core/IBeadController.as
index 69ccc58..fa5a8f8 100644
--- a/frameworks/as/src/org/apache/flex/core/IBeadController.as
+++ b/frameworks/as/src/org/apache/flex/core/IBeadController.as
@@ -18,12 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-	import org.apache.flex.events.IEventDispatcher;
-
 	/** 
 	 *  Marker interface for Controllers
 	 */
-	public interface IBeadController extends IBead, IEventDispatcher
+	public interface IBeadController extends IBead
 	{
 		
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/core/IBeadLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/IBeadLayout.as b/frameworks/as/src/org/apache/flex/core/IBeadLayout.as
new file mode 100644
index 0000000..662c99c
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/core/IBeadLayout.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+	/** 
+	 *  Marker interface for Layouts
+	 */
+	public interface IBeadLayout extends IBead
+	{
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/core/IInitSkin.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/IInitSkin.as b/frameworks/as/src/org/apache/flex/core/IInitSkin.as
deleted file mode 100644
index 649493a..0000000
--- a/frameworks/as/src/org/apache/flex/core/IInitSkin.as
+++ /dev/null
@@ -1,25 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
-	public interface IInitSkin
-	{
-		function initSkin():void;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/core/ItemRendererClassFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/ItemRendererClassFactory.as b/frameworks/as/src/org/apache/flex/core/ItemRendererClassFactory.as
index b883b9b..a25dc09 100644
--- a/frameworks/as/src/org/apache/flex/core/ItemRendererClassFactory.as
+++ b/frameworks/as/src/org/apache/flex/core/ItemRendererClassFactory.as
@@ -18,17 +18,29 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
+    import flash.display.DisplayObject;
     import flash.display.DisplayObjectContainer;
+    
     import org.apache.flex.utils.MXMLDataInterpreter;
 
 	[DefaultProperty("mxmlContent")]
-	public class ItemRendererClassFactory implements IItemRendererClassFactory, IDocument
+	public class ItemRendererClassFactory extends Strand implements IItemRendererClassFactory, IDocument, IBead
 	{
 		public function ItemRendererClassFactory()
 		{
 			super();
 		}
 				
+        private var _strand:IStrand;
+        
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            itemRendererClass = ValuesManager.valuesImpl.getValue(this, "iItemRenderer") as Class;
+            if (itemRendererClass)
+                createFunction = createFromClass;
+        }
+
 		public function get MXMLDescriptor():Array
 		{
 			return null;
@@ -53,6 +65,15 @@ package org.apache.flex.core
             return MXMLDataInterpreter.generateMXMLArray(document, parent as DisplayObjectContainer, MXMLDescriptor, true)[0];
         }
         
+        public var itemRendererClass:Class;
+        
+        public function createFromClass(parent:IItemRendererParent):IItemRenderer
+        {
+            var renderer:IItemRenderer = new itemRendererClass();
+            parent.addChild(renderer as DisplayObject);
+            return renderer;
+        }
+        
         private var document:Object;
         public function setDocument(document:Object, id:String = null):void
         {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/core/Strand.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/Strand.as b/frameworks/as/src/org/apache/flex/core/Strand.as
new file mode 100644
index 0000000..daeca4b
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/core/Strand.as
@@ -0,0 +1,109 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.EventDispatcher;
+
+    /**
+     * Base class for non-display objects implementing a IStrand
+     */
+	public class Strand extends EventDispatcher implements IStrand
+	{
+		public function Strand()
+		{
+			super();
+		}
+		
+		
+		private var _model:IBeadModel;
+		public function get model():IBeadModel
+		{
+            if (_model == null)
+            {
+                // addbead will set _model
+                addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
+            }
+			return _model;
+		}
+		public function set model(value:IBeadModel):void
+		{
+			if (_model != value)
+			{
+				addBead(value as IBead);
+				dispatchEvent(new Event("modelChanged"));
+			}
+		}
+		
+		private var _id:String;
+		public function get id():String
+		{
+			return _id;
+		}
+		public function set id(value:String):void
+		{
+			if (_id != value)
+			{
+				_id = value;
+				dispatchEvent(new Event("idChanged"));
+			}
+		}
+				
+		// beads declared in MXML are added to the strand.
+		// from AS, just call addBead()
+		public var beads:Array;
+		
+		private var _beads:Vector.<IBead>;
+		public function addBead(bead:IBead):void
+		{
+			if (!_beads)
+				_beads = new Vector.<IBead>;
+			_beads.push(bead);
+			if (bead is IBeadModel)
+				_model = bead as IBeadModel;
+			bead.strand = this;
+		}
+		
+		public function getBeadByType(classOrInterface:Class):IBead
+		{
+			for each (var bead:IBead in _beads)
+			{
+				if (bead is classOrInterface)
+					return bead;
+			}
+			return null;
+		}
+		
+		public function removeBead(value:IBead):IBead	
+		{
+			var n:int = _beads.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				var bead:IBead = _beads[i];
+				if (bead == value)
+				{
+					_beads.splice(i, 1);
+					return bead;
+				}
+			}
+			return null;
+		}
+		        
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/UIBase.as b/frameworks/as/src/org/apache/flex/core/UIBase.as
index 70bb1b8..7aed2f1 100644
--- a/frameworks/as/src/org/apache/flex/core/UIBase.as
+++ b/frameworks/as/src/org/apache/flex/core/UIBase.as
@@ -174,6 +174,7 @@ package org.apache.flex.core
 				UIBase(p).internalAddChild(this);
             else
     			p.addChild(this);
+            addedToParent();
 		}
         
         public function addToParentAt(p:Object, index:int):void
@@ -182,6 +183,7 @@ package org.apache.flex.core
                 UIBase(p).internalAddChildAt(this, index);
             else
                 p.addChild(this, index);
+            addedToParent();
         }
         
         public function getIndexInParent(p:Object):int
@@ -200,6 +202,26 @@ package org.apache.flex.core
                 p.removeChild(this);
         }
 		
+        protected function addedToParent():void
+        {
+            if (getBeadByType(IBeadModel) == null) 
+            {
+                var model:IBeadModel = new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBeadModel;
+                if (model)
+                    addBead(model);
+            }
+            if (getBeadByType(IBeadView) == null) 
+            {
+                var view:IBeadView = new (ValuesManager.valuesImpl.getValue(this, "iBeadView")) as IBeadView;
+                addBead(view);
+            }
+            if (getBeadByType(IBeadController) == null) 
+            {
+                var controller:IBeadController = new (ValuesManager.valuesImpl.getValue(this, "iBeadController")) as IBeadController;
+                addBead(controller);
+            }
+        }
+        
 		/**
 		 * Used internally by addToParent() implementations
 		 * to determine attach a child to a parent.  Containers

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/core/UIButtonBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/UIButtonBase.as b/frameworks/as/src/org/apache/flex/core/UIButtonBase.as
new file mode 100644
index 0000000..9797f13
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/core/UIButtonBase.as
@@ -0,0 +1,209 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	import flash.display.SimpleButton;
+	import flash.events.MouseEvent;
+	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadModel;
+	import org.apache.flex.core.IMeasurementBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	[Event(name="click", type="org.apache.flex.events.Event")]
+
+	public class UIButtonBase extends SimpleButton implements IStrand, IEventDispatcher, IUIBase
+	{
+		public function UIButtonBase(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+		{
+			super(upState, overState, downState, hitTestState);
+			// mouseChildren = true;
+			// mouseEnabled = true;
+			addEventListener(MouseEvent.CLICK, clickKiller, false, 9999); 
+		}
+		
+		private function clickKiller(event:flash.events.Event):void
+		{
+			if (event is MouseEvent)
+			{
+				event.stopImmediatePropagation();
+				dispatchEvent(new Event("click"));
+			}
+		}
+		
+		private var _width:Number;
+		override public function get width():Number
+		{
+            if (isNaN(_width))
+            {
+                var value:* = ValuesManager.valuesImpl.getValue(this, "width");
+                if (value === undefined)
+                    return $width;
+                _width = Number(value);
+            }
+            return _width;
+		}
+		override public function set width(value:Number):void
+		{
+			if (_width != value)
+			{
+				_width = value;
+				dispatchEvent(new Event("widthChanged"));
+			}
+		}
+		protected function get $width():Number
+		{
+			return super.width;
+		}
+		
+		private var _height:Number;
+		override public function get height():Number
+		{
+            if (isNaN(_height))
+            {
+                var value:* = ValuesManager.valuesImpl.getValue(this, "height");
+                if (value === undefined)
+                    return $height;
+                _height = Number(value);
+            }
+            return _height;
+		}
+        
+		override public function set height(value:Number):void
+		{
+			if (_height != value)
+			{
+				_height = value;
+				dispatchEvent(new Event("heightChanged"));
+			}
+		}
+		protected function get $height():Number
+		{
+			return super.height;
+		}
+
+		private var _model:IBeadModel;
+		public function get model():IBeadModel
+		{
+			return _model;
+		}
+		
+		private var _id:String;
+		public function get id():String
+		{
+			return _id;
+		}
+		public function set id(value:String):void
+		{
+			if (_id != value)
+			{
+				_id = value;
+				dispatchEvent(new Event("idChanged"));
+			}
+		}
+
+		private var _className:String;
+		public function get className():String
+		{
+			return _className;
+		}
+		public function set className(value:String):void
+		{
+			if (_className != value)
+			{
+				_className = value;
+				dispatchEvent(new Event("classNameChanged"));
+			}
+		}
+
+        // beads declared in MXML are added to the strand.
+        // from AS, just call addBead()
+        public var beads:Array;
+        
+		private var strand:Vector.<IBead>;
+		public function addBead(bead:IBead):void
+		{
+			if (!strand)
+				strand = new Vector.<IBead>;
+			strand.push(bead);
+			if (bead is IBeadModel)
+				_model = bead as IBeadModel;
+			bead.strand = this;
+		}
+		
+		public function getBeadByType(classOrInterface:Class):IBead
+		{
+			for each (var bead:IBead in strand)
+			{
+				if (bead is classOrInterface)
+					return bead;
+			}
+			return null;
+		}
+		
+		public function removeBead(value:IBead):IBead	
+		{
+			var n:int = strand.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				var bead:IBead = strand[i];
+				if (bead == value)
+				{
+					strand.splice(i, 1);
+					return bead;
+				}
+			}
+			return null;
+		}
+		
+		protected function addedToParent():void
+		{
+			_width = $width;
+			_height = $height;
+		}
+		
+		public function addToParent(p:Object):void
+		{
+			if( p is UIBase ) {
+				UIBase(p).internalAddChild(this);
+			}
+			else if( p is DisplayObjectContainer ) {
+				p.addChild(this);
+			}
+            addedToParent();
+		}
+		
+		public function get measurementBead() : IMeasurementBead
+		{
+			var measurementBead:IMeasurementBead = getBeadByType(IMeasurementBead) as IMeasurementBead;
+			if( measurementBead == null ) {
+				addBead(measurementBead = new (ValuesManager.valuesImpl.getValue(this, "iMeasurementBead")) as IMeasurementBead);
+			}
+			
+			return measurementBead;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/createjs/staticControls/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/createjs/staticControls/TextButton.as b/frameworks/as/src/org/apache/flex/createjs/staticControls/TextButton.as
index 36f216f..6764b22 100644
--- a/frameworks/as/src/org/apache/flex/createjs/staticControls/TextButton.as
+++ b/frameworks/as/src/org/apache/flex/createjs/staticControls/TextButton.as
@@ -20,13 +20,10 @@ package org.apache.flex.createjs.staticControls
 {
 	import flash.display.DisplayObject;
 
-	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.ITextModel;
-	import org.apache.flex.core.IInitSkin;
-	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.html.staticControls.Button;
 	
-	public class TextButton extends Button implements IInitSkin
+	public class TextButton extends Button
 	{
 		public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
 		{
@@ -51,8 +48,5 @@ package org.apache.flex.createjs.staticControls
 			ITextModel(model).html = value;
 		}
 				
-		override public function initSkin():void
-		{
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/Alert.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/Alert.as b/frameworks/as/src/org/apache/flex/html/staticControls/Alert.as
index 21cfe87..969a819 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/Alert.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/Alert.as
@@ -20,7 +20,6 @@ package org.apache.flex.html.staticControls
 {
 	import org.apache.flex.core.IAlertModel;
 	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.IPopUp;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
@@ -28,7 +27,7 @@ package org.apache.flex.html.staticControls
 	import org.apache.flex.html.staticControls.beads.IBackgroundBead;
 	import org.apache.flex.html.staticControls.beads.IBorderBead;
 	
-	public class Alert extends UIBase implements IInitSkin, IPopUp
+	public class Alert extends UIBase implements IPopUp
 	{
 		public static const YES:uint    = 0x000001;
 		public static const NO:uint     = 0x000002;
@@ -51,7 +50,6 @@ package org.apache.flex.html.staticControls
 			alert.message = text;
 			alert.title  = title;
 			alert.flags = flags;
-			alert.initSkin();
 			
 			alert.show(parent);
 		}
@@ -88,15 +86,5 @@ package org.apache.flex.html.staticControls
 			IAlertModel(model).flags = value;
 		}
 		
-		
-		public function initSkin():void
-		{
-			addEventListener("close",handleAlertClose);
-		}
-		
-		private function handleAlertClose(event:Event):void
-		{
-			this.parent.removeChild(this);
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/Button.as b/frameworks/as/src/org/apache/flex/html/staticControls/Button.as
index fb03e01..dde2781 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/Button.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/Button.as
@@ -25,7 +25,6 @@ package org.apache.flex.html.staticControls
 	
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadModel;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.IMeasurementBead;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
@@ -36,7 +35,7 @@ package org.apache.flex.html.staticControls
 	
 	[Event(name="click", type="org.apache.flex.events.Event")]
 
-	public class Button extends SimpleButton implements IStrand, IInitSkin, IEventDispatcher, IUIBase
+	public class Button extends SimpleButton implements IStrand, IEventDispatcher, IUIBase
 	{
 		public function Button(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
 		{
@@ -180,7 +179,7 @@ package org.apache.flex.html.staticControls
 			return null;
 		}
 		
-		public function initSkin():void
+		protected function addedToParent():void
 		{
 			_width = $width;
 			_height = $height;
@@ -194,6 +193,7 @@ package org.apache.flex.html.staticControls
 			else if( p is DisplayObjectContainer ) {
 				p.addChild(this);
 			}
+            addedToParent();
 		}
 		
 		public function get measurementBead() : IMeasurementBead

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/CheckBox.as b/frameworks/as/src/org/apache/flex/html/staticControls/CheckBox.as
index 1558290..6afdd07 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/CheckBox.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/CheckBox.as
@@ -25,14 +25,13 @@ package org.apache.flex.html.staticControls
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IToggleButtonModel;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.core.UIButtonBase;
 	import org.apache.flex.events.Event;
 	
 	[Event(name="change", type="org.apache.flex.events.Event")]
 
-	public class CheckBox extends SimpleButton implements IStrand, IInitSkin
+	public class CheckBox extends UIButtonBase implements IStrand
 	{
 		public function CheckBox(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
 		{
@@ -59,105 +58,7 @@ package org.apache.flex.html.staticControls
 		{
 			IToggleButtonModel(model).selected = value;
 		}
-		
-		public function initSkin():void
-		{
-			_width = $width;
-			_height = $height;
-		}
-		
-		private var _id:String;
-		public function get id():String
-		{
-			return _id;
-		}
-		public function set id(value:String):void
-		{
-			if (_id != value)
-			{
-				_id = value;
-				dispatchEvent(new Event("idChanged"));
-			}
-		}
-		
-		private var _width:Number = 0;
-		override public function get width():Number
-		{
-			return _width;
-		}
-		override public function set width(value:Number):void
-		{
-			if (_width != value)
-			{
-				_width = value;
-				dispatchEvent(new Event("widthChanged"));
-			}
-		}
-		protected function get $width():Number
-		{
-			return super.width;
-		}
-		
-		private var _height:Number = 0;
-		override public function get height():Number
-		{
-			return _height;
-		}
-		override public function set height(value:Number):void
-		{
-			if (_height != value)
-			{
-				_height = value;
-				dispatchEvent(new Event("heightChanged"));
-			}
-		}
-		protected function get $height():Number
-		{
-			return super.height;
-		}
-		
-		private var _model:IBeadModel;
-		protected function get model():IBeadModel
-		{
-			return _model;
-		}
-		
-		private var strand:Vector.<IBead>;
-		public function addBead(bead:IBead):void
-		{
-			if (!strand)
-				strand = new Vector.<IBead>;
-			strand.push(bead);
-			if (bead is IBeadModel)
-				_model = bead as IBeadModel;
-			bead.strand = this;
-		}
-		
-		public function getBeadByType(classOrInterface:Class):IBead
-		{
-			for each (var bead:IBead in strand)
-			{
-				if (bead is classOrInterface)
-					return bead;
-			}
-			return null;
-		}
-		
-		public function removeBead(value:IBead):IBead	
-		{
-			var n:int = strand.length;
-			for (var i:int = 0; i < n; i++)
-			{
-				var bead:IBead = strand[i];
-				if (bead == value)
-				{
-					strand.splice(i, 1);
-					return bead;
-				}
-			}
-			return null;
-		}
-		
+				
 		private function internalMouseHandler(event:MouseEvent) : void
 		{
 			selected = !selected;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/ComboBox.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/ComboBox.as b/frameworks/as/src/org/apache/flex/html/staticControls/ComboBox.as
index e3e3eb3..e53a239 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/ComboBox.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/ComboBox.as
@@ -20,14 +20,13 @@ package org.apache.flex.html.staticControls
 {
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IComboBoxModel;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.html.staticControls.beads.controllers.ComboBoxController;
 	
 	[Event(name="change", type="org.apache.flex.events.Event")]
 	
-	public class ComboBox extends UIBase implements IInitSkin
+	public class ComboBox extends UIBase
 	{
 		public function ComboBox()
 		{
@@ -61,14 +60,5 @@ package org.apache.flex.html.staticControls
 			IComboBoxModel(model).selectedItem = value;
 		}
 				
-		public function initSkin():void
-		{
-			if (getBeadByType(IBeadView) == null) {
-				var cb:IBeadView = new (ValuesManager.valuesImpl.getValue(this, "iBeadView")) as IBeadView;
-				addBead(cb);	
-				var lc:ComboBoxController = new ComboBoxController();
-				addBead(lc);
-			}
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/Container.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/Container.as b/frameworks/as/src/org/apache/flex/html/staticControls/Container.as
index b6a7baf..f3524fe 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/Container.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/Container.as
@@ -23,7 +23,6 @@ package org.apache.flex.html.staticControls
 	
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IContainer;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
@@ -31,7 +30,7 @@ package org.apache.flex.html.staticControls
     [Event(name="change", type="org.apache.flex.events.Event")]
     
 	[DefaultProperty("mxmlContent")]
-	public class Container extends UIBase implements IContainer, IInitSkin
+	public class Container extends UIBase implements IContainer
 	{
 		public function Container()
 		{
@@ -41,10 +40,6 @@ package org.apache.flex.html.staticControls
 		
 		public var mxmlContent:Array;
 
-		public function initSkin():void
-		{
-		}
-		
 		private var actualParent:DisplayObjectContainer;
 		
 		public function setActualParent(parent:DisplayObjectContainer):void

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/ControlBar.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/ControlBar.as b/frameworks/as/src/org/apache/flex/html/staticControls/ControlBar.as
index d2cdca8..d0b3721 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/ControlBar.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/ControlBar.as
@@ -18,17 +18,12 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
-	import flash.display.DisplayObject;
 	
-	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IContainer;
-	import org.apache.flex.core.IInitSkin;
-	import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.html.staticControls.beads.layouts.NonVirtualHorizontalLayout;
 
-	public class ControlBar extends Container implements IContainer, IInitSkin
+	public class ControlBar extends Container implements IContainer
 	{
 		public function ControlBar()
 		{
@@ -37,12 +32,12 @@ package org.apache.flex.html.staticControls
 			className = "ControlBar";
 		}
 		
-		override public function initSkin():void
+		override protected function addedToParent():void
 		{
-			super.initSkin();	
+			super.addedToParent();	
 			
-			if( getBeadByType(NonVirtualHorizontalLayout) == null ) {
-				var layout:IBead = new (ValuesManager.valuesImpl.getValue(this, "iLayoutBead")) as IBead;
+			if( getBeadByType(IBeadLayout) == null ) {
+				var layout:IBeadLayout = new (ValuesManager.valuesImpl.getValue(this, "iBeadLayout")) as IBeadLayout;
 				addBead(layout);
 			}
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/DropDownList.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/DropDownList.as b/frameworks/as/src/org/apache/flex/html/staticControls/DropDownList.as
index 7b1ecc9..018b643 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/DropDownList.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/DropDownList.as
@@ -55,12 +55,6 @@ package org.apache.flex.html.staticControls
         {
             ISelectionModel(model).selectedItem = value;
         }
-                
-        override public function initSkin():void
-        {
-				var lc:DropDownListController = new DropDownListController();
-				addBead(lc);	
-        }
-        
+                        
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/Label.as b/frameworks/as/src/org/apache/flex/html/staticControls/Label.as
index cff219c..6fdf157 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/Label.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/Label.as
@@ -19,7 +19,6 @@
 package org.apache.flex.html.staticControls
 {
 	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.ITextModel;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
@@ -33,7 +32,7 @@ package org.apache.flex.html.staticControls
 	 *  Labels to be declared and have their actual
 	 *  view be swapped out.
 	 */
-	public class Label extends UIBase implements IInitSkin
+	public class Label extends UIBase
 	{
 		public function Label()
 		{
@@ -58,10 +57,6 @@ package org.apache.flex.html.staticControls
 			ITextModel(model).html = value;
 		}
 				
-		public function initSkin():void
-		{
-		}
-		
 		override public function set width(value:Number):void
 		{
 			super.width = value;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/List.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/List.as b/frameworks/as/src/org/apache/flex/html/staticControls/List.as
index 10daa7a..b6003be 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/List.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/List.as
@@ -19,13 +19,14 @@
 package org.apache.flex.html.staticControls
 {
 	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IInitSkin;
+	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IItemRenderer;
 	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.ItemRendererClassFactory;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.html.staticControls.beads.IDataProviderItemRendererMapper;
 	import org.apache.flex.html.staticControls.beads.IListView;
 	import org.apache.flex.html.staticControls.beads.TextItemRendererFactoryForArrayData;
 	import org.apache.flex.html.staticControls.beads.controllers.ItemRendererMouseController;
@@ -42,7 +43,7 @@ package org.apache.flex.html.staticControls
 	 *  Labels to be declared and have their actual
 	 *  view be swapped out.
 	 */
-	public class List extends UIBase implements IInitSkin
+	public class List extends UIBase
 	{
 		public function List()
 		{
@@ -76,31 +77,14 @@ package org.apache.flex.html.staticControls
 			ISelectionModel(model).selectedItem = value;
 		}
 		
-		public function initSkin():void
+		override protected function addedToParent():void
 		{
-            // TODO: (aharui) remove later
-            if (getBeadByType(IListView) == null)
+            if (getBeadByType(IDataProviderItemRendererMapper) == null)
             {
-                var irf:TextItemRendererFactoryForArrayData = new TextItemRendererFactoryForArrayData();
-                var ircf:ItemRendererClassFactory = new ItemRendererClassFactory();
-                ircf.createFunction = createTextItemRenderer;
-                irf.itemRendererFactory = ircf;
-                addBead(irf);
-                var ll:NonVirtualVerticalScrollingLayout = new NonVirtualVerticalScrollingLayout();
-                //lb.addBead(ll);
-                var lmc:ListSingleSelectionMouseController = new ListSingleSelectionMouseController();
-                addBead(lmc);
-                
+                var mapper:IDataProviderItemRendererMapper = new (ValuesManager.valuesImpl.getValue(this, "iDataProviderItemRendererMapper")) as IDataProviderItemRendererMapper;
+                addBead(mapper);
             }
 		}
         
-        private function createTextItemRenderer(parent:IItemRendererParent):IItemRenderer
-        {
-            var tfir:TextFieldItemRenderer = new TextFieldItemRenderer();
-            tfir.addBead(new ItemRendererMouseController());
-            tfir.height = 16;
-            return tfir;
-            
-        }
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as b/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as
index 631409d..47774bf 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as
@@ -75,10 +75,5 @@ package org.apache.flex.html.staticControls
 			ISpinnerModel(model).snapInterval = value;
 		}
 		
-		override public function initSkin():void
-		{
-			super.initSkin();
-			
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/Panel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/Panel.as b/frameworks/as/src/org/apache/flex/html/staticControls/Panel.as
index a5b04c8..90b637e 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/Panel.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/Panel.as
@@ -66,10 +66,5 @@ package org.apache.flex.html.staticControls
 			_controlBar = value;
 		}
 		
-		override public function initSkin():void
-		{
-			super.initSkin();
-						
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as b/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as
index ad42c4b..5f0d47b 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/RadioButton.as
@@ -20,22 +20,20 @@ package org.apache.flex.html.staticControls
 {
 	import flash.display.DisplayObject;
 	import flash.display.DisplayObjectContainer;
-	import flash.display.SimpleButton;
 	import flash.events.MouseEvent;
 	import flash.utils.Dictionary;
 	
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadModel;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IValueToggleButtonModel;
-	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.core.UIButtonBase;
 	import org.apache.flex.events.Event;
 	
 	[Event(name="change", type="org.apache.flex.events.Event")]
 
-	public class RadioButton extends SimpleButton implements IStrand, IInitSkin
+	public class RadioButton extends UIButtonBase implements IStrand
 	{
 		public function RadioButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
 		{
@@ -110,21 +108,12 @@ package org.apache.flex.html.staticControls
 			IValueToggleButtonModel(model).selected = (newValue == value);
 			IValueToggleButtonModel(model).selectedValue = newValue;
 		}
-		
-		public function addToParent(p:DisplayObjectContainer):void
-		{
-			p.addChild(this);
-		}
-		
-		public function initSkin():void
+				
+		override protected function addedToParent():void
 		{
-			if (getBeadByType(IBeadView) == null)
-				addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadView")) as IBead);	
-			
-			_width = $width;
-			_height = $height;
-			
-			// if this instance is selected, set the local selectedValue to
+            super.addedToParent();
+
+            // if this instance is selected, set the local selectedValue to
 			// this instance's value
 			if( selected ) selectedValue = value;
 			
@@ -144,99 +133,7 @@ package org.apache.flex.html.staticControls
 			
 			dict[this] = this;
 		}
-		
-		private var _id:String;
-		public function get id():String
-		{
-			return _id;
-		}
-		public function set id(value:String):void
-		{
-			if (_id != value)
-			{
-				_id = value;
-				dispatchEvent(new Event("idChanged"));
-			}
-		}
-		
-		private var _width:Number = 0;
-		override public function get width():Number
-		{
-			return _width;
-		}
-		override public function set width(value:Number):void
-		{
-			if (_width != value)
-			{
-				_width = value;
-				dispatchEvent(new Event("widthChanged"));
-			}
-		}
-		protected function get $width():Number
-		{
-			return super.width;
-		}
-		
-		private var _height:Number = 0;
-		override public function get height():Number
-		{
-			return _height;
-		}
-		override public function set height(value:Number):void
-		{
-			if (_height != value)
-			{
-				_height = value;
-				dispatchEvent(new Event("heightChanged"));
-			}
-		}
-		protected function get $height():Number
-		{
-			return super.height;
-		}
-		
-		private var _model:IBeadModel;
-		protected function get model():IBeadModel
-		{
-			return _model;
-		}
-		
-		private var strand:Vector.<IBead>;
-		public function addBead(bead:IBead):void
-		{
-			if (!strand)
-				strand = new Vector.<IBead>;
-			strand.push(bead);
-			if (bead is IBeadModel)
-				_model = bead as IBeadModel;
-			bead.strand = this;
-		}
-		
-		public function getBeadByType(classOrInterface:Class):IBead
-		{
-			for each (var bead:IBead in strand)
-			{
-				if (bead is classOrInterface)
-					return bead;
-			}
-			return null;
-		}
-		
-		public function removeBead(value:IBead):IBead	
-		{
-			var n:int = strand.length;
-			for (var i:int = 0; i < n; i++)
-			{
-				var bead:IBead = strand[i];
-				if (bead == value)
-				{
-					strand.splice(i, 1);
-					return bead;
-				}
-			}
-			return null;
-		}
-		
+				
 		private function internalMouseHandler(event:MouseEvent) : void
 		{
 			// prevent radiobutton from being turned off by a click

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/SimpleAlert.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/SimpleAlert.as b/frameworks/as/src/org/apache/flex/html/staticControls/SimpleAlert.as
index f0b528e..9eae0dd 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/SimpleAlert.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/SimpleAlert.as
@@ -19,14 +19,13 @@
 package org.apache.flex.html.staticControls
 {	
 	import org.apache.flex.core.IAlertModel;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.IPopUp;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.events.Event;
 	
 	[Event(name="close", type="org.apache.flex.events.Event")]
 	
-	public class SimpleAlert extends UIBase implements IInitSkin, IPopUp
+	public class SimpleAlert extends UIBase implements IPopUp
 	{
 		public function SimpleAlert()
 		{
@@ -53,11 +52,6 @@ package org.apache.flex.html.staticControls
 			IAlertModel(model).htmlMessage = value;
 		}
 		
-		public function initSkin():void
-		{			
-			addEventListener("close",handleAlertClose);
-		}
-		
 		public function show(parent:Object) : void
 		{
 			addToParent(parent);
@@ -67,15 +61,10 @@ package org.apache.flex.html.staticControls
 		{
 			var alert:SimpleAlert = new SimpleAlert();
 			alert.message = message;
-			alert.initSkin();
 			alert.show(parent);
 			
 			return alert;
 		}
 		
-		private function handleAlertClose(event:Event):void
-		{
-			this.parent.removeChild(this);
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as b/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as
index bb1391a..ab9dc1d 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as
@@ -18,13 +18,12 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.ISpinnerModel;
 	import org.apache.flex.core.UIBase;
 	
 	[Event(name="valueChanged", type="org.apache.flex.events.Event")]
 	
-	public class Spinner extends UIBase implements IInitSkin
+	public class Spinner extends UIBase
 	{
 		public function Spinner()
 		{
@@ -78,8 +77,5 @@ package org.apache.flex.html.staticControls
 			ISpinnerModel(model).stepSize = value;
 		}
 		
-		public function initSkin():void
-		{
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/TextArea.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/TextArea.as b/frameworks/as/src/org/apache/flex/html/staticControls/TextArea.as
index c8812e2..b8bb750 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/TextArea.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/TextArea.as
@@ -18,11 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.ITextModel;
 	import org.apache.flex.core.UIBase;
 	
-	public class TextArea extends UIBase implements IInitSkin
+	public class TextArea extends UIBase
 	{
 		public function TextArea()
 		{
@@ -47,8 +46,5 @@ package org.apache.flex.html.staticControls
 			ITextModel(model).html = value;
 		}
 		
-		public function initSkin():void
-		{
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/TextButton.as b/frameworks/as/src/org/apache/flex/html/staticControls/TextButton.as
index 1a302f5..843bd82 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/TextButton.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/TextButton.as
@@ -21,11 +21,10 @@ package org.apache.flex.html.staticControls
 	import flash.display.DisplayObject;
 	
 	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.ITextModel;
 	import org.apache.flex.core.ValuesManager;
 	
-	public class TextButton extends Button implements IInitSkin
+	public class TextButton extends Button
 	{
 		public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
 		{
@@ -50,8 +49,5 @@ package org.apache.flex.html.staticControls
 			ITextModel(model).html = value;
 		}
 
-		override public function initSkin():void
-		{
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/TextInput.as b/frameworks/as/src/org/apache/flex/html/staticControls/TextInput.as
index c88e253..d17a58b 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/TextInput.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/TextInput.as
@@ -18,12 +18,11 @@
 package org.apache.flex.html.staticControls
 {
 	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.ITextModel;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	
-	public class TextInput extends UIBase implements IInitSkin
+	public class TextInput extends UIBase
 	{
 		public function TextInput()
 		{
@@ -48,8 +47,5 @@ package org.apache.flex.html.staticControls
 			ITextModel(model).html = value;
 		}
 		
-		public function initSkin():void
-		{
-		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/TitleBar.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/TitleBar.as b/frameworks/as/src/org/apache/flex/html/staticControls/TitleBar.as
index 4fc6b0d..3423955 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/TitleBar.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/TitleBar.as
@@ -21,12 +21,11 @@ package org.apache.flex.html.staticControls
 	import flash.display.Shape;
 	
 	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IMeasurementBead;
+	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.ITitleBarModel;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.html.staticControls.Label;
-	import org.apache.flex.html.staticControls.beads.layouts.NonVirtualHorizontalLayout;
 	
 	public class TitleBar extends Container
 	{
@@ -76,12 +75,12 @@ package org.apache.flex.html.staticControls
 			return closeButton;
 		}
 		
-		override public function initSkin():void
+		override protected function addedToParent():void
 		{
-			super.initSkin();
+			super.addedToParent();
 			
-			if( getBeadByType(NonVirtualHorizontalLayout) == null )
-				addBead(new (ValuesManager.valuesImpl.getValue(this, "iLayoutBead")) as IBead);
+			if( getBeadByType(IBeadLayout) == null )
+				addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadLayout")) as IBead);
 			
 			// add the label for the title and the button for the close
 			_titleLabel = createTitle();
@@ -126,7 +125,6 @@ package org.apache.flex.html.staticControls
 		protected function createTitle() : Label
 		{
 			var label:Label = new Label();
-			label.initSkin();
 			label.text = title;
 			return label;
 		}
@@ -158,7 +156,6 @@ package org.apache.flex.html.staticControls
 			hitArea.graphics.endFill();
 			
 			var button:Button = new Button(upState, overState, downState, hitArea);
-			button.initSkin();
 			button.visible = showCloseButton;
 			
 			button.addEventListener('click',closeButtonHandler);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertView.as
index 59d4544..610e33c 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertView.as
@@ -82,38 +82,31 @@ package org.apache.flex.html.staticControls.beads
 			if( flags & Alert.OK ) {
 				_okButton = new TextButton();
 				_okButton.text = IAlertModel(UIBase(_strand).model).okLabel;
-				_okButton.initSkin();
 				_okButton.addEventListener("click",handleOK);
 			}
 			if( flags & Alert.CANCEL ) {
 				_cancelButton = new TextButton();
 				_cancelButton.text = IAlertModel(UIBase(_strand).model).cancelLabel;
-				_cancelButton.initSkin();
 				_cancelButton.addEventListener("click",handleCancel);
 			}
 			if( flags & Alert.YES ) {
 				_yesButton = new TextButton();
 				_yesButton.text = IAlertModel(UIBase(_strand).model).yesLabel;
-				_yesButton.initSkin();
 				_yesButton.addEventListener("click",handleYes);
 			}
 			if( flags & Alert.NO ) {
 				_noButton = new TextButton();
 				_noButton.text = IAlertModel(UIBase(_strand).model).noLabel;
-				_noButton.initSkin();
 				_noButton.addEventListener("click",handleNo);
 			}
 			
 			_titleBar = new TitleBar();
 			_titleBar.title = IAlertModel(UIBase(_strand).model).title;
-			_titleBar.initSkin();
 			
 			_label = new Label();
 			_label.text = IAlertModel(UIBase(_strand).model).message;
-			_label.initSkin();
 			
 			_controlBar = new ControlBar();
-			_controlBar.initSkin();
 			if( _okButton ) _okButton.addToParent(_controlBar);
 			if( _cancelButton ) _cancelButton.addToParent(_controlBar);
 			if( _yesButton  ) _yesButton.addToParent(_controlBar);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as
index 6128a2b..7c0f74b 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as
@@ -24,7 +24,7 @@ package org.apache.flex.html.staticControls.beads
 	
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IComboBoxModel;
-	import org.apache.flex.core.IInitSkin;
+	import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
@@ -77,7 +77,6 @@ package org.apache.flex.html.staticControls.beads
 			textInput.addToParent(DisplayObjectContainer(strand));
 			textInput.width = 100;
 			textInput.height = 18;
-			textInput.initSkin();
 			
 			upSprite = new Sprite();
 			drawButton( upSprite, "up", 18, 18 );
@@ -92,7 +91,6 @@ package org.apache.flex.html.staticControls.beads
 			button.height = 18;
 			button.x = textInput.width;
 			button.y = textInput.y;
-			button.initSkin();
 			
 			// listen for events on the text input and modify the list and selection
 			textInput.addEventListener("change", textChangeHandler,false,0,true);
@@ -151,9 +149,7 @@ package org.apache.flex.html.staticControls.beads
 					var host:DisplayObjectContainer = DisplayObject(_strand).parent;
 					while (host.parent != root)
 						host = host.parent;
-					host.addChild(_popUp as DisplayObject);
-					if (_popUp is IInitSkin)
-						IInitSkin(_popUp).initSkin();
+					IUIBase(popUp).addToParent(host);
 				}
 				else
 				{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListView.as
index d167146..19137ed 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListView.as
@@ -27,7 +27,7 @@ package org.apache.flex.html.staticControls.beads
 	import flash.text.TextFieldType;
 	
 	import org.apache.flex.core.CSSTextField;
-	import org.apache.flex.core.IInitSkin;
+	import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.ValuesManager;
@@ -207,9 +207,7 @@ package org.apache.flex.html.staticControls.beads
 					var host:DisplayObjectContainer = DisplayObject(_strand).parent;
 					while (host.parent != root)
 						host = host.parent;
-                    host.addChild(_popUp as DisplayObject);
-					if (_popUp is IInitSkin)
-						IInitSkin(_popUp).initSkin();
+                    IUIBase(_popUp).addToParent(host);
                 }
                 else
                 {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDataProviderItemRendererMapper.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDataProviderItemRendererMapper.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDataProviderItemRendererMapper.as
new file mode 100644
index 0000000..8a83d82
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDataProviderItemRendererMapper.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.staticControls.beads
+{
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IItemRendererClassFactory;
+
+    /**
+     * Classes that generate ItemRenderers based on dataProvider contents.
+     * These classes use an IItemRendererFactory to generate the actual
+     * ItemRenderer instances
+     */
+	public interface IDataProviderItemRendererMapper extends IBead
+	{
+        function get itemRendererFactory():IItemRendererClassFactory;
+        function set itemRendererFactory(value:IItemRendererClassFactory):void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListView.as
index 2a61dfb..81217ee 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListView.as
@@ -19,7 +19,6 @@
 package org.apache.flex.html.staticControls.beads
 {	
 	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.IItemRenderer;
 	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.ISelectionModel;
@@ -34,7 +33,7 @@ package org.apache.flex.html.staticControls.beads
 	import org.apache.flex.html.staticControls.supportClasses.NonVirtualDataGroup;
 	import org.apache.flex.html.staticControls.supportClasses.ScrollBar;
 
-	public class ListView implements IBead, IInitSkin, IStrand, IListView
+	public class ListView implements IBead, IStrand, IListView
 	{
 		public function ListView()
 		{
@@ -101,10 +100,6 @@ package org.apache.flex.html.staticControls.beads
             lastSelectedIndex = listModel.selectedIndex;
 		}
 			
-		public function initSkin():void
-		{
-		}
-						
 		private function createScrollBar():ScrollBar
 		{
 			var vsb:ScrollBar;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
index 3355f77..26e6716 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
@@ -51,13 +51,11 @@ package org.apache.flex.html.staticControls.beads
 			// add an input field
 			input = new TextInput();
 			input.addToParent(value);
-			input.initSkin();
 			
 			// add a spinner
 			spinner = new Spinner();
 			spinner.addBead( value.getBeadByType(ISpinnerModel) );
 			spinner.addToParent(value);
-			spinner.initSkin();
 			spinner.width = 17;
 			
 			// listen for changes to the text input field which will reset the

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelView.as
index 154df76..8fd91c8 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelView.as
@@ -36,7 +36,6 @@ package org.apache.flex.html.staticControls.beads
 		public function PanelView()
 		{
 			_titleBar = new TitleBar();
-			_titleBar.initSkin();
 		}
 		
 		private var _titleBar:TitleBar;
@@ -63,7 +62,6 @@ package org.apache.flex.html.staticControls.beads
 			var controlBarItems:Array = Panel(_strand).controlBar;
 			if( controlBarItems && controlBarItems.length > 0 ) {
 				_controlBar = new ControlBar();
-				_controlBar.initSkin();
 				
 				for each(var comp:IUIBase in controlBarItems) {
 					comp.addToParent(_controlBar);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarView.as
index ca12974..731943e 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarView.as
@@ -21,14 +21,13 @@ package org.apache.flex.html.staticControls.beads
 	import flash.display.DisplayObject;
 	
 	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.IScrollBarModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.html.staticControls.Button;
 	import org.apache.flex.html.staticControls.beads.controllers.ButtonAutoRepeatController;
 
-	public class ScrollBarView implements IBead, IInitSkin, IStrand, IScrollBarView
+	public class ScrollBarView implements IBead, IStrand, IScrollBarView
 	{
 		public function ScrollBarView()
 		{
@@ -50,30 +49,24 @@ package org.apache.flex.html.staticControls.beads
 		public function set strand(value:IStrand):void
 		{
 			_strand = value;
-			UIBase(value).addChild(_decrement);
-			UIBase(value).addChild(_increment);
-			UIBase(value).addChild(_track);
-			UIBase(value).addChild(_thumb);
 			sbModel = value.getBeadByType(IScrollBarModel) as IScrollBarModel;
-		}
-		        
-		public function initSkin():void
-		{
-			// TODO: (aharui) put in values impl
+
+            // TODO: (aharui) put in values impl
 			_increment = new Button();
 			Button(_increment).addBead(new DownArrowButtonView());
             Button(_increment).addBead(new ButtonAutoRepeatController());
-			Button(_increment).initSkin();
 			_decrement = new Button();
 			Button(_decrement).addBead(new UpArrowButtonView());
             Button(_decrement).addBead(new ButtonAutoRepeatController());
-			Button(_decrement).initSkin();
 			_track = new Button();				
 			Button(_track).addBead(new VScrollBarTrackView());
-			Button(_track).initSkin();
 			_thumb = new Button();				
 			Button(_thumb).addBead(new VScrollBarThumbView());
-			Button(_thumb).initSkin();
+            
+            UIBase(value).addChild(_decrement);
+            UIBase(value).addChild(_increment);
+            UIBase(value).addChild(_track);
+            UIBase(value).addChild(_thumb);
 		}
 						
 		private var _decrement:DisplayObject;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/SimpleAlertView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/SimpleAlertView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/SimpleAlertView.as
index 8a82caa..f08b796 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/SimpleAlertView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/SimpleAlertView.as
@@ -75,14 +75,12 @@ package org.apache.flex.html.staticControls.beads
 			model.addEventListener("htmlMessageChange",handleMessageChange);
 			
 			messageLabel = new Label();
-			messageLabel.initSkin();
 			messageLabel.text = model.message;
 			messageLabel.html = model.htmlMessage;
 			messageLabel.addToParent(_strand);
 			
 			okButton = new TextButton();
 			okButton.text = model.okLabel;
-			okButton.initSkin();
 			okButton.addToParent(_strand);
 			okButton.addEventListener("click",handleOK);
 			

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as
index c82ea7d..65f495d 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as
@@ -39,19 +39,13 @@ package org.apache.flex.html.staticControls.beads
 		public function set strand(value:IStrand):void
 		{
 			_strand = value;
-			initSkin();
-		}
-		
-		public function initSkin():void
-		{
+            
 			_increment = new Button();
 			Button(_increment).addBead(new UpArrowButtonView());
 			Button(_increment).addBead(new ButtonAutoRepeatController());
-			Button(_increment).initSkin();
 			_decrement = new Button();
 			Button(_decrement).addBead(new DownArrowButtonView());
 			Button(_decrement).addBead(new ButtonAutoRepeatController());
-			Button(_decrement).initSkin();
 			
 			var mouseController:SpinnerMouseController = new SpinnerMouseController();
 			_strand.addBead(mouseController);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextAreaView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextAreaView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextAreaView.as
index 4996b72..8b90bda 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextAreaView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextAreaView.as
@@ -24,7 +24,6 @@ package org.apache.flex.html.staticControls.beads
 	import flash.text.TextFieldType;
 	
 	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IInitSkin;
 	import org.apache.flex.core.IScrollBarModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.UIBase;
@@ -35,7 +34,7 @@ package org.apache.flex.html.staticControls.beads
 	import org.apache.flex.html.staticControls.supportClasses.Border;
 	import org.apache.flex.html.staticControls.supportClasses.ScrollBar;
 
-	public class TextAreaView extends TextFieldViewBase implements IInitSkin, IStrand
+	public class TextAreaView extends TextFieldViewBase implements IStrand
 	{
 		public function TextAreaView()
 		{
@@ -91,11 +90,7 @@ package org.apache.flex.html.staticControls.beads
 			IEventDispatcher(strand).addEventListener("heightChanged", sizeChangedHandler);
 			sizeChangedHandler(null);
 		}
-		
-		public function initSkin():void
-		{
-		}
-		
+				
 		private function createScrollBar():ScrollBar
 		{
 			var vsb:ScrollBar;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as
index afb3813..fb53026 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as
@@ -25,7 +25,8 @@ package org.apache.flex.html.staticControls.beads
     import org.apache.flex.core.IItemRendererParent;
     import org.apache.flex.core.ISelectionModel;
     import org.apache.flex.core.IStrand;
-	import org.apache.flex.events.Event;
+    import org.apache.flex.core.ValuesManager;
+    import org.apache.flex.events.Event;
 
 	public class TextItemRendererFactoryForArrayData implements IBead
 	{
@@ -45,12 +46,28 @@ package org.apache.flex.html.staticControls.beads
 			var listView:IListView = value.getBeadByType(IListView) as IListView;
 			dataGroup = listView.dataGroup;
 			selectionModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
+            
+            if (!itemRendererFactory)
+            {
+                _itemRendererFactory = new (ValuesManager.valuesImpl.getValue(this, "iItemRendererFactory")) as IItemRendererClassFactory;
+            }
+            
 			dataProviderChangeHandler(null);
 		}
 		
-        public var itemRendererFactory:IItemRendererClassFactory;
+        public var _itemRendererFactory:IItemRendererClassFactory;
         
-		public var dataGroup:IItemRendererParent;
+        public function get itemRendererFactory():IItemRendererClassFactory
+        {
+            return _itemRendererFactory
+        }
+        
+        public function set itemRendererFactory(value:IItemRendererClassFactory):void
+        {
+            _itemRendererFactory = value;
+        }
+        
+		protected var dataGroup:IItemRendererParent;
 		
 		private function dataProviderChangeHandler(event:Event):void
 		{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/AlertController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/AlertController.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/AlertController.as
new file mode 100644
index 0000000..01ba18a
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/AlertController.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.staticControls.beads.controllers
+{	
+    import flash.display.DisplayObject;
+    
+	import org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+
+    public class AlertController implements IBeadController
+	{
+		public function AlertController()
+		{
+		}
+		
+        private var _strand:IStrand;
+        
+        public function get strand():IStrand
+        {
+            return _strand;
+        }
+        
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            IEventDispatcher(value).addEventListener("close",handleAlertClose);
+        }
+        
+        private function handleAlertClose(event:Event):void
+        {
+            DisplayObject(_strand).parent.removeChild(DisplayObject(_strand));
+        }
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/ComboBoxController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/ComboBoxController.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/ComboBoxController.as
index 9ef5821..4159eb0 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/ComboBoxController.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/ComboBoxController.as
@@ -21,14 +21,14 @@ package org.apache.flex.html.staticControls.beads.controllers
 	import flash.display.DisplayObject;
 	import flash.events.MouseEvent;
 	
-	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadController;
 	import org.apache.flex.html.staticControls.beads.IComboBoxView;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
 
-	public class ComboBoxController implements IBead
+	public class ComboBoxController implements IBeadController
 	{
 		public function ComboBoxController()
 		{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/DropDownListController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/DropDownListController.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/DropDownListController.as
index 0bc9dca..fa41001 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/DropDownListController.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/DropDownListController.as
@@ -22,13 +22,14 @@ package org.apache.flex.html.staticControls.beads.controllers
 	import flash.geom.Point;
 	
 	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadController;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.html.staticControls.beads.IDropDownListView;
 
-	public class DropDownListController implements IBead
+	public class DropDownListController implements IBead, IBeadController
 	{
 		public function DropDownListController()
 		{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/html/staticControls/supportClasses/DropDownListList.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/supportClasses/DropDownListList.as b/frameworks/as/src/org/apache/flex/html/staticControls/supportClasses/DropDownListList.as
index 3a4c39e..df61a7a 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/supportClasses/DropDownListList.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/supportClasses/DropDownListList.as
@@ -31,9 +31,9 @@ package org.apache.flex.html.staticControls.supportClasses
 			super();
 		}
 		
-		override public function initSkin():void
+		override protected function addedToParent():void
 		{
-			super.initSkin();
+			super.addedToParent();
 			
 			var bb:SolidBackgroundBead = new SolidBackgroundBead();
 			bb.backgroundColor = 0xffffff;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c316d26/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as b/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as
index 131ed80..0b0fd22 100644
--- a/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as
+++ b/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as
@@ -24,7 +24,6 @@ import flash.display.DisplayObjectContainer;
 import org.apache.flex.core.IStrand;
 import org.apache.flex.core.IBead;
 import org.apache.flex.core.IDocument;
-import org.apache.flex.core.IInitSkin;
 import org.apache.flex.core.UIBase;
 import org.apache.flex.core.IContainer;
 
@@ -177,12 +176,7 @@ public class MXMLDataInterpreter
                 else if (simple == false)
                     value = generateMXMLObject(document, value as Array);
                 comp.setStyle(name, value);
-            }
-            if (comp is IInitSkin)
-            {
-                IInitSkin(comp).initSkin();
-            }
-            
+            }            
             
             m = data[i++]; // num effects
             for (j = 0; j < m; j++)


Mime
View raw message