flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [05/13] Rename xxxBead that was a view bead to xxxView
Date Tue, 16 Jul 2013 07:56:22 GMT
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListBead.as
deleted file mode 100644
index 0eaf91a..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListBead.as
+++ /dev/null
@@ -1,222 +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.html.staticControls.beads
-{
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	import flash.display.Graphics;
-	import flash.display.Shape;
-	import flash.display.SimpleButton;
-	import flash.display.Sprite;
-	import flash.text.TextFieldType;
-	
-	import org.apache.flex.core.CSSTextField;
-	import org.apache.flex.core.IInitSkin;
-	import org.apache.flex.core.ISelectionModel;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.IEventDispatcher;
-
-	public class DropDownListBead implements IDropDownListBead
-	{
-		public function DropDownListBead()
-		{
-            upSprite = new Sprite();
-            downSprite = new Sprite();
-            overSprite = new Sprite();
-			upTextField = new CSSTextField();
-			downTextField = new CSSTextField();
-			overTextField = new CSSTextField();
-            upSprite.addChild(upTextField);
-            overSprite.addChild(overTextField);
-            downSprite.addChild(downTextField);
-			upTextField.border = true;
-			downTextField.border = true;
-			overTextField.border = true;
-			upTextField.background = true;
-			downTextField.background = true;
-			overTextField.background = true;
-			upTextField.borderColor = 0;
-			downTextField.borderColor = 0;
-			overTextField.borderColor = 0;
-			upTextField.backgroundColor = 0xEEEEEE;
-			downTextField.backgroundColor = 0x808080;
-			overTextField.backgroundColor = 0xFFFFFF;
-			upTextField.selectable = false;
-			upTextField.type = TextFieldType.DYNAMIC;
-			downTextField.selectable = false;
-			downTextField.type = TextFieldType.DYNAMIC;
-			overTextField.selectable = false;
-			overTextField.type = TextFieldType.DYNAMIC;
-			//upTextField.autoSize = "left";
-			//downTextField.autoSize = "left";
-			//overTextField.autoSize = "left";
-            
-            upArrows = new Shape();
-            overArrows = new Shape();
-            downArrows = new Shape();
-            upSprite.addChild(upArrows);
-			overSprite.addChild(overArrows);
-			downSprite.addChild(downArrows);
-            drawArrows(upArrows, 0xEEEEEE);
-            drawArrows(overArrows, 0xFFFFFF);
-            drawArrows(downArrows, 0x808080);
-
-		}
-
-        private function drawArrows(shape:Shape, color:uint):void
-        {
-            var g:Graphics = shape.graphics;
-            g.beginFill(color);
-            g.drawRect(0, 0, 16, 17);
-            g.endFill();
-            g.beginFill(0);
-            g.moveTo(8, 2);
-            g.lineTo(12, 6);
-            g.lineTo(4, 6);
-            g.lineTo(8, 2);
-            g.endFill();
-            g.beginFill(0);
-            g.moveTo(8, 14);
-            g.lineTo(12, 10);
-            g.lineTo(4, 10);
-            g.lineTo(8, 14);
-            g.endFill();
-            g.lineStyle(1, 0);
-            g.drawRect(0, 0, 16, 17);
-        }
-        
-		private var selectionModel:ISelectionModel;
-		
-		private var _strand:IStrand;
-		
-		private var shape:Shape;
-		
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-            selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
-            selectionModel.addEventListener("selectedIndexChanged", selectionChangeHandler);
-			shape = new Shape();
-			shape.graphics.beginFill(0xCCCCCC);
-			shape.graphics.drawRect(0, 0, 10, 10);
-			shape.graphics.endFill();
-			SimpleButton(value).upState = upSprite;
-			SimpleButton(value).downState = downSprite;
-			SimpleButton(value).overState = overSprite;
-			SimpleButton(value).hitTestState = shape;
-			if (selectionModel.selectedIndex !== -1)
-				text = selectionModel.selectedItem.toString();
-            IEventDispatcher(value).addEventListener("heightChanged", changeHandler);
-            IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
-			changeHandler(null);
-		}
-		
-		private function selectionChangeHandler(event:Event):void
-		{
-			text = selectionModel.selectedItem.toString();
-		}
-		
-        private function changeHandler(event:Event):void
-        {
-            var ww:Number = DisplayObject(_strand).width;
-            var hh:Number = DisplayObject(_strand).height;
-            upArrows.x = ww - upArrows.width;            
-            overArrows.x = ww - overArrows.width;            
-            downArrows.x = ww - downArrows.width;
-			upTextField.width = upArrows.x;
-			downTextField.width = downArrows.x;
-			overTextField.width = overArrows.x;
-			upTextField.height = hh;
-			downTextField.height = hh;
-			overTextField.height = hh;
-			shape.graphics.clear();
-			shape.graphics.beginFill(0xCCCCCC);
-			shape.graphics.drawRect(0, 0, ww, hh);
-			shape.graphics.endFill();
-        }
-        
-		private var upTextField:CSSTextField;
-		private var downTextField:CSSTextField;
-		private var overTextField:CSSTextField;
-        private var upSprite:Sprite;
-        private var downSprite:Sprite;
-        private var overSprite:Sprite;
-        private var upArrows:Shape;
-        private var downArrows:Shape;
-        private var overArrows:Shape;
-		
-		public function get text():String
-		{
-			return upTextField.text;
-		}
-        
-		public function set text(value:String):void
-		{
-            var ww:Number = DisplayObject(_strand).width;
-            var hh:Number = DisplayObject(_strand).height;
-			upTextField.text = value;
-			downTextField.text = value;
-			overTextField.text = value;
-			
-		}
-		
-        private var _popUp:IStrand;
-        public function get popUp():IStrand
-        {
-            return _popUp;
-        }
-        
-        private var _popUpVisible:Boolean;
-        
-        public function get popUpVisible():Boolean
-        {
-            return _popUpVisible;
-        }
-        
-        public function set popUpVisible(value:Boolean):void
-        {
-            if (value != _popUpVisible)
-            {
-                _popUpVisible = value;
-                if (value)
-                {
-                    if (!_popUp)
-                    {
-                        var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iPopUp") as Class;
-                        _popUp = new popUpClass() as IStrand;
-                    }
-					var root:Object = DisplayObject(_strand).root;
-					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();
-                }
-                else
-                {
-                    DisplayObject(_popUp).parent.removeChild(_popUp as DisplayObject);                    
-                }
-            }
-        }
-        
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/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
new file mode 100644
index 0000000..d167146
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/DropDownListView.as
@@ -0,0 +1,222 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	import flash.display.Graphics;
+	import flash.display.Shape;
+	import flash.display.SimpleButton;
+	import flash.display.Sprite;
+	import flash.text.TextFieldType;
+	
+	import org.apache.flex.core.CSSTextField;
+	import org.apache.flex.core.IInitSkin;
+	import org.apache.flex.core.ISelectionModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+
+	public class DropDownListView implements IDropDownListView
+	{
+		public function DropDownListView()
+		{
+            upSprite = new Sprite();
+            downSprite = new Sprite();
+            overSprite = new Sprite();
+			upTextField = new CSSTextField();
+			downTextField = new CSSTextField();
+			overTextField = new CSSTextField();
+            upSprite.addChild(upTextField);
+            overSprite.addChild(overTextField);
+            downSprite.addChild(downTextField);
+			upTextField.border = true;
+			downTextField.border = true;
+			overTextField.border = true;
+			upTextField.background = true;
+			downTextField.background = true;
+			overTextField.background = true;
+			upTextField.borderColor = 0;
+			downTextField.borderColor = 0;
+			overTextField.borderColor = 0;
+			upTextField.backgroundColor = 0xEEEEEE;
+			downTextField.backgroundColor = 0x808080;
+			overTextField.backgroundColor = 0xFFFFFF;
+			upTextField.selectable = false;
+			upTextField.type = TextFieldType.DYNAMIC;
+			downTextField.selectable = false;
+			downTextField.type = TextFieldType.DYNAMIC;
+			overTextField.selectable = false;
+			overTextField.type = TextFieldType.DYNAMIC;
+			//upTextField.autoSize = "left";
+			//downTextField.autoSize = "left";
+			//overTextField.autoSize = "left";
+            
+            upArrows = new Shape();
+            overArrows = new Shape();
+            downArrows = new Shape();
+            upSprite.addChild(upArrows);
+			overSprite.addChild(overArrows);
+			downSprite.addChild(downArrows);
+            drawArrows(upArrows, 0xEEEEEE);
+            drawArrows(overArrows, 0xFFFFFF);
+            drawArrows(downArrows, 0x808080);
+
+		}
+
+        private function drawArrows(shape:Shape, color:uint):void
+        {
+            var g:Graphics = shape.graphics;
+            g.beginFill(color);
+            g.drawRect(0, 0, 16, 17);
+            g.endFill();
+            g.beginFill(0);
+            g.moveTo(8, 2);
+            g.lineTo(12, 6);
+            g.lineTo(4, 6);
+            g.lineTo(8, 2);
+            g.endFill();
+            g.beginFill(0);
+            g.moveTo(8, 14);
+            g.lineTo(12, 10);
+            g.lineTo(4, 10);
+            g.lineTo(8, 14);
+            g.endFill();
+            g.lineStyle(1, 0);
+            g.drawRect(0, 0, 16, 17);
+        }
+        
+		private var selectionModel:ISelectionModel;
+		
+		private var _strand:IStrand;
+		
+		private var shape:Shape;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+            selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+            selectionModel.addEventListener("selectedIndexChanged", selectionChangeHandler);
+			shape = new Shape();
+			shape.graphics.beginFill(0xCCCCCC);
+			shape.graphics.drawRect(0, 0, 10, 10);
+			shape.graphics.endFill();
+			SimpleButton(value).upState = upSprite;
+			SimpleButton(value).downState = downSprite;
+			SimpleButton(value).overState = overSprite;
+			SimpleButton(value).hitTestState = shape;
+			if (selectionModel.selectedIndex !== -1)
+				text = selectionModel.selectedItem.toString();
+            IEventDispatcher(value).addEventListener("heightChanged", changeHandler);
+            IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
+			changeHandler(null);
+		}
+		
+		private function selectionChangeHandler(event:Event):void
+		{
+			text = selectionModel.selectedItem.toString();
+		}
+		
+        private function changeHandler(event:Event):void
+        {
+            var ww:Number = DisplayObject(_strand).width;
+            var hh:Number = DisplayObject(_strand).height;
+            upArrows.x = ww - upArrows.width;            
+            overArrows.x = ww - overArrows.width;            
+            downArrows.x = ww - downArrows.width;
+			upTextField.width = upArrows.x;
+			downTextField.width = downArrows.x;
+			overTextField.width = overArrows.x;
+			upTextField.height = hh;
+			downTextField.height = hh;
+			overTextField.height = hh;
+			shape.graphics.clear();
+			shape.graphics.beginFill(0xCCCCCC);
+			shape.graphics.drawRect(0, 0, ww, hh);
+			shape.graphics.endFill();
+        }
+        
+		private var upTextField:CSSTextField;
+		private var downTextField:CSSTextField;
+		private var overTextField:CSSTextField;
+        private var upSprite:Sprite;
+        private var downSprite:Sprite;
+        private var overSprite:Sprite;
+        private var upArrows:Shape;
+        private var downArrows:Shape;
+        private var overArrows:Shape;
+		
+		public function get text():String
+		{
+			return upTextField.text;
+		}
+        
+		public function set text(value:String):void
+		{
+            var ww:Number = DisplayObject(_strand).width;
+            var hh:Number = DisplayObject(_strand).height;
+			upTextField.text = value;
+			downTextField.text = value;
+			overTextField.text = value;
+			
+		}
+		
+        private var _popUp:IStrand;
+        public function get popUp():IStrand
+        {
+            return _popUp;
+        }
+        
+        private var _popUpVisible:Boolean;
+        
+        public function get popUpVisible():Boolean
+        {
+            return _popUpVisible;
+        }
+        
+        public function set popUpVisible(value:Boolean):void
+        {
+            if (value != _popUpVisible)
+            {
+                _popUpVisible = value;
+                if (value)
+                {
+                    if (!_popUp)
+                    {
+                        var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iPopUp") as Class;
+                        _popUp = new popUpClass() as IStrand;
+                    }
+					var root:Object = DisplayObject(_strand).root;
+					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();
+                }
+                else
+                {
+                    DisplayObject(_popUp).parent.removeChild(_popUp as DisplayObject);                    
+                }
+            }
+        }
+        
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/IButtonBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IButtonBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IButtonBead.as
deleted file mode 100644
index 609b1a2..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IButtonBead.as
+++ /dev/null
@@ -1,26 +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.html.staticControls.beads
-{
-	import org.apache.flex.core.IBead;
-
-	public interface IButtonBead extends IBead
-	{
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDropDownListBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDropDownListBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDropDownListBead.as
deleted file mode 100644
index cccfa80..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDropDownListBead.as
+++ /dev/null
@@ -1,31 +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.html.staticControls.beads
-{
-    import org.apache.flex.core.IBeadView;
-    import org.apache.flex.core.IStrand;
-
-	public interface IDropDownListBead extends IBeadView
-	{
-        function get popUp():IStrand;
-        
-        function get popUpVisible():Boolean;
-        function set popUpVisible(value:Boolean):void;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDropDownListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDropDownListView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDropDownListView.as
new file mode 100644
index 0000000..b90b00c
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IDropDownListView.as
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.IBeadView;
+    import org.apache.flex.core.IStrand;
+
+	public interface IDropDownListView extends IBeadView
+	{
+        function get popUp():IStrand;
+        
+        function get popUpVisible():Boolean;
+        function set popUpVisible(value:Boolean):void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/IListBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IListBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IListBead.as
deleted file mode 100644
index 51f044f..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IListBead.as
+++ /dev/null
@@ -1,33 +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.html.staticControls.beads
-{	
-	import org.apache.flex.core.IItemRendererParent;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.html.staticControls.supportClasses.Border;
-	import org.apache.flex.html.staticControls.supportClasses.ScrollBar;
-
-	public interface IListBead
-	{
-        function get border():Border;
-		function get vScrollBar():ScrollBar;
-		function get dataGroup():IItemRendererParent;
-		function get strand():IStrand;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/IListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IListView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IListView.as
new file mode 100644
index 0000000..8e74ff4
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IListView.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.IItemRendererParent;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.html.staticControls.supportClasses.Border;
+	import org.apache.flex.html.staticControls.supportClasses.ScrollBar;
+
+	public interface IListView
+	{
+        function get border():Border;
+		function get vScrollBar():ScrollBar;
+		function get dataGroup():IItemRendererParent;
+		function get strand():IStrand;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/IScrollBarBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IScrollBarBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IScrollBarBead.as
deleted file mode 100644
index 14ab365..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IScrollBarBead.as
+++ /dev/null
@@ -1,36 +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.html.staticControls.beads
-{
-	import flash.display.DisplayObject;
-	
-	import org.apache.flex.core.IScrollBarModel;
-	import org.apache.flex.core.IStrand;
-
-	public interface IScrollBarBead
-	{
-		function get increment():DisplayObject;
-		function get decrement():DisplayObject;
-		function get track():DisplayObject;
-		function get thumb():DisplayObject;
-		
-		function get scrollBarModel():IScrollBarModel;
-		function get strand():IStrand;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/IScrollBarView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/IScrollBarView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IScrollBarView.as
new file mode 100644
index 0000000..dbfe531
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/IScrollBarView.as
@@ -0,0 +1,36 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flash.display.DisplayObject;
+	
+	import org.apache.flex.core.IScrollBarModel;
+	import org.apache.flex.core.IStrand;
+
+	public interface IScrollBarView
+	{
+		function get increment():DisplayObject;
+		function get decrement():DisplayObject;
+		function get track():DisplayObject;
+		function get thumb():DisplayObject;
+		
+		function get scrollBarModel():IScrollBarModel;
+		function get strand():IStrand;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/ISpinnerBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ISpinnerBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ISpinnerBead.as
deleted file mode 100644
index 9258153..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ISpinnerBead.as
+++ /dev/null
@@ -1,30 +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.html.staticControls.beads
-{
-	import flash.display.DisplayObject;
-	
-	import org.apache.flex.core.IBead;
-	
-	public interface ISpinnerBead extends IBead
-	{
-		function get increment():DisplayObject;
-		function get decrement():DisplayObject;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/ISpinnerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ISpinnerView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ISpinnerView.as
new file mode 100644
index 0000000..920024c
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ISpinnerView.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flash.display.DisplayObject;
+	
+	import org.apache.flex.core.IBead;
+	
+	public interface ISpinnerView extends IBead
+	{
+		function get increment():DisplayObject;
+		function get decrement():DisplayObject;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListBead.as
deleted file mode 100644
index 2ec9c5f..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListBead.as
+++ /dev/null
@@ -1,171 +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.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;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.html.staticControls.beads.controllers.VScrollBarMouseController;
-	import org.apache.flex.html.staticControls.beads.layouts.VScrollBarLayout;
-	import org.apache.flex.html.staticControls.beads.models.ScrollBarModel;
-	import org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel;
-	import org.apache.flex.html.staticControls.supportClasses.Border;
-	import org.apache.flex.html.staticControls.supportClasses.NonVirtualDataGroup;
-	import org.apache.flex.html.staticControls.supportClasses.ScrollBar;
-
-	public class ListBead implements IBead, IInitSkin, IStrand, IListBead
-	{
-		public function ListBead()
-		{
-		}
-						
-		private var listModel:ISelectionModel;
-		
-        private var _border:Border;
-        
-        public function get border():Border
-        {
-            return _border;
-        }
-
-        private var _dataGroup:IItemRendererParent;
-
-		public function get dataGroup():IItemRendererParent
-		{
-			return _dataGroup;
-		}
-		
-		private var _vScrollBar:ScrollBar;
-		
-		public function get vScrollBar():ScrollBar
-		{
-            if (!_vScrollBar)
-                _vScrollBar = createScrollBar();
-			return _vScrollBar;
-		}
-
-		private var _strand:IStrand;
-		
-		public function get strand():IStrand
-		{
-			return _strand;
-		}
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-            _border = new Border();
-            border.addToParent(UIBase(_strand));
-            _border.model = new SingleLineBorderModel();
-            _border.addBead(new SingleLineBorderBead());
-			_dataGroup = new NonVirtualDataGroup();
-			UIBase(_dataGroup).addToParent(UIBase(_strand));
-			listModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
-			listModel.addEventListener("selectedIndexChanged", selectionChangeHandler);
-		}
-		
-		private var lastSelectedIndex:int = -1;
-		
-		private function selectionChangeHandler(event:Event):void
-		{
-			if (lastSelectedIndex != -1)
-			{
-				var ir:IItemRenderer = dataGroup.getItemRendererForIndex(lastSelectedIndex) as IItemRenderer;
-                ir.selected = false;
-			}
-			if (listModel.selectedIndex != -1)
-			{
-	            ir = dataGroup.getItemRendererForIndex(listModel.selectedIndex);
-	            ir.selected = true;
-			}
-            lastSelectedIndex = listModel.selectedIndex;
-		}
-			
-		public function initSkin():void
-		{
-		}
-						
-		private function createScrollBar():ScrollBar
-		{
-			var vsb:ScrollBar;
-			vsb = new ScrollBar();
-			vsb.addToParent(UIBase(_strand));
-			var vsbm:ScrollBarModel = new ScrollBarModel();
-			vsbm.maximum = 100;
-			vsbm.minimum = 0;
-			vsbm.pageSize = 10;
-			vsbm.pageStepSize = 10;
-			vsbm.snapInterval = 1;
-			vsbm.stepSize = 1;
-			vsbm.value = 0;
-			vsb.model = vsbm;
-			vsb.width = 16;
-			var vsbb:ScrollBarBead = new ScrollBarBead();
-			vsbb.initSkin();
-			vsb.addBead(vsbb);	
-			var vsbl:VScrollBarLayout = new VScrollBarLayout();
-			vsbb.addBead(vsbl);
-			var vsbc:VScrollBarMouseController = new VScrollBarMouseController();
-			vsb.addBead(vsbc);
-			return vsb;
-		}
-				
-		// 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);
-			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/ed706e14/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
new file mode 100644
index 0000000..2a61dfb
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ListView.as
@@ -0,0 +1,168 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.IInitSkin;
+	import org.apache.flex.core.IItemRenderer;
+	import org.apache.flex.core.IItemRendererParent;
+	import org.apache.flex.core.ISelectionModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.html.staticControls.beads.controllers.VScrollBarMouseController;
+	import org.apache.flex.html.staticControls.beads.layouts.VScrollBarLayout;
+	import org.apache.flex.html.staticControls.beads.models.ScrollBarModel;
+	import org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel;
+	import org.apache.flex.html.staticControls.supportClasses.Border;
+	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 function ListView()
+		{
+		}
+						
+		private var listModel:ISelectionModel;
+		
+        private var _border:Border;
+        
+        public function get border():Border
+        {
+            return _border;
+        }
+
+        private var _dataGroup:IItemRendererParent;
+
+		public function get dataGroup():IItemRendererParent
+		{
+			return _dataGroup;
+		}
+		
+		private var _vScrollBar:ScrollBar;
+		
+		public function get vScrollBar():ScrollBar
+		{
+            if (!_vScrollBar)
+                _vScrollBar = createScrollBar();
+			return _vScrollBar;
+		}
+
+		private var _strand:IStrand;
+		
+		public function get strand():IStrand
+		{
+			return _strand;
+		}
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+            _border = new Border();
+            border.addToParent(UIBase(_strand));
+            _border.model = new SingleLineBorderModel();
+            _border.addBead(new SingleLineBorderBead());
+			_dataGroup = new NonVirtualDataGroup();
+			UIBase(_dataGroup).addToParent(UIBase(_strand));
+			listModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+			listModel.addEventListener("selectedIndexChanged", selectionChangeHandler);
+		}
+		
+		private var lastSelectedIndex:int = -1;
+		
+		private function selectionChangeHandler(event:Event):void
+		{
+			if (lastSelectedIndex != -1)
+			{
+				var ir:IItemRenderer = dataGroup.getItemRendererForIndex(lastSelectedIndex) as IItemRenderer;
+                ir.selected = false;
+			}
+			if (listModel.selectedIndex != -1)
+			{
+	            ir = dataGroup.getItemRendererForIndex(listModel.selectedIndex);
+	            ir.selected = true;
+			}
+            lastSelectedIndex = listModel.selectedIndex;
+		}
+			
+		public function initSkin():void
+		{
+		}
+						
+		private function createScrollBar():ScrollBar
+		{
+			var vsb:ScrollBar;
+			vsb = new ScrollBar();
+			vsb.addToParent(UIBase(_strand));
+			var vsbm:ScrollBarModel = new ScrollBarModel();
+			vsbm.maximum = 100;
+			vsbm.minimum = 0;
+			vsbm.pageSize = 10;
+			vsbm.pageStepSize = 10;
+			vsbm.snapInterval = 1;
+			vsbm.stepSize = 1;
+			vsbm.value = 0;
+			vsb.model = vsbm;
+			vsb.width = 16;
+			var vsbl:VScrollBarLayout = new VScrollBarLayout();
+			//vsbb.addBead(vsbl);
+			var vsbc:VScrollBarMouseController = new VScrollBarMouseController();
+			vsb.addBead(vsbc);
+			return vsb;
+		}
+				
+		// 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);
+			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/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperBead.as
deleted file mode 100644
index 9b070e2..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperBead.as
+++ /dev/null
@@ -1,113 +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.html.staticControls.beads
-{
-	import org.apache.flex.core.IBeadView;
-	import org.apache.flex.core.ISpinnerModel;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.createjs.staticControls.Label;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.IEventDispatcher;
-	import org.apache.flex.html.staticControls.Spinner;
-	import org.apache.flex.html.staticControls.TextInput;
-	import org.apache.flex.html.staticControls.beads.layouts.NonVirtualHorizontalLayout;
-	
-	public class NumericStepperBead implements IBeadView
-	{
-		public function NumericStepperBead()
-		{
-		}
-		
-		private var _strand:IStrand;
-		
-		private var label:Label;
-		private var input:TextInput;
-		private var spinner:Spinner;
-		
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			
-			// add a horizontal layout bead
-			value.addBead(new NonVirtualHorizontalLayout());
-			
-			// 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
-			// value. ideally, we should either set the input to accept only
-			// numeric values or, barring that, reject non-numeric entries. we
-			// cannot do that right now however.
-			input.model.addEventListener("textChange",inputChangeHandler);
-			
-			// listen for change events on the spinner so the value can be updated as
-			// as resizing the component
-			spinner.addEventListener("valueChanged",spinnerValueChanged);
-			IEventDispatcher(value).addEventListener("widthChanged",sizeChangeHandler);
-			IEventDispatcher(value).addEventListener("heightChanged",sizeChangeHandler);
-			
-			input.text = String(spinner.value);
-			
-			// set a default size which will trigger the sizeChangeHandler
-			var minWidth:Number = Math.max(50+spinner.width,UIBase(value).width);
-			
-			UIBase(value).width = minWidth;
-			UIBase(value).height = spinner.height;
-		}
-		
-		private function sizeChangeHandler(event:Event) : void
-		{
-			input.x = 2;
-			input.y = (UIBase(_strand).height - input.height)/2;
-			input.width = UIBase(_strand).width-spinner.width-2;
-			spinner.x = input.width+2;
-			spinner.y = 0;
-		}
-		
-		private function spinnerValueChanged(event:Event) : void
-		{
-			input.text = String(spinner.value);
-			
-			var newEvent:Event = new Event(event.type,event.bubbles);
-			IEventDispatcher(_strand).dispatchEvent(newEvent);
-		}
-		
-		private function inputChangeHandler(event:Event) : void
-		{
-			var newValue:Number = Number(input.text);
-
-			if( !isNaN(newValue) ) {
-				spinner.value = newValue;
-			}
-			else {
-				input.text = String(spinner.value);
-			}
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/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
new file mode 100644
index 0000000..3355f77
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
@@ -0,0 +1,113 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.IBeadView;
+	import org.apache.flex.core.ISpinnerModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.createjs.staticControls.Label;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.html.staticControls.Spinner;
+	import org.apache.flex.html.staticControls.TextInput;
+	import org.apache.flex.html.staticControls.beads.layouts.NonVirtualHorizontalLayout;
+	
+	public class NumericStepperView implements IBeadView
+	{
+		public function NumericStepperView()
+		{
+		}
+		
+		private var _strand:IStrand;
+		
+		private var label:Label;
+		private var input:TextInput;
+		private var spinner:Spinner;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			// add a horizontal layout bead
+			value.addBead(new NonVirtualHorizontalLayout());
+			
+			// 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
+			// value. ideally, we should either set the input to accept only
+			// numeric values or, barring that, reject non-numeric entries. we
+			// cannot do that right now however.
+			input.model.addEventListener("textChange",inputChangeHandler);
+			
+			// listen for change events on the spinner so the value can be updated as
+			// as resizing the component
+			spinner.addEventListener("valueChanged",spinnerValueChanged);
+			IEventDispatcher(value).addEventListener("widthChanged",sizeChangeHandler);
+			IEventDispatcher(value).addEventListener("heightChanged",sizeChangeHandler);
+			
+			input.text = String(spinner.value);
+			
+			// set a default size which will trigger the sizeChangeHandler
+			var minWidth:Number = Math.max(50+spinner.width,UIBase(value).width);
+			
+			UIBase(value).width = minWidth;
+			UIBase(value).height = spinner.height;
+		}
+		
+		private function sizeChangeHandler(event:Event) : void
+		{
+			input.x = 2;
+			input.y = (UIBase(_strand).height - input.height)/2;
+			input.width = UIBase(_strand).width-spinner.width-2;
+			spinner.x = input.width+2;
+			spinner.y = 0;
+		}
+		
+		private function spinnerValueChanged(event:Event) : void
+		{
+			input.text = String(spinner.value);
+			
+			var newEvent:Event = new Event(event.type,event.bubbles);
+			IEventDispatcher(_strand).dispatchEvent(newEvent);
+		}
+		
+		private function inputChangeHandler(event:Event) : void
+		{
+			var newValue:Number = Number(input.text);
+
+			if( !isNaN(newValue) ) {
+				spinner.value = newValue;
+			}
+			else {
+				input.text = String(spinner.value);
+			}
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelBead.as
deleted file mode 100644
index 078b93b..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelBead.as
+++ /dev/null
@@ -1,108 +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.html.staticControls.beads
-{
-	import flash.display.DisplayObjectContainer;
-	import flash.display.Sprite;
-	
-	import org.apache.flex.core.IBeadView;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.IUIBase;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.core.UIMetrics;
-	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.IEventDispatcher;
-	import org.apache.flex.html.staticControls.Container;
-	import org.apache.flex.html.staticControls.ControlBar;
-	import org.apache.flex.html.staticControls.Panel;
-	import org.apache.flex.html.staticControls.TitleBar;
-	import org.apache.flex.utils.BeadMetrics;
-	
-	public class PanelBead extends ContainerBead implements IBeadView
-	{
-		public function PanelBead()
-		{
-			_titleBar = new TitleBar();
-			_titleBar.initSkin();
-		}
-		
-		private var _titleBar:TitleBar;
-		public function get titleBar():TitleBar
-		{
-			return _titleBar;
-		}
-		
-		private var _controlBar:ControlBar;
-		public function get controlBar():ControlBar
-		{
-			return _controlBar;
-		}
-		
-		private var _strand:IStrand;
-		
-		override public function set strand(value:IStrand):void
-		{
-			super.strand = value;
-			_strand = value;
-			
-			Container(_strand).addChild(titleBar);
-			
-			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);
-				}
-				
-				Container(_strand).addChild(controlBar);
-			}
-			
-			IEventDispatcher(_strand).addEventListener("childrenAdded", changeHandler);
-            
-		}
-		
-		private var controlBarArea:ControlBar;
-		
-		private function changeHandler(event:Event):void
-		{
-			var metrics:UIMetrics = BeadMetrics.getMetrics(_strand);
-			
-			titleBar.x = metrics.left;
-			titleBar.y = metrics.top;
-			titleBar.width = UIBase(_strand).width - (metrics.left + metrics.right);
-			
-			actualParent.x = metrics.left;
-			actualParent.y = titleBar.y + titleBar.height;
-			actualParent.width = UIBase(_strand).width - (metrics.left + metrics.right);
-			
-			if( controlBar ) {
-				controlBar.x = metrics.left;
-				controlBar.y = actualParent.y + actualParent.height;
-				controlBar.width = UIBase(_strand).width - (metrics.left + metrics.right);
-			} 
-			
-			UIBase(_strand).height = metrics.top + metrics.bottom + titleBar.height + actualParent.height +
-				(controlBar ? controlBar.height : 0);
-		}
-        
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/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
new file mode 100644
index 0000000..154df76
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/PanelView.as
@@ -0,0 +1,104 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.IBeadView;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.core.UIMetrics;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.html.staticControls.Container;
+	import org.apache.flex.html.staticControls.ControlBar;
+	import org.apache.flex.html.staticControls.Panel;
+	import org.apache.flex.html.staticControls.TitleBar;
+	import org.apache.flex.utils.BeadMetrics;
+	
+	public class PanelView extends ContainerView implements IBeadView
+	{
+		public function PanelView()
+		{
+			_titleBar = new TitleBar();
+			_titleBar.initSkin();
+		}
+		
+		private var _titleBar:TitleBar;
+		public function get titleBar():TitleBar
+		{
+			return _titleBar;
+		}
+		
+		private var _controlBar:ControlBar;
+		public function get controlBar():ControlBar
+		{
+			return _controlBar;
+		}
+		
+		private var _strand:IStrand;
+		
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			_strand = value;
+			
+			Container(_strand).addChild(titleBar);
+			
+			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);
+				}
+				
+				Container(_strand).addChild(controlBar);
+			}
+			
+			IEventDispatcher(_strand).addEventListener("childrenAdded", changeHandler);
+            
+		}
+		
+		private var controlBarArea:ControlBar;
+		
+		private function changeHandler(event:Event):void
+		{
+			var metrics:UIMetrics = BeadMetrics.getMetrics(_strand);
+			
+			titleBar.x = metrics.left;
+			titleBar.y = metrics.top;
+			titleBar.width = UIBase(_strand).width - (metrics.left + metrics.right);
+			
+			actualParent.x = metrics.left;
+			actualParent.y = titleBar.y + titleBar.height;
+			actualParent.width = UIBase(_strand).width - (metrics.left + metrics.right);
+			
+			if( controlBar ) {
+				controlBar.x = metrics.left;
+				controlBar.y = actualParent.y + actualParent.height;
+				controlBar.width = UIBase(_strand).width - (metrics.left + metrics.right);
+			} 
+			
+			UIBase(_strand).height = metrics.top + metrics.bottom + titleBar.height + actualParent.height +
+				(controlBar ? controlBar.height : 0);
+		}
+        
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/RadioButtonBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/RadioButtonBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/RadioButtonBead.as
deleted file mode 100644
index 0985373..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/RadioButtonBead.as
+++ /dev/null
@@ -1,218 +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.html.staticControls.beads
-{
-	import flash.display.Shape;
-	import flash.display.SimpleButton;
-	import flash.display.Sprite;
-	import flash.text.TextFieldAutoSize;
-	import flash.text.TextFieldType;
-	
-	import org.apache.flex.core.CSSTextField;
-	import org.apache.flex.core.IBeadView;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.IValueToggleButtonModel;
-	import org.apache.flex.events.Event;
-	
-	public class RadioButtonBead implements IBeadView
-	{
-		public function RadioButtonBead()
-		{
-			sprites = [ upSprite = new Sprite(),
-				        downSprite = new Sprite(),
-						overSprite = new Sprite(),
-						upAndSelectedSprite = new Sprite(),
-						downAndSelectedSprite = new Sprite(),
-						overAndSelectedSprite = new Sprite() ];
-			
-			for each( var s:Sprite in sprites )
-			{
-				var tf:CSSTextField = new CSSTextField();
-				tf.type = TextFieldType.DYNAMIC;
-				tf.autoSize = TextFieldAutoSize.LEFT;
-				tf.name = "textField";
-				var icon:Shape = new Shape();
-				icon.name = "icon";
-				s.addChild(icon);
-				s.addChild(tf);
-			}
-		}
-		
-		private var upSprite:Sprite;
-		private var downSprite:Sprite;
-		private var overSprite:Sprite;
-		private var upAndSelectedSprite:Sprite;
-		private var downAndSelectedSprite:Sprite;
-		private var overAndSelectedSprite:Sprite;
-		
-		private var sprites:Array;
-		
-		private var _toggleButtonModel:IValueToggleButtonModel;
-		
-		public function get toggleButtonModel() : IValueToggleButtonModel
-		{
-			return _toggleButtonModel;
-		}
-		
-		private var _strand:IStrand;
-		
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			_toggleButtonModel = value.getBeadByType(IValueToggleButtonModel) as IValueToggleButtonModel;
-			_toggleButtonModel.addEventListener("textChange", textChangeHandler);
-			_toggleButtonModel.addEventListener("htmlChange", htmlChangeHandler);
-			_toggleButtonModel.addEventListener("selectedValueChange", selectedValueChangeHandler);
-			if (_toggleButtonModel.text != null)
-				text = _toggleButtonModel.text;
-			if (_toggleButtonModel.html != null)
-				html = _toggleButtonModel.html;
-			
-			layoutControl();
-			
-			var hitArea:Shape = new Shape();
-			hitArea.graphics.beginFill(0x000000);
-			hitArea.graphics.drawRect(12,0,upSprite.width, upSprite.height);
-			hitArea.graphics.endFill();
-			
-			SimpleButton(value).upState = upSprite;
-			SimpleButton(value).downState = downSprite;
-			SimpleButton(value).overState = overSprite;
-			SimpleButton(value).hitTestState = hitArea;
-			
-			if (toggleButtonModel.text !== null)
-				text = toggleButtonModel.text;
-			if (toggleButtonModel.html !== null)
-				html = toggleButtonModel.html;
-			
-			if (toggleButtonModel.selected && toggleButtonModel.value == value) {
-				selected = true;
-			}
-		}
-		
-		public function get text():String
-		{
-			var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
-			return tf.text;
-		}
-		
-		public function set text(value:String):void
-		{
-			for each( var s:Sprite in sprites )
-			{
-				var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
-				tf.text = value;
-			}
-			
-			layoutControl();
-		}
-		
-		public function get html():String
-		{
-			var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
-			return tf.htmlText;
-		}
-		
-		public function set html(value:String):void
-		{
-			for each(var s:Sprite in sprites)
-			{
-				var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
-				tf.htmlText = value;
-			}
-			
-			layoutControl();
-		}
-		
-		private function textChangeHandler(event:Event):void
-		{
-			text = toggleButtonModel.text;
-		}
-		
-		private function htmlChangeHandler(event:Event):void
-		{
-			html = toggleButtonModel.html;
-		}
-		
-		private var _selected:Boolean;
-		
-		public function get selected():Boolean
-		{
-			return _selected;
-		}
-		
-		public function set selected(value:Boolean):void
-		{
-			_selected = value;
-			
-			if( value ) {
-				SimpleButton(_strand).upState = upAndSelectedSprite;
-				SimpleButton(_strand).downState = downAndSelectedSprite;
-				SimpleButton(_strand).overState = overAndSelectedSprite;
-				
-			} else {
-				SimpleButton(_strand).upState = upSprite;
-				SimpleButton(_strand).downState = downSprite;
-				SimpleButton(_strand).overState = overSprite;
-			}
-			
-			layoutControl();
-		}
-		
-		private function selectedValueChangeHandler(event:Event):void
-		{
-			selected = _toggleButtonModel.value == _toggleButtonModel.selectedValue;
-		}
-		
-		protected function layoutControl() : void
-		{
-			for each(var s:Sprite in sprites)
-			{
-				var icon:Shape = s.getChildByName("icon") as Shape;
-				var tf:CSSTextField = s.getChildByName("textField") as CSSTextField;
-				
-				drawRadioButton(icon);
-				
-				var mh:Number = Math.max(icon.height,tf.height);
-				
-				icon.x = 0;
-				icon.y = (mh - icon.height)/2;
-				
-				tf.x = icon.x + icon.width + 1;
-				tf.y = (mh - tf.height)/2;
-			}
-			
-		}
-		
-		protected function drawRadioButton(icon:Shape) : void
-		{
-			icon.graphics.clear();
-			icon.graphics.beginFill(0xCCCCCC);
-			icon.graphics.lineStyle(1,0x333333);
-			icon.graphics.drawEllipse(0,0,10,10);
-			icon.graphics.endFill();
-			
-			if( selected ) {
-				icon.graphics.beginFill(0x555555);
-				icon.graphics.drawEllipse(2,2,6,6);
-				icon.graphics.endFill();
-			}
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/RadioButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/RadioButtonView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/RadioButtonView.as
new file mode 100644
index 0000000..d356e88
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/RadioButtonView.as
@@ -0,0 +1,218 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flash.display.Shape;
+	import flash.display.SimpleButton;
+	import flash.display.Sprite;
+	import flash.text.TextFieldAutoSize;
+	import flash.text.TextFieldType;
+	
+	import org.apache.flex.core.CSSTextField;
+	import org.apache.flex.core.IBeadView;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IValueToggleButtonModel;
+	import org.apache.flex.events.Event;
+	
+	public class RadioButtonView implements IBeadView
+	{
+		public function RadioButtonView()
+		{
+			sprites = [ upSprite = new Sprite(),
+				        downSprite = new Sprite(),
+						overSprite = new Sprite(),
+						upAndSelectedSprite = new Sprite(),
+						downAndSelectedSprite = new Sprite(),
+						overAndSelectedSprite = new Sprite() ];
+			
+			for each( var s:Sprite in sprites )
+			{
+				var tf:CSSTextField = new CSSTextField();
+				tf.type = TextFieldType.DYNAMIC;
+				tf.autoSize = TextFieldAutoSize.LEFT;
+				tf.name = "textField";
+				var icon:Shape = new Shape();
+				icon.name = "icon";
+				s.addChild(icon);
+				s.addChild(tf);
+			}
+		}
+		
+		private var upSprite:Sprite;
+		private var downSprite:Sprite;
+		private var overSprite:Sprite;
+		private var upAndSelectedSprite:Sprite;
+		private var downAndSelectedSprite:Sprite;
+		private var overAndSelectedSprite:Sprite;
+		
+		private var sprites:Array;
+		
+		private var _toggleButtonModel:IValueToggleButtonModel;
+		
+		public function get toggleButtonModel() : IValueToggleButtonModel
+		{
+			return _toggleButtonModel;
+		}
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			_toggleButtonModel = value.getBeadByType(IValueToggleButtonModel) as IValueToggleButtonModel;
+			_toggleButtonModel.addEventListener("textChange", textChangeHandler);
+			_toggleButtonModel.addEventListener("htmlChange", htmlChangeHandler);
+			_toggleButtonModel.addEventListener("selectedValueChange", selectedValueChangeHandler);
+			if (_toggleButtonModel.text != null)
+				text = _toggleButtonModel.text;
+			if (_toggleButtonModel.html != null)
+				html = _toggleButtonModel.html;
+			
+			layoutControl();
+			
+			var hitArea:Shape = new Shape();
+			hitArea.graphics.beginFill(0x000000);
+			hitArea.graphics.drawRect(12,0,upSprite.width, upSprite.height);
+			hitArea.graphics.endFill();
+			
+			SimpleButton(value).upState = upSprite;
+			SimpleButton(value).downState = downSprite;
+			SimpleButton(value).overState = overSprite;
+			SimpleButton(value).hitTestState = hitArea;
+			
+			if (toggleButtonModel.text !== null)
+				text = toggleButtonModel.text;
+			if (toggleButtonModel.html !== null)
+				html = toggleButtonModel.html;
+			
+			if (toggleButtonModel.selected && toggleButtonModel.value == value) {
+				selected = true;
+			}
+		}
+		
+		public function get text():String
+		{
+			var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
+			return tf.text;
+		}
+		
+		public function set text(value:String):void
+		{
+			for each( var s:Sprite in sprites )
+			{
+				var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
+				tf.text = value;
+			}
+			
+			layoutControl();
+		}
+		
+		public function get html():String
+		{
+			var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
+			return tf.htmlText;
+		}
+		
+		public function set html(value:String):void
+		{
+			for each(var s:Sprite in sprites)
+			{
+				var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
+				tf.htmlText = value;
+			}
+			
+			layoutControl();
+		}
+		
+		private function textChangeHandler(event:Event):void
+		{
+			text = toggleButtonModel.text;
+		}
+		
+		private function htmlChangeHandler(event:Event):void
+		{
+			html = toggleButtonModel.html;
+		}
+		
+		private var _selected:Boolean;
+		
+		public function get selected():Boolean
+		{
+			return _selected;
+		}
+		
+		public function set selected(value:Boolean):void
+		{
+			_selected = value;
+			
+			if( value ) {
+				SimpleButton(_strand).upState = upAndSelectedSprite;
+				SimpleButton(_strand).downState = downAndSelectedSprite;
+				SimpleButton(_strand).overState = overAndSelectedSprite;
+				
+			} else {
+				SimpleButton(_strand).upState = upSprite;
+				SimpleButton(_strand).downState = downSprite;
+				SimpleButton(_strand).overState = overSprite;
+			}
+			
+			layoutControl();
+		}
+		
+		private function selectedValueChangeHandler(event:Event):void
+		{
+			selected = _toggleButtonModel.value == _toggleButtonModel.selectedValue;
+		}
+		
+		protected function layoutControl() : void
+		{
+			for each(var s:Sprite in sprites)
+			{
+				var icon:Shape = s.getChildByName("icon") as Shape;
+				var tf:CSSTextField = s.getChildByName("textField") as CSSTextField;
+				
+				drawRadioButton(icon);
+				
+				var mh:Number = Math.max(icon.height,tf.height);
+				
+				icon.x = 0;
+				icon.y = (mh - icon.height)/2;
+				
+				tf.x = icon.x + icon.width + 1;
+				tf.y = (mh - tf.height)/2;
+			}
+			
+		}
+		
+		protected function drawRadioButton(icon:Shape) : void
+		{
+			icon.graphics.clear();
+			icon.graphics.beginFill(0xCCCCCC);
+			icon.graphics.lineStyle(1,0x333333);
+			icon.graphics.drawEllipse(0,0,10,10);
+			icon.graphics.endFill();
+			
+			if( selected ) {
+				icon.graphics.beginFill(0x555555);
+				icon.graphics.drawEllipse(2,2,6,6);
+				icon.graphics.endFill();
+			}
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed706e14/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarBead.as
deleted file mode 100644
index dc9121f..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarBead.as
+++ /dev/null
@@ -1,139 +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.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 ScrollBarBead implements IBead, IInitSkin, IStrand, IScrollBarBead
-	{
-		public function ScrollBarBead()
-		{
-		}
-		
-		public function get scrollBarModel():IScrollBarModel
-		{
-			return sbModel;
-		}
-		
-		private var sbModel:IScrollBarModel;
-		
-		private var _strand:IStrand;
-		
-		public function get strand():IStrand
-		{
-			return _strand;
-		}
-		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
-			_increment = new Button();
-			Button(_increment).addBead(new DownArrowButtonBead());
-            Button(_increment).addBead(new ButtonAutoRepeatController());
-			Button(_increment).initSkin();
-			_decrement = new Button();
-			Button(_decrement).addBead(new UpArrowButtonBead());
-            Button(_decrement).addBead(new ButtonAutoRepeatController());
-			Button(_decrement).initSkin();
-			_track = new Button();				
-			Button(_track).addBead(new VScrollBarTrackBead());
-			Button(_track).initSkin();
-			_thumb = new Button();				
-			Button(_thumb).addBead(new VScrollBarThumbBead());
-			Button(_thumb).initSkin();
-		}
-						
-		private var _decrement:DisplayObject;
-		private var _increment:DisplayObject;
-		private var _track:DisplayObject;
-		private var _thumb:DisplayObject;
-		
-		public function get decrement():DisplayObject
-		{
-			return _decrement;
-		}
-		public function get increment():DisplayObject
-		{
-			return _increment;
-		}
-		public function get track():DisplayObject
-		{
-			return _track;
-		}
-		public function get thumb():DisplayObject
-		{
-			return _thumb;
-		}
-		
-		// 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);
-			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/ed706e14/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
new file mode 100644
index 0000000..ca12974
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/ScrollBarView.as
@@ -0,0 +1,139 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 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 function ScrollBarView()
+		{
+		}
+		
+		public function get scrollBarModel():IScrollBarModel
+		{
+			return sbModel;
+		}
+		
+		private var sbModel:IScrollBarModel;
+		
+		private var _strand:IStrand;
+		
+		public function get strand():IStrand
+		{
+			return _strand;
+		}
+		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
+			_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();
+		}
+						
+		private var _decrement:DisplayObject;
+		private var _increment:DisplayObject;
+		private var _track:DisplayObject;
+		private var _thumb:DisplayObject;
+		
+		public function get decrement():DisplayObject
+		{
+			return _decrement;
+		}
+		public function get increment():DisplayObject
+		{
+			return _increment;
+		}
+		public function get track():DisplayObject
+		{
+			return _track;
+		}
+		public function get thumb():DisplayObject
+		{
+			return _thumb;
+		}
+		
+		// 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);
+			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


Mime
View raw message