flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject [1/6] git commit: [flex-asjs] [refs/heads/feature/chart-work] - Intermediate checkin.
Date Wed, 29 Mar 2017 21:26:17 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/chart-work [created] 3b9d4368b


Intermediate checkin.


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

Branch: refs/heads/feature/chart-work
Commit: 0edc16cd35ecf4b18c7408afca3422e70905d15b
Parents: d1d2754
Author: Peter Ent <pent@apache.org>
Authored: Mon Mar 27 12:08:18 2017 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Mon Mar 27 12:08:18 2017 -0400

----------------------------------------------------------------------
 .../Charts/src/main/flex/ChartsClasses.as       |  22 ++--
 .../org/apache/flex/charts/beads/ChartView.as   | 111 +++++++++++++------
 .../charts/beads/layouts/ChartBaseLayout.as     |   6 +-
 .../org/apache/flex/charts/core/ChartBase.as    |  28 ++++-
 .../apache/flex/charts/core/IChartDataGroup.as  |   3 +-
 .../charts/supportClasses/ChartDataGroup.as     |  15 ++-
 .../flex/org/apache/flex/html/DataContainer.as  |   4 +-
 .../apache/flex/html/beads/DataContainerView.as |   4 +-
 .../flex/html/supportClasses/DataGroup.as       | 100 ++++++++++-------
 .../HTML/src/main/resources/defaults.css        |  12 +-
 10 files changed, 200 insertions(+), 105 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/frameworks/projects/Charts/src/main/flex/ChartsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/ChartsClasses.as b/frameworks/projects/Charts/src/main/flex/ChartsClasses.as
index 79de855..4d89dde 100644
--- a/frameworks/projects/Charts/src/main/flex/ChartsClasses.as
+++ b/frameworks/projects/Charts/src/main/flex/ChartsClasses.as
@@ -59,17 +59,17 @@ internal class ChartsClasses
 	import org.apache.flex.charts.beads.VerticalLinearAxisForArrayListBead; VerticalLinearAxisForArrayListBead;
 	import org.apache.flex.charts.beads.controllers.ChartSeriesMouseController; ChartSeriesMouseController;
 	import org.apache.flex.charts.beads.layouts.BarChartLayout; BarChartLayout;
-	import org.apache.flex.charts.beads.layouts.BarChartLayoutForArrayList; BarChartLayoutForArrayList;
-	import org.apache.flex.charts.beads.layouts.ColumnChartLayout; ColumnChartLayout;
-	import org.apache.flex.charts.beads.layouts.ColumnChartLayoutForArrayList; ColumnChartLayoutForArrayList;
-	import org.apache.flex.charts.beads.layouts.LineChartCategoryVsLinearLayout; LineChartCategoryVsLinearLayout;
-	import org.apache.flex.charts.beads.layouts.LineChartLinearVsLinearLayout; LineChartLinearVsLinearLayout;
-	import org.apache.flex.charts.beads.layouts.PieChartLayout; PieChartLayout;
-	import org.apache.flex.charts.beads.layouts.PieChartLayoutForArrayList; PieChartLayoutForArrayList;
-	import org.apache.flex.charts.beads.layouts.StackedBarChartLayout; StackedBarChartLayout;
-	import org.apache.flex.charts.beads.layouts.StackedBarChartLayoutForArrayList; StackedBarChartLayoutForArrayList;
-	import org.apache.flex.charts.beads.layouts.StackedColumnChartLayout; StackedColumnChartLayout;
-	import org.apache.flex.charts.beads.layouts.StackedColumnChartLayoutForArrayList; StackedColumnChartLayoutForArrayList;
+//	import org.apache.flex.charts.beads.layouts.BarChartLayoutForArrayList; BarChartLayoutForArrayList;
+//	import org.apache.flex.charts.beads.layouts.ColumnChartLayout; ColumnChartLayout;
+//	import org.apache.flex.charts.beads.layouts.ColumnChartLayoutForArrayList; ColumnChartLayoutForArrayList;
+//	import org.apache.flex.charts.beads.layouts.LineChartCategoryVsLinearLayout; LineChartCategoryVsLinearLayout;
+//	import org.apache.flex.charts.beads.layouts.LineChartLinearVsLinearLayout; LineChartLinearVsLinearLayout;
+//	import org.apache.flex.charts.beads.layouts.PieChartLayout; PieChartLayout;
+//	import org.apache.flex.charts.beads.layouts.PieChartLayoutForArrayList; PieChartLayoutForArrayList;
+//	import org.apache.flex.charts.beads.layouts.StackedBarChartLayout; StackedBarChartLayout;
+//	import org.apache.flex.charts.beads.layouts.StackedBarChartLayoutForArrayList; StackedBarChartLayoutForArrayList;
+//	import org.apache.flex.charts.beads.layouts.StackedColumnChartLayout; StackedColumnChartLayout;
+//	import org.apache.flex.charts.beads.layouts.StackedColumnChartLayoutForArrayList; StackedColumnChartLayoutForArrayList;
 	import org.apache.flex.charts.beads.models.ChartArraySelectionModel; ChartArraySelectionModel;
 	import org.apache.flex.charts.beads.models.ChartArrayListSelectionModel; ChartArrayListSelectionModel;
 	import org.apache.flex.charts.supportClasses.BarSeries; BarSeries;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
