flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/feature/chart-work] - Changed class structure and cleaned up code.
Date Thu, 30 Mar 2017 20:52:04 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/chart-work bfe9baa0d -> dc2a1a283


Changed class structure and cleaned up code.


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

Branch: refs/heads/feature/chart-work
Commit: dc2a1a2839a4914cc28e0073dc42c74ec91adef2
Parents: bfe9baa
Author: Peter Ent <pent@apache.org>
Authored: Thu Mar 30 16:52:02 2017 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Thu Mar 30 16:52:02 2017 -0400

----------------------------------------------------------------------
 .../flex/org/apache/flex/core/ContainerBase.as  |  12 +-
 .../org/apache/flex/core/DataContainerBase.as   | 194 +------------------
 .../main/flex/org/apache/flex/core/GroupBase.as |  82 ++++----
 .../src/main/flex/org/apache/flex/core/View.as  |  88 +++++++++
 .../main/flex/org/apache/flex/html/Container.as |  80 +++++++-
 .../flex/org/apache/flex/html/DataContainer.as  |  16 --
 .../src/main/flex/org/apache/flex/html/Group.as |  85 +++++++-
 7 files changed, 302 insertions(+), 255 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc2a1a28/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/ContainerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/ContainerBase.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/ContainerBase.as
index c5cbe03..7f0be01 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/ContainerBase.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/ContainerBase.as
@@ -56,16 +56,6 @@ package org.apache.flex.core
      */
     [Event(name="childrenAdded", type="org.apache.flex.events.Event")]
     
-	/**
-	 * Indicates that the default property of the Container is MXML elements.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-	 */
-	[DefaultProperty("mxmlContent")]
-    
     /**
      *  The ContainerBase class is the base class for most containers
      *  in FlexJS.  It is usable as the root tag of MXML
@@ -177,6 +167,8 @@ package org.apache.flex.core
 		}
 
 		/*
+		 * IStrandPrivate
+		 *
 		 * These "internal" function provide a backdoor way for proxy classes to
 		 * operate directly at strand level. While these function are available on
 		 * both SWF and JS platforms, they really only have meaning on the SWF-side. 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc2a1a28/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/DataContainerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/DataContainerBase.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/DataContainerBase.as
index c73a403..ef6ade7 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/DataContainerBase.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/DataContainerBase.as
@@ -18,8 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-	import org.apache.flex.core.IMXMLDocument;
-	import org.apache.flex.core.IContainer;
 	import org.apache.flex.core.IParent;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
@@ -28,7 +26,6 @@ package org.apache.flex.core
 	import org.apache.flex.events.ItemRemovedEvent;
 	import org.apache.flex.events.ValueChangeEvent;
 	import org.apache.flex.states.State;
-	import org.apache.flex.utils.MXMLDataInterpreter;
 	import org.apache.flex.html.supportClasses.DataItemRenderer;
 	
 	/**
@@ -50,7 +47,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class DataContainerBase extends UIBase implements ILayoutParent, ILayoutView, IItemRendererParent,
IContentViewHost, IContainer, IParent, IStrandPrivate
+	public class DataContainerBase extends ContainerBase implements IItemRendererParent, IParent
 	{
         /**
          *  Constructor.
@@ -67,52 +64,33 @@ package org.apache.flex.core
 			addEventListener("beadsAdded", beadsAddedHandler);
 		}
 		
+		/*
+		* UIBase
+		*/
+		
 		/**
 		 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
 		 */
 		COMPILE::JS
 		override protected function createElement():WrappedHTMLElement
 		{
-			element = document.createElement('div') as WrappedHTMLElement;
-			element.flexjs_wrapper = this;
-			
-			positioner = element;
+			super.createElement();
+			className = 'DataContainer';
 			
 			return element;
 		}
 		
