flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [16/21] move AS code into a projects/FlexJSUI
Date Mon, 18 Nov 2013 21:03:11 GMT
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66246d8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/CustomEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/CustomEvent.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/CustomEvent.as
new file mode 100644
index 0000000..0776e22
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/CustomEvent.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.events
+{
+	/**
+	 *  MXML auto-imports flash.events.Event which then requires
+	 *  full qualification to use org.apache.flex.events.Event.
+	 *  Use CustomEvent to skip all that extra typing.  Eventually
+	 *  we should add a flag to strip out the default auto-imports.
+	 *  Like org.apache.flex.events.Event events on the JS side
+	 *  are DOMEvents and not really instances of this class
+	 */
+	public class CustomEvent extends Event
+	{
+		public function CustomEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
+		{
+			super(type, bubbles, cancelable);
+		}
+	}
+}
\ 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/events/Event.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as
new file mode 100644
index 0000000..91fd83a
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events
+{
+	import flash.events.Event;
+	
+	/**
+	 *  This class simply wraps flash.events.Event so that
+	 *  no flash packages are needed on the JS side.
+	 *  At runtime, this class is not always the event object
+	 *  that is dispatched.  In most cases we are dispatching
+	 *  DOMEvents instead, so as long as you don't actually
+	 *  check the typeof(event) it will work
+	 */
+	public class Event extends flash.events.Event
+	{
+		public function Event(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
+		{
+			super(type, bubbles, cancelable);
+		}
+	}
+}
\ 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/events/EventDispatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/EventDispatcher.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/EventDispatcher.as
new file mode 100644
index 0000000..64c6f87
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/EventDispatcher.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.events
+{
+	import flash.events.EventDispatcher;
+	
+	/**
+	 *  This class simply wraps flash.events.EventDispatcher so that
+	 *  no flash packages are needed on the JS side.
+	 */
+	public class EventDispatcher extends flash.events.EventDispatcher implements IEventDispatcher
+	{
+		public function EventDispatcher()
+		{
+			super();
+		}
+	}
+}
\ 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/events/IEventDispatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/IEventDispatcher.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/IEventDispatcher.as
new file mode 100644
index 0000000..b838d23
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/IEventDispatcher.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.events
+{
+	import flash.events.IEventDispatcher;
+	
+	/**
+	 *  This class simply wraps flash.events.EventDispatcher so that
+	 *  no flash packages are needed on the JS side.
+	 */
+	public interface IEventDispatcher extends flash.events.IEventDispatcher
+	{
+		
+	}
+}
\ 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/events/ValueChangeEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/ValueChangeEvent.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/ValueChangeEvent.as
new file mode 100644
index 0000000..4a759f7
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/ValueChangeEvent.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events
+{
+	public class ValueChangeEvent extends Event
+	{
+		public function ValueChangeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, 
+										 oldValue:Object = null, newValue:Object = null)
+		{
+			super(type, bubbles, cancelable);
+			this.oldValue = oldValue;
+			this.newValue = newValue;
+		}
+		
+		public var oldValue:Object;
+		public var newValue:Object;
+        public var propertyName:String;
+        public var source:Object;
+		
+		public static const VALUE_CHANGE:String = "valueChange";
+        
+        public static function createUpdateEvent(source:Object, name:String, oldValue:Object, newValue:Object):ValueChangeEvent
+        {
+            var event:ValueChangeEvent = new ValueChangeEvent(VALUE_CHANGE, false, false, oldValue, newValue);
+            event.propertyName = name;
+            event.source = source;
+            return event;
+        }
+	}
+}
\ 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/Alert.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Alert.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Alert.as
new file mode 100644
index 0000000..b3cf5e2
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Alert.as
@@ -0,0 +1,85 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.IAlertModel;
+	import org.apache.flex.core.IPopUp;
+	import org.apache.flex.core.UIBase;
+	
+	public class Alert extends UIBase implements IPopUp
+	{
+		public static const YES:uint    = 0x000001;
+		public static const NO:uint     = 0x000002;
+		public static const OK:uint     = 0x000004;
+		public static const CANCEL:uint = 0x000008;
+		
+		public function Alert()
+		{
+			super();
+			
+			className = "Alert";
+		}
+		
+		// note: only passing parent to this function as I don't see a way to identify
+		// the 'application' or top level view without supplying a place to start to
+		// look for it.
+		static public function show( text:String, parent:Object, title:String="", flags:uint=Alert.OK ) : void
+		{
+			var alert:Alert = new Alert();
+			alert.message = text;
+			alert.title  = title;
+			alert.flags = flags;
+			
+			alert.show(parent);
+		}
+		
+		public function show(parent:Object) : void
+		{
+			parent.addElement(this);
+		}
+		
+		public function get title():String
+		{
+			return IAlertModel(model).title;
+		}
+		public function set title(value:String):void
+		{
+			IAlertModel(model).title = value;
+		}
+		
+		public function get message():String
+		{
+			return IAlertModel(model).message;
+		}
+		public function set message(value:String):void
+		{
+			IAlertModel(model).message = value;
+		}
+		
+		public function get flags():uint
+		{
+			return IAlertModel(model).flags;
+		}
+		public function set flags(value:uint):void
+		{
+			IAlertModel(model).flags = 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/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as
new file mode 100644
index 0000000..ce28dc5
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.DisplayObject;
+	
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+    import org.apache.flex.core.UIButtonBase;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	[Event(name="click", type="org.apache.flex.events.Event")]
+
+	public class Button extends UIButtonBase implements IStrand, IEventDispatcher, IUIBase
+	{
+		public function Button(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+		{
+			super(upState, overState, downState, hitTestState);
+		}		
+	}
+}
\ 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/ButtonBar.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ButtonBar.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ButtonBar.as
new file mode 100644
index 0000000..ee7c0e3
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ButtonBar.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.staticControls
+{
+	public class ButtonBar extends List
+	{
+		public function ButtonBar()
+		{
+			super();
+		}
+	}
+}
\ 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/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/CheckBox.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/CheckBox.as
new file mode 100644
index 0000000..ceaf488
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/CheckBox.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
+{
+	import flash.display.DisplayObject;
+    import flash.events.MouseEvent;
+	
+	import org.apache.flex.core.IToggleButtonModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIButtonBase;
+	import org.apache.flex.events.Event;
+	
+	[Event(name="change", type="org.apache.flex.events.Event")]
+
+	public class CheckBox extends UIButtonBase implements IStrand
+	{
+		public function CheckBox(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+		{
+			super(upState, overState, downState, hitTestState);
+			
+			addEventListener(MouseEvent.CLICK, internalMouseHandler);
+		}
+		
+		public function get text():String
+		{
+			return IToggleButtonModel(model).text;
+		}
+		public function set text(value:String):void
+		{
+			IToggleButtonModel(model).text = value;
+		}
+		
+		public function get selected():Boolean
+		{
+			return IToggleButtonModel(model).selected;
+		}
+		
+		public function set selected(value:Boolean):void
+		{
+			IToggleButtonModel(model).selected = value;
+		}
+				
+		private function internalMouseHandler(event:Event) : void
+		{
+			selected = !selected;
+			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/ComboBox.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ComboBox.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ComboBox.as
new file mode 100644
index 0000000..d70e644
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ComboBox.as
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.IComboBoxModel;
+	import org.apache.flex.core.UIBase;
+	
+	[Event(name="change", type="org.apache.flex.events.Event")]
+	
+	public class ComboBox extends UIBase
+	{
+		public function ComboBox()
+		{
+			super();
+		}
+		
+		public function get dataProvider():Object
+		{
+			return IComboBoxModel(model).dataProvider;
+		}
+		public function set dataProvider(value:Object):void
+		{
+			IComboBoxModel(model).dataProvider = value;
+		}
+		
+		public function get selectedIndex():int
+		{
+			return IComboBoxModel(model).selectedIndex;
+		}
+		public function set selectedIndex(value:int):void
+		{
+			IComboBoxModel(model).selectedIndex = value;
+		}
+		
+		public function get selectedItem():Object
+		{
+			return IComboBoxModel(model).selectedItem;
+		}
+		public function set selectedItem(value:Object):void
+		{
+			IComboBoxModel(model).selectedItem = 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/Container.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Container.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Container.as
new file mode 100644
index 0000000..05a59b1
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Container.as
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	
+	import org.apache.flex.core.IChrome;
+	import org.apache.flex.core.IContainer;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	
+    [Event(name="change", type="org.apache.flex.events.Event")]
+    
+	[DefaultProperty("mxmlContent")]
+	public class Container extends UIBase implements IContainer
+	{
+		public function Container()
+		{
+			super();
+			actualParent = this;
+		}
+		
+		public var mxmlContent:Array;
+
+		private var actualParent:DisplayObjectContainer;
+		
+		public function setActualParent(parent:DisplayObjectContainer):void
+		{
+			actualParent = parent;	
+		}
+		
+        override public function getElementIndex(c:Object):int
+        {
+            if (c is IUIBase)
+                return actualParent.getChildIndex(IUIBase(c).element as DisplayObject);
+            else
+                return actualParent.getChildIndex(c as DisplayObject);
+        }
+
+        override public function addElement(c:Object):void
+        {
+            if (c is IUIBase)
+            {
+				if (c is IChrome ) {
+					addChild(IUIBase(c).element as DisplayObject);
+					IUIBase(c).addedToParent();
+				}
+				else {
+                	actualParent.addChild(IUIBase(c).element as DisplayObject);
+                	IUIBase(c).addedToParent();
+				}
+            }
+            else {
+				if (c is IChrome) {
+					addChild(c as DisplayObject);
+				}
+				else {
+					actualParent.addChild(c as DisplayObject);
+				}
+			}
+        }
+        
+        override public function addElementAt(c:Object, index:int):void
+        {
+            if (c is IUIBase)
+            {
+				if (c is IChrome) {
+					addChildAt(IUIBase(c).element as DisplayObject, index);
+					IUIBase(c).addedToParent();
+				}
+				else {
+                	actualParent.addChildAt(IUIBase(c).element as DisplayObject, index);
+                	IUIBase(c).addedToParent();
+				}
+            }
+            else {
+				if (c is IChrome) {
+					addChildAt(c as DisplayObject, index);
+				} else {
+                	actualParent.addChildAt(c as DisplayObject, index);
+				}
+			}
+        }
+        
+        override public function removeElement(c:Object):void
+        {
+            if (c is IUIBase)
+                actualParent.removeChild(IUIBase(c).element as DisplayObject);
+            else
+                actualParent.removeChild(c as DisplayObject);
+        }
+        
+        public function getChildren():Array
+		{
+			var children:Array = [];
+			var n:int = actualParent.numChildren;
+			for (var i:int = 0; i < n; i++)
+				children.push(actualParent.getChildAt(i));
+			return children;
+		}
+
+		public function childrenAdded():void
+		{
+			dispatchEvent(new Event("childrenAdded"));
+		}
+	}
+}
\ 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/ContainerContentArea.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ContainerContentArea.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ContainerContentArea.as
new file mode 100644
index 0000000..fd846a4
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ContainerContentArea.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
+{
+	import org.apache.flex.core.UIBase;
+	
+	public class ContainerContentArea extends UIBase
+	{
+		public function ContainerContentArea()
+		{
+			super();
+		}
+	}
+}
\ 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/ControlBar.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ControlBar.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ControlBar.as
new file mode 100644
index 0000000..8f0a46b
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/ControlBar.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	
+	import org.apache.flex.core.IBeadLayout;
+	import org.apache.flex.core.IChrome;
+	import org.apache.flex.core.IContainer;
+	import org.apache.flex.core.ValuesManager;
+
+	public class ControlBar extends Container implements IContainer, IChrome
+	{
+		public function ControlBar()
+		{
+			super();
+			
+			className = "ControlBar";
+		}
+		
+		override public function addedToParent():void
+		{
+			super.addedToParent();	
+			
+			if( getBeadByType(IBeadLayout) == null ) {
+				var layout:IBeadLayout = new (ValuesManager.valuesImpl.getValue(this, "iBeadLayout")) as IBeadLayout;
+				addBead(layout);
+			}
+		}
+	}
+}
\ 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/DataGrid.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/DataGrid.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/DataGrid.as
new file mode 100644
index 0000000..9a02831
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/DataGrid.as
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.IDataGridModel;
+	import org.apache.flex.core.UIBase;
+	
+	[Event(name="change", type="org.apache.flex.events.Event")]
+	
+	public class DataGrid extends UIBase
+	{
+		public function DataGrid()
+		{
+			super();
+		}
+		
+		public function get dataProvider():Object
+		{
+			return IDataGridModel(model).dataProvider;
+		}
+		public function set dataProvider(value:Object):void
+		{
+			IDataGridModel(model).dataProvider = value;
+		}
+		
+		public function get labelFields():Object
+		{
+			return IDataGridModel(model).labelFields;
+		}
+		public function set labelFields(value:Object):void
+		{
+			IDataGridModel(model).labelFields = value;
+		}
+		
+		public function get selectedIndex():int
+		{
+			return IDataGridModel(model).selectedIndex;
+		}
+	}
+}
\ 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/DropDownList.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/DropDownList.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/DropDownList.as
new file mode 100644
index 0000000..57f1a88
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/DropDownList.as
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+    import org.apache.flex.core.ISelectionModel;
+    
+    [Event(name="change", type="org.apache.flex.events.Event")]
+    
+	public class DropDownList extends Button
+	{
+		public function DropDownList()
+		{
+		}
+		
+        public function get dataProvider():Object
+        {
+            return ISelectionModel(model).dataProvider;
+        }
+        public function set dataProvider(value:Object):void
+        {
+            ISelectionModel(model).dataProvider = value;
+        }
+        
+        public function get selectedIndex():int
+        {
+            return ISelectionModel(model).selectedIndex;
+        }
+        public function set selectedIndex(value:int):void
+        {
+            ISelectionModel(model).selectedIndex = value;
+        }
+        
+        public function get selectedItem():Object
+        {
+            return ISelectionModel(model).selectedItem;
+        }
+        public function set selectedItem(value:Object):void
+        {
+            ISelectionModel(model).selectedItem = 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/Image.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Image.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Image.as
new file mode 100644
index 0000000..eebfe40
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Image.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.IImageModel;
+	import org.apache.flex.core.UIBase;
+	
+	public class Image extends UIBase
+	{
+		public function Image()
+		{
+			super();
+		}
+		
+		public function get source():String
+		{
+			return IImageModel(model).source;
+		}
+		
+		public function set source(value:String):void
+		{
+			IImageModel(model).source = 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/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Label.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Label.as
new file mode 100644
index 0000000..30565d6
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Label.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.ITextModel;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	/**
+	 *  Label probably should extend TextField directly,
+	 *  but the player's APIs for TextLine do not allow
+	 *  direct instantiation, and we might want to allow
+	 *  Labels to be declared and have their actual
+	 *  view be swapped out.
+	 */
+	public class Label extends UIBase
+	{
+		public function Label()
+		{
+			super();
+		}
+		
+		public function get text():String
+		{
+			return ITextModel(model).text;
+		}
+		public function set text(value:String):void
+		{
+			ITextModel(model).text = value;
+		}
+		
+		public function get html():String
+		{
+			return ITextModel(model).html;
+		}
+		public function set html(value:String):void
+		{
+			ITextModel(model).html = value;
+		}
+				
+		override public function set width(value:Number):void
+		{
+			super.width = value;
+			IEventDispatcher(model).dispatchEvent( new Event("widthChanged") );
+		}
+		
+		override public function set height(value:Number):void
+		{
+			super.height = value;
+			IEventDispatcher(model).dispatchEvent( new Event("heightChanged") );
+		}
+	}
+}
\ 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/List.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/List.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/List.as
new file mode 100644
index 0000000..da1638e
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/List.as
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.IRollOverModel;
+	import org.apache.flex.core.ISelectionModel;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.html.staticControls.beads.IDataProviderItemRendererMapper;
+	
+    [Event(name="change", type="org.apache.flex.events.Event")]
+    
+	/**
+	 *  Label probably should extend TextField directly,
+	 *  but the player's APIs for TextLine do not allow
+	 *  direct instantiation, and we might want to allow
+	 *  Labels to be declared and have their actual
+	 *  view be swapped out.
+	 */
+	public class List extends UIBase
+	{
+		public function List()
+		{
+			super();
+		}
+		
+        public function get dataProvider():Object
+        {
+            return ISelectionModel(model).dataProvider;
+        }
+        public function set dataProvider(value:Object):void
+        {
+            ISelectionModel(model).dataProvider = value;
+        }
+
+        public function get selectedIndex():int
+		{
+			return ISelectionModel(model).selectedIndex;
+		}
+		public function set selectedIndex(value:int):void
+		{
+			ISelectionModel(model).selectedIndex = value;
+		}
+
+        public function get rollOverIndex():int
+		{
+			return IRollOverModel(model).rollOverIndex;
+		}
+		public function set rollOverIndex(value:int):void
+		{
+			IRollOverModel(model).rollOverIndex = value;
+		}
+		
+		public function get selectedItem():Object
+		{
+			return ISelectionModel(model).selectedItem;
+		}
+		public function set selectedItem(value:Object):void
+		{
+			ISelectionModel(model).selectedItem = value;
+		}
+		
+		override public function addedToParent():void
+		{
+            super.addedToParent();
+            
+            if (getBeadByType(IDataProviderItemRendererMapper) == null)
+            {
+                var mapper:IDataProviderItemRendererMapper = new (ValuesManager.valuesImpl.getValue(this, "iDataProviderItemRendererMapper")) as IDataProviderItemRendererMapper;
+                addBead(mapper);
+            }
+		}
+        
+	}
+}
\ 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/NumericStepper.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/NumericStepper.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/NumericStepper.as
new file mode 100644
index 0000000..c587ff3
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/NumericStepper.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
+{
+	import org.apache.flex.core.IRangeModel;
+
+	[Event(name="valueChanged", type="org.apache.flex.events.Event")]
+	public class NumericStepper extends Container
+	{
+		public function NumericStepper()
+		{
+			super();
+		}
+		
+		public function get value():Number
+		{
+			return IRangeModel(model).value;
+		}
+		public function set value(newValue:Number):void
+		{
+			IRangeModel(model).value = newValue;
+		}
+		
+		public function get minimum():Number
+		{
+			return IRangeModel(model).minimum;
+		}
+		public function set minimum(value:Number):void
+		{
+			IRangeModel(model).minimum = value;
+		}
+		
+		public function get maximum():Number
+		{
+			return IRangeModel(model).maximum;
+		}
+		public function set maximum(value:Number):void
+		{
+			IRangeModel(model).maximum = value;
+		}
+		
+		public function get stepSize():Number
+		{
+			return IRangeModel(model).stepSize;
+		}
+		public function set stepSize(value:Number):void
+		{
+			IRangeModel(model).stepSize = value;
+		}
+		
+		public function get snapInterval():Number
+		{
+			return IRangeModel(model).snapInterval;
+		}
+		public function set snapInterval(value:Number):void
+		{
+			IRangeModel(model).snapInterval = 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/Panel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Panel.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Panel.as
new file mode 100644
index 0000000..90b637e
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Panel.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.IPanelModel;
+
+	[Event(name="close", type="org.apache.flex.events.Event")]
+	
+	public class Panel extends Container
+	{
+		public function Panel()
+		{
+			super();
+		}
+		
+		public function get title():String
+		{
+			return IPanelModel(model).title;
+		}
+		public function set title(value:String):void
+		{
+			IPanelModel(model).title = value;
+		}
+		
+		public function get htmlTitle():String
+		{
+			return IPanelModel(model).htmlTitle;
+		}
+		public function set htmlTitle(value:String):void
+		{
+			IPanelModel(model).htmlTitle = value;
+		}
+		
+		public function get showCloseButton():Boolean
+		{
+			return IPanelModel(model).showCloseButton;
+		}
+		public function set showCloseButton(value:Boolean):void
+		{
+			IPanelModel(model).showCloseButton = value;
+		}
+		
+		private var _controlBar:Array;
+		public function get controlBar():Array
+		{
+			return _controlBar;
+		}
+		public function set controlBar(value:Array):void
+		{
+			_controlBar = 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/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/RadioButton.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/RadioButton.as
new file mode 100644
index 0000000..8f31816
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/RadioButton.as
@@ -0,0 +1,142 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.DisplayObject;
+	import flash.events.MouseEvent;
+	import flash.utils.Dictionary;
+	
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IValueToggleButtonModel;
+	import org.apache.flex.core.UIButtonBase;
+	import org.apache.flex.events.Event;
+	
+	[Event(name="change", type="org.apache.flex.events.Event")]
+
+	public class RadioButton extends UIButtonBase implements IStrand
+	{
+		public function RadioButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+		{
+			super(upState, overState, downState, hitTestState);
+			
+			addEventListener(MouseEvent.CLICK, internalMouseHandler);
+		}
+		
+		protected static var dict:Dictionary = new Dictionary(true);
+		
+		private var _groupName:String;
+		
+		public function get groupName() : String
+		{
+			return IValueToggleButtonModel(model).groupName;
+		}
+		
+		public function set groupName(value:String) : void
+		{
+			IValueToggleButtonModel(model).groupName = value;
+		}
+		
+		public function get text():String
+		{
+			return IValueToggleButtonModel(model).text;
+		}
+		public function set text(value:String):void
+		{
+			IValueToggleButtonModel(model).text = value;
+		}
+		
+		public function get selected():Boolean
+		{
+			return IValueToggleButtonModel(model).selected;
+		}
+		
+		public function set selected(selValue:Boolean):void
+		{
+			IValueToggleButtonModel(model).selected = selValue;
+			
+			// if this button is being selected, its value should become
+			// its group's selectedValue
+			if( selValue ) {
+				for each(var rb:RadioButton in dict)
+				{
+					if( rb.groupName == groupName )
+					{
+						rb.selectedValue = value;
+					}
+				}
+			}
+		}
+		
+		public function get value():Object
+		{
+			return IValueToggleButtonModel(model).value;
+		}
+		
+		public function set value(newValue:Object):void
+		{
+			IValueToggleButtonModel(model).value = newValue;
+		}
+		
+		public function get selectedValue():Object 
+		{
+			return IValueToggleButtonModel(model).selectedValue;
+		}
+		
+		public function set selectedValue(newValue:Object):void 
+		{
+			// a radio button is really selected when its value matches that of the group's value
+			IValueToggleButtonModel(model).selected = (newValue == value);
+			IValueToggleButtonModel(model).selectedValue = newValue;
+		}
+				
+		override public function addedToParent():void
+		{
+            super.addedToParent();
+
+            // if this instance is selected, set the local selectedValue to
+			// this instance's value
+			if( selected ) selectedValue = value;
+			
+			else {
+			
+				// make sure this button's selectedValue is set from its group's selectedValue
+				// to keep it in sync with the rest of the buttons in its group.
+				for each(var rb:RadioButton in dict)
+				{
+					if( rb.groupName == groupName )
+					{
+						selectedValue = rb.selectedValue;
+						break;
+					}
+				}
+			}
+			
+			dict[this] = this;
+		}
+				
+		private function internalMouseHandler(event:Event) : void
+		{
+			// prevent radiobutton from being turned off by a click
+			if( !selected ) {
+				selected = !selected;
+				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/SimpleAlert.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/SimpleAlert.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/SimpleAlert.as
new file mode 100644
index 0000000..cf4cc8c
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/SimpleAlert.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{	
+	import org.apache.flex.core.IAlertModel;
+	import org.apache.flex.core.IPopUp;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	
+	[Event(name="close", type="org.apache.flex.events.Event")]
+	
+	public class SimpleAlert extends UIBase implements IPopUp
+	{
+		public function SimpleAlert()
+		{
+			super();
+			
+			className = "SimpleAlert";
+		}
+		
+		private function get message():String
+		{
+			return IAlertModel(model).message;
+		}
+		private function set message(value:String):void
+		{
+			IAlertModel(model).message = value;
+		}
+		
+		private function get htmlMessage():String
+		{
+			return IAlertModel(model).htmlMessage;
+		}
+		private function set htmlMessage(value:String):void
+		{
+			IAlertModel(model).htmlMessage = value;
+		}
+		
+		public function show(parent:Object) : void
+		{
+			parent.addElement(this);
+		}
+		
+		static public function show(message:String, parent:Object):SimpleAlert
+		{
+			var alert:SimpleAlert = new SimpleAlert();
+			alert.message = message;
+			alert.show(parent);
+			
+			return alert;
+		}
+		
+	}
+}
\ 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/SimpleList.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/SimpleList.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/SimpleList.as
new file mode 100644
index 0000000..9f19a72
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/SimpleList.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.staticControls
+{
+	public class SimpleList extends List
+	{
+		public function SimpleList()
+		{
+			super();
+		}
+	}
+}
\ 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/Slider.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Slider.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Slider.as
new file mode 100644
index 0000000..47a0db5
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Slider.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
+{
+	import org.apache.flex.core.IRangeModel;
+	import org.apache.flex.core.UIBase;
+	
+	[Event(name="valueChanged", type="org.apache.flex.events.Event")]
+	
+	public class Slider extends UIBase
+	{
+		public function Slider()
+		{
+			super();
+			
+			className = "Slider";
+			
+			IRangeModel(model).value = 0;
+			IRangeModel(model).minimum = 0;
+			IRangeModel(model).maximum = 100;
+			IRangeModel(model).stepSize = 1;
+			IRangeModel(model).snapInterval = 1;
+		}
+		
+		public function get value():Number
+		{
+			return IRangeModel(model).value;
+		}
+		public function set value(newValue:Number):void
+		{
+			IRangeModel(model).value = newValue;
+		}
+		
+		public function get minimum():Number
+		{
+			return IRangeModel(model).minimum;
+		}
+		public function set minimum(value:Number):void
+		{
+			IRangeModel(model).minimum = value;
+		}
+		
+		public function get maximum():Number
+		{
+			return IRangeModel(model).maximum;
+		}
+		public function set maximum(value:Number):void
+		{
+			IRangeModel(model).maximum = value;
+		}
+		
+		public function get snapInterval():Number
+		{
+			return IRangeModel(model).snapInterval;
+		}
+		public function set snapInterval(value:Number):void
+		{
+			IRangeModel(model).snapInterval = 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/Spinner.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Spinner.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Spinner.as
new file mode 100644
index 0000000..d0eb443
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Spinner.as
@@ -0,0 +1,81 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.IRangeModel;
+	import org.apache.flex.core.UIBase;
+	
+	[Event(name="valueChanged", type="org.apache.flex.events.Event")]
+	
+	public class Spinner extends UIBase
+	{
+		public function Spinner()
+		{
+			super();
+			
+			className = "Spinner";
+		}
+		
+		public function get value():Number
+		{
+			return IRangeModel(model).value;
+		}
+		public function set value(newValue:Number):void
+		{
+			IRangeModel(model).value = newValue;
+		}
+		
+		public function get minimum():Number
+		{
+			return IRangeModel(model).minimum;
+		}
+		public function set minimum(value:Number):void
+		{
+			IRangeModel(model).minimum = value;
+		}
+		
+		public function get maximum():Number
+		{
+			return IRangeModel(model).maximum;
+		}
+		public function set maximum(value:Number):void
+		{
+			IRangeModel(model).maximum = value;
+		}
+		
+		public function get snapInterval():Number
+		{
+			return IRangeModel(model).snapInterval;
+		}
+		public function set snapInterval(value:Number):void
+		{
+			IRangeModel(model).snapInterval = value;
+		}
+		
+		public function get stepSize():Number
+		{
+			return IRangeModel(model).stepSize;
+		}
+		public function set stepSize(value:Number):void
+		{
+			IRangeModel(model).stepSize = 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/TextArea.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextArea.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextArea.as
new file mode 100644
index 0000000..b8bb750
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextArea.as
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.ITextModel;
+	import org.apache.flex.core.UIBase;
+	
+	public class TextArea extends UIBase
+	{
+		public function TextArea()
+		{
+			super();
+		}
+		
+		public function get text():String
+		{
+			return ITextModel(model).text;
+		}
+		public function set text(value:String):void
+		{
+			ITextModel(model).text = value;
+		}
+		
+		public function get html():String
+		{
+			return ITextModel(model).html;
+		}
+		public function set html(value:String):void
+		{
+			ITextModel(model).html = 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/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as
new file mode 100644
index 0000000..425af1e
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.DisplayObject;
+	
+	import org.apache.flex.core.ITextModel;
+	
+	public class TextButton extends Button
+	{
+		public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+		{
+			super(upState, overState, downState, hitTestState);
+		}
+		
+		public function get text():String
+		{
+			return ITextModel(model).text;
+		}
+		public function set text(value:String):void
+		{
+			ITextModel(model).text = value;
+		}
+		
+		public function get html():String
+		{
+			return ITextModel(model).html;
+		}
+		public function set html(value:String):void
+		{
+			ITextModel(model).html = 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/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextInput.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextInput.as
new file mode 100644
index 0000000..c048564
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextInput.as
@@ -0,0 +1,49 @@
+//
+//  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
+{
+	import org.apache.flex.core.ITextModel;
+	import org.apache.flex.core.UIBase;
+	
+	public class TextInput extends UIBase
+	{
+		public function TextInput()
+		{
+			super();
+		}
+		
+		public function get text():String
+		{
+			return ITextModel(model).text;
+		}
+		public function set text(value:String):void
+		{
+			ITextModel(model).text = value;
+		}
+		
+		public function get html():String
+		{
+			return ITextModel(model).html;
+		}
+		public function set html(value:String):void
+		{
+			ITextModel(model).html = 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/TitleBar.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TitleBar.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TitleBar.as
new file mode 100644
index 0000000..cf1e584
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TitleBar.as
@@ -0,0 +1,173 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.Shape;
+	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadLayout;
+	import org.apache.flex.core.IChrome;
+	import org.apache.flex.core.ITitleBarModel;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.html.staticControls.Label;
+	
+	public class TitleBar extends Container implements IChrome
+	{
+		public function TitleBar()
+		{
+			super();
+			
+			className = "TitleBar";
+		}
+		
+		public function get title():String
+		{
+			return ITitleBarModel(model).title;
+		}
+		public function set title(value:String):void
+		{
+			ITitleBarModel(model).title = value;
+		}
+		
+		public function get htmlTitle():String
+		{
+			return ITitleBarModel(model).htmlTitle;
+		}
+		public function set htmlTitle(value:String):void
+		{
+			ITitleBarModel(model).htmlTitle = value;
+		}
+		
+		public function get showCloseButton():Boolean
+		{
+			return ITitleBarModel(model).showCloseButton;
+		}
+		public function set showCloseButton(value:Boolean):void
+		{
+			ITitleBarModel(model).showCloseButton = value;
+		}
+		
+		private var _titleLabel:Label;
+		public function get titleLabel():Label
+		{
+			return _titleLabel;
+		}
+		
+		private var _closeButton:Button;
+		public function get closeButton():Button
+		{
+			return closeButton;
+		}
+		
+		override public function addedToParent():void
+		{
+			super.addedToParent();
+			
+			if( getBeadByType(IBeadLayout) == null )
+				addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadLayout")) as IBead);
+			
+			// add the label for the title and the button for the close
+			_titleLabel = createTitle();
+			_titleLabel.className = className;
+			_titleLabel.id = "title";
+			addElement(_titleLabel);
+			
+			_closeButton = createCloseButton();
+			_closeButton.className = className;
+			_closeButton.id = "closeButton";
+			addElement(_closeButton);
+			
+			childrenAdded();
+            
+            model.addEventListener('titleChange',handlePropertyChange);
+            model.addEventListener('htmlTitleChange',handlePropertyChange);
+            model.addEventListener('showCloseButtonChange',handlePropertyChange);
+
+			// dispatch this event to force any beads to update
+			dispatchEvent(new Event("widthChanged"));
+		}
+		
+		private function handlePropertyChange(event:Event):void
+		{
+			if( event.type == "showCloseButtonChange" ) {
+				if( closeButton ) closeButton.visible = showCloseButton;
+			}
+			else if( event.type == "titleChange" ) {
+				if( titleLabel ) {
+					titleLabel.text = title;
+				}
+			}
+			else if( event.type == "htmlTitleChange" ) {
+				if( titleLabel ) {
+					titleLabel.html = htmlTitle;
+				}
+			}
+			
+			dispatchEvent(new Event("widthChanged"));
+		}
+		
+		protected function createTitle() : Label
+		{
+			var label:Label = new Label();
+			label.text = title;
+			return label;
+		}
+		
+		protected function createCloseButton() : Button
+		{
+			var upState:Shape = new Shape();
+			upState.graphics.clear();
+			upState.graphics.beginFill(0xCCCCCC);
+			upState.graphics.drawRect(0,0,11,11);
+			upState.graphics.endFill();
+			
+			var overState:Shape = new Shape();
+			overState.graphics.clear();
+			overState.graphics.beginFill(0x999999);
+			overState.graphics.drawRect(0,0,11,11);
+			overState.graphics.endFill();
+			
+			var downState:Shape = new Shape();
+			downState.graphics.clear();
+			downState.graphics.beginFill(0x666666);
+			downState.graphics.drawRect(0, 0, 11, 11);
+			downState.graphics.endFill();
+			
+			var hitArea:Shape = new Shape();
+			hitArea.graphics.clear();
+			hitArea.graphics.beginFill(0x000000);
+			hitArea.graphics.drawRect(0, 0, 11, 11);
+			hitArea.graphics.endFill();
+			
+			var button:Button = new Button(upState, overState, downState, hitArea);
+			button.visible = showCloseButton;
+			
+			button.addEventListener('click',closeButtonHandler);
+			
+			return button;
+		}
+		
+		private function closeButtonHandler(event:org.apache.flex.events.Event) : void
+		{
+			var newEvent:Event = new Event('close',true);
+			dispatchEvent(newEvent);
+		}
+	}
+}
\ 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/accessories/NumericOnlyTextInputBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/accessories/NumericOnlyTextInputBead.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/accessories/NumericOnlyTextInputBead.as
new file mode 100644
index 0000000..b92a317
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/accessories/NumericOnlyTextInputBead.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.accessories
+{
+	import flash.events.TextEvent;
+	
+	import org.apache.flex.core.CSSTextField;
+	import org.apache.flex.core.IBead;
+	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.ITextFieldView;
+	
+	public class NumericOnlyTextInputBead implements IBead
+	{
+		public function NumericOnlyTextInputBead()
+		{
+		}
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			IEventDispatcher(value).addEventListener("viewChanged",viewChangeHandler);
+		}
+		
+		private var _decimalSeparator:String = ".";
+		public function get decimalSeparator():String
+		{
+			return _decimalSeparator;
+		}
+		public function set decimalSeparator(value:String):void
+		{
+			if (_decimalSeparator != value) {
+				_decimalSeparator = value;
+			}
+		}
+		
+		private function viewChangeHandler(event:Event):void
+		{			
+			// get the ITextFieldView bead, which is required for this bead to work
+			var textView:ITextFieldView = _strand.getBeadByType(ITextFieldView) as ITextFieldView;
+			if (textView) {
+				var textField:CSSTextField = textView.textField;
+				textField.restrict = "0-9" + decimalSeparator;
+				
+				// listen for changes to this textField and prevent non-numeric values, such
+				// as 34.09.94
+				textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput);
+			}
+			else {
+				throw new Error("NumericOnlyTextInputBead requires strand to have an ITextFieldView bead");
+			}
+		}
+		
+		private function handleTextInput(event:TextEvent):void
+		{
+			var insert:String = event.text;
+			var caretIndex:int = (event.target as CSSTextField).caretIndex;
+			var current:String = (event.target as CSSTextField).text;
+			var value:String = current.substring(0,caretIndex) + insert + current.substr(caretIndex);
+			var n:Number = Number(value);
+			if (isNaN(n)) event.preventDefault();
+		}
+	}
+}
\ 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/accessories/PasswordInputBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/accessories/PasswordInputBead.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/accessories/PasswordInputBead.as
new file mode 100644
index 0000000..9280317
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/accessories/PasswordInputBead.as
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.accessories
+{
+	import org.apache.flex.core.CSSTextField;
+	import org.apache.flex.core.IBead;
+	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.ITextFieldView;
+	
+	public class PasswordInputBead implements IBead
+	{
+		public function PasswordInputBead()
+		{
+		}
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			IEventDispatcher(value).addEventListener("viewChanged",viewChangeHandler);
+		}
+		
+		private function viewChangeHandler(event:Event):void
+		{			
+			// get the ITextFieldView bead, which is required for this bead to work
+			var textView:ITextFieldView = _strand.getBeadByType(ITextFieldView) as ITextFieldView;
+			if (textView) {
+				var textField:CSSTextField = textView.textField;
+				textField.displayAsPassword = true;
+			}
+			else {
+				throw new Error("PasswordInputBead requires strand to have a TextInputView bead");
+			}
+		}
+	}
+}
\ 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/accessories/TextPromptBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/accessories/TextPromptBead.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/accessories/TextPromptBead.as
new file mode 100644
index 0000000..d27dafa
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/accessories/TextPromptBead.as
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.accessories
+{
+	import flash.text.TextFieldType;
+	
+	import org.apache.flex.core.CSSTextField;
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	public class TextPromptBead implements IBead
+	{
+		public function TextPromptBead()
+		{
+		}
+		
+		private var _prompt:String;
+		public function get prompt():String
+		{
+			return _prompt;
+		}
+		public function set prompt(value:String):void
+		{
+			_prompt = value;
+		}
+		
+		private var _strand:IStrand;
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			// listen for changes in text to hide or show the prompt
+			var model:Object = UIBase(_strand).model;
+			if (!model.hasOwnProperty("text")) {
+				throw new Error("Model requires a text property when used with TextPromptBead");
+			}
+			IEventDispatcher(model).addEventListener("textChange",handleTextChange);
+			
+			// create a TextField that displays the prompt - it shows
+			// and hides based on the model's content
+			promptField = new CSSTextField();
+			promptField.selectable = false;
+			promptField.type = TextFieldType.DYNAMIC;
+			promptField.mouseEnabled = false;
+			promptField.multiline = false;
+			promptField.wordWrap = false;
+			promptField.textColor = 0xBBBBBB;
+			
+			// trigger the event handler to display if needed
+			handleTextChange(null);
+		}
+		
+		private var promptField:CSSTextField;
+		private var promptAdded:Boolean;
+		
+		private function handleTextChange( event:Event ):void
+		{	
+			// see what the model currently has to determine if the prompt should be
+			// displayed or not.
+			var model:Object = UIBase(_strand).model;
+			
+			if (model.text != null && model.text.length > 0 ) {
+				if (promptAdded) UIBase(_strand).removeChild(promptField);
+				promptAdded = false;
+			}
+			else {
+				if (!promptAdded) UIBase(_strand).addChild(promptField);
+				promptField.text = prompt;
+				promptAdded = true;
+			}
+		}
+	}
+}
\ No newline at end of file


Mime
View raw message