index dcdf5cc..c26f22c 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
@@ -21,27 +21,31 @@ package org.apache.flex.charts.beads
 	import org.apache.flex.charts.core.IAxisGroup;
 	import org.apache.flex.charts.core.IHorizontalAxisBead;
 	import org.apache.flex.charts.core.IVerticalAxisBead;
+	import org.apache.flex.charts.core.IChartDataGroup;
 	import org.apache.flex.charts.core.IChartSeries;
 	import org.apache.flex.charts.core.IChartDataModel;
 	import org.apache.flex.charts.supportClasses.ChartDataGroup;
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IParent;
+	import org.apache.flex.core.IChild;
+	import org.apache.flex.core.ILayoutView;
+	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.IRollOverModel;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.ISelectableItemRenderer;
 	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.IViewport;
-	import org.apache.flex.core.IViewportModel;
+//	import org.apache.flex.core.IViewport;
+//	import org.apache.flex.core.IViewportModel;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
     import org.apache.flex.geom.Rectangle;
     import org.apache.flex.geom.Size;
-	import org.apache.flex.html.beads.ListView;
-	import org.apache.flex.html.beads.models.ViewportModel;
-	import org.apache.flex.html.supportClasses.Viewport;
+	import org.apache.flex.html.beads.GroupView;
+//	import org.apache.flex.html.beads.models.ViewportModel;
+//	import org.apache.flex.html.supportClasses.Viewport;
 	import org.apache.flex.utils.CSSContainerUtils;
 	
 	/**
@@ -53,7 +57,7 @@ package org.apache.flex.charts.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class ChartView extends ListView implements IBeadView
+	public class ChartView extends GroupView implements IBeadView
 	{
 		/**
 		 *  Constructor
@@ -68,6 +72,8 @@ package org.apache.flex.charts.beads
 			super();
 		}
 		
+		protected var dataModel:IChartDataModel;
+		
 		private var _horizontalAxisGroup:IAxisGroup;
 		private var _verticalAxisGroup:IAxisGroup;
 		
@@ -81,11 +87,28 @@ package org.apache.flex.charts.beads
 		 */
 		override public function set strand(value:IStrand):void
 		{
+			super.strand = value;
+			
 			_strand = value;
-						
-			var listModel:IChartDataModel = _strand.getBeadByType(IChartDataModel) as IChartDataModel;
-			listModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
+		}
+		
+		/**
+		 * @private
+		 */
+		override protected function completeSetup():void
+		{	
+			super.completeSetup();
+		}
+		
+		override protected function beadsAddedHandler(event:Event):void
+		{
+			super.beadsAddedHandler(event);
+			
+			dataModel = _strand.getBeadByType(IChartDataModel) as IChartDataModel;
+			dataModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
 			
+			IParent(_strand).addElement(dataGroup as IChild, false);
+						
 			var haxis:IHorizontalAxisBead = _strand.getBeadByType(IHorizontalAxisBead) as IHorizontalAxisBead;
 			if (haxis && _horizontalAxisGroup == null) {
 				var m1:Class = ValuesManager.valuesImpl.getValue(_strand, "iHorizontalAxisGroup");
@@ -103,20 +126,28 @@ package org.apache.flex.charts.beads
 				UIBase(_verticalAxisGroup).className = "VerticalAxis";
 				IParent(_strand).addElement(_verticalAxisGroup, false);
 			}
-			
-			super.strand = value;
 		}
 		