-		private var _strandChildren:ContainerBaseStrandChildren;
-		
-		/**
-		 * @private
-		 */
-		public function get strandChildren():IParent
-		{
-			if (_strandChildren == null) {
-				_strandChildren = new ContainerBaseStrandChildren(this);
-			}
-			return _strandChildren;
-		}
-		
-		/**
-		 *  @private
-		 */
-		public function childrenAdded():void
-		{
-			dispatchEvent(new Event("childrenAdded"));
-		}
-		
-		private var _initialized:Boolean;
+		private var _DCinitialized:Boolean;
 		
 		/**
 		 * @private
 		 */
 		override public function addedToParent():void
 		{
-			if (!_initialized)
+			if (!_DCinitialized)
 			{
-				// each MXML file can also have styles in fx:Style block
 				ValuesManager.valuesImpl.init(this);
+				_DCinitialized = true;
 			}
 			
 			super.addedToParent();
@@ -138,91 +116,6 @@ package org.apache.flex.core
 			}
 		}
 		
-		/**
-		 * Returns the ILayoutHost which is its view. From ILayoutParent.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.8
-		 */
-		public function getLayoutHost():ILayoutHost
-		{
-			return view as ILayoutHost; 
-		}
-		
-		/*
-		* The following functions are for the SWF-side only and re-direct element functions
-		* to the content area, enabling scrolling and clipping which are provided automatically
-		* in the JS-side.
-		*/
-		
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		override public function addElement(c:IChild, dispatchEvent:Boolean = true):void
-		{
-			var layoutHost:ILayoutHost = view as ILayoutHost;
-			var contentView:IParent = layoutHost.contentView as IParent;
-			contentView.addElement(c, dispatchEvent);
-		}
-		
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		override public function addElementAt(c:IChild, index:int, dispatchEvent:Boolean = true):void
-		{
-			var layoutHost:ILayoutHost = view as ILayoutHost;
-			var contentView:IParent = layoutHost.contentView as IParent;
-			contentView.addElementAt(c, index, dispatchEvent);
-		}
-		
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		override public function getElementIndex(c:IChild):int
-		{
-			var layoutHost:ILayoutHost = view as ILayoutHost;
-			var contentView:IParent = layoutHost.contentView as IParent;
-			return contentView.getElementIndex(c);
-		}
-		
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		override public function removeElement(c:IChild, dispatchEvent:Boolean = true):void
-		{
-			var layoutHost:ILayoutHost = view as ILayoutHost;
-			var contentView:IParent = layoutHost.contentView as IParent;
-			contentView.removeElement(c, dispatchEvent);
-		}
-		
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		override public function get numElements():int
-		{
-			var layoutHost:ILayoutHost = view as ILayoutHost;
-			var contentView:IParent = layoutHost.contentView as IParent;
-			return contentView.numElements;
-		}
-		
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		override public function getElementAt(index:int):IChild
-		{
-			var layoutHost:ILayoutHost = view as ILayoutHost;
-			var contentView:IParent = layoutHost.contentView as IParent;
-			return contentView.getElementAt(index);
-		}
-		
 		/*
 		* IItemRendererParent
 		*/
@@ -317,73 +210,6 @@ package org.apache.flex.core
 				}
 			}
 		}
