flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [13/21] move AS code into a projects/FlexJSUI
Date Mon, 18 Nov 2013 21:03:08 GMT
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldView.as
new file mode 100644
index 0000000..aedb964
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldView.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 flash.text.TextFieldType;
+	
+	public class TextFieldView extends TextFieldViewBase
+	{
+		public function TextFieldView()
+		{
+			super();
+			
+			textField.selectable = false;
+			textField.type = TextFieldType.DYNAMIC;
+			textField.mouseEnabled = false;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldViewBase.as
new file mode 100644
index 0000000..5f5ba8f
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldViewBase.as
@@ -0,0 +1,111 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.core.CSSTextField;
+	import org.apache.flex.core.IBeadView;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ITextModel;
+	import org.apache.flex.events.Event;
+	
+	public class TextFieldViewBase implements IBeadView, ITextFieldView
+	{
+		public function TextFieldViewBase()
+		{
+			_textField = new CSSTextField();
+		}
+		
+		private var _textField:CSSTextField;
+		
+		public function get textField() : CSSTextField
+		{
+			return _textField;
+		}
+		
+		private var _textModel:ITextModel;
+		
+		public function get textModel() : ITextModel
+		{
+			return _textModel;
+		}
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			_textModel = value.getBeadByType(ITextModel) as ITextModel;
+			textModel.addEventListener("textChange", textChangeHandler);
+			textModel.addEventListener("htmlChange", htmlChangeHandler);
+			textModel.addEventListener("widthChanged", sizeChangeHandler);
+			textModel.addEventListener("heightChanged", sizeChangeHandler);
+			DisplayObjectContainer(value).addChild(_textField);
+			sizeChangeHandler(null);
+			if (textModel.text !== null)
+				text = textModel.text;
+			if (textModel.html !== null)
+				html = textModel.html;
+		}
+        
+		public function get strand() : IStrand
+		{
+			return _strand;
+		}
+		
+		public function get text():String
+		{
+			return _textField.text;
+		}
+		public function set text(value:String):void
+		{
+            if (value == null)
+                value = "";
+			_textField.text = value;
+		}
+		
+		public function get html():String
+		{
+			return _textField.htmlText;
+		}
+		
+		public function set html(value:String):void
+		{
+			_textField.htmlText = value;
+		}
+		
+		private function textChangeHandler(event:Event):void
+		{
+			text = textModel.text;
+		}
+		
+		private function htmlChangeHandler(event:Event):void
+		{
+			html = textModel.html;
+		}
+		
+		private function sizeChangeHandler(event:Event):void
+		{
+			textField.width = DisplayObject(_strand).width;
+			textField.height = DisplayObject(_strand).height;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputView.as
new file mode 100644
index 0000000..a129763
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputView.as
@@ -0,0 +1,66 @@
+//
+//  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.events.IOErrorEvent;
+	import flash.text.TextFieldType;
+	
+	import org.apache.flex.core.CSSTextField;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	public class TextInputView extends TextFieldViewBase
+	{
+		public function TextInputView()
+		{
+			super();
+			
+			textField.selectable = true;
+			textField.type = TextFieldType.INPUT;
+			textField.mouseEnabled = true;
+			textField.multiline = false;
+			textField.wordWrap = false;
+		}
+		
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			
+			// Default size
+			var ww:Number = DisplayObject(strand).width;
+			if( isNaN(ww) || ww == 0 ) DisplayObject(strand).width = 100;
+			var hh:Number = DisplayObject(strand).height;
+			if( isNaN(hh) || hh == 0 ) DisplayObject(strand).height = 18;
+			
+			IEventDispatcher(strand).addEventListener("widthChanged", sizeChangedHandler);
+			IEventDispatcher(strand).addEventListener("heightChanged", sizeChangedHandler);
+			sizeChangedHandler(null);
+		}
+		
+		private function sizeChangedHandler(event:Event):void
+		{
+			var ww:Number = DisplayObject(strand).width;
+			if( !isNaN(ww) && ww > 0 ) textField.width = ww;
+			
+			var hh:Number = DisplayObject(strand).height;
+			if( !isNaN(hh) && hh > 0 ) textField.height = hh;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputWithBorderView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputWithBorderView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputWithBorderView.as
new file mode 100644
index 0000000..8d5e405
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputWithBorderView.as
@@ -0,0 +1,68 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.IStrand;
+	import org.apache.flex.core.IParent;
+	import org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel;
+	import org.apache.flex.html.staticControls.supportClasses.Border;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+
+	public class TextInputWithBorderView extends TextInputView
+	{
+		public function TextInputWithBorderView()
+		{
+			super();
+		}
+		
+		private var _border:Border;
+		
+		public function get border():Border
+		{
+			return _border;
+		}
+		
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			
+			// add a border to this
+			_border = new Border();
+			_border.model = new SingleLineBorderModel();
+			_border.addBead(new SingleLineBorderBead());
+            IParent(strand).addElement(border);
+			
+			IEventDispatcher(strand).addEventListener("widthChanged", sizeChangedHandler);
+			IEventDispatcher(strand).addEventListener("heightChanged", sizeChangedHandler);
+			sizeChangedHandler(null);
+		}
+		
+		private function sizeChangedHandler(event:Event):void
+		{
+			var ww:Number = DisplayObject(strand).width;
+			_border.width = ww;
+			
+			var hh:Number = DisplayObject(strand).height;
+			_border.height = hh;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as
new file mode 100644
index 0000000..5fc7188
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as
@@ -0,0 +1,93 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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;
+    import org.apache.flex.core.IItemRendererParent;
+    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 TextItemRendererFactoryForArrayData implements IBead, IDataProviderItemRendererMapper
+	{
+		public function TextItemRendererFactoryForArrayData()
+		{
+
+		}
+		
+		private var selectionModel:ISelectionModel;
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+			var listView:IListView = value.getBeadByType(IListView) as IListView;
+			dataGroup = listView.dataGroup;
+			selectionModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
+            
+            if (!itemRendererFactory)
+            {
+                _itemRendererFactory = new (ValuesManager.valuesImpl.getValue(_strand, "iItemRendererClassFactory")) as IItemRendererClassFactory;
+                _strand.addBead(_itemRendererFactory);
+            }
+            
+			dataProviderChangeHandler(null);
+		}
+		
+        public var _itemRendererFactory:IItemRendererClassFactory;
+        
+        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
+		{
+			var dp:Array = selectionModel.dataProvider as Array;
+			if (!dp)
+				return;
+			
+			dataGroup.removeAllElements();
+			
+			var n:int = dp.length; 
+			for (var i:int = 0; i < n; i++)
+			{
+				var tf:ITextItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ITextItemRenderer;
+                tf.index = i;
+                dataGroup.addElement(tf);
+				tf.text = dp[i];
+			}
+			
+			IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
+		}
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForStringVectorData.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForStringVectorData.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForStringVectorData.as
new file mode 100644
index 0000000..77302f4
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForStringVectorData.as
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.IItemRendererClassFactory;
+    import org.apache.flex.core.IItemRendererParent;
+    import org.apache.flex.core.ISelectionModel;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IUIBase;
+	import org.apache.flex.events.Event;
+
+	public class TextItemRendererFactoryForStringVectorData implements IBead
+	{
+		public function TextItemRendererFactoryForStringVectorData()
+		{
+
+		}
+		
+		private var selectionModel:ISelectionModel;
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+			var listView:IListView = value.getBeadByType(IListView) as IListView;
+			dataGroup = listView.dataGroup;
+			selectionModel.addEventListener("dataProviderChange", dataProviderChangeHandler);
+			dataProviderChangeHandler(null);
+		}
+		
+        public var itemRendererFactory:IItemRendererClassFactory;
+        
+		public var dataGroup:IItemRendererParent;
+		
+		private function dataProviderChangeHandler(event:Event):void
+		{
+			var dp:Vector.<String> = selectionModel.dataProvider as Vector.<String>;
+			
+			dataGroup.removeAllElements();
+			
+			var n:int = dp.length; 
+			for (var i:int = 0; i < n; i++)
+			{
+				var tf:ITextItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ITextItemRenderer;
+                tf.index = i;
+                dataGroup.addElement(tf);
+				tf.text = dp[i];
+			}			
+		}
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TitleBarMeasurementBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TitleBarMeasurementBead.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TitleBarMeasurementBead.as
new file mode 100644
index 0000000..221120a
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TitleBarMeasurementBead.as
@@ -0,0 +1,64 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.IMeasurementBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.html.staticControls.TitleBar;
+	
+	public class TitleBarMeasurementBead implements IMeasurementBead
+	{
+		public function TitleBarMeasurementBead()
+		{
+		}
+		
+		public function get measuredWidth():Number
+		{
+			var mwidth:Number = 0;
+			var titleBar:TitleBar = _strand as TitleBar;
+			var labelMeasure:IMeasurementBead = titleBar.titleLabel.measurementBead;
+			mwidth = labelMeasure.measuredWidth;
+			if( titleBar.showCloseButton ) {
+				var buttonMeasure:IMeasurementBead = titleBar.closeButton.measurementBead;
+				mwidth += buttonMeasure.measuredWidth;
+			}
+			return mwidth;
+		}
+		
+		public function get measuredHeight():Number
+		{
+			var mheight:Number = 0;
+			var titleBar:TitleBar = _strand as TitleBar;
+			var labelMeasure:IMeasurementBead = titleBar.titleLabel.measurementBead;
+			mheight = labelMeasure.measuredHeight;
+			if( titleBar.showCloseButton ) {
+				var buttonMeasure:IMeasurementBead = titleBar.closeButton.measurementBead;
+				mheight = Math.max(mheight,buttonMeasure.measuredHeight);
+			}
+			return mheight;
+		}
+		
+		private var _strand:IStrand;
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/UpArrowButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/UpArrowButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/UpArrowButtonView.as
new file mode 100644
index 0000000..bc3b76d
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/UpArrowButtonView.as
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.Graphics;
+	import flash.display.Shape;
+	import flash.display.SimpleButton;
+
+	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IBeadView;
+	
+	public class UpArrowButtonView implements IBeadView
+	{
+		public function UpArrowButtonView()
+		{
+			upView = new Shape();
+			downView = new Shape();
+			overView = new Shape();
+
+			drawView(upView.graphics, 0xCCCCCC);
+			drawView(downView.graphics, 0x808080);
+			drawView(overView.graphics, 0xEEEEEE);
+		}
+		
+		private function drawView(g:Graphics, bgColor:uint):void
+		{
+			g.lineStyle(1);
+			g.beginFill(bgColor);
+			g.drawRect(0, 0, 16, 16);
+			g.endFill();
+			g.lineStyle(0);
+			g.beginFill(0);
+			g.moveTo(4, 12);
+			g.lineTo(12, 12);
+			g.lineTo(8, 4);
+			g.lineTo(4, 12);
+			g.endFill();
+		}
+		
+		private var _strand:IStrand;
+		
+		private var shape:Shape;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			shape = new Shape();
+			shape.graphics.beginFill(0xCCCCCC);
+			shape.graphics.drawRect(0, 0, 16, 16);
+			shape.graphics.endFill();
+			SimpleButton(value).upState = upView;
+			SimpleButton(value).downState = downView;
+			SimpleButton(value).overState = overView;
+			SimpleButton(value).hitTestState = shape;
+		}
+        
+		private var upView:Shape;
+		private var downView:Shape;
+		private var overView:Shape;
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/VScrollBarThumbView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/VScrollBarThumbView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/VScrollBarThumbView.as
new file mode 100644
index 0000000..d84fcb2
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/VScrollBarThumbView.as
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.Graphics;
+	import flash.display.Shape;
+	import flash.display.SimpleButton;
+    import flash.display.DisplayObject;
+
+    import org.apache.flex.core.IBeadView;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;	
+	
+	public class VScrollBarThumbView implements IBeadView
+	{
+		public function VScrollBarThumbView()
+		{
+		}
+		
+		private function drawView(g:Graphics, bgColor:uint):void
+		{
+            var hh:Number = DisplayObject(_strand).height;
+            g.clear();
+			g.lineStyle(1);
+			g.beginFill(bgColor);
+			g.drawRect(0, 0, 16, hh);
+			g.endFill();
+            hh = Math.round(hh / 2);
+			g.moveTo(4, hh);
+			g.lineTo(12, hh);
+			g.moveTo(4, hh - 4);
+			g.lineTo(12, hh - 4);
+			g.moveTo(4, hh + 4);
+			g.lineTo(12, hh + 4);
+		}
+		
+		private var _strand:IStrand;
+		
+		private var shape:Shape;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+            
+            upView = new Shape();
+            downView = new Shape();
+            overView = new Shape();
+            
+            drawView(upView.graphics, 0xCCCCCC);
+            drawView(downView.graphics, 0x808080);
+            drawView(overView.graphics, 0xEEEEEE);
+
+            shape = new Shape();
+			shape.graphics.beginFill(0xCCCCCC);
+			shape.graphics.drawRect(0, 0, 16, 16);
+			shape.graphics.endFill();
+			SimpleButton(value).upState = upView;
+			SimpleButton(value).downState = downView;
+			SimpleButton(value).overState = overView;
+			SimpleButton(value).hitTestState = shape;
+            IEventDispatcher(_strand).addEventListener("heightChanged", heightChangedHandler);
+		}
+
+        private function heightChangedHandler(event:Event):void
+        {
+			DisplayObject(_strand).scaleY = 1.0;
+			DisplayObject(_strand).scaleX = 1.0;
+			
+            var hh:Number = DisplayObject(_strand).height;
+            drawView(upView.graphics, 0xCCCCCC);
+            drawView(downView.graphics, 0x808080);
+            drawView(overView.graphics, 0xEEEEEE);
+            
+            shape.graphics.clear();
+            shape.graphics.beginFill(0xCCCCCC);
+            shape.graphics.drawRect(0, 0, 16, hh);
+            shape.graphics.endFill();
+        }
+        
+		private var upView:Shape;
+		private var downView:Shape;
+		private var overView:Shape;
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/VScrollBarTrackView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/VScrollBarTrackView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/VScrollBarTrackView.as
new file mode 100644
index 0000000..528fcf3
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/VScrollBarTrackView.as
@@ -0,0 +1,87 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.Graphics;
+	import flash.display.Shape;
+	import flash.display.SimpleButton;
+	
+	import org.apache.flex.core.IBeadView;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	
+	public class VScrollBarTrackView implements IBeadView
+	{
+		public function VScrollBarTrackView()
+		{
+			upView = new Shape();
+			downView = new Shape();
+			overView = new Shape();
+
+		}
+		
+		private function drawView(g:Graphics, bgColor:uint, h:Number):void
+		{
+			g.clear();
+			g.lineStyle(1);
+			g.beginFill(bgColor);
+			g.drawRect(0, 0, 16, h);
+			g.endFill();
+			g.lineStyle(0);
+		}
+
+		private function heightChangeHandler(event:Event):void
+		{
+			DisplayObject(_strand).scaleY = 1.0;
+			DisplayObject(_strand).scaleX = 1.0;
+			
+			var h:Number = SimpleButton(_strand).height;
+			
+			drawView(upView.graphics, 0xCCCCCC, h);
+			drawView(downView.graphics, 0x808080, h);
+			drawView(overView.graphics, 0xEEEEEE, h);	
+			shape.graphics.clear();
+			shape.graphics.beginFill(0xCCCCCC);
+			shape.graphics.drawRect(0, 0, 16, h);
+			shape.graphics.endFill();
+			
+		}
+		
+		private var _strand:IStrand;
+		
+		private var shape:Shape;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			SimpleButton(value).addEventListener("heightChanged", heightChangeHandler);
+			shape = new Shape();
+			SimpleButton(value).upState = upView;
+			SimpleButton(value).downState = downView;
+			SimpleButton(value).overState = overView;
+			SimpleButton(value).hitTestState = shape;
+		}
+
+		private var upView:Shape;
+		private var downView:Shape;
+		private var overView:Shape;
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/AlertController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/AlertController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/AlertController.as
new file mode 100644
index 0000000..01ba18a
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/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/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ButtonAutoRepeatController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ButtonAutoRepeatController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ButtonAutoRepeatController.as
new file mode 100644
index 0000000..18239f7
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ButtonAutoRepeatController.as
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events.MouseEvent;
+	import flash.utils.clearInterval;
+	import flash.utils.clearTimeout;
+	import flash.utils.setInterval;
+	import flash.utils.setTimeout;
+	
+	import org.apache.flex.core.IBead;
+	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 ButtonAutoRepeatController implements IBead, IBeadController
+	{
+		public function ButtonAutoRepeatController()
+		{
+		}
+		
+        private var _strand:IStrand;
+        
+        public function get strand():IStrand
+        {
+            return _strand;
+        }
+        
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            IEventDispatcher(value).addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+        }
+        
+        public var delay:int = 250;
+        public var interval:int = 100;
+        
+        private var timeout:uint;
+        private var repeater:uint;
+        
+        private function mouseDownHandler(event:MouseEvent):void
+        {
+            event.target.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);   
+            event.target.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+            timeout = setTimeout(sendFirstRepeat, delay); 
+        }
+        
+        private function mouseOutHandler(event:MouseEvent):void
+        {
+            event.target.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);   
+            event.target.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); 
+            if (repeater > 0)
+                clearInterval(repeater);
+            repeater = 0;
+            if (timeout > 0)
+                clearTimeout(timeout);
+            timeout = 0;
+        }
+        
+        private function mouseUpHandler(event:MouseEvent):void
+        {
+            event.target.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);   
+            event.target.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);  
+            if (repeater > 0)
+                clearInterval(repeater);
+            repeater = 0;
+            if (timeout > 0)
+                clearTimeout(timeout);
+            timeout = 0;
+        }
+        
+        private function sendFirstRepeat():void
+        {
+            clearTimeout(timeout);
+            timeout = 0;
+        	repeater = setInterval(sendRepeats, interval);
+        	IEventDispatcher(_strand).dispatchEvent(new Event("buttonRepeat"));
+        }
+        
+        private function sendRepeats():void
+        {
+       	    IEventDispatcher(_strand).dispatchEvent(new Event("buttonRepeat"));
+        }
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ComboBoxController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ComboBoxController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ComboBoxController.as
new file mode 100644
index 0000000..ed2d228
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ComboBoxController.as
@@ -0,0 +1,71 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flash.events.MouseEvent;
+	
+	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.IComboBoxView;
+
+	public class ComboBoxController implements IBeadController
+	{
+		public function ComboBoxController()
+		{
+		}
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+            IEventDispatcher(value).addEventListener(MouseEvent.CLICK, clickHandler);
+		}
+		
+        private function clickHandler(event:MouseEvent):void
+        {
+            var viewBead:IComboBoxView = _strand.getBeadByType(IComboBoxView) as IComboBoxView;
+            viewBead.popUpVisible = true;
+            var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
+            var popUpModel:ISelectionModel = viewBead.popUp.getBeadByType(ISelectionModel) as ISelectionModel;
+            popUpModel.dataProvider = selectionModel.dataProvider;
+            popUpModel.selectedIndex = selectionModel.selectedIndex;
+			DisplayObject(viewBead.popUp).width = DisplayObject(_strand).width;
+			DisplayObject(viewBead.popUp).height = 200;
+			DisplayObject(viewBead.popUp).x = DisplayObject(_strand).x;
+			DisplayObject(viewBead.popUp).y = DisplayObject(_strand).y;
+            IEventDispatcher(viewBead.popUp).addEventListener("change", changeHandler);
+        }
+        
+        private function changeHandler(event:Event):void
+        {
+            var viewBead:IComboBoxView = _strand.getBeadByType(IComboBoxView) as IComboBoxView;
+            viewBead.popUpVisible = false;
+            var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
+            var popUpModel:ISelectionModel = viewBead.popUp.getBeadByType(ISelectionModel) as ISelectionModel;
+            selectionModel.selectedIndex = popUpModel.selectedIndex;
+			IEventDispatcher(_strand).dispatchEvent(new Event("change"));
+        }
+	
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/DropDownListController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/DropDownListController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/DropDownListController.as
new file mode 100644
index 0000000..fa41001
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/DropDownListController.as
@@ -0,0 +1,74 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 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, IBeadController
+	{
+		public function DropDownListController()
+		{
+		}
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+            IEventDispatcher(value).addEventListener("click", clickHandler);
+		}
+		
+        private function clickHandler(event:Event):void
+        {
+            var viewBead:IDropDownListView = _strand.getBeadByType(IDropDownListView) as IDropDownListView;
+            viewBead.popUpVisible = true;
+            var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
+            var popUpModel:ISelectionModel = viewBead.popUp.getBeadByType(ISelectionModel) as ISelectionModel;
+            popUpModel.dataProvider = selectionModel.dataProvider;
+            popUpModel.selectedIndex = selectionModel.selectedIndex;
+			DisplayObject(viewBead.popUp).width = DisplayObject(_strand).width;
+			DisplayObject(viewBead.popUp).height = 200;
+            var pt:Point = new Point(DisplayObject(_strand).x, DisplayObject(_strand).y);
+            pt = DisplayObject(_strand).parent.localToGlobal(pt);
+			DisplayObject(viewBead.popUp).x = pt.x;
+			DisplayObject(viewBead.popUp).y = pt.y;
+            IEventDispatcher(viewBead.popUp).addEventListener("change", changeHandler);
+        }
+        
+        private function changeHandler(event:Event):void
+        {
+            var viewBead:IDropDownListView = _strand.getBeadByType(IDropDownListView) as IDropDownListView;
+            viewBead.popUpVisible = false;
+            var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
+            var popUpModel:ISelectionModel = viewBead.popUp.getBeadByType(ISelectionModel) as ISelectionModel;
+            selectionModel.selectedIndex = popUpModel.selectedIndex;
+			IEventDispatcher(_strand).dispatchEvent(new Event("change"));
+        }
+	
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/EditableTextKeyboardController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/EditableTextKeyboardController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/EditableTextKeyboardController.as
new file mode 100644
index 0000000..e505217
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/EditableTextKeyboardController.as
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.core.CSSTextField;
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ITextModel;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.html.staticControls.beads.ITextFieldView;
+	
+	public class EditableTextKeyboardController implements IBead, IBeadController
+	{
+		public function EditableTextKeyboardController()
+		{
+		}
+		
+		private var model:ITextModel;
+		private var textField:CSSTextField;
+		
+		private var _strand:IStrand;
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			model = UIBase(_strand).model as ITextModel;
+			
+			var viewBead:ITextFieldView = _strand.getBeadByType(ITextFieldView) as ITextFieldView;
+			textField = viewBead.textField;
+			textField.addEventListener("change", inputChangeHandler);
+		}
+		
+		private function inputChangeHandler( event:Object ) : void
+		{
+			model.text = textField.text;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ItemRendererMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ItemRendererMouseController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ItemRendererMouseController.as
new file mode 100644
index 0000000..fbc0b1c
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ItemRendererMouseController.as
@@ -0,0 +1,88 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events.MouseEvent;
+	
+	import org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IItemRenderer;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+
+	public class ItemRendererMouseController implements IBeadController
+	{
+		public function ItemRendererMouseController()
+		{
+		}
+		
+        private var renderer:IItemRenderer;
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+            renderer = value as IItemRenderer;
+            renderer.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
+            renderer.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+            renderer.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+		}
+		
+		protected function rollOverHandler(event:MouseEvent):void
+		{
+			var target:IItemRenderer = event.target as IItemRenderer;
+			if (target)
+			{
+                target.hovered = true;
+				target.dispatchEvent(new Event("rollover"));
+			}
+		}
+		
+		protected function rollOutHandler(event:MouseEvent):void
+		{
+			var target:IItemRenderer = event.target as IItemRenderer;
+			if (target)
+			{
+                target.hovered = false;
+                target.down = false;
+			}
+		}
+
+		protected function mouseDownHandler(event:MouseEvent):void
+		{
+			var target:IItemRenderer = event.currentTarget as IItemRenderer;
+			if (target)
+			{
+                target.down = true;
+				target.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+			}
+		}
+		
+		protected function mouseUpHandler(event:MouseEvent):void
+		{
+			var target:IItemRenderer = event.currentTarget as IItemRenderer;
+			if (target)
+			{
+                target.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);                
+				target.selected = true;
+				target.dispatchEvent(new Event("selected"));
+			}			
+		}
+	
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ListSingleSelectionMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ListSingleSelectionMouseController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ListSingleSelectionMouseController.as
new file mode 100644
index 0000000..ea870ab
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ListSingleSelectionMouseController.as
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IItemRenderer;
+	import org.apache.flex.core.IItemRendererParent;
+	import org.apache.flex.core.IRollOverModel;
+	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.IListView;
+	
+
+	public class ListSingleSelectionMouseController implements IBeadController
+	{
+		public function ListSingleSelectionMouseController()
+		{
+		}
+		
+		protected var listModel:ISelectionModel;
+		protected var listView:IListView;
+		protected var dataGroup:IItemRendererParent;
+
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			listModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+			listView = value.getBeadByType(IListView) as IListView;
+			dataGroup = listView.dataGroup;
+            dataGroup.addEventListener("selected", selectedHandler, true);
+            dataGroup.addEventListener("rollover", rolloverHandler, true);
+		}
+		
+        private function selectedHandler(event:Event):void
+        {
+            listModel.selectedIndex = IItemRenderer(event.target).index;
+            IEventDispatcher(listView.strand).dispatchEvent(new Event("change"));
+        }
+		
+        private function rolloverHandler(event:Event):void
+        {
+            IRollOverModel(listModel).rollOverIndex = IItemRenderer(event.target).index;
+            IEventDispatcher(listView.strand).dispatchEvent(new Event("rollover"));
+        }
+	
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ScrollBarMouseControllerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ScrollBarMouseControllerBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ScrollBarMouseControllerBase.as
new file mode 100644
index 0000000..bb3d5d2
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/ScrollBarMouseControllerBase.as
@@ -0,0 +1,97 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events.MouseEvent;
+	
+	import org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IScrollBarModel;
+	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.IScrollBarView;
+
+	public class ScrollBarMouseControllerBase implements IBeadController
+	{
+		public function ScrollBarMouseControllerBase()
+		{
+		}
+		
+		protected var sbModel:IScrollBarModel;
+		protected var sbView:IScrollBarView;
+		
+		private var _strand:IStrand;
+		
+		public function get strand():IStrand
+		{
+			return _strand;
+		}
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			sbModel = value.getBeadByType(IScrollBarModel) as IScrollBarModel;
+			sbView = value.getBeadByType(IScrollBarView) as IScrollBarView;
+			sbView.decrement.addEventListener(MouseEvent.CLICK, decrementClickHandler);
+			sbView.increment.addEventListener(MouseEvent.CLICK, incrementClickHandler);
+            sbView.decrement.addEventListener("buttonRepeat", decrementClickHandler);
+            sbView.increment.addEventListener("buttonRepeat", incrementClickHandler);
+			sbView.track.addEventListener(MouseEvent.CLICK, trackClickHandler);
+			sbView.thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbMouseDownHandler);
+		}
+		
+	
+		protected function snap(value:Number):Number
+		{
+			var si:Number = sbModel.snapInterval;
+			var n:Number = Math.round((value - sbModel.minimum) / si) * si + sbModel.minimum;
+			if (value > 0)
+			{
+				if (value - n < n + si - value)
+					return n;
+				return n + si;
+				
+			}
+			if (value - n > n + si - value)
+				return n + si;
+			return n;
+		}
+		
+		protected function decrementClickHandler(event:Event):void
+		{
+			sbModel.value = snap(Math.max(sbModel.minimum, sbModel.value - sbModel.stepSize));
+			IEventDispatcher(_strand).dispatchEvent(new Event("scroll"));
+		}
+		
+		protected function incrementClickHandler(event:Event):void
+		{
+			sbModel.value = snap(Math.min(sbModel.maximum - sbModel.pageSize, sbModel.value + sbModel.stepSize));	
+			IEventDispatcher(_strand).dispatchEvent(new Event("scroll"));
+		}
+		
+		protected function trackClickHandler(event:MouseEvent):void
+		{
+		}
+		
+		protected function thumbMouseDownHandler(event:MouseEvent):void
+		{
+		}
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
new file mode 100644
index 0000000..60c153a
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events.MouseEvent;
+	import flash.geom.Point;
+	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IRangeModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.html.staticControls.beads.ISliderView;
+	
+	public class SliderMouseController implements IBead, IBeadController
+	{
+		public function SliderMouseController()
+		{
+		}
+		
+		private var rangeModel:IRangeModel;
+		
+		private var _strand:IStrand;
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			rangeModel = UIBase(value).model as IRangeModel;
+			
+			var sliderView:ISliderView = value.getBeadByType(ISliderView) as ISliderView;
+			sliderView.thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbDownHandler);
+			
+			// add handler to detect click on track
+			sliderView.track.addEventListener(MouseEvent.CLICK, trackClickHandler, false, 99999);
+		}
+		
+		private function thumbDownHandler( event:MouseEvent ) : void
+		{
+			UIBase(_strand).stage.addEventListener(MouseEvent.MOUSE_MOVE, thumbMoveHandler);
+			UIBase(_strand).stage.addEventListener(MouseEvent.MOUSE_UP, thumbUpHandler);
+			
+			var sliderView:ISliderView = _strand.getBeadByType(ISliderView) as ISliderView;
+			
+			origin = new Point(event.stageX, event.stageY);
+			thumb = new Point(sliderView.thumb.x,sliderView.thumb.y);
+		}
+		
+		private function thumbUpHandler( event:MouseEvent ) : void
+		{
+			UIBase(_strand).stage.removeEventListener(MouseEvent.MOUSE_MOVE, thumbMoveHandler);
+			UIBase(_strand).stage.removeEventListener(MouseEvent.MOUSE_UP, thumbUpHandler);
+			
+			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
+		}
+		
+		private var origin:Point;
+		private var thumb:Point;
+		
+		private function thumbMoveHandler( event:MouseEvent ) : void
+		{
+			var sliderView:ISliderView = _strand.getBeadByType(ISliderView) as ISliderView;
+			
+			var deltaX:Number = event.stageX - origin.x;
+			var thumbW:Number = sliderView.thumb.width/2;
+			var newX:Number = thumb.x + deltaX;
+			
+			var p:Number = newX/UIBase(_strand).width;
+			var n:Number = p*(rangeModel.maximum - rangeModel.minimum) + rangeModel.minimum;
+		
+			rangeModel.value = n;
+			
+			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
+		}
+		
+		private function trackClickHandler( event:MouseEvent ) : void
+		{
+			event.stopImmediatePropagation();
+			
+			var sliderView:ISliderView = _strand.getBeadByType(ISliderView) as ISliderView;
+			
+			var xloc:Number = event.localX;
+			var p:Number = xloc/UIBase(_strand).width;
+			var n:Number = p*(rangeModel.maximum - rangeModel.minimum) + rangeModel.minimum;
+			
+			rangeModel.value = n;
+			
+			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/SpinnerMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/SpinnerMouseController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/SpinnerMouseController.as
new file mode 100644
index 0000000..abb7e97
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/SpinnerMouseController.as
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events.MouseEvent;
+	
+	import org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IRangeModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.html.staticControls.beads.ISpinnerView;
+	
+	public class SpinnerMouseController implements IBeadController
+	{
+		public function SpinnerMouseController()
+		{
+		}
+		
+		private var rangeModel:IRangeModel;
+		
+		private var _strand:IStrand;
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			rangeModel = UIBase(value).model as IRangeModel;
+			
+			var spinnerBead:ISpinnerView = value.getBeadByType(ISpinnerView) as ISpinnerView;
+			spinnerBead.decrement.addEventListener(MouseEvent.CLICK, decrementClickHandler);
+			spinnerBead.decrement.addEventListener("buttonRepeat", decrementClickHandler);
+			spinnerBead.increment.addEventListener(MouseEvent.CLICK, incrementClickHandler);
+			spinnerBead.increment.addEventListener("buttonRepeat", incrementClickHandler);
+		}
+		
+		private function decrementClickHandler( event:Event ) : void
+		{
+			rangeModel.value = Math.max(rangeModel.minimum, rangeModel.value - rangeModel.stepSize);
+			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
+		}
+		
+		private function incrementClickHandler( event:Event ) : void
+		{
+			rangeModel.value = Math.min(rangeModel.maximum, rangeModel.value + rangeModel.stepSize);	
+			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/VScrollBarMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/VScrollBarMouseController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/VScrollBarMouseController.as
new file mode 100644
index 0000000..b99889e
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/controllers/VScrollBarMouseController.as
@@ -0,0 +1,77 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flash.events.MouseEvent;
+	
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	public class VScrollBarMouseController extends ScrollBarMouseControllerBase
+	{
+		public function VScrollBarMouseController()
+		{
+		}
+		
+		override protected function trackClickHandler(event:MouseEvent):void
+		{
+			if (sbView.thumb.visible)
+			{
+				if (event.localY < sbView.thumb.y)
+				{
+					sbModel.value = snap(Math.max(sbModel.minimum, sbModel.value - sbModel.pageStepSize));						
+					IEventDispatcher(strand).dispatchEvent(new Event("scroll"));
+				}
+				else
+				{
+					sbModel.value = snap(Math.min(sbModel.maximum - sbModel.pageSize, sbModel.value + sbModel.pageStepSize));
+					IEventDispatcher(strand).dispatchEvent(new Event("scroll"));
+				}
+			}
+		}
+		
+		private var thumbDownY:Number;
+		private var lastThumbY:Number;
+		
+		override protected function thumbMouseDownHandler(event:MouseEvent):void
+		{
+			sbView.thumb.stage.addEventListener(MouseEvent.MOUSE_MOVE, thumbMouseMoveHandler);
+			sbView.thumb.stage.addEventListener(MouseEvent.MOUSE_UP, thumbMouseUpHandler);
+			thumbDownY = event.stageY;
+			lastThumbY = sbView.thumb.y;
+		}
+		
+		private function thumbMouseMoveHandler(event:MouseEvent):void
+		{
+			var thumb:DisplayObject = sbView.thumb;
+			var track:DisplayObject = sbView.track;
+			thumb.y = Math.max(track.y, Math.min(lastThumbY + (event.stageY - thumbDownY), track.y + track.height - thumb.height));
+			var newValue:Number = snap((thumb.y - track.y) / (track.height - thumb.height) * (sbModel.maximum - sbModel.minimum - sbModel.pageSize));
+			sbModel.value = newValue;
+			IEventDispatcher(strand).dispatchEvent(new Event("scroll"));
+		}
+		
+		private function thumbMouseUpHandler(event:MouseEvent):void
+		{
+			sbView.thumb.stage.removeEventListener(MouseEvent.MOUSE_MOVE, thumbMouseMoveHandler);
+			sbView.thumb.stage.removeEventListener(MouseEvent.MOUSE_UP, thumbMouseUpHandler);			
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/ButtonBarLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/ButtonBarLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/ButtonBarLayout.as
new file mode 100644
index 0000000..c7c0a2d
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/ButtonBarLayout.as
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.layouts
+{
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	
+	import org.apache.flex.core.IBeadLayout;
+	import org.apache.flex.core.ILayoutParent;
+	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 ButtonBarLayout implements IBeadLayout
+	{
+		public function ButtonBarLayout()
+		{
+		}
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
+			IEventDispatcher(value).addEventListener("childrenAdded", changeHandler);
+			IEventDispatcher(value).addEventListener("itemsCreated", changeHandler);
+		}
+		
+		private function changeHandler(event:Event):void
+		{
+			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
+			var contentView:DisplayObjectContainer = layoutParent.contentView;
+			
+			var n:int = contentView.numChildren;
+			var xpos:Number = 0;
+			var useWidth:Number = DisplayObject(_strand).width / n;
+			var useHeight:Number = DisplayObject(_strand).height;
+			
+			for (var i:int = 0; i < n; i++)
+			{
+				var child:DisplayObject = contentView.getChildAt(i);
+				
+				child.y = 0;
+				child.x = xpos;
+				child.width = useWidth;
+				child.height = useHeight;
+				xpos += useWidth;
+			}
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/NonVirtualHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/NonVirtualHorizontalLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/NonVirtualHorizontalLayout.as
new file mode 100644
index 0000000..1b793e1
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/NonVirtualHorizontalLayout.as
@@ -0,0 +1,145 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.layouts
+{
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	
+	import org.apache.flex.core.IBeadLayout;
+	import org.apache.flex.core.ILayoutParent;
+	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 NonVirtualHorizontalLayout implements IBeadLayout
+	{
+		public function NonVirtualHorizontalLayout()
+		{
+		}
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
+			IEventDispatcher(value).addEventListener("childrenAdded", changeHandler);
+			IEventDispatcher(value).addEventListener("itemsCreated", changeHandler);
+		}
+	
+		private function changeHandler(event:Event):void
+		{
+			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
+			var contentView:DisplayObjectContainer = layoutParent.contentView;
+			
+			var n:int = contentView.numChildren;
+			var marginLeft:Object;
+			var marginRight:Object;
+			var marginTop:Object;
+			var marginBottom:Object;
+			var margin:Object;
+			var maxHeight:Number = 0;
+			var verticalMargins:Array = [];
+			
+			for (var i:int = 0; i < n; i++)
+			{
+				var child:DisplayObject = contentView.getChildAt(i);
+				margin = ValuesManager.valuesImpl.getValue(child, "margin");
+				if (margin is Array)
+				{
+					if (margin.length == 1)
+						marginLeft = marginTop = marginRight = marginBottom = margin[0];
+					else if (margin.length <= 3)
+					{
+						marginLeft = marginRight = margin[1];
+						marginTop = marginBottom = margin[0];
+					}
+					else if (margin.length == 4)
+					{
+						marginLeft = margin[3];
+						marginBottom = margin[2];
+						marginRight = margin[1];
+						marginTop = margin[0];					
+					}
+				}
+				else if (margin == null)
+				{
+					marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
+					marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
+					marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
+					marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
+				}
+				else
+				{
+					marginLeft = marginTop = marginBottom = marginRight = margin;
+				}
+				var ml:Number;
+				var mr:Number;
+				var mt:Number;
+				var mb:Number;
+				var lastmr:Number;
+				mt = Number(marginTop);
+				if (isNaN(mt))
+					mt = 0;
+				mb = Number(marginBottom);
+				if (isNaN(mb))
+					mb = 0;
+				if (marginLeft == "auto")
+					ml = 0;
+				else
+				{
+					ml = Number(marginLeft);
+					if (isNaN(ml))
+						ml = 0;
+				}
+				if (marginRight == "auto")
+					mr = 0;
+				else
+				{
+					mr = Number(marginRight);
+					if (isNaN(mr))
+						mr = 0;
+				}
+				child.y = mt;
+				maxHeight = Math.max(maxHeight, ml + child.height + mr);
+				var xx:Number;
+				if (i == 0)
+					child.x = ml;
+				else
+					child.x = xx + ml + lastmr;
+				xx = child.x + child.width;
+				lastmr = mr;
+				var valign:Object = ValuesManager.valuesImpl.getValue(child, "vertical-align");
+				verticalMargins.push({ marginTop: marginTop, marginBottom: marginBottom, valign: valign });
+			}
+			for (i = 0; i < n; i++)
+			{
+				var obj:Object = verticalMargins[0]
+				child = contentView.getChildAt(i);
+				if (obj.valign == "middle")
+					child.y = maxHeight - child.height / 2;
+				else if (valign == "bottom")
+					child.y = maxHeight - child.height - obj.marginBottom;
+				else
+					child.y = obj.marginTop;
+			}
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/NonVirtualHorizontalScrollingLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/NonVirtualHorizontalScrollingLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/NonVirtualHorizontalScrollingLayout.as
new file mode 100644
index 0000000..00dcfc1
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/layouts/NonVirtualHorizontalScrollingLayout.as
@@ -0,0 +1,110 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.layouts
+{
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	import flash.geom.Rectangle;
+	
+	import org.apache.flex.core.IBeadLayout;
+	import org.apache.flex.core.IBorderModel;
+	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.IScrollBarModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.html.staticControls.supportClasses.Border;
+	import org.apache.flex.html.staticControls.supportClasses.ScrollBar;
+	
+	public class NonVirtualHorizontalScrollingLayout implements IBeadLayout
+	{
+		public function NonVirtualHorizontalScrollingLayout()
+		{
+		}
+		
+		private var hScrollBar:ScrollBar;
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			IEventDispatcher(value).addEventListener("heightChanged", changeHandler);
+			IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
+			IEventDispatcher(value).addEventListener("itemsCreated", changeHandler);
+		}
+		
+		private function changeHandler(event:Event):void
+		{            
+			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
+			var contentView:DisplayObjectContainer = layoutParent.contentView;
+			var border:Border = layoutParent.border;
+			var borderModel:IBorderModel = border.model as IBorderModel;
+			
+			var ww:Number = layoutParent.resizableView.width;
+			var hh:Number = layoutParent.resizableView.height;
+			border.width = ww;
+			border.height = hh;
+			
+			contentView.width = ww - borderModel.offsets.left - borderModel.offsets.right;
+			contentView.height = hh - borderModel.offsets.top - borderModel.offsets.bottom;
+			contentView.x = borderModel.offsets.left;
+			contentView.y = borderModel.offsets.top;
+			
+			var n:int = contentView.numChildren;
+			var xx:Number = 0;
+			for (var i:int = 0; i < n; i++)
+			{
+				var ir:DisplayObject = contentView.getChildAt(i);
+				ir.x = xx;
+				ir.height = contentView.height;
+				xx += ir.width;			
+			}
+			/*
+			if (xx > dataGroup.width)
+			{
+				hScrollBar = listView.hScrollBar;
+				dataGroup.height -= hScrollBar.height;
+				IScrollBarModel(hScrollBar.model).maximum = xx;
+				IScrollBarModel(hScrollBar.model).pageSize = dataGroup.width;
+				IScrollBarModel(hScrollBar.model).pageStepSize = dataGroup.width;
+				hScrollBar.visible = true;
+				hScrollBar.width = dataGroup.width;
+				hScrollBar.x = dataGroup.x;
+				hScrollBar.y = dataGroup.height;
+				var xpos:Number = IScrollBarModel(hScrollBar.model).value;
+				dataGroup.scrollRect = new Rectangle(xpos, 0, xpos + dataGroup.width, dataGroup.height);
+				hScrollBar.addEventListener("scroll", scrollHandler);
+			}
+			else if (hScrollBar)
+			{
+				dataGroup.scrollRect = null;
+				hScrollBar.visible = false;
+			}
+			*/
+		}
+		
+		/*private function scrollHandler(event:Event):void
+		{
+			var xpos:Number = IScrollBarModel(hScrollBar.model).value;
+			dataGroup.scrollRect = new Rectangle(xpos, 0, xpos + dataGroup.width, dataGroup.height);
+		}*/
+	}
+}
\ No newline at end of file


Mime
View raw message