You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2018/05/17 04:48:33 UTC

[GitHub] alinakazi closed pull request #218: Alert.as added

alinakazi closed pull request #218: Alert.as added
URL: https://github.com/apache/royale-asjs/pull/218
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/build.xml b/build.xml
index d175c9c85..0d3ca8102 100644
--- a/build.xml
+++ b/build.xml
@@ -556,6 +556,7 @@ limitations under the License.
     
     <target name="super-clean" depends="thirdparty-clean,clean" description="Cleans everything including thirdparty downloads.">
         <delete dir="${basedir}/mustella/tests/basicTests/bin"/>
+        <delete dir="${basedir}/mustella/tests/mxtests/basicTests/bin"/>
         <delete dir="${basedir}/bin" failonerror="false">
             <include name="**"/>
             <exclude name=".gitignore"/>
@@ -1588,16 +1589,17 @@ limitations under the License.
 
     <target name="mxtests-run-js" >
         <property name="profile_arg" value="dummy=false" />
-        <echo>url=file://${basedir}/mustella/tests/mxTests/bin/js-debug/index.html</echo>
+        <echo>url=file://${basedir}/mustella/tests/mxtests/bin/js-debug/index.html</echo>
         <java classname="marmotinni.MarmotinniRunner" classpath="${basedir}/mustella/target/classes" fork="true" failonerror="yes">
             <!--<arg value="browser=chrome" />-->
-            <arg value="url=file://${basedir}/mustella/tests/mxTests/basicTests/bin/js-debug/index.html" />
-            <arg value="script=${basedir}/mustella/tests/mxTests/basicTests/halo/scripts/ButtonTestScript.mxml" />
-            <arg value="script=${basedir}/mustella/tests/mxTests/basicTests/halo/scripts/CheckBoxTestScript.mxml" />
-            <arg value="script=${basedir}/mustella/tests/mxTests/basicTests/halo/scripts/RadioButtonTestScript.mxml" />
-            <arg value="script=${basedir}/mustella/tests/mxTests/basicTests/halo/scripts/TextInputTestScript.mxml" />
-            <arg value="script=${basedir}/mustella/tests/mxTests/basicTests/halo/scripts/TextAreaTestScript.mxml" />
-            <arg value="script=${basedir}/mustella/tests/mxTests/basicTests/halo/scripts/ComboBoxTestScript.mxml" />
+            <arg value="url=file://${basedir}/mustella/tests/mxtests/basicTests/bin/js-debug/index.html" />
+            <arg value="script=${basedir}/mustella/tests/mxtests/basicTests/halo/scripts/ButtonTestScript.mxml" />
+            <arg value="script=${basedir}/mustella/tests/mxtests/basicTests/halo/scripts/CheckBoxTestScript.mxml" />
+            <arg value="script=${basedir}/mustella/tests/mxtests/basicTests/halo/scripts/RadioButtonTestScript.mxml" />
+            <arg value="script=${basedir}/mustella/tests/mxtests/basicTests/halo/scripts/TextInputTestScript.mxml" />
+            <arg value="script=${basedir}/mustella/tests/mxtests/basicTests/halo/scripts/TextAreaTestScript.mxml" />
+            <arg value="script=${basedir}/mustella/tests/mxtests/basicTests/halo/scripts/ComboBoxTestScript.mxml" />
+            <arg value="script=${basedir}/mustella/tests/mxtests/basicTests/halo/scripts/ListAndDataGridTestScript.mxml" />
             <arg value="showSteps=true" />
             <arg value="showScripts=true" />
             <arg value="${profile_arg}" />
@@ -1666,10 +1668,10 @@ limitations under the License.
         <echo message="ROYALE_HOME: ${ROYALE_HOME}"/>
         <echo message="ROYALE_COMPILER_HOME: ${ROYALE_COMPILER_HOME}"/>
         <echo message="GOOG_HOME: ${GOOG_HOME}"/>
-        <delete dir="${basedir}/mustella/tests/mxTests/bin" failonerror="false" />
+        <delete dir="${basedir}/mustella/tests/mxtests/basicTests/bin" failonerror="false" />
         <mxmlc fork="true" debug="true"
             closure-lib="${env.GOOG_HOME}"
-            file="${basedir}/mustella/tests/mxTests/BasicTestsApp.mxml">
+            file="${basedir}/mustella/tests/mxtests/BasicTestsApp.mxml">
             <jvmarg line="${mxmlc.jvm.args}"/>
             <targets>JSRoyale</targets>
             <library-path dir="${ROYALE_HOME}" append="true">
diff --git a/frameworks/build.xml b/frameworks/build.xml
index 384aca65d..1511c88e1 100644
--- a/frameworks/build.xml
+++ b/frameworks/build.xml
@@ -139,6 +139,7 @@
 		<antcall target="Express"/>
         <antcall target="RoyaleSite"/>
         <antcall target="MXRoyale"/>
+        <antcall target="SparkRoyale"/>
         <antcall target="Jewel"/>
         <antcall target="JewelTheme"/>
     </target>
@@ -196,6 +197,7 @@
         <ant dir="${basedir}/projects/TLF" target="clean"/>
         <ant dir="${basedir}/projects/RoyaleSite" target="clean"/>
         <ant dir="${basedir}/projects/MXRoyale" target="clean"/>
+        <ant dir="${basedir}/projects/SparkRoyale" target="clean"/>
         <ant dir="${basedir}/projects/Jewel" target="clean"/>
         <ant dir="${basedir}/themes/JewelTheme" target="clean"/>
         <ant dir="${basedir}/fontsrc" target="clean"/>
@@ -340,6 +342,9 @@
     <target name="MXRoyale" description="Clean build of MXRoyale.swc">
         <ant dir="${basedir}/projects/MXRoyale"/>
     </target>
+    <target name="SparkRoyale" description="Clean build of SparkRoyale.swc">
+        <ant dir="${basedir}/projects/SparkRoyale"/>
+    </target>
     <target name="Jewel" description="Clean build of Jewel.swc">
         <ant dir="${basedir}/projects/Jewel"/>
     </target>
diff --git a/frameworks/js/projects/SparkRoyaleJS/build.xml b/frameworks/js/projects/SparkRoyaleJS/build.xml
new file mode 100644
index 000000000..60a3a44bb
--- /dev/null
+++ b/frameworks/js/projects/SparkRoyaleJS/build.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="SparkRoyaleJS" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../../.."/>
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    <echo file="${basedir}/${target.name}.properties">target.name.nojs=${ant.project.name}</echo>
+    <replaceregexp file="${basedir}/${target.name}.properties" match="(.*)JS$" replace="\1" flags="m" />
+    <property file="${basedir}/${target.name}.properties"/>
+    <delete file="${basedir}/${target.name}.properties"/>
+    
+    <target name="main" depends="clean,check-compiler,compile" description="Full build of ${ant.project.name}.swc">
+    </target>
+    
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${ROYALE_HOME}/frameworks/js/libs">
+                <include name="${target.name}"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+    </target>
+    
+    <target name="compile" depends="check-compiler">
+        <echo message="Cross-compiling ${target.name}"/>
+        <echo message="ROYALE_COMPILER_HOME: ${ROYALE_COMPILER_HOME}"/>
+        <mkdir dir="${basedir}/target/generated-sources/royale"/>
+        <java jar="${ROYALE_COMPILER_HOME}/lib/compc.jar" fork="true" >
+            <jvmarg value="-Xmx384m" />
+            <jvmarg value="-Dsun.io.useCanonCaches=false" />
+            <jvmarg value="-Droyalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+royalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="-compiler.define+=GOOG::DEBUG,goog.DEBUG" />
+            <arg value="-compiler.strict-xml=true" />
+            <arg value="-compiler.targets=SWF,JSRoyale" />
+            <arg value="-output=${basedir}/target/${target.name}" />
+            <arg value="-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
+            <arg value="-load-config+=${basedir}/src/main/config/compile-js-config.xml" />
+        </java>
+        <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/js/libs/${target.name}" />
+    </target>
+    
+    <target name="copy-js" >
+        <mkdir dir="${ROYALE_HOME}/frameworks/js/generated-sources"/>
+        <copy todir="${ROYALE_HOME}/frameworks/js/generated-sources">
+            <fileset dir="${basedir}/target/generated-sources/royale">
+                <include name="**/**" />
+            </fileset>
+        </copy>
+    </target>
+    
+    <target name="check-compiler" depends="check-compiler-home, check-transpiler-home">
+        <path id="lib.path">
+            <fileset dir="${ROYALE_COMPILER_HOME}/lib" includes="compiler-royaleTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-compiler-home" unless="ROYALE_SWF_COMPILER_HOME"
+        description="Check ROYALE_SWF_COMPILER_HOME is a directory.">
+        
+        <echo message="ROYALE_SWF_COMPILER_HOME is ${env.ROYALE_SWF_COMPILER_HOME}"/>
+        
+        <available file="${env.ROYALE_SWF_COMPILER_HOME}/lib/compiler-mxmlc.jar"
+        type="file"
+        property="ROYALE_SWF_COMPILER_HOME"
+        value="${env.ROYALE_SWF_COMPILER_HOME}"/>
+        
+        <available file="${ROYALE_HOME}/../royale-compiler/compiler/lib/compiler-mxmlc.jar"
+        type="file"
+        property="ROYALE_SWF_COMPILER_HOME"
+        value="${ROYALE_HOME}/../royale-compiler/compiler"/>
+        
+        <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or a Royale SDK folder"
+        unless="ROYALE_SWF_COMPILER_HOME"/>
+    </target>
+    
+    <target name="check-transpiler-home" unless="ROYALE_COMPILER_HOME"
+        description="Check ROYALE_SWF_COMPILER_HOME is a directory.">
+        
+        <echo message="ROYALE_COMPILER_HOME is ${env.ROYALE_COMPILER_HOME}"/>
+        
+        <available file="${env.ROYALE_COMPILER_HOME}/lib/jsc.jar"
+        type="file"
+        property="ROYALE_COMPILER_HOME"
+        value="${env.ROYALE_COMPILER_HOME}"/>
+        
+        <available file="${ROYALE_HOME}/../royale-compiler/compiler-jx/lib/jsc.jar"
+        type="file"
+        property="ROYALE_COMPILER_HOME"
+        value="${ROYALE_HOME}/../royale-compiler/compiler-jx"/>
+        
+        <fail message="ROYALE_COMPILER_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in royale-compiler repo or the js folder of a Royale SDK"
+        unless="ROYALE_COMPILER_HOME"/>
+    </target>
+    
+</project>
diff --git a/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml
new file mode 100644
index 000000000..b17c81423
--- /dev/null
+++ b/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml
@@ -0,0 +1,106 @@
+<!--
+
+  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.
+
+-->
+<royale-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <!-- build both SWF and JS. -->
+        <targets>
+            <target>SWF</target>
+            <target>JSRoyale</target>
+        </targets>
+        <strict-xml>true</strict-xml>
+
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.royale.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.royale.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <allow-subclass-overrides>true</allow-subclass-overrides>
+
+        <define>
+            <name>COMPILE::SWF</name>
+            <value>false</value>
+        </define>
+        <define>
+            <name>COMPILE::JS</name>
+            <value>true</value>
+        </define>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <!-- overwrite the default library-path setting -->
+        <library-path>
+            <path-element>../../../../../../../js/libs/GCL.swc</path-element>
+            <!-- asjscompc won't 'link' these classes in, but will list their requires
+             if these swcs are on the external-library-path then their requires
+             will not be listed -->
+            <path-element>../../../../../libs/CoreJS.swc</path-element>
+            <path-element>../../../../../libs/BindingJS.swc</path-element>
+            <path-element>../../../../../libs/BasicJS.swc</path-element>
+            <path-element>../../../../../libs/EffectsJS.swc</path-element>
+            <path-element>../../../../../libs/ExpressJS.swc</path-element>
+            <path-element>../../../../../libs/GraphicsJS.swc</path-element>
+            <path-element>../../../../../libs/ChartsJS.swc</path-element>
+            <path-element>../../../../../libs/MXRoyaleJS.swc</path-element>
+        </library-path>
+        
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/royale/spark</uri>
+                <manifest>../../../../../../projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>../../../../../../projects/SparkRoyale/src/main/royale</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>defaults.css</name>
+        <path>../../../../../../projects/SparkRoyale/src/main/resources/defaults.css</path>
+    </include-file>
+    
+    <include-file>
+    </include-file>
+
+    <include-classes>
+        <class>SparkRoyaleClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/royale/spark</uri>
+    </include-namespaces>
+        
+
+</royale-config>
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBase.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBase.as
index 7703f8c23..0b629641b 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBase.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBase.as
@@ -65,7 +65,7 @@ package org.apache.royale.core
      *  @playerversion AIR 2.6
      *  @productversion Royale 0.0
      */
-	public class ContainerBase extends GroupBase implements IStrandPrivate
+	public class ContainerBase extends GroupBase implements IContainerBaseStrandChildrenHost
 	{
         /**
          *  Constructor.
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBaseStrandChildren.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBaseStrandChildren.as
index ef4f8bfcb..26db4b41f 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBaseStrandChildren.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBaseStrandChildren.as
@@ -40,16 +40,16 @@ package org.apache.royale.core
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
-		 * 	@royaleignorecoercion org.apache.royale.core.IStrandPrivate
+		 * 	@royaleignorecoercion org.apache.royale.core.IContainerBaseStrandChildrenHost
          */
 		public function ContainerBaseStrandChildren(owner:IParent)
 		{
 			super();
 			
-			this.owner = owner as IStrandPrivate;
+			this.owner = owner as IContainerBaseStrandChildrenHost;
 		}
 		
-		public var owner:IStrandPrivate;
+		public var owner:IContainerBaseStrandChildrenHost;
 		
 		/**
 		 *  @private
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/DataContainerBase.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/DataContainerBase.as
index c2ee3a64c..06440f2ff 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/DataContainerBase.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/DataContainerBase.as
@@ -24,7 +24,6 @@ package org.apache.royale.core
 	import org.apache.royale.events.ItemAddedEvent;
 	import org.apache.royale.events.ItemRemovedEvent;
 	import org.apache.royale.html.supportClasses.DataItemRenderer;
-	import org.apache.royale.utils.loadBeadFromValuesManager;
 	
 	/**
 	 *  Indicates that the initialization of the list is complete.
@@ -45,7 +44,7 @@ package org.apache.royale.core
      *  @playerversion AIR 2.6
      *  @productversion Royale 0.0
      */
-	public class DataContainerBase extends ContainerBase implements IItemRendererParent, IList
+	public class DataContainerBase extends ContainerBase
 	{
         /**
          *  Constructor.
@@ -78,13 +77,7 @@ package org.apache.royale.core
 			}
 			
 			super.addedToParent();
-			
-			// Even though super.addedToParent dispatched "beadsAdded", DataContainer still needs its data mapper
-			// and item factory beads. These beads are added after super.addedToParent is called in case substitutions
-			// were made; these are just defaults extracted from CSS.
-			loadBeadFromValuesManager(IDataProviderItemRendererMapper, "iDataProviderItemRendererMapper", this);
-			loadBeadFromValuesManager(IItemRendererClassFactory, "iItemRendererClassFactory", this);
-			
+						
 			dispatchEvent(new Event("initComplete"));
 		}
 		
@@ -100,18 +93,18 @@ package org.apache.royale.core
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.0
 		 * 	@royaleignorecoercion org.apache.royale.html.beads.IListView
-		 */
 		public function get dataGroup():IItemRendererParent
 		{
 			// The JS-side's view.dataGroup is actually this instance of DataContainerBase
 			return (view as IListView).dataGroup;
 		}
+		 */
 		
 		/*
 		* IItemRendererProvider
 		*/
 		
-		private var _itemRenderer:IFactory;
+		private var _itemRenderer:IFactory = null;
 		
 		/**
 		 *  The class or factory used to display each item.
@@ -129,33 +122,7 @@ package org.apache.royale.core
 		{
 			_itemRenderer = value;
 		}
-		
-		/**
-		 * Returns whether or not the itemRenderer property has been set.
-		 *
-		 *  @see org.apache.royale.core.IItemRendererProvider
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.0
-		 */
-		public function get hasItemRenderer():Boolean
-		{
-			var result:Boolean = false;
-			
-			COMPILE::SWF {
-				result = _itemRenderer != null;
-			}
 				
-				COMPILE::JS {
-					var test:* = _itemRenderer;
-					result = _itemRenderer !== null && test !== undefined;
-				}
-				
-				return result;
-		}
-		
 		/*
 		* IItemRendererParent
 		*/
@@ -168,12 +135,12 @@ package org.apache.royale.core
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.8
-		 */
 		public function addItemRenderer(renderer:IItemRenderer, dispatchAdded:Boolean):void
 		{
 			addElement(renderer, dispatchAdded);
 			dispatchItemAdded(renderer);
 		}
+		 */
 		
 		/**
 		 * @copy org.apache.royale.core.IItemRendererParent#addItemRendererAt()
@@ -183,7 +150,6 @@ package org.apache.royale.core
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.9
-		 */
 		public function addItemRendererAt(renderer:IItemRenderer, index:int):void
 		{
 			addElementAt(renderer, index, true);
@@ -197,6 +163,7 @@ package org.apache.royale.core
 			
 			dispatchEvent(newEvent);
 		}
+		 */
 		/**
 		 * @copy org.apache.royale.core.IItemRendererParent#removeItemRenderer()
 		 * @private
@@ -205,7 +172,6 @@ package org.apache.royale.core
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.8
-		 */
 		public function removeItemRenderer(renderer:IItemRenderer):void
 		{
 			removeElement(renderer);
@@ -215,6 +181,7 @@ package org.apache.royale.core
 			
 			dispatchEvent(newEvent);
 		}
+		 */
 		
 		/**
 		 * @copy org.apache.royale.core.IItemRendererParent#removeAllItemRenderers()
@@ -224,7 +191,6 @@ package org.apache.royale.core
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.8
-		 */
 		public function removeAllItemRenderers():void
 		{
 			while (numElements > 0) {
@@ -232,6 +198,7 @@ package org.apache.royale.core
 				removeElement(child);
 			}
 		}
+		 */
 		
 		/**
 		 *  @copy org.apache.royale.core.IItemRendererParent#getItemRendererForIndex()
@@ -241,12 +208,12 @@ package org.apache.royale.core
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.8
 		 * 	@royaleignorecoercion org.apache.royale.core.IItemRenderer
-		 */
 		public function getItemRendererForIndex(index:int):IItemRenderer
 		{
 			if (index < 0 || index >= numElements) return null;
 			return getElementAt(index) as IItemRenderer;
 		}
+		 */
 		
 		/**
 		 *  Refreshes the itemRenderers. Useful after a size change by the data group.
@@ -257,7 +224,6 @@ package org.apache.royale.core
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.8
 		 * 	@royaleignorecoercion org.apache.royale.html.supportClasses.DataItemRenderer
-		 */
 		public function updateAllItemRenderers():void
 		{
 			var n:Number = numElements;
@@ -270,6 +236,7 @@ package org.apache.royale.core
 				}
 			}
 		}
+		 */
 
     }
 }
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IListWithPresentationModel.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IDataGrid.as
similarity index 65%
rename from frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IListWithPresentationModel.as
rename to frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IDataGrid.as
index 3e24bfc9b..ccdcd5ef4 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IListWithPresentationModel.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IDataGrid.as
@@ -18,29 +18,21 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.core
 {
-	import org.apache.royale.core.IListPresentationModel;
 
     /**
-     *  The IListWithPresentationModel interface is implemented by any IList
-	 *  that supports a separate IListPresentationModel
+     *  The IDataGrid interface is implemented by any component that supports being
+	 *  a "DataGrid" which means its content is generated by a factory and whose
+	 *  children are item renderers (IItemRenderer).
      * 
      *  @langversion 3.0
      *  @playerversion Flash 10.2
      *  @playerversion AIR 2.6
      *  @productversion Royale 0.0
      */
-	public interface IListWithPresentationModel extends IList
+	public interface IDataGrid extends IParentIUIBase, IContainer, IStrandWithPresentationModel
 	{
-        /**
-         *  Returns the component within the list (maybe even the list shell itself)
-		 *  which will be the parent of each itemRenderer.
-         * 
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
-         */
-		function get presentationModel():IListPresentationModel;
-		
+        function get model():Object;
+        function set model(value:Object):void;
+        
 	}
 }
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IList.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IStrandWithPresentationModel.as
similarity index 69%
rename from frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IList.as
rename to frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IStrandWithPresentationModel.as
index f25d0363d..2d9be9596 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IList.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IStrandWithPresentationModel.as
@@ -18,31 +18,31 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.core
 {
-	import org.apache.royale.core.IItemRendererParent;
-	import org.apache.royale.core.IItemRendererProvider;
+	import org.apache.royale.core.IBead;
 
     /**
-     *  The IList interface is implemented by any component that supports being
-	 *  a "list" which means its content is generated by a factory and whose
-	 *  children are item renderers (IItemRenderer).
+     *  The IStrandWithPresentationModel interface is implemented by any IStrand
+	 *  that supports a separate bead that is a presentationModel.  A presentationModel
+     *  is a set of properties that act as parameters to the View as opposed to the
+     *  regular model that is the data to be displayed by the view.  A simple example
+     *  is the rowHeight of a vertical list.
      * 
      *  @langversion 3.0
      *  @playerversion Flash 10.2
      *  @playerversion AIR 2.6
      *  @productversion Royale 0.0
      */
-	public interface IList extends IItemRendererProvider
+	public interface IStrandWithPresentationModel
 	{
         /**
-         *  Returns the component within the list (maybe even the list shell itself)
-		 *  which will be the parent of each itemRenderer.
+         *  Returns the bead that holds the properties for the presentationModel.
          * 
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
          */
-		function get dataGroup():IItemRendererParent;
+		function get presentationModel():IBead;
 		
 	}
 }
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
index fc0b96f42..fc91affcf 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
@@ -171,7 +171,7 @@ package org.apache.royale.core
      *  @playerversion AIR 2.6
      *  @productversion Royale 0.0
      */
-	public class UIBase extends HTMLElementWrapper implements IStrandWithModel, IEventDispatcher, IParentIUIBase, IStyleableObject, ILayoutChild, IRoyaleElement
+	public class UIBase extends HTMLElementWrapper implements IStrandWithModelView, IEventDispatcher, IParentIUIBase, IStyleableObject, ILayoutChild, IRoyaleElement
 	{
         /**
          *  Constructor.
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DataContainer.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DataContainer.as
index 40e8d7580..e8d3f9f21 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DataContainer.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DataContainer.as
@@ -21,6 +21,7 @@ package org.apache.royale.html
 	import org.apache.royale.core.DataContainerBase;
 	
 	import org.apache.royale.core.ContainerBaseStrandChildren;
+    import org.apache.royale.core.IBead;
 	import org.apache.royale.core.IContentViewHost;
 	import org.apache.royale.core.IChild;
 	import org.apache.royale.core.IDataProviderItemRendererMapper;
@@ -29,8 +30,7 @@ package org.apache.royale.html
 	import org.apache.royale.core.IItemRenderer;
 	import org.apache.royale.core.IItemRendererParent;
 	import org.apache.royale.core.ILayoutView;
-	import org.apache.royale.core.IList;
-    import org.apache.royale.core.IListWithPresentationModel;
+    import org.apache.royale.core.IStrandWithPresentationModel;
 	import org.apache.royale.core.IListPresentationModel;
 	import org.apache.royale.core.IRollOverModel;
 	import org.apache.royale.core.IDataProviderModel;
@@ -74,7 +74,7 @@ package org.apache.royale.html
 	 *  @playerversion AIR 2.6
 	 *  @productversion Royale 0.0
 	 */
-	public class DataContainer extends DataContainerBase implements IListWithPresentationModel
+	public class DataContainer extends DataContainerBase implements IStrandWithPresentationModel
 	{
 		/**
 		 *  constructor.
@@ -143,7 +143,7 @@ package org.apache.royale.html
 		 *  @productversion Royale 0.9
 		 *  @royaleignorecoercion org.apache.royale.core.IListPresentationModel
 		 */
-		public function get presentationModel():IListPresentationModel
+		public function get presentationModel():IBead
 		{
 			var presModel:IListPresentationModel = getBeadByType(IListPresentationModel) as IListPresentationModel;
 			if (presModel == null) {
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DataGrid.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DataGrid.as
index 7cc59e42d..6075eaa22 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DataGrid.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DataGrid.as
@@ -18,15 +18,16 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.html
 {
+	import org.apache.royale.core.GroupBase;
 	import org.apache.royale.core.IBead;
+	import org.apache.royale.core.IChangePropagator;
+	import org.apache.royale.core.IDataGrid;
 	import org.apache.royale.core.IDataGridModel;
 	import org.apache.royale.core.IDataGridPresentationModel;
 	import org.apache.royale.core.UIBase;
-	import org.apache.royale.core.GroupBase;
 	import org.apache.royale.core.ValuesManager;
-	import org.apache.royale.html.beads.models.DataGridPresentationModel;
 	import org.apache.royale.events.Event;
-	import org.apache.royale.core.IChangePropagator;
+	import org.apache.royale.html.beads.models.DataGridPresentationModel;
 	import org.apache.royale.utils.loadBeadFromValuesManager;
 	
 	[Event(name="change", type="org.apache.royale.events.Event")]
@@ -45,7 +46,7 @@ package org.apache.royale.html
 	 *  @playerversion AIR 2.6
 	 *  @productversion Royale 0.0
 	 */
-	public class DataGrid extends GroupBase
+	public class DataGrid extends GroupBase implements IDataGrid
 	{
 		/**
 		 *  constructor.
@@ -146,7 +147,7 @@ package org.apache.royale.html
 		 *  @royaleignorecoercion org.apache.royale.core.IDataGridPresentationModel
 		 *  @royaleignorecoercion org.apache.royale.core.IBead
 		 */
-		public function get presentationModel():IDataGridPresentationModel
+		public function get presentationModel():IBead
 		{
 			if (_presentationModel == null) {
 				var c:Class = ValuesManager.valuesImpl.getValue(this, "iDataGridPresentationModel");
@@ -161,9 +162,9 @@ package org.apache.royale.html
 		/**
 		 * @royaleignorecoercion org.apache.royale.core.IDataGridPresentationModel
 		 */
-		public function set presentationModel(value:IDataGridPresentationModel):void
+		public function set presentationModel(value:IBead):void
 		{
-			_presentationModel = value;
+			_presentationModel = value as IDataGridPresentationModel;
 		}
 				
 		/**
@@ -173,14 +174,18 @@ package org.apache.royale.html
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.9
+		 *  @royaleignorecoercion org.apache.royale.core.IDataGridPresentationModel
 		 */
 		public function get rowHeight():Number
 		{
-			return presentationModel.rowHeight;
+			return (presentationModel as IDataGridPresentationModel).rowHeight;
 		}
+        /**
+         * @royaleignorecoercion org.apache.royale.core.IDataGridPresentationModel
+         */
 		public function set rowHeight(value:Number):void
 		{
-			presentationModel.rowHeight = value;
+			(presentationModel as IDataGridPresentationModel).rowHeight = value;
 		}
 		
 		override public function addedToParent():void
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/List.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/List.as
index a9e3b5073..8124a2874 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/List.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/List.as
@@ -18,6 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.html
 {
+	import org.apache.royale.core.IListPresentationModel;
 	import org.apache.royale.core.IRollOverModel;
 	import org.apache.royale.core.ISelectionModel;
 
@@ -131,14 +132,15 @@ package org.apache.royale.html
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.0
+         *  @royaleignorecoercion org.apache.royale.core.IListPresentationModel
 		 */
 		public function get rowHeight():Number
 		{
-			return presentationModel.rowHeight;
+			return (presentationModel as IListPresentationModel).rowHeight;
 		}
 		public function set rowHeight(value:Number):void
 		{
-			presentationModel.rowHeight = value;
+			(presentationModel as IListPresentationModel).rowHeight = value;
 		}
 
 		/**
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ContainerView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ContainerView.as
index f72ebd9dd..84c40e1f0 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ContainerView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ContainerView.as
@@ -23,7 +23,7 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IBead;
 	import org.apache.royale.core.IBeadLayout;
 	import org.apache.royale.core.IBeadView;
-    import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
+	import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
 	import org.apache.royale.core.IChild;
 	import org.apache.royale.core.IContainer;
 	import org.apache.royale.core.IContainerView;
@@ -37,9 +37,9 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IUIBase;
 	import org.apache.royale.core.IViewport;
 	import org.apache.royale.core.IViewportModel;
-    import org.apache.royale.core.layout.EdgeData;
 	import org.apache.royale.core.UIBase;
 	import org.apache.royale.core.ValuesManager;
+	import org.apache.royale.core.layout.EdgeData;
 	import org.apache.royale.events.Event;
 	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.geom.Rectangle;
@@ -219,6 +219,29 @@ package org.apache.royale.html.beads
 		{
             var host:ILayoutChild = this.host as ILayoutChild;
             var vm:IViewportModel = viewportModel;
+            COMPILE::SWF
+            {
+                // if earlier layouts set the size of the host
+                // then it won't reflect changes in content size
+                if (host is UIBase)
+                {
+                    var uiBase:UIBase = host as UIBase;
+                    if (host.isWidthSizedToContent())
+                    {
+                        if (uiBase.width != uiBase.$width)
+                        {
+                            host.setWidth(uiBase.$width, true);
+                        }
+                    }
+                    if (host.isHeightSizedToContent())
+                    {
+                        if (uiBase.height != uiBase.$height)
+                        {
+                            host.setHeight(uiBase.$height, true);
+                        }
+                    }                    
+                }
+            }
 			var hostWidth:Number = host.width;
 			var hostHeight:Number = host.height;
 
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataContainerView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataContainerView.as
index fc4ba3b3d..560daf131 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataContainerView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataContainerView.as
@@ -24,10 +24,11 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IBeadLayout;
 	import org.apache.royale.core.IBeadModel;
 	import org.apache.royale.core.IBeadView;
-	import org.apache.royale.core.IDataProviderModel;
+    import org.apache.royale.core.IDataProviderItemRendererMapper;
+    import org.apache.royale.core.IDataProviderModel;
 	import org.apache.royale.core.IItemRenderer;
+    import org.apache.royale.core.IItemRendererClassFactory;
 	import org.apache.royale.core.IItemRendererParent;
-	import org.apache.royale.core.IList;
 	import org.apache.royale.core.IParent;
 	import org.apache.royale.core.IParentIUIBase;
 	import org.apache.royale.core.ISelectableItemRenderer;
@@ -42,6 +43,7 @@ package org.apache.royale.html.beads
 	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.html.supportClasses.Border;
 	import org.apache.royale.html.supportClasses.DataGroup;
+	import org.apache.royale.utils.loadBeadFromValuesManager;
 
 	/**
 	 *  The DataContainerView provides the visual elements for the DataContainer.
@@ -52,7 +54,6 @@ package org.apache.royale.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion Royale 0.8
 	 */
-	COMPILE::JS
 	public class DataContainerView extends ContainerView implements IListView
 	{
 		public function DataContainerView()
@@ -73,9 +74,17 @@ package org.apache.royale.html.beads
 			_strand = value;
 			super.strand = value;
 			
+            // Even though super.addedToParent dispatched "beadsAdded", DataContainer still needs its data mapper
+            // and item factory beads. These beads are added after super.addedToParent is called in case substitutions
+            // were made; these are just defaults extracted from CSS.
+            loadBeadFromValuesManager(IDataProviderItemRendererMapper, "iDataProviderItemRendererMapper", value);
+            loadBeadFromValuesManager(IItemRendererClassFactory, "iItemRendererClassFactory", value);
+            
 			host.addEventListener("beadsAdded", beadsAddedHandler);
+            //host.addEventListener("itemsCreated", itemsCreatedHandler); in beadsAddedHandler
 		}
 		
+        
 		protected var dataModel:IDataProviderModel;
 		
 		/**
@@ -95,14 +104,7 @@ package org.apache.royale.html.beads
 			host.addEventListener("itemsCreated", itemsCreatedHandler);
 			dataModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
 		}
-		
-		/**
-		 * @private
-		 */
-		override protected function handleInitComplete(event:Event):void
-		{
-			super.handleInitComplete(event);
-		}
+        
 		
 		/**
 		 * @private
@@ -119,115 +121,23 @@ package org.apache.royale.html.beads
 		protected function dataProviderChangeHandler(event:Event):void
 		{
 			// trace("DataContainerView: dataProviderChangeHandler");
-			performLayout(event);
-		}
-	}
-	
-	COMPILE::SWF
-	public class DataContainerView extends ContainerView implements IListView
-	{
-		public function DataContainerView()
-		{
-			super();
-		}
-						
-		protected var dataModel:IDataProviderModel;
-		
-		/**
-		 * @private
-		 */
-		override public function get host():IUIBase
-		{
-			return _strand as IUIBase;
-		}
-		
-		/**
-		 *  @copy org.apache.royale.core.IBead#strand
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.8
-		 */
-		override public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			super.strand = value;
-			
-			host.addEventListener("beadsAdded", beadsAddedHandler);
-			host.addEventListener("itemsCreated", itemsCreatedHandler);
-		}
-		
-		override protected function completeSetup():void
-		{
-			super.completeSetup();
-			
-			// list is not interested in UI children, it wants to know when new items
-			// have been added or the dataProvider has changed.
-//			host.removeEventListener("childrenAdded", childrenChangedHandler);
-//			host.removeEventListener("childrenAdded", performLayout);
-		}
-		
-		protected function beadsAddedHandler(event:Event):void
-		{
-			dataModel = _strand.getBeadByType(IDataProviderModel) as IDataProviderModel;
-			dataModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
-		}
-		
-		override protected function handleInitComplete(event:Event):void
-		{
-			super.handleInitComplete(event);
-		}
-		
-		/**
-		 *  The area holding the itemRenderers.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.8
-		 */
-		public function get dataGroup():IItemRendererParent
-		{
-			return super.contentView as IItemRendererParent;
-		}
-				
-		/**
-		 * @private
-		 */
-		override public function get resizableView():IUIBase
-		{
-			return _strand as IUIBase;
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function itemsCreatedHandler(event:Event):void
-		{
-			host.dispatchEvent(new Event("layoutNeeded"));
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function dataProviderChangeHandler(event:Event):void
-		{
-			host.dispatchEvent(new Event("layoutNeeded"));
-		}
-		        
+            COMPILE::JS
+            {
+    			performLayout(event);
+            }
+            COMPILE::SWF
+            {
+                host.dispatchEvent(new Event("layoutNeeded"));                
+            }
+		}
+        
         /**
-         *  respond to a change in size or request to re-layout everything
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9
+         * @private
          */
-		override protected function resizeHandler(event:Event):void
-		{
-			// might need to do something here, not sure yet.
-			super.resizeHandler(event);
-		}
+        COMPILE::SWF
+        override public function get resizableView():IUIBase
+        {
+            return _strand as IUIBase;
+        }
 	}
 }
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as
index fe14fc3be..462159c54 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as
@@ -22,6 +22,7 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IBeadModel;
 	import org.apache.royale.core.IBeadView;
 	import org.apache.royale.core.IChild;
+    import org.apache.royale.core.IDataGrid;
 	import org.apache.royale.core.IDataGridModel;
 	import org.apache.royale.core.IDataGridPresentationModel;
 	import org.apache.royale.core.IUIBase;
@@ -29,7 +30,6 @@ package org.apache.royale.html.beads
 	import org.apache.royale.events.Event;
 	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.html.Container;
-	import org.apache.royale.html.DataGrid;
 	import org.apache.royale.html.DataGridButtonBar;
 	import org.apache.royale.html.beads.layouts.ButtonBarLayout;
 	import org.apache.royale.html.supportClasses.DataGridColumnList;
@@ -108,7 +108,7 @@ package org.apache.royale.html.beads
 			 */
 			override protected function handleInitComplete(event:Event):void
 			{
-				var host:DataGrid = _strand as DataGrid;
+				var host:IDataGrid = _strand as IDataGrid;
 
 				// see if there is a presentation model already in place. if not, add one.
 				var sharedModel:IDataGridModel = host.model as IDataGridModel;
@@ -131,9 +131,9 @@ package org.apache.royale.html.beads
 				var bblayout:ButtonBarLayout = new ButtonBarLayout();
 				_header.addBead(bblayout as IBead);
 				_header.addBead(new Viewport() as IBead);
-				host.addElement(_header as IChild);
+				host.strandChildren.addElement(_header as IChild);
 
-				host.addElement(_listArea as IChild);
+				host.strandChildren.addElement(_listArea as IChild);
 
 				handleDataProviderChanged(event);
 
@@ -204,12 +204,13 @@ package org.apache.royale.html.beads
 			 * @royaleignorecoercion org.apache.royale.core.IDataGridModel
 			 * @royaleignorecoercion org.apache.royale.core.IBead
 			 * @royaleignorecoercion org.apache.royale.core.IChild
-			 * @royaleignorecoercion org.apache.royale.html.DataGrid
+			 * @royaleignorecoercion org.apache.royale.core.IDataGrid
+			 * @royaleignorecoercion org.apache.royale.core.IDataGridPresentationModel
 			 * @royaleignorecoercion org.apache.royale.html.supportClasses.IDataGridColumn
 			 */
 			private function createLists():void
 			{
-				var host:DataGrid = _strand as DataGrid;
+				var host:IDataGrid = _strand as IDataGrid;
 				
 				// get the name of the class to use for the columns
 				var columnClassName:String = ValuesManager.valuesImpl.getValue(host, "columnClassName") as String;
@@ -218,7 +219,7 @@ package org.apache.royale.html.beads
 				}
 
 				var sharedModel:IDataGridModel = host.model as IDataGridModel;
-				var presentationModel:IDataGridPresentationModel = host.presentationModel;
+				var presentationModel:IDataGridPresentationModel = host.presentationModel as IDataGridPresentationModel;
 
 				_lists = [];
 
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataItemRendererFactoryForArrayData.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataItemRendererFactoryForArrayData.as
index dc1f1c485..90ce86cd5 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataItemRendererFactoryForArrayData.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataItemRendererFactoryForArrayData.as
@@ -26,6 +26,7 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.ISelectableItemRenderer;
 	import org.apache.royale.core.IDataProviderModel;
 	import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
 	import org.apache.royale.core.IUIBase;
 	import org.apache.royale.core.SimpleCSSStyles;
 	import org.apache.royale.core.UIBase;
@@ -36,7 +37,7 @@ package org.apache.royale.html.beads
 	import org.apache.royale.events.ItemRendererEvent;
 	import org.apache.royale.html.List;
 	
-	import org.apache.royale.core.IList;
+    import org.apache.royale.html.beads.IListView;
 	import org.apache.royale.core.IChild;
 	import org.apache.royale.core.ILayoutHost;
 	import org.apache.royale.core.IParentIUIBase;
@@ -158,7 +159,8 @@ package org.apache.royale.html.beads
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.8
 		 *  @royaleignorecoercion Array
-		 *  @royaleignorecoercion org.apache.royale.core.IList
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
 		 *  @royaleignorecoercion org.apache.royale.core.IListPresentationModel
 		 *  @royaleignorecoercion org.apache.royale.core.UIBase
 		 *  @royaleignorecoercion org.apache.royale.core.ISelectableItemRenderer
@@ -171,8 +173,8 @@ package org.apache.royale.html.beads
 			if (!dp)
 				return;
 			
-			var list:IList = _strand as IList;
-			var dataGroup:IItemRendererParent = list.dataGroup;
+            var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+			var dataGroup:IItemRendererParent = view.dataGroup;
 			
 			dataGroup.removeAllItemRenderers();
 			
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataItemRendererFactoryForArrayList.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataItemRendererFactoryForArrayList.as
index a24ede777..02e6cd07a 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataItemRendererFactoryForArrayList.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataItemRendererFactoryForArrayList.as
@@ -27,6 +27,7 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.ISelectableItemRenderer;
 	import org.apache.royale.core.IDataProviderModel;
 	import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
 	import org.apache.royale.core.SimpleCSSStyles;
 	import org.apache.royale.core.UIBase;
 	import org.apache.royale.events.Event;
@@ -36,7 +37,7 @@ package org.apache.royale.html.beads
     import org.apache.royale.html.supportClasses.DataItemRenderer;
 	import org.apache.royale.utils.loadBeadFromValuesManager;
 
-	import org.apache.royale.core.IList;
+    import org.apache.royale.html.beads.IListView;
 	
 	[Event(name="itemRendererCreated",type="org.apache.royale.events.ItemRendererEvent")]
 	
@@ -146,7 +147,9 @@ package org.apache.royale.html.beads
 		}
 		
 		/**
-		 * @private
+		 *  @private
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
 		 */
 		protected function dataProviderChangeHandler(event:Event):void
 		{
@@ -154,8 +157,8 @@ package org.apache.royale.html.beads
 			if (!dp)
 				return;
 			
-			var list:IList = _strand as IList;
-			var dataGroup:IItemRendererParent = list.dataGroup;
+            var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+			var dataGroup:IItemRendererParent = view.dataGroup;
 			
 			dataGroup.removeAllItemRenderers();
 			
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicAddItemRendererForArrayListData.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicAddItemRendererForArrayListData.as
index e8f5ed43d..da866426e 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicAddItemRendererForArrayListData.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicAddItemRendererForArrayListData.as
@@ -22,16 +22,18 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IDataProviderModel;
 	import org.apache.royale.core.IItemRendererClassFactory;
 	import org.apache.royale.core.IItemRendererParent;
-	import org.apache.royale.core.IList;
+	import org.apache.royale.core.IItemRendererProvider;
 	import org.apache.royale.core.IListPresentationModel;
 	import org.apache.royale.core.ISelectableItemRenderer;
 	import org.apache.royale.core.ISelectionModel;
 	import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
 	import org.apache.royale.core.SimpleCSSStyles;
 	import org.apache.royale.core.UIBase;
 	import org.apache.royale.events.CollectionEvent;
 	import org.apache.royale.events.Event;
 	import org.apache.royale.events.IEventDispatcher;
+    import org.apache.royale.html.beads.IListView;
 	import org.apache.royale.utils.loadBeadFromValuesManager;
 
     /**
@@ -165,12 +167,14 @@ package org.apache.royale.html.beads
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.9.0
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
 		 */
 		public function get itemRendererParent():IItemRendererParent
 		{
 			if (_itemRendererParent == null) {
-				var list:IList = _strand as IList;
-				_itemRendererParent = list.dataGroup;
+				var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+				_itemRendererParent = view.dataGroup;
 			}
 			return _itemRendererParent;
 		}
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveAllByNullItemRendererForArrayListData.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveAllByNullItemRendererForArrayListData.as
index 8215562be..ab644411b 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveAllByNullItemRendererForArrayListData.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveAllByNullItemRendererForArrayListData.as
@@ -21,12 +21,13 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IBead;
 	import org.apache.royale.core.IDataProviderModel;
 	import org.apache.royale.core.IItemRendererParent;
-	import org.apache.royale.core.IList;
 	import org.apache.royale.core.ISelectionModel;
 	import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
 	import org.apache.royale.events.CollectionEvent;
 	import org.apache.royale.events.Event;
 	import org.apache.royale.events.IEventDispatcher;
+    import org.apache.royale.html.beads.IListView;
 
 	/**
 	 * Handles the removal of all itemRenderers once data source is being set to null.
@@ -135,12 +136,14 @@ package org.apache.royale.html.beads
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.9.0
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
 		 */
 		public function get itemRendererParent():IItemRendererParent
 		{
 			if (_itemRendererParent == null) {
-				var list:IList = _strand as IList;
-				_itemRendererParent = list.dataGroup;
+                var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+                _itemRendererParent = view.dataGroup;
 			}
 			return _itemRendererParent;
 		}
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveAllItemRendererForArrayListData.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveAllItemRendererForArrayListData.as
index 558cf0a03..c78805c33 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveAllItemRendererForArrayListData.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveAllItemRendererForArrayListData.as
@@ -21,12 +21,13 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IBead;
 	import org.apache.royale.core.IDataProviderModel;
 	import org.apache.royale.core.IItemRendererParent;
-	import org.apache.royale.core.IList;
 	import org.apache.royale.core.ISelectionModel;
 	import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
 	import org.apache.royale.events.CollectionEvent;
 	import org.apache.royale.events.Event;
 	import org.apache.royale.events.IEventDispatcher;
+    import org.apache.royale.html.beads.IListView;
 
 	/**
 	 * Handles the removal of all itemRenderers once the all items has been removed
@@ -149,12 +150,14 @@ package org.apache.royale.html.beads
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.9.0
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
 		 */
 		public function get itemRendererParent():IItemRendererParent
 		{
 			if (_itemRendererParent == null) {
-				var list:IList = _strand as IList;
-				_itemRendererParent = list.dataGroup;
+                var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+                _itemRendererParent = view.dataGroup;
 			}
 			return _itemRendererParent;
 		}
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveItemRendererForArrayListData.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveItemRendererForArrayListData.as
index e3f1a0026..d0bee21c1 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveItemRendererForArrayListData.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicRemoveItemRendererForArrayListData.as
@@ -21,14 +21,15 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IBead;
 	import org.apache.royale.core.IDataProviderModel;
 	import org.apache.royale.core.IItemRendererParent;
-	import org.apache.royale.core.IList;
 	import org.apache.royale.core.ISelectableItemRenderer;
 	import org.apache.royale.core.ISelectionModel;
 	import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
 	import org.apache.royale.core.UIBase;
 	import org.apache.royale.events.CollectionEvent;
 	import org.apache.royale.events.Event;
 	import org.apache.royale.events.IEventDispatcher;
+    import org.apache.royale.html.beads.IListView;
 
 	/**
 	 * Handles the removal of an itemRenderer once the corresponding datum has been removed
@@ -155,12 +156,14 @@ package org.apache.royale.html.beads
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.9.0
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
 		 */
 		public function get itemRendererParent():IItemRendererParent
 		{
 			if (_itemRendererParent == null) {
-				var list:IList = _strand as IList;
-				_itemRendererParent = list.dataGroup;
+                var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+                _itemRendererParent = view.dataGroup;
 			}
 			return _itemRendererParent;
 		}
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicUpdateItemRendererForArrayListData.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicUpdateItemRendererForArrayListData.as
index d939f9fb0..766105859 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicUpdateItemRendererForArrayListData.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DynamicUpdateItemRendererForArrayListData.as
@@ -21,13 +21,14 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IBead;
 	import org.apache.royale.core.IDataProviderModel;
     import org.apache.royale.core.IItemRendererParent;
-	import org.apache.royale.core.IList;
 	import org.apache.royale.core.ISelectableItemRenderer;
 	import org.apache.royale.core.ISelectionModel;
 	import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
 	import org.apache.royale.events.CollectionEvent;
 	import org.apache.royale.events.Event;
 	import org.apache.royale.events.IEventDispatcher;
+    import org.apache.royale.html.beads.IListView;
 
     /**
 	 * Handles the update of an itemRenderer once the corresponding datum has been updated
@@ -150,12 +151,14 @@ package org.apache.royale.html.beads
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.9.0
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
 		 */
 		public function get itemRendererParent():IItemRendererParent
 		{
 			if (_itemRendererParent == null) {
-				var list:IList = _strand as IList;
-				_itemRendererParent = list.dataGroup;
+                var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+                _itemRendererParent = view.dataGroup;
 			}
 			return _itemRendererParent;
 		}
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ListView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ListView.as
index e0d103d16..8ff7ad280 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ListView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ListView.as
@@ -24,7 +24,6 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IBeadLayout;
 	import org.apache.royale.core.IBeadModel;
 	import org.apache.royale.core.IBeadView;
-	import org.apache.royale.core.IList;
 	import org.apache.royale.core.ISelectableItemRenderer;
 	import org.apache.royale.core.IItemRenderer;
 	import org.apache.royale.core.IItemRendererParent;
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextItemRendererFactoryForArrayData.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextItemRendererFactoryForArrayData.as
index 1e3536d48..606708d38 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextItemRendererFactoryForArrayData.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextItemRendererFactoryForArrayData.as
@@ -19,17 +19,18 @@
 package org.apache.royale.html.beads
 {
     import org.apache.royale.core.IBead;
-	import org.apache.royale.core.IList;
 	import org.apache.royale.core.IDataProviderItemRendererMapper;
     import org.apache.royale.core.IItemRendererClassFactory;
     import org.apache.royale.core.IItemRendererParent;
     import org.apache.royale.core.ISelectionModel;
     import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
     import org.apache.royale.core.ValuesManager;
     import org.apache.royale.events.Event;
 	import org.apache.royale.events.EventDispatcher;
 	import org.apache.royale.events.ItemRendererEvent;
     import org.apache.royale.events.IEventDispatcher;
+    import org.apache.royale.html.beads.IListView;
 	import org.apache.royale.utils.loadBeadFromValuesManager;
 
 	[Event(name="itemRendererCreated",type="org.apache.royale.events.ItemRendererEvent")]
@@ -137,7 +138,8 @@ package org.apache.royale.html.beads
          *  @royaleignorecoercion Array
          *  @royaleignorecoercion org.apache.royale.html.beads.ITextItemRenderer
          *  @royaleignorecoercion org.apache.royale.events.IEventDispatcher
-         * @royaleignorecoercion org.apache.royale.core.IList
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
          */
 		private function dataProviderChangeHandler(event:Event):void
 		{
@@ -145,8 +147,8 @@ package org.apache.royale.html.beads
 			if (!dp)
 				return;
 
-			var list:IList = _strand as IList;
-			var dataGroup:IItemRendererParent = list.dataGroup;
+            var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+			var dataGroup:IItemRendererParent = view.dataGroup;
 
 			dataGroup.removeAllItemRenderers();
 
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextItemRendererFactoryForStringVectorData.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextItemRendererFactoryForStringVectorData.as
index eceb5f331..7363e3ddc 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextItemRendererFactoryForStringVectorData.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextItemRendererFactoryForStringVectorData.as
@@ -22,14 +22,15 @@ package org.apache.royale.html.beads
     import org.apache.royale.core.IBead;
     import org.apache.royale.core.IItemRendererClassFactory;
     import org.apache.royale.core.IItemRendererParent;
-	import org.apache.royale.core.IList;
     import org.apache.royale.core.ISelectionModel;
     import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
 	import org.apache.royale.core.ValuesManager;
 	import org.apache.royale.events.Event;
 	import org.apache.royale.events.EventDispatcher;
 	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.events.ItemRendererEvent;
+    import org.apache.royale.html.beads.IListView;
 	import org.apache.royale.utils.loadBeadFromValuesManager;
 	
 	[Event(name="itemRendererCreated",type="org.apache.royale.events.ItemRendererEvent")]
@@ -131,12 +132,16 @@ package org.apache.royale.html.beads
          */
         protected var dataGroup:IItemRendererParent;
 		
+        /**
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.core.IListView
+         */
 		private function dataProviderChangeHandler(event:Event):void
 		{
 			var dp:Vector.<String> = selectionModel.dataProvider as Vector.<String>;
 			
-			var list:IList = _strand as IList;
-			var dataGroup:IItemRendererParent = list.dataGroup;
+            var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+			var dataGroup:IItemRendererParent = view.dataGroup;
 			
 			dataGroup.removeAllItemRenderers();
 			
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TreeGridView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TreeGridView.as
index 7905fc360..757d04b3a 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TreeGridView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TreeGridView.as
@@ -136,13 +136,14 @@ package org.apache.royale.html.beads
 		
 		/**
 		 * @private
+         * @royaleignorecoercion org.apache.royale.core.IDataGridPresentationModel
 		 */
 		protected function finishSetup(event:Event):void
 		{
 			var host:TreeGrid = _strand as TreeGrid;
 			
 			// see if there is a presentation model already in place. if not, add one.
-			var presentationModel:IDataGridPresentationModel = host.presentationModel;
+			var presentationModel:IDataGridPresentationModel = host.presentationModel as IDataGridPresentationModel;
 			var sharedModel:IDataGridModel = host.model as IDataGridModel;
 			IEventDispatcher(sharedModel).addEventListener("dataProviderChanged",handleDataProviderChanged);
 			IEventDispatcher(sharedModel).addEventListener("selectedIndexChanged", handleSelectedIndexChanged);
@@ -248,6 +249,7 @@ package org.apache.royale.html.beads
 		
 		/**
 		 * @private
+         * @royaleignorecoercion org.apache.royale.core.IDataGridPresentationModel
 		 */
 		private function createColumns():void
 		{
@@ -259,7 +261,7 @@ package org.apache.royale.html.beads
 				columnClassName = "TreeGridColumn";
 			}
 			
-			var presentationModel:IDataGridPresentationModel = host.presentationModel;
+			var presentationModel:IDataGridPresentationModel = host.presentationModel as IDataGridPresentationModel;
 			var sharedModel:IDataGridModel = host.model as IDataGridModel;
 			
 			_lists = new Array();
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualDataContainerView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualDataContainerView.as
index 86905b81a..0cb7bedb0 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualDataContainerView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualDataContainerView.as
@@ -27,7 +27,6 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IDataProviderModel;
 	import org.apache.royale.core.IItemRenderer;
 	import org.apache.royale.core.IItemRendererParent;
-	import org.apache.royale.core.IList;
 	import org.apache.royale.core.IParent;
 	import org.apache.royale.core.IParentIUIBase;
 	import org.apache.royale.core.ISelectableItemRenderer;
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualDataItemRendererFactoryForArrayData.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualDataItemRendererFactoryForArrayData.as
index e78e67fbc..3aeaa44cd 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualDataItemRendererFactoryForArrayData.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualDataItemRendererFactoryForArrayData.as
@@ -25,11 +25,11 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IItemRendererClassFactory;
 	import org.apache.royale.core.IItemRendererParent;
 	import org.apache.royale.core.ILayoutHost;
-	import org.apache.royale.core.IList;
 	import org.apache.royale.core.IListPresentationModel;
 	import org.apache.royale.core.IParentIUIBase;
 	import org.apache.royale.core.ISelectableItemRenderer;
 	import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IStrandWithModelView;
 	import org.apache.royale.core.IUIBase;
 	import org.apache.royale.core.SimpleCSSStyles;
 	import org.apache.royale.core.UIBase;
@@ -39,6 +39,7 @@ package org.apache.royale.html.beads
 	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.events.ItemRendererEvent;
 	import org.apache.royale.html.List;
+    import org.apache.royale.html.beads.IListView;
 	import org.apache.royale.html.supportClasses.DataItemRenderer;
 	import org.apache.royale.utils.loadBeadFromValuesManager;
 
@@ -151,6 +152,8 @@ package org.apache.royale.html.beads
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
          */		
 		protected function dataProviderChangeHandler(event:Event):void
 		{
@@ -158,23 +161,43 @@ package org.apache.royale.html.beads
 			if (!dp)
 				return;
 			
-			var list:IList = _strand as IList;
-			var dataGroup:IItemRendererParent = list.dataGroup;
+            var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+			var dataGroup:IItemRendererParent = view.dataGroup;
 			
 			dataGroup.removeAllItemRenderers();
         }
         
+        /**
+         *  Free an item renderer for a given index.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.0
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
+         */
         public function freeItemRendererForIndex(index:int):void
         {
             var ir:ISelectableItemRenderer = rendererMap[index];
-            var list:IList = _strand as IList;
-            var dataGroup:IItemRendererParent = list.dataGroup;
+            var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+            var dataGroup:IItemRendererParent = view.dataGroup;
             dataGroup.removeItemRenderer(ir);
             delete rendererMap[index];
         }
         
         private var rendererMap:Object = {};
         
+        /**
+         *  Get an item renderer for a given index.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.0
+         *  @royaleignorecoercion org.apache.royale.core.IStrandWithModelView
+         *  @royaleignorecoercion org.apache.royale.html.beads.IListView
+         */
         public function getItemRendererForIndex(index:int, elementIndex:int):ISelectableItemRenderer
         {
             var ir:ISelectableItemRenderer = rendererMap[index];
@@ -185,8 +208,8 @@ package org.apache.royale.html.beads
 			ir = itemRendererFactory.createItemRenderer(dataGroup) as ISelectableItemRenderer;
             var dataItemRenderer:DataItemRenderer = ir as DataItemRenderer;
 
-            var list:IList = _strand as IList;
-            var dataGroup:IItemRendererParent = list.dataGroup;
+            var view:IListView = (_strand as IStrandWithModelView).view as IListView;
+            var dataGroup:IItemRendererParent = view.dataGroup;
 			dataGroup.addItemRendererAt(ir, elementIndex);
 			ir.index = index;
 			ir.labelField = labelField;
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualListView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualListView.as
index b689c2ad3..fcf2dbb28 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualListView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualListView.as
@@ -24,9 +24,6 @@ package org.apache.royale.html.beads
 	import org.apache.royale.core.IBeadLayout;
 	import org.apache.royale.core.IBeadModel;
 	import org.apache.royale.core.IBeadView;
-	import org.apache.royale.core.IList;
-    import org.apache.royale.core.IListPresentationModel;
-    import org.apache.royale.core.IListWithPresentationModel;
 	import org.apache.royale.core.ISelectableItemRenderer;
 	import org.apache.royale.core.IItemRenderer;
 	import org.apache.royale.core.IItemRendererParent;
@@ -59,8 +56,7 @@ package org.apache.royale.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion Royale 0.0
 	 */
-	COMPILE::JS
-	public class VirtualListView extends VirtualDataContainerView
+	public class VirtualListView extends DataContainerView // was VirtualDataContainerView
 	{
 		public function VirtualListView()
 		{
@@ -116,88 +112,22 @@ package org.apache.royale.html.beads
 				ir.hovered = true;
 			lastRollOverIndex = (listModel as IRollOverModel).rollOverIndex;
 		}
-	}
-
-	COMPILE::SWF
-	public class VirtualListView extends VirtualDataContainerView
-	{
-		public function VirtualListView()
-		{
-			super();
-		}
-
-		protected var listModel:ISelectionModel;
-
-		/**
-		 *  @copy org.apache.royale.core.IBead#strand
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.0
-		 */
-		override public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			super.strand = value;
-		}
-
-		/**
-		 * @private
-		 */
-		override protected function handleInitComplete(event:Event):void
-		{
-			super.handleInitComplete(event);
-
-			listModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
-			listModel.addEventListener("selectedIndexChanged", selectionChangeHandler);
-			listModel.addEventListener("rollOverIndexChanged", rollOverIndexChangeHandler);
-		}
-
-		protected var lastSelectedIndex:int = -1;
-
-		/**
-		 * @private
-		 */
-		protected function selectionChangeHandler(event:Event):void
-		{
-			var ir:ISelectableItemRenderer = dataGroup.getItemRendererForIndex(lastSelectedIndex) as ISelectableItemRenderer;
-            if (ir)
-				ir.selected = false;
-			ir = dataGroup.getItemRendererForIndex(listModel.selectedIndex) as ISelectableItemRenderer;
-			if (ir)
-				ir.selected = true;
-            lastSelectedIndex = listModel.selectedIndex;
-		}
-
-		protected var lastRollOverIndex:int = -1;
-
-		/**
-		 * @private
-		 */
-		protected function rollOverIndexChangeHandler(event:Event):void
-		{
-			var ir:ISelectableItemRenderer = dataGroup.getItemRendererForIndex(lastRollOverIndex) as ISelectableItemRenderer;
-			if(ir)
-				ir.hovered = false;
-			ir = dataGroup.getItemRendererForIndex(IRollOverModel(listModel).rollOverIndex) as ISelectableItemRenderer;
-			if(ir)
-				ir.hovered = true;
-			
-			lastRollOverIndex = IRollOverModel(listModel).rollOverIndex;
-		}
-
+        
+        COMPILE::SWF
         override protected function calculateContentSize():Size
         {
             return _lastContentSize;
         }
         
+        COMPILE::SWF
         private var _lastContentSize:Size;
         
+        COMPILE::SWF
         public function set lastContentSize(value:Size):void
         {
             _lastContentSize = value;
         }
+        
 
-    }
+	}
 }
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VirtualListVerticalLayout.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VirtualListVerticalLayout.as
index 4ab389636..f62ae94a5 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VirtualListVerticalLayout.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VirtualListVerticalLayout.as
@@ -20,7 +20,7 @@ package org.apache.royale.html.beads.layouts
 {
 	import org.apache.royale.core.IBeadLayout;
 	import org.apache.royale.core.IBeadModel;
-    import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
+	import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
 	import org.apache.royale.core.IDataProviderModel;
 	import org.apache.royale.core.IDataProviderVirtualItemRendererMapper;
 	import org.apache.royale.core.ILayoutChild;
@@ -28,15 +28,15 @@ package org.apache.royale.html.beads.layouts
 	import org.apache.royale.core.ILayoutParent;
 	import org.apache.royale.core.ILayoutView;
 	import org.apache.royale.core.IListPresentationModel;
-	import org.apache.royale.core.IListWithPresentationModel;
 	import org.apache.royale.core.IParentIUIBase;
-    import org.apache.royale.core.IScrollingViewport;
+	import org.apache.royale.core.IScrollingViewport;
 	import org.apache.royale.core.ISelectableItemRenderer;
 	import org.apache.royale.core.IStrand;
+	import org.apache.royale.core.IStrandWithPresentationModel;
 	import org.apache.royale.core.IUIBase;
-    import org.apache.royale.core.layout.EdgeData;
 	import org.apache.royale.core.LayoutBase;
 	import org.apache.royale.core.ValuesManager;
+	import org.apache.royale.core.layout.EdgeData;
 	COMPILE::JS
 	{
 		import org.apache.royale.core.WrappedHTMLElement;
@@ -46,6 +46,7 @@ package org.apache.royale.html.beads.layouts
 	import org.apache.royale.geom.Rectangle;
     import org.apache.royale.html.beads.VirtualListView;
 	import org.apache.royale.utils.CSSUtils;
+
     COMPILE::SWF {
         import org.apache.royale.geom.Size;
     }
@@ -113,6 +114,8 @@ package org.apache.royale.html.beads.layouts
 		 *  @productversion Royale 0.0
 		 *  @royaleignorecoercion org.apache.royale.core.ILayoutHost
 		 *  @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+		 *  @royaleignorecoercion org.apache.royale.core.IListPresentationModel
+		 *  @royaleignorecoercion org.apache.royale.core.IStrandWithPresentationModel
 		 */
 		override public function layout():Boolean
 		{
@@ -131,7 +134,7 @@ package org.apache.royale.html.beads.layouts
 				var maxWidth:Number = 0;
 				var maxHeight:Number = 0;
                 var dp:Array = dataProviderModel.dataProvider as Array;
-                var presentationModel:IListPresentationModel = (host as IListWithPresentationModel).presentationModel;
+                var presentationModel:IListPresentationModel = (host as IStrandWithPresentationModel).presentationModel as IListPresentationModel;
 				var hostWidthSizedToContent:Boolean = host.isWidthSizedToContent();
 				var hostHeightSizedToContent:Boolean = host.isHeightSizedToContent();
 				var hostWidth:Number = host.width;
@@ -251,7 +254,7 @@ package org.apache.royale.html.beads.layouts
                 // going off-screen
                 var contentView:ILayoutView = layoutView;
                 var dp:Array = dataProviderModel.dataProvider as Array;
-                var presentationModel:IListPresentationModel = (host as IListWithPresentationModel).presentationModel;
+                var presentationModel:IListPresentationModel = (host as IStrandWithPresentationModel).presentationModel as IListPresentationModel;
                 var totalHeight:Number = presentationModel.rowHeight * dp.length;
                 var viewportTop:Number = Math.max(contentView.element.scrollTop, 0);
                 var viewportHeight:Number = contentView.element.clientHeight;
diff --git a/frameworks/projects/Core/src/main/royale/CoreClasses.as b/frameworks/projects/Core/src/main/royale/CoreClasses.as
index a1061dd66..6f25cd2fd 100644
--- a/frameworks/projects/Core/src/main/royale/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/royale/CoreClasses.as
@@ -103,8 +103,9 @@ internal class CoreClasses
     import org.apache.royale.core.ISelectable; ISelectable;
     import org.apache.royale.core.ISelectionModel; ISelectionModel;
     import org.apache.royale.core.IStrand; IStrand;
-	import org.apache.royale.core.IStrandPrivate; IStrandPrivate;
+	import org.apache.royale.core.IContainerBaseStrandChildrenHost; IContainerBaseStrandChildrenHost;
     import org.apache.royale.core.IStrandWithModel; IStrandWithModel;
+    import org.apache.royale.core.IStrandWithModelView; IStrandWithModelView;
     import org.apache.royale.core.ITextModel; ITextModel;
     import org.apache.royale.core.ITitleBarModel; ITitleBarModel;
     import org.apache.royale.core.IToggleButtonModel; IToggleButtonModel;
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrandPrivate.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IContainerBaseStrandChildrenHost.as
similarity index 80%
rename from frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrandPrivate.as
rename to frameworks/projects/Core/src/main/royale/org/apache/royale/core/IContainerBaseStrandChildrenHost.as
index 21cb3d7c4..9fc29bfdb 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrandPrivate.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IContainerBaseStrandChildrenHost.as
@@ -19,15 +19,18 @@
 package org.apache.royale.core
 {
     /**
-     *  The IStrandPrivate interface is implemented by components that permit 
-	 *  access to their direct children.
+     *  The IContainerBaseStrandChildrenHost interface is implemented by 
+     *  components that use a ContainerBaseStrandChildren to proxy
+     *  addElement/removeElement calls to an internal child and
+     *  has the following APIs so the View can set up the "chrome" around
+     *  the internal child.
      *  
      *  @langversion 3.0
      *  @playerversion Flash 10.2
      *  @playerversion AIR 2.6
      *  @productversion Royale 0.8
      */
-	public interface IStrandPrivate
+	public interface IContainerBaseStrandChildrenHost
 	{
 		function $numElements():int;
 		function $addElement(c:IChild, dispatchEvent:Boolean = true):void;
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IItemRendererProvider.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IItemRendererProvider.as
index 2e0384d0b..6ec6a0a7e 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IItemRendererProvider.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IItemRendererProvider.as
@@ -33,16 +33,6 @@ package org.apache.royale.core
      */
 	public interface IItemRendererProvider
 	{
-        /**
-         *  Returns whether or not the class has an itemRenderer set.
-         *  @return true if the itemRenderer has been set, false otherwise.
-         * 
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
-         */
-        function get hasItemRenderer():Boolean;
         
         /**
          * Returns the class factory that will generate instances of the itemRenderer.
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrandWithModelView.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrandWithModelView.as
new file mode 100644
index 000000000..a2dc03511
--- /dev/null
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrandWithModelView.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.royale.core
+{
+    /**
+     *  The IStrandWithModelView interface is the basic interface for a host component for
+     *  a set of plug-ins known as Beads where two of the plugins are a model and a view.
+     *  In Royale, the recommended pattern is to break out optional functionality
+     *  into small plug-ins that can be re-used in other components, or replaced with
+     *  different implementations optimized for different things such as size,
+     *  performance, advanced features, debugging, etc.
+     * 
+     *  Beads are added to and removed from a Strand and can find and coordinate with
+     *  other beads on the strand.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+	public interface IStrandWithModelView extends IStrandWithModel
+	{
+        /**
+         *  Each Strand has an view object.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        function get view():IBeadView;
+        	
+	}
+}
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ItemRendererClassFactory.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ItemRendererClassFactory.as
index 1d44130df..6031bc9f4 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ItemRendererClassFactory.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ItemRendererClassFactory.as
@@ -71,7 +71,7 @@ package org.apache.royale.core
         {
             _strand = value;
             
-            if (_strand is IItemRendererProvider && (_strand as IItemRendererProvider).hasItemRenderer) {
+            if (_strand is IItemRendererProvider && (_strand as IItemRendererProvider).itemRenderer) {
             	itemRendererFactory = (_strand as IItemRendererProvider).itemRenderer;
             	createFunction = createFromClass;
             }
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/List.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/List.as
index ed83f5f96..eb9cb0b67 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/List.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/List.as
@@ -18,9 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.jewel
 {
+	import org.apache.royale.core.IListPresentationModel;
 	import org.apache.royale.core.IRollOverModel;
 	import org.apache.royale.core.ISelectionModel;
-    import org.apache.royale.html.DataContainer;
+	import org.apache.royale.html.DataContainer;
     
 
 	COMPILE::JS
@@ -134,14 +135,14 @@ package org.apache.royale.jewel
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.9.3
 		 */
-		public function get rowHeight():Number
-		{
-			return presentationModel.rowHeight;
-		}
-		public function set rowHeight(value:Number):void
-		{
-			presentationModel.rowHeight = value;
-		}
+        public function get rowHeight():Number
+        {
+            return (presentationModel as IListPresentationModel).rowHeight;
+        }
+        public function set rowHeight(value:Number):void
+        {
+            (presentationModel as IListPresentationModel).rowHeight = value;
+        }
 
 		/**
 		 *  The item currently selected. Changing this value also
diff --git a/frameworks/projects/MXRoyale/src/main/resources/defaults.css b/frameworks/projects/MXRoyale/src/main/resources/defaults.css
index b1244b5c7..46aad7371 100644
--- a/frameworks/projects/MXRoyale/src/main/resources/defaults.css
+++ b/frameworks/projects/MXRoyale/src/main/resources/defaults.css
@@ -67,6 +67,20 @@ Container
 	IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel");
 }
 
+DataGrid
+{
+	IChangePropagator: ClassReference("org.apache.royale.html.beads.DataGridColumnChangePropagator");
+	IDataGridPresentationModel: ClassReference("org.apache.royale.html.beads.models.DataGridPresentationModel");
+	IBeadView: ClassReference("org.apache.royale.html.beads.DataGridView");
+	IBeadModel: ClassReference("org.apache.royale.html.beads.models.DataGridModel");
+	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.DataGridLayout");
+	
+	background-color: #FFFFFF;
+	border: 1px solid #222222;
+	width: 200px;
+	height: 200px;
+}
+
 DateChooser 
 {
 	IBeadView:   ClassReference("org.apache.royale.html.beads.DateChooserView");
@@ -83,6 +97,19 @@ Image
 	IBeadView:  ClassReference("org.apache.royale.html.beads.ImageView");
 }
 
+List
+{
+	IBeadModel: ClassReference("org.apache.royale.html.beads.models.ArraySelectionModel");
+	IBeadView:  ClassReference("org.apache.royale.html.beads.ListView");			
+	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.ListSingleSelectionMouseController");
+	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.VerticalLayout");
+	IDataProviderItemRendererMapper: ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayData");
+	IItemRendererClassFactory: ClassReference("org.apache.royale.core.ItemRendererClassFactory");
+	IItemRenderer: ClassReference("mx.controls.listClasses.ListItemRenderer");
+	IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
+	IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel");
+}
+
 NumericStepper
 {
 	IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel");
@@ -137,6 +164,13 @@ Panel .TitleBar
 		IContentView: ClassReference("org.apache.royale.html.supportClasses.ContainerContentArea");
 	}
 	
+	DataGrid {
+		IBackgroundBead: ClassReference("org.apache.royale.html.beads.SolidBackgroundBead");
+		IBorderBead: ClassReference("org.apache.royale.html.beads.SingleLineBorderBead");
+		font-size: 11px;
+		font-family: Arial;
+	}
+	
 	Label
 	{
 		IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
@@ -144,6 +178,16 @@ Panel .TitleBar
 		iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead");
 	}
 	
+	List
+	{
+		iBackgroundBead: ClassReference("org.apache.royale.html.beads.SolidBackgroundBead");
+		iBorderBead: ClassReference('org.apache.royale.html.beads.SingleLineBorderBead');
+		iBorderModel: ClassReference('org.apache.royale.html.beads.models.SingleLineBorderModel');
+		IContentView: ClassReference("org.apache.royale.html.supportClasses.DataGroup");
+		font-size: 11px;
+		font-family: Arial;
+	}
+	
 	Panel
 	{
 		IContentView: ClassReference("org.apache.royale.html.supportClasses.ContainerContentArea");
diff --git a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
index eedabdb6a..6e163d451 100644
--- a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
+++ b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
@@ -25,10 +25,13 @@
 	<component id="Button" class="mx.controls.Button" />
 	<component id="CheckBox" class="mx.controls.CheckBox" />
     <component id="ComboBox" class="mx.controls.ComboBox" />
+    <component id="DataGrid" class="mx.controls.DataGrid" />
+    <component id="DataGridColumn" class="mx.controls.dataGridClasses.DataGridColumn" />
 	<component id="DateChooser" class="mx.controls.DateChooser" />
 	<component id="Image" class="mx.controls.Image" />
 	<component id="Label" class="mx.controls.Label" />
 	<component id="LinkButton" class="mx.controls.LinkButton" />
+    <component id="List" class="mx.controls.List" />
 	<component id="NumericStepper" class="mx.controls.NumericStepper" />
 	<component id="ProgressBar" class="mx.controls.ProgressBar" />
 	<component id="RadioButton" class="mx.controls.RadioButton" />
@@ -45,10 +48,13 @@
 	<component id="HDividedBox" class="mx.containers.HDividedBox" />
 	<component id="VBox" class="mx.containers.VBox" />	
 	<component id="VDividedBox" class="mx.containers.VDividedBox" />
+    <component id="Panel" class="mx.containers.Panel" />
 	<!--<component id="ViewStack" class="mx.containers.ViewStack" /> waiting for commit -->
 	<component id="ApplicationLayout" class="mx.containers.beads.ApplicationLayout" />
 	<component id="BoxLayout" class="mx.containers.beads.BoxLayout" />
 	<component id="CanvasLayout" class="mx.containers.beads.CanvasLayout" />
 	
-    <component id="State" class="mx.states.State" /> 
+    <component id="State" class="mx.states.State" />
+    
+    <component id="ListItemRenderer" class="mx.controls.listClasses.ListItemRenderer" />
 </componentPackage>
diff --git a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
index 2644fc1ff..08ee00c9e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
@@ -97,6 +97,8 @@ internal class MXRoyaleClasses
 	import mx.charts.HitData; HitData;
 	import mx.collections.GroupingField; GroupingField;
 	import mx.collections.Grouping; Grouping;
+
+	import mx.core.IVisualElementContainer; IVisualElementContainer;
 	import mx.managers.BrowserManager; BrowserManager;
 	import mx.containers.FormHeading; FormHeading;
 	import mx.charts.chartClasses.DataTransform; DataTransform;
@@ -104,6 +106,80 @@ internal class MXRoyaleClasses
 	import mx.effects.CompositeEffect; CompositeEffect;
 	import mx.logging.LogEventLevel; LogEventLevel;
 	import mx.logging.ILogger; ILogger;
+	import mx.core.FlexVersion; FlexVersion;
+	import mx.charts.chartClasses.CartesianTransform; CartesianTransform;
+	import mx.charts.series.BarSeries; BarSeries;
+	import mx.states.State; State;
+	import mx.collections.XMLListCollection; XMLListCollection;
+	import mx.controls.treeClasses.TreeItemRenderer; TreeItemRenderer;
+	import mx.charts.events.ChartItemEvent; ChartItemEvent;
+	import mx.charts.chartClasses.DataTip; DataTip;
+  import mx.charts.series.ColumnSeries; ColumnSeries;
+	import mx.charts.CategoryAxis; CategoryAxis;
+	import mx.charts.LinearAxis; LinearAxis;
+	import mx.charts.renderers.ShadowLineRenderer; ShadowLineRenderer;
+	import mx.charts.Legend; Legend;
+	import mx.charts.series.AreaSeries; AreaSeries;
+	import mx.controls.textClasses.TextRange; TextRange;
+	import mx.controls.ToggleButtonBar; ToggleButtonBar;
+	import mx.managers.DragManager; DragManager;
+	import mx.logging.targets.TraceTarget; TraceTarget; 
+	import mx.managers.CursorManagerPriority; CursorManagerPriority;
+	import mx.logging.Log; Log;
+	import mx.collections.GroupingCollection2; GroupingCollection2;
+	import mx.charts.chartClasses.Series; Series;
+	import mx.charts.chartClasses.GraphicsUtilities; GraphicsUtilities; 
+	import mx.effects.easing.Exponential; Exponential;
+	import mx.controls.listClasses.AdvancedListBase; AdvancedListBase;
+	import mx.effects.effectClasses.TweenEffectInstance; TweenEffectInstance;
+	import mx.effects.TweenEffect; TweenEffect; 
+	import mx.rpc.Fault; Fault;
+	import mx.rpc.AsyncToken; AsyncToken;
+	import mx.rpc.events.InvokeEvent; InvokeEvent;
+	import mx.rpc.events.ResultEvent; ResultEvent;
+	import mx.controls.VScrollBar; VScrollBar;
+	import mx.graphics.LinearGradientStroke; LinearGradientStroke;
+	import mx.rpc.AsyncResponder; AsyncResponder;
+	import mx.rpc.Responder; Responder;
+	import mx.printing.FlexPrintJobScaleType; FlexPrintJobScaleType; 
+	import mx.skins.RectangularBorder; RectangularBorder;
+	import mx.styles.ISimpleStyleClient; ISimpleStyleClient; 
+	import mx.styles.StyleProxy; StyleProxy;
+	import mx.modules.IModuleInfo; IModuleInfo;
+	import mx.managers.CursorManager; CursorManager;
+	import mx.validators.Validator; Validator;
+	import mx.formatters.DateFormatter; DateFormatter;
+	import mx.controls.MenuBar; MenuBar;
+	import mx.formatters.SwitchSymbolFormatter; SwitchSymbolFormatter;
+	import mx.effects.Glow; Glow;
+	import mx.printing.FlexPrintJob; FlexPrintJob; 
+	import mx.validators.StringValidator; StringValidator;
+	import mx.validators.RegExpValidator; RegExpValidator;
+	import mx.controls.advancedDataGridClasses.AdvancedDataGridHeaderRenderer; AdvancedDataGridHeaderRenderer;
+	import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn; AdvancedDataGridColumn;
+	import mx.controls.advancedDataGridClasses.AdvancedDataGridColumnGroup; AdvancedDataGridColumnGroup;
+	import mx.utils.URLUtil; URLUtil;
+	import mx.controls.DateChooser; DateChooser;
+	import mx.controls.DateField; DateField; 
+	import mx.containers.GridItem; GridItem;
+	import mx.containers.GridRow; GridRow;
+	import mx.containers.Grid; Grid;
+	import mx.core.UITextField; UITextField;
+	import mx.effects.Parallel; Parallel; 
+	import mx.rpc.events.FaultEvent; FaultEvent;
+	import mx.controls.advancedDataGridClasses.AdvancedDataGridItemRenderer;  AdvancedDataGridItemRenderer;
+	import mx.charts.series.LineSeries; LineSeries;
+	import mx.controls.Tree; Tree;
+	import mx.events.AdvancedDataGridEvent; AdvancedDataGridEvent;
+	import mx.skins.ProgrammaticSkin; ProgrammaticSkin;
+	import mx.messaging.channels.AMFChannel; AMFChannel;
+	import mx.messaging.ChannelSet; ChannelSet;
+	import mx.rpc.soap.WebService; WebService;
+  import mx.collections.ISort; ISort;
+	import mx.collections.ListCollectionView; ListCollectionView;
+	import mx.collections.ArrayCollection; ArrayCollection;
+	import mx.controls.Alert; Alert;
+
     COMPILE::SWF
     {
         import mx.controls.beads.CSSImageAndTextButtonView; CSSImageAndTextButtonView;
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/CategoryAxis.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/CategoryAxis.as
new file mode 100644
index 000000000..087ec964a
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/CategoryAxis.as
@@ -0,0 +1,332 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts
+{
+
+/* import flash.events.Event;
+
+import mx.charts.chartClasses.AxisBase;
+import mx.charts.chartClasses.AxisLabelSet;
+import mx.charts.chartClasses.IAxis;
+import mx.collections.ArrayCollection;
+import mx.collections.CursorBookmark;
+import mx.collections.IViewCursor;
+import mx.collections.XMLListCollection;
+import mx.core.mx_internal;
+import mx.events.CollectionEvent;
+import mx.events.CollectionEventKind;
+use namespace mx_internal; */
+import mx.collections.ICollectionView;
+
+/**
+ *  The CategoryAxis class lets charts represent data
+ *  grouped by a set of discrete values along an axis.
+ *  You typically use the CategoryAxis class to define
+ *  a set of labels that appear along an axis of a chart.
+ *  For example, charts that render data according to City,
+ *  Year, Business unit, and so on.
+ *  
+ *  <p>You are not required to explicitly set the <code>dataProvider</code> property
+ *  on a CategoryAxis. A CategoryAxis used in a chart inherits its
+ *  <code>dataProvider</code> property from the containing chart.</p>
+ *  
+ *  <p>While you can use the same data provider to provide data
+ *  to the chart and categories to the CategoryAxis, a CategoryAxis
+ *  can optimize rendering if its data provider is relatively static.
+ *  If possible, ensure that the categories are relatively static
+ *  and that changing data is stored in separate data providers.</p>
+ *  
+ *  <p>The <code>dataProvider</code> property can accept
+ *  either an array of strings or an array of records (Objects)
+ *  with a property that specifies the category name.
+ *  If you specify a <code>categoryField</code> property,
+ *  the CategoryAxis assumes that the data provider is an array of Objects.
+ *  If the value of the <code>categoryField</code> property is <code>null</code>,
+ *  the CategoryAxis assumes that the data provider is an array of Strings.</p>
+ *  
+ *  @mxml
+ *  
+ *  <p>The <code>&lt;mx:CategoryAxis&gt;</code> tag inherits all the properties
+ *  of its parent classes and adds the following properties:</p>
+ *  
+ *  <pre>
+ *  &lt;mx:CategoryAxis
+ *    <strong>Properties</strong>
+ *    categoryField="null"
+ *    dataFunction="<i>No default</i>"
+ *    dataProvider="<i>No default</i>"
+ *    labelFunction="<i>No default</i>"
+ *    padding="<i>Default depends on chart type</i>"
+ *    ticksBetweenLabels="<i>true</i>"
+ *  /&gt;
+ *  </pre>
+ *
+ *  @includeExample examples/HLOCChartExample.mxml
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class CategoryAxis 
+{
+//extends AxisBase implements IAxis
+   
+   // include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function CategoryAxis()
+    {
+       /*  super();
+
+        workingDataProvider = new ArrayCollection(); */
+    }
+
+	// displayName property copied from AxisBase
+    //----------------------------------
+    //  displayName
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the name property.
+     */
+    private var _displayName:String = "";
+
+    [Inspectable(category="Display")]
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#displayName
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function get displayName():String
+    {
+        return _displayName;
+    }
+    
+    /**
+     *  @private
+     */
+    public function set displayName(value:String):void
+    {
+        _displayName = value;
+    }
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    
+
+    //----------------------------------
+    //  categoryField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the categoryField property.
+     */
+    private var _categoryField:String = "";
+    
+    [Inspectable(category="General")]
+    
+    /**
+     *  Specifies the field of the data provider
+     *  containing the text for the labels.
+     *  If this property is <code>null</code>, CategoryAxis assumes 
+     *  that the dataProvider contains an array of Strings.
+     *
+     *  @default null
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function get categoryField():String
+    {
+        return _categoryField;
+    }
+    
+    /**
+     *  @private
+     */
+    public function set categoryField(value:String):void
+    {
+        _categoryField = value;
+
+     //   collectionChangeHandler();
+    }
+    
+   
+
+    //----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dataProvider property.
+     */
+    private var _dataProvider:ICollectionView;
+    
+    /**
+     *  @private
+     */
+    private var _userDataProvider:Object;
+    
+    [Inspectable(category="General")]
+    
+    /**
+     *  Specifies the data source containing the label names.
+     *  The <code>dataProvider</code> can be an Array of Strings, an Array of Objects,
+     *  or any object that implements the IList or ICollectionView interface.
+     *  If the <code>dataProvider</code> is an Array of Strings,
+     *  ensure that the <code>categoryField</code> property
+     *  is set to <code>null</code>. 
+     *  If the dataProvider is an Array of Objects,
+     *  set the <code>categoryField</code> property
+     *  to the name of the field that contains the label text.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function get dataProvider():Object
+    {
+        return _dataProvider;
+    }
+    
+    /**
+     *  @private
+     */
+    public function set dataProvider(value:Object):void
+    {
+       /*  _userDataProvider = value;
+
+        if (_userDataProvider != null)
+            workingDataProvider = _userDataProvider;
+        else
+            workingDataProvider = _chartDataProvider; */
+    }
+
+    //----------------------------------
+    //  labelFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the labelFunction property.
+     */
+    private var _labelFunction:Function = null;
+    
+    [Inspectable(category="General")]
+    
+    /**
+     *  Specifies a function that defines the labels that are generated
+     *  for each item in the CategoryAxis's <code>dataProvider</code>.
+     *  If no <code>labelFunction</code> is provided,
+     *  the axis labels default to the value of the category itself.
+     *
+     *  <p>The <code>labelFunction</code> method for a CategoryAxis
+     *  has the following signature:</p>
+     *  <pre>
+     *  function <i>function_name</i>(<i>categoryValue</i>:Object, <i>previousCategoryValue</i>:Object, <i>axis</i>:CategoryAxis, <i>categoryItem</i>:Object):String { ... }
+     *  </pre>
+     *  
+     *  <p>Where:</p>
+     *  <ul>
+     *   <li><code><i>categoryValue</i></code> is the value of the category to be represented.</li>
+     *   <li><code><i>previousCategoryValue</i></code> is the value of the previous category on the axis.</li>
+     *   <li><code><i>axis</i></code> is the CategoryAxis being rendered.</li>
+     *   <li><code><i>categoryItem</i></code> is the item from the <code>dataProvider</code> 
+     *     that is being represented.</li>
+     *  </ul>
+     *  
+     *  <p>Flex displays the returned String as the axis label.</p>
+     * 
+     *  <p>If the <code>categoryField</code> property is not set, the value
+     *  will be the same as the <code>categoryValue</code> property.</p>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */ 
+    public function get labelFunction():Function
+    {
+        return _labelFunction;
+    }
+    
+    /**
+     *  @private
+     */
+    public function set labelFunction(value:Function):void
+    {
+        _labelFunction = value;
+
+     //   invalidateCategories();
+    }
+    
+    
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#formatForScreen()
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function formatForScreen(value:Object):String    
+    {
+       /*  if (value is Number && value < _categoryValues.length)
+        {
+            var catValue:Object = _categoryValues[Math.round(Number(value))];
+            return catValue == null ? value.toString() : catValue.toString();
+        }
+		*/ 
+        return value.toString();    
+    }
+
+    
+    
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/Legend.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/Legend.as
new file mode 100644
index 000000000..6534f1c3d
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/Legend.as
@@ -0,0 +1,311 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts
+{
+   /*  import flash.display.DisplayObject;
+    import flash.display.DisplayObjectContainer;
+    import flash.display.Graphics;
+    import flash.display.InteractiveObject;
+    import flash.display.Loader;
+    import flash.display.Shape;
+    import flash.display.Sprite;
+    import flash.events.Event;
+    import flash.events.KeyboardEvent;
+    import flash.events.MouseEvent;
+    import flash.geom.Point;
+    import flash.geom.Rectangle;
+    import flash.system.ApplicationDomain;
+    import flash.text.TextField;
+    import flash.text.TextLineMetrics;
+    import flash.ui.Keyboard;
+    import flash.utils.getDefinitionByName;
+    
+    import mx.binding.BindingManager;
+    import mx.charts.chartClasses.ChartBase;
+    import mx.charts.events.LegendMouseEvent;
+    import mx.collections.ArrayCollection;
+    import mx.collections.ICollectionView;
+    import mx.collections.IList;
+    import mx.collections.ListCollectionView;
+    import mx.containers.utilityClasses.PostScaleAdapter;
+    import mx.core.ComponentDescriptor;
+    import mx.core.ContainerCreationPolicy;
+    import mx.core.ContainerGlobals;
+    import mx.core.EdgeMetrics;
+    import mx.core.FlexGlobals;
+    import mx.core.FlexSprite;
+    import mx.core.FlexVersion;
+    import mx.core.IChildList;
+    import mx.core.IDeferredInstantiationUIComponent;
+    import mx.core.IFlexDisplayObject;
+    import mx.core.IFlexModuleFactory;
+    import mx.core.IInvalidating;
+    import mx.core.ILayoutDirectionElement;
+    import mx.core.IRectangularBorder;
+    import mx.core.IRepeater;
+    import mx.core.IRepeaterClient;
+    import mx.core.IUITextField;
+    import mx.core.IVisualElement;
+    import mx.core.ScrollPolicy;
+    import mx.core.UIComponentDescriptor;
+    import mx.core.UIComponentGlobals;
+    import mx.core.mx_internal;
+    import mx.events.ChildExistenceChangedEvent;
+    import mx.events.FlexEvent;
+    import mx.events.IndexChangedEvent;
+    import mx.geom.RoundedRectangle;
+    import mx.managers.ILayoutManagerClient;
+    import mx.managers.ISystemManager;
+    import mx.styles.CSSStyleDeclaration;
+    import mx.styles.ISimpleStyleClient;
+    import mx.styles.IStyleClient;
+    import mx.styles.StyleProtoChain;
+    import mx.core.IContainer;
+    import mx.core.IUIComponent;
+
+    use namespace mx_internal; */
+    
+    import mx.core.UIComponent;
+
+    
+    
+    //--------------------------------------
+    //  Other metadata
+    //--------------------------------------
+    
+    [DefaultBindingProperty(destination="dataProvider")]
+    
+   // [DefaultTriggerEvent("itemClick")]
+    
+   // [IconFile("Legend.png")]
+    
+    /**
+     *  The Legend control adds a legend to your charts,
+     *  where the legend displays the label for each data series in the chart
+     *  and a key showing the chart element for the series.
+     *  
+     *  <p>You can initialize a Legend control by binding a chart control
+     *  identifier to the Legend control's <code>dataProvider</code> property,
+     *  or you can define an Array of LegendItem objects.</p>
+     *
+     *  @mxml
+     *  
+     *  <p>The <code>&lt;mx:Legend&gt;</code> tag inherits all the properties
+     *  of its parent classes and adds the following properties:</p>
+     *  
+     *  <pre>
+     *  &lt;mx:Legend
+     *    <strong>Properties</strong>
+     *    autoLayout="true|false"
+     *    clipContent="true|false"
+     *    creationIndex="undefined"
+     *    creationPolicy="auto|all|queued|none"
+     *    dataProvider="<i>No default</i>"
+     *    direction="horizontal|vertical"
+     *    horizontalScrollPosition="0"
+     *    legendItemClass="<i>No default</i>"
+     *    verticalScrollPosition="0"   
+     * 
+     *    <strong>Styles</strong>
+     *    backgroundAlpha="1.0"
+     *    backgroundAttachment="scroll"
+     *    backgroundColor="undefined"
+     *    backgroundDisabledColor="undefined"
+     *    backgroundImage="undefined"
+     *    backgroundSize="auto" 
+     *    barColor="undefined"
+     *    borderColor="0xAAB3B3"
+     *    borderSides="left top right bottom"
+     *    borderSkin="mx.skins.halo.HaloBorder"
+     *    borderStyle="inset|none|solid|outset"
+     *    borderThickness="1"
+     *    color="0x0B333C"
+     *    cornerRadius="0"
+     *    disabledColor="0xAAB3B3"
+     *    disbledOverlayAlpha="undefined"
+     *    dropShadowColor="0x000000"
+     *    dropShadowEnabled="false"
+     *    fontAntiAliasType="advanced"
+     *    fontfamily="Verdana"
+     *    fontGridFitType="pixel"
+     *    fontSharpness="0""
+     *    fontSize="10"
+     *    fontStyle="normal"
+     *    fontThickness="0"
+     *    fontWeight="normal"
+     *    horizontalAlign="left|center|right"
+     *    horizontalGap="<i>8</i>"
+     *    labelPlacement="right|left|top|bottom"
+     *    markerHeight="15"
+     *    markerWidth="10"
+     *    paddingBottom="0"
+     *    paddingLeft="0"
+     *    paddingRight="0"
+     *    paddingTop="0"
+     *    shadowDirection="center"
+     *    shadowDistance="2"
+     *    stroke="<i>IStroke; no default</i>"
+     *    textAlign="left"
+     *    textDecoration="none|underline"
+     *    textIndent="0"
+     *    verticalAlign="top|middle|bottom"
+     *    verticalGap="<i>6</i>"
+     *    
+     *    <strong>Events</strong>
+     *    childAdd="<i>No default</i>"
+     *    childIndexChange="<i>No default</i>"
+     *    childRemove="<i>No default</i>"
+     *    dataChange="<i>No default</i>"
+     *    itemClick="<i>Event; no default</i>"
+     *    itemMouseDown="<i>Event; no default</i>"
+     *    itemMouseOut="<i>Event; no default</i>"
+     *    itemMouseOver="<i>Event; no default</i>"
+     *    itemMouseUp="<i>Event; no default</i>"
+     *  /&gt;
+     *  </pre>
+     *
+     *  @see mx.charts.LegendItem
+     *
+     *  @includeExample examples/PlotChartExample.mxml
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */ 
+     
+    public class Legend extends UIComponent
+        
+    {
+     //    include "../core/Version.as"
+        
+       
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+        
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public function Legend()
+        {
+            super();
+            
+        
+        }
+        
+        //--------------------------------------------------------------------------
+        //
+        //  Variables
+        //
+        //--------------------------------------------------------------------------
+        
+        
+        
+        //--------------------------------------------------------------------------
+        //
+        //  Properties
+        //
+        //--------------------------------------------------------------------------
+        
+        //----------------------------------
+        //  dataProvider
+        //----------------------------------
+        
+        /**
+         *  @private
+         *  Storage for the dataProvider property.
+         */
+        private var _dataProvider:Object;
+        
+        [Bindable("collectionChange")]
+        [Inspectable(category="Data")]
+        
+        /**
+         *  Set of data to be used in the Legend.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public function get dataProvider():Object
+        {
+            return _dataProvider;
+        }
+        
+        /**
+         *  @private
+         */
+        public function set dataProvider(
+            value:Object /* String, ViewStack or Array */):void
+        {
+           /*  if (_dataProvider is ChartBase)
+            {
+                _dataProvider.removeEventListener("legendDataChanged",
+                    legendDataChangedHandler);
+            }
+            
+            _dataProvider = value ? value : [];
+            
+            if (_dataProvider is ChartBase)
+            {
+                // weak listeners to collections and dataproviders
+                _dataProvider.addEventListener("legendDataChanged",
+                    legendDataChangedHandler, false, 0, true);
+            }
+            else if (_dataProvider is ICollectionView)
+            {
+            }
+            else if (_dataProvider is IList)
+            {
+                _dataProvider = new ListCollectionView(IList(_dataProvider));
+            }
+            else if (_dataProvider is Array)
+            {
+                _dataProvider = new ArrayCollection(_dataProvider as Array);
+            }
+            else if (_dataProvider != null)
+            {
+                _dataProvider = new ArrayCollection([_dataProvider]);
+            }
+            else
+            {
+                _dataProvider = new ArrayCollection();
+            }
+            
+            invalidateProperties();
+            invalidateSize();
+            _childrenDirty = true;
+            
+            dispatchEvent(new Event("collectionChange")); */
+        }
+        
+       
+    }
+}
+
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/LinearAxis.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/LinearAxis.as
new file mode 100644
index 000000000..5de1b2129
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/LinearAxis.as
@@ -0,0 +1,268 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts 
+{
+
+/* import flash.events.Event;
+import mx.charts.chartClasses.AxisLabelSet;
+import mx.charts.chartClasses.NumericAxis;
+import mx.core.mx_internal;
+
+use namespace mx_internal; */
+ import org.apache.royale.events.Event;
+ import org.apache.royale.events.EventDispatcher;
+
+/**
+ *  The LinearAxis class maps numeric values evenly
+ *  between a minimum and maximum value along a chart axis.
+ *  By default, it determines <code>minimum</code>, <code>maximum</code>,
+ *  and <code>interval</code> values from the charting data
+ *  to fit all of the chart elements on the screen.
+ *  You can also explicitly set specific values for these properties.
+ *  
+ *  <p>The auto-determination of range values works as follows:
+ *
+ *  <ol>
+ *    <li> Flex determines a minimum and maximum value
+ *    that accomodates all the data being displayed in the chart.</li>
+ *    <li> If the <code>autoAdjust</code> and <code>baseAtZero</code> properties
+ *    are set to <code>true</code>, Flex makes the following adjustments:
+ *      <ul>
+ *        <li>If all values are positive,
+ *        Flex sets the <code>minimum</code> property to zero.</li>
+ *  	  <li>If all values are negative,
+ *        Flex sets the <code>maximum</code> property to zero.</li>
+ *  	</ul>
+ *    </li>
+ *    <li> If the <code>autoAdjust</code> property is set to <code>true</code>,
+ *    Flex adjusts values of the <code>minimum</code> and <code>maximum</code>
+ *    properties by rounding them up or down.</li>
+ *    <li> Flex checks if any of the elements displayed in the chart
+ *    require extra padding to display properly (for example, for labels).
+ *    It adjusts the values of the <code>minimum</code> and
+ *    <code>maximum</code> properties accordingly.</li>
+ *    <li> Flex determines if you have explicitly specified any padding
+ *    around the <code>minimum</code> and <code>maximum</code> values,
+ *    and adjusts their values accordingly.</li>
+ *  </ol>
+ *  </p>
+ *  
+ *  @mxml
+ *  
+ *  <p>The <code>&lt;mx:LinearAxis&gt;</code> tag inherits all the properties
+ *  of its parent classes and adds the following properties:</p>
+ *  
+ *  <pre>
+ *  &lt;mx:LinearAxis
+ *    <strong>Properties</strong>
+ *    interval="null"
+ *    maximum="null"
+ *    maximumLabelPrecision="null"
+ *    minimum="null"
+ *    minorInterval="null"
+ *  /&gt;
+ *  </pre>
+ *  
+ *  @see mx.charts.chartClasses.IAxis
+ *
+ *  @includeExample examples/HLOCChartExample.mxml
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class LinearAxis  extends org.apache.royale.events.EventDispatcher
+{
+//extends NumericAxis 
+    //include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 *	Constructor.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public function LinearAxis() 
+	{
+		super();
+	}
+	
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+
+	 //----------------------------------
+    //  baseAtZero copied from NumericAxis
+    //----------------------------------
+    /**
+     *  Storage for baseAtZero property
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    private var _baseAtZero:Boolean = true;
+    
+    [Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  Specifies whether Flex tries to keep the <code>minimum</code>
+     *  and <code>maximum</code> values rooted at zero.
+     *  If all axis values are positive, the minimum axis value is zero.
+     *  If all axis values are negative, the maximum axis value is zero.  
+     *  
+     *  @default true
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */    
+    public function get baseAtZero():Boolean
+    {
+        return _baseAtZero;
+    }
+    
+    /**
+     * @private
+     */ 
+    public function set baseAtZero(value:Boolean):void
+    {
+        _baseAtZero = value;
+            
+       // dataChanged();      
+    }
+	 
+	 
+	//formatForScreen copied from NumericAxis
+	/**
+     *  @copy mx.charts.chartClasses.IAxis#formatForScreen()
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function formatForScreen(value:Object):String    
+    { 
+    	/* if(direction == "inverted")
+    		value = -(Number(value)) as Object;
+    	else
+    		value = Number(value) as Object; */
+        return value.toString();
+    }
+
+	//----------------------------------
+    //  labelFunction copied from NumericAxis
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the labelFunction property.
+     */
+    private var _labelFunction:Function = null;
+
+    [Inspectable(category="General")]
+    
+    /**
+     *  Called to format axis values for display as labels.
+     *  A <code>labelFunction</code> has the following signature:
+     *  <pre>
+     *  function <i>function_name</i>(<i>labelValue</i>:Object, <i>previousValue</i>:Object, <i>axis</i>:IAxis):String { ... }
+     *  </pre>
+     *  
+     *  <p>If you know the types of the data your function will be formatting,
+     *  you can specify an explicit type for the <code>labelValue</code>
+     *  and <code>previousValue</code> parameters.</p>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get labelFunction():Function
+    {
+        return _labelFunction;
+    }
+    
+    /**
+     *  @private
+     */
+    public function set labelFunction(value:Function):void
+    {
+        _labelFunction = value;
+
+      /*   invalidateCache(); */
+
+        dispatchEvent(new Event("mappingChange"));
+        dispatchEvent(new Event("axisChange")); 
+    }
+	
+	//----------------------------------
+    //  title copied from AxisBase
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the title property.
+     */
+    private var _title:String = "";
+
+    [Inspectable(category="General")]
+    
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#title
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get title():String
+    {
+        return _title;
+    }
+    
+    /**
+     *  @private
+     */
+    public function set title(value:String):void
+    {
+        dispatchEvent(new Event("titleChange"));
+
+        _title = value;
+    }
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/CartesianTransform.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/CartesianTransform.as
new file mode 100644
index 000000000..561945bc1
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/CartesianTransform.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 mx.charts.chartClasses
+{
+
+/**
+ *  The CartesianTransform object represents a set of axes 
+ *  that maps data values to x/y Cartesian screen coordinates
+ *  and vice versa.
+ *
+ *  <p>When using charts in your applications, you
+ *  typically will not need to interact with the CartesianTransform object.
+ *  Transforms are created automatically by the built-in chart types
+ *  and used by the series contained within
+ *  so that they can transform data into rendering coordinates.</p> 
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class CartesianTransform extends DataTransform
+{
+  //  include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  A String representing the horizontal axis.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public static const HORIZONTAL_AXIS:String = "h";
+
+    /**
+     *  A String representing the vertical axis.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public static const VERTICAL_AXIS:String = "v";
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor 
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function CartesianTransform()
+    {
+        super();
+    }
+
+   
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/DataTip.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/DataTip.as
new file mode 100644
index 000000000..838060f5b
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/DataTip.as
@@ -0,0 +1,169 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts.chartClasses
+{
+
+//import flash.display.DisplayObject;
+//import flash.display.Graphics;
+//import flash.geom.Rectangle;
+//import flash.text.TextFieldAutoSize;
+//import flash.text.TextFormat;
+//import flash.utils.Dictionary;
+
+import mx.charts.HitData;
+//import mx.charts.styles.HaloDefaults;
+import mx.core.IDataRenderer;
+//import mx.core.IUITextField;
+import mx.core.UIComponent;
+//import mx.core.UITextField;
+import mx.events.FlexEvent;
+import mx.graphics.IFill;
+import mx.graphics.SolidColor;
+import mx.graphics.SolidColorStroke;
+//import mx.styles.CSSStyleDeclaration;
+//import mx.core.IFlexModuleFactory;
+
+
+/**
+ *  The DataTip control provides information
+ *  about a data point to chart users.
+ *  When a user moves their mouse over a graphical element, the DataTip
+ *  control displays text that provides information about the element.
+ *  You can use DataTip controls to guide users as they work with your
+ *  application or customize the DataTips to provide additional functionality.
+ *
+ *  <p>To enable DataTips on a chart, set its <code>showDataTips</code>
+ *  property to <code>true</code>.</p>
+ *
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class DataTip extends UIComponent implements IDataRenderer
+{
+/*     include "../../core/Version.as";
+ */	
+   
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function DataTip()
+    {
+        super();
+
+       // mouseChildren = false;
+       // mouseEnabled = false;
+    }
+
+  
+   
+  
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+    
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The HitData structure describing the data point
+     *  that the DataTip is rendering.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get data():Object
+    {
+      return super.data();
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+      super.data(value);
+        
+        invalidateDisplayList();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+	
+	
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+    }
+
+   
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+      
+    }
+
+    
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/GraphicsUtilities.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/GraphicsUtilities.as
new file mode 100644
index 000000000..91c69c2dd
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/GraphicsUtilities.as
@@ -0,0 +1,642 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts.chartClasses
+{
+
+//import flash.display.Graphics;
+import org.apache.royale.geom.Point;
+import org.apache.royale.geom.Rectangle;
+import mx.graphics.IFill;
+import mx.graphics.IStroke;
+import mx.graphics.LinearGradient;
+//import mx.graphics.RadialGradient;
+import mx.graphics.SolidColor;
+
+/**
+ *  A set of internal graphics rendering utilities
+ *  used by the various chart classes.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class GraphicsUtilities
+{
+   /*  include "../../core/Version.as";
+ */
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	/* private static var LINE_FORM:Object =
+	{
+		segment: 0,
+		step: 1,
+		vertical: 2,
+		horizontal: 3,
+		reverseStep: 4,
+		curve: 5
+	} */
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Applies the values in a Stroke to the provded Graphics object. This utility function
+	 *  applies the Stroke passed in, or clears the line style of the provided Graphics object
+	 *	if the <code>ls</code> parameter is set to <code>null</code>.
+	 *
+	 *	@param g The Graphics object to modify.
+	 *	@param ls The IStroke instance to apply; set to <code>null</code> to render with no Stroke.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public static function setLineStyle(g:Object, ls:IStroke):void //g:Graphics is replaced with g:Object
+	{
+		/* if (!ls)
+			g.lineStyle(0, 0, 0);
+		else
+			ls.apply(g,null,null); */
+	}
+	
+	/**
+	 *  Fill a rectangle using the provided IFill and IStroke objects.
+	 *  This utility function fills the provided rectangle in the Graphics object
+	 *  with the provided Fill and Stroke. If no Stroke is provided, the rectangle is filled
+	 *  with no border. If no Fill is provided, the rectangle is drawn with no fill.
+	 *
+	 * 	@param g The Graphics object to draw into.
+	 *	@param left The left of the rectangle to fill.
+	 *	@param top The top of the rectangle to fill.
+	 *	@param right The right of the rectangle to fill.
+	 *	@param bottom The bottom of the rectangle to fill.
+	 *	@param fill The IFill object to fill the rectangle with. Set this parameter to null to draw a rectangle with no Fill.
+	 *	@param ls The stroke object to draw the rectangle with. Set this parameter to null to draw a rectangle with no Stroke.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	/* public static function fillRect(g:Graphics, left:Number, top:Number,
+									right:Number, bottom:Number,
+									fill:Object = null, ls:Object = null):void
+	{
+		var fillIsColor:Boolean;		
+		
+		g.moveTo(left, top);
+
+		if (fill != null)
+		{
+			if (fill is IFill)
+			{
+				fillIsColor = false;
+				fill.begin(g,
+					new Rectangle(left, top, right - left, bottom - top),null);
+			}
+			else
+			{
+				fillIsColor = true;
+				g.beginFill(uint(fill));
+			}
+		}
+
+		if (ls != null)
+			ls.apply(g,null,null);
+		
+		g.lineTo(right, top);
+		g.lineTo(right, bottom);
+		g.lineTo(left, bottom);
+		g.lineTo(left, top);
+
+		if (fill != null)
+			g.endFill();
+	} */
+
+	/**
+	 *  @private
+	 */
+	/* private static function convertForm(v:Object):Number
+	{
+		if (typeof(v) == "number")
+		{
+			return Number(v);
+		}
+		else
+		{
+			switch (v)
+			{
+				case "segment":
+				default:
+				{
+					return LINE_FORM.segment;
+				}
+
+				case "curve":
+				{
+					return LINE_FORM.curve;
+				}
+
+				case "step":
+				{
+					return LINE_FORM.step;
+				}
+
+				case "horizontal":
+				{
+					return LINE_FORM.horizontal;
+				}
+
+				case "vertical":
+				{
+					return LINE_FORM.vertical;
+				}
+
+				case "reverseStep":
+				{
+					return LINE_FORM.reverseStep;
+				}
+			}
+		}
+		return NaN;			
+	} */
+
+	/**
+	 *  Draws a line connecting the datapoints using one of various forms.  
+	 *	@param	g     The Graphics object to draw into.
+	 *	@param	pts   An Array of datapoints that define the line.
+	 *	@param	start The index of the first point in the <code>pts</code> Array to use when drawing the line.
+	 *	@param	end   The index of the last point, exclusive, to use when drawing the line.
+	 *	@param	hProp The name of the property in the objects contained in the <code>pts</code> Array that defines the horizontal position of the points in the line.
+	 *	@param 	vProp The name of the property in the objects contained in the <code>pts</code> Array that defines the vertical position of the points in the line.
+	 *	@param	stroke The Stroke used to render the line.
+	 *	@param	form  The form to render the line with. Valid values are "segment","horizontal","vertical","step","reverseStep", or "curve". These forms are similar to the LineSeries class's <code>form</code> property.
+	 *	@param	moveToStart Indicates whether to first move the pen to the beginning of the line before drawing. Pass <code>false</code> to use this function to continue a line in progress.
+ 	 *  
+ 	 *  @langversion 3.0
+ 	 *  @playerversion Flash 9
+ 	 *  @playerversion AIR 1.1
+ 	 *  @productversion Royale 0.9.3
+ 	 */
+	// public static function drawPolyLine(g:Graphics, pts:Array /* of Object */,
+										 // start:int, end:int,
+										 // hProp:String, vProp:String,
+										 // stroke:IStroke, form:Object,
+										 // moveToStart:Boolean = true):void
+	/*  {
+		if (start == end)
+			return;
+
+		var originalStart:int = start;
+		
+		form = convertForm(form);
+		
+		if (stroke)
+			stroke.apply(g,null,null);
+		
+		var len:Number;
+		var incr:int;
+		var i:int;
+		var w:Number;
+		var c:Number;
+		var a:Number;
+		
+		var reverse:Boolean = start > end;
+		
+		if (reverse)
+			incr = -1;
+		else
+			incr = 1;
+		
+		if (moveToStart)
+			g.moveTo(pts[start][hProp], pts[start][vProp]);
+		else
+			g.lineTo(pts[start][hProp], pts[start][vProp]);
+
+		start += incr;
+			
+		if (form == LINE_FORM.segment)
+		{
+			for (i = start; i != end;i += incr)
+			{
+				g.lineTo(pts[i][hProp], pts[i][vProp]);
+			}
+		}
+
+		else if (form == LINE_FORM.step)
+		{			
+			for (i = start; i != end; i += incr)
+			{
+				g.lineTo(pts[i][hProp], pts[i - incr][vProp]);
+				g.lineTo(pts[i][hProp], pts[i][vProp]);
+			}
+		}
+
+		else if (form == LINE_FORM.reverseStep)
+		{
+			for (i = start; i != end; i += incr)
+			{
+				g.lineTo(pts[i - incr][hProp], pts[i][vProp]);
+				g.lineTo(pts[i][hProp], pts[i][vProp]);
+			}
+		}
+
+		else if (form == LINE_FORM.horizontal)
+		{
+			if (reverse)
+			{
+				for (i = start; i != end; i += incr)
+				{
+					g.lineStyle(0, 0, 0);
+					g.lineTo(pts[i - incr][hProp], pts[i][vProp]);
+					if (stroke)
+						stroke.apply(g,null,null);
+					g.lineTo(pts[i][hProp], pts[i][vProp]);
+				}
+			}
+			else
+			{
+				for (i = start; i != end; i += incr)
+				{
+					g.lineStyle(0, 0, 0);
+					g.lineTo(pts[i - incr][hProp], pts[i - incr][vProp]);
+					if (stroke)
+						stroke.apply(g,null,null);
+					g.lineTo(pts[i][hProp], pts[i - incr][vProp]);
+				}
+			}
+		}
+
+		else if (form == LINE_FORM.vertical)
+		{
+			if (reverse)
+			{
+				for (i = start; i != end; i += incr)
+				{
+
+					g.lineStyle(0, 0, 0);
+					g.lineTo(pts[i - incr][hProp], pts[i][vProp]);
+					if (stroke)
+						stroke.apply(g,null,null);
+					g.lineTo(pts[i][hProp], pts[i][vProp]);
+				}
+			}
+			else
+			{
+				for (i = start; i != end; i += incr)
+				{
+					g.lineStyle(0, 0, 0);
+					g.lineTo(pts[i][hProp], pts[i - incr][vProp]);
+					if (stroke)
+						stroke.apply(g,null,null);
+					g.lineTo(pts[i][hProp], pts[i][vProp]);
+				}
+			}
+		}
+
+		else if (form == LINE_FORM.curve)
+		{
+			start = originalStart;
+			var innerEnd:int = end - incr;
+
+			// Check for coincident points at the head of the list.
+			// We'll skip over any of those			
+			while (start != end && ((start + incr) != end))
+			{
+				if (pts[start + incr][hProp] != pts[start][hProp] ||
+					pts[start + incr][vProp] != pts[start][vProp])
+				{
+					break;
+				}
+				start += incr;
+			}
+			if (start == end || start + incr == end)
+				return;
+				
+			if (Math.abs(end - start) == 2)
+			{
+				g.lineTo(pts[start + incr][hProp], pts[start + incr][vProp]);
+				return;
+			}
+
+			var tanLeft:Point = new Point();
+			var tanRight:Point = new Point();
+			var tangentLengthPercent:Number = 0.25;
+			
+			if (reverse)
+				tangentLengthPercent *= -1;
+			
+			var j:int= start;
+			
+			// First, find the normalized vector
+			// from the 0th point TO the 1st point
+			var v1:Point = new Point();
+			var v2:Point = new Point(pts[j + incr][hProp] - pts[j][hProp],
+									 pts[j + incr][vProp] - pts[j][vProp]);
+			var tan:Point = new Point();
+			var p1:Point = new Point();
+			var p2:Point = new Point();
+			var mp:Point = new Point();
+			
+			len = Math.sqrt(v2.x * v2.x + v2.y * v2.y);
+			v2.x /= len;
+			v2.y /= len;
+			
+			// Now later on we'll be using the tangent to the curve
+			// to define the control point.
+			// But since we're at the end, we don't have a tangent.
+			// Instead, we'll just use the first segment itself as the tangent.
+			// The effect will be that the first curve will start along the
+			// polyline.
+			// Now extend the tangent to get a control point.
+			// The control point is expressed as a percentage
+			// of the horizontal distance beteen the two points.
+			var tanLenFactor:Number = pts[j + incr][hProp] - pts[j][hProp];
+			
+			var prevNonCoincidentPt:Object = pts[j];
+			
+			// Here's the basic idea.
+			// On any given iteration of this loop, we're going to draw the
+			// segment of the curve from the nth-1 sample to the nth sample.
+			// To do that, we're going to compute the 'tangent' of the curve
+			// at the two samples.
+			// We'll use these two tangents to find two control points
+			// between the two samples.
+			// Each control point is W pixels along the tangent at the sample,
+			// where W is some percentage of the horizontal distance
+			// between the samples.
+			// We then take the two control points, and find the midpoint
+			// of the line between them.
+			// Then we're ready to draw.
+			// We draw two quadratic beziers, one from sample N-1
+			// to the midpoint, with control point N-1, and one
+			// from the midpoint to sample N, with the control point N.
+			
+			for (j += incr; j != innerEnd; j += incr)
+			{
+				// Check and see if the next point is coincident.
+				// If it is, we'll skip forward.
+				if (pts[j + incr][hProp] == pts[j][hProp] &&
+				    pts[j + incr][vProp] == pts[j][vProp])
+				{
+					continue;
+				}
+					 
+				// v1 is the normalized vector from the nth point
+				// to the nth-1 point.
+				// Since we already computed from nth-1 to nth,
+				// we can just invert it.
+				v1.x = -v2.x
+				v1.y = -v2.y;
+				
+				// Now compute the normalized vector from nth to nth+1. 
+				v2.x = pts[j + incr][hProp] - pts[j][hProp];
+				v2.y = pts[j + incr][vProp] - pts[j][vProp];
+				
+				len = Math.sqrt(v2.x * v2.x + v2.y * v2.y);
+				v2.x /= len;
+				v2.y /= len;
+				
+				// Now compute the 'tangent' of the C1 curve
+				// formed by the two vectors.
+				// Since they're normalized, that's easy to find...
+				// It's the vector that runs between the two endpoints.
+				// We normalize it, as well.
+				tan.x = v2.x - v1.x;
+				tan.y = v2.y - v1.y;
+				var tanlen:Number = Math.sqrt(tan.x * tan.x + tan.y * tan.y);
+				tan.x /= tanlen;
+				tan.y /= tanlen;
+
+				// Optionally, if the vertical direction of the curve
+				// reverses itself, we'll pin the tangent to be  horizontal.
+				// This works well for typical, well spaced chart lines,
+				// not so well for arbitrary curves.
+				if (v1.y * v2.y >= 0)
+					tan = new Point(1, 0);
+
+				// Find the scaled tangent we'll use
+				// to calculate the control point.
+				tanLeft.x = -tan.x * tanLenFactor * tangentLengthPercent;
+				tanLeft.y = -tan.y * tanLenFactor * tangentLengthPercent;
+
+				if (j == (incr+start))
+				{
+					// The first segment starts along the polyline,
+					// so we only draw a single quadratic.
+//					g.moveTo(pts[j - incr].x, pts[j - incr].y);
+					g.curveTo(pts[j][hProp] + tanLeft.x,
+							  pts[j][vProp] + tanLeft.y,
+							  pts[j][hProp],
+							  pts[j][vProp]);
+				}
+				else
+				{
+					// Determine the two control points...
+					p1.x = prevNonCoincidentPt[hProp] + tanRight.x;
+					p1.y = prevNonCoincidentPt[vProp] + tanRight.y;
+					
+					p2.x = pts[j][hProp] + tanLeft.x;
+					p2.y = pts[j][vProp] + tanLeft.y;
+					
+					// and the midpoint of the line between them.
+					mp.x = (p1.x+p2.x)/2
+					mp.y = (p1.y+p2.y)/2;
+					
+					// Now draw our two quadratics.
+					g.curveTo(p1.x, p1.y, mp.x, mp.y);
+					g.curveTo(p2.x, p2.y, pts[j][hProp], pts[j][vProp]);
+					
+				}
+
+				// We're about to move on to the nth to the nth+1 segment
+				// of the curve...so let's flip the tangent at n,
+				// and scale it for the horizontal distance from n to n+1.
+				tanLenFactor = pts[j + incr][hProp] - pts[j][hProp];
+				tanRight.x = tan.x * tanLenFactor * tangentLengthPercent;
+				tanRight.y = tan.y * tanLenFactor * tangentLengthPercent;
+				prevNonCoincidentPt = pts[j];
+			}
+
+			// Now in theory we're going to draw our last curve,
+			// which, like the first, is only a single quadratic,
+			// ending at the last sample.
+			// If we try and draw two curves back to back, in reverse order,
+			// they don't quite match.
+			// I'm not sure whether this is expected, based on the definition
+			// of a quadratic bezier, or a bug in the player.
+			// Regardless, to work around this, we'll draw the last segment
+			// backwards.
+			g.curveTo(prevNonCoincidentPt[hProp] + tanRight.x,
+					  prevNonCoincidentPt[vProp] + tanRight.y,
+					  pts[j][hProp], pts[j][vProp]);
+
+		}
+	} */
+	
+
+	/**
+	 *  Draws an arc in the target Graphics object.  
+	 *	@param	g	The Graphics object to draw into.
+	 *	@param	x	The horizontal origin of the arc.
+	 *	@param	y	The vertical origin of the arc.
+	 *	@param	startAngle	The starting angle, in radians, of the arc.
+	 *	@param	arc	The sweep, in radians, of the arc.
+	 *	@param	radius  The horizontal radius, in pixels, of the arc
+	 *	@param	yRadius The vertical radius, in pixels, of the arc. If unspecified, it is assumed to be the same as the radius
+	 *	@param	continueFlag Indicates whether the routine should move the graphics pen to the beginning of the arc before drawing.
+	 *  Set to <code>true</code> to continue drawing a line that is already in progress.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public static function drawArc(g:Object, x:Number, y:Number,
+								  startAngle:Number, arc:Number,
+								  radius:Number, yRadius:Number = NaN,
+								  continueFlag:Boolean = false):void //g:Graphics is replaced with g:Object
+	{
+		
+		/* if (isNaN(yRadius))
+			yRadius = radius;
+
+		var segAngle:Number
+		var theta:Number
+		var angle:Number
+		var angleMid:Number
+		var segs:Number
+		var ax:Number
+		var ay:Number
+		var bx:Number
+		var by:Number
+		var cx:Number
+		var cy:Number;
+		
+		if (Math.abs(arc) > 2 * Math.PI)
+			arc = 2 * Math.PI;
+
+		segs = Math.ceil(Math.abs(arc) / (Math.PI / 4));
+		segAngle = arc / segs;
+		theta = -segAngle;
+		angle = -startAngle;
+		
+		if (segs > 0)
+		{
+			ax = x + Math.cos(startAngle) * radius;
+			ay = y + Math.sin(-startAngle) * yRadius;
+			
+			if (continueFlag == true)
+				g.lineTo(ax, ay);
+			else
+				g.moveTo(ax, ay);
+			
+			for (var i:uint = 0; i < segs; i++)
+			{
+				angle += theta;
+				angleMid = angle - theta / 2;
+				
+				bx = x + Math.cos(angle) * radius;
+				by = y + Math.sin(angle) * yRadius;
+				cx = x + Math.cos(angleMid) * (radius / Math.cos(theta / 2));
+				cy = y + Math.sin(angleMid) * (yRadius / Math.cos(theta / 2));
+				
+				g.curveTo(cx, cy, bx, by);
+			}
+		} */
+	}
+	
+	/**
+	 *  Converts a style value into a Fill object. This convenience method converts a value assigned through styles into a Fill object
+	 *	that can be used to fill an area on the screen. If the value is numeric, this function converts it into a corresponding SolidColor.
+	 *	@param	v	The value to convert into a Fill.
+	 *	@return The corresponding IFill object.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	/* public static function fillFromStyle(v:Object):IFill
+	{		
+		if (v is IFill)
+			return IFill(v);
+
+		else if (v != null)
+			return IFill(new SolidColor(uint(v)));
+
+		else
+			return null;		
+	} */
+
+	/**
+	 *  Converts a fill value into a solid color. This convenience method pulls a color value out of a Fill
+	 *	that best approximates the Fill on the screen.
+	 *	@param	f	The Fill object to extract a color from.
+	 *	@return A color value representing the Fill.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	/* public static function colorFromFill(f:Object):uint
+	{
+		var color:uint;
+
+		if (f == null)
+		{
+		}
+		else if (f is SolidColor)
+		{
+			color = SolidColor(f).color;
+		}
+		else if (f is LinearGradient &&
+				 LinearGradient(f).entries.length > 0)
+		{
+			color = LinearGradient(f).entries[0].color;
+		}
+		else if (f is RadialGradient &&
+				 RadialGradient(f).entries.length > 0)
+		{
+			color = RadialGradient(f).entries[0].color;
+		}
+		else if (f is Number || f is uint || f is int)
+		{
+			color = uint(f);
+		}
+
+		return color;
+	} */
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/Series.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/Series.as
new file mode 100644
index 000000000..088335d66
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/Series.as
@@ -0,0 +1,2451 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts.chartClasses
+{
+
+//import flash.geom.Rectangle;
+
+import mx.charts.ChartItem;
+//import mx.charts.effects.effectClasses.SeriesEffectInstance;
+import mx.core.mx_internal;
+import mx.effects.Effect;
+//import mx.effects.EffectManager;
+import mx.effects.IEffectInstance;
+//import mx.events.DragEvent;
+import mx.events.FlexEvent;
+import mx.core.UIComponent;
+use namespace mx_internal;
+
+//--------------------------------------
+//  Effects
+//--------------------------------------
+
+/**
+ *  Defines the effect that Flex uses as it hides the current data from view.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Effect(name="hideDataEffect", event="hideData")]
+
+/**
+ *  Defines the effect that Flex uses as it moves the current data
+ *  into its final position on the screen.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Effect(name="showDataEffect", event="showData")]
+
+
+/**
+ *  The Series class is the base class for the classes
+ *  that let you specify a data series for a chart control. 
+ *  You use the subclasses of the Series class
+ *  with the associated chart control. 
+ *  You can use a Series class to specify the fill pattern and stroke
+ *  characteristics for the chart elements that are associated with the data series. 
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class Series  extends UIComponent
+{
+//extends ChartElement
+  //  include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function Series()
+    {
+        super();
+        //super.showInAutomationHierarchy = false;
+        //this.addEventListener(DragEvent.DRAG_START, dragStartHandler);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  @private
+     */
+    //protected var allSeriesTransform:Boolean = true;
+
+    /**
+     *  @private
+     */
+    //private var _previousTransitionData:Object;
+
+    /**
+     *  @private
+     */
+    //private var _bDataDirty:Boolean = true;
+
+    /**
+     *  @private
+     */
+    //private var _bMappingDirty:Boolean = true;
+
+    /**
+     *  @private
+     */
+    //private var _bFilterDirty:Boolean = true;
+
+    /**
+     *  @private
+     */
+    //private var _bTransformDirty:Boolean = true;
+
+    /**
+     *  @private
+     */
+    //private var _bHideTransitionDirty:Boolean = false;
+    
+    /**
+     *  @private
+     */
+    //private var _selectionDirty:Boolean = false;
+    
+    /**
+     *  @private
+     */
+    //private var _selectionDirtyArray:Array /* of ChartItem */ = [];
+    
+    /**
+     *  @private
+     */
+    //private var _selectionIndicesDirty:Boolean = false;
+    
+    /**
+     *  @private
+     */
+    private var _selectionIndicesDirtyArray:Array /* of int */ = [];
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+    
+    //----------------------------------
+    //  dataTransform
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* override public function set dataTransform(value:DataTransform):void
+    {
+        if (dataTransform)
+        {
+            dataTransform.removeEventListener(FlexEvent.TRANSFORM_CHANGE,
+                                      transformChangeHandler);
+        }
+
+        if (value)
+        {
+            super.dataTransform = value;
+            value.addEventListener(FlexEvent.TRANSFORM_CHANGE,
+                                   transformChangeHandler, false, 0, true);
+        }
+        else
+        {
+            var p:String;
+            for (p in dataTransform.axes)
+            {
+                dataTransform.getAxis(p).unregisterDataTransform(dataTransform);
+            }           
+        }
+    } */
+
+    //----------------------------------
+    //  showInAutomationHierarchy
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    /* override public function set showInAutomationHierarchy(value:Boolean):void
+    {
+        //do not allow value changes
+    } */
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+    
+    //----------------------------------
+    // dataFunction
+    //----------------------------------
+    
+    /* [Bindable]
+    [Inspectable(category="General")]
+     */
+    /**
+     *  @private
+     *  Storage for dataFunction property
+     */    
+    //private var _dataFunction:Function;    
+    
+    /**
+     * Specifies a method that returns the value that should be used for 
+     * positioning the current chart item in the series.
+     * If this property is set, the return value of the custom data function takes precedence over the
+     * other related properties, such as <code>xField</code> and <code>yField</code>
+     * for AreaSeries, BarSeries, BubbleSeries, ColumnSeries, LineSeries, and PlotSeries.
+     * For BubbleSeries, the return value takes precedence over the <code>radiusField</code> property.
+     * For PieSeries, the return value takes precedence over the <code>field</code> property.     
+     * 
+     * <p>The custom <code>dataFunction</code> for a series has the following signature:
+     *  
+     * <pre>
+     * <i>function_name</i> (series:Series, item:Object, fieldName:String):Object { ... }
+     * </pre>
+     * 
+     * <code>series</code> is the current series that uses this <code>dataFunction</code>.
+     * <code>item</code> is the item in the data provider.
+     * <code>fieldName</code> is the field in current chart item that is to be populated.     
+     * This function returns an object.
+     * </p>
+     * 
+     * <p>You typically use the <code>dataFunction</code> property to access fields in a data provider that are not
+     * scalar values, but are instead nested in the data provider. For example, the following data
+     * requires a data function to access the fields for a chart's data provider:</p>
+     *  
+     *  <pre>
+     *  {month: "Aug", close: {High:45.87,Low:12.2}, open:25.19}
+     *  </pre>
+     *  
+     * <p>The following example returns a value from this data provider:</p>
+     *   
+     * <pre>
+     * public function myDataFunction(series:Series, item:Object, fieldName:String):Object {
+     *      if (fieldName == 'yValue')
+     *          return(item.close.High);
+     *      else if (fieldName == "xValue")
+     *          return(item.month);
+     *      else
+     *          return null;
+     * }     
+     * </pre>
+     *
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function get dataFunction():Function
+    {
+        return _dataFunction;   
+    } */
+    
+    /**
+     *  @private
+     */
+    /* public function set dataFunction(value:Function):void
+    {
+        _dataFunction = value;
+        dataChanged();
+    } */
+
+    //---------------------------------
+    // dataTipItems
+    //---------------------------------
+    
+    //[Bindable]
+    //[Inspectable(category="General")]
+    
+    /**
+     *  @private
+     */
+    //private var _dataTipItems:Array /* of ChartItem */;
+    
+    /**
+     *  Array of chart items for which data tips are to be shown
+     *  non-interactively on the chart.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+     // public function get dataTipItems():Array /* of ChartItem */
+     // {
+        // return _dataTipItems;
+     // }
+     
+     /**
+      *  @private
+      */
+     // public function set dataTipItems(value:Array /* of ChartItem */):void
+     // {
+        // _dataTipItems = value;
+        // invalidateProperties();
+     // }
+    
+    //----------------------------------
+    //  displayName
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the displayName property.
+     */
+    /* private var _displayName:String;
+
+    [Inspectable(category="Display")]
+	*/
+    /**
+     *  The name of the series, for display to the user.
+     *  This property is used to represent the series in user-visible labels,
+     *  such as data tips.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function get displayName():String
+    {
+        return _displayName;
+    } */
+    
+    /**
+     *  @private
+     */
+    /* public function set displayName(value:String):void
+    {
+        _displayName = value;
+
+        var c:ChartBase = chart;
+        if (c)
+            c.legendDataChanged();
+    } */
+    
+    //----------------------------------
+    //  filterDataValues
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the filterDataValues property.
+     */
+   /*  private var _filterDataValues:String = "outsideRange";
+    private var _userfilterDataValues:String = "";
+
+    [Inspectable(category="General", enumeration="none,nulls,outsideRange", defaultValue="outsideRange")]
+ */
+    /**
+     *  If <code>filterFuction</code> is set, <code>filterDataValues</code> and
+     *  <code>filterData</code> are ignored.
+     * 
+     *  If <code>filterDataValues</code> property is set to <code>none</code>, 
+     *  series will not filter its data before displaying.
+     * 
+     *  If <code>filterDataValues</code> is set to <code>nulls</code>, series 
+     *  filters data like <code>null</code>, <code>undefined</code>, or <code>NaN</code>
+     *  before displaying.
+     * 
+     *  If this property is set to <code>outsideRange</code>, series 
+     *  filters its data like <code>null</code>, <code>undefined</code>, or <code>NaN</code> 
+     *  and also the values that are outside the range of the chart axes.
+     *
+     *  If you know that all of the data in the series is valid,
+     *  you can set this to <code>none</code> to improve performance.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    /* public function get filterDataValues():String
+    {
+        return _filterDataValues;
+    } */
+    
+    /**
+     *  @private
+     */
+    /* public function set filterDataValues(value:String):void
+    {
+        _filterDataValues = value;
+        _userfilterDataValues = value;
+        invalidateFilter();
+    } */
+    
+    //----------------------------------
+    //  filterData
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the filterData property.
+     */
+    //private var _filterData:Boolean = true;
+
+    //[Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  If <code>filterFuction</code> or <code>filterDataValues</code> is set,  
+     *  <code>filterData</code> is ignored.
+     *  
+     *  <code>true</code> if the series filters its data
+     *  before displaying.
+     *  If a series renders data that contains missing values
+     *  (such as <code>null</code>, <code>undefined</code>, or <code>NaN</code>),
+     *  or renders values that are outside the range of the chart axes,
+     *  this property should be set to <code>true</code> (the default).
+     *  If you know that all of the data in the series is valid,
+     *  you can set this to <code>false</code> to improve performance.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function get filterData():Boolean
+    {
+        return _filterData;
+    } */
+    
+    /**
+     *  @private
+     */
+    /* public function set filterData(value:Boolean):void
+    {
+        _filterData = value;
+        
+        //if user has not specified filterDataValues, we consider filterData.
+        //Else filterDataValues should be given preference
+        
+        if(_userfilterDataValues == "") 
+        {
+            if(value)
+                _filterDataValues = "outsideRange";
+            else
+                _filterDataValues = "none";
+            invalidateFilter();
+        }
+    } */
+    
+    
+    //----------------------------------
+    //  filterFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the filterFunction property.
+     */
+    //private var _filterFunction:Function = defaultFilterFunction;
+
+    //[Inspectable(category="General")]
+
+    /**
+     * Specifies a method that returns the array of chart items in the series
+     * that are to be displayed.
+     * 
+     * If this property is set, the return value of the custom filter function takes 
+     * precedence over the <code>filterDataValues</code> and <code>filterData</code> properties.
+     * But if it returns null, then <code>filterDataValues</code> and <code>filterData</code> will be 
+     * prefered in that order.  
+     * 
+     * <p>The custom <code>filterFunction</code> has the following signature:
+     *  
+     * <pre>
+     * <i>function_name</i> (cache:Array):Array { ... }
+     * </pre>
+     * 
+     * <code>cache</code> is a reference to the array of chart items that are to be filtered.
+     * This function returns an array of chart items that are to be displayed. 
+     * </p>
+     *  
+     * @example
+     * <pre>
+     * public function myFilterFunction(cache:Array):Array {
+     *      var filteredCache:Array=[];
+     *      var n:int = cache.length;  
+     *      for(var i:int = 0; i &lt; n; i++)
+     *      {
+     *          var item:ColumnSeriesItem = ColumnSeriesItem(cache[i]);
+     *          if(item.yNumber &gt; 0 &#38;&#38; item.yNumber &lt; 700)
+     *          {
+     *              filteredCache.push(item);
+     *          }
+     *      }
+     *      return filteredCache;
+     * }
+     * </pre>
+     *
+     * <p>
+     *  If you specify a custom filter function for your chart series and you
+     *  want to filter null values or values outside the range of axes, you must manually 
+     *  filter them using the custom filter function. <code>filterDataValues</code> or
+     *  <code> filterData</code> cannot be used.
+     *  </p>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    /* public function get filterFunction():Function
+    {
+        return _filterFunction;
+    } */
+    
+    /**
+     *  @private
+     */
+    /* public function set filterFunction(value:Function):void
+    {
+        if(value != null)
+            _filterFunction = value;
+        else
+            _filterFunction = defaultFilterFunction;
+
+        invalidateFilter();
+    } */
+    
+    //----------------------------------
+    //  interactive
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the interactive property.
+     */
+    //private var _interactive:Boolean=true;
+
+    //[Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  Determines whether data tips appear when users interact
+     *  with chart data on the screen.
+     *  Set to <code>false</code> to prevent the series
+     *  from showing data tips or generating hit data.
+     *
+     *  @default true
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function get interactive():Boolean
+    {
+        return _interactive;
+    } */
+
+    /**
+     *  @private
+     */
+   /*  public function set interactive(value:Boolean):void
+    {
+        _interactive = value;
+
+        invalidateDisplayList();
+    } */
+
+    //----------------------------------
+    //  legendData
+    //----------------------------------
+
+    //[Inspectable(environment="none")]
+
+    /**
+     *  An Array of LegendData instances that describe the items
+     *  that should show up in a legend representing this series.
+     *  Derived series classes override this getter and return legend data that is
+     *  specific to their styles and data representation method.
+     *  Although most series types return only a single LegendData instance,
+     *  some series types, such as PieSeries and  StackedSeries,
+     *  return multiple instances representing individual items
+     *  in the Array, or multiple ways of rendering data.   
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //public function get legendData():Array /* of LegendData */
+   /*  {
+        return null;
+    } */
+    
+    //----------------------------------
+    //  renderData
+    //----------------------------------
+
+    /**
+     *  Stores the information necessary to render this series.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function get renderData():Object
+    {
+        return null;
+    } */
+
+    //----------------------------------
+    //  selectable
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the selectable property.
+     */
+    //private var _selectable:Boolean=true;
+
+    //[Inspectable(category="General")]
+
+    /**
+     *  Specifies whether a series is selectable or not.
+     *  @default true
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+   /*  public function get selectable():Boolean
+    {
+        return _selectable;
+    } */
+
+    /**
+     *  @private
+     */     
+   /*  public function set selectable(value:Boolean):void
+    {
+        if (_selectable != value)
+        {
+            _selectable = value;
+
+            invalidateProperties();
+        }
+    } */
+
+    //----------------------------------
+    //  selectedIndex
+    //----------------------------------
+    
+    //[Inspectable(category="General")]
+
+    /**
+     *  Index of the selected item in the data provider of the series. If multiple items are selected, 
+     *  then this property refers to the most recently selected item. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+  /*   public function get selectedIndex():int
+    {
+        var len:int;
+        
+        len = _selectedItems.length;
+        if (len > 0)
+            return _selectedItems[len - 1].index;
+        return -1;
+
+    } */
+
+    /**
+     *  @private
+     */
+   /*  public function set selectedIndex(value:int):void
+    {
+        if (_selectedItems.length == 1 && _selectedItems[0].index == value)
+            return;
+    
+        if (items)
+        {
+            var item:ChartItem = null;
+            
+            item = findChartItemFor(value);
+            if (!item)
+                return;
+    
+            _selectionDirtyArray = [];
+            _selectionDirtyArray.push(item);
+            
+            _selectionDirty = true;
+            invalidateProperties();
+        }
+        else
+        {
+            _selectionIndicesDirty = true;
+            _selectionIndicesDirtyArray.push(value);
+            invalidateProperties();
+        }
+    } */
+
+    //----------------------------------
+    //  selectedIndices
+    //----------------------------------
+
+    //[Inspectable(category="General")]
+
+    /**
+     *  An Array of indexes of the selected items in the data provider of the series.
+     *
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */     
+   // public function get selectedIndices():Array /* of int */
+   //  {
+        // var arrItems:Array /* of int */ = [];
+        // var n:int = _selectedItems.length;
+        // for (var i:int = 0; i < n; i++)
+        // {
+            // arrItems.push(_selectedItems[i].index);
+        // }   
+        // return arrItems;
+    // } 
+
+    /**
+     *  @private
+     */
+   // public function set selectedIndices(value:Array /* of int */):void
+   /*  {           
+        if (_selectedItems.length == 0 && value.length == 0)
+            return;
+        
+        if (items)
+        {
+            var item:ChartItem = null;
+            
+            _selectionDirtyArray = [];
+            var n:int  = value.length;            
+            for (var i:int = 0; i < n; i++)
+            {
+                item = findChartItemFor(value[i]);
+                if (item)
+                    _selectionDirtyArray.push(item);
+            }
+            
+            _selectionDirty = true;
+            invalidateProperties();
+        }
+        else
+        {
+            _selectionIndicesDirty = true;
+            _selectionIndicesDirtyArray = value;
+            invalidateProperties();
+        }
+    }
+ */
+    //----------------------------------
+    //  selectedItem
+    //----------------------------------
+
+   // [Inspectable(category="General")]
+
+    /**
+     *  The chart item that is selected in the series. If multiple items are selected, 
+     *  then this property refers to the most recently selected item. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function get selectedItem():ChartItem
+    {
+        var len:int;
+        
+        len = _selectedItems.length;
+        if (len > 0)
+            return _selectedItems[len - 1];
+        return null;
+    } */
+
+   /**
+     *  @private
+     */
+   /*  public function set selectedItem(value:ChartItem):void
+    {   
+        if (_selectedItems.length == 1 && _selectedItems[0] == value)
+            return;
+            
+        _selectionDirtyArray = [];      
+        _selectionDirtyArray.push(value);
+            
+        _selectionDirty = true;
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  selectedItems
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the selectedItems property.
+     */
+   // private var _selectedItems:Array /* of ChartItem */ = [];
+
+   // [Inspectable(category="General")]
+
+    /**
+     *  An Array of chart items that are selected in the series.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */     
+   // public function get selectedItems():Array /* of ChartItem */
+    // {
+        // return _selectedItems;
+    // }
+
+    /**
+     *  @private
+     */
+    // public function set selectedItems(value:Array /* of ChartItem */):void
+    // {   
+        // if (_selectedItems.length == 0 && value.length == 0)
+            // return;
+                    
+        // _selectionDirtyArray = value;
+        // _selectionDirty = true; 
+        // invalidateProperties();
+    // }
+    
+    //----------------------------------
+    //  transitionRenderData
+    //----------------------------------
+
+    /** 
+     *  @private
+     *  Storage for the _transitionRenderData property.
+     */
+    private var _transitionRenderData:Object;
+
+    /**
+     *  A render data structure passed in by a running transtion.
+     *  When a series effect is set to play on a series, it first captures
+     *  the current state of the series by asking for its render data.
+     *  The transition modifies the render data to create the desired effect
+     *  and passes the structure back to the series for display.
+     *  If the <code>transitionRenderData</code> property is a value other than <code>null</code>,
+     *  a series uses its contents to update its display.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function get transitionRenderData():Object
+    {
+        return _transitionRenderData;
+    }
+
+    /** 
+     *  @private
+     */
+    public function set transitionRenderData(value:Object):void
+    {
+        _transitionRenderData = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Calls the <code>legendDataChanged()</code> method.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+   /*  override public function stylesInitialized():void
+    {
+        legendDataChanged();
+    } */
+
+    /**
+     *  @private
+     */
+    /* override public function invalidateSize():void
+    {
+        invalidateTransform();
+
+        super.invalidateSize();     
+    }   */ 
+
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+     override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+       /*  if (_bHideTransitionDirty)
+            _bHideTransitionDirty = false;
+
+        var s:ChartBase = chart;
+        if (s)
+            var cs:uint = s.chartState;
+
+        validateData();
+        validateTransform();
+        validateSelection(); */
+    }
+    
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+   /*  override public function setActualSize(w:Number, h:Number):void
+    {
+        invalidateTransform();
+
+        super.setActualSize(w, h);
+    } */
+    
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* override protected function commitProperties():void
+    {
+        super.commitProperties();
+        if (_dataTipItems && chart)
+        {
+            chart.dataTipItemsSet = true;
+            invalidateDisplayList();
+        }   
+        if (_selectionDirty)
+        {
+            _selectionDirty = false;
+            if (_selectable && chart)
+                chart.seriesSelectionChanged(this,_selectionDirtyArray);    
+        }
+    } */
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: ChartElement
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* override public function mappingChanged():void
+    {
+        invalidateMapping();
+    } */
+    
+    /**
+     *  @private
+     */
+    /* override public function chartStateChanged(oldState:uint, v:uint):void
+    {
+        invalidateDisplayList();
+
+        if (v == ChartState.PREPARING_TO_SHOW_DATA || v == ChartState.NONE)
+            transitionRenderData = null;
+        
+        super.chartStateChanged(oldState,v);
+    } */
+
+    /**
+     *  @private
+     */
+    //override public function collectTransitions(chartState:Number,
+     //                                           transitions:Array /* of IEffectInstance */):void
+    /* {
+        var transition:Effect = null;
+        var instance:IEffectInstance;
+
+        if (chartState == ChartState.PREPARING_TO_HIDE_DATA)
+        {
+            transition = EffectManager.
+                mx_internal::createEffectForType(this,"hideData") as Effect;
+            
+            if (transition)
+            {
+                instance = transition.createInstance(this);
+                if (instance is SeriesEffectInstance)
+                    (instance as SeriesEffectInstance).type = "hide";
+            }
+        }
+
+        else if (chartState == ChartState.PREPARING_TO_SHOW_DATA)
+        {
+            // Our show effect needs fully calculated and updated caches,
+            // so we need to make sure this gets called here.
+            validateProperties(); 
+            
+            transition = EffectManager.
+                mx_internal::createEffectForType(this,"showData") as Effect;
+            
+            if (transition)
+            {
+                instance = transition.createInstance(this);
+                if (instance is SeriesEffectInstance)
+                    (instance as SeriesEffectInstance).type = "show";
+            }
+        }
+
+        if (instance)
+            transitions.push(instance);
+
+        super.collectTransitions(chartState,transitions);
+    } */
+
+    /**
+     *  @copy mx.charts.chartClasses.IChartElement#claimStyles()
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //override public function claimStyles(styles:Array /* of Object */,
+    //                                     firstAvailable:uint):uint
+    /* {
+        internalStyleName = styles[firstAvailable];
+        return (firstAvailable + 1) % styles.length;
+    } */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+    
+        /**
+     *  Gets all the items that are there in the series after filtering.
+     *  <p>Individual series determine the list of items that are to be returned.</p>
+     *  
+     *  @return An Array of ChartItems.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+
+    //public function get items():Array /* of ChartItem */
+    /* {
+        return [];
+    } */
+    
+     /**
+     *  Gets all the items that are in a rectangular region for the series.
+     *  Call this function to determine what items are in
+     *  a particular rectangular region in that series.
+     *  <p>Individual series determine whether their chart item is under the region.
+     *  The point should be in the global coordinate space.</p>
+     *  
+     *  @param value A Rectangle object that defines the region.
+     *  
+     *  @return An Array of ChartItem objects that are within the specified rectangular region.
+     * 
+     *  @see flash.geom.Rectangle
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+   // public function getItemsInRegion(r:Rectangle):Array /* of ChartItem */
+    /* {
+        return [];
+    }
+ */
+    /**
+     *  @private
+     */        
+    /* mx_internal function addItemtoSelection(item:ChartItem):void
+    {
+        _selectedItems.push(item);      
+        item.currentState = ChartItem.SELECTED;
+    } */
+    
+    /**
+     *  @private 
+     */
+     
+   /*  mx_internal function removeItemfromSelection(item:ChartItem, state:String = ChartItem.DISABLED):void
+    {
+        var index:int;
+        
+        index = _selectedItems.indexOf(item);
+        _selectedItems.splice(index,1);
+        item.currentState = state;
+    } */
+    
+    /**
+     *  @private
+     */
+     
+     // mx_internal function setItemsState(state:String):void
+    // {
+        // var items:Array /* of ChartItem */;
+        // items = (renderData)? renderData.filteredCache : [];
+        // if (items) 
+        // {
+            // var n:int  = items.length;
+            // for (var i:int = 0; i < n; i++)
+            // {
+                // items[i].currentState = state;
+            // }   
+        // }   
+    // } 
+    
+    /**
+     *  @private
+     */
+     
+    /* mx_internal function clearSeriesItemsState(clear:Boolean, state:String = ChartItem.NONE):void
+    {
+        if (clear)
+            _selectedItems = [];
+        setItemsState(state);
+    } */
+    
+    /**
+     *  @private
+     */
+   /*  mx_internal function getTransformState():Boolean
+    {
+        return _bTransformDirty;    
+    } */
+    
+    /**
+     *  @private
+     */
+   /*  mx_internal function emptySelectedItems():void
+    {
+        _selectedItems = [];
+    } */
+
+    /**
+     *  @private
+     */    
+   /*  private function validateSelection():void
+    {
+        if (_selectionIndicesDirty)
+        {
+            _selectionIndicesDirty = false;
+            selectedIndices = _selectionIndicesDirtyArray;
+            _selectionIndicesDirtyArray = [];
+        }
+        else if (_selectionDirty == true)
+        {
+            _selectionDirty = false;
+            if (chart)
+                chart.updateKeyboardCache();
+        }
+    } */
+    
+     /**
+     *  @private
+     */    
+   /*  mx_internal function getChartSelectedStatus():Boolean
+    {
+        if (chart)
+            return chart.selectedChartItems.length > 0;
+        return false;
+    } */
+
+    /**
+     *  Caches the values stored in the <code>measureName</code> property
+     *  from the original dataProvider items in the chart item's
+     *  <code>fieldName</code> property.  
+     *  If the the value of the <code>measureName</code> property is <code>null</code>
+     *  or the empty string, this method assumes the original data provider items
+     *  are raw values and caches them instead. 
+     * 
+     *  @param measureName Name of the property of chart item whose value should be set 
+     *  by a value from the dataProvider based on the <code>fieldName</code> property.
+     *  For example, <code>measureName</code> can be the xValue, yValue, xNumber, yNumber, etc,
+     *  provided they are properties of the chart item.
+     *  
+     *  @param cache An array of chart items.
+     *  
+     *  @param fieldName The label (in the data provider's item) whose value should be 
+     *  used to set the chart item's <code>measureName</code> property. For example,
+     *  if the data provider has an item like <code>{Country:"US", medals:10}</code>, 
+     *  then the value of <code>fieldName</code> can be "Country" or "medals".
+     *  
+     *  @return <code>false</code> if the value of the <code>measureName</code> property 
+     *  is the empty string or null; otherwise <code>true</code>.     
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //protected function cacheDefaultValues(measureName:String, cache:Array /* of ChartItem */,
+    //                                      fieldName:String): Boolean
+    /* {
+        var n:int = cache.length;
+        var i:int;
+        var c:Object;
+        
+        if (_dataFunction != null)
+        {
+            for (i = 0; i < n; i++)
+            {
+                c = cache[i];
+                c[fieldName] = dataFunction(this,c.item,fieldName);
+            }
+            return true;    
+        }
+        
+        else if (measureName == "" || measureName == null)
+        {
+            for (i = 0; i < n; i++)
+            {
+                c = cache[i];
+                c[fieldName] = c.item;
+            }
+            return false;
+        }
+        else
+        {
+            for (i = 0; i < n; i++)
+            {
+                c = cache[i];
+                if (c.item == null)
+                    continue;
+                c[fieldName] = c.item[measureName];
+            }
+            return true;
+        }
+    } */
+
+    /**
+     *  Caches the values stored in the <code>measureName</code> property
+     *  from the original dataProvider items in the chart item's
+     *  <code>fieldName</code> property.  
+     *  
+     *  @param measureName Name of the property of chart item whose value should be set 
+     *  by a value from the dataProvider based on the <code>fieldName</code> property.
+     *  For example, <code>measureName</code> can be the xValue, yValue, xNumber, yNumber, etc,
+     *  provided they are properties of the chart item.
+     *  
+     *  @param cache An array of chart items.
+     *  
+     *  @param fieldName The label (in the data provider's item) whose value should be 
+     *  used to set the chart item's <code>measureName</code> property. For example,
+     *  if the data provider has an item like <code>{Country:"US", medals:10}</code>, 
+     *  then the value of <code>fieldName</code> can be "Country" or "medals".
+     *  
+     *  @return <code>false</code> if the value of the <code>measureName</code> property 
+     *  is the empty string or null; otherwise <code>true</code>.     
+    *  
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Royale 0.9.3
+    */
+    // protected function cacheNamedValues(measureName:String, cache:Array /* of ChartItem */,
+     //                                   fieldName:String):Boolean
+    /*{
+        var n:int = cache.length;
+        var c:Object;
+        if (_dataFunction != null)
+        {
+            for (var i:int = 0; i < n; i++)
+            {
+                c = cache[i];
+                c[fieldName] = dataFunction(this,c.item,fieldName);
+            }
+            return true;    
+        }
+        
+        if (measureName == "")
+            return false;
+        
+        for (i = 0; i < n; i++)
+        {
+            c = cache[i];
+            if (c.item == null)
+                continue;
+            c[fieldName] = c.item[measureName];
+        }
+        
+        return true;
+    } */
+
+    /**
+     *  Caches the values stored in the <code>measureName</code> property
+     *  from the original dataProvider items in the chart item's
+     *  <code>fieldName</code> property.  
+     *  If the <code>measureName</code> property is <code>null</code>
+     *  or the empty string, this method stores the index of the items
+     *  in the <code>fieldName</code> property instead.
+     *  
+     *  @param measureName Name of the property of chart item whose value should be set 
+     *  by a value from the dataProvider based on the <code>fieldName</code> property.
+     *  For example, <code>measureName</code> can be the xValue, yValue, xNumber, yNumber, etc,
+     *  provided they are properties of the chart item.
+     *  
+     *  @param cache An array of chart items.
+     *  
+     *  @param fieldName The label (in the data provider's item) whose value should be 
+     *  used to set the chart item's <code>measureName</code> property. For example,
+     *  if the data provider has an item like <code>{Country:"US", medals:10}</code>, 
+     *  then the value of <code>fieldName</code> can be "Country" or "medals".
+     *  
+     *  @return <code>false</code> if the value of the <code>measureName</code> property 
+     *  is the empty string or null; otherwise <code>true</code>.     
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //protected function cacheIndexValues(measureName:String, cache:Array /* of ChartItem */,
+    //                                    fieldName:String):Boolean
+    /* {
+        var n:int = cache.length;
+        var i:int;
+        var c:Object;
+        if (_dataFunction != null)
+        {
+            for (i = 0; i < n; i++)
+            {
+                c = cache[i];
+                c[fieldName] = dataFunction(this,c.item,fieldName);
+            }
+            return true;    
+        }
+
+        if (measureName == "")
+        {
+            for (i = 0; i < n; i++)
+            {
+                c = cache[i];
+                c[fieldName] = c.index;
+            }
+            return false;
+        }
+        else
+        {
+            for (i = 0; i < n; i++)
+            {
+                c = cache[i];
+                if (c.item == null)
+                    continue;
+                c[fieldName] = c.item[measureName];
+            }
+            return true;
+        }
+
+    } */
+    
+    /**
+     *  Extracts the minimum value, maximum value, and, optionally,
+     *  the minimum interval from an Array of ChartItem objects.
+     *  Derived classes can call this method from their 
+     *  implementations of the <code>describeData()</code> method to fill in the details
+     *  of the DataDescription structure.
+     * 
+     *  @param cache An array of chart items.
+     *  
+     *  @param measureName Name of the property of chart item whose value should be set 
+     *  by a value from the dataProvider based on the <code>fieldName</code> property.
+     *  For example, <code>measureName</code> can be the xValue, yValue, xNumber, yNumber, etc,
+     *  provided they are properties of the chart item.
+     *  
+     *  @param desc DataDescription object of the series. This property holds bounded values such
+     *  as <code>min</code>, <code>max</code>, and <code>minInterval</code> of the series.
+     *  
+     *  @param calculateInterval Determines whether to extract the <code>minInterval</code> for the 
+     *  DataDescription <code>desc</code> by using the ChartItem objects in the <code>cache</code> property.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    // protected function extractMinMax(cache:Array /* of ChartItem */, measureName:String,
+                                     // desc:DataDescription,
+                                     // calculateInterval:Boolean = false):void
+   /*  {
+        var n:int = cache.length;
+        var i:int;
+        var v:Number;
+        var prevValidValue:Number;
+        var minInterval:Number = Number.POSITIVE_INFINITY;
+        
+        if (isNaN(desc.min))
+        {           
+            for (i = 0; i < n; i++)
+            {
+                v = cache[i][measureName];
+                if (isNaN(v) == false)
+                    break;
+            }
+
+            if (isNaN(v))
+                return;
+            
+            desc.min = desc.max = v;
+            prevValidValue = v;
+        }
+
+        for (i++; i < n; i++)
+        {
+            v = cache[i][measureName];
+            if (isNaN(v))
+                continue;
+            
+            if (v < desc.min)
+                desc.min = v;
+            if (v > desc.max)
+                desc.max = v;   
+            
+            if (calculateInterval && (v - prevValidValue < minInterval))
+                minInterval = Math.abs(v - prevValidValue);
+            
+            prevValidValue = v;
+        }
+
+        if (calculateInterval &&
+            minInterval < Number.POSITIVE_INFINITY &&
+            (minInterval < desc.minInterval || isNaN(desc.minInterval)))
+        {
+            desc.minInterval = minInterval;
+        }
+    } */
+
+    /**
+     *  Extracts the minimum value, maximum value, and, optionally,
+     *  the minimum interval from an Array of ChartItem objects.
+     *  Derived classes can call this method from their
+     *  implementations of the <code>describeData()</code> method to fill in the details
+     *  of the DataDescription structure.
+     *  
+     *  @param cache An array of chart items.
+     *  
+     *  @param measureName Name of the property of chart item whose value should be set 
+     *  by a value from the dataProvider based on the <code>fieldName</code> property.
+     *  For example, <code>measureName</code> can be the xValue, yValue, xNumber, yNumber, etc,
+     *  provided they are properties of the chart item.
+     *  
+     *  @param desc DataDescription object of the series. This property holds bounded values such
+     *  as <code>min</code>, <code>max</code>, and <code>minInterval</code> of the series.    
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    // protected function extractMinInterval(cache:Array /* of ChartItem */, measureName:String,
+                                          // desc:DataDescription):void
+    /* {
+        var n:int = cache.length;
+        var i:int;
+        var v:Number;
+        var prevValidValue:Number;
+        var minInterval:Number = Number.POSITIVE_INFINITY;
+        
+        for (i = 0; i < n; i++)
+        {
+            v = cache[i][measureName];
+            if (isNaN(v) == false)
+                break;
+        }
+
+        if (isNaN(v))
+            return;
+
+        prevValidValue = v;
+
+        for (i++; i < n; i++)
+        {
+            v = cache[i][measureName];
+            if (isNaN(v))
+                continue;
+            
+            if (v - prevValidValue < minInterval)
+                minInterval = Math.abs(v - prevValidValue);
+            
+            prevValidValue = v;
+        }
+
+        if (minInterval < Number.POSITIVE_INFINITY &&
+            (minInterval < desc.minInterval || isNaN(desc.minInterval)))
+        {
+            desc.minInterval = minInterval;
+        }
+    } */
+
+    /**
+     *  Removes any item from the provided cache whose <code>field</code>
+     *  property is <code>NaN</code>.
+     *  Derived classes can call this method from their implementation of the <code>updateFilter()</code>
+     *  method to remove any ChartItem objects that were filtered out by the axes.
+     *  
+     *  @param cache An array of chart items.
+     *  
+     *  @param field The field property to remove an item from.
+     *  
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //protected function stripNaNs(cache:Array /* of ChartItem */, field:String):void
+   /*  {
+        if (filterDataValues == "none")
+            return;
+            
+        var len:int = cache.length;
+        var start:int = -1;
+        var end:int = -1;
+        var i:int;
+        var n:int  = cache.length;
+        if (field == "")
+        {
+            for (i= n - 1; i >= 0; i--)
+            {
+                if (isNaN(cache[i]))
+                {
+                    if (start < 0)
+                    {
+                        start = end = i;
+                    }
+                    else if (end - 1 == i)
+                    {
+                        end = i;
+                    }
+                    else
+                    {
+                        cache.splice(end, start - end + 1);
+                        start = end = i;
+                    }
+                }
+            }
+        }
+        else
+        {
+            for (i = n - 1; i >= 0; i--)
+            {
+                if (isNaN(cache[i][field]))
+                {
+                    if (start < 0)
+                    {
+                        start = end = i;
+                    }
+                    else if (end - 1 == i)
+                    {
+                        end = i;
+                    }
+                    else
+                    {
+                        cache.splice(end, start - end + 1);
+                        start = end = i;
+                    }
+                }
+            }
+        }
+
+        if (start >= 0)
+            cache.splice(end, start - end + 1);
+    } */
+    
+    /**
+     *  Informs the series that the underlying data
+     *  in the data provider has changed.
+     *  This function triggers calls to the <code>updateData()</code>,
+     *  <code>updateMapping()</code>, <code>updateFilter()</code>,
+     *  and <code>updateTransform()</code> methods on the next call
+     *  to the <code>commitProperties()</code> method.
+     *  If any data effects are assigned to any elements of the chart,
+     *  this method also triggers the show and hide effects.
+     *  
+     *  @param invalid If <code>true</code>, this method triggers calls
+     *  to the update methods.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+   /*  protected function invalidateData(invalid:Boolean = true):void
+    {
+        if (invalid)
+        {
+            _bDataDirty = true;
+            _bMappingDirty = true;
+            _bFilterDirty = true;
+            _bTransformDirty=true;
+            
+            invalidateProperties();
+            invalidateDisplayList();
+        }
+        else
+        {
+            _bDataDirty = false;
+        }
+    } */
+
+    /**
+     *  Informs the series that the mapping of the data into numeric values
+     *  has changed and must be recalculated.
+     *  Calling this function triggers calls to the <code>updateMapping()</code>,
+     *  <code>updateFilter()</code>, and <code>updateTransform()</code> methods
+     *  on the next call to the <code>commitProperties()</code> method.
+     *  If any data effects are assigned to any elements of the chart,
+     *  this method also triggers the show and hide effects.
+     *  
+     *  @param invalid If <code>true</code>, this method triggers calls
+     *  to the update methods.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+   /*  protected function invalidateMapping(invalid:Boolean = true):void
+    {
+        if (invalid)
+        {
+            _bDataDirty = true; // for transitions to work, we need a new cache
+            _bMappingDirty = true;
+            _bFilterDirty = true;
+            _bTransformDirty = true;
+            
+            invalidateTransitions();
+            invalidateDisplayList();
+        }
+        else
+        {
+            _bMappingDirty = true;
+        }
+    }
+ */
+    /**
+     *  Informs the series that the filter of the data against the axes
+     *  has changed and must be recalculated.
+     *  Calling this method triggers calls to the <code>updateFilter()</code>
+     *  and <code>updateTransform()</code> methods on the next call
+     *  to the <code>commitProperties()</code> method.
+     *  If any data effects are assigned to any elements of the chart,
+     *  this method also triggers the show and hide effects.
+     *       
+     *  @param invalid If <code>true</code>, this method triggers calls
+     *  to the update methods.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function invalidateFilter(invalid:Boolean = true):void
+    {
+        if (invalid)
+        {
+            _bFilterDirty = true;
+            _bTransformDirty = true;
+            
+            invalidateTransitions();
+            invalidateDisplayList();
+        }
+        else
+        {
+            _bFilterDirty = false;
+        }
+    } */
+
+    /**
+     *  Informs the series that the transform of the data to screen coordinates
+     *  has changed and must be recalculated.
+     *  Calling this function triggers a call to the
+     *  <code>updateTransform()</code> method on the next call
+     *  to the <code>commitProperties()</code> method.
+     *  
+     *  @param invalid If <code>true</code>, this method triggers calls
+     *  to the update methods.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function invalidateTransform(invalid:Boolean = true):void
+    {
+        if (invalid)        
+        {
+            _bTransformDirty = true;
+        
+            invalidateDisplayList();
+        }
+        else
+        {
+            _bTransformDirty = false;
+        }
+    }
+ */
+    /**
+     *  Informs the series that a significant change has occured
+     *  in the display of data.
+     *  This triggers any ShowData and HideData effects.  
+    *  
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Royale 0.9.3
+    */
+   /*  protected function invalidateTransitions():void
+    {
+        if (_bHideTransitionDirty == false)
+        {
+            _previousTransitionData = renderData;
+                        
+            var s:ChartBase = chart;
+            if (s)
+                s.hideData();
+
+            _bHideTransitionDirty = true;
+        }       
+    } */
+    
+    /**
+     *  Called when the underlying data that the series represents
+     *  has changed and needs to be reloaded from the data provider.
+     *  If you implement custom series types, you should override this method
+     *  and load all data necessary to render the series
+     *  out of the backing data provider.
+     *  You must also be sure to call the <code>super.updateData()</code> method
+     *  in your subclass.
+     *  You do not generally call this method directly.
+     *  Instead, to guarantee that your data has been updated
+     *  at a given point, call the <code>validateData()</code> method
+     *  of the Series class.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function updateData():void
+    {
+        _bDataDirty = false;
+    } */
+    
+    /**
+     *  Called when the underlying data the series represents
+     *  needs to be mapped to numeric representations.
+     *  This can happen either because the underlying data has changed
+     *  or because the axes used to render the series have changed
+     *  in some relevant way.
+     *  If you implement a custom series, you should override this method
+     *  and convert the data represented into numeric values by
+     *  using the <code>mapCache()</code> method of the axes
+     *  that are managed by its associated data transform.
+     *  You must also be sure to call the <code>super.updateMapping()</code> method
+     *  in your subclass.
+     *  You should not generally call this method directly.
+     *  Instead, to guarantee that your data has been mapped
+     *  at a given point, call the <code>validateData()</code> method
+     *  of the Series class.
+     *  You can generally assume that your <code>updateData()</code> method
+     *  has been called prior to this method, if necessary.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function updateMapping():void
+    {
+        _bMappingDirty = false;
+    } */
+    
+    /**
+     *  Called when the underlying data the series represents
+     *  needs to be filtered against the ranges represented by the axes
+     *  of the associated data transform.
+     *  This can happen either because the underlying data has changed
+     *  or because the range of the associated axes has changed.
+     *  If you implement a custom series type, you should override this method
+     *  and filter out any outlying data using the <code>filterCache()</code>
+     *  method of the axes managed by its associated data transform.  
+     *  The <code>filterCache()</code> method converts any values
+     *  that are out of range to <code>NaN</code>.
+     *  You must be sure to call the <code>super.updateFilter()</code> method
+     *  in your subclass.
+     *  You should not generally call this method directly.
+     *  Instead, if you need to guarantee that your data has been filtered
+     *  at a given point, call the <code>validateTransform()</code> method
+     *  of the Series class.
+     *  You can generally assume that your <code>updateData()</code>
+     *  and <code>updateMapping()</code> methods have been called
+     *  prior to this method, if necessary.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function updateFilter():void
+    {
+        _bFilterDirty = false;
+    } */
+    
+    /**
+     *  Called when the underlying data the series represents
+     *  needs to be transformed from data to screen values
+     *  by the axes of the associated data transform. 
+     *  This can happen either because the underlying data has changed,
+     *  because the range of the associated axes has changed,
+     *  or because the size of the area on screen has changed.
+     *  If you implement a custom series type, you should override this method
+     *  and transform the data using the <code>transformCache()</code> method
+     *  of the associated data transform.  
+     *  You must be sure to call the <code>super.updateTransform()</code> method
+     *  in your subclass.
+     *  You should not generally call this method directly.
+     *  Instead, if you need to guarantee that your data has been filtered
+     *  at a given point, call the <code>valiateTransform()</code> method
+     *  of the Series class.
+     *  You can generally assume that your <code>updateData()</code>,
+     *  <code>updateMapping()</code>, and <code>updateFilter()</code> methods
+     *  have been called prior to this method, if necessary.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function updateTransform():void
+    {
+        _bTransformDirty = false;     
+    } */
+        
+    /**
+     *  Calls the <code>updateFilter()</code> and
+     *  <code>updateTransform()</code> methods of the series, if necessary.
+     *  This method is called automatically by the series
+     *  during the <code>commitProperties()</code> method, as necessary,
+     *  but a derived series might call it explicitly
+     *  if the generated values are needed at an explicit time.
+     *  Filtering and transforming of data relies on specific values
+     *  being calculated by the axes, which can in turn
+     *  depend on the data that is displayed in the chart.
+     *  Calling this function at the wrong time might result
+     *  in extra work being done, if those values are updated.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function validateTransform():void
+    {
+        if (dataTransform)
+        {
+            if (_bFilterDirty)
+            {
+                _selectionDirty = true;
+                updateFilter();
+            }
+
+            if (_bTransformDirty)
+            {
+                _selectionDirty = true;
+                updateTransform();
+            }
+        }
+    } */
+
+    /**
+     *  Calls the <code>updateData()</code> and
+     *  <code>updateMapping()</code> methods of the series, if necessary.
+     *  This method is called automatically by the series
+     *  from the <code>commitProperties()</code> method, as necessary,
+     *  but a derived series might call it explicitly
+     *  if the generated values are needed at an explicit time.
+     *  Loading and mapping data against the axes is designed
+     *  to be acceptable by the axes at any time.
+     *  It is safe this method explicitly at any point.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+   /*  protected function validateData():void
+    {
+        if (dataTransform)
+        {
+            if (_bDataDirty)
+            {
+                _selectionDirty = true; 
+                updateData();
+            }
+
+            if (_bMappingDirty)
+            {
+                _selectionDirty = true;
+                updateMapping();
+            }
+        }
+    } */
+
+    /**
+     *  Captures the before and after states of the series for animation. This method
+     *  is typically called by the effects classes.
+     * 
+     *  <p>If you implement a custom series type, you generally do not override this method.
+     *  Instead, you should override the <code>renderData()</code> accessor.</p>
+     *
+     *  @param type Specifies whether the effect is requesting
+     *  a description of the data being hidden, or the new data being shown.
+     *  
+     *  @return A copy of the data needed to represent the data of the series.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function getRenderDataForTransition(type:String):Object
+    {
+        /* if (type == "hide")
+        {
+            return _previousTransitionData;
+        }
+        else
+        {
+            validateData();
+            validateTransform();
+            return renderData;
+        } */return null;
+    }
+
+    /**
+     *  Fills in the <code>elementBounds</code>, <code>bounds</code>,
+     *  and <code>visibleBounds</code> properties of a renderData
+     *  structure that is generated by this series.
+     *  Effect classes call this method to fill in these fields
+     *  for use in implementing various effect types.
+     *  Derived classes should implement this method
+     *  to generate the bounds of the items of the series only when requested.
+     *  
+     *  @param renderData The structure that is generated by this series.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function getElementBounds(renderData:Object):void
+    {
+    }
+
+    /**
+     *  Called by the SeriesInterpolate effect to end an interpolation effect.
+     *  The effect uses this method to complete the interpolation
+     *  and clean up any temporary state associated with the effect.
+     *  
+     *  @param interpolationData An object that defines the source data (for the <code>show</code> effect)
+     *  that represents the "before" state of the series, and the destination data 
+     *  (for the <code>hide</code> effect) that represents the "after" state of the series.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function endInterpolation(interpolationData:Object):void
+    {
+        transitionRenderData = null;
+    }
+     */
+    /**
+     *  Called by the SeriesInterpolate effect to initiate an interpolation effect.
+     *  The effect passes in the source and destination data
+     *  for the series to interpolate between.
+     *  The effect passes the return value of this method
+     *  repeatedly to the <code>interpolate()</code> method of the series 
+     *  to advance the animation for the duration of the effect. 
+     *  The series calculates the data it needs to 
+     *  perform the interpolation and returns it in this method.
+     * 
+     *  @param sourceRenderData The source data for the series to interpolate between.
+     * 
+     *  @param destRenderData The destination data for the series to interpolate between.
+     * 
+     *  @return The data the series needs to perform the interpolation.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function beginInterpolation(sourceRenderData:Object,
+                                       destRenderData:Object):Object
+    {
+        return null;
+    }
+ */
+    /**
+     *  Helper method to implement the interpolation effect.
+     *  A custom series can call this method from its
+     *  <code>beginInterpolation()</code> method to initialize
+     *  a data structure to interpolate  an arbitrary set
+     *  of numeric properties over the life of the effect.
+     *  You can pass that data structure to the
+     *  <code>applyInterpolation()</code> utility method to actually modify
+     *  the values when the <code>interpolate()</code> method is called.
+     *
+     *  @param srcCache An Array of objects whose fields
+     *  contain the beginning values for the interpolation.
+     *
+     *  @param dstCache An Array of objects whose fields
+     *  contain the ending values for the interpolation.
+     *
+     *  @param iProps A hash table whose keys identify the names
+     *  of the properties from the cache to be interpolated.
+     *
+     *  @param cacheType The class to instantiate that holds the delta values
+     *  computed for the interpolation.
+     *  Typically this is <code>null</code>,
+     *  in which case a generic Object is used.
+     *
+     *  @param customData An object containing series-specific data.
+     *  When the initialization process encounters a missing value,
+     *  it calls the <code>getMissingInterpolationValues()</code>
+     *  method of the series to fill in the missing value.
+     *  This custom data is passed to that method,
+     *  and can be used to pass through arbitrary parameters.
+     *
+     *  @return A data structure that can be passed
+     *  to the <code>applyInterpolation()</code> method.
+     * 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+     // protected function initializeInterpolationData(
+                            // srcCache:Array /* of ChartItem */, 
+                            // dstCache:Array /* of ChartItem */,
+                            // iProps:Object, cacheType:Class = null,
+                            // customData:Object = null):Object
+    // {
+        // var interpolationCache:Array /* of ChartItem */ = [];
+        // var deltaCache:Array /* of ChartItem */ = [];
+        // var n:int = Math.max(srcCache.length, dstCache.length);
+
+        // var interpolationSource:Array /* of ChartItem */ = [];
+        
+        // if (!cacheType)
+            // cacheType = Object;
+            
+        // for (var i:int = 0; i < n; i++)
+        // {
+            // var src:ChartItem = srcCache[i];
+            // var dst:ChartItem = dstCache[i];
+
+            // var iobj:ChartItem = dst == null ? src.clone() : dst.clone();
+            // var iSrc:ChartItem = src == null ? dst.clone() : src.clone();
+            
+            // var delta:ChartItem = new cacheType();
+            // var populated:Boolean = false;
+            // var missingSrcValues:Object = {};
+            // var missingDestValues:Object = {};
+            // var bNeedMissingValues:Boolean = false;
+            // var srcValue:Number;
+            // var dstValue:Number;
+            
+            // for (var p:String in iProps)
+            // {
+                // if (src)
+                    // srcValue = src[p];
+                // else
+                    // srcValue = NaN;
+                
+                // if (dst)
+                    // dstValue = dst[p];
+                // else
+                    // dstValue = NaN;
+
+                // if (isNaN(srcValue) || isNaN(dstValue))
+                // {
+                    // bNeedMissingValues = true;
+                    // missingSrcValues[p] = srcValue;
+                    // missingDestValues[p] = dstValue;                    
+                // }
+                // else
+                // {
+                    // iSrc[p] = srcValue;
+                    // iobj[p] = srcValue;
+                    // delta[p] = dstValue - srcValue;             
+                // }
+            // }
+
+            // if (bNeedMissingValues)
+            // {
+                // getMissingInterpolationValues(missingSrcValues, srcCache,
+                                              // missingDestValues, dstCache,
+                                              // i, customData);
+
+                // for (p in missingSrcValues)
+                // {
+                    // srcValue = missingSrcValues[p];
+                    // iSrc[p] = srcValue;
+                    // iobj[p] = srcValue;
+                    // delta[p] = missingDestValues[p] - srcValue;             
+                // }
+            // }
+
+            // interpolationSource[i] = iSrc;
+            // interpolationCache[i] = iobj;
+            // deltaCache[i] = delta;          
+        // }
+                      
+        // var interpolationData:Object =
+        // {
+            // cache: interpolationCache,
+            // interpolationSource: interpolationSource,
+            // deltaCache: deltaCache,
+            // properties: iProps
+        // }
+            
+        // return interpolationData;
+    // }
+  
+    /**
+     *  Fills in missing values in an interpolation structure.
+     *  When a series calls the <code>initializeInterpolationData()</code> method,
+     *  it passes in Arrays of source and destination values
+     *  for the interpolation.
+     *  If either of those two Arrays is incomplete, the series must
+     *  provide "appropriate" placeholder values for the interpolation.
+     *  How those placeholder values are determined
+     *  is specific to the series type.
+     *  Series extenders should override this method
+     *  to provide those placeholder values.
+     *
+     *  @param sourceProps An object containing the source values
+     *  being interpolated for a particular item.
+     *  When this method exits, all properties in this object
+     *  should have values other than <code>NaN</code>.
+     *
+     *  @param srcCache The Array of source chart items that are being interpolated.
+     *
+     *  @param destProps An object containing the destination values
+     *  that are being interpolated for a particular item.
+     *  When this method exits, all properties in this Object
+     *  should have values other than <code>NaN</code>.
+     *
+     *  @param destCache The Array of destination chart items that are being interpolated.
+     *
+     *  @param index The index of the item that is being populated in the cache.  
+     *
+     *  @param customData The data that was passed by the series
+     *  into the <code>initializeInterpolationData()</code> method.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    // protected function getMissingInterpolationValues(
+                            // sourceProps:Object, srcCache:Array /* of ChartItem */,
+                            // destProps:Object, destCache:Array /* of ChartItem */,
+                            // index:Number, customData:Object):void
+    // {
+    // }
+
+    /**
+     *  Called by the SeriesInterpolate effect to advance an interpolation.
+     *  The effect calls this once per frame until the interpolation
+     *  is complete.
+     *  The series is responsible for using the parameters
+     *  to render the interpolated values.
+     *  By default, the series assumes that <code>interpolationData</code>
+     *  is a data structure returned by the
+     *  <code>initializeInterpolationData()</code> method, and passes it
+     *  through to the <code>applyInterpolation()</code> method.
+     *
+     *  @param interpolationValues An Array of Numbers, each ranging
+     *  from 0 to 1, where the <i>n</i>th number indicates the percentage
+     *  of the way in which the <i>n</i>th value in the data series should be
+     *  interpolated between the start and end values.
+     *
+     *  @param interpolationData The data returned from the
+     *  <code>beginInterpolation()</code> method.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    // public function interpolate(interpolationValues:Array /* of Number */,
+                                // interpolationData:Object):void
+    // {
+        // applyInterpolation(interpolationData, interpolationValues);
+    // }
+
+    /**
+     *  @private
+     */
+    // private function applyInterpolation(interpolationData:Object,
+                                        // interpolationValues:Array /* of Number */):void
+    // {       
+        // var n:int = interpolationValues.length;
+        // var srcCache:Array /* of ChartItem */ = interpolationData.interpolationSource;
+        // var deltaCache:Array /* of ChartItem */ = interpolationData.deltaCache;
+        // var interpolationCache:Array /* of ChartItem */ = interpolationData.cache;
+        // var iProps:Object = interpolationData.properties;
+
+        // n = interpolationCache.length;
+        // for (var i:int = 0; i < n; i++)
+        // {
+            // var interpValue:Number = interpolationValues[i];
+            // var src:Object = srcCache[i];
+            // var delta:Object = deltaCache[i];           
+            // var interp:Object  = interpolationCache[i];
+            // for (var p:String in iProps)
+            // {
+                // interp[p] = src[p] + delta[p] * interpValue;    
+            // }
+        // }
+    // }
+    
+    /**
+     *  Updates the Legend items when the series display name changes
+     *  by dispatching a new LegendDataChanged event.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function legendDataChanged():void
+    {
+        var c:ChartBase = chart;
+        if (c)
+            c.legendDataChanged();
+    } */
+
+   /**
+     *  Gets a ChartItem from the series'
+     *  data provider. Returns null if the specified value is outside
+     *  of the bounds of the series' data provider.
+     * 
+     *  @param value The index of the ChartItem in the series' data provider.
+     *  
+     *  @return The ChartItem for the specified index.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    // private function findChartItemFor(value:int):ChartItem
+    // {
+        // var items:Array /* of ChartItem */;
+        // var item:ChartItem = null;
+        
+        // items = (renderData)? renderData.filteredCache : [];
+        // var n:int = items.length;
+        // for (var i:int = 0; i < n; i++)
+        // {
+            // if (items[i].index == value)
+            // {
+                // item = items[i];
+                // break;
+            // }
+        // }
+        // return item;
+    // }
+    
+    /**
+     *  This is used if you do not set a custom function as the filterFunction for the series.
+     *  Individual series should overwrite this.
+     * 
+     *  @param cache An array of objects.
+     * 
+     *  @return An array of objects.
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */ 
+    // protected function defaultFilterFunction(cache:Array /*of Object*/):Array /*of Object*/
+    // {
+        // return [];
+    // }
+    
+    /**
+     *  You typically retrieve the Axis instance directly through a named property
+     *  (such as for a Cartesian-based series <code>horizontalAxis</code>, <code>verticalAxis</code>,
+     *  or <code>radiusAxis</code>).
+     *  
+     *  <p>This is a low-level accessor.</p>
+     *  
+     *  @param dimension The dimension that you want the axis for.
+     *  
+     *  @return The Axis instance for a particular dimension of the chart.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function getAxis(dimension:String):IAxis
+    {
+        return dataTransform.getAxis(dimension);
+    } */
+
+    /**
+     *  Assigns an Axis instance to a particular dimension of the chart.
+     *  You typically set the Axis instance directly through a named property
+     *  (such as for a Cartesian-based series <code>horizontalAxis</code>, <code>verticalAxis</code>,
+     *  or <code>radiusAxis</code>).
+     *  
+     *  <p>This is a low-level accessor.</p>
+     *  
+     *  @param dimension The dimension of the chart that you want to assign the Axis to.
+     *  
+     *  @param value The Axis to assign to the chart's dimension.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function setAxis(dimension:String, value:IAxis):void
+    {
+        dataTransform.setAxis(dimension, value);
+    } */
+
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers: ChartElement
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+   /*  override protected function dataChanged():void
+    {
+        invalidateData();
+
+        super.dataChanged();
+    } */
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* private function transformChangeHandler(event:FlexEvent):void
+    {
+        invalidateTransform();
+    }
+     */
+    /**
+     *  The default handler for the <code>dragStart</code> event.
+     *
+     *  @param event The DragEvent object.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    /*  protected function dragStartHandler(event:DragEvent):void
+    {
+        if(chart)
+            chart.dragStartHandler(event);                   
+    }  */
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/events/ChartItemEvent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/events/ChartItemEvent.as
new file mode 100644
index 000000000..ca2b833bd
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/events/ChartItemEvent.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 mx.charts.events
+{
+
+/* import flash.events.Event;
+import flash.events.MouseEvent;
+import flash.display.InteractiveObject;
+import flash.geom.Point; */
+import mx.charts.HitData;
+import mx.charts.chartClasses.ChartBase;
+import org.apache.royale.events.MouseEvent;
+import org.apache.royale.events.Event;
+import org.apache.royale.events.IRoyaleEvent;
+import org.apache.royale.geom.Point;
+/**
+ * The ChartItemEvent class represents events that are specific
+ * to the chart components, such as when a chart item is clicked.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class ChartItemEvent extends  org.apache.royale.events.MouseEvent
+{
+  //  include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Event type constant; indicates that the user clicked the mouse button
+	 *  over a chart item representing data in the chart.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public static const ITEM_CLICK:String = "itemClick";
+	
+	
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *	Constructor.
+	 *
+	 *	@param type The type of the event.
+	 *
+	 *	@param hitSet An array of HitData structures describing
+	 *  the ChartItems that triggered the event.
+	 *
+	 *	@param triggerEvent The MouseEvent that triggered this ChartItemEvent.
+	 *
+	 *	@param target The chart on which the event was triggered.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public function ChartItemEvent(type:String, hitSet:Array=null,
+								   triggerEvent:MouseEvent=null, target:ChartBase=null)
+	{	
+		
+		
+		super(type, bubbles, cancelable,
+			  0,0, relatedObject,
+			  ctrlKey, altKey, shiftKey, buttonDown, delta);		
+		
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  hitData
+    //----------------------------------
+
+	[Inspectable(environment="none")]
+
+	/** 
+	 *  The first item in the hitSet array.
+	 *  This is a convenience function for developers who don't care
+	 *  about events corresponding to multiple items.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public function get hitData():HitData
+	{
+	return null;
+	}
+
+    
+		
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------
+
+	/** 
+	 *	@private
+	 */
+	override public function cloneEvent():IRoyaleEvent
+	{
+		return new ChartItemEvent(type, null, this,ChartBase(this.target));
+	}
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/renderers/ShadowLineRenderer.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/renderers/ShadowLineRenderer.as
new file mode 100644
index 000000000..87278d452
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/renderers/ShadowLineRenderer.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 mx.charts.renderers
+{
+/* 
+import flash.filters.DropShadowFilter;
+import mx.charts.chartClasses.GraphicsUtilities;
+import mx.core.IDataRenderer;
+import mx.graphics.IStroke;
+import mx.skins.ProgrammaticSkin; */
+
+/**
+ *  An implementation of a line segment renderer
+ *  that is used by LineSeries objects.
+ *  This class renders a line on screen with a dropshadow by using
+ *  the stroke and form defined by the owning series's
+ *  <code>lineStroke</code> and <code>form</code> styles, respectively.
+ *  <p>ShadowLineRenderer is the default lineSegmentRenderer
+ *  for the LineSeries class.</p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class ShadowLineRenderer
+{
+
+ //extends ProgrammaticSkin implements IDataRenderer
+   // include "../../core/Version.as";
+
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public function ShadowLineRenderer() 
+	{
+		//super();
+
+		//filters = FILTERS;		
+	}
+
+    
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/AreaSeries.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/AreaSeries.as
new file mode 100644
index 000000000..d11307ff6
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/AreaSeries.as
@@ -0,0 +1,203 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts.series
+{
+/* 
+import flash.display.DisplayObject;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.utils.Dictionary;
+
+import mx.charts.DateTimeAxis;
+import mx.charts.HitData;
+import mx.charts.chartClasses.BoundedValue;
+import mx.charts.chartClasses.CartesianChart;
+import mx.charts.chartClasses.CartesianTransform;
+import mx.charts.chartClasses.DataDescription;
+import mx.charts.chartClasses.GraphicsUtilities;
+import mx.charts.chartClasses.IAxis;
+import mx.charts.chartClasses.IStackable;
+import mx.charts.chartClasses.IStackable2;
+import mx.charts.chartClasses.InstanceCache;
+import mx.charts.chartClasses.LegendData;
+import mx.charts.chartClasses.NumericAxis;
+import mx.charts.chartClasses.Series;
+import mx.charts.chartClasses.StackedSeries;
+import mx.charts.renderers.AreaRenderer;
+import mx.charts.series.items.AreaSeriesItem;
+import mx.charts.series.renderData.AreaSeriesRenderData;
+import mx.charts.styles.HaloDefaults;
+import mx.collections.CursorBookmark;
+import mx.core.ClassFactory;
+import mx.core.IDataRenderer;
+import mx.core.IFactory;
+import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModuleFactory;
+import mx.core.mx_internal;
+import mx.graphics.IFill;
+import mx.graphics.IStroke;
+import mx.graphics.SolidColor;
+import mx.graphics.SolidColorStroke;
+import mx.styles.CSSStyleDeclaration;
+import mx.styles.ISimpleStyleClient;
+
+use namespace mx_internal;
+
+include "../styles/metadata/FillStrokeStyles.as"
+include "../styles/metadata/ItemRendererStyles.as" */
+
+
+/**
+ *  Defines a data series for an AreaChart control. By default, this class uses the AreaRenderer itemRenderer.
+ *  Optionally, you can define a different itemRenderer for the 
+ *  data series. The itemRenderer must implement the IDataRenderer interface. 
+ *  
+ *  @mxml
+ *  
+ *  <p>The <code>&lt;mx:AreaSeries&gt;</code> tag inherits all the properties
+ *  of its parent classes and adds the following properties:</p>
+ *  
+ *  <pre>
+ *  &lt;mx:AreaSeries
+ *    <strong>Properties</strong>
+ *    fillFunction="<i>Internal fill function</i>"
+ *    horizontalAxis="<i>No default</i>"
+ *    minField="null"
+ *    sortOnXField="<i>true</i>"
+ *    stacker="<i>No default</i>"
+ *    stackTotals="<i>No default</i>"
+ *    xField="null"
+ *    verticalAxis="<i>No default</i>"
+ *    yField="null"
+ * 
+ *    <strong>Styles</strong>
+ *    adjustedRadius="2"
+ *    areaFill="<i>IFill</i>"
+ *    areaRenderer="<i>areaRenderer</i>"
+ *    areaStroke="<i>Stroke</i>"
+ *    fill="<i>IFill; no default</i>"
+ *    fills="<i>IFill; no default</i>"
+ *    form="<i>segment|curve|horizontal|reverseStep|step|vertical</i>"
+ *    itemRenderer="<i>itemRenderer</i>"
+ *    legendMarkerRenderer="<i>Defaults to series's itemRenderer</i>"
+ *    radius="4"
+ *    stroke="<i>IStroke; no default</i>"
+ *  /&gt;
+ *  </pre>
+ *  
+ *  @see mx.charts.AreaChart
+ *  
+ *  @includeExample ../examples/Line_AreaChartExample.mxml
+ *  
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class AreaSeries 
+{
+//extends Series implements IStackable2
+   // include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class initialization
+    //
+    //--------------------------------------------------------------------------
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function AreaSeries()
+    {
+        super();
+
+      /*   _instanceCache = new InstanceCache(null, this, 1);
+        _instanceCache.creationCallback = applyItemRendererProperties;
+        
+        dataTransform = new CartesianTransform();
+
+		// our style settings
+		initStyles(); */
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+	
+
+    //----------------------------------
+    //  yField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the yField property.
+     */
+    private var _yField:String = "";
+
+    [Inspectable(category="General")]
+    
+    /**
+     *  Specifies the field of the data provider that determines the position of the data point on the vertical axis. 
+     *  If <code>null</code>, the AreaSeries assumes the dataProvider 
+     *  is an Array of numbers, and uses the numbers as values for the data points. 
+     *  
+     *  @default null
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get yField():String
+    {
+        return _yField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set yField(value:String):void
+    {
+        _yField = value;
+
+        //dataChanged();
+    }
+    
+}
+
+}
+
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/BarSeries.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/BarSeries.as
new file mode 100644
index 000000000..05947e840
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/BarSeries.as
@@ -0,0 +1,114 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts.series
+{
+
+import org.apache.royale.charts.supportClasses.BarSeries;
+
+
+
+/**
+ *  Defines a data series for a BarChart control.
+ *  By default, this class uses the BoxItemRenderer class. 
+ *  Optionally, you can define an itemRenderer for the data series.
+ *  The itemRenderer must implement the IDataRenderer interface. 
+ *
+ *  @mxml
+ *  
+ *  <p>The <code>&lt;mx:BarSeries&gt;</code> tag inherits all the properties
+ *  of its parent classes and adds the following properties:</p>
+ *  
+ *  <pre>
+ *  &lt;mx:BarSeries
+ *    <strong>Properties</strong>
+ *    barWidthRatio=".65"
+ *    fillFunction="<i>Internal fill function</i>"
+ *    horizontalAxis="<i>No default</i>"
+ *    labelField="<i>No default</i>"
+ *    labelFunction="<i>No default</i>"
+ *    maxBarWidth="<i>No default</i>"
+ *    minField="null"
+ *    offset="<i>No default</i>"
+ *    stacker="<i>No default</i>"
+ *    stackTotals="<i>No default</i>"
+ *    verticalAxis="<i>No default</i>" 
+ *    xField="null"
+ *    yField="null"
+ *  
+ *    <strong>Styles</strong>
+ *    fill="<i>IFill; no default</i>"
+ *    fills="<i>IFill; no default</i>"
+ *    fontFamily="Verdana"
+ *    fontSize="10"
+ *    fontStyle="italic|normal"
+ *    fontWeight="bold|normal"
+ *    labelAlign="center|left|right"
+ *    labelPosition="none|inside|outside"
+ *    labelSizeLimit="9"
+ *    itemRenderer="<i>itemRenderer</i>"
+ *    legendMarkerRenderer="<i>Defaults to series's itemRenderer</i>"
+ *    stroke="<i>IStroke; no default</i>"
+ *    textDecoration="underline|none"
+ *  /&gt;
+ *  </pre>
+ *  
+ *  @see mx.charts.BarChart
+ *  
+ *  @includeExample ../examples/Column_BarChartExample.mxml
+ *  
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class BarSeries extends org.apache.royale.charts.supportClasses.BarSeries
+{
+    
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */ 
+    public function BarSeries()
+    {
+        super();
+
+       
+    }
+    
+    
+    
+    
+	
+}
+
+}
+
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/ColumnSeries.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/ColumnSeries.as
new file mode 100644
index 000000000..d938c835d
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/ColumnSeries.as
@@ -0,0 +1,122 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts.series
+{
+/* 
+import flash.display.DisplayObject;
+import flash.display.Graphics;
+import flash.display.Sprite;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.system.ApplicationDomain;
+import flash.utils.Dictionary; 
+
+import mx.charts.ColumnChart;
+import mx.charts.DateTimeAxis;
+import mx.charts.HitData;
+import mx.charts.chartClasses.CartesianChart;
+import mx.charts.chartClasses.CartesianTransform;
+import mx.charts.chartClasses.DataDescription;
+import mx.charts.chartClasses.GraphicsUtilities;
+import mx.charts.chartClasses.IAxis;
+import mx.charts.chartClasses.IColumn;
+import mx.charts.chartClasses.IStackable;
+import mx.charts.chartClasses.IStackable2;
+import mx.charts.chartClasses.InstanceCache;
+import mx.charts.chartClasses.LegendData;
+import mx.charts.chartClasses.NumericAxis;
+import mx.charts.chartClasses.Series;
+import mx.charts.chartClasses.StackedSeries;
+import mx.charts.renderers.BoxItemRenderer;
+import mx.charts.series.items.ColumnSeriesItem;
+import mx.charts.series.renderData.ColumnSeriesRenderData;
+import mx.charts.styles.HaloDefaults;
+import mx.collections.CursorBookmark;
+import mx.core.ClassFactory;
+import mx.core.IDataRenderer;
+import mx.core.IFactory;
+import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModuleFactory;
+import mx.core.IUITextField;
+import mx.core.LayoutDirection;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.core.mx_internal;
+import mx.graphics.IFill;
+import mx.graphics.SolidColor;
+import mx.styles.CSSStyleDeclaration;
+import mx.styles.ISimpleStyleClient;*/
+import org.apache.royale.charts.supportClasses.ColumnSeries;
+
+
+/**
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class ColumnSeries extends org.apache.royale.charts.supportClasses.ColumnSeries
+{
+ 
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */ 
+    public function ColumnSeries()
+    {
+        super();
+
+       /*  _instanceCache = new InstanceCache(null,this);
+        _instanceCache.creationCallback = applyItemRendererProperties;
+        
+        _labelLayer = new UIComponent();
+        _labelLayer.styleName = this;
+        
+        labelCache = new InstanceCache(getLabelClass(),_labelLayer);
+        labelCache.discard = true;
+        labelCache.properties =
+        {
+            styleName: this
+        };
+            
+        dataTransform = new CartesianTransform();
+
+        // our style settings
+        initStyles(); */
+    }
+    
+  
+    
+    
+}
+
+}
+
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/LineSeries.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/LineSeries.as
new file mode 100644
index 000000000..564d7cefa
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/LineSeries.as
@@ -0,0 +1,2225 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts.series
+{
+
+/* import flash.display.DisplayObject;
+import flash.display.Graphics;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.utils.Dictionary;
+
+import mx.charts.DateTimeAxis;
+import mx.charts.HitData;
+import mx.charts.chartClasses.BoundedValue;
+import mx.charts.chartClasses.CartesianChart;
+import mx.charts.chartClasses.CartesianTransform;
+import mx.charts.chartClasses.DataDescription;
+import mx.charts.chartClasses.GraphicsUtilities;
+import mx.charts.chartClasses.IAxis;
+import mx.charts.chartClasses.InstanceCache;
+import mx.charts.chartClasses.LegendData;
+import mx.charts.chartClasses.NumericAxis;
+import mx.charts.chartClasses.Series;
+import mx.charts.renderers.LineRenderer;
+import mx.charts.series.items.LineSeriesItem;
+import mx.charts.series.items.LineSeriesSegment;
+import mx.charts.series.renderData.LineSeriesRenderData;
+import mx.charts.styles.HaloDefaults;
+import mx.collections.CursorBookmark;
+import mx.core.ClassFactory;
+import mx.core.IDataRenderer;
+import mx.core.IFactory;
+import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModuleFactory;
+import mx.core.mx_internal;
+import mx.graphics.IFill;
+import mx.graphics.IStroke;
+import mx.graphics.LinearGradientStroke;
+import mx.graphics.SolidColor;
+import mx.graphics.SolidColorStroke;
+import mx.graphics.Stroke;
+import mx.styles.CSSStyleDeclaration;
+import mx.styles.ISimpleStyleClient;
+
+use namespace mx_internal;
+
+include "../styles/metadata/FillStrokeStyles.as"
+include "../styles/metadata/ItemRendererStyles.as"
+ */
+ import org.apache.royale.charts.supportClasses.LineSeries;
+ 
+/**
+ *  Specifies the number of pixels by which radius of the chart item is to be 
+ *  increased when highlighted or selected.
+ * 
+ *  @default 2
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="adjustedRadius", type="Number", format="Length", inherit="yes")]
+
+/**
+ *  Specifies an Array of fill objects that define the fill for
+ *  each item in the series. This takes precedence over the <code>fill</code> style property.
+ *  If a custom method is specified by the <code>fillFunction</code> property, that takes precedence over this Array.
+ *  If you do not provide enough Array elements for every item,
+ *  Flex repeats the fill from the beginning of the Array.
+ *  
+ *  <p>To set the value of this property using CSS:
+ *   <pre>
+ *    LineSeries {
+ *      fills:#CC66FF, #9966CC, #9999CC;
+ *    }
+ *   </pre>
+ *  </p>
+ *  
+ *  <p>To set the value of this property using MXML:
+ *   <pre>
+ *    &lt;mx:LineSeries ... &gt;
+ *     &lt;mx:fills&gt;
+ *      &lt;mx:SolidColor color="0xCC66FF"/&gt;
+ *      &lt;mx:SolidColor color="0x9966CC"/&gt;
+ *      &lt;mx:SolidColor color="0x9999CC"/&gt;
+ *     &lt;/mx:fills&gt;
+ *    &lt;/mx:LineSeries&gt;
+ *   </pre>
+ *  </p>
+ *  
+ *  <p>
+ *  If you specify the <code>fills</code> property and you
+ *  want to have a Legend control, you must manually create a Legend control and 
+ *  add LegendItems to it.
+ *  </p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="fills", type="Array", arrayType="mx.graphics.IFill", inherit="no")]
+
+/**
+ *  Specifies the line type for the chart.
+ *  Possible values are:
+ *  <ul>
+ *    <li><code>"curve"</code>:
+ *    Draws curves between data points.</li>
+ *    
+ *    <li><code>"horizontal"</code>:
+ *    Draws only the vertical line from the x-coordinate
+ *    of the first point to the x-coordinate of the second point
+ *    at the y-coordinate of the second point.
+ *    Repeats this for each data point.</li>
+ *    
+ *    <li><code>"vertical"</code>:
+ *    Draws only the vertical line from the y-coordinate
+ *    of the first point to the y-coordinate of the second point
+ *    at the x-coordinate of the second point.
+ *    Repeats this for each data point.</li>
+ *    
+ *    <li><code>"segment"</code>:
+ *    Draws lines as connected segments that are angled
+ *    to connect at each data point in the series.</li>
+ *    
+ *    <li><code>"step"</code>:
+ *    Draws lines as horizontal segments.
+ *    At the first data point, draws a horizontal line
+ *    and then a vertical line to the second point,
+ *    and repeats for each data point.</li>
+ *    
+ *    <li><code>"reverseStep"</code>:
+ *    Draws lines as horizontal segments.
+ *    At the first data point, draws a vertical line
+ *    and then a horizontal line to the second point,
+ *    and repeats for each data point.</li>
+ *  </ul>
+ *  The default is <code>"segment"</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="form", type="String", enumeration="segment,step,reverseStep,vertical,horizontal,curve", inherit="no")]
+
+/**
+ *  A factory that represents the class the series uses
+ *  to represent the individual line segments in the series.
+ *  This class is instantiated once
+ *  for each distinct segment of the series.
+ *  Classes used as lineSegmentRenderers should implement
+ *  the IFlexDisplayObject, ISimpleStyleClient, and IDataRenderer interfaces.
+ *  The <code>data</code> property is assigned an instance of
+ *  mx.charts.series.items.LineSeriesSegment
+ *  that describes the segment to render.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="lineSegmentRenderer", type="mx.core.IFactory", inherit="no")]
+
+/** 
+  *  Sets the stroke for the actual line segments. 
+  *  The default value for a LineChart control is orange (<code>0xE48701</code>). 
+  *  The default color for a LineSeries used in a CartesianChart control is black (<code>0x000000</code>). 
+  *  The default value for the width is 3.
+  *  
+  *  @langversion 3.0
+  *  @playerversion Flash 9
+  *  @playerversion AIR 1.1
+  *  @productversion Flex 3
+  */
+[Style(name="lineStroke", type="mx.graphics.IStroke", inherit="no")]
+
+/** 
+ *  Specifies the radius, in pixels, of the chart elements for the data points.
+ *  This property applies only if you specify an item renderer
+ *  using the <code>itemRenderer</code> property.  
+ *  You can specify the <code>itemRenderer</code> in MXML or using styles.  
+ *  
+ *  @default 4 
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="radius", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Defines a data series for a LineChart control.
+ *  By default, this class uses the ShadowLineRenderer class. 
+ *  Optionally, you can define an itemRenderer for the data series.
+ *  The itemRenderer must implement the IDataRenderer interface. 
+ *
+ *  @mxml
+ *  
+ *  <p>The <code>&lt;mx:LineSeries&gt;</code> tag inherits all the properties
+ *  of its parent classes and adds the following properties:</p>
+ *  
+ *  <pre>
+ *  &lt;mx:LineSeries
+ *    <strong>Properties</strong>
+ *    fillFunction="<i>Internal fill function</i>"
+ *    horizontalAxis="<i>No default</i>"
+ *    interpolateValues="false|true"
+ *    sortOnXField="false|true"
+ *    verticalAxis="<i>No default</i>"
+ *    xField="null"
+ *    yField="null"
+ * 
+ *    <strong>Styles</strong>
+ *    adjustedRadius="2"
+ *    fill="0xFFFFFF"
+ *    fills="<i>IFill; no default</i>"
+ *    form="segment|curve|horizontal|reverseStep|step|vertical"
+ *    itemRenderer="<i>itemRenderer</i>"
+ *    legendMarkerRenderer="<i>Defaults to series's itemRenderer</i>"
+ *    lineSegmentRenderer="<i>ShadowLineRenderer</i>"
+ *    lineStroke="Stroke(0xE47801,3)"
+ *    radius="4"
+ *    stroke="<i>IStroke; no default</i>" 
+ *  /&gt;
+ *  </pre>
+ *  
+ *  @see mx.charts.LineChart
+ *  @see mx.core.IDataRenderer
+ *  
+ *  @includeExample ../examples/Line_AreaChartExample.mxml
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class LineSeries extends org.apache.royale.charts.supportClasses.LineSeries
+{     //extends Series
+    //include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class initialization
+    //
+    //--------------------------------------------------------------------------
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function LineSeries()
+    {
+        super();
+
+      /*   _pointInstanceCache = new InstanceCache(null, this, 1000);
+        _pointInstanceCache.creationCallback = applyItemRendererProperties;
+        
+        _segmentInstanceCache = new InstanceCache(null, this, 0);
+        _segmentInstanceCache.properties = { styleName: this };
+        
+        dataTransform = new CartesianTransform();
+
+        // our style settings
+        initStyles(); */
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+    
+	 //----------------------------------
+    //  displayName copied from Series
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the displayName property.
+     */
+    private var _displayName:String;
+
+    [Inspectable(category="Display")]
+
+    /**
+     *  The name of the series, for display to the user.
+     *  This property is used to represent the series in user-visible labels,
+     *  such as data tips.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get displayName():String
+    {
+        return _displayName;
+    }
+    
+    /**
+     *  @private
+     */
+    public function set displayName(value:String):void
+    {
+        _displayName = value;
+
+      /*   var c:ChartBase = chart;
+        if (c)
+            c.legendDataChanged(); */
+    }
+	
+	
+	//----------------------------------
+    //  styleName copied from UIComponent
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the styleName property.
+     */
+    private var _styleName:Object /* String, CSSStyleDeclaration, or UIComponent */;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  The class style used by this component. This can be a String, CSSStyleDeclaration
+     *  or an IStyleClient.
+     *
+     *  <p>If this is a String, it is the name of one or more whitespace delimited class
+     *  declarations in an <code>&lt;fx:Style&gt;</code> tag or CSS file. You do not include the period
+     *  in the <code>styleName</code>. For example, if you have a class style named <code>".bigText"</code>,
+     *  set the <code>styleName</code> property to <code>"bigText"</code> (no period).</p>
+     *
+     *  <p>If this is an IStyleClient (typically a UIComponent), all styles in the
+     *  <code>styleName</code> object are used by this component.</p>
+     *
+     *  @default null
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get styleName():Object /* String, CSSStyleDeclaration, or UIComponent */
+    {
+        return _styleName;
+    }
+
+    /**
+     *  @private
+     */
+    public function set styleName(value:Object /* String, CSSStyleDeclaration, or UIComponent */):void
+    {
+        if (_styleName === value)
+            return;
+
+        _styleName = value;
+
+        // If inheritingStyles is undefined, then this object is being
+        // initialized and we haven't yet generated the proto chain.
+        // To avoid redundant work, don't bother to create
+        // the proto chain here.
+       /*  if (inheritingStyles == StyleProtoChain.STYLE_UNINITIALIZED)
+            return;
+
+        regenerateStyleCache(true);
+
+        initThemeColor();
+
+        styleChanged("styleName");
+
+        notifyStyleChangeInChildren("styleName", true); */
+    }
+	
+	
+    /**
+     *  @private
+     */
+    //private static var _moduleFactoryInitialized:Dictionary = new Dictionary(true);
+
+    
+    /**
+     *  @private
+     */
+    //private var _pointInstanceCache:InstanceCache;
+    
+    /**
+     *  @private
+     */
+    //private var _renderData:LineSeriesRenderData;   
+
+    /**
+     *  @private
+     */
+    //private var _segmentInstanceCache:InstanceCache;
+    
+    /**
+     *  @private
+     */
+    //private var _localFills:Array /* of IFill */;
+    
+        
+    /**
+     *  @private
+     */
+    //private var _fillCount:int;
+     
+    /**
+     * @private
+     */
+   // private var _bAxesDirty:Boolean = false;
+     
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  legendData
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    // override public function get legendData():Array /* of LegendData */
+    // {
+        // if (fillFunction!=defaultFillFunction || _fillCount!=0)
+        // {
+            // var keyItems:Array /* of LegendData */ = [];
+            // return keyItems;
+        // }
+        // var radius:Number = getStyle("radius")
+        // var itemRenderer:IFactory = getStyle("itemRenderer");
+
+        // var markerAspectRatio:Number;
+        // var color:int = 0;
+        // var marker:IFlexDisplayObject;
+        
+        // var ld:LegendData = new LegendData();
+        // ld.element = this;
+        // ld.label = displayName; 
+        
+        
+        // var markerFactory:IFactory = getStyle("legendMarkerRenderer");
+        // if (markerFactory)
+        // {
+            // marker = markerFactory.newInstance();
+            // if (marker is ISimpleStyleClient)
+                // (marker as ISimpleStyleClient).styleName = this;
+            // ld.aspectRatio = 1;
+        // }
+        // else if (!itemRenderer || radius == 0 || isNaN(radius))
+        // {
+            // marker = new LineSeriesLegendMarker(this);          
+        // }
+        // else
+        // {
+            // markerFactory = getStyle("itemRenderer");
+            // marker = markerFactory.newInstance();
+            // ld.aspectRatio = 1;
+            // if (marker as ISimpleStyleClient)
+                // (marker as ISimpleStyleClient).styleName = this;
+        // }
+
+        // ld.marker = marker;
+        
+        // return [ld];
+    // }
+ 
+    //----------------------------------
+    //  renderData
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    /* override protected function get renderData():Object
+    {
+        if (!_renderData||
+            !(_renderData.cache) ||
+            _renderData.cache.length == 0)
+        {
+            var renderDataType:Class = this.renderDataType;
+            var ld:LineSeriesRenderData = new renderDataType();
+            ld.cache = ld.filteredCache = [];
+            ld.segments = [];
+            ld.radius = 0;
+            return ld;
+        }
+
+        _renderData.radius = getStyle("radius");
+
+        return _renderData;
+    } */
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //-----------------------------------
+    // fillFunction
+    //-----------------------------------
+    
+    /* [Bindable]
+    [Inspectable(category="General")] */
+    
+    /**
+     * @private
+     * Storage for fillFunction property
+     */
+   /*  private var _fillFunction:Function=defaultFillFunction;
+     */
+    /**
+     * Specifies a method that returns the fill for the current chart item in the series.
+     * If this property is set, the return value of the custom fill function takes precedence over the 
+     * <code>fill</code> and <code>fills</code> style properties.
+     * But if it returns null, then <code>fills</code> and <code>fill</code> will be 
+     * prefered in that order.  
+     * 
+     * <p>The custom <code>fillFunction</code> has the following signature:
+     *  
+     * <pre>
+     * <i>function_name</i> (item:ChartItem, index:Number):IFill { ... }
+     * </pre>
+     * 
+     * <code>item</code> is a reference to the chart item that is being rendered.
+     * <code>index</code> is the index of the chart item in the renderData's cache. This is different
+     * from the index of the chart's data provider because it is sorted based on the x, y, and z values.
+     * This function returns an object that implements the <code>IFill</code> interface.
+     * </p>
+     *  
+     * <p>An example usage of a customized <code>fillFunction</code> is to return a fill
+     * based on some threshold.</p>
+     *   
+     * @example
+     * <pre>
+     * public function myFillFunction(item:ChartItem, index:Number):IFill {
+     *      var curItem:LineSeriesItem = LineSeriesItem(item);
+     *      if (curItem.yNumber > 10)
+     *          return(new SolidColor(0x123456, .75));
+     *      else
+     *          return(new SolidColor(0x563412, .75));
+     * }
+     * </pre>
+     *   
+     * <p>
+     *  If you specify a custom fill function for your chart series and you
+     *  want to have a Legend control, you must manually create a Legend control and 
+     *  add LegendItems to it.
+     *  </p>
+     *
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get fillFunction():Function
+    {
+        return _fillFunction;
+    } */
+   
+    /**
+     * @private
+     */
+   /*  public function set fillFunction(value:Function):void
+    {
+        if (value ==_fillFunction)
+            return;
+            
+        if (value != null)
+            _fillFunction = value;
+        
+        else
+            _fillFunction = defaultFillFunction;
+        
+        invalidateDisplayList();
+        legendDataChanged();        
+    } */
+    
+    //----------------------------------
+    //  horizontalAxis
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the horizontalAxis property.
+     */
+   /*  private var _horizontalAxis:IAxis;
+    
+    [Inspectable(category="Data")]
+ */
+    /**
+     *  Defines the labels, tick marks, and data position
+     *  for items on the x-axis.
+     *  Use either the LinearAxis class or the CategoryAxis class
+     *  to set the properties of the horizontalAxis as a child tag in MXML
+     *  or create a LinearAxis or CategoryAxis object in ActionScript.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get horizontalAxis():IAxis
+    {
+        return _horizontalAxis;
+    } */
+    
+    /**
+     *  @private
+     */
+   /*  public function set horizontalAxis(value:IAxis):void
+    {
+        _horizontalAxis = value;
+        _bAxesDirty = true;
+
+        invalidateData();
+        invalidateProperties();
+    } */
+    
+    //----------------------------------
+    //  interpolateValues
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the interpolateValues property.
+     */
+    /* private var _interpolateValues:Boolean = false; 
+
+    [Inspectable(category="General")] */
+
+    /** 
+     *  Specifies how to represent missing data.
+     *
+     *  <p>Set to <code>false</code> to break the line at the missing value.
+     *  Set to <code>true</code> to draw a continuous line by interpolating the missing value.</p>
+     *  
+     *  @default false
+    *  
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    /* public function get interpolateValues():Boolean
+    {
+        return _interpolateValues;
+    } */
+
+    /**
+     *  @private
+     */
+   /*  public function set interpolateValues(value:Boolean):void
+    {
+        if (_interpolateValues != value)
+        {
+            _interpolateValues = value;
+
+            invalidateData();
+        }       
+    } */
+
+    //----------------------------------
+    //  items
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    // override public function get items():Array /* of LineSeriesItem */
+    // {
+        // return _renderData ?
+               // _renderData.filteredCache :
+               // null;
+    // }
+
+    //----------------------------------
+    //  itemType
+    //----------------------------------
+
+   // [Inspectable(environment="none")]
+
+    /**
+     *  The subtype of ChartItem used by this series
+     *  to represent individual items.
+     *  Subclasses can override and return a more specialized class
+     *  if they need to store additional information in the items.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  protected function get itemType():Class
+    {
+        return LineSeriesItem;
+    } */
+    
+    //----------------------------------
+    //  lineSegmentType
+    //----------------------------------
+
+    //[Inspectable(environment="none")]
+
+    /**
+     *  The class used by this series to store all data
+     *  necessary to represent a line segment.
+     *  Subclasses can override and return a more specialized class
+     *  if they need to store additional information for rendering.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* protected function get lineSegmentType():Class
+    {
+        return LineSeriesSegment;
+    }
+ */
+    //----------------------------------
+    //  radius
+    //----------------------------------
+
+    //[Inspectable(category="Styles")]
+
+    /** 
+     *  Specifies the radius, in pixels, of the chart elements
+     *  for the data points.
+     *  This property applies only if you specify an item renderer
+     *  using the <code>itemRenderer</code> property.  
+     *  You can specify the <code>itemRenderer</code> in MXML or using styles.  
+     *  
+     *  @default 0
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get radius():Number
+    {
+        return getStyle("radius");
+    } */
+    
+    /**
+     *  @private
+     */
+   /*  public function set radius(value:Number):void
+    {
+        setStyle("radius", value);
+    } */
+
+    //----------------------------------
+    //  renderDataType
+    //----------------------------------
+
+    //[Inspectable(environment="none")]
+
+    /**
+     *  The subtype of ChartRenderData used by this series
+     *  to store all data necessary to render.
+     *  Subclasses can override and return a more specialized class
+     *  if they need to store additional information for rendering.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  protected function get renderDataType():Class
+    {
+        return LineSeriesRenderData;
+    }  */   
+    
+    //----------------------------------
+    //  sortOnXField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the sortOnXField property.
+     */
+   /*  private var _sortOnXField:Boolean = true;
+
+    [Inspectable] */
+
+    /** 
+     *  Requests the line datapoints be sorted from left to right
+     *  before rendering.
+     *
+     *  <p>By default, the LineSeries renders points from left to right.
+     *  Set this property to <code>false</code> to render the items
+     *  in the order they appear in the data provider.</p>
+     *
+     *  @default true
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get sortOnXField():Boolean
+    {
+        return _sortOnXField;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set sortOnXField(value:Boolean):void 
+    {
+        if (_sortOnXField == value)
+            return;
+        _sortOnXField = value;
+
+        invalidateMapping();
+    } */
+
+    //----------------------------------
+    //  verticalAxis
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the verticalAxis property.
+     */
+   /*  private var _verticalAxis:IAxis;
+
+    [Inspectable(category="Data")] */
+
+    /**
+     *  Defines the labels, tick marks, and data position
+     *  for items on the y-axis.
+     *  Use either the LinearAxis class or the CategoryAxis class
+     *  to set the properties of the verticalAxis as a child tag in MXML
+     *  or create a LinearAxis or CategoryAxis object in ActionScript.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get verticalAxis():IAxis
+    {
+        return _verticalAxis;
+    } */
+    
+    /**
+     *  @private
+     */
+    /* public function set verticalAxis(value:IAxis):void
+    {
+        _verticalAxis = value;
+        _bAxesDirty = true;
+
+        invalidateData();
+        //invalidateChildOrder();
+        invalidateProperties();
+    } */
+    
+    //----------------------------------
+    //  xField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the xField property.
+     */
+    /* private var _xField:String = "";
+    
+    [Inspectable(category="General")]
+ */
+    /**
+     *  Specifies the field of the data provider
+     *  that determines the x-axis location of each data point. 
+     *  If <code>null</code>, the data points are rendered
+     *  in the order they appear in the data provider.
+     *
+     *  @default null
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get xField():String
+    {
+        return _xField;
+    } */
+    
+    /**
+     *  @private
+     */
+   /*  public function set xField(value:String):void
+    {
+        _xField = value;
+
+        dataChanged();
+    } */
+
+    //----------------------------------
+    //  yField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the yField property.
+     */
+    /* private var _yField:String = "";    
+    
+    [Inspectable(category="General")] */
+
+    /**
+     *  Specifies the field of the data provider
+     *  that determines the y-axis location of each data point. 
+     *  If <code>null</code>, the LineSeries assumes the data provider
+     *  is an Array of numbers, and uses the numbers as values. 
+     *
+     *  @default null
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get yField():String
+    {
+        return _yField;
+    }
+     */
+    /**
+     *  @private
+     */
+    /* public function set yField(value:String):void
+    {
+        _yField = value;
+
+        dataChanged();
+    } */
+    
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+     *  @private
+     */
+    /* private function initStyles():void
+    {
+        HaloDefaults.init(styleManager);
+
+		var lineSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager, "mx.charts.series.LineSeries");
+
+
+		if (lineSeriesStyle)
+		{
+			lineSeriesStyle.setStyle("lineSegmentRenderer", new ClassFactory(LineRenderer));
+			lineSeriesStyle.setStyle("fill", new SolidColor(0xFFFFFF));
+			lineSeriesStyle.setStyle("fills", []);
+			lineSeriesStyle.setStyle("lineStroke", new SolidColorStroke(0,3));
+		}
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("lineSegmentRenderer", new ClassFactory(LineRenderer));
+			setStyle("fill", new SolidColor(0xFFFFFF));
+			setStyle("fills", []);
+			setStyle("lineStroke", new SolidColorStroke(0,3));
+        }
+    } */
+
+
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* override public function set moduleFactory(factory:IFlexModuleFactory):void
+    {
+        super.moduleFactory = factory;
+        
+        if (_moduleFactoryInitialized[factory])
+            return;
+        
+        _moduleFactoryInitialized[factory] = true;
+    } */
+    
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* override protected function commitProperties():void
+    {
+        super.commitProperties();
+        
+        if (dataTransform)
+        {
+            if (_horizontalAxis)
+            {
+                _horizontalAxis.chartDataProvider = dataProvider;
+                CartesianTransform(dataTransform).setAxis(
+                    CartesianTransform.HORIZONTAL_AXIS,_horizontalAxis);
+            }
+              
+            if (_verticalAxis)
+            {
+                _verticalAxis.chartDataProvider = dataProvider;
+                CartesianTransform(dataTransform).setAxis(
+                    CartesianTransform.VERTICAL_AXIS, _verticalAxis);
+            } 
+        }
+        
+        var c:CartesianChart = CartesianChart(chart);
+        if (c)
+        {
+            if (!_horizontalAxis)
+            {
+                if (dataTransform.axes[CartesianTransform.HORIZONTAL_AXIS] != c.horizontalAxis)
+                        CartesianTransform(dataTransform).setAxis(
+                            CartesianTransform.HORIZONTAL_AXIS,c.horizontalAxis);
+            }
+                            
+            if (!_verticalAxis)
+            {
+                if (dataTransform.axes[CartesianTransform.VERTICAL_AXIS] != c.verticalAxis)
+                        CartesianTransform(dataTransform).setAxis(
+                            CartesianTransform.VERTICAL_AXIS, c.verticalAxis);
+            }
+        }
+        dataTransform.elements = [this];
+    } */
+    
+    /**
+     *  @private
+     */
+    // override protected function updateDisplayList(unscaledWidth:Number,
+                                                  // unscaledHeight:Number):void
+    // {
+        // super.updateDisplayList(unscaledWidth, unscaledHeight);
+        
+        // var renderData:LineSeriesRenderData = (transitionRenderData)? LineSeriesRenderData(transitionRenderData) :_renderData; 
+        // if (!renderData || !(renderData.filteredCache))
+            // return;
+        
+        // var g:Graphics = graphics;
+        
+        // g.clear();
+
+        // var radius:Number = getStyle("radius");     
+        // var sampleCount:int = renderData.filteredCache.length;
+        // var i:int;
+            
+        
+        // var segCount:int = renderData.segments.length;
+
+    
+        // var activeRenderCache:Array /* of LineSeriesItem */;
+        
+        ////figure out what cache we're rendering from. If there's a bounds based transtion underway, we need
+        ////to rebuild our cache from the bounds
+        // if (renderData == transitionRenderData && renderData.elementBounds)
+        // {
+            // var elementBounds:Array /* of Rectangle */ = renderData.elementBounds;
+            // sampleCount= elementBounds.length;
+            // activeRenderCache = renderData.filteredCache;
+
+
+            // for (i = 0; i < sampleCount; i++)
+            // {
+                // var rcBounds:Object = elementBounds[i];
+                // var localData:LineSeriesItem = activeRenderCache[i];
+                // localData.x = (rcBounds.left + rcBounds.right)/2;
+                // localData.y = (rcBounds.bottom + rcBounds.top)/2;
+            // }
+        // }
+        // else
+        // {
+            // activeRenderCache = renderData.filteredCache;
+        // }
+
+        ////now position each segment
+        
+        // _segmentInstanceCache.factory = getStyle("lineSegmentRenderer");
+        // _segmentInstanceCache.count = segCount;
+        // var instances:Array /* of IFlexDisplayObject */ = _segmentInstanceCache.instances;
+        // var v:LineSeriesItem;
+        
+        // for (i = 0; i < segCount; i++)
+        // {
+            // var segment:IFlexDisplayObject = instances[i];
+            // if (segment is IDataRenderer)
+                // IDataRenderer(segment).data = renderData.segments[i];
+            // segment.setActualSize(unscaledWidth,unscaledHeight);
+        // }       
+        
+        
+        ////if the user has asked for markers at each datapoint, position those as well
+        // if (radius > 0)
+        // {
+            // _pointInstanceCache.factory = getStyle("itemRenderer");
+            // _pointInstanceCache.count = renderData.validPoints;         
+
+            // instances = _pointInstanceCache.instances;
+            // var nextInstanceIdx:int = 0;
+
+            // var bSetData:Boolean = (sampleCount > 0 && (instances[0] is IDataRenderer))
+
+            // var rc:Rectangle;
+            // var inst:IFlexDisplayObject;
+            
+            // if (renderData == transitionRenderData && renderData.elementBounds)
+            // {
+                // for (i = 0; i < sampleCount; i++)
+                // {
+                    // v = activeRenderCache[i];
+                    // inst = instances[nextInstanceIdx++];
+                    // v.itemRenderer = inst;
+                    // v.fill = fillFunction(v,i);
+                    // if (!(v.fill))
+                        // v.fill = defaultFillFunction(v,i);
+                    // if (v.itemRenderer && (v.itemRenderer as Object).hasOwnProperty('invalidateDisplayList'))
+                        // (v.itemRenderer as Object).invalidateDisplayList();
+                    // if (inst)
+                    // {
+                        // if (bSetData)
+                            // IDataRenderer(inst).data = v;
+                        // rc = elementBounds[i];
+                        // inst.move(rc.left,rc.top);
+                        // inst.setActualSize(rc.width,rc.height);
+                    // }
+                // }
+            // }
+            // else
+            // {
+                // for (i = 0; i < sampleCount; i++)
+                // {
+                    // v  = activeRenderCache[i];
+                    // var e:Object = renderData.filteredCache[i];
+                   //// if (filterData && (isNaN(e.xFilter) || isNaN(e.yFilter)))
+                    // if(filterFunction == defaultFilterFunction && 
+                            // ((filterDataValues == "outsideRange" && (isNaN(e.xFilter) || isNaN(e.yFilter))) ||
+                             // (filterDataValues == "nulls" && (isNaN(e.xNumber) || isNaN(e.yNumber)))))
+                        // continue;
+
+                    // inst = instances[nextInstanceIdx++];
+                    // v.itemRenderer = inst;
+                    // v.fill = fillFunction(v,i);
+                    // if (!(v.fill))
+                        // v.fill = defaultFillFunction(v,i);
+                    // if (v.itemRenderer && (v.itemRenderer as Object).hasOwnProperty('invalidateDisplayList'))
+                        // (v.itemRenderer as Object).invalidateDisplayList();
+                    // if (inst)
+                    // {
+                        // if (bSetData)
+                            // IDataRenderer(inst).data = v;
+                        // inst.move(v.x-radius,v.y - radius);
+                        // inst.setActualSize(2*radius,2*radius);
+                    // }
+                // }
+                // if (chart && allSeriesTransform && chart.chartState == 0)
+                    // chart.updateAllDataTips();
+            // }               
+        // }
+    // }
+    
+    /**
+     *  @private
+     */
+    /* override public function stylesInitialized():void
+    {
+        _localFills = getStyle('fills');
+        if (_localFills != null)
+            _fillCount = _localFills.length;
+        else
+            _fillCount = 0;
+        super.stylesInitialized();
+    } */
+
+    /**
+     *  @private
+     */
+    /* override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+        var styles:String = "fills"
+        if (styles.indexOf(styleProp)!=-1)
+        {
+            _localFills = getStyle('fills');
+            if (_localFills != null)
+                _fillCount = _localFills.length;
+            else
+                _fillCount = 0;                
+        }
+        if (styleProp == "itemRenderer")
+        {
+            _pointInstanceCache.remove = true;
+            _pointInstanceCache.discard = true;
+            _pointInstanceCache.count = 0;
+            _pointInstanceCache.discard = false;
+            _pointInstanceCache.remove = false;
+        }
+        if (styleProp == "lineSegmentRenderer")
+        {
+            _segmentInstanceCache.remove = true;
+            _segmentInstanceCache.discard = true;
+            _segmentInstanceCache.count = 0;
+            _segmentInstanceCache.discard = false;
+            _segmentInstanceCache.remove = false;
+        }
+
+        invalidateDisplayList();
+
+        legendDataChanged();
+    } */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: ???
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* override protected function updateData():void
+    {
+        var renderDataType:Class = this.renderDataType;
+        _renderData= new renderDataType();
+
+        _renderData.cache = [];
+
+        if (dataProvider)
+        {           
+            cursor.seek(CursorBookmark.FIRST);
+            var i:int = 0;
+            var itemClass:Class = itemType;
+            while (!cursor.afterLast)
+            {
+                _renderData.cache[i] = new itemClass(this,cursor.current,i);
+                i++;
+                cursor.moveNext();
+            }
+
+            cacheDefaultValues(_yField,_renderData.cache,"yValue");
+            cacheIndexValues(_xField,_renderData.cache,"xValue");
+        }
+        if(dataTransform && dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS) is NumericAxis &&
+            !(dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS) is DateTimeAxis) && 
+            (dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS) as NumericAxis).direction == "inverted")  
+            _renderData.cache = reverseYValues(_renderData.cache);
+        if(dataTransform && dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) is NumericAxis &&
+            !(dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) is DateTimeAxis) &&
+            (dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) as NumericAxis).direction == "inverted")  
+            _renderData.cache = reverseXValues(_renderData.cache);  
+        _renderData.validPoints = _renderData.cache.length;
+        super.updateData();
+    } */
+
+    /**
+     *  @private
+     */
+    /* override protected function updateMapping():void
+    {
+        dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS).mapCache(_renderData.cache,"xValue","xNumber", (_xField == ""));
+        dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS).mapCache(_renderData.cache,"yValue","yNumber");
+        // now convert
+        if (_xField != "" && _sortOnXField)
+            _renderData.cache.sortOn("xNumber",Array.NUMERIC);      
+
+        super.updateMapping();
+
+    } */
+
+    /**
+     *  @private
+     */
+    /* override protected function updateFilter():void
+    {
+        _renderData.segments = [];
+        var lineSegmentType:Class = this.lineSegmentType;
+        _renderData.filteredCache = filterFunction(_renderData.cache);
+    
+        if(filterFunction != defaultFilterFunction)
+        // we do this only for custom filter function because default filter function
+        //already does this as part of the function.
+        {
+            createLineSegments(_renderData.filteredCache);
+        }
+        super.updateFilter();
+    } */
+    
+    /**
+     *  @private
+     */
+    /* override protected function updateTransform():void
+    {
+        dataTransform.transformCache(_renderData.filteredCache,"xNumber","x","yNumber","y");
+        super.updateTransform();
+        allSeriesTransform = true;
+            
+        if (chart && chart is CartesianChart)
+        {   
+            var cChart:CartesianChart = CartesianChart(chart);  
+            var n:int = cChart.series.length;
+            
+            for (var i:int = 0; i < n; i++)
+            {
+                if (cChart.getSeriesTransformState(cChart.series[i]))
+                    allSeriesTransform = false;
+            }
+            if (allSeriesTransform)
+                cChart.measureLabels();
+        }   
+    }
+ */
+    /**
+     *  @private
+     */
+    // override public function describeData(dimension:String,
+                                          // requiredFields:uint):Array /* of DataDescription */
+    // {
+        // validateData();
+
+        // if (_renderData.cache.length == 0)
+            // return [];
+            
+        // var description:DataDescription = new DataDescription();
+        // description.boundedValues = null;
+
+        // var dataMargin:Number;
+        // var stroke:IStroke;
+        // var radius:Number;
+        // var renderer:Object;
+
+        // if (dimension == CartesianTransform.VERTICAL_AXIS)
+        // {
+            // extractMinMax(_renderData.cache,"yNumber",description);
+            // if ((requiredFields & DataDescription.REQUIRED_BOUNDED_VALUES) != 0)
+            // {
+                // dataMargin = 0;
+                
+                // stroke = getStyle("lineStroke");
+                // if (stroke)
+                    // dataMargin = stroke.weight/2;
+                
+                // radius = getStyle("radius");
+                // renderer = getStyle("itemRenderer");
+                // if (radius > 0 && renderer)
+                // {
+                    // stroke = getStyle("stroke");
+                    // if (stroke)
+                        // radius += stroke.weight/2;
+                        
+                    // dataMargin = Math.max(radius,dataMargin);
+                // }
+
+                // if (dataMargin > 0)
+                // {
+                    // description.boundedValues= [];
+                    // description.boundedValues.push(new BoundedValue(description.max,0,dataMargin));
+                    // description.boundedValues.push(new BoundedValue(description.min,dataMargin,0));
+                // }
+            // }
+        // }
+        // else if (dimension == CartesianTransform.HORIZONTAL_AXIS)
+        // {
+            // if (_xField != "")
+            // {
+                // if ((requiredFields & DataDescription.REQUIRED_MIN_INTERVAL) != 0)
+                // {
+                  ////  if we need to know the min interval, then we rely on the cache being in order. So we need to sort it if it
+                  ////  hasn't already been sorted
+                    // var cache:Array /* of LineSeriesItem */ = _renderData.cache;
+                    // if (_sortOnXField == false)
+                    // {
+                        // cache = _renderData.cache.concat();
+                        // cache.sortOn("xNumber",Array.NUMERIC);      
+                    // }
+                    // extractMinMax(cache,"xNumber",description,(0 != (requiredFields & DataDescription.REQUIRED_MIN_INTERVAL)));
+                // }
+                // else
+                // {
+                    // extractMinMax(_renderData.cache,"xNumber",description, (requiredFields & DataDescription.REQUIRED_MIN_INTERVAL) != 0);
+                // }
+            // }
+            // else 
+            // {
+                // description.min = _renderData.cache[0].xNumber;
+                // description.max = _renderData.cache[_renderData.cache.length-1].xNumber;
+                // if ((requiredFields & DataDescription.REQUIRED_MIN_INTERVAL) != 0)
+                // {
+                    // extractMinInterval(_renderData.cache,"xNumber",description);
+                // }
+            // }
+
+            // if ((requiredFields & DataDescription.REQUIRED_BOUNDED_VALUES) != 0)
+            // {
+                // dataMargin = 0;
+                
+                // stroke = getStyle("lineStroke");
+                // if (stroke)
+                    // dataMargin = stroke.weight/2;
+                
+                // radius = getStyle("radius");
+                // renderer = getStyle("itemRenderer");
+                // if (radius > 0 && renderer)
+                // {
+                    // stroke = getStyle("stroke");
+                    // if (stroke)
+                        // radius += stroke.weight/2;
+                        
+                    // dataMargin = Math.max(radius,dataMargin);
+                // }
+
+                // if (dataMargin > 0)
+                // {
+                    // description.boundedValues= [];
+                    // description.boundedValues.push(new BoundedValue(description.max,0,dataMargin));
+                    // description.boundedValues.push(new BoundedValue(description.min,dataMargin,0));
+                // }
+            // }
+        // }
+        // else
+        // {
+            // return [];
+        // }
+            
+        // return [ description ];
+    // }
+    
+    /**
+     *  @private
+     */
+    // override public function getAllDataPoints():Array /* of HitData */
+    // {
+        // if (!_renderData)
+            // return [];
+        // if (!(_renderData.filteredCache))
+            // return [];
+        
+        // var itemArr:Array /* of LineSeriesItem */ = [];
+        // if (chart && chart.dataTipItemsSet && dataTipItems)
+            // itemArr = dataTipItems;
+        // else if (chart && chart.showAllDataTips && _renderData.filteredCache)
+            // itemArr = _renderData.filteredCache;
+        // else
+            // itemArr = [];
+        
+        // var n:uint = itemArr.length;
+        // var i:uint;
+        // var result:Array /* of HitData */ = [];
+        
+        // for (i = 0; i < n; i++)
+        // {
+            // var v:LineSeriesItem = itemArr[i];
+            // if (_renderData.filteredCache.indexOf(v) == -1)
+            // {
+                // var itemExists:Boolean = false;
+                // var m:int  = _renderData.filteredCache.length;
+                // for (var j:int = 0; j < m; j++)
+                // {
+                    // if (v.item == _renderData.filteredCache[j].item)
+                    // {   
+                        // v = _renderData.filteredCache[j];
+                        // itemExists = true;
+                        // break;
+                    // }
+                // }
+                // if (!itemExists)
+                    // continue;
+            // }
+            // if (v)
+            // {
+                // var hd:HitData = new HitData(createDataID(v.index),Math.sqrt(0),v.x,v.y,v);
+
+                // var istroke:IStroke = getStyle("lineStroke");
+                // if (istroke is SolidColorStroke)
+                    // hd.contextColor = SolidColorStroke(istroke).color;
+                // else if (istroke is LinearGradientStroke)
+                // {
+                    // var gb:LinearGradientStroke = LinearGradientStroke(istroke);
+                    // if (gb.entries.length > 0)
+                        // hd.contextColor = gb.entries[0].color;
+                // }
+                // hd.dataTipFunction = formatDataTip;
+                // result.push(hd);
+            // }
+        // }
+        // return result;
+    // }
+
+    /**
+     *  @private
+     */
+    // override public function findDataPoints(x:Number,y:Number,sensitivity:Number):Array /* of HitData */
+    // {
+       // // esg, 8/7/06: if your mouse is over a series when it gets added and displayed for the first time, this can get called
+       // // before updateData, and before and render data is constructed. The right long term fix is to make sure a stubbed out 
+       // // render data is _always_ present, but that's a little disruptive right now.
+       // // if (interactive == false || !_renderData)
+            // return [];
+
+        // var pr:Number = getStyle("radius");
+        // var minDist2:Number  = pr + sensitivity;
+        // minDist2 *= minDist2;
+        // var minItem:LineSeriesItem = null;     
+        // var pr2:Number = pr * pr;
+        
+        // var n:int = _renderData.filteredCache.length;
+
+        // if (n == 0)
+            // return [];
+
+        // if (sortOnXField == true)
+        // {            
+            // var low:Number = 0;
+            // var high:Number = n;
+            // var cur:Number = Math.floor((low+high)/2);
+    
+            // var bFirstIsNaN:Boolean = isNaN(_renderData.filteredCache[0]);
+    
+            // while (true)
+            // {
+                // var v:LineSeriesItem = _renderData.filteredCache[cur];          
+                // if (!isNaN(v.yNumber) && !isNaN(v.xNumber))
+                // {
+                    // var dist:Number = (v.x  - x)*(v.x  - x) + (v.y - y)*(v.y -y);
+                    // if (dist <= minDist2)
+                    // {
+                        // minDist2 = dist;
+                        // minItem = v;                
+                    // }
+                // }
+                // var a:Number;
+                // var b:Number;
+                // if(dataTransform && dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) is NumericAxis &&
+                // (dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) as NumericAxis).direction == "inverted")
+                // {
+                    // a = x;
+                    // b = v.x;
+                // }
+                // else
+                // {
+                    // a = v.x;
+                    // b = x;
+                // }
+               //// if there are NaNs in this array, it's for one of a couple of reasons:
+               //// 1) there were NaNs in the data, which menas an xField was provided, which means they got sorted to the end
+               //// 2) some values got filtered out, in which case we can (sort of) safely assumed that the got filtered from one side, the other, or the entire thing.
+               //// we'll assume that an axis hasn't filtered a middle portion of the array.
+               //// since we can assume that any NaNs are at the beginning or the end, we'll rely on that in our binary search.  If there was a NaN in the first slot,
+               //// then we'll assume it's safe to move up the array if we encounter a NaN.  It's possible the entire array is NaN, but then nothing will match, so that's ok.
+                // if (a < b || (isNaN(v.x) && bFirstIsNaN))
+                // {
+                    // low = cur;
+                    // cur = Math.floor((low + high)/2);
+                    // if (cur == low)
+                        // break;
+                // }
+                // else
+                // {
+                    // high = cur;
+                    // cur = Math.floor((low + high)/2);
+                    // if (cur == high)
+                        // break;
+                // }
+            // }
+        // }
+        // else
+        // {
+            // var i:uint;
+            // for (i = 0; i < n; i++)
+            // {
+               // v = _renderData.filteredCache[i];          
+               // if (!isNaN(v.yNumber) && !isNaN(v.xNumber))
+                // {
+                   // dist = (v.x  - x)*(v.x  - x) + (v.y - y)*(v.y -y);
+                   // if (dist <= minDist2)
+                   // {
+                       // minDist2 = dist;
+                       // minItem = v;               
+                   // }
+                // }
+           // }
+        // }
+        
+        // if (minItem)
+        // {
+            // var hd:HitData = new HitData(createDataID(minItem.index),Math.sqrt(minDist2),minItem.x,minItem.y,minItem);
+
+            // var istroke:IStroke = getStyle("lineStroke");
+            // if (istroke is SolidColorStroke)
+                // hd.contextColor = SolidColorStroke(istroke).color;
+            // else if (istroke is LinearGradientStroke)
+            // {
+                // var gb:LinearGradientStroke = LinearGradientStroke(istroke);
+                // if (gb.entries.length > 0)
+                    // hd.contextColor = gb.entries[0].color;
+            // }
+            // hd.dataTipFunction = formatDataTip;
+            // return [ hd ];
+        // }
+
+        // return [];
+    // }
+
+
+    /**
+     *  @private
+     */
+    // override public function getElementBounds(renderData:Object):void
+    // {
+        // var cache :Array /* of LineSeriesItem */ = renderData.cache;
+        // var segments:Array /* of LineSeriesSegment */ = renderData.segments;
+        
+        // var rb :Array /* of Rectangle */ = [];
+        // var sampleCount:int = cache.length;     
+
+        // if (sampleCount == 0)
+            // maxBounds  = new Rectangle();
+        // else
+        // {
+            // var radius:Number = renderData.radius;
+
+            // if (radius == 0 || isNaN(radius))
+                // radius = 1;
+
+            // var segCount:int = segments.length;
+            // if (segCount)
+            // {
+                // var v:Object = cache[renderData.segments[0].start];
+                // var maxBounds:Rectangle = new Rectangle(v.x,v.y,0,0);
+            // }
+
+
+            // for (var i:int = 0; i < segCount; i++)
+            // {       
+                // var j:int;    
+                // var seg:Object = renderData.segments[i];
+                // if (i > 0){
+                    // var prevSeg:Object = renderData.segments[i-1];
+                    // if (seg.start > prevSeg.end + 1){
+                        // for (j = prevSeg.end + 1; j < seg.start ; j++){
+                            // var rect:Rectangle = new Rectangle(0, 0, 0, 0);
+                            // rb[j] = rect; 
+                        // }
+                    // }
+                // }
+                // for (j = seg.start; j <= seg.end; j++)
+                // {
+                    // v = cache[j];
+                    // var b:Rectangle = new Rectangle(v.x-radius,v.y-radius,2*radius,2*radius);
+
+                    // maxBounds.left = Math.min(maxBounds.left,b.left);
+                    // maxBounds.top = Math.min(maxBounds.top,b.top);
+                    // maxBounds.right = Math.max(maxBounds.right,b.right);
+                    // maxBounds.bottom = Math.max(maxBounds.bottom,b.bottom);
+                    // rb[j] = b;
+                // }
+            // }
+        // }
+        
+
+        // renderData.elementBounds = rb;
+        // renderData.bounds =  maxBounds;
+    // }
+
+    /**
+     *  @private
+     */
+    // override public function beginInterpolation(sourceRenderData:Object,
+                                                // destRenderData:Object):Object
+    // {
+        // var idata:Object = initializeInterpolationData(
+            // sourceRenderData.cache, destRenderData.cache,
+            // { x: true, y: true }, itemType,
+            // { sourceRenderData: sourceRenderData,
+              // destRenderData: destRenderData });
+
+        // var interpolationRenderData:LineSeriesRenderData = LineSeriesRenderData(destRenderData.clone());
+
+        // interpolationRenderData.cache = idata.cache;    
+        // interpolationRenderData.filteredCache = idata.cache;    
+
+        // /* the segments in the renderdata have pointers back to the filetered cache.  since we just replaced the filtered cache, we need to iterate through and 
+        // /  update those */
+        // var segs:Array /* of LineSeriesSegment */ = interpolationRenderData.segments;
+        // var n:int = segs.length;
+        // for (var i:int = 0; i < n; i++)
+        // {
+            // segs[i].items = idata.cache;
+        // }
+        
+        // transitionRenderData = interpolationRenderData;
+        // return idata;
+    // }
+
+    /**
+     *  @private
+     */
+    // override protected function getMissingInterpolationValues(
+                                    // sourceProps:Object, srcCache:Array /* of LineSeriesItem */,
+                                    // destProps:Object, destCache:Array /* of LineSeriesItem */,
+                                    // index:Number, customData:Object):void
+    // {
+        // var cache:Array /* of LineSeriesItem */ = customData.sourceRenderData.cache;
+        // var dstCache:Array /* of LineSeriesItem */ = customData.destRenderData.cache;
+        
+        // for (var p:String in sourceProps)
+        // {
+            // var src:Number = sourceProps[p];
+            // var dst:Number = destProps[p];
+
+
+            // var lastValidIndex:int = index;
+            // if (isNaN(src))
+            // {
+                // if (cache.length == 0)
+                // {
+                    // src = (p == "x")? dstCache[index].x : unscaledHeight;
+                // }
+                // else
+                // {
+                    // if (lastValidIndex >= cache.length)
+                        // lastValidIndex = cache.length-1;
+                    // while (lastValidIndex >= 0 && isNaN(cache[lastValidIndex][p]))
+                    // {
+                        // lastValidIndex--;
+                    // }
+                    // if (lastValidIndex >= 0)
+                        // src =   cache[lastValidIndex][p] + .01 * (lastValidIndex - index);
+                    // if (isNaN(src))
+                    // {
+                        // lastValidIndex = index+1;
+                        // var cachelen:int = cache.length;
+                        // while (lastValidIndex < cachelen && isNaN(cache[lastValidIndex][p]))
+                        // {
+                            // lastValidIndex++;
+                        // }
+                        // if (lastValidIndex < cachelen)
+                        // {
+                            // src = cache[lastValidIndex][p] + .01 * (lastValidIndex - index);
+                        // }
+                    // }           
+                // }
+            // }
+            
+            // sourceProps[p] = src;
+            // destProps[p] = dst;
+        // }
+    // }
+
+    /**
+     *  @private
+     */
+    // override public function dataToLocal(... dataValues):Point
+    // {
+        // var data:Object = {};
+        // var da:Array /* of Object */ = [ data ];
+        // var n:int = dataValues.length;
+        
+        // if (n > 0)
+        // {
+            // data["d0"] = dataValues[0];
+            // dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS).
+                // mapCache(da, "d0", "v0");
+        // }
+        
+        // if (n > 1)
+        // {
+            // data["d1"] = dataValues[1];
+            // dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS).
+                // mapCache(da, "d1", "v1");           
+        // }
+
+        // dataTransform.transformCache(da,"v0","s0","v1","s1");
+        
+        // return new Point(data.s0 + this.x,
+                         // data.s1 + this.y);
+    // }
+
+    /**
+     *  @private
+     */
+    // override public function localToData(v:Point):Array /* of Object */
+    // {
+        // var values:Array /* of Object */ = dataTransform.invertTransform(
+                                            // v.x - this.x,
+                                            // v.y - this.y);
+        // return values;
+    // }
+
+    /**
+     *  @private
+     */
+    // override public function getItemsInRegion(r:Rectangle):Array /* of LineSeriesItem */
+    // {
+        // if (interactive == false || !_renderData)
+            // return [];
+        
+        // var arrItems:Array /* of LineSeriesItem */ = [];    
+        // var rc:Rectangle = new Rectangle();
+        // var localRectangle:Rectangle = new Rectangle();
+        // var n:uint = _renderData.filteredCache.length;
+        
+        // localRectangle.topLeft = globalToLocal(r.topLeft);
+        // localRectangle.bottomRight = globalToLocal(r.bottomRight);
+
+        
+        // for (var i:int = 0; i < n; i++)
+        // {
+            // var v:LineSeriesItem = _renderData.filteredCache[i];
+                
+            // if (localRectangle.contains(v.x,v.y))
+                // arrItems.push(v);
+        // }
+        // return arrItems;
+    // }
+    
+     /**
+     * @private
+     */ 
+    // override protected function defaultFilterFunction(cache:Array /*of LineSeriesItem */ ):Array /*of LineeriesItem*/
+    // {
+        // var filteredCache:Array /*of LineSeriesItem*/ = [];
+        // var start:int;
+        // var end:int = -1;
+        // var n:int;
+        // var i:int;
+        // var v:LineSeriesItem;
+        
+        // if (filterDataValues == "outsideRange")
+        // {
+            // filteredCache = cache.concat();
+            
+            // dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS).filterCache(filteredCache,"xNumber","xFilter")
+            // dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS).filterCache(filteredCache,"yNumber","yFilter");
+
+          ////  since all nulls will end up out at the edges, we can safely strip this early
+
+           // if (xField != "" && sortOnXField)
+                // stripNaNs(filteredCache,"xFilter");
+                
+            // _renderData.validPoints = filteredCache.length;
+
+            // if (_interpolateValues == false)
+            // {
+                // n = filteredCache.length;
+                
+                // while (end<n)
+                // {
+                    // for (i = end + 1; i < n; i++)
+                    // {
+                        // v = LineSeriesItem(filteredCache[i]);
+                        // if (!isNaN(v.xFilter) && !isNaN(v.yFilter))
+                            // break;
+                        // _renderData.validPoints--;
+                    // }
+                    // if (i == n)
+                        // break;              
+
+                    // start = i;
+
+                    // for (i = start + 1; i < n; i++)
+                    // {
+                        // v = LineSeriesItem(filteredCache[i]);
+                        // if (isNaN(v.xFilter) || isNaN(v.yFilter))
+                            // break;                  
+                    // }
+                    // end = i-1;
+                    // if (end != start)
+                    // {
+                        // _renderData.segments.push(new lineSegmentType(this,_renderData.segments.length,filteredCache,start,end));
+                    // }
+                // }
+            // }
+            // else
+            // {
+                // stripNaNs(filteredCache,"yFilter");
+                // _renderData.validPoints = filteredCache.length;
+                // if (filteredCache.length > 1)
+                    // _renderData.segments.push(new lineSegmentType(this,0,filteredCache,start,filteredCache.length-1));
+            // }
+        // }
+        // else if (filterDataValues == "nulls")
+        // {
+            // filteredCache = cache.concat();
+             ////since all nulls will end up out at the edges, we can safely strip this early
+            // if (xField != "" && sortOnXField)
+                // stripNaNs(filteredCache,"xNumber");
+                
+            // _renderData.validPoints = filteredCache.length;
+
+            // if (_interpolateValues == false)
+            // {
+                // n = filteredCache.length;
+                // while (end<n)
+                // {
+                    // for (i = end + 1; i < n; i++)
+                    // {
+                        // v = LineSeriesItem(filteredCache[i]);
+                        // if (!isNaN(v.xNumber) && !isNaN(v.yNumber))
+                            // break;
+                        // _renderData.validPoints--;
+                    // }
+                    // if (i == n)
+                        // break;              
+
+                    // start = i;
+
+                    // for (i = start + 1; i < n; i++)
+                    // {
+                        // v = LineSeriesItem(filteredCache[i]);
+                        // if (isNaN(v.xNumber) || isNaN(v.yNumber))
+                            // break;                  
+                    // }
+                    // end = i-1;
+                    // if (end != start)
+                    // {
+                        // _renderData.segments.push(new lineSegmentType(this,_renderData.segments.length,filteredCache,start,end));
+                    // }
+                // }
+            // }
+            
+            // else
+            // {
+                // stripNaNs(filteredCache,"yNumber");
+                // _renderData.validPoints = filteredCache.length;
+                // if (filteredCache.length > 1)
+                    // _renderData.segments.push(new lineSegmentType(this,0,filteredCache,start,filteredCache.length-1));
+            // }
+        // }
+        // else if (filterDataValues == "none")
+        // {
+            // filteredCache = cache;
+            // _renderData.segments.push(new lineSegmentType(this,0,filteredCache,start,filteredCache.length-1));
+        // }
+        // return filteredCache;
+    // }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  @private
+     *  This method is to create line segments for the cache returned
+     *  by custom filter function
+     */
+    // private function createLineSegments(filteredCache:Array /* of LineSeriesItem */):void
+    // {
+            // _renderData.validPoints = filteredCache.length;
+
+            // if (_interpolateValues == false)
+            // {
+                // var start:int;
+                // var end:int = -1;
+                // var n:int = filteredCache.length;
+                // var i:int;
+                // var v:LineSeriesItem;
+                
+                // while (end<n)
+                // {
+                    // for (i = end + 1; i < n; i++)
+                    // {
+                        // v = LineSeriesItem(filteredCache[i]);
+                        // if (!isNaN(v.xNumber) && !isNaN(v.yNumber))
+                            // break;
+                        // _renderData.validPoints--;
+                    // }
+                    // if (i == n)
+                        // break;              
+
+                    // start = i;
+
+                    // for (i = start + 1; i < n; i++)
+                    // {
+                        // v = LineSeriesItem(filteredCache[i]);
+                        // if (isNaN(v.xNumber) || isNaN(v.yNumber))
+                            // break;                  
+                    // }
+                    // end = i-1;
+                    // if (end != start)
+                    // {
+                        // _renderData.segments.push(new lineSegmentType(this,_renderData.segments.length,filteredCache,start,end));
+                    // }
+                // }
+            // }
+            
+            // else
+            // {
+                // _renderData.validPoints = filteredCache.length;
+                // if (filteredCache.length > 1)
+                    // _renderData.segments.push(new lineSegmentType(this,0,filteredCache,start,filteredCache.length-1));
+            // }
+    // }  
+
+    /**
+     *  Customizes the item renderer instances that are used to represent the chart. This method is called automatically
+     *  whenever a new item renderer is needed while the chart is being rendered. You can override this method to add your own customization as necessary.
+     *  @param instance The new item renderer instance that is being created.
+     *  @param cache The InstanceCache that is used to manage the item renderer instances.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    // protected function applyItemRendererProperties(instance:DisplayObject,
+                                                   // cache:InstanceCache):void
+    // {
+        // if (instance is ISimpleStyleClient)
+            // ISimpleStyleClient(instance).styleName = this;
+    // }
+
+    /**
+     *  @private
+     */
+    // private function formatDataTip(hd:HitData):String
+    // {
+        // var dt:String = "";
+        
+        // var n:String = displayName;
+        // if (n && n != "")
+            // dt += "<b>" + n + "</b><BR/>";
+
+        // var xName:String = dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS).displayName;
+        // if (xName != "")
+            // dt += "<i>" + xName+ ":</i> ";
+        // dt += dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS).formatForScreen(
+            // LineSeriesItem(hd.chartItem).xValue) + "\n";
+        
+        // var yName:String = dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS).displayName;
+        // if (yName != "")
+            // dt += "<i>" + yName + ":</i> ";
+        // dt += dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS).formatForScreen(
+            // LineSeriesItem(hd.chartItem).yValue) + "\n";
+        
+        // return dt;
+    // }
+    
+    /**
+     * @private
+     */
+    /* private function defaultFillFunction(element:LineSeriesItem,i:Number):IFill
+    {
+        if (_fillCount!=0)
+        {
+          return(GraphicsUtilities.fillFromStyle(_localFills[i % _fillCount]));
+        }
+        else
+          return(GraphicsUtilities.fillFromStyle(getStyle("fill")));
+    } */
+    
+    
+    /* private function reverseYValues(cache:Array):Array
+    {
+        var i:int = 0;
+        var n:int = cache.length;
+        for(i = 0; i < n ; i++)
+        {
+            cache[i]["yValue"] = -(cache[i]["yValue"]);
+        }  
+        return cache;
+    }
+     */
+    /* private function reverseXValues(cache:Array):Array
+    {
+        var i:int = 0;
+        var n:int = cache.length;
+        for(i = 0; i < n ; i++)
+        {
+            cache[i]["xValue"] = -(cache[i]["xValue"]);
+        }  
+        return cache;
+    } */
+}
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Helper class: LineSeriesLegendMarker
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/* 
+import flash.display.Graphics;
+
+import mx.charts.series.LineSeries;
+import mx.graphics.IStroke;
+import mx.graphics.LinearGradientStroke;
+import mx.graphics.SolidColorStroke;
+import mx.skins.ProgrammaticSkin;
+ */
+/**
+ *  @private
+ */
+//class LineSeriesLegendMarker extends ProgrammaticSkin
+//{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Constructor.
+     */
+   /*  public function LineSeriesLegendMarker(element:LineSeries)
+    {
+        super();
+
+        _element = element;
+        styleName = _element;
+    } */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    //private var _element:LineSeries;
+    
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth,unscaledHeight);
+
+        var fillStroke:IStroke = getStyle("lineStroke");
+        var color:Number;
+
+        if (fillStroke is SolidColorStroke)
+        {
+            color = SolidColorStroke(fillStroke).color;
+        }
+        else if (fillStroke is LinearGradientStroke)
+        {
+            var gb:LinearGradientStroke = LinearGradientStroke(fillStroke);
+            if (gb.entries.length > 0)
+                color = gb.entries[0].color;
+        }
+
+        var g:Graphics = graphics;
+        g.clear();
+        g.moveTo(0, 0);
+        g.lineStyle(0, 0, 0);
+        g.beginFill(color);
+        g.lineTo(width, 0);
+        g.lineTo(width, height);
+        g.lineTo(0, height);
+        g.lineTo(0, 0);
+        g.endFill();
+    } */
+//}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/items/ColumnSeriesItem.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/items/ColumnSeriesItem.as
new file mode 100644
index 000000000..f8bb1c822
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/items/ColumnSeriesItem.as
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.charts.series.items
+{
+
+import mx.charts.ChartItem;
+import mx.charts.series.ColumnSeries;
+import mx.graphics.IFill;
+
+/**
+ *  Represents the information required to render an item as part of a ColumnSeries. The ColumnSeries class passes these items to its itemRenderer when rendering.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class ColumnSeriesItem extends ChartItem
+{
+   // include "../../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  @param  element The owning series.
+     *  @param  data    The item from the dataProvider that this ChartItem represents.
+     *  @param  index   The index of the item from the series's dataProvider.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function ColumnSeriesItem(element:ColumnSeries = null,
+                                     data:Object = null, index:uint = 0)
+    {
+        super(element, data, index);
+    }
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  xValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public var xValue:Object;
+
+    //----------------------------------
+    //  y
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item converted into screen coordinates
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public var y:Number;
+    
+   
+
+    //----------------------------------
+    //  yValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public var yValue:Object;
+
+    
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ArrayCollection.as b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ArrayCollection.as
new file mode 100644
index 000000000..2acebf9ff
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ArrayCollection.as
@@ -0,0 +1,151 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.collections
+{
+COMPILE::JS {
+	import goog.DEBUG;
+}
+/*
+import flash.system.ApplicationDomain;
+import flash.utils.IDataInput;
+import flash.utils.IDataOutput;
+import flash.utils.IExternalizable;
+
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+*/
+[DefaultProperty("source")]
+
+[RemoteClass(alias="flex.messaging.io.ArrayCollection")]
+
+/**
+ *  The ArrayCollection class is a wrapper class that exposes an Array as
+ *  a collection that can be accessed and manipulated using the methods
+ *  and properties of the <code>ICollectionView</code> or <code>IList</code>
+ *  interfaces. Operations on a ArrayCollection instance modify the data source;
+ *  for example, if you use the <code>removeItemAt()</code> method on an
+ *  ArrayCollection, you remove the item from the underlying Array.
+ * 
+ *  @mxml
+ *
+ *  <p>The <code>&lt;mx:ArrayCollection&gt;</code> tag inherits all the attributes of its
+ *  superclass, and adds the following attributes:</p>
+ *
+ *  <pre>
+ *  &lt;mx:ArrayCollection
+ *  <b>Properties</b>
+ *  source="null"
+ *  /&gt;
+ *  </pre>
+ *
+ *  @example The following code creates a simple ArrayCollection object that
+ *  accesses and manipulates an array with a single Object element.
+ *  It retrieves the element using the IList interface <code>getItemAt</code>
+ *  method and an IViewCursor object that it obtains using the ICollectionView
+ *  <code>createCursor</code> method.
+ *  <pre>
+ *  var myCollection:ArrayCollection = new ArrayCollection([ { first: 'Matt', last: 'Matthews' } ]);
+ *  var myCursor:IViewCursor = myCollection.createCursor();
+ *  var firstItem:Object = myCollection.getItemAt(0);
+ *  var firstItemFromCursor:Object = myCursor.current;
+ *  if (firstItem == firstItemFromCursor)
+ *        doCelebration();
+ *  </pre>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class ArrayCollection extends ListCollectionView //implements IExternalizable
+{
+    //include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  <p>Creates a new ArrayCollection using the specified source array.
+     *  If no array is specified an empty array will be used.</p>
+     *
+     *  @param source The source Array.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function ArrayCollection(source:Array = null)
+    {
+        /*super();
+
+        this.source = source;*/
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+		
+    //----------------------------------
+    //  source
+    //----------------------------------
+
+    [Inspectable(category="General", arrayType="Object")]
+    [Bindable("listChanged")] //superclass will fire this
+
+    /**
+     *  The source of data in the ArrayCollection.
+     *  The ArrayCollection object does not represent any changes that you make
+     *  directly to the source array. Always use
+     *  the ICollectionView or IList methods to modify the collection.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get source():Array
+    {
+        /*if (list && (list is ArrayList))
+        {
+            return ArrayList(list).source;
+        }*/
+        return null;
+    }
+
+    /**
+     *  @private
+     */
+    public function set source(s:Array):void
+    {
+        //list = new ArrayList(s);
+    }
+
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/collections/GroupingCollection2.as b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/GroupingCollection2.as
new file mode 100644
index 000000000..ab4a549ee
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/GroupingCollection2.as
@@ -0,0 +1,1793 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.collections
+{
+/* 
+import flash.events.TimerEvent;
+import flash.utils.Dictionary;
+import flash.utils.Timer;
+import flash.xml.XMLNode;
+ */
+//import mx.collections.errors.ItemPendingError;
+import mx.core.mx_internal;
+import mx.events.CollectionEvent;
+import mx.events.CollectionEventKind;
+//import mx.utils.UIDUtil;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[DefaultProperty("grouping")]
+
+/**
+ *  The GroupingCollection2 class lets you create grouped data from flat data 
+ *  for display in the AdvancedDataGrid control.
+ *  When you create the instance of the GroupingCollection2 from your flat data, 
+ *  you specify the field or fields of the data used to create the hierarchy.
+ *
+ *  <p><b>Note: </b>In the previous release of Flex, you used the GroupingCollection class 
+ *  with the AdvancedDataGrid control. 
+ *  The GroupingCollection2 class is new for Flex 4 and provides better performance 
+ *  than GroupingCollection.</p>
+ *
+ *  <p>To populate the AdvancedDataGrid control with grouped data, 
+ *  you create an instance of the GroupingCollection2 class from your flat data, 
+ *  and then pass that GroupingCollection2 instance to the data provider 
+ *  of the AdvancedDataGrid control. 
+ *  To specify the grouping fields of your flat data, 
+ *  you pass a Grouping instance to 
+ *  the <code>GroupingCollection2.grouping</code> property. 
+ *  The Grouping instance contains an Array of GroupingField instances, 
+ *  one per grouping field. </p>
+ *
+ *  <p>The following example uses the GroupingCollection2 class to define
+ *  two grouping fields: Region and Territory.</p>
+ *
+ *  <pre>
+ *  &lt;mx:AdvancedDataGrid id=&quot;myADG&quot;    
+ *    &lt;mx:dataProvider&gt; 
+ *      &lt;mx:GroupingCollection2 id=&quot;gc&quot; source=&quot;{dpFlat}&quot;&gt; 
+ *        &lt;mx:grouping&gt; 
+ *          &lt;mx:Grouping&gt; 
+ *            &lt;mx:GroupingField name=&quot;Region&quot;/&gt; 
+ *            &lt;mx:GroupingField name=&quot;Territory&quot;/&gt; 
+ *          &lt;/mx:Grouping&gt; 
+ *        &lt;/mx:grouping&gt; 
+ *      &lt;/mx:GroupingCollection2&gt; 
+ *    &lt;/mx:dataProvider&gt;  
+ *     
+ *    &lt;mx:columns&gt; 
+ *      &lt;mx:AdvancedDataGridColumn dataField=&quot;Region&quot;/&gt; 
+ *      &lt;mx:AdvancedDataGridColumn dataField=&quot;Territory&quot;/&gt; 
+ *      &lt;mx:AdvancedDataGridColumn dataField=&quot;Territory_Rep&quot;/&gt; 
+ *      &lt;mx:AdvancedDataGridColumn dataField=&quot;Actual&quot;/&gt; 
+ *      &lt;mx:AdvancedDataGridColumn dataField=&quot;Estimate&quot;/&gt; 
+ *    &lt;/mx:columns&gt; 
+ *  &lt;/mx:AdvancedDataGrid&gt;
+ *  </pre>
+ *
+ *  @mxml
+ *
+ *  The <code>&lt;mx.GroupingCollection2&gt;</code> inherits all the tag attributes of its superclass, 
+ *  and defines the following tag attributes:</p>
+ *
+ *  <pre>
+ *  &lt;mx:GroupingCollection2
+ *  <b>Properties </b>
+ *    grouping="<i>No default</i>"
+ *    source="<i>No default</i>"
+ *    summaries="<i>No default</i>"
+ *  /&gt;
+ *  </pre>
+ *
+ *  @see mx.controls.AdvancedDataGrid
+ *  @see mx.collections.Grouping
+ *  @see mx.collections.GroupingField
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class GroupingCollection2 
+{
+//extends HierarchicalData implements IGroupingCollection2
+
+    //include "../core/Version.as";
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Royale 0.9.3
+     */
+    public function GroupingCollection2()
+    {
+       /*  super();
+        
+        newCollection = new ArrayCollection();
+        super.source = newCollection;
+        
+        objectSummaryMap = new Dictionary(false);
+        
+        parentMap = {}; */
+    }
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  @private
+     *  
+     *  denotes if the refresh is asynchronous.
+     */
+   // private var async:Boolean = false;
+    
+    /**
+     *  @private
+     *  
+     *  if true, dispatch collection change events 
+     */
+   // private var dispatchCollectionEvents:Boolean = false;
+    
+    /**
+     *  @private
+     */
+    //private var newCollection:ArrayCollection;
+    
+    /**
+     *  @private
+     */
+    private var _sourceCol:ICollectionView;
+    
+    /**
+     *  @private
+     *  
+     *  the object summary map.
+     *  keeps summaries corresponding to different objects
+     */
+   // private var objectSummaryMap:Dictionary;
+    
+    /**
+     *  @private
+     *  
+     *  the original sort applied to the source collection 
+     */
+    //private var oldSort:Sort;
+    
+    /**
+     *  @private
+     */
+    //private var prepared:Boolean = false;
+    
+    /**
+     *  @private
+     */
+    //private var flatView:ICollectionView;
+    
+    /**
+     *  @private
+     */
+    //private var flatCursor:IViewCursor;
+    
+    /**
+     *  @private
+     */
+    //private var hView:ICollectionView;
+    
+    /**
+     *  @private
+     */
+    //private var currentPosition:CursorBookmark = CursorBookmark.FIRST;
+    
+    /**
+     *  @private
+     */
+    //private var gf:Array;
+    
+    /**
+     *  @private
+     */
+   // private var fieldCount:int;
+    
+    /**
+     *  @private
+     *  
+     *  contains current data being compared
+     */
+   // private var currentData:Object;
+    
+    /**
+     *  @private
+     *  
+     *  contains current group objects for different group fields
+     */
+   // private var currentGroups:Array;
+    
+    /**
+     *  @private
+     *  
+     *  contains current group labels for different group fields
+     */
+    //private var currentGroupLabels:Array;
+    
+    /**
+     *  @private
+     *  
+     *  contains next index for different group fields
+     */
+    //private var currentIndices:Array;
+    
+    /**
+     *  @private
+     *  
+     *  item index
+     */
+    //private var itemIndex:int;
+    
+    /**
+     *  @private
+     *  
+     *  the children array for the group
+     */
+    //private var childrenArray:Array;
+    
+    /**
+     *  @private
+     */
+    //private var summaryPresent:Boolean;
+    
+    /**
+     *  The timer which is associated with an asynchronous refresh operation.
+     *  You can use it to change the timing interval, pause the refresh, 
+     *  or perform other actions.
+     *  
+     *  The default value for the <code>delay</code> property of the 
+     *  Timer instance is 1, corresponding to 1 millisecond.
+     *
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Royale 0.9.3
+     */
+    //protected var timer:Timer;
+    
+    /**
+     *  @private
+     *  Mapping of UID to parents.  Must be maintained as things get removed/added
+     *  This map is created as objects are visited
+     */
+    //protected var parentMap:Object;
+    
+    /**
+     *  @private
+     *  A Dictionary to maintain summaries
+     */
+    //private var summariesTracker:Dictionary;
+    
+    /**
+     *  @private
+     *  An array to store all the summary fields.
+     */
+    //private var summaryFields:Array;
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------   
+    
+    //----------------------------------
+    // grouping
+    //----------------------------------
+    
+    private var _grouping:Grouping;
+    
+    /**
+     *  Specifies the Grouping instance applied to the source data. 
+     *  Setting the <code>grouping</code> property  
+     *  does not automatically refresh the view,
+     *  so you must call the <code>refresh()</code> method
+     *  after setting this property.
+     *
+     *  @see mx.collections.GroupingCollection2#refresh()
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Royale 0.9.3
+     */
+    public function get grouping():Grouping
+    {
+        return _grouping;
+    }
+       
+    /**
+     *  @private
+     */
+    public function set grouping(value:Grouping):void
+    {
+        _grouping = value;
+    }
+    
+    //----------------------------------
+    // summaries
+    //----------------------------------
+    
+    /**
+     *  Array of SummaryRow instances that define any root-level data summaries.
+     *  Specify one or more SummaryRow instances to define the data summaries, 
+     *  as the following example shows:
+     *
+     *  <pre>
+     *  &lt;mx:AdvancedDataGrid id="myADG" 
+     *     width="100%" height="100%" 
+     *     initialize="gc.refresh();"&gt;        
+     *     &lt;mx:dataProvider&gt;
+     *         &lt;mx:GroupingCollection2 id="gc" source="{dpFlat}"&gt;
+     *             &lt;mx:summaries&gt;
+     *                 &lt;mx:SummaryRow summaryPlacement="last"&gt;
+     *                     &lt;mx:fields&gt;
+     *                         &lt;mx:SummaryField2 dataField="Actual" 
+     *                             label="Min Actual" summaryOperation="MIN"/&gt;
+     *                         &lt;mx:SummaryField2 dataField="Actual" 
+     *                             label="Max Actual" summaryOperation="MAX"/&gt;
+     *                     &lt;/mx:fields&gt;
+     *                   &lt;/mx:SummaryRow&gt;
+     *                 &lt;/mx:summaries&gt;
+     *             &lt;mx:Grouping&gt;
+     *                 &lt;mx:GroupingField name="Region"/&gt;
+     *                 &lt;mx:GroupingField name="Territory"/&gt;
+     *             &lt;/mx:Grouping&gt;
+     *         &lt;/mx:GroupingCollection2&gt;
+     *     &lt;/mx:dataProvider&gt;        
+     *     
+     *     &lt;mx:columns&gt;
+     *         &lt;mx:AdvancedDataGridColumn dataField="Region"/&gt;
+     *         &lt;mx:AdvancedDataGridColumn dataField="Territory_Rep"
+     *             headerText="Territory Rep"/&gt;
+     *         &lt;mx:AdvancedDataGridColumn dataField="Actual"/&gt;
+     *         &lt;mx:AdvancedDataGridColumn dataField="Estimate"/&gt;
+     *         &lt;mx:AdvancedDataGridColumn dataField="Min Actual"/&gt;
+     *         &lt;mx:AdvancedDataGridColumn dataField="Max Actual"/&gt;
+     *     &lt;/mx:columns&gt;
+     *  &lt;/mx:AdvancedDataGrid&gt;</pre>
+     *
+     *  @see mx.collections.SummaryRow
+     *  @see mx.collections.SummaryField2
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Royale 0.9.3
+     */
+    //public var summaries:Array; 
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overriden Methods
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  The source collection containing the flat data to be grouped.
+     *  
+     *  If the source is not a collection, it will be auto-wrapped into a collection.
+     *  
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Royale 0.9.3
+     */
+    /* override */ public function get source():Object
+    {
+        return _sourceCol;
+    }
+    
+    /* override */ public function set source(value:Object):void
+    {
+        /* if (_sourceCol)
+            _sourceCol.removeEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler);
+        
+        if (!value)
+        {
+            _sourceCol = null;
+            return;
+        }
+            
+        _sourceCol = getCollection(value);
+        
+        if(_sourceCol is ICollectionView)
+            _sourceCol.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler); */
+    }
+    
+    /**
+     * @private
+     */ 
+    /* override public function getChildren(node:Object):Object
+    {
+        var children:Object = super.getChildren(node);
+        
+        // populate the parentMap
+        // parentMap will be populated only if the children is ICollectionView
+        var uid:String;
+        if (children != null)
+        {
+            if (children is ICollectionView)
+            {
+                var cursor:IViewCursor = ICollectionView(children).createCursor();
+                while (!cursor.afterLast)
+                {                
+                    uid = UIDUtil.getUID(cursor.current);
+                    parentMap[uid] = node;
+                    cursor.moveNext();
+                }
+            }
+            else
+            {
+                //if the children is not ICollectionView then
+                //it was not introduced by GC. (this happens in the case of XML.) 
+                return null;
+            }
+        }
+        
+        return children;
+    } */
+    
+    /**
+     *  Return <code>super.source</code>, if the <code>grouping</code> property is set, 
+     *  and an ICollectionView instance that refers to <code>super.source</code> if not.
+     *  
+     *  @return The object to return.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Royale 0.9.3
+     */
+    /* override public function getRoot():Object
+    {
+        return super.source;
+    }
+     */
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Royale 0.9.3
+     */
+    public function refresh(async:Boolean = false, dispatchCollectionEvents:Boolean = false):Boolean
+    {
+       /*  this.async = async;
+        this.dispatchCollectionEvents = async ? true : dispatchCollectionEvents;
+        
+        var resetEvent:CollectionEvent;
+        
+        // return if no grouping or groupingFields are supplied
+        if (!grouping || grouping.fields.length < 1 )
+        {
+            super.source = source;
+            // dispatch collection change event of kind reset.
+            resetEvent =
+                    new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
+            resetEvent.kind = CollectionEventKind.RESET;
+            dispatchEvent(resetEvent);
+            return true;
+        }
+        
+        super.source = newCollection;
+		
+		// remove the items from the source collection if there are any.
+		newCollection.removeAll();
+		
+        
+        // dispatch collection change event of kind reset.
+        resetEvent =
+                new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
+        resetEvent.kind = CollectionEventKind.RESET;
+        dispatchEvent(resetEvent);
+        
+        // reset the parent map
+        parentMap = {};
+        
+        // reset the object summary map
+        objectSummaryMap = new Dictionary(false);
+        
+        // reset the summaryTracker
+        summariesTracker = null;
+        
+        // check if any summary is specified
+        summaryPresent = false;
+        prepareSummaryFields();
+        */     
+        var grouped:Boolean;
+        /*if(source && grouping)
+        {
+            grouped = makeGroupedCollection();
+        }
+        */
+        return grouped; 
+    }
+    
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Royale 0.9.3
+     */
+    /* public function cancelRefresh():void
+    {
+        if (timer)
+        {
+            timer.stop();
+            timer = null;
+            cleanUp();
+        }
+    } */
+    
+    /**
+     *  @private
+     *  
+     *  check for the existing groups if they can accomodate the item
+     *  otherwise create new group and place the item.
+     */  
+    /* private function addItem(node:Object, depth:int = 0):void
+    {   
+        var coll:ICollectionView = super.source as ICollectionView;
+        var parent:Object = null;
+        var i:int = 0;
+        while (i < grouping.fields.length)
+        {
+            // check for the parent item
+            var obj:Object = checkForParentExistence(coll, node, i);
+            // if no parent, then use the previous parent
+            if (!obj)
+                break;
+            // change the parent to point to its parent and start looking for parent again
+            parent = obj;
+            
+            if (parent)
+            {
+                coll = getChildren(parent) as ICollectionView;
+                i++;
+            }       
+        }
+        
+        // parent found
+        if (parent)
+        {
+            coll = getChildren(parent) as ICollectionView;
+            
+            // create groups for the item as no existing group matched with the item
+            if (i <= grouping.fields.length-1)
+            {
+                // create groups and place item
+                createGroupsAndInsertItem(coll, node, i);
+                // update the summary for the parents
+                updateSummary(node);
+                return;
+            }
+            // if there already exist a group for the item and insert the item in that group
+            if (coll is IList)
+            {
+                // insert the item
+                IList(coll).addItem(node);
+                // update the parent map
+                updateParentMap(parent, node);
+                // update the summary for the parents
+                updateSummary(node);
+            }
+        }
+        else
+        {
+            // no groups for the item, create groups and add item to them
+            createGroupsAndInsertItem(super.source as ICollectionView, node);
+            // update the summary for the parents
+            updateSummary(node);
+        }
+        
+    } */
+    
+    /**
+     *  @private
+     *  
+     *  check for existence of the groups for an item in the collection
+     *  and return all the parent of that item.
+     */  
+   /*  private function checkForParentExistence(coll:ICollectionView, node:Object, depth:int):Object
+    {
+        var cursor:IViewCursor = coll.createCursor();
+        
+        var label:String = getDataLabel(node, grouping.fields[depth]);
+        
+        while (!cursor.afterLast)
+        {
+            var current:Object = cursor.current;
+            // check for matching fields
+            if (current.hasOwnProperty(grouping.label) && 
+                current[grouping.label] == label)
+            {
+                return current;
+            }
+            cursor.moveNext();
+        }
+        
+        return null;
+    } */
+    
+    /**
+     *  @private
+     *  
+     *  creating the group for the item in the collection
+     *  and placing it there.
+     */  
+   /*  private function createGroupsAndInsertItem(coll:ICollectionView, node:Object, depth:int = 0):void
+    {
+        var parent:Object;
+        var n:int = grouping.fields.length;
+        for (var i:int = depth; i < n ; i++)
+        {
+            // get the dataField and value
+            var dataField:String = grouping.fields[i].name;
+            var value:String = getDataLabel(node, grouping.fields[i]);
+            
+            if (!value)
+                return;
+                
+            // create a new group
+            var obj:Object;
+            if (grouping.fields[i].groupingObjectFunction != null)
+                obj = grouping.fields[i].groupingObjectFunction(value);
+            else if (grouping.groupingObjectFunction != null)
+                obj = grouping.groupingObjectFunction(value);
+            else
+                obj = {};
+            
+            obj[childrenField] = new ArrayCollection();
+            
+            obj[grouping.label] = value;
+            
+            if (coll is IList)
+            {
+                IList(coll).addItem(obj);
+                
+                // get the parent and update parent map
+                parent = parent != null ? parent : getParent(coll.createCursor().current);
+                updateParentMap(parent, obj);
+                
+                coll = getChildren(obj) as ICollectionView;
+                parent = obj;
+                // if we reach the end of the fields, just insert the item in the collection
+                if (i == n - 1)
+                {
+                    IList(coll).addItem(node);
+                    // update the parent map
+                    updateParentMap(obj, node);
+                    break;
+                }
+            }
+        }
+    } */
+    
+    /**
+     * @private
+     * 
+     * returns the collection view of the given object
+     */ 
+    /* private function getCollection(value:Object):ICollectionView
+    {
+        // handle strings and xml
+        if (typeof(value)=="string")
+            value = new XML(value);
+        else if (value is XMLNode)
+            value = new XML(XMLNode(value).toString());
+        else if (value is XMLList)
+            value = new XMLListCollection(value as XMLList);
+        
+        if (value is XML)
+        {
+            var xl:XMLList = new XMLList();
+            xl += value;
+            return new XMLListCollection(xl);
+        }
+        //if already a collection dont make new one
+        else if (value is ICollectionView)
+        {
+            return ICollectionView(value);
+        }
+        else if (value is Array)
+        {
+            return new ArrayCollection(value as Array);
+        }
+        //all other types get wrapped in an ArrayCollection
+        else if (value is Object)
+        {         
+            // convert to an array containing this one item
+            var tmp:Array = [];
+            tmp.push(value);
+            return new ArrayCollection(tmp);
+        }
+        else
+        {
+            return new ArrayCollection();
+        }
+    }
+     */
+    /**
+     *  @private
+     *  get the data label from user specified function.
+     *  otherwise get the label from the data.
+     */ 
+   /*  private function getDataLabel(data:Object,field:GroupingField):String
+    {
+        if (field.groupingFunction != null)
+            return field.groupingFunction(data, field);
+        
+        // should we create a defaultGroupLabelValue property
+        return data.hasOwnProperty(field.name) ? data[field.name] : "Not Available";
+    }
+     */
+    /**
+     *  Returns the parent of a node.  
+     *  The parent of a top-level node is <code>null</code>.
+     *
+     *  @param node The Object that defines the node.
+     *
+     *  @return The parent node containing the node as child, 
+     *  <code>null</code> for a top-level node,  
+     *  and <code>undefined</code> if the parent cannot be determined.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function getParent(node:Object):*
+    {
+        var uid:String = UIDUtil.getUID(node);
+        if (parentMap.hasOwnProperty(uid))
+            return parentMap[uid];
+            
+        return undefined;
+    } */
+    
+    /**
+     *  @private
+     *  Generate the root level summaries
+     */
+   /*  private function generateRootSummaries(flatData:Boolean = false):void
+    {
+        var coll:ICollectionView = super.source as ICollectionView;
+        
+        getSummaries(coll, -1);
+    } */
+    
+    /**
+     *  @private
+     *  Calculate summaries for a node.
+     */
+    /* private function getSummariesForRow(node:Object, collection:ICollectionView, depth:int):void
+    {
+        // calculate the summary at the last level
+        var hd:HierarchicalData = new HierarchicalData(collection);
+        hd.childrenField = this.childrenField;
+        var hColl:ICollectionView = new HierarchicalCollectionView(hd, {});
+        var hCursor:IViewCursor = new LeafNodeCursor(HierarchicalCollectionView(hColl), hColl, hd);
+        
+        // for all summary fields
+        var m:int = summaryFields.length;
+        var i:int = 0;
+        
+        var defaultSummaryCalculator:DefaultSummaryCalculator = new DefaultSummaryCalculator();
+        var summaryMap:Dictionary = new Dictionary(false);
+        var summaryField:SummaryField2;
+        var summaryCalculator:ISummaryCalculator;
+        
+        for (i = 0; i < m; i++)
+        {
+            summaryField = summaryFields[i];
+            
+            if (!(summaryField.summaryOperation is String) &&
+                summaryField.summaryOperation is ISummaryCalculator)
+                summaryCalculator = ISummaryCalculator(summaryField.summaryOperation);
+            else
+                summaryCalculator = defaultSummaryCalculator;
+            
+            summaryMap[summaryField] = summaryCalculator.summaryCalculationBegin(summaryField);
+        }
+        
+        while (!hCursor.afterLast)
+        {
+            for (i = 0; i < m; i++)
+            {
+                summaryField = summaryFields[i];
+                
+                if (!(summaryField.summaryOperation is String) &&
+                    summaryField.summaryOperation is ISummaryCalculator)
+                    summaryCalculator = ISummaryCalculator(summaryField.summaryOperation);
+                else
+                    summaryCalculator = defaultSummaryCalculator;
+                
+                summaryCalculator.calculateSummary(summaryMap[summaryField], summaryField, hCursor.current);
+            }
+            
+            hCursor.moveNext();
+        }
+        
+        for (i = 0; i < m; i++)
+        {
+            var summary:Number = 0.0;
+            summaryField = summaryFields[i];
+            
+            if (!(summaryField.summaryOperation is String) &&
+                summaryField.summaryOperation is ISummaryCalculator)
+                summaryCalculator = ISummaryCalculator(summaryField.summaryOperation);
+            else
+                summaryCalculator = defaultSummaryCalculator;
+            
+            summary = summaryCalculator.returnSummary(summaryMap[summaryField], summaryField);
+            
+            populateSummary(node, summaryField, summaryMap[summaryField], summary);
+        }
+    } */
+    
+    /**
+     *  @private
+     *  Store the summary in a dictionary for later use.
+     */
+   /*  private function populateSummary(node:Object, summaryField:SummaryField2, summaryObject:Object, summary:Number):void
+    {
+        var op:String = summaryField.summaryOperation.toString();
+        
+        if (summariesTracker == null)
+            summariesTracker = new Dictionary(false);
+        
+        if (summariesTracker[node] == undefined)
+            summariesTracker[node] = new Dictionary(false);
+        if (summariesTracker[node][op] == undefined)
+            summariesTracker[node][op] = new Dictionary(false);
+        if (summariesTracker[node][op][summaryField.dataField] == undefined)
+            summariesTracker[node][op][summaryField.dataField] = new Dictionary(false);
+        
+        summariesTracker[node][op][summaryField.dataField] = {summaryObject:summaryObject, value:summary};
+    }
+     */
+    /**
+     *  @private
+     *  Get the summary from the dictionary 
+     */
+    /* private function getSummary(node:Object, summaryField:SummaryField2):Object
+    {
+        var op:String = summaryField.summaryOperation.toString();
+        
+        if (summariesTracker == null || 
+            summariesTracker[node] == undefined ||
+            summariesTracker[node][op] == undefined ||
+            summariesTracker[node][op][summaryField.dataField] == undefined)
+        return null;
+        
+        return summariesTracker[node][op][summaryField.dataField];
+    } */
+    
+    /**
+     *  @private
+     *  Calcualte and insert summary for a node
+     */
+   /*  private function getSummaries(node:Object, depth:int):void
+    {
+        if (depth > grouping.fields.length - 1)
+            return;
+        
+        var children:ICollectionView = this.getChildren(node) as ArrayCollection;
+        
+        if (node == super.source)
+            children = node as ICollectionView;
+        
+        if (!children || children.length == 0)
+            return;
+        
+        if (depth == grouping.fields.length - 1)
+        {
+            // calculate actual summaries here
+            getSummariesForRow(node, children, depth);
+        }
+        else
+        {
+            var cursor:IViewCursor = children.createCursor();
+            var isFirst:Boolean = true;
+            
+            var defaultSummaryCalculator:DefaultSummaryCalculator = new DefaultSummaryCalculator();
+            var summaryField:SummaryField2;
+            var summaryMap:Dictionary = new Dictionary(false);
+            var summaryCalculator:ISummaryCalculator;
+            
+            while (!cursor.afterLast)
+            {
+                var current:Object = cursor.current;
+                if (!(current is SummaryObject))
+                {
+                    // for all summary fields
+                    var m:int = summaryFields.length;
+                    var i:int = 0;
+                    
+                    for (i = 0; i < m; i++)
+                    {
+                        summaryField = summaryFields[i];
+                        
+                        if (!(summaryField.summaryOperation is String) &&
+                            summaryField.summaryOperation is ISummaryCalculator)
+                            summaryCalculator = ISummaryCalculator(summaryField.summaryOperation);
+                        else
+                            summaryCalculator = defaultSummaryCalculator;
+                        
+                        var summaryObject:Object = getSummary(current, summaryField);
+                        
+                        if (isFirst)
+                        {
+                            summaryMap[summaryField] = summaryCalculator.summaryOfSummaryCalculationBegin(summaryObject["summaryObject"], summaryField);
+                        }
+                        else
+                        {
+                            summaryCalculator.calculateSummaryOfSummary(summaryMap[summaryField], summaryObject["summaryObject"], summaryField);
+                        }
+                    }
+                }
+                
+                isFirst = false;
+                cursor.moveNext();
+            }
+            
+            // check if there were some items
+            if (!isFirst)
+            {
+                for (i = 0; i < m; i++)
+                {
+                    summaryField = summaryFields[i];
+                    
+                    if (!(summaryField.summaryOperation is String) &&
+                        summaryField.summaryOperation is ISummaryCalculator)
+                        summaryCalculator = ISummaryCalculator(summaryField.summaryOperation);
+                    else
+                        summaryCalculator = defaultSummaryCalculator;
+                    
+                    var summary:Number = summaryCalculator.returnSummaryOfSummary(summaryMap[summaryField], summaryField);
+                    
+                    populateSummary(node, summaryField, summaryMap[summaryField], summary);
+                }
+            }
+        }
+        
+        if (depth == -1)
+            insertSummaries(super.source as ICollectionView, -1, true);
+        else
+            insertSummaries(node, depth);
+    }
+     */
+    /* private function insertSummaries(node:Object, depth:int, rootSummary:Boolean = false):void
+    {
+        var summaries:Array = this.summaries;
+        
+        if (!rootSummary)
+            summaries = grouping.fields[depth].summaries;
+        
+        if (!summaries)
+            return;
+        
+        var summaryObj:Array = [];
+        
+        var n:int = summaries.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var summaryRow:SummaryRow = summaries[i];
+            summaryObj[i] = 
+                summaryRow.summaryObjectFunction != null ? 
+                summaryRow.summaryObjectFunction() : new SummaryObject();
+            
+            // for all summary fields
+            var m:int = summaryRow.fields.length;
+            for (var j:int = 0; j < m; j++)
+            {
+                var summaryField:SummaryField2 = summaryRow.fields[j];
+                var summary:Number = 0.0;
+                var label:String = summaryField.label ? summaryField.label : summaryField.dataField;
+                
+                var summaryObject:Object = getSummary(node, summaryField);
+                
+                if (summaryObject != null)
+                {
+                    summary = summaryObject["value"];
+                    // populate the summary object
+                    summaryObj[i][label] = summary;
+                }
+            }
+            // populate the object summary map
+            if (objectSummaryMap[node] == undefined)
+                objectSummaryMap[node] = [];
+            
+            objectSummaryMap[node].push(summaryObj[i]);
+        }
+        
+        // insert the summary
+        if (rootSummary)
+            insertRootSummary(summaryObj);
+        else
+            insertSummary(node, summaryObj, summaries);
+        
+    }
+     */
+    /**
+     *  @private
+     * 
+     *  initialize the variables
+     * 
+     */
+   /*  private function initialize():void
+    {
+        currentData = null;
+        currentGroups = [];
+    
+        currentGroupLabels = [];
+        currentIndices = [] ;
+        
+        childrenArray = null;
+    } */
+    
+    /**
+     *  @private
+     * 
+     *  insert the root summaries
+     * 
+     */  
+    /* private function insertRootSummary(summaryObj:Array):void
+    {
+        var coll:ICollectionView = super.source as ICollectionView;
+        
+        if (!(coll is IList))
+            return;
+        
+        var n:int = summaryObj.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var summaryRow:SummaryRow = summaries[i];
+            
+            if (summaryRow.summaryPlacement.indexOf("first") != -1)
+            {
+                IList(coll).addItemAt(summaryObj[i], 0);
+            }
+            
+            if (summaryRow.summaryPlacement.indexOf("last") != -1)
+            {
+                IList(coll).addItem(summaryObj[i]);
+            }
+        }
+    } */
+    
+    /**
+     *  @private
+     *  
+     *  inserts the summaries in the children collection of the parent node
+     */  
+    /* private function insertSummary(parent:Object, summaryObj:Array, summaries:Array):void
+    {
+        var n:int = summaries.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var summaryRow:SummaryRow = summaries[i];
+            if (summaryRow.summaryPlacement.indexOf("group") != -1)
+            {
+                for (var p:String in summaryObj[i])
+                    parent[p] = summaryObj[i][p];
+            }
+            
+            var children:IList;
+            if (summaryRow.summaryPlacement.indexOf("first") != -1)
+            {
+                children = (getChildren(parent) as ArrayCollection);
+                if (children)
+                    children.addItemAt(summaryObj[i], 0);
+            }
+            
+            if (summaryRow.summaryPlacement.indexOf("last") != -1)
+            {
+                children = (getChildren(parent) as ArrayCollection);
+                if (children)
+                    children.addItem(summaryObj[i]);
+            }
+        }
+    } */
+    
+    /**
+     *  @private
+     */
+    /* private function makeGroupedCollection():Boolean
+    {
+        // save the sorting information of the source collection
+        // sort the source collection and create a grouped collection
+        // restore the sort of the original source collection
+        
+        var fields:Array = [];
+        var n:int = grouping.fields.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var groupingField:GroupingField = grouping.fields[i];
+            var sortField:SortField = new SortField(groupingField.name, 
+                        groupingField.caseInsensitive, 
+                        groupingField.descending, groupingField.numeric);
+            sortField.compareFunction = groupingField.compareFunction;
+            fields.push(sortField);
+        }
+        
+        oldSort = source.sort;
+        source.sort = new Sort();
+        
+        // Set the compare function
+        if (grouping.compareFunction != null)
+            source.sort.compareFunction = grouping.compareFunction;
+        
+        source.sort.fields = fields;
+        
+        var refreshed:Boolean = source.refresh();
+        if (!refreshed)
+            return refreshed;
+        
+        if (async)
+        {
+            timer = new Timer(1);
+            timer.addEventListener(TimerEvent.TIMER, timerHandler);
+            timer.start();
+        }
+        else
+        {
+            return buildGroups();
+        }
+        
+        return true;
+    } */
+    
+    /**
+     *  @private
+     */
+    /* private function timerHandler(event:TimerEvent):void
+    {
+        if (buildGroups())
+        {
+            timer.stop();
+            timer = null;
+        }
+        
+    }
+     */
+    /**
+     *  @private
+     *  
+     *  Start building the groups
+     */
+    /* private function buildGroups():Boolean
+    {
+        if (!prepared)
+        {
+            var _openItems:Object = {};
+            
+            // initialize the variables
+            initialize();
+        
+            if ((source as ICollectionView).length == 0)
+                return false;
+            
+            if (dispatchCollectionEvents)
+            {
+                var hierarchicalData:IHierarchicalData = new HierarchicalData(newCollection);
+                HierarchicalData(hierarchicalData).childrenField = childrenField;
+                
+                hView = new HierarchicalCollectionView( 
+                                            hierarchicalData, _openItems);
+            }
+    
+            flatView = source as ICollectionView;
+            flatCursor = flatView.createCursor();
+    
+            gf = grouping.fields;
+            fieldCount = gf.length;
+            
+            if (gf)
+            {
+                prepared = true;
+            
+                if (async)
+                    return false;
+            }
+            
+            if (async)
+                return true;
+        }
+        
+        flatCursor.seek(currentPosition);
+        
+        while(!flatCursor.afterLast && currentPosition != CursorBookmark.LAST)
+        {
+            currentData = flatCursor.current;
+            
+            var n:int = 0;
+            
+            for (var i:int = 0; i < fieldCount ; ++i)
+            {
+                var groupingField:String = gf[i].name;
+                
+                var label:String = getDataLabel(currentData, gf[i]);
+
+                if(label != currentGroupLabels[i])
+                {
+                    if (childrenArray && childrenArray.length)
+                    {
+                        ArrayCollection(currentGroups[fieldCount - 1][childrenField]).source = childrenArray;
+                        childrenArray = [];
+                    }
+                    
+                    // calculate summaries for created groups
+                    if (summaryPresent)
+                    {
+                        for (n = currentGroups.length - 1; n >= i; n--)
+                            getSummaries(currentGroups[n], n);
+                    }
+                    
+                    currentGroupLabels.splice(i+1);
+                    currentGroups.splice(i+1);
+                    currentIndices.splice(i+1);
+                    
+                    currentGroupLabels[i] = label;
+                    
+                    // check for grouping Object Function
+                    if (gf[i].groupingObjectFunction != null)
+                        currentGroups[i] = gf[i].groupingObjectFunction(label);
+                    else if (grouping.groupingObjectFunction != null)
+                        currentGroups[i] = grouping.groupingObjectFunction(label);
+                    else
+                        currentGroups[i] = {};
+                    
+                    currentGroups[i][childrenField] = new ArrayCollection();
+                    
+                    currentGroups[i][grouping.label] = currentGroupLabels[i];
+                    
+                    itemIndex = currentIndices[i-1];
+                    // create the group
+                    if (dispatchCollectionEvents)
+                    {
+                        IHierarchicalCollectionView(hView).addChild(currentGroups[i-1], currentGroups[i]);
+                    } else
+                    {
+                        if (i > 0)
+                        {
+                            currentGroups[i-1][childrenField].source.push(currentGroups[i]);
+                        }
+                        else
+                        {
+                            newCollection.source.push(currentGroups[i]);
+                        }
+                    }
+                    currentIndices[i-1] = ++itemIndex;
+                }
+                
+                // insert the node as a child of the group
+                if ( i == fieldCount - 1)
+                {
+                    itemIndex = currentIndices[i];
+                    if (!childrenArray)
+                        childrenArray = [];
+                    childrenArray.push(currentData);
+                    currentIndices[i] = ++itemIndex;
+                }
+            }
+
+            try
+            {
+                flatCursor.moveNext();
+                currentPosition = flatCursor.bookmark;
+                // return in case of async refresh
+                if (async)
+                    return false;
+            }
+            catch (e:ItemPendingError)
+            {
+                cleanUp();
+                e.addResponder(new ItemResponder(
+                    function(data:Object, token:Object=null):void
+                    {
+                        makeGroupedCollection();
+                    },
+                    function(info:Object, token:Object=null):void
+                    {
+                        //no-op
+                    }));
+            }
+        }
+        if (currentPosition == CursorBookmark.LAST)
+        {
+            if (childrenArray && childrenArray.length)
+            {
+                ArrayCollection(currentGroups[fieldCount - 1][childrenField]).source = childrenArray;
+                
+                // calculate summaries for created groups
+                if (summaryPresent)
+                {
+                    for (n = fieldCount - 1; n >= 0; n--)
+                        getSummaries(currentGroups[n], n);
+                }
+            }
+            
+            // calculate root summaries
+            if (source && summaries)
+            {
+                if (!super.source)
+                    super.source = new ArrayCollection([source]) as Object;
+                
+                generateRootSummaries(grouping == null);
+            }
+            
+			// refresh the collection to reflect the changes
+			// we made while grouping.
+			// This is needed as we made changes directly to
+			// the source of the collection when
+			// dispatchCollectionEvents is false
+			newCollection.refresh();
+			
+            // dispatch collection change event of kind refresh.
+            var refreshEvent:CollectionEvent =
+                    new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
+            refreshEvent.kind = CollectionEventKind.REFRESH;
+            dispatchEvent(refreshEvent);
+            
+            cleanUp();
+        }
+        return true;
+    }
+     */
+    /**
+     *  @private
+     *  Get all the summary fields and store them in an Array
+     */
+    /* private function prepareSummaryFields():void
+    {
+        summaryFields = [];
+        
+        var sr:SummaryRow
+        
+        // for grouping fields summaries
+        if (grouping.fields != null)
+        {
+            for (var i:int = 0; i < grouping.fields.length; i++)
+            {
+                var gf:GroupingField = grouping.fields[i];
+                if (gf.summaries != null)
+                {
+                    for (var j:int = 0; j < gf.summaries.length; j++)
+                    {
+                        sr = gf.summaries[j];
+                        if (sr.fields != null)
+                        {
+                            for (var k:int = 0; k < sr.fields.length; k++)
+                            {
+                                summaryPresent = true;
+                                summaryFields.push(sr.fields[k]);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        
+        // for root level summaries
+        if (summaries != null)
+        {
+            for (i = 0; i < summaries.length; i++)
+            {
+                sr = summaries[i];
+                if (sr.fields != null)
+                {
+                    for (j = 0; j < sr.fields.length; j++)
+                    {
+                        summaryPresent = true;
+                        summaryFields.push(sr.fields[j]);
+                    }
+                }
+            }
+        }
+    }
+     */
+    /**
+     *  @private
+     *  
+     *  Restores the original sort in the source collection
+     *  and clean up all the variables.
+     */
+    /* private function cleanUp():void
+    {
+        source.sort = oldSort;
+        source.refresh();
+        
+        prepared = false;
+        currentPosition = CursorBookmark.FIRST;
+        oldSort = null;
+        flatCursor = null;
+    }
+     */
+    /**
+     *  @private
+     *  
+     *  It will call the function func on each node of the collection.
+     */  
+    /* private function applyFunctionForParentNodes(coll:ICollectionView, func:Function, depth:int = 0):void
+    {   
+        if (coll.length > 0)
+        {
+            var masterCursor:IViewCursor = coll.createCursor();
+            
+            while(!masterCursor.afterLast)
+            {
+                var child:Object = getChildren(masterCursor.current);
+                if (child is ArrayCollection)
+                {
+                    var childCursor:IViewCursor = ArrayCollection(child).createCursor();
+                    
+                    while (!childCursor.afterLast)
+                    {
+                        var current:Object = childCursor.current;
+                        // recurse over each child
+                        if (this.hasChildren(current))
+                        {
+                            applyFunctionForParentNodes(child as ArrayCollection, func, depth + 1);
+                            break;
+                        }
+                        
+                        childCursor.moveNext();
+                    }   
+                }
+                
+                // calculate for the parent node
+                func(masterCursor.current, depth);
+                masterCursor.moveNext();
+            }
+        }
+    } */
+    
+    /**
+     *  @private
+     *  
+     *  removes the root summaries and
+     *  generates them again.
+     * 
+     */  
+    /* private function regenerateRootSummaries():void
+    {
+        if(!summaries)
+            return;
+        
+        var coll:ICollectionView = super.source as ICollectionView;
+        if (!grouping)
+            coll = coll.createCursor().current as ICollectionView;
+        
+        var summaryObj:Array = objectSummaryMap[coll];
+        
+        // for the first time there will be no summaries
+        // so, this check will fail and root summaries wont
+        // be removed and regenerated again.
+        // for all the other times, the root summaries will be 
+        // regenerated.
+        if (!summaryObj || !(coll is IList))
+            return;
+        
+        // delete all the root level summaries
+        var n:int = summaryObj.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var index:int = IList(coll).getItemIndex(summaryObj[i]);
+            if (index != -1)
+                IList(coll).removeItemAt(index);
+        }
+        
+        delete objectSummaryMap[coll];
+        
+        // generate the root level summaries
+        generateRootSummaries(grouping == null);
+    }
+     */
+    /**
+     *  @private
+     *  
+     *  removes all the summaries from the collection
+     */  
+    /* private function removeAllSummaries():void
+    {
+        // call generate summary with remove summary function as parameter
+        applyFunctionForParentNodes(super.source as ICollectionView, removeSummary);
+    } */
+    
+    /**
+     *  @private
+     *  
+     *  remove the summaries for an item and its parents.
+     *  return the parents of the node going one level up each time.
+     * 
+     */  
+    /* private function removeItemAndSummaries(coll:ICollectionView, node:Object, removeItem:Boolean = false):Array
+    {
+        var parentNodes:Array = [];
+        var parent:Object = getParent(node);
+        while (parent != null)
+        {
+            var index:int;
+            var addParent:Boolean = true;
+            var children:ICollectionView = getChildren(parent) as ArrayCollection;
+            if (children)
+            {
+                if (children.contains(node))
+                {
+                    if (children is IList)
+                    {
+                        if (removeItem)
+                        {
+                            // remove the item from the group
+                            index = IList(children).getItemIndex(node);
+                            if (index != -1)
+                            {
+                                IList(children).removeItemAt(index);
+                                // delete item from parent map
+                                var uid:String = UIDUtil.getUID(node);
+                                if (parentMap[uid])
+                                    delete parentMap[uid];
+                            }
+                        }
+                        
+                        if (objectSummaryMap[parent])
+                        {
+                            var temp:Array = objectSummaryMap[parent];
+                            var n:int = temp.length;
+                            for (var i:int = 0; i < n; i++)
+                            {
+                                index = IList(children).getItemIndex(temp[i]);
+                                if (index != -1)
+                                {
+                                    // remove the summary information for the group
+                                    IList(children).removeItemAt(index);
+                                }
+                            }
+                            // delete summary from parent summary map
+                            delete objectSummaryMap[parent];
+                        }
+                        
+                        if (summariesTracker != null && summariesTracker[parent])
+                            summariesTracker[parent] = new Dictionary(false);
+                        
+                        if (removeItem)
+                        {
+                            // remove the group if no children is present
+                            if (children.length == 0 && getParent(parent) != null)
+                            {
+                                addParent = false;
+                            }
+                            else
+                                removeItem = false;
+                        }
+                    }
+                }
+                if (addParent)
+                    parentNodes.push(parent);
+                
+                node = parent;
+                
+                parent  = getParent(parent);
+                if (!parent)
+                {
+                    // remove the parent node from the collection if its the only one remaining.
+                    // first check for the child collection length
+                    if (parentNodes.length == 1)
+                    {
+                        if ((getChildren(parentNodes[0]) as ICollectionView).length == 0 && coll is IList)
+                        {
+                            index = IList(coll).getItemIndex(node);
+                            if (index != -1)
+                            {
+                                IList(coll).removeItemAt(index);
+                                return null;
+                            }
+                        }
+                    }
+                    return parentNodes.reverse();
+                }
+            }
+        }
+        return null;
+    } */
+    
+    /**
+     *  @private
+     *  
+     *  removes the summaries from the parent node and all its children.
+     * 
+     */  
+    /* private function removeSummary(parent:Object, depth:int):void
+    {   
+        var children:ICollectionView = this.getChildren(parent) as ArrayCollection;
+        
+        if (!children)
+            return;
+        
+        // remove summaries from the parents of the current object
+        removeItemAndSummaries(super.source as ICollectionView, children.createCursor().current);
+    } */
+    
+    /**
+     *  @private
+     *  
+     *  updates the parent map
+     */ 
+    /* private function updateParentMap(parent:Object, node:Object):void
+    {
+        var uid:String = UIDUtil.getUID(node);
+        parentMap[uid] = parent;
+    } */
+    
+    /**
+     *  @private
+     *  
+     *  removes the summary information and regenrates it for a particular node
+     *  and its parents.
+     *  optionally removes the item from the group also.
+     */  
+    /* private function updateSummary(node:Object, removeItem:Boolean = false):void
+    {       
+        var coll:ICollectionView = super.source as ICollectionView;
+        
+        var parentNodes:Array;
+        if (summaryPresent || removeItem)
+            parentNodes = removeItemAndSummaries(coll, node, removeItem);
+        
+        if (summaryPresent && parentNodes)
+        {
+            var n:int = parentNodes.length;
+            for (var i:int = n - 1; i >= 0; i--)
+            {
+                getSummaries(parentNodes[i], i);
+            }
+        }
+    } */
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  @private
+     * 
+     *  collection change handler.
+     * 
+     */  
+    /* private function collectionChangeHandler(event:CollectionEvent):void
+    {
+        if (!grouping)
+            return;
+        
+        var i:int = 0;
+        var j:int = 0;
+        var n:int = 0;
+        var m:int = 0;
+        var obj:Object;
+        
+        if (event.kind == CollectionEventKind.UPDATE)
+        {
+            n = event.items.length;
+            for (i = 0; i < n; i++)
+            {
+                var summaryCalculated:Boolean;
+                // take the source property to get the updated object
+                obj = event.items[i].source;
+                
+                if (!obj)
+                    continue;
+                
+                m = grouping.fields.length;
+                for (j = 0; j < m; j++)
+                {
+                    // check if the property corresponding to the group fields changed
+                    if (event.items[i].property == grouping.fields[j].name)
+                    {
+                        summaryCalculated = true;
+                        // update summaries - first remove the item from its group
+                        updateSummary(obj,true);
+                        // add the item to the group
+                        addItem(obj);
+                        break;
+                    }
+                }
+                // for other properties just update the summaries
+                if (!summaryCalculated)
+                    updateSummary(obj);
+            }
+        }
+        
+        if (event.kind == CollectionEventKind.ADD)
+        {
+            n = event.items.length;
+            for (i = 0; i < n; i++)
+            {
+                obj = event.items[i];
+                // add the item to the group
+                addItem(obj);
+            }
+        }
+        
+        if (event.kind == CollectionEventKind.REMOVE)
+        {
+            n = event.items.length;
+            for (i = 0; i < n; i++)
+            {
+                obj = event.items[i];
+                // update summaries - first remove the item from its group
+                updateSummary(obj,true);
+            }
+        }
+        
+        if (event.kind == CollectionEventKind.REPLACE)
+        {
+            n = event.items.length;
+            for (i = 0; i < n; i++)
+            {
+                var oldValue:Object = event.items[i].oldValue;
+                var newValue:Object = event.items[i].newValue;
+                // update summaries - first remove the item from its group
+                updateSummary(oldValue,true);
+                // add the item to the group
+                addItem(newValue);
+            }
+        }
+        
+        // generate the root summaries
+        regenerateRootSummaries();
+    } */
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ISort.as b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ISort.as
new file mode 100644
index 000000000..217900c27
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ISort.as
@@ -0,0 +1,353 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.collections
+{
+
+    /**
+     *  The <code>ISort</code> interface defines the interface for classes that
+     *  provide the sorting information required to sort the
+     *  data of a collection view.
+     * 
+     *  @see mx.collections.ICollectionView
+     *  @see mx.collections.ISortField
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4.5
+     */
+public interface ISort
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The method used to compare items when sorting.
+     *  If you specify this property, Flex ignores any 
+     *  <code>compareFunction</code> properties that you specify in the 
+     *  <code>ISortField</code> objects that you use in this class.
+     *
+     *  <p>The compare function must have the following signature:</p>
+     *
+     *  <pre><code>
+     *
+     *     function [name](a:Object, b:Object, fields:Array = null):int
+     *
+     *  </code></pre>
+     *
+     *  <p>This function must return the following value:
+     *  <ul>
+     *        <li>-1, if the <code>Object a</code> should appear before the 
+     *        <code>Object b</code> in the sorted sequence</li>
+     *        <li>0, if the <code>Object a</code> equals the 
+     *        <code>Object b</code></li>
+     *        <li>1, if the <code>Object a</code> should appear after the 
+     *        <code>Object b</code> in the sorted sequence</li>
+     *  </ul></p>
+     *  <p>To return to the internal comparision function, set this value to
+     *  <code>null</code>.</p>
+     *  <p>
+     *  The <code>fields</code> array specifies the object fields
+     *  to compare.
+     *  Typically the algorithm will compare properties until the field list is
+     *  exhausted or a non-zero value can be returned.
+     *  For example:</p>
+     *
+     *  <pre><code>
+     *    function myCompare(a:Object, b:Object, fields:Array = null):int
+     *    {
+     *        var result:int = 0;
+     *        var i:int = 0;
+     *        var propList:Array = fields ? fields : internalPropList;
+     *        var len:int = propList.length;
+     *        var propName:String;
+     *        while (result == 0 &amp;&amp; (i &lt; len))
+     *        {
+     *            propName = propList[i];
+     *            result = compareValues(a[propName], b[propName]);
+     *            i++;
+     *        }
+     *        return result;
+     *    }
+     *
+     *    function compareValues(a:Object, b:Object):int
+     *    {
+     *        if (a == null &amp;&amp; b == null)
+     *            return 0;
+     *
+     *        if (a == null)
+     *          return 1;
+     *
+     *        if (b == null)
+     *           return -1;
+     *
+     *        if (a &lt; b)
+     *            return -1;
+     *
+     *        if (a &gt; b)
+     *            return 1;
+     *
+     *        return 0;
+     *    }
+     *  </code></pre>
+     *
+     *  <p>The default value is an internal compare function that can perform
+     *  a string, numeric, or date comparison in ascending or descending order.
+     *  Specify your own function only if you need a need a custom
+     *  comparison algorithm. This is normally only the case if a calculated
+     *  field is used in a display.</p>
+     *
+     *  <p>Alternatively you can specify separate compare functions for each
+     *  sort field by using the <code>ISortField</code> class 
+     *  <code>compareFunction</code> property; This way you can use the default 
+     *  comparison for some fields and a custom comparison for others.</p>
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4.5
+     */
+    function get compareFunction():Function;
+
+    /**
+     *  @deprecated A future release of Apache Flex SDK will remove this function. Please use the constructor
+     *  argument instead.
+     */
+    function set compareFunction(value:Function):void;
+
+    /**
+     *  An <code>Array</code> of <code>ISortField</code> objects that
+     *  specifies the fields to compare.
+     *  The order of the ISortField objects in the array determines
+     *  field priority order when sorting.
+     *  The default sort comparator checks the sort fields in array
+     *  order until it determinines a sort order for the two
+     *  fields being compared.
+     *
+     *  @default null
+     *
+     *  @see ISortField
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4.5
+     */
+    function get fields():Array;
+
+    /**
+     *  @deprecated A future release of Apache Flex SDK will remove this function. Please use the constructor
+     *  argument instead.
+     */
+    function set fields(value:Array):void;
+
+    /**
+     *  Indicates if the sort should be unique.
+     *  Unique sorts fail if any value or combined value specified by the
+     *  fields listed in the fields property result in an indeterminate or
+     *  non-unique sort order; that is, if two or more items have identical
+     *  sort field values. An error is thrown if the sort is not unique.
+     *  The sorting logic uses this <code>unique</code> property value only if sort
+     *  field(s) are specified explicitly. If no sort fields are specified
+     *  explicitly, no error is thrown even when there are identical value
+     *  elements.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4.5
+     */
+    function get unique():Boolean;
+
+    /**
+     *  @deprecated A future release of Apache Flex SDK will remove this function. Please use the constructor
+     *  argument instead.
+     */
+    function set unique(value:Boolean):void;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Finds the specified object within the specified array (or the insertion
+     *  point if asked for), returning the index if found or -1 if not.
+     *  The <code>ListCollectionView</code> class <code>find<i>xxx</i>()</code> 
+     *  methods use this method to find the requested item; as a general rule, 
+     *  it is easier to use these functions, and not <code>findItem()</code> 
+     *  to find data in <code>ListCollectionView</code>-based objects.
+     *  You call the <code>findItem()</code> method directly when writing a
+     *  class that supports sorting, such as a new <code>ICollectionView</code>
+     *  implementation.
+     *  The input items array need to be sorted before calling this function.
+     *  Otherwise this function will not be able to find the specified value
+     *  properly.
+     *
+     *  @param items the Array within which to search.
+     *  @param values Object containing the properties to look for (or
+     *                the object to search for, itself).
+     *                The object must consist of field name/value pairs, where
+     *                the field names are names of fields specified by the
+     *                <code>fields</code> property, in the same order they
+     *                are used in that property.
+     *                You do not have to specify all of the fields from the
+     *                <code>fields</code> property, but you
+     *                cannot skip any in the order.
+     *                Therefore, if the <code>fields</code>
+     *                properity lists three fields, you can specify its first
+     *                and second fields in this parameter, but you cannot
+     *                specify  only the first and third fields.
+     *  @param mode String containing the type of find to perform.
+     *           Valid values are:
+     *             <table>
+     *               <tr>
+     *                 <th>ANY_INDEX_MODE</th> 
+     *                 <th>Return any position that
+     *                   is valid for the values.</th>
+     *               </tr>
+     *               <tr>
+     *                 <th>FIRST_INDEX_MODE</th> 
+     *                 <th>Return the position
+     *                   where the first occurrance of the values is found.</th>
+     *               </tr>
+     *               <tr>
+     *                 <th>LAST_INDEX_MODE</th> 
+     *                 <th>Return the position where the
+     *                   last ocurrance of the specified values is found.
+     *                 </th>
+     *               </tr>
+     *               </table>
+     *  @param returnInsertionIndex If the method does not find an item
+     *                     identified by the <code>values</code> parameter,
+     *                     and this parameter is <code>true</code> the 
+     *                     <code>findItem()</code>
+     *                     method returns the insertion point for the values,
+     *                     that is the point in the sorted order where you
+     *                     should insert the item.
+     *  @param compareFunction a comparator function to use to find the item.
+     *                 If you do not specify this parameter or , or if you 
+     *                 provide a <code>null</code> value, 
+     *                 <code>findItem()</code> function uses the
+     *                 compare function determined by the <code>ISort</code>
+     *                 instance's <code>compareFunction</code> property,
+     *                 passing in the array of fields determined
+     *                 by the values object and the current 
+     *                 <code>SortFields</code>.
+     *
+     *                 If you provide a non-null value, <code>findItem()</code>
+     *                 function uses it as the compare function.
+     *
+     *                 The signature of the function passed as 
+     *                 <code>compareFunction</code> must be as follows: 
+     *                 <code>function myCompareFunction(a:Object, b:Object):int</code>.
+     *                 Note that there is no third argument unlike the
+     *                 compare function for <code>ISort.compareFunction()</code>
+     *                 property.
+     *  @return int The index in the array of the found item.
+     *                If the <code>returnInsertionIndex</code> parameter is
+     *              <code>false</code> and the item is not found, returns -1.
+     *                If the <code>returnInsertionIndex</code> parameter is
+     *              <code>true</code> and the item is not found, returns
+     *                the index of the point in the sorted array where the
+     *                values would be inserted.
+     *
+     *  @throws SortError If there are any parameter errors,
+     *          the find critieria is not compatible with the sort
+     *          or the comparator function for the sort can not be determined.
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4.5
+     */
+    function findItem(
+                items:Array,
+                values:Object,
+                mode:String,
+                returnInsertionIndex:Boolean = false,
+                compareFunction:Function = null):int;
+
+    /**
+     *  Return whether the specified property is used to control the sort.
+     *  The function cannot determine a definitive answer if the sort uses a
+     *  custom comparator; it always returns <code>true</code> in this case.
+     *
+     *  @param property The name of the field to test.
+     *  @return Whether the property value might affect the sort outcome.
+     *  If the sort uses the default compareFunction, returns
+     *  <code>true</code> if the
+     *  <code>property</code> parameter specifies a sort field.
+     *  If the sort or any <code>ISortField</code> uses a custom comparator,
+     *  there's no way to know, so return <code>true</code>.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4.5
+     */
+    function propertyAffectsSort(property:String):Boolean;
+
+    /**
+     *  Goes through the <code>fields</code> array and calls 
+     *  <code>reverse()</code> on each of the <code>ISortField</code> objects in 
+     *  the array. If the field was descending now it is ascending, 
+     *  and vice versa.
+     *
+     *  <p>Note: an <code>ICollectionView</code> does not automatically 
+     *  update when the objects in the <code>fields</code> array are modified; 
+     *  call its <code>refresh()</code> method to update the view.</p>
+     *
+     *  <p>Note: a future release of Apache Flex SDK will change the signature
+     *  of this function to return a reversed clone of this Sort instance. See
+     *  FLEX-34853.</p>
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4.5
+     */
+    function reverse():void;
+
+    /**
+     *  Apply the current sort to the specified array (not a copy).
+     *  To prevent the array from being modified, create a copy
+     *  use the copy in the <code>items</code> parameter.
+     *
+     *  <p>Flex <code>ICollectionView</code> implementations call the 
+     *  <code>sort</code> method automatically and ensure that the sort is 
+     *  performed on a copy of the underlying data.</p>
+     *
+     *  @param items Array of items to sort.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4.5
+     */
+   function sort(items:Array):void;
+}
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ListCollectionView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ListCollectionView.as
new file mode 100644
index 000000000..04c4e4528
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ListCollectionView.as
@@ -0,0 +1,668 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.collections
+{
+	COMPILE::JS {
+		import goog.DEBUG;
+	}
+	import org.apache.royale.events.Event;
+    import org.apache.royale.events.EventDispatcher
+	/*
+    import flash.events.Event;
+    import flash.events.EventDispatcher;
+    import flash.utils.Proxy;
+    import flash.utils.flash_proxy;
+    import flash.utils.getQualifiedClassName;
+
+    import mx.binding.utils.BindingUtils;
+    import mx.binding.utils.ChangeWatcher;
+    import mx.collections.errors.CollectionViewError;
+    import mx.collections.errors.ItemPendingError;
+    import mx.collections.errors.SortError;
+    import mx.core.IMXMLObject;
+    import mx.core.mx_internal;
+    import mx.events.CollectionEvent;
+    import mx.events.CollectionEventKind;
+    import mx.events.PropertyChangeEvent;
+    import mx.resources.IResourceManager;
+    import mx.resources.ResourceManager;
+    import mx.utils.ObjectUtil;
+
+    use namespace mx_internal;
+	*/
+
+/**
+ *  Dispatched when the ICollectionView has been updated in some way.
+ *
+ *  @eventType mx.events.CollectionEvent.COLLECTION_CHANGE
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Event(name="collectionChange", type="mx.events.CollectionEvent")]
+
+[ResourceBundle("collections")]
+    
+/**
+ * The ListCollectionView class adds the properties and methods of the
+ * <code>ICollectionView</code> interface to an object that conforms to the
+ * <code>IList</code> interface. As a result, you can pass an object of this class
+ * to anything that requires an <code>IList</code> or <code>ICollectionView</code>.
+ *
+ * <p>This class also lets you use [ ] array notation
+ * to access the <code>getItemAt()</code> and <code>setItemAt()</code> methods.
+ * If you use code such as <code>myListCollectionView[index]</code>
+ * Flex calls the <code>myListCollectionView</code> object's
+ * <code>getItemAt()</code> or <code>setItemAt()</code> method.</p>
+ * 
+ * @mxml
+ *
+ *  <p>The <code>&lt;mx:ListCollectionView&gt;</code> has the following attributes,
+ *  which all of its subclasses inherit:</p>
+ *
+ *  <pre>
+ *  &lt;mx:ListCollectionView
+ *  <b>Properties</b>
+ *  filterFunction="null"
+ *  list="null"
+ *  sort="null"
+ *  <b>Events</b>
+ *  collectionChange="<i>No default</i>"
+ *  /&gt;
+ *  </pre>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class ListCollectionView //extends Proxy implements ICollectionView, IList, IMXMLObject
+{
+    //include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    // Private variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Change watcher for complex sort fields.
+     */
+    //private var _complexFieldWatcher:ComplexFieldChangeWatcher;
+
+    /**
+     *  @private
+     *  Internal event dispatcher.
+     */
+    private var eventDispatcher:EventDispatcher;
+    
+    //mx_internal var dispatchResetEvent:Boolean = true;
+
+    /**
+     *  @private
+     *  Used for accessing localized Error messages.
+     */
+	 /*
+    private var resourceManager:IResourceManager =
+                                    ResourceManager.getInstance();
+	*/
+    //--------------------------------------------------------------------------
+    //
+    // Protected variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  When the view is sorted or filtered the <code>localIndex</code> property
+     *  contains an array of items in the sorted or filtered (ordered, reduced)
+     *  view, in the sorted order.
+     *  The ListCollectionView class uses this property to access the items in 
+     *  the view.
+     *  The <code>localIndex</code> property should never contain anything
+     *  that is not in the source, but may not have everything in the source.  
+     *  This property is <code>null</code> when there is no sort.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected var localIndex:Array;
+
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The ListCollectionView constructor.
+     *
+     *  @param list the IList this ListCollectionView is meant to wrap.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function ListCollectionView(list:IList = null)
+    {
+        super();
+
+        //eventDispatcher = new EventDispatcher(this);
+        //this.list = list;
+    }
+
+    /**
+     *  Adds a list of items to the current list, placing them at the end of
+     *  the list in the order they are passed.
+     * 
+     *  @param addList IList The list of items to add to the current list
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addAll(addList:IList):void
+    {
+		if (localIndex)
+			addAllAt(addList, localIndex.length);
+		else
+			addAllAt(addList, length);
+    }
+    
+    /**
+     * @inheritDoc 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addItem(item:Object):void
+    {
+		if (localIndex)
+        	addItemAt(item, localIndex.length);
+		else
+			addItemAt(item, length);
+    }
+
+    /**
+     * @inheritDoc 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addItemAt(item:Object, index:int):void
+    {
+		/*
+        if (index < 0 || !list || index > length)
+        {
+            var message:String = resourceManager.getString(
+                "collections", "outOfBounds", [ index ]);
+
+            throw new RangeError(message);
+        }
+
+        var listIndex:int = index;
+		
+		// if we're sorted addItemAt is meaningless, just add to the end
+		if (localIndex && sort)
+        {
+            listIndex = list.length;
+        }
+		else if (localIndex && filterFunction != null)
+		{
+			// if end of filtered list, put at end of source list
+			if (listIndex == localIndex.length)
+				listIndex = list.length;
+				// if somewhere in filtered list, find it and insert before it
+				// or at beginning
+			else 
+				listIndex = list.getItemIndex(localIndex[index]);
+		}
+		// List is sorted or filtered but refresh has not been called
+		// Just add to end of list
+		else if (localIndex)
+		{
+			listIndex = list.length;
+		}
+		
+        list.addItemAt(item, listIndex);
+		*/
+    }
+    
+    /**
+     *  Adds a list of items to the current list, placing them at the position
+     *  index passed in to the function.  The items are placed at the index location
+     *  and placed in the order they are recieved.
+     * 
+     *  @param addList IList The list of items to add to the current list
+     *  @param index The location of the current list to place the new items.
+     *  @throws RangeError if index is less than 0 or greater than the length of the list. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addAllAt(addList:Object, index:int):void
+	//(addList:IList, index:int):void
+    {	
+        /*if (index < 0 || index > this.length)
+        {
+            var message:String = resourceManager.getString(
+                "collections", "outOfBounds", [ index ]);
+            throw new RangeError(message);
+        }
+        
+        var length:int = addList.length;
+
+        for (var i:int=0; i < length; i++)
+        {
+            var insertIndex:int = i + index;
+			
+			// incremental index may be out of bounds because of filtering,
+			// so add this item to the end.
+			if (insertIndex > this.length)
+				insertIndex = this.length;
+			
+            this.addItemAt(addList.getItemAt(i), insertIndex);
+        }*/
+    }
+
+    /**
+     * @inheritDoc 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getItemAt(index:int, prefetch:int = 0):Object
+    {
+		/*
+        if (index < 0 || index >= length)
+        {
+            var message:String = resourceManager.getString(
+                "collections", "outOfBounds", [ index ]);
+
+            throw new RangeError(message);
+        }
+
+        if (localIndex)
+        {
+            return localIndex[index];
+        }
+        else if (list)
+        {
+            return list.getItemAt(index, prefetch);
+        }
+		*/
+        return null;
+    }
+
+    //----------------------------------
+    // length
+    //----------------------------------
+
+    [Bindable("collectionChange")]
+    
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get length():int
+    {
+        if (localIndex)
+        {
+            return localIndex.length;
+        }
+        /*else if (list)
+        {
+            return list.length;
+        }*/
+        else
+        {
+            return 0;
+        }
+    }
+
+    //----------------------------------
+    //  list
+    //----------------------------------
+    
+    /**
+     * @inheritDoc 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function refresh():Boolean
+    {
+        return true; //internalRefresh(true);
+    }
+
+    /**
+     * Remove all items from the list.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function removeAll():void
+    {
+		/*
+        var len:int = length;
+        if (len > 0)
+        {
+            if (localIndex && filterFunction != null)
+            {
+				len = localIndex.length;
+                for (var i:int = len - 1; i >= 0; i--)
+                {
+                    removeItemAt(i);
+                }
+            }
+            else
+            {
+				localIndex = null;
+                list.removeAll();
+            }
+        }
+		*/
+    }
+
+    /**
+     * @inheritDoc 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function removeItemAt(index:int):Object
+    {
+		/*
+        if (index < 0 || index >= length)
+        {
+            var message:String = resourceManager.getString(
+                "collections", "outOfBounds", [ index ]);
+            throw new RangeError(message);
+        }
+
+        var listIndex:int = index;
+        if (localIndex)
+        {
+            var oldItem:Object = localIndex[index];
+            listIndex = list.getItemIndex(oldItem);
+        }
+        return list.removeItemAt(listIndex);
+		*/
+		return null;
+    }
+
+    //----------------------------------
+    //  sort
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the sort property.
+     */
+    private var _sort:ISort;
+
+    [Bindable("sortChanged")]
+    [Inspectable(category="General")]
+    
+    /**
+     *  @inheritDoc
+     *
+     *  @see #refresh()
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get sort():ISort
+    {
+        return _sort;
+    }
+
+    /**
+     *  @private
+     */
+    public function set sort(value:ISort):void
+    {
+        if(_sort != value)
+        {
+            //stopWatchingForComplexFieldsChanges();
+
+            _sort = value;
+
+            //startWatchingForComplexFieldsChanges();
+
+            //dispatchEvent(new Event("sortChanged"));
+        }
+    }
+
+    /**
+     * @inheritDoc 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function toArray():Array
+    {
+        var ret:Array;
+        if (localIndex)
+            ret = localIndex.concat();
+		/*
+        else
+            ret = list.toArray();
+		*/
+        return ret;
+    }
+
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function createCursor():void
+	//IViewCursor
+    {
+        //return new ListCollectionViewCursor(this);
+    }
+
+    //----------------------------------
+    //  filterFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the filterFunction property.
+     */
+    private var _filterFunction:Function;
+
+    [Bindable("filterFunctionChanged")]
+    [Inspectable(category="General")]
+    
+    /**
+     *  @inheritDoc
+     *
+     *  @see #refresh()
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get filterFunction():Function
+    {
+        return _filterFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set filterFunction(f:Function):void
+    {
+		/*
+        _filterFunction = f;
+        dispatchEvent(new Event("filterFunctionChanged"));
+		*/
+    }
+
+    /**
+     * @inheritDoc 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getItemIndex(item:Object):int
+    {
+        var i:int;
+        /*
+        if (localIndex && filterFunction != null)
+        {
+            var len:int = localIndex.length;
+            for (i = 0; i < len; i++)
+            {
+                if (localIndex[i] == item)
+                    return i;
+            }
+
+            return -1;
+        }
+		else if (localIndex && sort)
+		{
+			var startIndex:int = findItem(item, Sort.FIRST_INDEX_MODE);
+			if (startIndex == -1)
+				return -1;
+			
+			var endIndex:int = findItem(item, Sort.LAST_INDEX_MODE);
+			for (i = startIndex; i <= endIndex; i++)
+			{
+				if (localIndex[i] == item)
+					return i;
+			}
+			
+			return -1;
+		}
+		// List is sorted or filtered but refresh has not been called
+		else if (localIndex)
+		{
+			len = localIndex.length;
+			for (i = 0; i < len; i++)
+			{
+				if (localIndex[i] == item)
+					return i;
+			}
+			
+			return -1;
+		}
+		
+        // fallback
+        return list.getItemIndex(item);
+		*/
+		return i;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @see mx.events.CollectionEvent
+     *  @see mx.core.IPropertyChangeNotifier
+     *  @see mx.events.PropertyChangeEvent
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function itemUpdated(item:Object, property:Object = null,
+                                oldValue:Object = null,
+                                newValue:Object = null):void
+    {
+        //list.itemUpdated(item, property, oldValue, newValue);
+    }
+
+    /**
+     * @inheritDoc 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function setItemAt(item:Object, index:int):Object
+    {
+		/*
+        if (index < 0 || !list || index >= length)
+         {
+            var message:String = resourceManager.getString(
+                "collections", "outOfBounds", [ index ]);
+            throw new RangeError(message);
+        }
+
+        var listIndex:int = index;
+        if (localIndex)
+        {
+            if (index > localIndex.length)
+            {
+                listIndex = list.length;
+            }
+            else
+            {
+                var oldItem:Object = localIndex[index];
+				// FIXME fails on duplicates
+                listIndex = list.getItemIndex(oldItem);
+            }
+        }
+        return list.setItemAt(item, listIndex);
+		*/
+		return null;
+    }
+
+	}
+}
\ No newline at end of file
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/collections/XMLListCollection.as b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/XMLListCollection.as
new file mode 100644
index 000000000..354e32fb7
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/XMLListCollection.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 mx.collections
+{
+
+/* [DefaultProperty("source")]
+ */
+/**
+ *  The XMLListCollection class provides collection functionality to
+ *  an XMLList object and makes available some of the methods of
+ *  the native XMLList class.
+ *
+ *  @mxml
+ * 
+ *  <p>The <code>&lt;mx:XMLListCollection&gt;</code> tag inherits all
+ *  the attributes of its superclass, and adds the following attributes:</p>
+ *
+ *  <pre>
+ *  &lt;mx:XMLListCollection
+ *  <b>Properties</b>
+ *  source="null"
+ *  /&gt;
+ *  </pre>
+ * 
+ *  @see XMLList
+ *  @see XML
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class XMLListCollection 
+{
+/*     include "../core/Version.as";
+ */
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Constructor.
+     *
+     *  <p>Creates a new XMLListCollection object
+     *  using the specified XMLList object.</p>
+     * 
+     *  @param source The XMLList object containing the data to be represented
+     *                by the XMLListCollection object.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function XMLListCollection(source:Object = null)
+    {
+        super();
+
+       // this.source = source;
+    }
+
+    
+
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Grid.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Grid.as
new file mode 100644
index 000000000..2be1526ad
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Grid.as
@@ -0,0 +1,828 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.containers
+{
+
+import mx.containers.gridClasses.GridColumnInfo;
+import mx.containers.gridClasses.GridRowInfo;
+import mx.core.EdgeMetrics;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Number of pixels between children in the horizontal direction. 
+ *  The default value is 8.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+[Style(name="horizontalGap", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between children in the vertical direction. 
+ *  The default value is 6.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+[Style(name="verticalGap", type="Number", format="Length", inherit="no")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="direction", kind="property")]
+
+[Exclude(name="focusIn", kind="event")]
+[Exclude(name="focusOut", kind="event")]
+
+[Exclude(name="focusBlendMode", kind="style")]
+[Exclude(name="focusSkin", kind="style")]
+[Exclude(name="focusThickness", kind="style")]
+
+[Exclude(name="focusInEffect", kind="effect")]
+[Exclude(name="focusOutEffect", kind="effect")]
+
+//[IconFile("Grid.png")]
+
+/**
+ *  A Grid container lets you arrange children as rows and columns
+ *  of cells, similar to an HTML table. 
+ *  The Grid container contains one or more rows, and each row can contain
+ *  one or more cells, or items. You use the following tags to define a Grid control:
+ *
+ *  <ul>
+ *     <li>The <code>&lt;mx:Grid&gt;</code> tag defines a Grid container.</li>
+ * 
+ *     <li>The <code>&lt;mx:GridRow&gt;</code> tag defines a grid row, 
+ *     which has one or more cells. The grid row must be a child of the 
+ *     <code>&lt;Grid&gt;</code> tag.</li>
+ * 
+ *     <li>The <code>&lt;mx:GridItem&gt;</code> tag defines a grid cell,
+ *     and must be a child of the <code>&lt;GridRow&gt;</code> tag.
+ *     The <code>&lt;mx:GridItem&gt;</code> tag can contain
+ *     any number of children.</li>
+ *  </ul>
+ * 
+ *  <p>The height of all the cells in a single row is the same,
+ *  but each row can have a different height. 
+ *  The width of all cells in a single column is the same,
+ *  but each column can have a different width. 
+ *  You can define a different number of cells
+ *  for each row or each column of the Grid container. 
+ *  In addition, a cell can span multiple columns
+ *  or multiple rows of the container.</p>
+ *  
+ *  <p>The Grid, GridRow, and GridItem containers have the following default sizing characteristics:</p>
+ *     <table class="innertable">
+ *        <tr>
+ *           <th>Characteristic</th>
+ *           <th>Description</th>
+ *        </tr>
+ *        <tr>
+ *           <td>Grid height</td>
+ *           <td>The sum of the default or explicit heights of all rows plus the gaps between rows.</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Grid width</td>
+ *           <td>The sum of the default or explicit width of all columns plus the gaps between columns.</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Height of each row and each cell</td>
+ *           <td>The default or explicit height of the tallest item in the row. If a GridItem container does not 
+ *               have an explicit size, its default height is the default or explicit height of the child in the cell.</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Width of each column and each cell</td>
+ *           <td>The default or explicit width of the widest item in the column. If a GridItem container does not have an explicit 
+ *               width, its default width is the default or explicit width of the child in the cell.</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Gap between rows and columns</td>
+ *           <td>Determined by the horizontalGap and verticalGap styles of the Grid class. The default value for both 
+ *               gaps is 6 pixels.</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Default padding</td>
+ *           <td>0 pixels for the top, bottom, left, and right values, for all three container classes.</td>
+ *        </tr>
+ *     </table>
+ *
+ *  @mxml
+ *
+ *  <p>The <code>&lt;mx:Grid&gt;</code> tag inherits all of the tag 
+ *  attributes of its superclass, except the <code>Box.direction</code>
+ *  property, and adds the following tag attributes:</p>
+ *  
+ *  <pre>
+ *  &lt;mx:Grid
+ *    <strong>Styles</strong>
+ *    horizontalGap="8"
+ *    verticalGap="6"
+ *    &gt;
+ *      ...
+ *    <i>These child tags are examples only:</i>
+ *       &lt;mx:GridRow id="row1"&gt;
+ *        &lt;mx:GridItem
+ *          rowSpan="1"
+ *          colSpan="1">
+ *            &lt;mx:Button label="Button 1"/&gt;
+ *        &lt;/mx:GridItem&gt;
+ *        ...
+ *       &lt;/mx:GridRow&gt;
+ *    ...
+ *  &lt;/mx:Grid&gt;
+ *  </pre>
+ *  
+ *  @includeExample examples/GridLayoutExample.mxml
+ *
+ *  @see mx.containers.GridRow
+ *  @see mx.containers.GridItem
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class Grid extends Box
+{
+   /*  include "../core/Version.as"; */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function Grid()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Minimum, maximum, and preferred width of each column.
+     */
+   // private var columnWidths:Array /* of GridColumnInfo */;
+
+    /**
+     *  @private
+     *  Minimum, maximum, and preferred height of each row.
+     */
+  //  private var rowHeights:Array /* of GridRowInfo */;
+
+    /**
+     *  @private
+     */
+    //private var needToRemeasure:Boolean = true;
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods:UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* override public function invalidateSize():void
+    {
+        // When the Grid's size is invalidated, the rowHeights
+        // and columnWidths arrays need to be recalculated.
+        // Those arrays are usually recalculated in measure(),
+        // but set a flag in case measure() isn't called (which
+        // will happen if the Grid's width and height are explicit).
+        if (!isNaN(explicitWidth) && !isNaN(explicitHeight))        
+            needToRemeasure = true;
+        
+        super.invalidateSize();
+    }  */  
+
+    /**
+     *  Calculates the preferred, minimum, and maximum sizes of the Grid.
+
+     *  <p>You should not call this method directly; it is an advanced 
+     *  method for use in subclassing.
+     *  The Flex LayoutManger calls the <code>measure()</code> method 
+     *  at the appropriate time.
+     *  At application startup, the Flex LayoutManager attempts
+     *  to measure all components from the children to the parents
+     *  before setting them to their final sizes.</p>
+     *
+     *  <p>To understand how the Grid container calculates its measurements,
+     *  assume that every GridItem container has its <code>rowSpan</code>
+     *  property and <code>colSpan</code> property set to 1.
+     *  The measured width of the first column of the Grid container
+     *  is equal to the maximum among of the measured widths
+     *  of all GridItem containers in the first column.
+     *  Similarly, the measured width of the second column is
+     *  the maximum of all measured widths among the GridItem containers
+     *  in the second column, and so on.
+     *  The <code>measuredWidth</code> of the entire Grid container
+     *  is the sum of all columns' measured widths, plus the thickness
+     *  of the border, plus the left and right padding, plus room
+     *  for the horizontal gap between adjacent grid cells.</p>
+     *
+     *  <p>The <code>measuredHeight</code>, <code>minWidth</code>,
+     *  <code>minHeight</code>, <code>maxWidth</code>, and
+     *  <code>maxHeight</code> properties' values are all calculated
+     *  in a similar manner, by adding together the values of the
+     *  GridItem containers' <code>measuredHeight</code> properties,
+     *  <code>minWidth</code> properties, and so on.</p>
+     *
+     *  <p>If a GridItem container's <code>colSpan</code> property is 3,
+     *  that GridItem container's <code>measuredWidth</code> is divided
+     *  among 3 columns.
+     *  If the <code>measuredWidth</code> is divided equally,
+     *  each of the three columns calculates its measured width
+     *  as if the GridItem container were only in that column
+     *  and the GridItem container's <code>measuredWidth</code>
+     *  were one-third of its actual value.</p>
+     *
+     *  <p>However, the GridItem container's <code>measuredWidth</code>
+     *  property is not always divided equally among all the columns it spans.
+     *  If some of the columns have a property with a percentage value
+     *  of <code>width</code>, the GridItem container's
+     *  <code>measuredWidth</code> property is divided accordingly,
+     *  attempting to give each column the requested percentage
+     *  of the Grid container.</p>
+     *
+     *  <p>All of the values described previously are the
+     *  <i>measured</i> widths and heights of Grid.
+     *  The user can override the measured values by explicitly
+     *  supplying a value for the following properties:</p>
+     *
+     *  <ul>
+     *    <li><code>minHeight</code></li>
+     *    <li><code>minWidth</code></li>
+     *    <li><code>maxHeight</code></li>
+     *    <li><code>maxWidth</code></li>
+     *    <li><code>height</code></li>
+     *    <li><code>width</code></li>
+     *  </ul>
+     *
+     *  <p>If you override this method, your implementation must call the 
+     *  <code>super.measure()</code> method or set the
+     *  <code>measuredHeight</code> and <code>measuredWidth</code> properties.
+     *  You may also optionally set the following properties:</p>
+     * 
+     *  <ul>
+     *    <li><code>measuredMinWidth</code></li>
+     *    <li><code>measuredMinHeight</code></li>
+     *  </ul>
+     * 
+     *  <p>These properties correspond to the layout properties listed previously 
+     *  and, therefore, are not documented separately.</p>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* override protected function measure():void
+    {
+        // 1. Determine the number of grid columns,
+        // taking into account rowSpan and colSpan
+
+        var numGridRows:int = 0;
+        var numGridColumns:int = 0;
+        var columnOccupiedUntilRow:Array = [];
+        var gridRow:GridRow;
+        var gridItem:GridItem;
+        var i:int;
+        var j:int;
+        var colIndex:int;
+
+        var rowList:Array = []; // GridRows
+
+        for (var index:int = 0; index < numChildren; index++)
+        {
+            gridRow = GridRow(getChildAt(index));
+            if (gridRow.includeInLayout)
+            {
+                rowList.push(gridRow);
+                numGridRows++;
+            }
+        }
+
+
+        for (i = 0; i < numGridRows; i++)
+        {
+            colIndex = 0;
+            gridRow = rowList[i];
+
+            // Cache the number of children as a property on the gridRow
+            gridRow.numGridItems = gridRow.numChildren;
+
+            // Tell the grid row what row number it is
+            gridRow.rowIndex = i;
+            for (j = 0; j < gridRow.numGridItems; j++)
+            {           
+                // If this column is occupied by a cell in the previous row,
+                // then push cells in this row to the right.
+                if (i > 0)
+                {
+                    var occupied:int = columnOccupiedUntilRow[colIndex];
+                    while (!isNaN(occupied) && occupied >= i)
+                    {
+                        colIndex++;
+                        occupied = columnOccupiedUntilRow[colIndex];
+                    }
+                }
+
+                // Set the position of this GridItem to the next
+                // available space.
+                gridItem = GridItem(gridRow.getChildAt(j));
+                gridItem.colIndex = colIndex;
+
+                // If this cell extends to rows beyond this one, remember
+                // which columns are occupied.
+                if (gridItem.rowSpan > 1)
+                {
+                    var lastRowOccupied:int = i + gridItem.rowSpan - 1;
+                    for (var k:int = 0; k < gridItem.colSpan; k++)
+                    {
+                        columnOccupiedUntilRow[colIndex + k] = lastRowOccupied;
+                    }
+                }
+
+                colIndex += gridItem.colSpan;
+            }
+
+            if (colIndex > numGridColumns)
+                numGridColumns = colIndex;
+        }
+
+        // 2. Create the rowHeights and colWidths arrays.
+        // Initially set all heights and widths to zero.
+
+        rowHeights = new Array(numGridRows);
+        columnWidths = new Array(numGridColumns);
+
+        for (i = 0; i < numGridRows; i++)
+        {
+            rowHeights[i] = new GridRowInfo();
+        }
+        for (i = 0; i < numGridColumns; i++)
+        {
+            columnWidths[i] = new GridColumnInfo();
+        }
+        
+        // 3. Visit all the GridItems again.
+        // Expand each row and each column so it's large enough
+        // to hold its GridItems.
+        // We'll deal with rowSpans and colSpans of 1 first,
+        // then rowSpans and colSpans of 2, and so on.
+
+        var BIG_INT:int = int.MAX_VALUE;
+        var curSpan:int;
+        var nextSpan:int = 1;
+        
+        var horizontalGap:Number = getStyle("horizontalGap");
+        var verticalGap:Number = getStyle("verticalGap");
+        
+        do
+        {
+            curSpan = nextSpan;
+            nextSpan = BIG_INT;  
+
+            for (i = 0; i < numGridRows; i++)
+            {
+                gridRow = rowList[i];
+
+                // Store pointers to the columnWidths and rowHeights arrays
+                // on each GridRow object.
+                gridRow.columnWidths = columnWidths;
+                gridRow.rowHeights = rowHeights;
+
+                for (j = 0; j < gridRow.numGridItems; j++)
+                {
+                    gridItem = GridItem(gridRow.getChildAt(j));
+                    var rowSpan:int = gridItem.rowSpan;
+                    var colSpan:int = gridItem.colSpan;
+
+                    // During this iteration of the outermost do-while loop,
+                    // we're dealing with rows and columns that have a rowSpan
+                    // or colSpan equal to curSpan.  If we encounter a row or
+                    // column with a larger span, remember its span in nextSpan
+                    // for the next iteration through the do-while loop.
+
+                    if (rowSpan == curSpan)
+                        distributeItemHeight(gridItem, i, verticalGap, rowHeights);
+                    else if (rowSpan > curSpan && rowSpan < nextSpan)
+                        nextSpan = rowSpan;
+
+                    if (colSpan == curSpan)
+                    {
+                        distributeItemWidth(gridItem, gridItem.colIndex,
+                                            horizontalGap, columnWidths);
+                    }
+                    else if (colSpan > curSpan && colSpan < nextSpan)
+                    {
+                        nextSpan = colSpan;
+                    }
+                }
+            }
+        }
+        while (nextSpan < BIG_INT);
+
+        // 4. Reconcile min/preferred/max values, so that min <= pref <= max.
+        // Also compute sums of all measurements.
+
+        var minWidth:Number = 0;
+        var minHeight:Number = 0;
+        var preferredWidth:Number = 0;
+        var preferredHeight:Number = 0;
+
+        for (i = 0; i < numGridRows; i++)
+        {
+            var rowInfo:GridRowInfo = rowHeights[i];
+
+            if (rowInfo.min > rowInfo.preferred)
+                rowInfo.min = rowInfo.preferred;
+            if (rowInfo.max < rowInfo.preferred)
+                rowInfo.max = rowInfo.preferred;
+
+            minHeight += rowInfo.min;
+            preferredHeight += rowInfo.preferred;
+        }
+
+        for (i = 0; i < numGridColumns; i++)
+        {
+            var columnInfo:GridColumnInfo = columnWidths[i];
+
+            if (columnInfo.min > columnInfo.preferred)
+                columnInfo.min = columnInfo.preferred;
+            if (columnInfo.max < columnInfo.preferred)
+                columnInfo.max = columnInfo.preferred;
+
+            minWidth += columnInfo.min;
+            preferredWidth += columnInfo.preferred;
+        }
+
+        // 5. Add horizontal space for the gaps between the grid cells
+        // and the margins around them.
+
+        // Add space for grid's left and right margins
+        var vm:EdgeMetrics = viewMetricsAndPadding;
+        var padding:Number = vm.left + vm.right;
+        var row:GridRow;
+        var rowVm:EdgeMetrics;
+        var maxRowPadding:Number = 0;
+
+        // Add space for horizontal gaps between grid items.
+        if (numGridColumns > 1)
+            padding += getStyle("horizontalGap") * (numGridColumns - 1);
+
+        // Add space for the gridrow's left and right margins.
+        for (i = 0; i < numGridRows; i++)
+        {
+            row = rowList[i];
+            rowVm = row.viewMetricsAndPadding;
+            var rowPadding:Number = rowVm.left + rowVm.right;
+            if (rowPadding > maxRowPadding)
+                maxRowPadding = rowPadding;
+        }
+        padding += maxRowPadding;
+
+        minWidth += padding;
+        preferredWidth += padding;
+
+        // 6. Add vertical space for the gaps between grid cells
+        // and the margins around them.
+
+        // Add space for grid's left and right margins.
+        padding = vm.top + vm.bottom;
+
+        // Add space for vertical gaps between grid items.
+        if (numGridRows > 1)
+            padding += getStyle("verticalGap") * (numGridRows - 1);
+
+        // Add each of the grid rows' margins.
+        for (i = 0; i < numGridRows; i++)
+        {
+            row = rowList[i];
+            rowVm = row.viewMetricsAndPadding;
+            padding += rowVm.top + rowVm.bottom;
+        }
+
+        minHeight += padding;
+        preferredHeight += padding;
+
+        // 7. Now that the Grid is finished measuring itself,
+        // update all the measurements of the child GridRows.
+
+        for (i = 0; i < numGridRows; i++)
+        {
+            row = rowList[i];
+            row.updateRowMeasurements();
+        }
+
+        // 8. Up until now, we've calculated all our measurements
+        // based on the GridItems.
+        // If someone has explicitly set the width (or percentWidth
+        // or whatever) of a GridRow, we've been ignoring it.
+        // Run the standard Box measurement algorithm, which will
+        // take into account hard-coded values on the GridRow objects,
+        // and combine the measured values with the ones
+        // we've calculated based on GridItems.
+
+        super.measure();
+        
+        measuredMinWidth = Math.max(measuredMinWidth, minWidth);
+        measuredMinHeight = Math.max(measuredMinHeight, minHeight);
+        measuredWidth = Math.max(measuredWidth, preferredWidth);
+        measuredHeight = Math.max(measuredHeight, preferredHeight);
+        
+        needToRemeasure = false;        
+    } */
+
+    /**
+     *  Sets the size and position of each child of the Grid.
+     *
+     *  <p>You should not call this method directly; it is an advanced 
+     *  method for use in subclassing.
+     *  The Flex LayoutManager calls the <code>updateDisplayList</code>
+     *  method at the appropriate time.
+     *  At application startup, the Flex LayoutManager calls
+     *  the <code>updateDisplayList()</code> method on every component,
+     *  starting with the root and working downward.</p>
+     *
+     *  <p>The Grid container follows the same layout rules
+     *  as the VBox container.  
+     *  The positions and sizes of the GridRow containers
+     *  are calculated the same way that a VBox container
+     *  determines the positions and sizes of its children.
+     *  Similarly, a GridRow container positions its GridItem containers
+     *  using a similar layout algorithm of an HBox container.</p>
+     *
+     *  <p>The only difference is that the GridRow containers
+     *  all coordinate with one another, so they all choose
+     *  the same positions and sizes for their children
+     *  (so that the columns of the Grid container align). </p>
+     *
+     *  <p>If you override this method, your implementation should call
+     *  the <code>super.updateDisplayList()</code> method
+     *  and call the <code>move()</code> and the <code>setActualSize()</code>
+     *  methods on each of the children.
+     *  For the purposes of performing layout, you should get the size
+     *  of this container from the <code>unscaledWidth</code>
+     *  and <code>unscaledHeight</code> properties, not the
+     *  <code>width</code> and <code>height</code> properties.
+     *  The <code>width</code> and <code>height</code> properties do not
+     *  take into account the values of the <code>scaleX</code>
+     *  and <code>scaleY</code> properties for this container.</p>
+     *
+     *  @param unscaledWidth Specifies the width of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  <code>scaleX</code> property of the component.
+     *
+     *  @param unscaledHeight Specifies the height of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  <code>scaleY</code> property of the component.   
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {       
+        // If the measure function wasn't called (because the widths
+        // and heights of the Grid are explicitly set), then we need
+        // to generate the rowHeights and columnWidths arrays now.
+        if (needToRemeasure)
+            measure();
+            
+        // Follow standard VBox rules for laying out the child rows.
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var n:int = 0;
+        var i:int;
+        var child:GridRow;
+
+        var rowList:Array = []; // GridRows
+
+        for (var index:int = 0; index < numChildren; index++)
+        {
+            child = GridRow(getChildAt(index));
+            if (child.includeInLayout)
+            {
+                rowList.push(child);
+                n++;
+            }
+        }
+
+        // Copy the row heights, which were calculated by the VBox layout
+        // algorithm, into the rowHeights array.
+        for (i = 0; i < n; i++)
+        {
+            child = rowList[i];
+            
+            rowHeights[i].y = child.y;
+            rowHeights[i].height = child.height;
+        }
+
+        // Now that all the rows have been layed out, lay out the GridItems
+        // in those rows, based on the info stored in the colWidths and
+        // rowHeights arrays.
+        for (i = 0; i < n; i++)
+        {
+            child = rowList[i];
+            
+            child.doRowLayout(child.width * child.scaleX,
+                              child.height * child.scaleY);
+        }
+    } */
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* private function distributeItemHeight(item:GridItem, rowIndex:Number,
+                                          verticalGap:Number,
+                                          rowHeights:Array):void
+    {
+        var maxHeight:Number = item.maxHeight;
+        var preferredHeightToDistribute:Number =
+            item.getExplicitOrMeasuredHeight();
+        var minHeightToDistribute:Number = item.minHeight;
+        var rowSpan:int = item.rowSpan;
+        var totalFlex:Number = 0;
+        var divideEqually:Boolean = false;
+        var i:int;
+        var rowInfo:GridRowInfo;
+
+        // If the row(s) spanned by this GridItem are already non-empty,
+        // subtract the existing sizes of those rows from the item's height.
+        for (i = rowIndex; i < rowIndex + rowSpan; i++)
+        {
+            rowInfo = rowHeights[i];
+            preferredHeightToDistribute -= rowInfo.preferred;
+            minHeightToDistribute -= rowInfo.min;
+            totalFlex += rowInfo.flex;
+        }
+
+        // Subtract space for gaps between the rows.
+        if (rowSpan > 1)
+        {
+            var gap:Number = verticalGap * (rowSpan - 1);
+            preferredHeightToDistribute -= gap;
+            minHeightToDistribute -= gap;
+        }
+
+        // If none of the rows spanned by this item are resizable,
+        // then divide space among the rows equally.
+        if (totalFlex == 0)
+        {
+            totalFlex = rowSpan;
+            divideEqually = true;
+        }
+
+        // If we haven't yet distributed the height of the object,
+        // divide remaining height among the rows.
+        // If some rows are resizable and others are not,
+        // allocate space to the resizable ones.
+        preferredHeightToDistribute =
+            preferredHeightToDistribute > 0 ?
+            Math.ceil(preferredHeightToDistribute / totalFlex) :
+            0;
+        minHeightToDistribute =
+            minHeightToDistribute > 0 ?
+            Math.ceil(minHeightToDistribute / totalFlex) :
+            0;          
+        
+        for (i = rowIndex; i < rowIndex + rowSpan; i++)
+        {
+            rowInfo = rowHeights[i];
+            var flex:Number = divideEqually ? 1 : rowInfo.flex;
+            rowInfo.preferred += preferredHeightToDistribute * flex;
+            rowInfo.min += minHeightToDistribute * flex;
+        }
+
+        // The GridItem.maxHeight attribute is respected only for rows
+        // with a rowSpan of 1.
+        if (rowSpan == 1 && maxHeight < rowInfo.max)
+            rowInfo.max = maxHeight;
+    } */
+
+    /**
+     *  @private
+     */
+    /* private function distributeItemWidth(item:GridItem, colIndex:int,
+                                         horizontalGap:Number, columnWidths:Array):void
+    {
+        var maxWidth:Number = item.maxWidth;
+        var preferredWidthToDistribute:Number =
+            item.getExplicitOrMeasuredWidth();
+        var minWidthToDistribute:Number = item.minWidth;
+        var colSpan:int = item.colSpan;
+        var percentWidth:Number = item.percentWidth;
+        var totalFlex:Number = 0;
+        var divideEqually:Boolean = false;
+        var i:int;
+        var columnInfo:GridColumnInfo;
+
+        // If the column(s) spanned by this GridItem are already non-empty,
+        // subtract the existing sizes of those columns from the item's width.
+        for (i = colIndex; i < colIndex + colSpan; i++)
+        {
+            columnInfo = columnWidths[i];
+            preferredWidthToDistribute -= columnInfo.preferred;
+            minWidthToDistribute -= columnInfo.min;
+            totalFlex += columnInfo.flex;
+        }
+
+        // Subtract space for gaps between the columns.
+        if (colSpan > 1)
+        {
+            var gap:Number = horizontalGap * (colSpan - 1);
+            preferredWidthToDistribute -= gap;
+            minWidthToDistribute -= gap;
+        }
+
+        // If none of the columns spanned by this item are resizable,
+        // then divide space among the columns equally.
+        if (totalFlex == 0)
+        {
+            totalFlex = colSpan;
+            divideEqually = true;
+        }
+
+        // If we haven't yet distributed the width of the object,
+        // divide remaining width among the columns.
+        // If some columns are resizable and others are not,
+        // allocate space to the resizable ones.
+        preferredWidthToDistribute =
+            preferredWidthToDistribute > 0 ?
+            Math.ceil(preferredWidthToDistribute / totalFlex) :
+            0;
+        minWidthToDistribute =
+            minWidthToDistribute > 0 ?
+            Math.ceil(minWidthToDistribute / totalFlex) :
+            0;
+        
+        for (i = colIndex; i < colIndex + colSpan; i++)
+        {
+            columnInfo = columnWidths[i];
+            var flex:Number = divideEqually ? 1 : columnInfo.flex;
+            columnInfo.preferred += preferredWidthToDistribute * flex;
+            columnInfo.min += minWidthToDistribute * flex;
+            if (percentWidth)
+            {
+                columnInfo.percent = Math.max(columnInfo.percent,
+                                              percentWidth / colSpan);
+            }
+        }
+
+        // The GridItem.maxWidth attribute is respected only for columns
+        // with a colSpan of 1.
+        if (colSpan == 1 && maxWidth < columnInfo.max)
+            columnInfo.max = maxWidth;
+    }  */  
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/GridItem.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/GridItem.as
index 31dca812f..f0b8d8757 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/GridItem.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/GridItem.as
@@ -114,11 +114,12 @@ package mx.containers
  *  @langversion 3.0
  *  @playerversion Flash 9
  *  @playerversion AIR 1.1
- *  @productversion Flex 3
+ *  @productversion Royale 0.9.3
+ *  @royalesuppresspublicvarwarning
  */
 public class GridItem extends HBox
 {
-    include "../core/Version.as";
+   // include "../core/Version.as";
 
     //--------------------------------------------------------------------------
     //
@@ -132,7 +133,7 @@ public class GridItem extends HBox
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @productversion Royale 0.9.3
      */
     public function GridItem()
     {
@@ -176,7 +177,7 @@ public class GridItem extends HBox
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @productversion Royale 0.9.3
      */
     public function get colSpan():int
     {
@@ -214,7 +215,7 @@ public class GridItem extends HBox
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @productversion Royale 0.9.3
      */
     public function get rowSpan():int
     {
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/GridRow.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/GridRow.as
index c951cdf6a..844c391f0 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/GridRow.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/GridRow.as
@@ -20,8 +20,9 @@
 package mx.containers
 {
 
-import flash.display.DisplayObject;
-import mx.containers.gridClasses.GridColumnInfo;
+/* import flash.display.DisplayObject;
+ */
+ import mx.containers.gridClasses.GridColumnInfo;
 import mx.containers.gridClasses.GridRowInfo;
 import mx.containers.utilityClasses.Flex;
 import mx.core.EdgeMetrics;
@@ -43,7 +44,7 @@ use namespace mx_internal;
  *  @langversion 3.0
  *  @playerversion Flash 9
  *  @playerversion AIR 1.1
- *  @productversion Flex 3
+ *  @productversion Royale 0.9.3
  */
 [Style(name="horizontalAlign", type="String", enumeration="left,center,right", inherit="no")]
 
@@ -56,7 +57,7 @@ use namespace mx_internal;
  *  @langversion 3.0
  *  @playerversion Flash 9
  *  @playerversion AIR 1.1
- *  @productversion Flex 3
+ *  @productversion Royale 0.9.3
  */
 [Style(name="verticalAlign", type="String", enumeration="bottom,middle,top", inherit="no")]
 
@@ -169,11 +170,11 @@ use namespace mx_internal;
  *  @langversion 3.0
  *  @playerversion Flash 9
  *  @playerversion AIR 1.1
- *  @productversion Flex 3
+ *  @productversion Royale 0.9.3
  */
 public class GridRow extends HBox
 {
-    include "../core/Version.as";
+    //include "../core/Version.as";
 
     //--------------------------------------------------------------------------
     //
@@ -187,14 +188,14 @@ public class GridRow extends HBox
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @productversion Royale 0.9.3
      */
     public function GridRow()
     {
         super();
 
         // Set this to false so Container doesn't clip.
-        super.clipContent = false;
+       // super.clipContent = false;
     }
 
     //--------------------------------------------------------------------------
@@ -207,24 +208,24 @@ public class GridRow extends HBox
      *  @private
      *  Width of columns in the row.
      */
-    internal var columnWidths:Array /* of GridColumnInfo */;
+   // internal var columnWidths:Array /* of GridColumnInfo */;
 
     /**
      *  @private
      *  Height of rows.
      */
-    internal var rowHeights:Array /* of GridRowInfo */;
+   // internal var rowHeights:Array /* of GridRowInfo */;
 
     /**
      *  @private
      *  Index of this row.
      */
-    internal var rowIndex:int = 0;
+  //  internal var rowIndex:int = 0;
 
     /**
      *  @private
      */
-    internal var numGridItems:int;
+  //  internal var numGridItems:int;
 
     //--------------------------------------------------------------------------
     //
@@ -236,15 +237,15 @@ public class GridRow extends HBox
     //  clipContent
     //----------------------------------
 
-    [Inspectable(environment="none")]
+  //  [Inspectable(environment="none")]
 
     /**
      *  @private
      */
-    override public function get clipContent():Boolean
+    /* override public function get clipContent():Boolean
     {
         return false;
-    }
+    } */
 
     /**
      *  @private
@@ -253,53 +254,53 @@ public class GridRow extends HBox
      *  We don't want GridRows to do clipping, because GridItems with
      *  rowSpan > 1 will extend outside the borders of the GridRow.
      */
-    override public function set clipContent(value:Boolean):void
+   /*  override public function set clipContent(value:Boolean):void
     {
-    }
+    } */
 
     //----------------------------------
     //  horizontalScrollPolicy
     //----------------------------------
 
-    [Inspectable(environment="none")]
+   // [Inspectable(environment="none")]
 
     /**
      *  @private
      */
-    override public function get horizontalScrollPolicy():String
+    /* override public function get horizontalScrollPolicy():String
     {
         return ScrollPolicy.OFF;
     }
-
+ */
     /**
      *  @private
      *  Don't allow user to set horizontalScrollPolicy.
      */
-    override public function set horizontalScrollPolicy(value:String):void
+    /* override public function set horizontalScrollPolicy(value:String):void
     {
-    }
+    } */
 
     //----------------------------------
     //  verticalScrollPolicy
     //----------------------------------
 
-    [Inspectable(environment="none")]
+    //[Inspectable(environment="none")]
 
     /**
      *  @private
      */
-    override public function get verticalScrollPolicy():String
+   /*  override public function get verticalScrollPolicy():String
     {
         return ScrollPolicy.OFF;
-    }
+    } */
 
     /**
      *  @private
      *  Don't allow user to set verticalScrollPolicy.
      */
-    override public function set verticalScrollPolicy(value:String):void
+    /* override public function set verticalScrollPolicy(value:String):void
     {
-    }
+    } */
 
     //--------------------------------------------------------------------------
     //
@@ -313,14 +314,14 @@ public class GridRow extends HBox
      *  the column size and arrange children in proper order.
      *  Hence invalidate the size and layout of the Grid.
      */
-    override public function setChildIndex(child:DisplayObject,
+    /* override public function setChildIndex(child:DisplayObject,
                                            newIndex:int):void
     {
         super.setChildIndex(child, newIndex);
 
         Grid(parent).invalidateSize();
         Grid(parent).invalidateDisplayList();
-    }
+    } */
 
     //--------------------------------------------------------------------------
     //
@@ -340,22 +341,22 @@ public class GridRow extends HBox
      *  The Grid.measure() contains code that calls measure()
      *  on each child GridRow.
      */
-    override public function invalidateSize():void
+    /* override public function invalidateSize():void
     {
         super.invalidateSize();
         if (parent)
             Grid(parent).invalidateSize();
-    }
+    } */
   
     /**
      *  @private
      */
-    override public function invalidateDisplayList():void
+    /* override public function invalidateDisplayList():void
     {
         super.invalidateDisplayList();
         if (parent)
             Grid(parent).invalidateDisplayList();
-    }
+    } */
 
     /**
      *  Sets the size and position of each child of the GridRow container.
@@ -393,27 +394,27 @@ public class GridRow extends HBox
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @productversion Royale 0.9.3
      */
-    override protected function updateDisplayList(unscaledWidth:Number,
+    /* override protected function updateDisplayList(unscaledWidth:Number,
                                                   unscaledHeight:Number):void
     {
         // Don't do any layout at the usual time.
         // Instead, we'll do our layout
         // when Grid.updateDisplayList() calls GridRow.doRowLayout().
-    }
+    } */
 
     /**
      *  @private
      *  Use the horizontalGap from my parent grid;
      *  ignore any horizontalGap that is set on the GridRow.
      */
-    override public function getStyle(styleProp:String):*
+    /* override public function getStyle(styleProp:String):*
     {
         return styleProp == "horizontalGap" && parent ?
                Grid(parent).getStyle("horizontalGap") :
                super.getStyle(styleProp);
-    }
+    } */
 
     //--------------------------------------------------------------------------
     //
@@ -426,7 +427,7 @@ public class GridRow extends HBox
      *  Calculates the preferred, minimum and maximum sizes
      *  of the GridRow container.
      */
-    internal function updateRowMeasurements():void
+    /* internal function updateRowMeasurements():void
     {
         var numChildren:Number = columnWidths.length;
 
@@ -448,12 +449,12 @@ public class GridRow extends HBox
         measuredMinHeight = rowInfo.min + hPadding;
         measuredWidth = preferredWidth + wPadding;
         measuredHeight = rowInfo.preferred + hPadding;
-    }
+    } */
 
     /**
      *  @private
      */
-    internal function doRowLayout(unscaledWidth:Number,
+    /* internal function doRowLayout(unscaledWidth:Number,
                                   unscaledHeight:Number):void
     {       
         // Call layoutChrome() to size and position the border.
@@ -551,12 +552,12 @@ public class GridRow extends HBox
 
         invalidateSizeFlag = oldSizeFlag;
         invalidateDisplayListFlag = oldDisplayListFlag;
-    }
+    } */
 
     /**
      *  @private
      */
-    private function calculateColumnWidths():void
+    /* private function calculateColumnWidths():void
     {
         var vm:EdgeMetrics = viewMetricsAndPadding;
         var gap:Number = getStyle("horizontalGap");
@@ -621,7 +622,7 @@ public class GridRow extends HBox
             columnInfo.x = left;
             left += columnInfo.width + gap;
         }
-    }
+    } */
 }
 
 }
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as
new file mode 100644
index 000000000..dca8e8ea4
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as
@@ -0,0 +1,612 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.controls
+{
+
+	COMPILE::JS {
+		import goog.DEBUG;
+	}
+	import org.apache.royale.events.Event;
+	import org.apache.royale.events.CloseEvent;
+	import mx.containers.Panel;
+	import mx.managers.ISystemManager;
+	import mx.core.IUIComponent;
+	import mx.core.FlexGlobals;
+	/*
+import flash.events.Event;
+import flash.events.EventPhase;
+
+import mx.controls.alertClasses.AlertForm;
+import mx.core.EdgeMetrics;
+import mx.core.FlexVersion;
+import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModule;
+import mx.core.IFlexModuleFactory;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.events.CloseEvent;
+import mx.events.FlexEvent;
+import mx.managers.ISystemManager;
+import mx.managers.PopUpManager;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+
+use namespace mx_internal;
+*/
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Name of the CSS style declaration that specifies 
+ *  styles for the Alert buttons. 
+ * 
+ *  @default "alertButtonStyle"
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="buttonStyleName", type="String", inherit="no")]
+
+/**
+ *  Name of the CSS style declaration that specifies
+ *  styles for the Alert message text. 
+ *
+ *  <p>You only set this style by using a type selector, which sets the style 
+ *  for all Alert controls in your application.  
+ *  If you set it on a specific instance of the Alert control, it can cause the control to 
+ *  size itself incorrectly.</p>
+ * 
+ *  @default undefined
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="messageStyleName", type="String", inherit="no")]
+
+/**
+ *  Name of the CSS style declaration that specifies styles
+ *  for the Alert title text. 
+ *
+ *  <p>You only set this style by using a type selector, which sets the style 
+ *  for all Alert controls in your application.  
+ *  If you set it on a specific instance of the Alert control, it can cause the control to 
+ *  size itself incorrectly.</p>
+ * 
+ *  @default "windowStyles" 
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="titleStyleName", type="String", inherit="no")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+//[AccessibilityClass(implementation="mx.accessibility.AlertAccImpl")]
+
+//[RequiresDataBinding(true)]
+
+//[ResourceBundle("controls")]
+    
+/**
+ *  The Alert control is a pop-up dialog box that can contain a message,
+ *  a title, buttons (any combination of OK, Cancel, Yes, and No) and an icon. 
+ *  The Alert control is modal, which means it will retain focus until the user closes it.
+ *
+ *  <p>Import the mx.controls.Alert class into your application, 
+ *  and then call the static <code>show()</code> method in ActionScript to display
+ *  an Alert control. You cannot create an Alert control in MXML.</p>
+ *
+ *  <p>The Alert control closes when you select a button in the control, 
+ *  or press the Escape key.</p>
+ *
+ *  @includeExample examples/SimpleAlert.mxml
+ *
+ *  @see mx.managers.SystemManager
+ *  @see mx.managers.PopUpManager
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class Alert extends Panel
+{
+    //include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Value that enables a Yes button on the Alert control when passed
+     *  as the <code>flags</code> parameter of the <code>show()</code> method.
+     *  You can use the | operator to combine this bitflag
+     *  with the <code>OK</code>, <code>CANCEL</code>,
+     *  <code>NO</code>, and <code>NONMODAL</code> flags.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public static const YES:uint = 0x0001;
+    
+    /**
+     *  Value that enables a No button on the Alert control when passed
+     *  as the <code>flags</code> parameter of the <code>show()</code> method.
+     *  You can use the | operator to combine this bitflag
+     *  with the <code>OK</code>, <code>CANCEL</code>,
+     *  <code>YES</code>, and <code>NONMODAL</code> flags.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public static const NO:uint = 0x0002;
+    
+    /**
+     *  Value that enables an OK button on the Alert control when passed
+     *  as the <code>flags</code> parameter of the <code>show()</code> method.
+     *  You can use the | operator to combine this bitflag
+     *  with the <code>CANCEL</code>, <code>YES</code>,
+     *  <code>NO</code>, and <code>NONMODAL</code> flags.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public static const OK:uint = 0x0004;
+    
+    /**
+     *  Value that enables a Cancel button on the Alert control when passed
+     *  as the <code>flags</code> parameter of the <code>show()</code> method.
+     *  You can use the | operator to combine this bitflag
+     *  with the <code>OK</code>, <code>YES</code>,
+     *  <code>NO</code>, and <code>NONMODAL</code> flags.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public static const CANCEL:uint= 0x0008;
+
+    /**
+     *  Value that makes an Alert nonmodal when passed as the
+     *  <code>flags</code> parameter of the <code>show()</code> method.
+     *  You can use the | operator to combine this bitflag
+     *  with the <code>OK</code>, <code>CANCEL</code>,
+     *  <code>YES</code>, and <code>NO</code> flags.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public static const NONMODAL:uint = 0x8000;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class mixins
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  @private
+     *  Placeholder for mixin by AlertAccImpl.
+     */
+    //mx_internal static var createAccessibilityImplementation:Function;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Storage for the resourceManager getter.
+     *  This gets initialized on first access,
+     *  not at static initialization time, in order to ensure
+     *  that the Singleton registry has already been initialized.
+     */
+    //private static var _resourceManager:IResourceManager;
+    
+    /**
+     *  @private
+     */
+    //private static var initialized:Boolean = false;
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Class properties
+    //
+    //--------------------------------------------------------------------------
+    
+    //----------------------------------
+    //  buttonHeight
+    //----------------------------------
+
+    //[Inspectable(category="Size")]
+
+    /**
+     *  Height of each Alert button, in pixels.
+     *  All buttons must be the same height.
+     *
+     *  @default 22
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //public static var buttonHeight:Number = 22;
+    
+    //----------------------------------
+    //  buttonWidth
+    //----------------------------------
+
+    //[Inspectable(category="Size")]
+
+    /**
+     *  Width of each Alert button, in pixels.
+     *  All buttons must be the same width.
+     *
+     *  @default 65
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //public static var buttonWidth:Number = 65;
+    
+    //----------------------------------
+    //  cancelLabel
+    //----------------------------------
+    /**
+     *  @private
+     *  Storage for the cancelLabel property.
+     */
+    //private static var _cancelLabel:String;
+    
+    /**
+     *  @private
+     */
+    //private static var cancelLabelOverride:String;
+
+    //[Inspectable(category="General")]
+
+    //----------------------------------
+    //  noLabel
+    //----------------------------------
+    
+    /**
+     *  @private
+     *  Storage for the noLabel property.
+     */
+    //private static var _noLabel:String;
+    
+    /**
+     *  @private
+     */
+    //private static var noLabelOverride:String;
+
+    //[Inspectable(category="General")]
+
+    /**
+     *  @private
+     *  Storage for the okLabel property.
+     */
+    //private static var _okLabel:String;
+    
+    /**
+     *  @private
+     */
+    //private static var okLabelOverride:String;
+
+    //[Inspectable(category="General")]
+
+    /**
+     *  @private
+     *  Storage for the yesLabel property.
+     */
+    //private static var _yesLabel:String;
+    
+    /**
+     *  @private
+     */
+    //private static var yesLabelOverride:String;
+
+    //[Inspectable(category="General")]
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Static method that pops up the Alert control. The Alert control 
+     *  closes when you select a button in the control, or press the Escape key.
+     * 
+     *  @param text Text string that appears in the Alert control. 
+     *  This text is centered in the alert dialog box.
+     *
+     *  @param title Text string that appears in the title bar. 
+     *  This text is left justified.
+     *
+     *  @param flags Which buttons to place in the Alert control.
+     *  Valid values are <code>Alert.OK</code>, <code>Alert.CANCEL</code>,
+     *  <code>Alert.YES</code>, and <code>Alert.NO</code>.
+     *  The default value is <code>Alert.OK</code>.
+     *  Use the bitwise OR operator to display more than one button. 
+     *  For example, passing <code>(Alert.YES | Alert.NO)</code>
+     *  displays Yes and No buttons.
+     *  Regardless of the order that you specify buttons,
+     *  they always appear in the following order from left to right:
+     *  OK, Yes, No, Cancel.
+     *
+     *  @param parent Object upon which the Alert control centers itself.
+     *
+     *  @param closeHandler Event handler that is called when any button
+     *  on the Alert control is pressed.
+     *  The event object passed to this handler is an instance of CloseEvent;
+     *  the <code>detail</code> property of this object contains the value
+     *  <code>Alert.OK</code>, <code>Alert.CANCEL</code>,
+     *  <code>Alert.YES</code>, or <code>Alert.NO</code>.
+     *
+     *  @param iconClass Class of the icon that is placed to the left
+     *  of the text in the Alert control.
+     *
+     *  @param defaultButtonFlag A bitflag that specifies the default button.
+     *  You can specify one and only one of
+     *  <code>Alert.OK</code>, <code>Alert.CANCEL</code>,
+     *  <code>Alert.YES</code>, or <code>Alert.NO</code>.
+     *  The default value is <code>Alert.OK</code>.
+     *  Pressing the Enter key triggers the default button
+     *  just as if you clicked it. Pressing Escape triggers the Cancel
+     *  or No button just as if you selected it.
+     *
+     *  @param moduleFactory The moduleFactory where this Alert should look for
+     *  its embedded fonts and style manager.
+     * 
+     *  @return A reference to the Alert control. 
+     *
+     *  @see mx.events.CloseEvent
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public static function show(text:String = "", title:String = "",
+                                flags:uint = 0x4 /* Alert.OK */, 
+                                //parent:Sprite = null, 
+                                parent:IUIComponent = null, 
+                                closeHandler:Function = null, 
+                                iconClass:Class = null, 
+                                defaultButtonFlag:uint = 0x4 /* Alert.OK */,
+                                moduleFactory:Object = null):Alert
+                                //moduleFactory:IFlexModuleFactory = null):Alert
+    {
+        var modal:Boolean = (flags & Alert.NONMODAL) ? false : true;
+
+        if (!parent)
+        {
+            var sm:ISystemManager = ISystemManager(FlexGlobals.topLevelApplication.systemManager);
+            // no types so no dependencies
+            var mp:Object; //= sm.getImplementation("mx.managers::IMarshalSystemManager");
+            //if (mp && mp.useSWFBridge())
+            //    parent = Sprite(sm.getSandboxRoot());
+            //else
+            //    parent = Sprite(FlexGlobals.topLevelApplication);
+        }
+        
+        var alert:Alert = new Alert();
+		/*
+        if (flags & Alert.OK||
+            flags & Alert.CANCEL ||
+            flags & Alert.YES ||
+            flags & Alert.NO)
+        {
+            alert.buttonFlags = flags;
+        }
+        
+        if (defaultButtonFlag == Alert.OK ||
+            defaultButtonFlag == Alert.CANCEL ||
+            defaultButtonFlag == Alert.YES ||
+            defaultButtonFlag == Alert.NO)
+        {
+            alert.defaultButtonFlag = defaultButtonFlag;
+        }
+        
+        alert.text = text;
+        alert.title = title;*/
+        //alert.iconClass = iconClass;
+            
+        if (closeHandler != null)
+            alert.addEventListener(CloseEvent.CLOSE, closeHandler);
+
+        // Setting a module factory allows the correct embedded font to be found.
+        /*if (moduleFactory)
+            alert.moduleFactory = moduleFactory;    
+        else if (parent is IFlexModule)
+            alert.moduleFactory = IFlexModule(parent).moduleFactory;
+        else
+        {
+            if (parent is IFlexModuleFactory)
+                alert.moduleFactory = IFlexModuleFactory(parent);
+            else                
+                alert.moduleFactory = FlexGlobals.topLevelApplication.moduleFactory;
+            
+            // also set document if parent isn't a UIComponent
+            if (!parent is UIComponent)
+                alert.document = FlexGlobals.topLevelApplication.document;
+        }
+
+        alert.addEventListener(FlexEvent.CREATION_COMPLETE, static_creationCompleteHandler);
+        PopUpManager.addPopUp(alert, parent, modal);*/
+
+        return alert;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function Alert()
+    {
+        super();
+
+        // Panel properties.
+        //title = "";
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  alertForm
+    //----------------------------------
+    
+    /**
+     *  @private
+     *  The internal AlertForm object that contains the text, icon, and buttons
+     *  of the Alert control.
+     */
+    //mx_internal var alertForm:AlertForm;
+
+    //----------------------------------
+    //  buttonFlags
+    //----------------------------------
+
+    /**
+     *  A bitmask that contains <code>Alert.OK</code>, <code>Alert.CANCEL</code>, 
+     *  <code>Alert.YES</code>, and/or <code>Alert.NO</code> indicating
+     *  the buttons available in the Alert control.
+     *
+     *  @default Alert.OK
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+	 *	@royalesuppresspublicvarwarning
+     */
+    //public var buttonFlags:uint = OK;
+    
+    //----------------------------------
+    //  defaultButtonFlag
+    //----------------------------------
+
+    //[Inspectable(category="General")]
+
+    /**
+     *  A bitflag that contains either <code>Alert.OK</code>, 
+     *  <code>Alert.CANCEL</code>, <code>Alert.YES</code>, 
+     *  or <code>Alert.NO</code> to specify the default button.
+     *
+     *  @default Alert.OK
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+	 *	@royalesuppresspublicvarwarning
+     */
+    //public var defaultButtonFlag:uint = OK;
+	    
+    //----------------------------------
+    //  iconClass
+    //----------------------------------
+
+    //[Inspectable(category="Other")]
+
+    /**
+     *  The class of the icon to display.
+     *  You typically embed an asset, such as a JPEG or GIF file,
+     *  and then use the variable associated with the embedded asset 
+     *  to specify the value of this property.
+     *
+     *  @default null
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+	 *	@royalesuppresspublicvarwarning
+     */
+    //public var iconClass:Class;
+    
+    //----------------------------------
+    //  text
+    //----------------------------------
+
+    //[Inspectable(category="General")]
+    
+    /**
+     *  The text to display in this alert dialog box.
+     *
+     *  @default ""
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+	 *	@royalesuppresspublicvarwarning
+     */
+    //public var text:String = "";
+        
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DataGrid.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DataGrid.as
new file mode 100644
index 000000000..2666643b9
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DataGrid.as
@@ -0,0 +1,831 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.controls
+{
+COMPILE::JS
+{
+    import goog.DEBUG;
+}
+/*
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.display.InteractiveObject;
+import flash.display.Graphics;
+import flash.display.Shape;
+import flash.display.Sprite;
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+import flash.ui.Keyboard;
+import flash.utils.Dictionary;
+import flash.utils.describeType;
+
+import mx.collections.CursorBookmark;
+import mx.collections.ICollectionView;
+import mx.collections.ISort;
+import mx.collections.ISortField;
+import mx.collections.ItemResponder;
+import mx.collections.Sort;
+import mx.collections.SortField;
+import mx.collections.errors.ItemPendingError;
+import mx.controls.dataGridClasses.DataGridBase;
+import mx.controls.dataGridClasses.DataGridColumn;
+import mx.controls.dataGridClasses.DataGridDragProxy;
+import mx.controls.dataGridClasses.DataGridHeader;
+import mx.controls.dataGridClasses.DataGridItemRenderer;
+import mx.controls.dataGridClasses.DataGridListData;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.controls.listClasses.ListBaseContentHolder;
+import mx.controls.listClasses.ListBaseSeekPending;
+import mx.controls.listClasses.ListRowInfo;
+import mx.controls.scrollClasses.ScrollBar;
+import mx.core.ContextualClassFactory;
+import mx.core.EdgeMetrics;
+import mx.core.EventPriority;
+import mx.core.FlexShape;
+import mx.core.FlexSprite;
+import mx.core.IFactory;
+import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModuleFactory;
+import mx.core.IIMESupport;
+import mx.core.IInvalidating;
+import mx.core.IPropertyChangeNotifier;
+import mx.core.IRectangularBorder;
+import mx.core.IUIComponent;
+import mx.core.ScrollPolicy;
+import mx.core.UIComponent;
+import mx.core.UIComponentGlobals;
+import mx.core.mx_internal;
+import mx.events.CollectionEvent;
+import mx.events.CollectionEventKind;
+import mx.events.DataGridEvent;
+import mx.events.DataGridEventReason;
+import mx.events.DragEvent;
+import mx.events.IndexChangedEvent;
+import mx.events.ListEvent;
+import mx.events.SandboxMouseEvent;
+import mx.events.ScrollEvent;
+import mx.events.ScrollEventDetail;
+import mx.managers.IFocusManager;
+import mx.managers.IFocusManagerComponent;
+import mx.skins.halo.ListDropIndicator;
+import mx.styles.ISimpleStyleClient;
+import mx.utils.ObjectUtil;
+import mx.utils.StringUtil;
+
+use namespace mx_internal;
+*/
+    
+import mx.controls.listClasses.ListBase;
+import org.apache.royale.core.IBead;
+import org.apache.royale.core.IDataGrid;
+import org.apache.royale.core.IDataGridPresentationModel;
+import org.apache.royale.core.IDataGridModel;
+import org.apache.royale.core.ValuesManager;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the user releases the mouse button while over an item 
+ *  renderer, tabs to the DataGrid control or within the DataGrid control, 
+ *  or in any other way attempts to edit an item.
+ *
+ *  @eventType mx.events.DataGridEvent.ITEM_EDIT_BEGINNING
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemEditBeginning", type="mx.events.DataGridEvent")]
+
+/**
+ *  Dispatched when the <code>editedItemPosition</code> property has been set
+ *  and the item can be edited.
+ *
+ *  @eventType mx.events.DataGridEvent.ITEM_EDIT_BEGIN
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemEditBegin", type="mx.events.DataGridEvent")]
+
+/**
+ *  Dispatched when the item editor has just been instantiated.
+ *
+ *  @eventType mx.events.DataGridEvent.ITEM_EDITOR_CREATE
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemEditorCreate", type="mx.events.DataGridEvent")]
+
+/**
+ *  Dispatched when an item editing session ends for any reason.
+ *
+ *  @eventType mx.events.DataGridEvent.ITEM_EDIT_END
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemEditEnd", type="mx.events.DataGridEvent")]
+
+/**
+ *  Dispatched when an item renderer gets focus, which can occur if the user
+ *  clicks on an item in the DataGrid control or navigates to the item using
+ *  a keyboard.  Only dispatched if the item is editable.
+ *
+ *  @eventType mx.events.DataGridEvent.ITEM_FOCUS_IN
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemFocusIn", type="mx.events.DataGridEvent")]
+
+/**
+ *  Dispatched when an item renderer loses focus, which can occur if the user
+ *  clicks another item in the DataGrid control or clicks outside the control,
+ *  or uses the keyboard to navigate to another item in the DataGrid control
+ *  or outside the control.
+ *  Only dispatched if the item is editable.
+ *
+ *  @eventType mx.events.DataGridEvent.ITEM_FOCUS_OUT
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemFocusOut", type="mx.events.DataGridEvent")]
+
+/**
+ *  Dispatched when a user changes the width of a column, indicating that the 
+ *  amount of data displayed in that column may have changed.
+ *  If <code>horizontalScrollPolicy</code> is <code>"off"</code>, other
+ *  columns shrink or expand to compensate for the columns' resizing,
+ *  and they also dispatch this event.
+ *
+ *  @eventType mx.events.DataGridEvent.COLUMN_STRETCH
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="columnStretch", type="mx.events.DataGridEvent")]
+
+/**
+ *  Dispatched when the user releases the mouse button on a column header
+ *  to request the control to sort
+ *  the grid contents based on the contents of the column.
+ *  Only dispatched if the column is sortable and the data provider supports 
+ *  sorting. The DataGrid control has a default handler for this event that implements
+ *  a single-column sort.  Multiple-column sort can be implemented by calling the 
+ *  <code>preventDefault()</code> method to prevent the single column sort and setting 
+ *  the <code>sort</code> property of the data provider.
+ * <p>
+ * <b>Note</b>: The sort arrows are defined by the default event handler for
+ * the headerRelease event. If you call the <code>preventDefault()</code> method
+ * in your event handler, the arrows are not drawn.
+ * </p>
+ *
+ *  @eventType mx.events.DataGridEvent.HEADER_RELEASE
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="headerRelease", type="mx.events.DataGridEvent")]
+
+/**
+ *  Dispatched when the user releases the mouse button on a column header after 
+ *  having dragged the column to a new location resulting in shifting the column
+ *  to a new index.
+ *
+ *  @eventType mx.events.IndexChangedEvent.HEADER_SHIFT
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="headerShift", type="mx.events.IndexChangedEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+//include "../styles/metadata/IconColorStyles.as"
+
+/**
+ *  Name of the class of the itemEditor to be used if one is not
+ *  specified for a column.  This is a way to set
+ *  an item editor for a group of DataGrids instead of having to
+ *  set each one individually.  If you set the DataGridColumn's itemEditor
+ *  property, it supercedes this value.
+ *  @default null
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="defaultDataGridItemEditor", type="Class", inherit="no")]
+
+/**
+ *  Name of the class of the itemRenderer to be used if one is not
+ *  specified for a column or its header.  This is a way to set
+ *  an itemRenderer for a group of DataGrids instead of having to
+ *  set each one individually.  If you set the DataGrid's itemRenderer
+ *  property, it supercedes this value.
+ *  @default null
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="defaultDataGridItemRenderer", type="Class", inherit="no")]
+
+/**
+ *  A flag that indicates whether to show vertical grid lines between
+ *  the columns.
+ *  If <code>true</code>, shows vertical grid lines.
+ *  If <code>false</code>, hides vertical grid lines.
+ *  @default true
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="verticalGridLines", type="Boolean", inherit="no")]
+
+/**
+ *  A flag that indicates whether to show horizontal grid lines between
+ *  the rows.
+ *  If <code>true</code>, shows horizontal grid lines.
+ *  If <code>false</code>, hides horizontal grid lines.
+ *  @default false
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="horizontalGridLines", type="Boolean", inherit="no")]
+
+/**
+ *  The color of the vertical grid lines.
+ *  
+ *  The default value for the Halo theme is <code>0xCCCCCC</code>.
+ *  The default value for the Spark theme is <code>0x696969</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="verticalGridLineColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  The color of the horizontal grid lines.
+ *  @default 0xF7F7F7
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="horizontalGridLineColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  An array of two colors used to draw the header background gradient.
+ *  The first color is the top color.
+ *  The second color is the bottom color.
+ *  @default [0xFFFFFF, 0xE6E6E6]
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="headerColors", type="Array", arrayType="uint", format="Color", inherit="yes", theme="halo")]
+
+/**
+ *  The color of the row background when the user rolls over the row.
+ *  
+ *  The default value for the Halo theme is <code>0xB2E1FF</code>.
+ *  The default value for the Spark theme is <code>0xCEDBEF</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="rollOverColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  The color of the background for the row when the user selects 
+ *  an item renderer in the row.
+ * 
+ *  The default value for the Halo theme is <code>0x7FCEFF</code>.
+ *  The default value for the Spark theme is <code>0xA8C6EE</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="selectionColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  The name of a CSS style declaration for controlling other aspects of
+ *  the appearance of the column headers.
+ *  @default "dataGridStyles"
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="headerStyleName", type="String", inherit="no")]
+
+/**
+ *  The class to use as the skin for a column that is being resized.
+ * 
+ *  @default mx.skins.halo.DataGridColumnResizeSkin (for both Halo and Spark themes)
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="columnResizeSkin", type="Class", inherit="no")]
+
+
+/**
+ *  The class to use as the skin that defines the appearance of the  
+ *  background of the column headers in a DataGrid control.
+ *  The default value for the Halo theme is <code>mx.skins.halo.DataGridHeaderBackgroundSkin</code>.
+ *  The default value for the Spark theme is <code>mx.skins.spark.DataGridHeaderBackgroundSkin</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="headerBackgroundSkin", type="Class", inherit="no")]
+
+/**
+ *  The class to use as the skin that defines the appearance of the 
+ *  separator between column headers in a DataGrid control.
+ *  The default value for the Halo theme is <code>mx.skins.halo.DataGridHeaderSeparator</code>.
+ *  The default value for the Spark theme is <code>mx.skins.spark.DataGridHeaderSeparatorSkin</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="headerSeparatorSkin", type="Class", inherit="no")]
+
+/**
+ *  The class to use as the skin that defines the appearance of the 
+ *  separator between rows in a DataGrid control. 
+ *  By default, the DataGrid control uses the 
+ *  <code>drawHorizontalLine()</code> and <code>drawVerticalLine()</code> methods
+ *  to draw the separators.
+ *
+ *  @default undefined
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="horizontalSeparatorSkin", type="Class", inherit="no")]
+
+/**
+ *  The class to use as the skin that defines the appearance of the 
+ *  separator between the locked and unlocked rows in a DataGrid control.
+ *  By default, the DataGrid control uses the 
+ *  <code>drawHorizontalLine()</code> and <code>drawVerticalLine()</code> methods
+ *  to draw the separators.
+ *
+ *  @default undefined
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="horizontalLockedSeparatorSkin", type="Class", inherit="no")]
+
+/**
+ *  The class to use as the skin that defines the appearance of the 
+ *  separators between columns in a DataGrid control.
+ *  By default, the DataGrid control uses the 
+ *  <code>drawHorizontalLine()</code> and <code>drawVerticalLine()</code> methods
+ *  to draw the separators.
+ *
+ *  @default undefined
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="verticalSeparatorSkin", type="Class", inherit="no")]
+
+/**
+ *  The class to use as the skin that defines the appearance of the 
+ *  separator between the locked and unlocked columns in a DataGrid control.
+ *  By default, the DataGrid control uses the 
+ *  <code>drawHorizontalLine()</code> and <code>drawVerticalLine()</code> methods
+ *  to draw the separators.
+ *
+ *  @default undefined
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="verticalLockedSeparatorSkin", type="Class", inherit="no")]
+
+/**
+ *  The class to use as the skin for the arrow that indicates the column sort 
+ *  direction.
+ *  The default value for the Halo theme is <code>mx.skins.halo.DataGridSortArrow</code>.
+ *  The default value for the Spark theme is <code>mx.skins.spark.DataGridSortArrow</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="sortArrowSkin", type="Class", inherit="no")]
+
+/**
+ *  The class to use as the skin for the cursor that indicates that a column
+ *  can be resized.
+ *  The default value is the "cursorStretch" symbol from the Assets.swf file.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="stretchCursor", type="Class", inherit="no")]
+
+/**
+ *  The class to use as the skin that indicates that 
+ *  a column can be dropped in the current location.
+ *
+ *  @default mx.skins.halo.DataGridColumnDropIndicator (for both Halo and Spark themes)
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="columnDropIndicatorSkin", type="Class", inherit="no")]
+
+/**
+ *  The name of a CSS style declaration for controlling aspects of the
+ *  appearance of column when the user is dragging it to another location.
+ *
+ *  @default "headerDragProxyStyle"
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="headerDragProxyStyleName", type="String", inherit="no")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="columnCount", kind="property")]
+[Exclude(name="columnWidth", kind="property")]
+[Exclude(name="iconField", kind="property")]
+[Exclude(name="iconFunction", kind="property")]
+[Exclude(name="labelField", kind="property")]
+[Exclude(name="offscreenExtraRowsOrColumns", kind="property")]
+[Exclude(name="offscreenExtraRows", kind="property")]
+[Exclude(name="offscreenExtraRowsTop", kind="property")]
+[Exclude(name="offscreenExtraRowsBottom", kind="property")]
+[Exclude(name="offscreenExtraColumns", kind="property")]
+[Exclude(name="offscreenExtraColumnsLeft", kind="property")]
+[Exclude(name="offscreenExtraColumnsRight", kind="property")]
+[Exclude(name="offscreenExtraRowsOrColumnsChanged", kind="property")]
+[Exclude(name="showDataTips", kind="property")]
+[Exclude(name="cornerRadius", kind="style")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[AccessibilityClass(implementation="mx.accessibility.DataGridAccImpl")]
+
+[DataBindingInfo("acceptedTypes", "{ dataProvider: &quot;String&quot; }")]
+
+[DefaultBindingProperty(source="selectedItem", destination="dataProvider")]
+
+[DefaultProperty("dataProvider")]
+
+[DefaultTriggerEvent("change")]
+
+//[IconFile("DataGrid.png")]
+
+[RequiresDataBinding(true)]
+
+[Alternative(replacement="spark.components.DataGrid", since="4.5")]
+
+/**
+ *  The <code>DataGrid</code> control is like a List except that it can 
+ *  show more than one column of data making it suited for showing 
+ *  objects with multiple properties.
+ *  <p>
+ *  The DataGrid control provides the following features:
+ *  <ul>
+ *  <li>Columns of different widths or identical fixed widths</li>
+ *  <li>Columns that the user can resize at runtime </li>
+ *  <li>Columns that the user can reorder at runtime </li>
+ *  <li>Optional customizable column headers</li>
+ *  <li>Ability to use a custom item renderer for any column to display 
+ *      data 
+ *  other than text</li>
+ *  <li>Support for sorting the data by clicking on a column</li>
+ *  </ul>
+ *  </p>
+ *  The DataGrid control is intended for viewing data, and not as a
+ *  layout tool like an HTML table.
+ *  The mx.containers package provides those layout tools.
+ *  
+ *  <p>The DataGrid control has the following default sizing 
+ *     characteristics:</p>
+ *     <table class="innertable">
+ *        <tr>
+ *           <th>Characteristic</th>
+ *           <th>Description</th>
+ *        </tr>
+ *        <tr>
+ *           <td>Default size</td>
+ *           <td>If the columns are empty, the default width is 300 
+ *               pixels. If the columns contain information but define 
+ *               no explicit widths, the default width is 100 pixels 
+ *               per column. The DataGrid width is sized to fit the 
+ *               width of all columns, if possible. 
+ *               The default number of displayed rows, including the 
+ *               header is 7, and each row, by default, is 20 pixels 
+ *               high.
+ *           </td>
+ *        </tr>
+ *        <tr>
+ *           <td>Minimum size</td>
+ *           <td>0 pixels.</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Maximum size</td>
+ *           <td>5000 by 5000.</td>
+ *        </tr>
+ *     </table>
+ *
+ *  @mxml
+ *  <p>
+ *  The <code>&lt;mx:DataGrid&gt;</code> tag inherits all of the tag 
+ *  attributes of its superclass, except for <code>labelField</code>, 
+ *  <code>iconField</code>, and <code>iconFunction</code>, and adds the 
+ *  following tag attributes:
+ *  </p>
+ *  <pre>
+ *  &lt;mx:DataGrid
+ *    <b>Properties</b>
+ *    columns="<i>From dataProvider</i>"
+ *    draggableColumns="true|false"
+ *    editable="false|true"
+ *    editedItemPosition="<code>null</code>"
+ *    horizontalScrollPosition="null"
+ *    imeMode="null"
+ *    itemEditorInstance="null"
+ *    minColumnWidth="<code>NaN</code>"
+ *    resizableColumns="true|false"
+ *    sortableColumns="true|false"
+ *    
+ *    <b>Styles</b>
+ *    backgroundDisabledColor="0xEFEEEF"
+ *    columnDropIndicatorSkin="DataGridColumnDropIndicator"
+ *    columnResizeSkin="DataGridColumnResizeSkin"
+ *    disabledIconColor="0x999999"
+ *    headerColors="[#FFFFFF, #E6E6E6]"
+ *    headerDragProxyStyleName="headerDragProxyStyle"
+ *    headerSeparatorSkin="DataGridHeaderSeparator"
+ *    headerStyleName="dataGridStyles"
+ *    horizontalGridLineColor="0xF7F7F7"
+ *    horizontalGridLines="false|true"
+ *    horizontalLockedSeparatorSkin="undefined"
+ *    horizontalSeparatorSkin="undefined"
+ *    iconColor="0x111111"
+ *    rollOverColor="0xB2E1FF"
+ *    selectionColor="0x7FCEFF"
+ *    sortArrowSkin="DataGridSortArrow"
+ *    stretchCursor="<i>"cursorStretch" symbol from the Assets.swf file</i>"
+ *    verticalGridLineColor="0xCCCCCC"
+ *    verticalGridLines="false|true"
+ *    verticalLockedSeparatorSkin="undefined"
+ *    verticalSeparatorSkin="undefined"
+ *     
+ *    <b>Events</b>
+ *    columnStretch="<i>No default</i>"
+ *    headerRelease="<i>No default</i>"
+ *    headerShift="<i>No default</i>"
+ *    itemEditBegin="<i>No default</i>"
+ *    itemEditBeginning="<i>No default</i>" 
+ *    itemEditEnd="<i>No default</i>"
+ *    itemFocusIn="<i>No default</i>"
+ *    itemFocusOut="<i>No default</i>"
+ *  /&gt;
+ *   
+ *  <b>The following DataGrid code sample specifies the column order:</b>
+ *  &lt;mx:DataGrid&gt;
+ *    &lt;mx:dataProvider&gt;
+ *        &lt;mx:Object Artist="Pavement" Price="11.99"
+ *          Album="Slanted and Enchanted"/&gt;
+ *        &lt;mx:Object Artist="Pavement"
+ *          Album="Brighten the Corners" Price="11.99"/&gt;
+ *    &lt;/mx:dataProvider&gt;
+ *    &lt;mx:columns&gt;
+ *        &lt;mx:DataGridColumn dataField="Album"/&gt;
+ *        &lt;mx:DataGridColumn dataField="Price"/&gt;
+ *    &lt;/mx:columns&gt;
+ *  &lt;/mx:DataGrid&gt;
+ *  </pre>
+ *  </p>
+ *
+ *  @see mx.controls.dataGridClasses.DataGridItemRenderer
+ *  @see mx.controls.dataGridClasses.DataGridColumn
+ *  @see mx.controls.dataGridClasses.DataGridDragProxy
+ *  @see mx.events.DataGridEvent
+ *
+ *  @includeExample examples/SimpleDataGrid.mxml
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class DataGrid extends ListBase implements IDataGrid// implements IIMESupport
+{
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function DataGrid()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    [Inspectable(environment="none")]
+
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  columns
+    //----------------------------------
+
+    [Bindable("columnsChanged")]
+    [Inspectable(category="General", arrayType="mx.controls.dataGridClasses.DataGridColumn")]
+
+    /**
+     *  An array of DataGridColumn objects, one for each column that
+     *  can be displayed.  If not explicitly set, the DataGrid control 
+     *  attempts to examine the first data provider item to determine the
+     *  set of properties and display those properties in alphabetic
+     *  order.
+     *
+     *  <p>If you want to change the set of columns, you must get this array,
+     *  make modifications to the columns and order of columns in the array,
+     *  and then assign the new array to the columns property.  This is because
+     *  the DataGrid control returned a new copy of the array of columns and therefore
+     *  did not notice the changes.</p>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get columns():Array
+    {
+        return IDataGridModel(model).columns;
+    }
+    /**
+     * @royaleignorecoercion org.apache.royale.core.IDataGridModel
+     */
+    public function set columns(value:Array):void
+    {
+        IDataGridModel(model).columns = value;
+    }
+	
+    /**
+     * @private
+     */
+    private var _presentationModel:IDataGridPresentationModel;
+    
+    /**
+     *  The DataGrid's presentation model
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.9
+     *  @royaleignorecoercion org.apache.royale.core.IDataGridPresentationModel
+     *  @royaleignorecoercion org.apache.royale.core.IBead
+     */
+    public function get presentationModel():IBead
+    {
+        if (_presentationModel == null) {
+            var c:Class = ValuesManager.valuesImpl.getValue(this, "iDataGridPresentationModel");
+            if (c) {
+                _presentationModel = new c() as IDataGridPresentationModel;
+                addBead(_presentationModel as IBead);
+            }
+        }
+        
+        return _presentationModel;
+    }
+    /**
+     *  @royaleignorecoercion org.apache.royale.core.IDataGridPresentationModel
+     *  @royaleignorecoercion org.apache.royale.core.IBead
+     */
+    public function set presentationModel(value:IBead):void
+    {
+        _presentationModel = value as IDataGridPresentationModel;
+    }
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateField.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateField.as
new file mode 100644
index 000000000..aa633b0c1
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateField.as
@@ -0,0 +1,2895 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.controls
+{
+
+/* import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.events.TextEvent;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.ui.Keyboard; */
+
+//import mx.controls.dataGridClasses.DataGridListData;
+import mx.controls.listClasses.BaseListData;
+//import mx.controls.listClasses.IDropInListItemRenderer;
+//import mx.controls.listClasses.IListItemRenderer;
+//import mx.controls.listClasses.ListData;
+import mx.core.ClassFactory;
+import mx.core.IDataRenderer;
+import mx.core.IFactory;
+//import mx.core.LayoutDirection;
+import mx.core.mx_internal;
+//import mx.core.UIComponentGlobals;
+import mx.events.CalendarLayoutChangeEvent;
+//import mx.events.DateChooserEvent;
+//import mx.events.DropdownEvent;
+import mx.events.FlexEvent;
+//import mx.events.FlexMouseEvent;
+//import mx.events.InterManagerRequest;
+import mx.events.SandboxMouseEvent;
+import mx.managers.IFocusManagerComponent;
+import mx.managers.ISystemManager;
+//import mx.managers.PopUpManager;
+//import mx.resources.Locale;
+//import mx.resources.ResourceManager;
+import mx.styles.CSSStyleDeclaration;
+//import mx.styles.StyleManager;
+import mx.styles.StyleProxy;
+import mx.utils.ObjectUtil;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when a date is selected or changed,
+ *  and the DateChooser control closes.
+ *
+ *  @eventType mx.events.CalendarLayoutChangeEvent.CHANGE
+ *  @helpid 3613
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+///[Event(name="change", type="mx.events.CalendarLayoutChangeEvent")]
+
+/**
+ *  Dispatched when a date is selected or the user clicks
+ *  outside the drop-down list.
+ *
+ *  @eventType mx.events.DropdownEvent.CLOSE
+ *  @helpid 3615
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="close", type="mx.events.DropdownEvent")]
+
+/**
+ *  Dispatched when the <code>data</code> property changes.
+ *
+ *  <p>When you use a component as an item renderer,
+ *  the <code>data</code> property contains the data to display.
+ *  You can listen for this event and update the component
+ *  when the <code>data</code> property changes.</p>
+ * 
+ *  @eventType mx.events.FlexEvent.DATA_CHANGE
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="dataChange", type="mx.events.FlexEvent")]
+
+/**
+ *  Dispatched when a user selects the field to open the drop-down list.
+ *
+ *  @eventType mx.events.DropdownEvent.OPEN
+ *  @helpid 3614
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="open", type="mx.events.DropdownEvent")]
+
+/**
+ *  Dispatched when the month changes due to user interaction.
+ *
+ *  @eventType mx.events.DateChooserEvent.SCROLL
+ *  @helpid 3616
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="scroll", type="mx.events.DateChooserEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/* include "../styles/metadata/FocusStyles.as"
+include "../styles/metadata/IconColorStyles.as"
+include "../styles/metadata/LeadingStyle.as"
+include "../styles/metadata/PaddingStyles.as"
+include "../styles/metadata/TextStyles.as" */
+
+/**
+ *  Color of the border.
+ *  The following controls support this style: Button, CheckBox,
+ *  ComboBox, MenuBar,
+ *  NumericStepper, ProgressBar, RadioButton, ScrollBar, Slider, and any
+ *  components that support the <code>borderStyle</code> style.
+ *  The default value depends on the component class;
+ *  if not overridden for the class, the default value is <code>0xB7BABC</code>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="borderColor", type="uint", format="Color", inherit="no", theme="halo")]
+
+/**
+ *  The bounding box thickness of the DateChooser control.
+ *  The default value is 1.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="borderThickness", type="Number", format="Length", inherit="no", theme="halo")]
+
+/**
+ *  Name of the CSS Style declaration to use for the styles for the
+ *  DateChooser control's drop-down list.
+ *  By default, the DateChooser control uses the DateField control's
+ *  inheritable styles. 
+ *  
+ *  <p>You can use this class selector to set the values of all the style properties 
+ *  of the DateChooser class, including <code>cornerRadius</code>,
+ *  <code>fillAlphas</code>, <code>fillColors</code>, <code>headerColors</code>, <code>headerStyleName</code>, 
+ *  <code>highlightAlphas</code>, <code>todayStyleName</code>, and <code>weekdayStyleName</code>.</p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="dateChooserStyleName", type="String", inherit="no")]
+
+/**
+ *  Color of the highlight area of the date when the user holds the
+ *  mouse pointer over a date in the DateChooser control.
+ * 
+ *  The default value for the Halo theme is <code>0xB2E1FF</code>.
+ *  The default value for the Spark theme is <code>0xCEDBEF</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="rollOverColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  Color of the highlight area of the currently selected date
+ *  in the DateChooser control.
+ * 
+ *  The default value for the Halo theme is <code>0x7FCEFF</code>.
+ *  The default value for the Spark theme is <code>0xA8C6EE</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="selectionColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  Name of the class to use as the default skin for the background and border. 
+ *  For the DateField class, there is no default value.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="skin", type="Class", inherit="no", states=" up, over, down, disabled")]
+
+
+/**
+ *  Color of the highlight of today's date in the DateChooser control.
+ *  The default value is <code>0x2B333</code>.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Style(name="todayColor", type="uint", format="Color", inherit="yes")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+/* 
+[Exclude(name="selectedIndex", kind="property")]
+[Exclude(name="selectedItem", kind="property")]
+[Exclude(name="borderThickness", kind="style")]
+[Exclude(name="editableUpSkin", kind="style")]
+[Exclude(name="editableOverSkin", kind="style")]
+[Exclude(name="editableDownSkin", kind="style")]
+[Exclude(name="editableDisabledSkin", kind="style")] */
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[AccessibilityClass(implementation="mx.accessibility.DateFieldAccImpl")]
+
+[DefaultBindingProperty(source="selectedDate", destination="selectedDate")]
+
+[DefaultTriggerEvent("change")]
+
+//[IconFile("DateField.png")]
+
+[RequiresDataBinding(true)]
+
+[ResourceBundle("controls")]
+[ResourceBundle("SharedResources")]
+
+/**
+ *  The DateField control is a text field that shows the date
+ *  with a calendar icon on its right side.
+ *  When the user clicks anywhere inside the bounding box
+ *  of the control, a DateChooser control pops up
+ *  and shows the dates in the month of the current date.
+ *  If no date is selected, the text field is blank
+ *  and the month of the current date is displayed
+ *  in the DateChooser control.
+ *
+ *  <p>When the DateChooser control is open, the user can scroll
+ *  through months and years, and select a date.
+ *  When a date is selected, the DateChooser control closes,
+ *  and the text field shows the selected date.</p>
+ *
+ *  <p>The user can also type the date in the text field if the <code>editable</code>
+ *  property of the DateField control is set to <code>true</code>.</p>
+ *
+ *  <p>The DateField has the same default characteristics (shown below) as the DateChooser for its expanded date chooser.</p>
+ *     <table class="innertable">
+ *        <tr>
+ *           <th>Characteristic</th>
+ *           <th>Description</th>
+ *        </tr>
+ *        <tr>
+ *           <td>Default size</td>
+ *           <td>A size large enough to hold the calendar, and wide enough to display the day names</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Minimum size</td>
+ *           <td>0 pixels</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Maximum size</td>
+ *           <td>No limit</td>
+ *        </tr>
+ *     </table>
+ *
+*  <p>The DateField has the following default characteristics for the collapsed control:</p>
+ *     <table class="innertable">
+ *        <tr>
+ *           <th>Characteristic</th>
+ *           <th>Description</th>
+ *        </tr>
+ *        <tr>
+ *           <td>Default size</td>
+ *           <td>A size large enough to hold the formatted date and the calendar icon</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Minimum size</td>
+ *           <td>0 pixels</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Maximum size</td>
+ *           <td>No limit</td>
+ *        </tr>
+ *     </table>
+ *
+ *  @mxml
+ *
+ *  <p>The <code>&lt;mx:DateField&gt</code> tag inherits all of the tag attributes
+ *  of its superclass, and adds the following tag attributes:</p>
+ *
+ *  <pre>
+ *  &lt;mx:DateField
+ *    <strong>Properties</strong>
+ *    dayNames="["S", "M", "T", "W", "T", "F", "S"]"
+ *    disabledDays="<i>No default</i>"
+ *    disabledRanges="<i>No default</i>"
+ *    displayedMonth="<i>Current month</i>"
+ *    displayedYear="<i>Current year</i>"
+ *    dropdownFactory="<i>ClassFactory that creates an mx.controls.DateChooser</i>"
+ *    firstDayOfWeek="0"
+ *    formatString="MM/DD/YYYY"
+ *    labelFunction="<i>Internal formatter</i>"
+ *    maxYear="2100"
+ *    minYear="1900"
+ *    monthNames="["January", "February", "March", "April", "May",
+ *    "June", "July", "August", "September", "October", "November",
+ *    "December"]"
+ *    monthSymbol=""
+ *    parseFunction="<i>Internal parser</i>"
+ *    selectableRange="<i>No default</i>"
+ *    selectedDate="<i>No default</i>"
+ *    showToday="true|false"
+ *    yearNavigationEnabled="false|true"
+ *    yearSymbol=""
+ *  
+ *   <strong>Styles</strong>
+ *    borderColor="0xAAB3B3"
+ *    borderThickness="1"
+ *    color="0x0xB333C"
+ *    dateChooserStyleName="dateFieldPopup"
+ *    disabledColor="0xAAB3B3"
+ *    disabledIconColor="0x999999"
+ *    focusAlpha="0.5"
+ *    focusRoundedCorners="tl tr bl br"
+ *    fontAntiAliasType="advanced"
+ *    fontFamily="Verdana"
+ *    fontGridFitType="pixel"
+ *    fontSharpness="0"
+ *    fontSize="10"
+ *    fontStyle="normal|italic"
+ *    fontThickness="0"
+ *    fontWeight="normal|bold"
+ *    iconColor="0x111111"
+ *    leading="2"
+ *    paddingLeft="0"
+ *    paddingRight="0"
+ *    rollOverColor="0xE3FFD6"
+ *    selectionColor="0xB7F39B"
+ *    textAlign="left|right|center"
+ *    textDecoration="none|underline"
+ *    textIndent="0"
+ *    todayColor="0x2B333C"
+ * 
+ *    <strong>Events</strong>
+ *    change="<i>No default</i>"
+ *    close="<i>No default</i>"
+ *    dataChange="<i>No default</i>"
+ *    open="<i>No default</i>"
+ *    scroll="<i>No default</i>"
+ *  /&gt;
+ *  </pre>
+ *
+ *  @see mx.controls.DateChooser
+ *  @includeExample examples/DateFieldExample.mxml
+ *
+ *  @helpid 3617
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class DateField extends ComboBase 
+                      
+{
+ /* implements IDataRenderer,IFocusManagerComponent, IDropInListItemRenderer, IListItemRenderer */
+   // include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class mixins
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Placeholder for mixin by DateFieldAccImpl.
+     */
+   // mx_internal static var createAccessibilityImplementation:Function;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 * Return the short three letter name of a month.
+	 * In most cases it's the first 3 letters.  
+	 * 
+	 * TODO move short names to resource bundles.
+	 */
+	/*  protected static function shortMonthName(monthName:String, locale:Locale, monthNames:Array):String
+	 {
+		if (locale && locale.language == "fr") {
+			if (monthName == monthNames[5]) {
+				return "JUN";
+			}
+			else if (monthName == monthNames[6]) {
+				return "JUL";	
+			}
+		}
+		
+		return monthName.substr(0,3);
+	 } */
+	 
+    /**
+     *  Parses a String object that contains a date, and returns a Date
+     *  object corresponding to the String.
+     *  The <code>inputFormat</code> argument contains the pattern
+     *  in which the <code>valueString</code> String is formatted.
+     *  It can contain <code>"M"</code>, <code>"MM"</code>, 
+	 *  <code>"MMM"</code> (3 letter month names), <code>"MMMM"</code> (month names),
+	 *  <code>"D"</code>,  <code>"DD"</code>, <code>"YY"</code>, <code>"YYYY"</code>
+     *  and delimiter and punctuation characters.
+	 * 
+	 *  <p>Only upper case characters are supported.</p>
+     *
+     *  <p>The function does not check for the validity of the Date object.
+     *  If the value of the date, month, or year is NaN, this method returns null.</p>
+     * 
+     *  <p>For example:
+     *  <pre>var dob:Date = DateField.stringToDate("06/30/2005", "MM/DD/YYYY");</pre>        
+     *  </p>
+     *
+     *  @param valueString Date value to format.
+     *
+     *  @param inputFormat String defining the date format.
+     *
+     *  @return The formatted date as a Date object.
+     *
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public static function stringToDate(valueString:String, inputFormat:String):Date
+    {
+        /* var maskChar:String
+		var dateChar:String;
+		var dateString:String;
+		var monthString:String;
+		var yearString:String;
+		var dateParts:Array = [];
+		var maskParts:Array = [];
+        var part:int = 0;
+		var length:int;
+		var position:int = 0;
+		
+		if (valueString == null || inputFormat == null)
+			return null;
+		
+		var monthNames:Array = ResourceManager.getInstance().getStringArray("SharedResources", "monthNames");	
+		var noMonths:int = monthNames.length;
+		var locales:Array = ResourceManager.getInstance().localeChain;
+		var locale:Locale = new Locale(locales[0]);
+		
+		for (var i:int = 0; i < noMonths; i++) {
+			valueString = valueString.replace(monthNames[i], (i+1).toString());
+			valueString = valueString.replace(shortMonthName(monthNames[i], locale, monthNames), (i+1).toString());
+		}
+		
+		length = valueString.length;
+		
+		dateParts[part] = "";
+        for (i = 0; i < length; i++)
+        {
+			dateChar = valueString.charAt(i);
+ 
+			if (isNaN(Number(dateChar)) || dateChar == " ")
+			{
+				part++;
+				dateParts[part] = dateChar;
+				part++;
+				dateParts[part] = "";
+			}
+			else
+			{
+				dateParts[part] += dateChar;	
+			}
+		}
+		
+		length = inputFormat.length;
+		part = -1;
+		var lastChar:String;
+		
+		for (i = 0; i < length; i++)
+		{
+			maskChar = inputFormat.charAt(i);
+			
+			if (maskChar == "Y" || maskChar == "M" || maskChar == "D")
+			{
+				if (maskChar != lastChar)
+				{
+					part++;
+					maskParts[part] = "";
+				}
+				maskParts[part] += maskChar;
+			}
+			else
+			{
+				part++;
+				maskParts[part] = maskChar;
+			}
+			
+			lastChar = maskChar;
+		}
+			
+		length = maskParts.length;
+
+		if (dateParts.length != length)
+		{
+			if (valueString.length != inputFormat.length) {
+				return null;
+			}
+			
+			for (i = 0; i < length; i++) {
+				dateParts[i] = valueString.substr(position, maskParts[i].length);
+				position += maskParts[i].length;
+			}
+			
+		}
+		
+		if (dateParts.length != length)
+		{
+			return null;
+		}
+
+		for (i = 0; i < length; i++) {
+			maskChar = maskParts[i].charAt(0);
+			
+			if (maskChar == "D") {
+				dateString = dateParts[i];
+			}
+			else if (maskChar == "M") {
+				monthString = dateParts[i];
+			}
+			else if (maskChar == "Y") {
+				yearString = dateParts[i];
+			}
+		}
+		
+		if (dateString == null || monthString == null || yearString == null)
+			return null;
+		
+		var dayNum:Number = Number(dateString);
+        var monthNum:Number = Number(monthString);
+        var yearNum:Number = Number(yearString);
+
+        if (isNaN(yearNum) || isNaN(monthNum) || isNaN(dayNum))
+            return null;
+
+        if (yearString.length == 2)
+            yearNum += 2000;
+
+        var newDate:Date = new Date(yearNum, monthNum - 1, dayNum);
+
+        if (dayNum != newDate.getDate() || (monthNum - 1) != newDate.getMonth())
+            return null;
+
+        return newDate; */ 
+		var newDate:Date =new Date();
+		return newDate;
+    }
+
+    /**
+     *  Formats a Date into a String according to the <code>outputFormat</code> argument.
+     *  The <code>outputFormat</code> argument contains a pattern in which
+     *  the <code>value</code> String is formatted.
+     *  It can contain <code>"M"</code>, <code>"MM"</code>,
+	 *  <code>"MMM"</code> (3 letter month names), <code>"MMMM"</code> (month names),
+	 *  <code>"D"</code>, <code>"DD"</code>, <code>"YY"</code>, <code>"YYYY"</code>
+     *  and delimiter and punctuation characters.
+	 * 
+	 *  <p>Only upper case characters are supported.</p>
+     *
+     *  @param value Date value to format.
+     *
+     *  @param outputFormat String defining the date format.
+     *
+     *  @return The formatted date as a String.
+     *
+     *  @example <pre>var todaysDate:String = DateField.dateToString(new Date(), "MM/DD/YYYY");</pre>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public static function dateToString(value:Date, outputFormat:String):String
+    {
+		/* var maskChar:String;
+		var maskParts:Array = [];
+		var part:int = -1;
+		var length:int;
+		var lastChar:String;
+		
+		if (!value || isNaN(value.getTime()) || !outputFormat)
+			return "";
+		
+		length = outputFormat.length;
+		
+		for (var i:int = 0; i < length; i++)
+		{
+			maskChar = outputFormat.charAt(i);
+			
+			if (maskChar == "Y" || maskChar == "M" || maskChar == "D")
+			{
+				if (maskChar != lastChar)
+				{
+					part++;
+					maskParts[part] = "";
+				}
+				maskParts[part] += maskChar;
+			}
+			else
+			{
+				part++;
+				maskParts[part] = maskChar;
+			}
+			
+			lastChar = maskChar;
+		}
+		
+        var date:String = String(value.getDate());
+        var month:String = String(value.getMonth() + 1);
+        var year:String = String(value.getFullYear());
+
+		var mask:String;
+		var fullMask:String;
+		var maskLength:int
+		var output:String = "";
+		
+		//TODO Support changing locale at runtime
+		var monthNames:Array =
+			ResourceManager.getInstance().getStringArray(
+				"SharedResources", "monthNames");
+		
+        length = maskParts.length;
+        for (i = 0; i < length; i++)
+        {
+			fullMask = maskParts[i];
+            mask = fullMask.charAt(0);
+			maskLength = maskParts[i].length;
+			
+			if (mask == "D")
+			{
+				if (maskLength > 1 && date.length == 1)
+					date = "0" + date;
+				
+				output += date;
+			}
+			else if (fullMask == "MMM")
+			{
+				var locales:Array = ResourceManager.getInstance().localeChain;
+				var locale:Locale = new Locale(locales[0]);
+				output += shortMonthName(monthNames[value.getMonth()], locale, monthNames);
+			}
+			else if (fullMask == "MMMM")
+			{	
+				output += monthNames[value.getMonth()];
+			}
+			else if (mask == "M")
+			{
+				if (maskLength > 1 && month.length == 1)
+					month = "0" + month;
+				
+				output += month;
+			}
+			else if (mask == "Y")
+			{
+				if (maskLength == 2)
+					output += year.substr(2,2);
+				else
+					output += year;
+			}
+            else
+            {
+                output += mask;
+            }
+        }
+
+        return output; */
+		return "";
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function DateField()
+    {
+x=2;	
+        super();
+     //   addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+   // private var creatingDropdown:Boolean = false;
+
+    /**
+     *  @private
+     */
+   // mx_internal var showingDropdown:Boolean = false;
+
+    /**
+     *  @private
+     */
+   // private var inKeyDown:Boolean = false;
+
+    /**
+     *  @private
+     */
+   // private var isPressed:Boolean;
+
+    /**
+     *  @private
+     */
+  //  private var openPos:Number = 0;
+
+    /**
+     *  @private
+     */
+   // private var lastSelectedDate:Date;
+
+    /**
+     *  @private
+     */
+  //  private var updateDateFiller:Boolean = false;
+
+    /**
+     *  @private
+     */
+  //  private var addedToPopupManager:Boolean = false;
+
+    /**
+     *  @private
+     */
+  //  private var isMouseOver:Boolean = false;
+
+    /**
+     *  @private
+     */ 
+  //  private var yearChangedWithKeys:Boolean = false;
+    
+    /**
+     *  @private
+     *  Flag that will block default data/listData behavior
+     */
+  //  private var selectedDateSet:Boolean;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  enabled
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the enabled property.
+     */
+    private var _enabled:Boolean = true;
+
+    /**
+     *  @private
+     */
+    private var enabledChanged:Boolean = false;
+
+    [Bindable("enabledChanged")]
+    [Inspectable(category="General", enumeration="true,false", defaultValue="true")]
+
+    /**
+     *  @private
+     */
+    override public function get enabled():Boolean
+    {
+        return _enabled;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set enabled(value:Boolean):void
+    {
+        if (value == _enabled)
+            return;
+
+        _enabled = value;
+        super.enabled = value;
+        enabledChanged = true;
+
+       // invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the data property
+     */
+  /*   private var _data:Object;
+
+    [Bindable("dataChange")]
+    [Inspectable(environment="none")] */
+
+    /**
+     *  The <code>data</code> property lets you pass a value
+     *  to the component when you use it in an item renderer or item editor.
+     *  You typically use data binding to bind a field of the <code>data</code>
+     *  property to a property of this component.
+     *
+     *  <p>When you use the control as a drop-in item renderer or drop-in
+     *  item editor, Flex automatically writes the current value of the item
+     *  to the <code>selectedDate</code> property of this control.</p>
+     *
+     *  @default null
+     *  @see mx.core.IDataRenderer
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get data():Object
+    {
+        return _data;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set data(value:Object):void
+    {
+        var newDate:Date;
+
+        _data = value;
+
+        if (_listData && _listData is DataGridListData)
+            newDate = _data[DataGridListData(_listData).dataField];
+        else if (_listData is ListData && ListData(_listData).labelField in _data)
+            newDate = _data[ListData(_listData).labelField];
+        else if (_data is String)
+			if (_parseFunction != null)
+           	    newDate = _parseFunction(data as String, formatString);
+			else
+				newDate = new Date(Date.parse(data as String));
+        else
+            newDate = _data as Date;
+
+        if (!selectedDateSet)
+        {
+            selectedDate = newDate;
+            selectedDateSet = false;
+        }
+
+        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+    } */
+
+    //----------------------------------
+    //  dayNames
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dayNames property.
+     */
+   // private var _dayNames:Array;
+
+    /**
+     *  @private
+     */
+  //  private var dayNamesChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+  /*   private var dayNamesOverride:Array;
+    
+    [Bindable("dayNamesChanged")]
+    [Inspectable(arrayType="String", defaultValue="null")] */
+
+    /**
+     *  Weekday names for DateChooser control.
+     *  Setting this property changes the day labels
+     *  of the DateChooser control.
+     *  Sunday is the first day (at index 0).
+     *  The rest of the week names follow in the normal order.
+     *  
+     *  @default [ "S", "M", "T", "W", "T", "F", "S" ]
+     *  @helpid 3626
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get dayNames():Array
+    {
+        return _dayNames;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set dayNames(value:Array):void
+    {
+        dayNamesOverride = value;
+
+        _dayNames = value != null ?
+                    value :
+                    resourceManager.getStringArray(
+                        "controls", "dayNamesShortest");
+                        
+        // _dayNames will be null if there are no resources.
+        _dayNames = _dayNames ? _dayNames.slice(0) : null;
+
+        dayNamesChanged = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  disabledDays
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the disabledDays property.
+     */
+   // private var _disabledDays:Array = [];
+
+    /**
+     *  @private
+     */
+    /* private var disabledDaysChanged:Boolean = false;
+
+    [Bindable("disabledDaysChanged")]
+    [Inspectable(arrayType="int")] */
+
+    /**
+     *  Days to disable in a week.
+     *  All the dates in a month, for the specified day, are disabled.
+     *  This property immediately changes the user interface
+     *  of the DateChooser control.
+     *  The elements of this Array can have values from 0 (Sunday)
+     *  to 6 (Saturday).
+     *  For example, a value of <code>[0, 6]</code> disables
+     *  Sunday and Saturday.
+     *
+     *  @default []
+     *  @helpid 3627
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get disabledDays():Array
+    {
+        return _disabledDays;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set disabledDays(value:Array):void
+    {
+        _disabledDays = value;
+        disabledDaysChanged = true;
+        updateDateFiller = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  disabledRanges
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the disabledRanges property.
+     */
+   // private var _disabledRanges:Array = [];
+
+    /**
+     *  @private
+     */
+    /* private var disabledRangesChanged:Boolean = false;
+
+    [Bindable("disabledRangesChanged")]
+    [Inspectable(arrayType="Object")] */
+
+    /**
+     *  Disables single and multiple days.
+     *
+     *  <p>This property accepts an Array of objects as a parameter.
+     *  Each object in this Array is a Date object that specifies a
+     *  single day to disable; or an object containing one or both
+     *  of the <code>rangeStart</code> and <code>rangeEnd</code> properties,
+     *  each of whose values is a Date object.
+     *  The value of these properties describes the boundaries
+     *  of the date range.
+     *  If either is omitted, the range is considered
+     *  unbounded in that direction.
+     *  If you specify only <code>rangeStart</code>,
+     *  all the dates after the specified date are disabled,
+     *  including the <code>rangeStart</code> date.
+     *  If you specify only <code>rangeEnd</code>,
+     *  all the dates before the specified date are disabled,
+     *  including the <code>rangeEnd</code> date.
+     *  To disable a single day, use a single Date object that specifies a date
+     *  in the Array. Time values are zeroed out from the Date object if
+     *  they are present.</p>
+     *
+     *  <p>The following example, disables the following dates: January 11
+     *  2006, the range January 23 - February 10 2006, and March 1 2006
+     *  and all following dates.</p>
+     *
+     *  <pre>disabledRanges="{[new Date(2006,0,11), {rangeStart:
+     *  new Date(2006,0,23), rangeEnd: new Date(2006,1,10)},
+     *  {rangeStart: new Date(2006,2,1)}]}"</pre>
+     *
+     *  <p>Setting this property immediately changes the appearance of the
+     *  DateChooser control, if the disabled dates are included in the
+     *  <code>displayedMonth</code> and <code>displayedYear</code>
+     *  properties.</p>
+     *
+     *  @default []
+     *  @helpid 3629
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get disabledRanges():Array
+    {
+        return _disabledRanges;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set disabledRanges(value:Array):void
+    {
+        _disabledRanges = scrubTimeValues(value);
+        disabledRangesChanged = true;
+        updateDateFiller = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  displayedMonth
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the displayedMonth property.
+     */
+    //private var _displayedMonth:int = (new Date()).getMonth();
+
+    /**
+     *  @private
+     */
+   /*  private var displayedMonthChanged:Boolean = false;
+
+    [Bindable("displayedMonthChanged")]
+    [Inspectable(category="General")] */
+
+    /**
+     *  Used with the <code>displayedYear</code> property,
+     *  the <code>displayedMonth</code> property
+     *  specifies the month displayed in the DateChooser control.
+     *  Month numbers are zero-based, so January is 0 and December is 11.
+     *  Setting this property immediately changes the appearance
+     *  of the DateChooser control.
+     *  The default value is the month number of today's date.
+     *
+     *  <p>The default value is the current month.</p>
+     *
+     *  @helpid 3624
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get displayedMonth():int
+    {
+        if (dropdown && dropdown.displayedMonth != _displayedMonth)
+            return dropdown.displayedMonth;
+        else
+            return _displayedMonth;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set displayedMonth(value:int):void
+    {
+        _displayedMonth = value;
+        displayedMonthChanged = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  displayedYear
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the displayedYear property.
+     */
+  //  private var _displayedYear:int = (new Date()).getFullYear();
+
+    /**
+     *  @private
+     */
+   /*  private var displayedYearChanged:Boolean = false;
+
+    [Bindable("displayedYearChanged")]
+    [Inspectable(category="General")]
+ */
+    /**
+     *  Used with the <code>displayedMonth</code> property,
+     *  the <code>displayedYear</code> property determines
+     *  which year is displayed in the DateChooser control.
+     *  Setting this property immediately changes the appearance
+     *  of the DateChooser control.
+     *  
+     *  <p>The default value is the current year.</p>
+     *
+     *  @helpid 3625
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get displayedYear():int
+    {
+        if (dropdown && dropdown.displayedYear != _displayedYear)
+            return dropdown.displayedYear;
+        else
+            return _displayedYear;
+    } */
+
+    /**
+     *  @private
+     */
+   /*  public function set displayedYear(value:int):void
+    {
+        _displayedYear = value;
+        displayedYearChanged = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  dropdown
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dropdown property.
+     */
+    private var _dropdown:DateChooser;
+
+    /**
+     *  Contains a reference to the DateChooser control
+     *  contained by the DateField control.  The class used 
+     *  can be set with <code>dropdownFactory</code> as long as 
+     *  it extends <code>DateChooser</code>.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get dropdown():DateChooser
+    {
+        return _dropdown;
+    }
+
+    //----------------------------------
+    //  dropdownFactory
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dropdownFactory property.
+     */
+  /*   private var _dropdownFactory:IFactory = new ClassFactory(DateChooser);
+
+    [Bindable("dropdownFactoryChanged")] */
+
+    /**
+     *  The IFactory that creates a DateChooser-derived instance to use
+     *  as the date-chooser
+     *  The default value is an IFactory for DateChooser
+     *
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get dropdownFactory():IFactory
+    {
+        return _dropdownFactory;
+    } */
+
+    /**
+     *  @private
+     */
+   /*  public function set dropdownFactory(value:IFactory):void
+    {
+        _dropdownFactory = value;
+
+        dispatchEvent(new Event("dropdownFactoryChanged"));
+    } */
+
+    //----------------------------------
+    //  firstDayOfWeek
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the firstDayOfWeek property.
+     */
+   // private var _firstDayOfWeek:Object
+
+    /**
+     *  @private
+     */
+   /*  private var firstDayOfWeekChanged:Boolean = false;
+
+    [Bindable("firstDayOfWeekChanged")]
+    [Inspectable(defaultValue="0")] */
+
+    /**
+     *  @private
+     */
+    //private var firstDayOfWeekOverride:Object;
+    
+    /**
+     *  Day of the week (0-6, where 0 is the first element
+     *  of the dayNames Array) to display in the first column
+     *  of the  DateChooser control.
+     *  Setting this property changes the order of the day columns.
+     *
+     *  @default 0 (Sunday)
+     *  @helpid 3623
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get firstDayOfWeek():Object
+    {
+        return _firstDayOfWeek;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set firstDayOfWeek(value:Object):void
+    {
+        firstDayOfWeekOverride = value;
+
+        _firstDayOfWeek = value != null ?
+                          int(value) :
+                          resourceManager.getInt(
+                              "controls", "firstDayOfWeek");
+
+        firstDayOfWeekChanged = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  formatString
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the formatString property.
+     */
+    private var _formatString:String = null;
+
+    [Bindable("formatStringChanged")]
+    [Inspectable(defaultValue="null")]
+
+    /**
+     *  @private
+     */
+    private var formatStringOverride:String;
+    
+    /**
+     *  The format of the displayed date in the text field.
+     *  This property can contain any combination of <code>"M"</code>,
+	 *  <code>"MM"</code>, <code>"MMM"</code> (3 letter month names),
+	 *  <code>"MMMM"</code> (month names), <code>"D"</code>, <code>"DD"</code>,
+	 *  <code>"YY"</code>, <code>"YYYY"</code>,
+     *  delimiter, and punctuation characters.
+	 *  
+	 *  <p>Only upper case characters are supported.</p>
+     * 
+     *  @default "MM/DD/YYYY"
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get formatString():String
+    {
+        return _formatString;
+    }
+
+    /**
+     *  @private
+     */
+    public function set formatString(value:String):void
+    {
+        formatStringOverride = value;
+
+       /*  _formatString = value != null ?
+                        value :
+                        resourceManager.getString(
+                            "SharedResources", "dateFormat");
+
+        updateDateFiller = true;
+
+        invalidateProperties();
+        invalidateSize();
+        
+        dispatchEvent(new Event("formatStringChanged")); */
+    }
+
+    //----------------------------------
+    //  labelFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the labelFunction property.
+     */
+    private var _labelFunction:Function;
+
+    [Bindable("labelFunctionChanged")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  Function used to format the date displayed
+     *  in the text field of the DateField control.
+     *  If no function is specified, the default format is used.
+     *  
+     *  <p>The function takes a Date object as an argument,
+     *  and returns a String in the format to be displayed, 
+     *  as the following example shows:</p>
+     *  <pre>
+     *  public function formatDate(currentDate:Date):String {
+     *      ...
+     *      return dateString;
+     *  }</pre>
+     *
+     *  <p>If you allow the user to enter a date in the text field
+     *  of the DateField control, and you define a formatting function using 
+     *  the <code>labelFunction</code> property, you should specify a 
+     *  function to the <code>parseFunction</code> property that converts 
+     *  the input text string to a Date object for use by the DateField control, 
+     *  or set the <code>parseFunction</code> property to null.</p>
+     *
+     *  @default null
+     *  @see mx.controls.DateField#parseFunction
+     *  @helpid 3618
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get labelFunction():Function
+    {
+        return _labelFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set labelFunction(value:Function):void
+    {
+        _labelFunction = value;
+       /* updateDateFiller = true;
+
+         invalidateProperties();
+
+        dispatchEvent(new Event("labelFunctionChanged")); */
+    }
+
+    //----------------------------------
+    //  listData
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the listData property
+     */
+  /*   private var _listData:BaseListData;
+
+    [Bindable("dataChange")]
+    [Inspectable(environment="none")] */
+
+    /**
+     *  When a component is used as a drop-in item renderer or drop-in
+     *  item editor, Flex initializes the <code>listData</code> property
+     *  of the component with the appropriate data from the List control.
+     *  The component can then use the <code>listData</code> property
+     *  to initialize the <code>data</code> property of the drop-in
+     *  item renderer or drop-in item editor.
+     *
+     *  <p>You do not set this property in MXML or ActionScript;
+     *  Flex sets it when the component is used as a drop-in item renderer
+     *  or drop-in item editor.</p>
+     *
+     *  @default null
+     *  @see mx.controls.listClasses.IDropInListItemRenderer
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get listData():BaseListData
+    {
+        return _listData;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set listData(value:BaseListData):void
+    {
+        _listData = value;
+    } */
+
+    //----------------------------------
+    //  maxYear
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the maxYear property.
+     */
+    //private var _maxYear:int = 2100;
+
+    /**
+     *  @private
+     */
+   // private var maxYearChanged:Boolean = false;
+
+    /**
+     *  The last year selectable in the control.
+     *  @default 2100
+     *
+     *  @helpid
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get maxYear():int
+    {
+        if (dropdown)
+            return dropdown.maxYear;
+        else
+            return _maxYear;
+    } */
+
+    /**
+     *  @private
+     */
+   /*  public function set maxYear(value:int):void
+    {
+        if (_maxYear == value)
+            return;
+
+        _maxYear = value;
+        maxYearChanged = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  minYear
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the minYear property.
+     */
+   // private var _minYear:int = 1900;
+
+    /**
+     *  @private
+     */
+   // private var minYearChanged:Boolean = false;
+
+    /**
+     *  The first year selectable in the control.
+     *  @default 1900
+     *
+     *  @helpid
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get minYear():int
+    {
+        if (dropdown)
+            return dropdown.minYear;
+        else
+            return _minYear;
+    } */
+
+    /**
+     *  @private
+     */
+   /*  public function set minYear(value:int):void
+    {
+        if (_displayedYear == value)
+            return;
+
+        _minYear = value;
+        minYearChanged = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  monthNames
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the monthNames property.
+     */
+    //private var _monthNames:Array;
+
+    /**
+     *  @private
+     */
+   // private var monthNamesChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+   /*  private var monthNamesOverride:Array;
+    
+    [Bindable("monthNamesChanged")]
+    [Inspectable(category="Other", arrayType="String", defaultValue="null")]
+ */
+    /**
+     *  Names of the months displayed at the top of the control.
+     *  The <code>monthSymbol</code> property is appended to the end of 
+     *  the value specified by the <code>monthNames</code> property, 
+     *  which is useful in languages such as Japanese.
+     *
+     *  @default [ "January", "February", "March", "April", "May", "June", 
+     *  "July", "August", "September", "October", "November", "December" ]
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get monthNames():Array
+    {
+        return _monthNames;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set monthNames(value:Array):void
+    {
+        monthNamesOverride = value;
+
+        _monthNames = value != null ?
+                      value :
+                      resourceManager.getStringArray(
+                          "SharedResources", "monthNames");
+                         
+        // _monthNames will be null if there are no resources.
+        _monthNames = _monthNames ? _monthNames.slice(0) : null;
+
+        monthNamesChanged = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  monthSymbol
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the monthSymbol property.
+     */
+    //private var _monthSymbol:String;
+
+    /**
+     *  @private
+     */
+    //private var monthSymbolChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    /* private var monthSymbolOverride:String;
+    
+    [Bindable("monthSymbolChanged")]
+    [Inspectable(defaultValue="")] */
+
+    /**
+     *  This property is appended to the end of the value specified 
+     *  by the <code>monthNames</code> property to define the names 
+     *  of the months displayed at the top of the control.
+     *  Some languages, such as Japanese, use an extra 
+     *  symbol after the month name. 
+     *
+     *  @default ""
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get monthSymbol():String
+    {
+        return _monthSymbol;
+    }
+ */
+    /**
+     *  @private
+     */
+    /* public function set monthSymbol(value:String):void
+    {
+        monthSymbolOverride = value;
+
+        _monthSymbol = value != null ?
+                       value :
+                       resourceManager.getString(
+                           "SharedResources", "monthSymbol");
+
+        monthSymbolChanged = true;
+
+        invalidateProperties();
+    } */
+      
+    //----------------------------------
+    //  parseFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the parseFunction property.
+     */
+   /*  private var _parseFunction:Function = DateField.stringToDate;
+
+    [Bindable("parseFunctionChanged")] */
+
+    /**
+     *  Function used to parse the date entered as text
+     *  in the text field area of the DateField control and return a 
+     *  Date object to the control.
+     *  If no function is specified, Flex uses
+     *  the default function.
+     *  If you set the <code>parseFunction</code> property, it should 
+     *  typically perform the reverse of the function specified to 
+     *  the <code>labelFunction</code> property.
+     *  
+     *  <p>The function takes two arguments 
+     *  and returns a Date object to the DateField control, 
+     *  as the following example shows:</p>
+     *  <pre>
+     *  public function parseDate(valueString:String, inputFormat:String):Date {
+     *      ...
+     *      return newDate
+     *  }</pre>
+     * 
+     *  <p>Where the <code>valueString</code> argument contains the text 
+     *  string entered by the user in the text field, and the <code>inputFormat</code> 
+     *  argument contains the format of the string. For example, if you 
+     *  only allow the user to enter a text sting using two characters for 
+     *  month, day, and year, then pass "MM/DD/YY" to 
+     *  the <code>inputFormat</code> argument.</p>
+     *
+     *  @see mx.controls.DateField#labelFunction
+     * 
+     *  @helpid
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+   /*  public function get parseFunction():Function
+    {
+        return _parseFunction;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set parseFunction(value:Function):void
+    {
+        _parseFunction = value;
+
+        dispatchEvent(new Event("parseFunctionChanged"));
+    } */
+
+    //----------------------------------
+    //  selectableRange
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the selectableRange property.
+     */
+   // private var _selectableRange:Object = null;
+
+    /**
+     *  @private
+     */
+   /*  private var selectableRangeChanged:Boolean = false;
+
+    [Bindable("selectableRangeChanged")]
+    [Inspectable(arrayType="Date")] */
+
+    /**
+     *  Range of dates between which dates are selectable.
+     *  For example, a date between 04-12-2006 and 04-12-2007
+     *  is selectable, but dates out of this range are disabled.
+     *
+     *  <p>This property accepts an Object as a parameter.
+     *  The Object contains two properties, <code>rangeStart</code>
+     *  and <code>rangeEnd</code>, of type Date.
+     *  If you specify only <code>rangeStart</code>,
+     *  all the dates after the specified date are enabled.
+     *  If you only specify <code>rangeEnd</code>,
+     *  all the dates before the specified date are enabled.
+     *  To enable only a single day in a DateChooser control,
+     *  you can pass a Date object directly. Time values are 
+     *  zeroed out from the Date object if they are present.</p>
+     *
+     *  <p>The following example enables only the range
+     *  January 1, 2006 through June 30, 2006. Months before January
+     *  and after June do not appear in the DateChooser.</p>
+     *
+     *  <pre>selectableRange="{{rangeStart : new Date(2006,0,1),
+     *  rangeEnd : new Date(2006,5,30)}}"</pre>
+     *
+     *  @default null
+     *  @helpid 3628
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get selectableRange():Object
+    {
+        return _selectableRange;
+    }
+ */
+    /**
+     *  @private
+     */
+    /* public function set selectableRange(value:Object):void
+    {
+        _selectableRange = scrubTimeValue(value);
+        selectableRangeChanged = true;
+        updateDateFiller = true;
+
+        invalidateProperties();
+    } */
+
+    //----------------------------------
+    //  selectedDate
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the selectedDate property.
+     */
+    private var _selectedDate:Date = null;
+
+    /**
+     *  @private
+     */
+    private var selectedDateChanged:Boolean = false;
+
+    [Bindable("change")]
+    [Bindable("valueCommit")]
+    [Bindable("selectedDateChanged")]
+    [Inspectable(category="General")]
+
+    /**
+     *  Date as selected in the DateChooser control.
+     *  Accepts a Date object as a parameter. If the incoming Date 
+     *  object has any time values, they are zeroed out.
+     *
+     *  <p>Holding down the Control key when selecting the currently selected date deselects it, 
+     *  sets the <code>selectedDate</code> property to <code>null</code>, 
+     *  and then dispatches the <code>change</code> event.</p>
+     *
+     *  @default null
+     *  @helpid 3630
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get selectedDate():Date
+    {
+        return _selectedDate;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedDate(value:Date):void
+    {
+       /*  if (ObjectUtil.dateCompare(_selectedDate, value) == 0) 
+            return;
+
+        selectedDateSet = true;
+        checkYearSetSelectedDate(scrubTimeValue(value) as Date);
+        updateDateFiller = true;
+        selectedDateChanged = true;
+
+        invalidateProperties();
+
+        // Trigger bindings to 'selectedData'.
+        dispatchEvent(new Event("selectedDateChanged"));
+       
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));  */   
+    }
+
+    //----------------------------------
+    //  showToday
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the showToday property.
+     */
+    private var _showToday:Boolean = true;
+
+    /**
+     *  @private
+     */
+    private var showTodayChanged:Boolean = false;
+
+    [Bindable("showTodayChanged")]
+    [Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  If <code>true</code>, specifies that today is highlighted
+     *  in the DateChooser control.
+     *  Setting this property immediately changes the appearance
+     *  of the DateChooser control.
+     *
+     *  @default true
+     *  @helpid 3622
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get showToday():Boolean
+    {
+        return _showToday;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showToday(value:Boolean):void
+    {
+        _showToday = value;
+        showTodayChanged = true;
+
+        //invalidateProperties();
+    }
+
+    //----------------------------------
+    //  yearNavigationEnabled
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the yearNavigationEnabled property.
+     */
+    private var _yearNavigationEnabled:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var yearNavigationEnabledChanged:Boolean = false;
+
+    [Bindable("yearNavigationEnabledChanged")]
+    [Inspectable(defaultValue="false")]
+
+    /**
+     *  Enables year navigation. When <code>true</code>
+     *  an up and down button appear to the right
+     *  of the displayed year. You can use these buttons
+     *  to change the current year.
+     *  These button appear to the left of the year in locales where year comes 
+     *  before the month in the date format.
+     *
+     *  @default false
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get yearNavigationEnabled():Boolean
+    {
+        return _yearNavigationEnabled;
+    }
+
+    /**
+     *  @private
+     */
+    public function set yearNavigationEnabled(value:Boolean):void
+    {
+        _yearNavigationEnabled = value;
+        yearNavigationEnabledChanged = true;
+
+      // invalidateProperties();
+    }
+
+    //----------------------------------
+    //  yearSymbol
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the yearSymbol property.
+     */
+   // private var _yearSymbol:String;
+
+    /**
+     *  @private
+     */
+    //private var yearSymbolChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+   /*  private var yearSymbolOverride:String;
+    
+    [Bindable("yearSymbolChanged")]
+    [Inspectable(defaultValue="")]
+ */
+    /**
+     *  This property is appended to the end of the year 
+     *  displayed at the top of the control.
+     *  Some languages, such as Japanese, 
+     *  add a symbol after the year. 
+     *
+     *  @default ""
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function get yearSymbol():String
+    {
+        return _yearSymbol;
+    } */
+
+    /**
+     *  @private
+     */
+    /* public function set yearSymbol(value:String):void
+    {
+        yearSymbolOverride = value;
+
+        _yearSymbol = value != null ?
+                      value :
+                      resourceManager.getString(
+                          "controls", "yearSymbol");
+
+        yearSymbolChanged = true;
+
+        invalidateProperties();
+    } */
+  
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* override protected function initializeAccessibility():void
+    {
+        if (DateField.createAccessibilityImplementation != null)
+            DateField.createAccessibilityImplementation(this);
+    } */
+
+    /**
+     *  @private
+     *  Create subobjects in the component.
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        /* createDropdown();
+
+        downArrowButton.setStyle("paddingLeft", 0);
+        downArrowButton.setStyle("paddingRight", 0);
+        textInput.editable = false;
+        textInput.mouseChildren = true;
+        textInput.mouseEnabled = true;
+        textInput.addEventListener(TextEvent.TEXT_INPUT, textInput_textInputHandler);
+		
+        // hide the border, we use the text input's border
+        if (border)
+            border.visible = false; */
+
+    }
+
+    /**
+     *  @private
+     */
+    /* override protected function commitProperties():void
+    {
+        if (enabledChanged)
+        {
+            enabledChanged = false;
+            dispatchEvent(new Event("enabledChanged"));
+        }
+
+        if (dayNamesChanged)
+        {
+            dayNamesChanged = false;
+            // _dayNames will be null if there are no resources.
+            dropdown.dayNames = _dayNames ? _dayNames.slice(0) : null;
+            dispatchEvent(new Event("dayNamesChanged"));
+        }
+
+        if (disabledDaysChanged)
+        {
+            disabledDaysChanged = false;
+            dropdown.disabledDays = _disabledDays.slice(0);
+            dispatchEvent(new Event("disabledDaysChanged"));
+        }
+
+        if (disabledRangesChanged)
+        {
+            disabledRangesChanged = false;
+            dropdown.disabledRanges = _disabledRanges.slice(0);
+            dispatchEvent(new Event("disabledRangesChanged"));
+        }
+
+        if (displayedMonthChanged)
+        {
+            displayedMonthChanged = false;
+            dropdown.displayedMonth = _displayedMonth;
+            dispatchEvent(new Event("displayedMonthChanged"));
+        }
+
+        if (displayedYearChanged)
+        {
+            displayedYearChanged = false;
+            dropdown.displayedYear = _displayedYear;
+            dispatchEvent(new Event("displayedYearChanged"));
+        }
+
+        if (firstDayOfWeekChanged)
+        {
+            firstDayOfWeekChanged = false;
+            dropdown.firstDayOfWeek = _firstDayOfWeek;
+            dispatchEvent(new Event("firstDayOfWeekChanged"));
+        }
+
+        if (minYearChanged)
+        {
+            minYearChanged = false;
+            dropdown.minYear = _minYear;
+        }
+
+        if (maxYearChanged)
+        {
+            maxYearChanged = false;
+            dropdown.maxYear = _maxYear;
+        }
+
+        if (monthNamesChanged)
+        {
+            monthNamesChanged = false;
+            // _monthNames will be null if there are no resources.
+            dropdown.monthNames = _monthNames ? _monthNames.slice(0) : null;
+            dispatchEvent(new Event("monthNamesChanged"));
+        }
+
+        if (selectableRangeChanged)
+        {
+            selectableRangeChanged = false;
+            dropdown.selectableRange = _selectableRange is Array ? _selectableRange.slice(0) : _selectableRange;
+            dispatchEvent(new Event("selectableRangeChanged"));
+        }
+
+        if (selectedDateChanged)
+        {
+            selectedDateChanged = false;
+            dropdown.selectedDate = _selectedDate;
+        }
+
+        if (showTodayChanged)
+        {
+            showTodayChanged = false;
+            dropdown.showToday = _showToday;
+            dispatchEvent(new Event("showTodayChanged"));
+        }
+
+        if (updateDateFiller)
+        {
+            updateDateFiller = false;
+            dateFiller(_selectedDate);
+        }
+
+        if (yearNavigationEnabledChanged)
+        {
+            yearNavigationEnabledChanged = false;
+            dropdown.yearNavigationEnabled = _yearNavigationEnabled;
+            dispatchEvent(new Event("yearNavigationEnabledChanged"));
+        }
+
+        if (yearSymbolChanged)
+        {
+            yearSymbolChanged = false;
+            dropdown.yearSymbol = _yearSymbol;
+            dispatchEvent(new Event("yearSymbolChanged"));
+        }
+        
+        if (monthSymbolChanged)
+        {
+            monthSymbolChanged = false;
+            dropdown.monthSymbol = _monthSymbol;
+            dispatchEvent(new Event("monthSymbolChanged"));
+        }
+
+        super.commitProperties();
+    } */
+
+    /**
+     *  @private
+     */
+    /* override protected function measure():void
+    {
+        // skip base class, we do our own calculation here
+        // super.measure();
+
+        var buttonWidth:Number = downArrowButton.getExplicitOrMeasuredWidth();
+        var buttonHeight:Number = downArrowButton.getExplicitOrMeasuredHeight();
+
+        var bigDate:Date;
+        var txt:String;
+		var textWidth:Number;
+		var maxWidth:Number = 0;
+		
+		// Width may vary based on date format
+		for (var month:int = 0; month < 12; month++) {
+			bigDate = new Date(2000, month, 28); // day 28 exist in all months
+			txt = (_labelFunction != null) ? _labelFunction(bigDate) : dateToString(bigDate, formatString);
+			textWidth = measureText(txt).width;
+			if (textWidth > maxWidth) {
+				maxWidth = textWidth;
+			}
+		}
+
+        measuredMinWidth = measuredWidth = maxWidth + 8 + buttonWidth +
+			+ getStyle("paddingLeft") + getStyle("paddingRight")
+			+ textInput.getStyle("paddingLeft") + textInput.getStyle("paddingRight");
+        measuredMinHeight = measuredHeight = textInput.getExplicitOrMeasuredHeight();
+    } */
+
+    /**
+     *  @private
+     */
+    /* override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var w:Number = unscaledWidth;
+        var h:Number = unscaledHeight;
+
+        var arrowWidth:Number = downArrowButton.getExplicitOrMeasuredWidth();
+        var arrowHeight:Number = downArrowButton.getExplicitOrMeasuredHeight();
+
+        downArrowButton.setActualSize(arrowWidth, arrowHeight);
+        downArrowButton.move(w - arrowWidth, Math.round((h - arrowHeight) / 2));
+
+        textInput.setActualSize(w - arrowWidth - 2, h);
+    } */
+
+    /**
+     *  @private
+     */
+    /* override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+   
+        if (dropdown)
+            dropdown.styleChanged(styleProp);
+   
+        if (styleProp == null ||
+            styleProp == "styleName" ||
+            styleProp == "dateChooserStyleName")
+        {
+            if (dropdown)
+            {
+                var dateChooserStyleName:String = getStyle(
+                            "dateChooserStyleName");
+   
+                if (dateChooserStyleName)
+                {
+                    var styleDecl:CSSStyleDeclaration =
+                    styleManager.getMergedStyleDeclaration("." + dateChooserStyleName);
+                
+                    if (styleDecl)
+                    {
+                        _dropdown.styleDeclaration = styleDecl;
+                        _dropdown.regenerateStyleCache(true);
+                    }
+                }
+            } 
+        }
+    } */
+
+    /**
+     *  @private
+     */
+    /* override public function notifyStyleChangeInChildren(
+                                styleProp:String, recursive:Boolean):void
+    {
+        super.notifyStyleChangeInChildren(styleProp, recursive);
+
+        if (dropdown)
+            dropdown.notifyStyleChangeInChildren(styleProp, recursive);
+    } */
+
+    /**
+     *  @private
+     */
+    /* override public function regenerateStyleCache(recursive:Boolean):void
+    {
+        super.regenerateStyleCache(recursive);
+
+        if (dropdown)
+            dropdown.regenerateStyleCache(recursive);
+    } */
+
+    /**
+     *  @private
+     */
+    /* override protected function resourcesChanged():void
+    {
+        super.resourcesChanged();
+
+        dayNames = dayNamesOverride;
+        firstDayOfWeek = firstDayOfWeekOverride;
+        formatString = formatStringOverride;
+        monthNames = monthNamesOverride;
+        monthSymbol = monthSymbolOverride;
+        yearSymbol = yearSymbolOverride;
+    } */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Opens the DateChooser control.
+     *
+     *  @helpid 3620
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function open():void
+    {
+        displayDropdown(true);
+    } */
+
+    /**
+     *  Closes the DateChooser control.
+     *
+     *  @helpid 3621
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    /* public function close():void
+    {
+        displayDropdown(false);
+    } */
+	
+	/* private function checkYearSetSelectedDate(value:Date):void {
+		if (value != null)
+		{
+			var year:int = value.getFullYear();
+			
+			if (year >= _minYear && year <= _maxYear)
+				_selectedDate = value;	
+		}
+		else
+		{
+			_selectedDate = null;
+		}
+	} */
+
+    /**
+     *  @private
+     */
+   /*  private function displayDropdown(show:Boolean, triggerEvent:Event = null):void
+    {
+        if (!_enabled)
+            return;
+
+        if (show == showingDropdown)
+            return;
+
+        if (!addedToPopupManager)
+        {
+            addedToPopupManager = true;
+            PopUpManager.addPopUp(_dropdown, this, false);
+        }
+        else
+		{
+            PopUpManager.bringToFront(_dropdown);
+		}
+
+        // Subclasses may extend to do pre-processing
+        // before the dropdown is displayed
+        // or override to implement special display behavior.
+        //var point = {};
+        // point x will exactly appear on the icon.
+        // Leaving 1 pixel for the border to appear.
+        var xPos:Number = (layoutDirection == LayoutDirection.RTL ? 
+                          dropdown.getExplicitOrMeasuredWidth() : 0) 
+                          + unscaledWidth - downArrowButton.width; 
+        
+        var point:Point = new Point(xPos, 0);
+        point = localToGlobal(point);
+        if (show)
+        {
+            if (_parseFunction != null)
+                checkYearSetSelectedDate(_parseFunction(text, formatString));
+            lastSelectedDate = _selectedDate;
+            selectedDate_changeHandler(triggerEvent);
+
+            var dd:DateChooser = dropdown;
+
+            if (_dropdown.selectedDate)
+            {
+                _dropdown.displayedMonth = _dropdown.selectedDate.getMonth();
+                _dropdown.displayedYear = _dropdown.selectedDate.getFullYear();
+            }
+            dd.visible = show;
+            dd.scaleX = scaleX;
+            dd.scaleY = scaleY;
+
+            var xVal:Number = point.x;
+            var yVal:Number = point.y;
+
+            //handling of dropdown position
+            // A. Bottom Left Placment
+            // B. Bottom Right Placement
+            // C. Top Right Placement
+            var sm:ISystemManager = systemManager.topLevelSystemManager;
+            var screen:Rectangle = sm.getVisibleApplicationRect(null, true);
+
+            if (screen.right > dd.getExplicitOrMeasuredWidth() + point.x &&
+                screen.bottom < dd.getExplicitOrMeasuredHeight() + point.y)
+            {
+                xVal = point.x
+                yVal = point.y - dd.getExplicitOrMeasuredHeight();
+                openPos = 1;
+            }
+            else if (screen.right < dd.getExplicitOrMeasuredWidth() + point.x &&
+                     screen.bottom < dd.getExplicitOrMeasuredHeight() + point.y)
+            {
+                xVal = point.x - dd.getExplicitOrMeasuredWidth() + downArrowButton.width;
+                yVal = point.y - dd.getExplicitOrMeasuredHeight();
+                openPos = 2;
+            }
+            else if (screen.right < dd.getExplicitOrMeasuredWidth() + point.x &&
+                     screen.bottom > dd.getExplicitOrMeasuredHeight() + point.y)
+            {
+                xVal = point.x - dd.getExplicitOrMeasuredWidth() + downArrowButton.width;
+                yVal = point.y + unscaledHeight;
+                openPos = 3;
+            }
+			else
+			{
+                // Why do we need to disable downArrowButton when its hidden?
+                //downArrowButton.enabled = false;
+                openPos = 0;
+			}
+
+            xVal = Math.max(screen.left, xVal);
+            
+            point.x = xVal;
+            point.y = yVal;
+            point = dd.parent.globalToLocal(point);
+            UIComponentGlobals.layoutManager.validateClient(dd, true);
+            dd.move(point.x, point.y);
+            Object(dd).setActualSize(dd.getExplicitOrMeasuredWidth(),dd.getExplicitOrMeasuredHeight());
+
+        }
+        else
+        {
+            _dropdown.visible = false;
+        }
+
+        showingDropdown = show;
+
+        var event:DropdownEvent =
+            new DropdownEvent(show ? DropdownEvent.OPEN : DropdownEvent.CLOSE);
+        event.triggerEvent = triggerEvent;
+        dispatchEvent(event);
+    }
+ */
+    /**
+     *  @private
+     */
+    /* private function createDropdown():void
+    {
+        if (creatingDropdown)
+            return;
+
+        creatingDropdown = true;
+
+        _dropdown = dropdownFactory.newInstance();
+        _dropdown.focusEnabled = false;
+        _dropdown.owner = this;
+        _dropdown.moduleFactory = moduleFactory;
+        var todaysDate:Date = new Date();
+        _dropdown.displayedMonth = todaysDate.getMonth();
+        _dropdown.displayedYear = todaysDate.getFullYear();
+
+        _dropdown.styleName = new StyleProxy(this, {}); 
+        
+        var dateChooserStyleName:Object = getStyle("dateChooserStyleName");
+        if (dateChooserStyleName)
+        {
+            var styleDecl:CSSStyleDeclaration =
+            styleManager.getMergedStyleDeclaration("." + dateChooserStyleName);
+
+            if (styleDecl)
+                _dropdown.styleDeclaration = styleDecl;
+        }
+
+        _dropdown.visible = false;
+
+        _dropdown.addEventListener(CalendarLayoutChangeEvent.CHANGE,
+                                   dropdown_changeHandler);
+        _dropdown.addEventListener(DateChooserEvent.SCROLL,
+                                   dropdown_scrollHandler);
+        _dropdown.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE,
+                                   dropdown_mouseDownOutsideHandler);
+        _dropdown.addEventListener(FlexMouseEvent.MOUSE_WHEEL_OUTSIDE,
+                                   dropdown_mouseDownOutsideHandler);
+        _dropdown.addEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE,
+                                   dropdown_mouseDownOutsideHandler);
+        _dropdown.addEventListener(SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE,
+                                   dropdown_mouseDownOutsideHandler);
+        
+        creatingDropdown = false;
+    } */
+
+    /**
+     *  @private
+     *  This is the default date format that is displayed
+     *  if labelFunction is not defined.
+     */
+    /* private function dateFiller(value:Date):void
+    {
+        if (_labelFunction != null)
+            textInput.text = labelFunction(value);
+        else
+            textInput.text = dateToString(value, formatString);
+    } */
+    
+    /**
+     *  @private
+     *  This method scrubs out time values from incoming date objects
+     */ 
+    /*  private function scrubTimeValue(value:Object):Object
+     {
+        if (value is Date)
+        {
+            return new Date(value.getFullYear(), value.getMonth(), value.getDate());
+        }
+        else if (value is Object) 
+        {
+            var range:Object = {};
+            if (value.rangeStart)
+            {
+                range.rangeStart = new Date(value.rangeStart.getFullYear(), 
+                                            value.rangeStart.getMonth(), 
+                                            value.rangeStart.getDate());
+            }
+            
+            if (value.rangeEnd)
+            {
+                range.rangeEnd = new Date(value.rangeEnd.getFullYear(), 
+                                          value.rangeEnd.getMonth(), 
+                                          value.rangeEnd.getDate());
+            }
+            return range;
+        }
+        return null;
+     } */
+     
+     /**
+     *  @private
+     *  This method scrubs out time values from incoming date objects
+     */ 
+     /* private function scrubTimeValues(values:Array):Array
+     {
+         var dates:Array = [];
+         for (var i:int = 0; i < values.length; i++)
+         {
+            dates[i] = scrubTimeValue(values[i]);
+         }
+         return dates;
+     } */
+      
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+   /*  override protected function focusOutHandler(event:FocusEvent):void
+    {
+        if (showingDropdown && event != null &&
+            this.contains(DisplayObject(event.target)))
+            displayDropdown(false);
+
+        super.focusOutHandler(event);
+
+        if (_parseFunction != null)
+            checkYearSetSelectedDate(_parseFunction(text, formatString));
+        
+        selectedDate_changeHandler(event);
+    } */
+
+    /**
+     *  @private
+     */
+    /* override protected function keyDownHandler(event:KeyboardEvent):void
+    {
+        if (event.ctrlKey && event.keyCode == Keyboard.DOWN)
+        {
+            displayDropdown(true, event);
+            event.stopPropagation();
+        }
+        else if (event.ctrlKey && event.keyCode == Keyboard.UP)
+        {
+            if (showingDropdown)
+                selectedDate = lastSelectedDate;
+            displayDropdown(false, event);
+            event.stopPropagation();
+        }
+        else if (event.keyCode == Keyboard.ESCAPE)
+        {
+            if (showingDropdown) {
+                selectedDate = lastSelectedDate;
+            	displayDropdown(false, event);
+				if (!editable)
+           			event.stopPropagation();
+			}
+        }
+        else if (event.keyCode == Keyboard.ENTER)
+        {
+            if (showingDropdown)
+            {
+               checkYearSetSelectedDate(_dropdown.selectedDate);
+                displayDropdown(false, event);
+                event.stopPropagation();
+            }
+            else if (editable)
+            {
+                if (_parseFunction != null)
+                  checkYearSetSelectedDate(_parseFunction(text, formatString));
+            }
+            selectedDate_changeHandler(event);
+        }
+        else if (event.keyCode == Keyboard.UP ||
+                 event.keyCode == Keyboard.DOWN ||
+                 event.keyCode == Keyboard.LEFT ||
+                 event.keyCode == Keyboard.RIGHT ||
+                 event.keyCode == Keyboard.PAGE_UP ||
+                 event.keyCode == Keyboard.PAGE_DOWN ||
+                 event.keyCode == 189 || // - or _ key used to step down year
+                 event.keyCode == 187 || // + or = key used to step up year
+                 event.keyCode == Keyboard.HOME ||
+                 event.keyCode == Keyboard.END)
+        {
+            if (showingDropdown)
+            {
+                if (yearNavigationEnabled &&
+                    (event.keyCode == 189 || event.keyCode == 187)) 
+                    yearChangedWithKeys = true;
+                inKeyDown = true;
+                // Redispatch the event to the DateChooser
+                // and let its keyDownHandler() handle it.
+                dropdown.dispatchEvent(event);
+                inKeyDown = false;              
+                // Prevent keys from moving scrollBars.
+                event.stopPropagation();
+            }
+        }
+    } */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers: ComboBase
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* override protected function downArrowButton_buttonDownHandler(
+                                    event:FlexEvent):void
+    {
+        // The down arrow should always toggle the visibility of the dropdown.
+        callLater(displayDropdown, [ !showingDropdown, event ]);
+
+        // We hide the down arrow with the dropdown so the down arrow
+        // never gets a release, so it is in the wrong state.
+        // Force the state to be released:
+        downArrowButton.phase = "up";
+    }
+     */
+    /**
+     *  @private
+     */
+    /* override protected function textInput_changeHandler(event:Event):void
+    {
+        super.textInput_changeHandler(event);
+        
+        var inputDate:Date = _parseFunction(text, formatString);
+        if (inputDate)
+           checkYearSetSelectedDate(inputDate);
+    } */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+   /*  private function removedFromStageHandler(event:Event):void
+    {
+        // Ensure we've unregistered ourselves from PopupManager, else
+        // we'll be leaked.
+        addedToPopupManager = false;
+        PopUpManager.removePopUp(_dropdown);
+    } */
+
+    /**
+     *  @private
+     */
+    /* private function dropdown_changeHandler(
+                        event:CalendarLayoutChangeEvent):void
+    {
+        // If this was generated by the dropdown as a result of a keystroke,
+        // it is likely a Page-Up or Page-Down, or Arrow-Up or Arrow-Down.
+        // If the selection changes due to a keystroke,
+        // we leave the dropdown displayed.
+        // If it changes as a result of a mouse selection,
+        // we close the dropdown.
+        if (!inKeyDown)
+            displayDropdown(false);
+
+        // Nothing to do if the dates are the same.
+        if (ObjectUtil.dateCompare(_selectedDate, dropdown.selectedDate) == 0)
+            return;
+
+        checkYearSetSelectedDate(dropdown.selectedDate);
+
+        if (_selectedDate)
+            dateFiller(_selectedDate);
+        else
+            textInput.text = "";
+        
+        var e:CalendarLayoutChangeEvent = new 
+            CalendarLayoutChangeEvent(CalendarLayoutChangeEvent.CHANGE);        
+        e.newDate = event.newDate;
+        e.triggerEvent = event.triggerEvent;
+        dispatchEvent(e);                   
+    } */
+
+    /**
+     *  @private
+     */
+    /* private function dropdown_scrollHandler(event:DateChooserEvent):void
+    {
+        dispatchEvent(event);
+    } */
+
+    /**
+     *  @private
+     */
+    /* private function dropdown_mouseDownOutsideHandler(event:Event):void
+    {
+        if (event is MouseEvent)
+        {
+            var mouseEvent:MouseEvent = MouseEvent(event);
+
+            if (! hitTestPoint(mouseEvent.stageX, mouseEvent.stageY, true))
+                displayDropdown(false, event);
+        }
+        else if (event is SandboxMouseEvent) 
+		{
+            displayDropdown(false, event);
+		}
+            
+    } */
+
+    /**
+     *  @private
+     *  Handling change in selectedDate due to user interaction.
+     */
+    /* private function selectedDate_changeHandler(triggerEvent:Event):void
+    {
+        if (!dropdown.selectedDate && !_selectedDate)
+            return;
+
+        if (_selectedDate)
+            dateFiller(_selectedDate);
+
+        if (dropdown.selectedDate && _selectedDate &&
+            dropdown.selectedDate.getFullYear() == _selectedDate.getFullYear() &&
+            dropdown.selectedDate.getMonth() == _selectedDate.getMonth() &&
+            dropdown.selectedDate.getDate() == _selectedDate.getDate())
+            return;
+
+        dropdown.selectedDate = _selectedDate;
+
+        var changeEvent:CalendarLayoutChangeEvent =
+            new CalendarLayoutChangeEvent(CalendarLayoutChangeEvent.CHANGE);
+        changeEvent.newDate = _selectedDate;
+        changeEvent.triggerEvent = triggerEvent;
+        dispatchEvent(changeEvent);
+    } */
+
+    /**
+     *  @private
+     */ 
+    /* private function textInput_textInputHandler(event:TextEvent):void
+    {
+            if (yearChangedWithKeys)
+            {
+                event.preventDefault();
+                yearChangedWithKeys = false;
+            }
+    } */
+
+    /**
+     *  @private
+     */
+    /* mx_internal function isShowingDropdown():Boolean
+    {
+        return showingDropdown;
+    } */
+
+    
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/List.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/List.as
new file mode 100644
index 000000000..30c8e22a1
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/List.as
@@ -0,0 +1,360 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.controls
+{
+COMPILE::JS
+{
+    import goog.DEBUG;
+}
+/*
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.display.Graphics;
+import flash.display.Shape;
+import flash.display.Sprite;
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+import flash.ui.Keyboard;
+import flash.utils.Dictionary;
+
+import mx.collections.CursorBookmark;
+import mx.collections.IList;
+import mx.collections.ItemResponder;
+import mx.collections.ItemWrapper;
+import mx.collections.ModifiedCollectionView;
+import mx.collections.errors.ItemPendingError;
+import mx.controls.listClasses.BaseListData;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.controls.listClasses.ListBaseContentHolder;
+import mx.controls.listClasses.ListBaseSeekPending;
+import mx.controls.listClasses.ListData;
+import mx.controls.listClasses.ListItemRenderer;
+import mx.controls.listClasses.ListRowInfo;
+import mx.controls.scrollClasses.ScrollBar;
+import mx.core.EdgeMetrics;
+import mx.core.EventPriority;
+import mx.core.FlexShape;
+import mx.core.FlexSprite;
+import mx.core.IChildList;
+import mx.core.IFactory;
+import mx.core.IIMESupport;
+import mx.core.IInvalidating;
+import mx.core.IPropertyChangeNotifier;
+import mx.core.IUIComponent;
+import mx.core.ScrollPolicy;
+import mx.core.UIComponent;
+import mx.core.UIComponentGlobals;
+import mx.core.mx_internal;
+import mx.events.CollectionEvent;
+import mx.events.CollectionEventKind;
+import mx.events.ListEvent;
+import mx.events.ListEventReason;
+import mx.events.SandboxMouseEvent;
+import mx.events.ScrollEvent;
+import mx.events.ScrollEventDetail;
+import mx.managers.IFocusManager;
+import mx.managers.IFocusManagerComponent;
+import mx.managers.ISystemManager;
+
+use namespace mx_internal;
+*/
+    
+import mx.core.ClassFactory;
+import mx.controls.listClasses.ListBase;
+
+//[IconFile("List.png")]
+
+[DataBindingInfo("acceptedTypes", "{ dataProvider: { label: &quot;String&quot; } }")]
+
+[DefaultProperty("dataProvider")]
+
+[DefaultBindingProperty(source="selectedItem", destination="dataProvider")]
+
+[DefaultTriggerEvent("change")]
+
+[AccessibilityClass(implementation="mx.accessibility.ListAccImpl")]
+
+/**
+ *  Dispatched when the user releases the mouse button while over an item,
+ *  tabs to the List or within the List, or in any other way
+ *  attempts to edit an item.
+ *
+ *  @eventType mx.events.ListEvent.ITEM_EDIT_BEGINNING
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemEditBeginning", type="mx.events.ListEvent")]
+
+/**
+ *  Dispatched when the <code>editedItemPosition</code> property is set
+ *  and the item can be edited.
+ *
+ *  @eventType mx.events.ListEvent.ITEM_EDIT_BEGIN
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemEditBegin", type="mx.events.ListEvent")]
+
+/**
+ *  Dispatched when an item editing session is ending for any reason.
+ *
+ *  @eventType mx.events.ListEvent.ITEM_EDIT_END
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemEditEnd", type="mx.events.ListEvent")]
+
+/**
+ *  Dispatched when an item renderer gets focus, which can occur if the user
+ *  clicks on an item in the List control or navigates to the item using a 
+ *  keyboard.
+ *  Only dispatched if the list item is editable.
+ *
+ *  @eventType mx.events.ListEvent.ITEM_FOCUS_IN
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemFocusIn", type="mx.events.ListEvent")]
+
+/**
+ *  Dispatched when an item renderer loses the focus, which can occur if the 
+ *  user clicks another item in the List control or outside the list, 
+ *  or uses the keyboard to navigate to another item in the List control
+ *  or outside the List control.
+ *  Only dispatched if the list item is editable.
+ *
+ *  @eventType mx.events.ListEvent.ITEM_FOCUS_OUT
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+//[Event(name="itemFocusOut", type="mx.events.ListEvent")]
+
+//--------------------------------------
+//  Effects
+//--------------------------------------
+
+/**
+ *  The data effect to play when a change occur to the control's data provider.
+ *
+ *  <p>By default, the List control does not use a data effect. 
+ *  For the List control, use an instance of the the DefaultListEffect class 
+ *  to configure the data effect. </p>
+ *
+ *  @default undefined
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Effect(name="itemsChangeEffect", event="itemsChange")]
+
+[Alternative(replacement="spark.components.List", since="4.0")]
+
+/**
+ *  The List control displays a vertical list of items.
+ *  Its functionality is very similar to that of the SELECT
+ *  form element in HTML.
+ *  If there are more items than can be displayed at once, it
+ *  can display a vertical scroll bar so the user can access
+ *  all items in the list.
+ *  An optional horizontal scroll bar lets the user view items
+ *  when the full width of the list items is unlikely to fit.
+ *  The user can select one or more items from the list, depending
+ *  on the value of the <code>allowMultipleSelection</code> property.
+ *
+ *  <p>The List control has the following default sizing 
+ *     characteristics:</p>
+ *     <table class="innertable">
+ *        <tr>
+ *           <th>Characteristic</th>
+ *           <th>Description</th>
+ *        </tr>
+ *        <tr>
+ *           <td>Default size</td>
+ *           <td>Wide enough to fit the widest label in the first seven 
+ *               visible items (or all visible items in the list, if 
+ *               there are less than seven); seven rows high, where 
+ *               each row is 20 pixels high.</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Minimum size</td>
+ *           <td>0 pixels.</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Maximum size</td>
+ *           <td>5000 by 5000.</td>
+ *        </tr>
+ *     </table>
+ *
+ *  @mxml
+ *
+ *  <p>The <code>&lt;mx:List&gt;</code> tag inherits all the tag attributes
+ *  of its superclass, and adds the following tag attributes:</p>
+ *
+ *  <pre>
+ *  &lt;mx:List
+ *    <b>Properties</b>
+ *    editable="false|true"
+ *    editedItemPosition="<i>No default</i>"
+ *    editorDataField="text"
+ *    editorHeightOffset="0"
+ *    editorUsesEnterKey="false|true"
+ *    editorWidthOffset="0"
+ *    editorXOffset="0"
+ *    editorYOffset="0"
+ *    imeMode="null"    
+ *    itemEditor="TextInput"
+ *    itemEditorInstance="<i>Current item editor</i>"
+ *    rendererIsEditor="false|true"
+ *    
+ *    <b>Styles</b>
+ *    backgroundDisabledColor="0xDDDDDD"
+ *    
+ *    <b>Events</b>
+ *    itemEditBegin="<i>No default</i>"
+ *    itemEditEnd="<i>No default</i>"
+ *    itemEditBeginning="<i>No default</i>"
+ *    itemFocusIn="<i>No default</i>"
+ *    itemFocusOut="<i>No default</i>"
+ *  /&gt;
+ *  </pre>
+ *
+ *  @includeExample examples/SimpleList.mxml
+ *
+ *  @see mx.events.ListEvent
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class List extends ListBase // implements IIMESupport
+{
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function List()
+    {
+        super();
+
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  editable
+    //----------------------------------
+
+    private var _editable:Boolean = false;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  A flag that indicates whether or not the user can edit
+     *  items in the data provider.
+     *  If <code>true</code>, the item renderers in the control are editable.
+     *  The user can click on an item renderer to open an editor.
+     *
+     *  @default false
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get editable():Boolean
+    {
+        return _editable;
+    }
+
+    /**
+     *  @private
+     */
+    public function set editable(value:Boolean):void
+    {
+        _editable = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    [Inspectable(category="Data", defaultValue="undefined")]
+
+    /**
+     *  @private
+    override public function set dataProvider(value:Object):void
+    {
+        if (itemEditorInstance)
+            endEdit(ListEventReason.OTHER);
+        
+        super.dataProvider = value;
+    }
+     */
+
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/MenuBar.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/MenuBar.as
new file mode 100644
index 000000000..9760de820
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/MenuBar.as
@@ -0,0 +1,2216 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.controls
+{
+
+/* import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.ui.Keyboard;
+import flash.xml.XMLNode; */
+import org.apache.royale.events.Event;
+
+
+/* import mx.collections.ArrayCollection;
+import mx.collections.IViewCursor;
+import mx.collections.XMLListCollection;
+import mx.collections.errors.ItemPendingError;
+import mx.containers.ApplicationControlBar;
+import mx.controls.menuClasses.IMenuBarItemRenderer;
+import mx.controls.menuClasses.IMenuDataDescriptor;
+import mx.controls.menuClasses.MenuBarItem;
+import mx.controls.treeClasses.DefaultDataDescriptor;
+import mx.core.ClassFactory; 
+import mx.core.EventPriority;
+import mx.core.IFactory;
+import mx.core.IFlexDisplayObject;
+import mx.core.LayoutDirection;
+import mx.core.UIComponentGlobals;
+import mx.events.FlexEvent;
+import mx.events.InterManagerRequest;
+import mx.events.MenuEvent;
+import mx.managers.ISystemManager;
+import mx.managers.PopUpManager;
+import mx.styles.CSSStyleDeclaration;
+ */
+
+import mx.core.IUIComponent;
+import mx.core.UIComponent;
+import mx.styles.ISimpleStyleClient;
+import mx.styles.StyleProxy;
+import mx.collections.ICollectionView;
+import mx.managers.IFocusManagerComponent;
+
+import mx.events.CollectionEvent;
+import mx.events.CollectionEventKind;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when selection changes as a result of user 
+ *  interaction.  
+ *  This event is also dispatched when the user changes 
+ *  the current menu selection in a pop-up submenu. 
+ *  When the event occurs on the menu bar, 
+ *  the <code>menu</code> property of the MenuEvent object is <code>null</code>.
+ *  When it occurs in a pop-up submenu, the <code>menu</code> property 
+ *  contains a reference to the Menu object that represents the 
+ *  the pop-up submenu.
+ *
+ *  @eventType mx.events.MenuEvent.CHANGE 
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Event(name="change", type="mx.events.MenuEvent")]
+
+/**
+ *  Dispatched when the user selects an item in a pop-up submenu.
+ *
+ *  @eventType mx.events.MenuEvent.ITEM_CLICK 
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+[Event(name="itemClick", type="mx.events.MenuEvent")]
+
+/**
+ *  Dispatched when a pop-up submenu closes.
+ *
+ *  @eventType mx.events.MenuEvent.MENU_HIDE 
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Event(name="menuHide", type="mx.events.MenuEvent")]
+
+/**
+ *  Dispatched when a pop-up submenu opens, or the 
+ *  user selects a menu bar item with no drop-down menu.
+ *
+ *  @eventType mx.events.MenuEvent.MENU_SHOW 
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+[Event(name="menuShow", type="mx.events.MenuEvent")]
+
+/**
+ *  Dispatched when the mouse pointer rolls out of a menu item.
+ *
+ *  @eventType mx.events.MenuEvent.ITEM_ROLL_OUT
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Event(name="itemRollOut", type="mx.events.MenuEvent")]
+
+/**
+ *  Dispatched when the mouse pointer rolls over a menu item.
+ *
+ *  @eventType mx.events.MenuEvent.ITEM_ROLL_OVER
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Event(name="itemRollOver", type="mx.events.MenuEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/* include "../styles/metadata/FocusStyles.as"
+include "../styles/metadata/LeadingStyle.as"
+include "../styles/metadata/SkinStyles.as"
+include "../styles/metadata/TextStyles.as"
+ */
+/**
+ *  The background skin of the MenuBar control. 
+ *   
+ *  <p>The default skin class is based on the theme. For example, with the Halo theme,
+ *  the default skin class is <code>mx.skins.halo.MenuBarBackgroundSkin</code>. For the Spark theme, the default skin
+ *  class is <code>mx.skins.spark.ButtonSkin</code>.</p>
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="backgroundSkin", type="Class", inherit="no")]
+
+/**
+ *  The default skin for a MenuBar item.
+ * 
+ *  <p>The default skin class is based on the theme. For example, with the Halo theme,
+ *  the default skin class is <code>mx.skins.halo.ActivatorSkin</code>. For the Spark theme, the default skin
+ *  class is <code>mx.skins.spark.MenuItemSkin</code>.</p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="itemSkin", type="Class", inherit="no", states="up, over, down")]
+
+/**
+ *  The skin when a MenuBar item is not selected.
+ * 
+ *  <p>The default skin class is based on the theme. For example, with the Halo theme,
+ *  the default skin class is <code>mx.skins.halo.ActivatorSkin</code>. For the Spark theme, the default skin
+ *  class is <code>mx.skins.spark.MenuItemSkin</code>.</p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="itemUpSkin", type="Class", inherit="no")]
+
+/**
+ *  The skin when focus is over a MenuBar item. 
+ * 
+ *  <p>The default skin class is based on the theme. For example, with the Halo theme,
+ *  the default skin class is <code>mx.skins.halo.ActivatorSkin</code>. For the Spark theme, the default skin
+ *  class is <code>mx.skins.spark.MenuItemSkin</code>.</p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="itemOverSkin", type="Class", inherit="no")]
+
+/**
+ *  The skin when a MenuBar item is selected. 
+ * 
+ *  <p>The default skin class is based on the theme. For example, with the Halo theme,
+ *  the default skin class is <code>mx.skins.halo.ActivatorSkin</code>. For the Spark theme, the default skin
+ *  class is <code>mx.skins.spark.MenuItemSkin</code>.</p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="itemDownSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the CSSStyleDeclaration that specifies the styles for
+ *  the Menu controls displayed by this MenuBar control. 
+ *  By default, the Menu controls use the MenuBar control's
+ *  inheritable styles. 
+ *  
+ *  <p>You can use this class selector to set the values of all the style properties 
+ *  of the Menu class, including <code>backgroundAlpha</code> and <code>backgroundColor</code>.</p>
+ * 
+ *  @default undefined
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="menuStyleName", type="String", inherit="no")]
+
+
+/**
+ *  @copy mx.controls.Menu#style:rollOverColor
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="rollOverColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  @copy mx.controls.Menu#style:selectionColor
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="selectionColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  Color of any symbol of a component. Examples include the check mark of a CheckBox or
+ *  the arrow of a ScrollBar button.
+ *   
+ *  @default 0x000000
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */ 
+//[Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+//[AccessibilityClass(implementation="mx.accessibility.MenuBarAccImpl")]
+
+[DefaultBindingProperty(destination="dataProvider")]
+
+[DefaultProperty("dataProvider")]
+
+[DefaultTriggerEvent("change")]
+
+//[IconFile("MenuBar.png")]
+
+[RequiresDataBinding(true)]
+
+/**
+ *  A MenuBar control defines a horizontal, top-level menu bar that contains
+ *  one or more menus. Clicking on a top-level menu item opens a pop-up submenu
+ *  that is an instance of the Menu control.
+ *
+ *  <p>The top-level menu bar of the MenuBar control is generally always visible. 
+ *  It is not intended for use as a pop-up menu. The individual submenus
+ *  pop up as the user selects them with the mouse or keyboard. Open submenus 
+ *  disappear when a menu item is selected, or if the menu is dismissed by the
+ *  user clicking outside the menu.</p>
+ *
+ *  <p>For information and an example on the attributes that you can use 
+ *  in the data provider for the MenuBar control, see the Menu control.</p>
+ *
+ *  <p>The MenuBar control has the following sizing characteristics:
+ *  </p>
+ *     <table class="innertable">
+ *        <tr>
+ *           <th>Characteristic</th>
+ *           <th>Description</th>
+ *        </tr>
+ *        <tr>
+ *           <td>Default size</td>
+ *           <td>The width is determined from the menu text, with a 
+ *               minimum value of 27 pixels for the width. The default 
+ *               value for the height is 22 pixels.</td>
+ *        </tr>
+ *     </table>
+ *
+ *  @mxml
+ *  <p>
+ *  The <code>&lt;mx:MenuBar&gt</code> tag inherits all of the tag attributes of its superclass, and
+ *  adds the following tag attributes:
+ *  </p>
+ *  
+ *  <pre>
+ *  &lt;mx:MenuBar
+ *    <b>Properties</b>
+ *    dataDescriptor="<i>mx.controls.treeClasses.DefaultDataDescriptor</i>"
+ *    dataProvider="<i>undefined</i>"
+ *    iconField="icon"
+ *    labelField="label"
+ *    labelFunction="<i>undefined</i>"
+ *    menuBarItemRenderer="<i>mx.controls.menuClasses.MenuBarItem</i>"
+ *    menuBarItems="[]"
+ *    menus="[]"
+ *    selectedIndex="-1"
+ *    showRoot="true"
+ *  
+ *    <b>Styles</b>
+ *    backgroundSkin="mx.skins.halo.MenuBarBackgroundSkin"
+ *    borderColor="0xAAB3B3"
+ *    color="0x0B333C"
+ *    cornerRadius="0"
+ *    disabledColor="0xAAB3B3"
+ *    fillAlphas="[0.6,0.4]"
+ *    fillColors="[0xFFFFFF, 0xCCCCCC]"
+ *    focusAlpha="0.5"
+ *    focusRoundedCorners="tl tr bl br"
+ *    fontAntiAliasType="advanced|normal"
+ *    fontFamily="Verdana"
+ *    fontGridFitType="pixel|none|subpixel"
+ *    fontSharpness="0"
+ *    fontSize="10"
+ *    fontStyle="normal|italic"
+ *    fontThickness="0"
+ *    fontWeight="normal|bold"
+ *    highlightAlphas="[0.3,0.0]"
+ *    itemDownSkin="mx.skins.halo.ActivatorSkin"
+ *    itemOverSkin="mx.skins.halo.ActivatorSkin"
+ *    itemUpSkin="mx.skins.halo.ActivatorSkin"
+ *    leading="2"
+ *    menuStyleName="<i>No default</i>"
+ *    rollOverColor="0xB2E1FF"
+ *    selectionColor="0x7FCEFF"
+ *    textAlign="left"
+ *    textDecoration="none"
+ *    textIndent="0"
+ *  
+ *    <b>Events</b>
+ *    itemClick="<i>No default"</i>
+ *    itemRollOut="<i>No default"</i>
+ *    itemRollOver="<i>No default"</i>
+ *    menuHide="<i>No default"</i>
+ *    menuShow="<i>No default"</i>
+ *  /&gt;
+ *  </pre>
+ *  </p>
+ *
+ *  @see mx.controls.Menu
+ *  @see mx.controls.PopUpMenuButton
+ *  @see mx.controls.menuClasses.IMenuBarItemRenderer
+ *  @see mx.controls.menuClasses.MenuBarItem
+ *  @see mx.controls.menuClasses.IMenuDataDescriptor
+ *  @see mx.controls.treeClasses.DefaultDataDescriptor
+ *
+ *  @includeExample examples/MenuBarExample.mxml
+ *
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ *  @royalesuppresspublicvarwarning
+ */
+public class MenuBar extends UIComponent implements IFocusManagerComponent
+{
+    //include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+   // private static const MARGIN_WIDTH:int = 10;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class mixins
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Placeholder for mixin by MenuBarAccImpl.
+     */
+   // mx_internal static var createAccessibilityImplementation:Function;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function MenuBar()
+    {
+        super();
+       /*  menuBarItemRenderer = new ClassFactory(MenuBarItem);
+        tabChildren = false; */
+		
+		
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Storage variable for the original dataProvider
+     */
+   mx_internal var _rootModel:ICollectionView;
+
+    /**
+     *  @private
+     */
+   // private var isDown:Boolean;
+
+    /**
+     *  @private
+     */
+    //private var inKeyDown:Boolean = false;
+
+    /**
+     *  @private
+     */
+   // private var background:IFlexDisplayObject;
+
+    /**
+     *  @private
+     *  This menu bar could be inside an ApplicationControlBar (ACB).
+     */
+    //private var isInsideACB:Boolean = false;
+
+    /**
+     *  @private
+     */
+   // private var supposedToLoseFocus:Boolean = false;
+
+    /**
+     *  @private
+     */
+   // private var dataProviderChanged:Boolean = false;
+    
+    /**
+     *  @private
+     */
+   // private var iconFieldChanged:Boolean = false;
+    
+        /**
+     *  @private
+     */
+   // private var menuBarItemRendererChanged:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+    
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     *  The baselinePosition of a MenuBar is calculated
+     *  for its first MenuBarItem.
+     */
+    /* override public function get baselinePosition():Number
+    {
+        if (!validateBaselinePosition())
+            return NaN;
+
+        if (menuBarItems.length == 0)
+            return super.baselinePosition;
+        
+        var menuBarItem0:IUIComponent = menuBarItems[0] as IUIComponent;
+        if (!menuBarItem0)
+            return super.baselinePosition;
+            
+        validateNow();
+        
+        return menuBarItem0.y + menuBarItem0.baselinePosition;      
+    } */
+
+    //--------------------------------------------------------------------------
+    // enabled
+    //--------------------------------------------------------------------------
+
+    //[Inspectable(category="General", enumeration="true,false", defaultValue="true")]
+
+    /**
+     *  @private
+     */
+    /* override public function set enabled(value:Boolean):void
+    {
+        super.enabled = value;
+
+        if (menuBarItems)
+        {
+            var n:int = menuBarItems.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                menuBarItems[i].enabled = value;
+            }
+        } 
+    }*/
+
+    //----------------------------------
+    //  showInAutomationHierarchy
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    /* override public function set showInAutomationHierarchy(value:Boolean):void
+    {
+        //do not allow value changes
+    } */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  dataDescriptor
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    /* mx_internal var _dataDescriptor:IMenuDataDescriptor =
+        new DefaultDataDescriptor();
+
+    [Inspectable(category="Data")] */
+
+    /**
+     *  The object that accesses and manipulates data in the data provider. 
+     *  The MenuBar control delegates to the data descriptor for information 
+     *  about its data. This data is then used to parse and move about the 
+     *  data source. The data descriptor defined for the MenuBar is used for
+     *  all child menus and submenus. 
+     * 
+     *  <p>When you specify this property as an attribute in MXML, you must
+     *  use a reference to the data descriptor, not the string name of the
+     *  descriptor. Use the following format for setting the property:</p>
+     *
+     * <pre>&lt;mx:MenuBar id="menubar" dataDescriptor="{new MyCustomDataDescriptor()}"/&gt;</pre>
+     *
+     *  <p>Alternatively, you can specify the property in MXML as a nested
+     *  subtag, as the following example shows:</p>
+     *
+     *  <pre>&lt;mx:MenuBar&gt;
+     *  &lt;mx:dataDescriptor&gt;
+     *     &lt;myCustomDataDescriptor&gt;
+     *  &lt;/mx:dataDescriptor&gt;
+     *  ...</pre>
+     *
+     *  <p>The default value is an internal instance of the
+     *  DefaultDataDescriptor class.</p>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+   /*  public function get dataDescriptor():IMenuDataDescriptor
+    {
+        return IMenuDataDescriptor(_dataDescriptor);
+    } */
+
+    /**
+     *  @private
+     */
+   /*  public function set dataDescriptor(value:IMenuDataDescriptor):void
+    {
+        _dataDescriptor = value;
+        
+        //force all the menus to be re-created with the new dataDescriptor
+        menus = [];
+    } */
+    
+    //----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+    [Bindable("collectionChange")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  The hierarchy of objects that are displayed as MenuBar items and menus. 
+     *  The top-level children all become MenuBar items, and their children 
+     *  become the items in the menus and submenus. 
+     * 
+     *  The MenuBar control handles the source data object as follows:
+     *  <p>
+     *  <ul>
+     *  <li>A String containing valid XML text is converted to an XML object.</li>
+     *  <li>An XMLNode is converted to an XML object.</li>
+     *  <li>An XMLList is converted to an XMLListCollection.</li>
+     *  <li>Any object that implements the ICollectionView interface is cast to
+     *  an ICollectionView.</li>
+     *  <li>An Array is converted to an ArrayCollection.</li>
+     *  <li>Any other type object is wrapped in an Array with the object as its sole
+     *  entry.</li>
+     *  </ul>
+     *  </p>
+     * 
+     *  @default "undefined"
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function get dataProvider():Object
+    {
+        if (_rootModel)
+        {   
+            return _rootModel;
+        }
+        else return null;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataProvider(value:Object):void
+    {
+        /* if (_rootModel)
+        {
+            _rootModel.removeEventListener(CollectionEvent.COLLECTION_CHANGE, 
+                                           collectionChangeHandler);
+        }
+                            
+        // handle strings and xml
+        if (typeof(value)=="string")
+            value = new XML(value);
+        else if (value is XMLNode)
+            value = new XML(XMLNode(value).toString());
+        else if (value is XMLList)
+            value = new XMLListCollection(value as XMLList);
+        
+        if (value is XML)
+        {
+            _hasRoot = true;
+            var xl:XMLList = new XMLList();
+            xl += value;
+            _rootModel = new XMLListCollection(xl);
+        }
+        //if already a collection dont make new one
+        else if (value is ICollectionView)
+        {
+            _rootModel = ICollectionView(value);
+            if (_rootModel.length == 1)
+                _hasRoot = true;
+        }
+        else if (value is Array)
+        {
+            _rootModel = new ArrayCollection(value as Array);
+        }
+        //all other types get wrapped in an ArrayCollection
+        else if (value is Object)
+        {
+            _hasRoot = true;
+            // convert to an array containing this one item
+            var tmp:Array = [];
+            tmp.push(value);
+            _rootModel = new ArrayCollection(tmp);
+        }
+        else
+        {
+            _rootModel = new ArrayCollection();
+        }
+        //add listeners as weak references
+        _rootModel.addEventListener(CollectionEvent.COLLECTION_CHANGE,
+                                    collectionChangeHandler, false, 0, true);
+        //flag for processing in commitProps
+        dataProviderChanged = true;
+        invalidateProperties();
+        
+        var event:CollectionEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
+        event.kind = CollectionEventKind.RESET;
+        collectionChangeHandler(event);
+        dispatchEvent(event); */
+    }
+
+    //----------------------------------
+    //  hasRoot
+    //----------------------------------
+
+    /** 
+     *  @private
+     *  Flag to indicate if the model has a root
+     */
+    /* mx_internal var _hasRoot:Boolean = false;
+ */
+    /**
+     *  @copy mx.controls.Menu#hasRoot
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function get hasRoot():Boolean
+    {
+        return _hasRoot;
+    } */
+
+    //----------------------------------
+    //  iconField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for iconField property.
+     */
+    private var _iconField:String = "icon";
+
+    //[Bindable("iconFieldChanged")]
+    [Inspectable(category="Other", defaultValue="icon")]
+
+    /**
+     *  The name of the field in the data provider that determines the 
+     *  icon to display for each menu item. By default, the MenuBar does not 
+     *  try to display icons along with the text in a menu item. By specifying 
+     *  an icon field, you can define a graphic that is created 
+     *  and displayed as an icon for a menu item. 
+     *
+     *  <p>The MenuItemRenderer examines 
+     *  the data provider for a property of the name defined 
+     *  by the <code>iconField</code> property.  If the value of the property is a Class, it 
+     *  instantiates that class and expects it to be an instance of 
+     *  IFlexDisplayObject. If the value of the property is a String, it 
+     *  looks to see if a Class exists with that name in the application, and if 
+     *  it cannot find one, it looks for a property on the document 
+     *  with that name and expects that property to map to a Class.</p>
+     *
+     *  @default "icon"
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function get iconField():String
+    {
+        return _iconField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set iconField(value:String):void
+    {
+        if (_iconField != value)
+        {
+           // iconFieldChanged = true;
+            _iconField = value;
+           /*  invalidateProperties();
+            dispatchEvent(new Event("iconFieldChanged")); */
+        }
+    }
+
+    //----------------------------------
+    //  labelField
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _labelField:String = "label";
+
+    [Bindable("labelFieldChanged")]
+    [Inspectable(category="Data", defaultValue="label")]
+
+    /**
+     *  The name of the field in the data provider that determines the 
+     *  text to display for each menu item. If the data provider is an Array of 
+     *  Strings, Flex uses each string value as the label. If the data 
+     *  provider is an E4X XML object, you must set this property explicitly. 
+     *  For example, use @label to specify the label attribute in an E4X XML Object 
+     *  as the text to display for each menu item. 
+     * 
+     *  Setting the <code>labelFunction</code> property overrides this property.
+     *
+     *  @default "label"
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    public function get labelField():String
+    {
+        return _labelField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set labelField(value:String):void
+    {
+        if (_labelField != value)
+        {
+            _labelField = value;
+            dispatchEvent(new Event("labelFieldChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  labelFunction
+    //----------------------------------
+
+    [Inspectable(category="Data")]
+
+    /**
+     *  The function that determines the text to display for each menu item.
+     *  The label function must find the appropriate field or fields in the 
+     *  data provider and return a displayable string.
+     * 
+     *  If you omit this property, Flex uses the contents of the field or
+     *  attribute specified by the <code>labelField</code> property.
+     *  If you specify this property, Flex ignores any <code>labelField</code>
+     *  property value.
+     *
+     *  The <code>labelFunction</code> property is good for handling formatting
+     *  and localization.
+     *
+     *  <p>The label function must take a single argument which is the item
+     *  in the data provider and return a String.</p>
+     *  <pre>
+     *  <code>myLabelFunction(item:Object):String</code> </pre>
+     *
+     *  @default "undefined"
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //public var labelFunction:Function;
+
+    //----------------------------------
+    //  menuBarItemRenderer
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the menuBarItemRenderer property.
+     */
+   /*  private var _menuBarItemRenderer:IFactory;
+
+    [Bindable("menuBarItemRendererChanged")]
+    [Inspectable(category="Data")]
+ */
+     /**
+     *  The item renderer used by the MenuBar control for 
+     *  the top-level menu bar of the MenuBar control. 
+     * 
+     *  <p>You can define an item renderer for the pop-up submenus 
+     *  of the MenuBar control. 
+     *  Because each pop-up submenu is an instance of the Menu control, 
+     *  you use the class MenuItemRenderer to define an item renderer 
+     *  for the pop-up submenus. 
+     *  To set the item renderer for a pop-up submenu, access the Menu object using 
+     *  the <code>menus</code> property. </p>
+     *
+     *  @default "mx.controls.menuClasses.MenuBarItem"
+     * 
+     *  @see mx.controls.menuClasses.MenuBarItem
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function get menuBarItemRenderer():IFactory
+    {
+        return _menuBarItemRenderer;
+    } */
+
+    /**
+     * @private 
+     */
+    /* public function set menuBarItemRenderer(value:IFactory):void
+    {
+        if (_menuBarItemRenderer != value)
+        {
+            _menuBarItemRenderer = value;
+        
+            menuBarItemRendererChanged = true;
+            invalidateProperties();
+            dispatchEvent(new Event("menuBarItemRendererChanged"));
+        }
+    } */
+
+    //----------------------------------
+    //  menuBarItems
+    //----------------------------------
+
+    /**
+     *  An Array that contains the MenuBarItem objects that render 
+     *  each item in the top-level menu bar of a MenuBar control. By default, 
+     *  this property contains instances of the MenuBarItem class. 
+     * 
+     *  Items should not be added directly to the <code>menuBarItems</code> array. To 
+     *  add new menubar items, add them directly to the MenuBar control's 
+     *  data provider. 
+     * 
+     *  @default [ ]
+     * 
+     *  @see mx.controls.menuClasses.MenuBarItem
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //public var menuBarItems:Array = [];
+
+    //----------------------------------
+    //  menuBarItemStyleFilters
+    //----------------------------------
+
+    /**
+     *  The set of styles to pass from the MenuBar to the menuBar items.
+     *  @see mx.styles.StyleProxy
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function get menuBarItemStyleFilters():Object
+    {
+        return _menuBarItemStyleFilters;
+    }
+    
+    private static var _menuBarItemStyleFilters:Object = null;
+	*/
+    //----------------------------------
+    //  menus
+    //----------------------------------
+
+    /**
+     *  An Array containing the Menu objects corresponding to the 
+     *  pop-up submenus of this MenuBar control.
+     *  Each MenuBar item can have a corresponding Menu object in the Array,
+     *  even if the item does not have a pop-up submenu.
+     *  Flex does not initially populate the <code>menus</code> array;
+     *  instead, it creates the menus dynamically, as needed. 
+     * 
+     *  Items should not be added directly to the <code>menus</code> Array. To 
+     *  add new drop-down menus, add directly to the MenuBar 
+     *  control's data provider.
+     * 
+     *  @default [ ] 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    //public var menus:Array = [];
+
+    //----------------------------------
+    //  selectedIndex
+    //----------------------------------
+
+    /**
+     *  @private
+     *  The index of the currently open menu item, or -1 if none is open.
+     */
+    /* private var openMenuIndex:int = -1;
+    
+    [Bindable("valueCommit")]
+    [Inspectable(category="General", defaultValue="-1")]
+	*/
+    /**
+     *  The index in the MenuBar control of the currently open Menu 
+     *  or the last opened Menu if none are currently open.    
+     *  
+     *  @default -1
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function get selectedIndex():int
+    {
+        return openMenuIndex;
+    } */
+    
+    /**
+     *  @private
+     */
+    /* public function set selectedIndex(value:int):void
+    {
+        openMenuIndex = value;
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+    } */
+
+    //----------------------------------
+    //  showRoot
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage variable for showRoot flag.
+     */
+    /* mx_internal var _showRoot:Boolean = true;
+ */
+    /**
+     *  @private
+     */
+    /* mx_internal var showRootChanged:Boolean = false;
+    
+    [Inspectable(category="Data", enumeration="true,false", defaultValue="false")]
+ */
+    /**
+     *  A Boolean flag that specifies whether to display the data provider's 
+     *  root node.
+     *
+     *  If the data provider has a root node, and the <code>showRoot</code> property 
+     *  is set to <code>false</code>, the items on the MenuBar control correspond to
+     *  the immediate descendants of the root node.  
+     * 
+     *  This flag has no effect on data providers without root nodes, 
+     *  like Lists and Arrays. 
+     *
+     *  @default true
+     *  @see #hasRoot
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* public function get showRoot():Boolean
+    {
+        return _showRoot;
+    } */
+
+    /**
+     *  @private
+     */
+   /*  public function set showRoot(value:Boolean):void
+    {
+        if (_showRoot != value)
+        {
+            showRootChanged = true;
+            _showRoot = value;
+            invalidateProperties();
+        }
+    } */
+    
+    //------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* override protected function initializeAccessibility():void
+    {
+        if (MenuBar.createAccessibilityImplementation != null)
+            MenuBar.createAccessibilityImplementation(this);
+    } */
+
+
+    /**
+     *  @private
+     */
+    /* override protected function createChildren():void
+    {
+        super.createChildren();
+
+        // Check if this MenuBar is inside an ACB.
+        for (var p:Object = parent; p; p = p.parent)
+        {
+            if (p is ApplicationControlBar)
+            {
+                isInsideACB = true;
+                break;
+            }
+        }
+
+        updateBackground();
+    }
+ */
+    /**
+     *  Updates the MenuBar control's background skin. 
+     * 
+     *  This method is called when MenuBar children are created or when 
+     *  any styles on the MenuBar changes. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* protected function updateBackground():void
+    {
+        if (isInsideACB)
+        {
+            // draw translucent menubar
+            setStyle("translucent", true);
+        }
+        else
+        {
+            // Remove existing background
+            if (background)
+            {
+                removeChild(DisplayObject(background));
+                background = null;
+            }
+            
+            var backgroundSkinClass:Class = getStyle("backgroundSkin");
+            if (backgroundSkinClass)
+            {
+                background = new backgroundSkinClass();
+                if (background is ISimpleStyleClient)
+                    ISimpleStyleClient(background).styleName = this;
+                addChildAt(DisplayObject(background), 0);
+            }
+        }
+    } */
+
+    /**
+     *  @private
+     */
+   /*  override protected function commitProperties():void
+    {
+        var i:int;
+        var cursor:IViewCursor;
+                
+        if (showRootChanged)
+        {
+            if (!_hasRoot)
+                showRootChanged = false;            
+        }
+
+        if (dataProviderChanged || showRootChanged)
+        {
+            var tmpCollection:ICollectionView;
+            
+            //reset flags 
+            dataProviderChanged = false;
+            showRootChanged = false;
+			
+			// forget last menu
+			openMenuIndex = -1;
+        
+            // are we swallowing the root?
+            if (_rootModel && !_showRoot && _hasRoot)
+            {
+                var rootItem:* = _rootModel.createCursor().current;
+                if (rootItem != null &&
+                    _dataDescriptor.isBranch(rootItem, _rootModel) &&
+                    _dataDescriptor.hasChildren(rootItem, _rootModel))
+                {
+                    // then get rootItem children
+                    tmpCollection = 
+                        _dataDescriptor.getChildren(rootItem, _rootModel);
+                }
+            }
+            //make top level items
+            removeAll();
+            if (_rootModel)
+            {
+                if (!tmpCollection)
+                    tmpCollection = _rootModel;
+                // not really a default handler, but we need to 
+                // be later than the wrapper
+                tmpCollection.addEventListener(CollectionEvent.COLLECTION_CHANGE,
+                                                  collectionChangeHandler,
+                                                  false,
+                                                  EventPriority.DEFAULT_HANDLER, true);
+                                        
+                if (tmpCollection.length > 0)
+                {
+                    cursor = tmpCollection.createCursor();
+                    i= 0;
+                    while (!cursor.afterLast)
+                    {
+                        try
+                        {
+                            insertMenuBarItem(i, cursor.current);
+                        }
+                        catch(e:ItemPendingError)
+                        {
+                          //we probably dont need to actively recover from here
+                        }
+                            
+                        cursor.moveNext();
+                        i++;
+                    } 
+                }
+            }
+        }
+        
+        if (iconFieldChanged || menuBarItemRendererChanged)
+        {
+            //reset flag
+            iconFieldChanged = false;
+            menuBarItemRendererChanged = false;
+            
+            removeAll();
+            if (_rootModel)
+            {
+                if (!tmpCollection)
+                    tmpCollection = _rootModel;
+                
+                if (tmpCollection.length > 0)
+                {
+                    cursor = tmpCollection.createCursor();
+                    i= 0;
+                    while (!cursor.afterLast)
+                    {
+                      try
+                      {
+                          insertMenuBarItem(i, cursor.current);
+                      }
+                      catch(e:ItemPendingError)
+                      {
+                          //we probably dont need to actively recover from here
+                      }
+                        
+                      cursor.moveNext();
+                      i++;
+                    } 
+                }
+            }
+        }
+        
+        super.commitProperties();
+    }
+ */
+    /**
+     *  Calculates the preferred width and height of the MenuBar based on the
+     *  default widths of the MenuBar items. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */
+    /* override protected function measure():void
+    {
+        super.measure();
+
+        var len:int = menuBarItems.length;
+
+        measuredWidth = 0;
+
+        // measured height is at least 22
+        measuredHeight = DEFAULT_MEASURED_MIN_HEIGHT; 
+        for (var i:int = 0; i < len; i++)
+        {
+            measuredWidth += menuBarItems[i].getExplicitOrMeasuredWidth();
+            measuredHeight = Math.max(
+                    measuredHeight, menuBarItems[i].getExplicitOrMeasuredHeight());
+        }
+
+        if (len > 0)
+            measuredWidth += 2 * MARGIN_WIDTH;
+        else // else give it a default width, MARGIN_WIDTH = 10.
+            measuredWidth = DEFAULT_MEASURED_MIN_WIDTH; // setting it slightly more than the width
+
+        measuredMinWidth = measuredWidth;
+        measuredMinHeight = measuredHeight;
+    } */
+
+    /**
+     *  @private
+     *  Sizes and positions the items on the MenuBar.
+     */
+    /* override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var lastX:Number = MARGIN_WIDTH;
+        var lastW:Number = 0;
+        var len:int = menuBarItems.length;
+
+        var clipContent:Boolean = false;
+        var hideItems:Boolean = (unscaledWidth == 0 || unscaledHeight == 0);
+
+        for (var i:int = 0; i < len; i++)
+        {
+            var item:IMenuBarItemRenderer = menuBarItems[i];
+
+            item.setActualSize(item.getExplicitOrMeasuredWidth(), unscaledHeight);
+            item.visible = !hideItems;
+
+            lastX = item.x = lastX+lastW;
+            lastW = item.width;
+
+            if (!hideItems &&
+                (item.getExplicitOrMeasuredHeight() > unscaledHeight ||
+                 (lastX + lastW) > unscaledWidth))
+            {
+                clipContent = true;
+            }
+        }
+
+        if (background)
+        {
+            background.setActualSize(unscaledWidth, unscaledHeight);
+            background.visible = !hideItems;
+        }
+
+        // Set a scroll rect to handle clipping.
+        scrollRect = clipContent ? new Rectangle(0, 0,
+                unscaledWidth, unscaledHeight) : null;
+    } */
+
+    //------------------------------------------------------------------------
+    //  Focus handling
+    //------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* override protected function focusInHandler(event:FocusEvent):void
+    {
+        super.focusInHandler(event);
+    } */
+
+    /**
+     *  @private
+     */
+    /* override protected function focusOutHandler(event:FocusEvent):void
+    {
+        super.focusOutHandler(event);
+        
+        if (supposedToLoseFocus)
+            getMenuAt(openMenuIndex).hide();
+        
+        supposedToLoseFocus = false;
+    } */
+
+    //------------------------------------------------------------------------
+    //  Support for setStyle
+    //------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    /* override public function styleChanged(styleProp:String):void
+    {
+        var i:int;
+        super.styleChanged(styleProp);
+
+        for (i = 0; i < menuBarItems.length; i++)
+        {
+            getMenuAt(i).styleChanged(styleProp);
+        }
+
+        if (!styleProp || styleProp == "" || styleProp == "backgroundSkin")
+        {
+            updateBackground();
+        }
+        
+        if (styleProp == null ||
+            styleProp == "styleName" ||
+            styleProp == "menuStyleName")
+        {
+            var menuStyleName:String = getStyle("menuStyleName");
+            var m:Menu;
+            if (menuStyleName)
+            {
+                for (i = 0; i < menus.length; i++)
+                {
+                    m = menus[i];
+                    m.styleName = menuStyleName;
+                }
+            }
+        }
+    } */
+
+    /**
+     *  @private
+     */
+    /* override public function notifyStyleChangeInChildren(
+                                styleProp:String,
+                                recursive:Boolean):void
+    {
+        super.notifyStyleChangeInChildren(styleProp, recursive);
+
+        for (var i:int = 0; i < menuBarItems.length; i++)
+        {
+            getMenuAt(i).notifyStyleChangeInChildren(styleProp, recursive);
+        }
+    } */
+
+    //------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //------------------------------------------------------------------------
+
+    /**
+     *  @private

  (This diff was longer than 20,000 lines, and has been truncated...)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services