-		
-		/*
-		* These "internal" function provide a backdoor way for proxy classes to
-		* operate directly at strand level. While these function are available on
-		* both SWF and JS platforms, they really only have meaning on the SWF-side. 
-		* Other subclasses may provide use on the JS-side.
-		*/
-		
-		/**
-		 * @private
-		 * @suppress {undefinedNames}
-		 * Support strandChildren.
-		 */
-		public function $numElements():int
-		{
-			return super.numElements;
-		}
-		
-		/**
-		 * @private
-		 * @suppress {undefinedNames}
-		 * Support strandChildren.
-		 */
-		public function $addElement(c:IChild, dispatchEvent:Boolean = true):void
-		{
-			super.addElement(c, dispatchEvent);
-		}
-		
-		/**
-		 * @private
-		 * @suppress {undefinedNames}
-		 * Support strandChildren.
-		 */
-		public function $addElementAt(c:IChild, index:int, dispatchEvent:Boolean = true):void
-		{
-			super.addElementAt(c, index, dispatchEvent);
-		}
-		
-		/**
-		 * @private
-		 * @suppress {undefinedNames}
-		 * Support strandChildren.
-		 */
-		public function $removeElement(c:IChild, dispatchEvent:Boolean = true):void
-		{
-			super.removeElement(c, dispatchEvent);
-		}
-		
-		/**
-		 * @private
-		 * @suppress {undefinedNames}
-		 * Support strandChildren.
-		 */
-		public function $getElementIndex(c:IChild):int
-		{
-			return super.getElementIndex(c);
-		}
-		
-		/**
-		 * @private
-		 * @suppress {undefinedNames}
-		 * Support strandChildren.
-		 */
-		public function $getElementAt(index:int):IChild
-		{
-			return super.getElementAt(index);
-		}
 
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc2a1a28/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as
index 4498aa4..88c7899 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-	import org.apache.flex.core.IMXMLDocument;
+//	import org.apache.flex.core.IMXMLDocument;
 	import org.apache.flex.core.IContentViewHost;
 	import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.ILayoutHost;
@@ -67,7 +67,7 @@ package org.apache.flex.core
 	 * The default property uses when additional MXML content appears within an element's
 	 * definition in an MXML file.
 	 */
-	[DefaultProperty("mxmlContent")]
+//	[DefaultProperty("mxmlContent")]
     
     /**
      *  The GroupBase class is the base class for most simple containers
@@ -79,7 +79,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.8
      */