+		override public function get contentView():ILayoutView
+		{
+			return dataGroup as ILayoutView;
+		}
+		
+		private var _chartDataGroup:IChartDataGroup;
+		
 		/**
-		 * @private
+		 * 
 		 */
-		override protected function completeSetup():void
+		public function get dataGroup():IItemRendererParent
 		{
-//			if (border) {
-//				IParent(_strand).removeElement(border);
-//			}
-					
-			super.completeSetup();
+			if (_chartDataGroup == null) {
+				// pull out of valuesManager
+				var c:Class = ValuesManager.valuesImpl.getValue(_strand, "iContentView");
+				if (c) {
+					_chartDataGroup = new c();
+				}
+			}
+			return _chartDataGroup;
 		}
 		
 		/**
@@ -148,7 +179,7 @@ package org.apache.flex.charts.beads
 		/**
 		 * @private
 		 */
-		override protected function dataProviderChangeHandler(event:Event):void
+		protected function dataProviderChangeHandler(event:Event):void
 		{
 			if (verticalAxisGroup) {
 				verticalAxisGroup.removeAllElements();
@@ -165,14 +196,7 @@ package org.apache.flex.charts.beads
 		 * ChartView overrides performLayout so that the exact area of the ChartDataGroup can
 		 * be calculated so the chart's layout algorithm knows precisely the dimensions of 
 		 * chart for its item renderers.
-		 */
-		COMPILE::JS
-		protected function layoutViewBeforeContentLayout():void
-		{
-			// to do
-		}
-		
-		COMPILE::SWF
+		 */		
 		override protected function layoutViewBeforeContentLayout():void
 		{			
 			var metrics:Rectangle = CSSContainerUtils.getBorderAndPaddingMetrics(_strand);
@@ -194,15 +218,28 @@ package org.apache.flex.charts.beads
 			var strandWidth:Number = UIBase(_strand).width;
 			var strandHeight:Number = UIBase(_strand).height;
 			
-            viewport.setPosition(widthAdjustment + metrics.left, metrics.top);
-			viewport.layoutViewportBeforeContentLayout(strandWidth - widthAdjustment - metrics.right
- metrics.left,
-                                                        strandHeight - heightAdjustment -
metrics.bottom - metrics.top);
+			var chartArea:UIBase = dataGroup as UIBase;
+			
+			chartArea.x = widthAdjustment + metrics.left;
+			chartArea.y = metrics.top;
+			chartArea.setWidthAndHeight(strandWidth - widthAdjustment - metrics.right - metrics.left,
+				strandHeight - heightAdjustment - metrics.bottom - metrics.top);
+			COMPILE::JS {
+				chartArea.element.style.position = "absolute";
+			}
+			
+//            viewport.setPosition(widthAdjustment + metrics.left, metrics.top);
+//			viewport.layoutViewportBeforeContentLayout(strandWidth - widthAdjustment - metrics.right
- metrics.left,
+//                                                        strandHeight - heightAdjustment
- metrics.bottom - metrics.top);
             
 			if (verticalAxisGroup) {
 				UIBase(verticalAxisGroup).x = metrics.left;
 				UIBase(verticalAxisGroup).y = metrics.top;
 				UIBase(verticalAxisGroup).width = widthAdjustment;
 				UIBase(verticalAxisGroup).height = strandHeight - heightAdjustment - metrics.bottom -
metrics.top;
+				COMPILE::JS {
+					verticalAxisGroup.element.style.position = "absolute";
+				}
 			}
 			
 			if (horizontalAxisGroup) {
@@ -210,6 +247,9 @@ package org.apache.flex.charts.beads
 				UIBase(horizontalAxisGroup).y = strandHeight - heightAdjustment - metrics.bottom;
 				UIBase(horizontalAxisGroup).width = strandWidth - widthAdjustment - metrics.left - metrics.right;
 				UIBase(horizontalAxisGroup).height = heightAdjustment;
+				COMPILE::JS {
+					horizontalAxisGroup.element.style.position = "absolute";
+				}
 			}
 		}
 		
@@ -221,7 +261,7 @@ package org.apache.flex.charts.beads
 		/**
 		 * @private
 		 */
-		override protected function selectionChangeHandler(event:Event):void
+		protected function selectionChangeHandler(event:Event):void
 		{
 			var model:IChartDataModel = event.currentTarget as IChartDataModel;
 			var chartDataGroup:ChartDataGroup = dataGroup as ChartDataGroup;
@@ -249,13 +289,18 @@ package org.apache.flex.charts.beads
 		/**
 		 * @private
 		 */
-		//protected var lastRollOverIndex:Number = -1;
+		protected var lastRollOverIndex:Number = -1;
+		
+		/**
+		 * @private
+		 */
+		protected var lastSelectedIndex:Number = -1
 		
 		/**
 		 * @private
 		 */
 		COMPILE::SWF
-		override protected function rollOverIndexChangeHandler(event:Event):void
+		protected function rollOverIndexChangeHandler(event:Event):void
 		{
 			var model:IChartDataModel = event.currentTarget as IChartDataModel;
 			var chartDataGroup:ChartDataGroup = dataGroup as ChartDataGroup;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
index 461887b..24760b4 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
@@ -79,7 +79,7 @@ package org.apache.flex.charts.beads.layouts
 		public function get horizontalAxisBead():IHorizontalAxisBead
 		{
 			if (_xAxis == null) {
-				if (chart.getBeadByType(IHorizontalAxisBead)) _xAxis = chart.getBeadByType(IHorizontalAxisBead)
as IHorizontalAxisBead;
+				if (_strand.getBeadByType(IHorizontalAxisBead)) _xAxis = _strand.getBeadByType(IHorizontalAxisBead)
as IHorizontalAxisBead;
 			}
 			return _xAxis;
 		}
@@ -97,7 +97,7 @@ package org.apache.flex.charts.beads.layouts
 		public function get verticalAxisBead():IVerticalAxisBead
 		{
 			if (_yAxis == null) {
-				if (chart.getBeadByType(IVerticalAxisBead)) _yAxis = chart.getBeadByType(IVerticalAxisBead)
as IVerticalAxisBead;
+				if (_strand.getBeadByType(IVerticalAxisBead)) _yAxis = _strand.getBeadByType(IVerticalAxisBead)
as IVerticalAxisBead;
 			}
 			return _yAxis;
 		}
@@ -116,7 +116,7 @@ package org.apache.flex.charts.beads.layouts
 		public function get chartDataGroup():IChartDataGroup
 		{
 			if (_chartDataGroup == null) {
-				var layoutParent:ILayoutHost = chart.getBeadByType(ILayoutHost) as ILayoutHost;
+				var layoutParent:ILayoutHost = _strand.getBeadByType(ILayoutHost) as ILayoutHost;
 				_chartDataGroup = layoutParent.contentView as IChartDataGroup;
 			}
 			return _chartDataGroup;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as
index 6fcb2fc..27961bf 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as
@@ -18,8 +18,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.charts.core
 {
-	import org.apache.flex.events.Event;
-	import org.apache.flex.html.List;
+	import org.apache.flex.charts.core.IChart;
+	import org.apache.flex.events.Event
 	
 	/**
 	 *  The ChartBase class contains all of the properties common to most
@@ -38,7 +38,7 @@ package org.apache.flex.charts.core
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class ChartBase extends List implements IChart
+	public class ChartBase extends List implements IChart 
 	{
 		/**
 		 *  constructor. 
@@ -46,7 +46,7 @@ package org.apache.flex.charts.core
 		 *  @langversion 3.0
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
+		 *  @productversion FlexJS 0.8
 		 */
 		public function ChartBase()
 		{
@@ -62,7 +62,7 @@ package org.apache.flex.charts.core
 		 *  @langversion 3.0
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
+		 *  @productversion FlexJS 0.8
 		 */
 		public function get series():Array
 		{
@@ -73,5 +73,23 @@ package org.apache.flex.charts.core
 			_series = value;
 			dispatchEvent(new Event("seriesChanged"));
 		}
+		
+		/*
+		 * IList
+		 */
+				
+		/**
+		*  @copy org.apache.flex.core.IList#dataGroup
+		* 
+		*  @langversion 3.0
+		*  @playerversion Flash 10.2
+		*  @playerversion AIR 2.6
+		*  @productversion FlexJS 0.8
+		*/
+//		public function get dataGroup():IItemRendererParent
+//		{
+//			var chartView:ChartView = view as ChartView;
+//			return chartView.contentView as IItemRendererParent;
+//		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as
index a63f89a..27ea143 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as
@@ -19,6 +19,7 @@
 package org.apache.flex.charts.core
 {
 	import org.apache.flex.core.IItemRendererParent;
+	import org.apache.flex.core.ILayoutView;
 	import org.apache.flex.geom.Point;
 
 	/**
@@ -30,7 +31,7 @@ package org.apache.flex.charts.core
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public interface IChartDataGroup extends IItemRendererParent
+	public interface IChartDataGroup extends IItemRendererParent, ILayoutView
 	{
 		/**
 		 *  Returns the itemRenderer that matches both the series and child index value.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartDataGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartDataGroup.as
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartDataGroup.as
index 41ac0bb..4cc911b 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartDataGroup.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartDataGroup.as
@@ -21,12 +21,13 @@ package org.apache.flex.charts.supportClasses
 	import org.apache.flex.charts.core.IChartDataGroup;
 	import org.apache.flex.charts.core.IChartItemRenderer;
 	import org.apache.flex.charts.core.IChartSeries;
-	import org.apache.flex.core.IUIBase;
-	import org.apache.flex.geom.Point;
-	import org.apache.flex.html.supportClasses.ContainerContentArea;
 	import org.apache.flex.core.IItemRenderer;
+	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.IChild;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.UIBase;
 	import org.apache.flex.html.supportClasses.DataItemRenderer;
+	import org.apache.flex.geom.Point;
 	
 	/**
 	 *  The ChartDataGroup class provides the actual space for rendering the
@@ -37,7 +38,7 @@ package org.apache.flex.charts.supportClasses
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class ChartDataGroup extends ContainerContentArea implements IChartDataGroup
+	public class ChartDataGroup extends UIBase implements IChartDataGroup
 	{
 		/**
 		 *  constructor.
@@ -52,6 +53,10 @@ package org.apache.flex.charts.supportClasses
 			super();
 		}
 		
+		/*
+		 * IChartDataGroup
+		 */
+		
 		/**
 		 *  Returns the itemRenderer that matches both the series and child index. A null return
is
 		 *  valid since some charts have optional itemRenderers for their series.
@@ -101,7 +106,7 @@ package org.apache.flex.charts.supportClasses
 		}
 		
 		/*
-		* IItemRendererParent
+		* IItemRendererParent (via IChartDataGroup)
 		*/
 		
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/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 c40800e..fba71a3 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
@@ -46,6 +46,7 @@ package org.apache.flex.html
 	import org.apache.flex.events.ItemClickedEvent;
 	import org.apache.flex.events.ItemRemovedEvent;
 	import org.apache.flex.html.beads.models.ListPresentationModel;
+	import org.apache.flex.html.beads.IListView;
 	import org.apache.flex.html.supportClasses.DataItemRenderer;
 
 	/**
@@ -158,7 +159,8 @@ package org.apache.flex.html
 		 */
 		public function get dataGroup():IItemRendererParent
 		{
-			return this;
+			//return this;
+			return (view as IListView).dataGroup;
 		}
 
 		private var _itemRenderer:IFactory;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataContainerView.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataContainerView.as
index de3587e..85cfab0 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataContainerView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataContainerView.as
@@ -66,7 +66,7 @@ package org.apache.flex.html.beads
 		
 		public function get dataGroup():IItemRendererParent
 		{
-			return (_strand as IList).dataGroup;
+			return super.contentView as IItemRendererParent;
 		}
 		
 		override protected function beadsAddedHandler(event:Event):void
@@ -157,7 +157,7 @@ package org.apache.flex.html.beads
 		 */
 		public function get dataGroup():IItemRendererParent
 		{
-			return (_strand as IList).dataGroup;
+			return super.contentView as IItemRendererParent;
 		}
 				
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGroup.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGroup.as
index 4b2aad1..76fdd3a 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGroup.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGroup.as
@@ -41,7 +41,7 @@ package org.apache.flex.html.supportClasses
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class DataGroup extends ContainerContentArea implements IContentView
+	public class DataGroup extends ContainerContentArea implements IItemRendererParent
 	{
         /**
          *  Constructor.
@@ -56,55 +56,87 @@ package org.apache.flex.html.supportClasses
 			super();
 		}
 		
+		/*
+		* IItemRendererParent
+		*/
+		
 		/**
+		 * @copy org.apache.flex.core.IItemRendererParent#addItemRenderer()
 		 * @private
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
 		 */
-		override public function addElement(c:IChild, dispatchEvent:Boolean = true):void
+		public function addItemRenderer(renderer:IItemRenderer):void
 		{
-			super.addElement(c, dispatchEvent);
+			addElement(renderer, true);
 			
 			var newEvent:ItemAddedEvent = new ItemAddedEvent("itemAdded");
-			newEvent.item = c;
+			newEvent.item = renderer;
 			
-			var strand:IEventDispatcher = parent as IEventDispatcher;
-			strand.dispatchEvent(newEvent);
+			dispatchEvent(newEvent);
 		}
 		
 		/**
+		 * @copy org.apache.flex.core.IItemRendererParent#removeItemRenderer()
 		 * @private
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
 		 */
-		override public function removeElement(c:IChild, dispatchEvent:Boolean = true):void
-		{	
-			super.removeElement(c, dispatchEvent);
+		public function removeItemRenderer(renderer:IItemRenderer):void
+		{
+			removeElement(renderer, true);
 			
 			var newEvent:ItemRemovedEvent = new ItemRemovedEvent("itemRemoved");
-			newEvent.item = c;
+			newEvent.item = renderer;
 			
-			var strand:IEventDispatcher = parent as IEventDispatcher;
-			strand.dispatchEvent(newEvent);
+			dispatchEvent(newEvent);
 		}
-
-        /**
-         *  @copy org.apache.flex.core.IItemRendererParent#getItemRendererForIndex()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function getItemRendererForIndex(index:int):IItemRenderer
-        {
+		
+		/**
+		 * @copy org.apache.flex.core.IItemRendererParent#removeAllItemRenderers()
+		 * @private
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function removeAllItemRenderers():void
+		{
+			while (numElements > 0) {
+				var child:IChild = getElementAt(0);
+				removeElement(child);
+			}
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.IItemRendererParent#getItemRendererForIndex()
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function getItemRendererForIndex(index:int):IItemRenderer
+		{
 			if (index < 0 || index >= numElements) return null;
-            return getElementAt(index) as IItemRenderer;
-        }
+			return getElementAt(index) as IItemRenderer;
+		}
 		
 		/**
 		 *  Refreshes the itemRenderers. Useful after a size change by the data group.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
+		 *
+		 *  @copy org.apache.flex.core.IItemRendererParent#updateAllItemRenderers()
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
 		 */
 		public function updateAllItemRenderers():void
 		{
@@ -118,13 +150,5 @@ package org.apache.flex.html.supportClasses
 				}
 			}
 		}
-		
-		/**
-		 * Removes all of the elements
-		 */
-		public function removeAllElements():void
-		{
-			// TBD
-		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0edc16cd/frameworks/projects/HTML/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/defaults.css b/frameworks/projects/HTML/src/main/resources/defaults.css
index e7f211d..73b58ec 100644
--- a/frameworks/projects/HTML/src/main/resources/defaults.css
+++ b/frameworks/projects/HTML/src/main/resources/defaults.css
@@ -562,7 +562,7 @@ global
 @media -flex-flash
 {
 	Accordion {
-		IContentView: ClassReference("org.apache.flex.html.supportClasses.ContainerContentArea");
+		IContentView: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
 	}
 	
 	Alert
@@ -589,7 +589,7 @@ global
 	
 	ButtonBar
 	{
-		IContentView: ClassReference("org.apache.flex.html.supportClasses.ContainerContentArea");
+		IContentView: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
 	}
 	
 	CheckBox
@@ -622,11 +622,11 @@ global
 	}
 	
 	DataContainer {
-		IContentView: ClassReference("org.apache.flex.html.supportClasses.ContainerContentArea");
+		IContentView: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
 	}
 	
 	DataGridButtonBar {
-		IContentView: ClassReference("org.apache.flex.html.supportClasses.ContainerContentArea");
+		IContentView: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
 	}
 	
 	DateChooserList {
@@ -704,7 +704,7 @@ global
 		iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
 		iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead');
 		iBorderModel: ClassReference('org.apache.flex.html.beads.models.SingleLineBorderModel');
-		IContentView: ClassReference("org.apache.flex.html.supportClasses.ContainerContentArea");
+		IContentView: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
 	}
 	
 	MultilineLabel
@@ -808,7 +808,7 @@ global
 	}
 	
 	Tree {
-		IContentView: ClassReference("org.apache.flex.html.supportClasses.ContainerContentArea");
+		IContentView: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
 	}
 	
 	/*


Mime
View raw message