-	public class GroupBase extends UIBase implements IMXMLDocument, IStatesObject, ILayoutParent,
ILayoutView, IContentViewHost
+	public class GroupBase extends UIBase implements IStatesObject, ILayoutParent, ILayoutView,
IContentViewHost
 	{
         /**
          *  Constructor.
@@ -119,27 +119,27 @@ package org.apache.flex.core
 		/**
 		 * @private
 		 */
-		override public function addedToParent():void
-		{
-			if (!_initialized)
-			{
-				// each MXML file can also have styles in fx:Style block
-				ValuesManager.valuesImpl.init(this);
-			}
-			
-			super.addedToParent();
-			
-			if (!_initialized)
-			{
-				MXMLDataInterpreter.generateMXMLInstances(_mxmlDocument, this, MXMLDescriptor);
-				
-				dispatchEvent(new Event("initBindings"));
-				dispatchEvent(new Event("initComplete"));
-				_initialized = true;
-				
-				childrenAdded();
-			}
-		}
+//		override public function addedToParent():void
+//		{
+//			if (!_initialized)
+//			{
+//				// each MXML file can also have styles in fx:Style block
+//				ValuesManager.valuesImpl.init(this);
+//			}
+//			
+//			super.addedToParent();
+//			
+//			if (!_initialized)
+//			{
+//				MXMLDataInterpreter.generateMXMLInstances(_mxmlDocument, this, MXMLDescriptor);
+//				
+//				dispatchEvent(new Event("initBindings"));
+//				dispatchEvent(new Event("initComplete"));
+//				_initialized = true;
+//				
+//				childrenAdded();
+//			}
+//		}
 		
 		/**
 		 * Returns the ILayoutHost which is its view. From ILayoutParent.
@@ -167,9 +167,9 @@ package org.apache.flex.core
 			return this;
 		}
 
-        private var _mxmlDescriptor:Array;
-        private var _mxmlDocument:Object = this;
-        private var _initialized:Boolean;
+//        private var _mxmlDescriptor:Array;
+//        private var _mxmlDocument:Object = this;
+//        private var _initialized:Boolean;
         
         /**
          *  @copy org.apache.flex.core.Application#MXMLDescriptor
@@ -179,19 +179,19 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-		public function get MXMLDescriptor():Array
-		{
-			return _mxmlDescriptor;
-		}
+//		public function get MXMLDescriptor():Array
+//		{
+//			return _mxmlDescriptor;
+//		}
 
         /**
          *  @private
          */
-        public function setMXMLDescriptor(document:Object, value:Array):void
-        {
-            _mxmlDocument = document;
-            _mxmlDescriptor = value;
-        }
+//        public function setMXMLDescriptor(document:Object, value:Array):void
+//        {
+//            _mxmlDocument = document;
+//            _mxmlDescriptor = value;
+//        }
 
         /**
          *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
@@ -201,10 +201,10 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-		public function generateMXMLAttributes(data:Array):void
-		{
-            MXMLDataInterpreter.generateMXMLProperties(this, data);
-		}
+//		public function generateMXMLAttributes(data:Array):void
+//		{
+//            MXMLDataInterpreter.generateMXMLProperties(this, data);
+//		}
 		
         /**
          *  @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
@@ -214,7 +214,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-		public var mxmlContent:Array;
+//		public var mxmlContent:Array;
 		
         private var _states:Array;
         

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc2a1a28/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/View.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/View.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/View.as
index 453a1d6..4f083b4 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/View.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/View.as
@@ -18,6 +18,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {    	
+	import org.apache.flex.core.IMXMLDocument;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.utils.MXMLDataInterpreter;
+	
+	/**
+	 * The default property uses when additional MXML content appears within an element's
+	 * definition in an MXML file.
+	 */
+	[DefaultProperty("mxmlContent")]
+	
     /**
      *  The View class is the class for most views in a FlexJS
      *  application.  It is generally used as the root tag of MXML
@@ -30,6 +41,83 @@ package org.apache.flex.core
      */
 	public class View extends ViewBase
 	{		
+		public function View()
+		{
+			super();
+		}
 		
+		private var _mxmlDescriptor:Array;
+		private var _mxmlDocument:Object = this;
+		private var _initialized:Boolean;
+		
+		/**
+		 * @private
+		 */
+		override public function addedToParent():void
+		{
+			if (!_initialized)
+			{
+				// each MXML file can also have styles in fx:Style block
+				ValuesManager.valuesImpl.init(this);
+			}
+			
+			super.addedToParent();
+			
+			if (!_initialized)
+			{
+				MXMLDataInterpreter.generateMXMLInstances(_mxmlDocument, this, MXMLDescriptor);
+				
+				dispatchEvent(new Event("initBindings"));
+				dispatchEvent(new Event("initComplete"));
+				_initialized = true;
+				
+				childrenAdded();
+			}
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.Application#MXMLDescriptor
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function get MXMLDescriptor():Array
+		{
+			return _mxmlDescriptor;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function setMXMLDescriptor(document:Object, value:Array):void
+		{
+			_mxmlDocument = document;
+			_mxmlDescriptor = value;
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function generateMXMLAttributes(data:Array):void
+		{
+			MXMLDataInterpreter.generateMXMLProperties(this, data);
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public var mxmlContent:Array;
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc2a1a28/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Container.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Container.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Container.as
index 512c3c7..20e362d 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Container.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Container.as
@@ -20,6 +20,10 @@ package org.apache.flex.html
 {
 	import org.apache.flex.core.IContainer;
 	import org.apache.flex.core.ContainerBase;
+	import org.apache.flex.core.IMXMLDocument;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.utils.MXMLDataInterpreter;
 
 	
     /**
@@ -58,7 +62,7 @@ package org.apache.flex.html
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */    
-	public class Container extends ContainerBase implements IContainer
+	public class Container extends ContainerBase implements IMXMLDocument, IContainer
 	{
         /**
          *  Constructor.
@@ -72,5 +76,79 @@ package org.apache.flex.html
 		{
 			super();
 		}
+		
+		private var _mxmlDescriptor:Array;
+		private var _mxmlDocument:Object = this;
+		private var _initialized:Boolean;
+		
+		/**
+		 * @private
+		 */
+		override public function addedToParent():void
+		{
+			if (!_initialized)
+			{
+				// each MXML file can also have styles in fx:Style block
+				ValuesManager.valuesImpl.init(this);
+			}
+			
+			super.addedToParent();
+			
+			if (!_initialized)
+			{
+				MXMLDataInterpreter.generateMXMLInstances(_mxmlDocument, this, MXMLDescriptor);
+				
+				dispatchEvent(new Event("initBindings"));
+				dispatchEvent(new Event("initComplete"));
+				_initialized = true;
+				
+				childrenAdded();
+			}
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.Application#MXMLDescriptor
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function get MXMLDescriptor():Array
+		{
+			return _mxmlDescriptor;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function setMXMLDescriptor(document:Object, value:Array):void
+		{
+			_mxmlDocument = document;
+			_mxmlDescriptor = value;
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function generateMXMLAttributes(data:Array):void
+		{
+			MXMLDataInterpreter.generateMXMLProperties(this, data);
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public var mxmlContent:Array;
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc2a1a28/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/DataContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/DataContainer.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/DataContainer.as
index 3ae7983..ec74e3b 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/DataContainer.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/DataContainer.as
@@ -204,21 +204,5 @@ package org.apache.flex.html
 
 				return result;
 		}
-
-		/*
-		 * UIBase
-		 */
-
-        /**
-         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-         */
-        COMPILE::JS
-        override protected function createElement():WrappedHTMLElement
-        {
-            super.createElement();
-            className = 'DataContainer';
-
-            return element;
-        }
    	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc2a1a28/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Group.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Group.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Group.as
index 447a185..2825f43 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Group.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Group.as
@@ -18,7 +18,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html
 {
+	import org.apache.flex.core.IMXMLDocument;
 	import org.apache.flex.core.GroupBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.utils.MXMLDataInterpreter;
 
 	/**
 	 *  Indicates that the children of the container is have been added.
@@ -29,9 +33,10 @@ package org.apache.flex.html
 	 *  @productversion FlexJS 0.8
 	 */
 	[Event(name="childrenAdded", type="org.apache.flex.events.Event")]
-
+	
 	/**
-	 * Default property
+	 * The default property uses when additional MXML content appears within an element's
+	 * definition in an MXML file.
 	 */
 	[DefaultProperty("mxmlContent")]
 
@@ -48,7 +53,7 @@ package org.apache.flex.html
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.8
      */
-	public class Group extends GroupBase
+	public class Group extends GroupBase implements IMXMLDocument
 	{
         /**
          *  Constructor.
@@ -62,5 +67,79 @@ package org.apache.flex.html
 		{
 			super();
 		}
+		
+		private var _mxmlDescriptor:Array;
+		private var _mxmlDocument:Object = this;
+		private var _initialized:Boolean;
+		
+		/**
+		 * @private
+		 */
+		override public function addedToParent():void
+		{
+			if (!_initialized)
+			{
+				// each MXML file can also have styles in fx:Style block
+				ValuesManager.valuesImpl.init(this);
+			}
+			
+			super.addedToParent();
+			
+			if (!_initialized)
+			{
+				MXMLDataInterpreter.generateMXMLInstances(_mxmlDocument, this, MXMLDescriptor);
+				
+				dispatchEvent(new Event("initBindings"));
+				dispatchEvent(new Event("initComplete"));
+				_initialized = true;
+				
+				childrenAdded();
+			}
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.Application#MXMLDescriptor
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function get MXMLDescriptor():Array
+		{
+			return _mxmlDescriptor;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function setMXMLDescriptor(document:Object, value:Array):void
+		{
+			_mxmlDocument = document;
+			_mxmlDescriptor = value;
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function generateMXMLAttributes(data:Array):void
+		{
+			MXMLDataInterpreter.generateMXMLProperties(this, data);
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public var mxmlContent:Array;
 	}
 }


Mime
View raw message