flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject [1/3] git commit: [flex-asjs] [refs/heads/core_js_to_as] - Changed Charts project for as-to-js.
Date Mon, 09 Nov 2015 20:48:36 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/core_js_to_as cc53ad1ce -> af2be21d2


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/IWedgeItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/IWedgeItemRenderer.as
b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/IWedgeItemRenderer.as
new file mode 100644
index 0000000..ca3fe08
--- /dev/null
+++ b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/IWedgeItemRenderer.as
@@ -0,0 +1,113 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.supportClasses
+{
+	import org.apache.flex.charts.core.IChartItemRenderer;
+	import org.apache.flex.core.graphics.IFill;
+	import org.apache.flex.core.graphics.IStroke;
+
+	/**
+	 *  The IWedgeItemRenderer interface must be implemented by any class that
+	 *  is used as an itemRenderer for a PieSeries. 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public interface IWedgeItemRenderer extends IChartItemRenderer
+	{
+		/**
+		 *  The X coordinate of the center point of the pie. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function get centerX():Number;
+		function set centerX(value:Number):void;
+		
+		/**
+		 *  The Y coordinate of the center of the pie.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function get centerY():Number;
+		function set centerY(value:Number):void;
+		
+		/**
+		 *  The angle (radians) at which the wedge begins. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function get startAngle():Number;
+		function set startAngle(value:Number):void;
+		
+		/**
+		 *  The sweep (radians) of the wedge relative to the startAngle. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function get arc():Number;
+		function set arc(value:Number):void;
+		
+		/**
+		 *  The radius of the pie. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function get radius():Number;
+		function set radius(value:Number):void;
+		
+		/**
+		 *  The color of the wedge. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function get fill():IFill;
+		function set fill(value:IFill):void;
+		
+		/**
+		 *  The color of the outline of the wedge. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function get stroke():IStroke;
+		function set stroke(value:IStroke):void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
new file mode 100644
index 0000000..bff5a80
--- /dev/null
+++ b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
@@ -0,0 +1,198 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.supportClasses
+{	
+	import org.apache.flex.charts.core.IChartSeries;
+	import org.apache.flex.core.graphics.IStroke;
+	import org.apache.flex.core.graphics.Path;
+	import org.apache.flex.html.supportClasses.DataItemRenderer;
+	
+	/**
+	 *  The LineSegmentItemRenderer class draws a line between the vertices of a LineSeries.

+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class LineSegmentItemRenderer extends DataItemRenderer implements ILineSegmentItemRenderer
+	{
+		public function LineSegmentItemRenderer()
+		{
+			super();
+		}
+		
+		private var _series:IChartSeries;
+		
+		/**
+		 *  The series to which this itemRenderer instance belongs. Or, the series
+		 *  being presented.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get series():IChartSeries
+		{
+			return _series;
+		}
+		public function set series(value:IChartSeries):void
+		{
+			_series = value;
+		}
+				
+		private var _points:Array;
+		
+		/**
+		 *  The points of the vertices. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get points():Array
+		{
+			return _points;
+		}
+		public function set points(value:Array):void
+		{
+			_points = value;
+			drawLine();
+		}
+		
+		private var _stroke:IStroke;
+		
+		public function get stroke():IStroke
+		{
+			return _stroke;
+		}
+		public function set stroke(value:IStroke):void
+		{
+			_stroke = value;
+			drawLine();
+		}
+		
+		private var path:Path;
+		
+		/**
+		 *  @copy org.apache.flex.supportClasses.UIItemRendererBase#data
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		override public function set data(value:Object):void
+		{
+			super.data = value;	
+		}
+		override public function get data():Object
+		{
+			return super.data;
+		}
+		
+		/**
+		 *  The name of the field containing the value for the Y axis. This is not implemented
by this class.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get yField():String
+		{
+			return null;
+		}
+		public function set yField(value:String):void
+		{
+		}
+		
+		/**
+		 *  The name of the field containing the value for the X axis. This is not implemented
by this class.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get xField():String
+		{
+			return null;
+		}
+		public function set xField(value:String):void
+		{
+		}
+		
+		private var _fillColor:uint;
+		
+		/**
+		 *  The color used to fill the interior of the box.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get fillColor():uint
+		{
+			return _fillColor;
+		}
+		public function set fillColor(value:uint):void
+		{
+			_fillColor = value;
+		}
+		
+		/**
+		 *  @private
+		 */
+		protected function drawLine():void
+		{
+			var needsAddElement:Boolean = false;
+			
+			if (points != null)
+			{
+				if (path == null) {
+					path = new Path();
+					needsAddElement = true;
+				}
+				
+				path.stroke = stroke;
+				path.fill = null;
+				
+				var pathString:String = "";
+				
+				for (var i:int=0; i < points.length; i++) {
+					var point:Object = points[i];
+					if (i == 0) pathString += "M "+point.x+" "+point.y+" ";
+					else pathString += "L "+point.x+" "+point.y+" ";
+				}
+				
+				path.x = 0;
+				path.y = 0;
+				path.data = pathString;
+				
+				if (needsAddElement) {
+					addElement(path);
+				}
+			}
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/LineSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/LineSeries.as
b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/LineSeries.as
new file mode 100644
index 0000000..ca2b62a
--- /dev/null
+++ b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/LineSeries.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 org.apache.flex.charts.supportClasses
+{
+	import org.apache.flex.core.IFactory;
+	
+	import org.apache.flex.charts.core.IChartSeries;
+	
+	/**
+	 *  The LineChartSeries represents a pair of X and Y values to be drawn
+	 *  within a org.apache.flex.charts.LineChart. 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class LineSeries implements IChartSeries
+	{
+		public function LineSeries()
+		{
+		}
+		
+		private var _xField:String;
+		
+		/**
+		 *  The name of the field corresponding to the X or horizontal value
+		 *  for an item in the chart. 
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get xField():String
+		{
+			return _xField;
+		}
+		public function set xField(value:String):void
+		{
+			_xField = value;
+		}
+		
+		private var _yField:String;
+		
+		/**
+		 *  The name of the field that provides the Y or vertical value for an
+		 *  item in the chart.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get yField():String
+		{
+			return _yField;
+		}
+		public function set yField(value:String):void
+		{
+			_yField = value;
+		}
+		
+		private var _itemRenderer:IFactory;
+		
+		/**
+		 *  The class or class factory to use as the itemRenderer for each X/Y pair. The
+		 *  itemRenderer class must implement the IChartItemRenderer interface.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get itemRenderer():IFactory
+		{
+			return _itemRenderer;
+		}
+		public function set itemRenderer(value:IFactory):void
+		{
+			_itemRenderer = value;
+		}
+		
+		private var _lineSegmentRenderer:IFactory;
+		
+		/**
+		 * The class or class factory to use to render each segment of the series.
+		 */
+		public function get lineSegmentRenderer():IFactory
+		{
+			return _lineSegmentRenderer;
+		}
+		public function set lineSegmentRenderer(value:IFactory):void
+		{
+			_lineSegmentRenderer = value;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/PieSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/PieSeries.as
b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/PieSeries.as
new file mode 100644
index 0000000..f12df3b
--- /dev/null
+++ b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/PieSeries.as
@@ -0,0 +1,85 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.supportClasses
+{
+	import org.apache.flex.core.IFactory;
+	
+	import org.apache.flex.charts.core.IChartSeries;
+	
+	public class PieSeries implements IChartSeries
+	{
+		public function PieSeries()
+		{
+		}
+		
+		private var _dataField:String;
+		public function get dataField():String
+		{
+			return _dataField;
+		}
+		public function set dataField(value:String):void
+		{
+			_dataField = value;
+		}
+		
+		private var _itemRenderer:IFactory;
+		
+		/**
+		 *  The class or class factory to use as the itemRenderer for each X/Y pair. The
+		 *  itemRenderer class must implement the IChartItemRenderer interface.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get itemRenderer():IFactory
+		{
+			return _itemRenderer;
+		}
+		public function set itemRenderer(value:IFactory):void
+		{
+			_itemRenderer = value;
+		}
+		
+		// todo: fillColors - one color for each wedge which will be repeated if necessary
+		
+		/*
+		 * Properties ignored for PieChartSeries
+		 */
+		
+		public function get xField():String
+		{
+			return null;
+		}
+		
+		public function set xField(value:String):void
+		{
+		}
+		
+		public function get yField():String
+		{
+			return null;
+		}
+		
+		public function set yField(value:String):void
+		{
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
new file mode 100644
index 0000000..ca25fbd
--- /dev/null
+++ b/frameworks/projects/Charts/as/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
@@ -0,0 +1,272 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.supportClasses
+{	
+	import org.apache.flex.charts.core.IChartSeries;
+	import org.apache.flex.core.graphics.IFill;
+	import org.apache.flex.core.graphics.IStroke;
+	import org.apache.flex.core.graphics.Path;
+	import org.apache.flex.html.supportClasses.DataItemRenderer;
+	
+	/**
+	 *  The WedgeItemRenderer draws a single slide of a PieSeries. 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class WedgeItemRenderer extends DataItemRenderer implements IWedgeItemRenderer
+	{
+		public function WedgeItemRenderer()
+		{
+			super();
+		}
+		
+		private var _series:IChartSeries;
+		
+		/**
+		 *  The series to which this itemRenderer instance belongs. Or, the series
+		 *  being presented.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get series():IChartSeries
+		{
+			return _series;
+		}
+		public function set series(value:IChartSeries):void
+		{
+			_series = value;
+		}
+		
+		private var _centerX:Number;
+		
+		/**
+		 *  The X coordinate of the center of the pie. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get centerX():Number
+		{
+			return _centerX;
+		}
+		public function set centerX(value:Number):void
+		{
+			_centerX = value;
+			drawWedgeInternal();
+		}
+		
+		private var _centerY:Number;
+		
+		/**
+		 *  The Y coordinate of the center of the pie. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get centerY():Number
+		{
+			return _centerY;
+		}
+		public function set centerY(value:Number):void
+		{
+			_centerY = value;
+			drawWedgeInternal();
+		}
+		
+		private var _startAngle:Number;
+		
+		/**
+		 *  The starting angle (radians) of the wedge. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get startAngle():Number
+		{
+			return _startAngle;
+		}
+		public function set startAngle(value:Number):void
+		{
+			_startAngle = value;
+			drawWedgeInternal();
+		}
+		
+		private var _arc:Number;
+		
+		/**
+		 *  The sweep (radians) of the wedge, relative to the startAngle. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get arc():Number
+		{
+			return _arc;
+		}
+		public function set arc(value:Number):void
+		{
+			_arc = value;
+			drawWedgeInternal();
+		}
+		
+		private var _radius:Number;
+		
+		/**
+		 *  The radius of the pie. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get radius():Number
+		{
+			return _radius;
+		}
+		public function set radius(value:Number):void
+		{
+			_radius = value;
+			drawWedgeInternal();
+		}
+		
+		private var _fill:IFill;
+		
+		/**
+		 *  The color used to fill the interior of the box.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get fill():IFill
+		{
+			return _fill;
+		}
+		public function set fill(value:IFill):void
+		{
+			_fill = value;
+		}
+		
+		private var _stroke:IStroke;
+		
+		/**
+		 *  The outline of the box.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get stroke():IStroke
+		{
+			return _stroke;
+		}
+		public function set stroke(value:IStroke):void
+		{
+			_stroke = value;
+		}
+		
+		/**
+		 * @private
+		 */
+		private function drawWedgeInternal():void
+		{
+			if ( !isNaN(centerX) && !isNaN(centerY) && !isNaN(startAngle) &&
!isNaN(arc) && !isNaN(radius) ) {
+				drawWedge(centerX, centerY, startAngle, arc, radius, radius, false);
+			}
+		}
+		
+		/**
+		 * @private
+		 * 
+		 * Draw a wedge of a circle
+		 * @param graphics      the graphics object to draw into
+		 * @param x             the x center of the circle
+		 * @param y             the y center of the circle
+		 * @param startAngle    start angle (radians)
+		 * @param arc           sweep angle (radians)
+		 * @param radius        radius of the circle
+		 * @param yRadius       vertical radius (or radius if none given)
+		 * @param continueFlag  if true, uses a moveTo call to start drawing at the start point
of the circle; else continues drawing using only lineTo and curveTo
+		 * 
+		 */			
+		public function drawWedge(x:Number, y:Number,
+								  startAngle:Number, arc:Number,
+								  radius:Number, yRadius:Number = NaN,
+								  continueFlag:Boolean = false):void
+		{			
+			var x1:Number = x + radius * Math.cos(startAngle);
+			var y1:Number = y + radius * Math.sin(startAngle);
+			var x2:Number = x + radius * Math.cos(startAngle + arc);
+			var y2:Number = y + radius * Math.sin(startAngle + arc);
+			
+			var pathString:String = 'M' + x + ' ' + y + ' L' + x1 + ' ' + y1 + ' A' + radius + ' '
+ radius +
+				' 0 0 1 ' + x2 + ' ' + y2 + ' z';
+			
+			var path:Path = new Path();
+			path.fill = fill;
+			path.stroke = stroke;
+			path.x = 0;
+			path.y = 0;
+			path.data = pathString;
+			addElement(path);
+		}
+		
+		/*
+		 * Ignored by WedgeItemRenderer
+		 */
+		
+		/**
+		 * @private
+		 */
+		public function get xField():String
+		{
+			return null;
+		}
+		public function set xField(value:String):void
+		{
+		}
+		
+		/**
+		 * @private
+		 */
+		public function get yField():String
+		{
+			return null;
+		}
+		public function set yField(value:String):void
+		{
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/build.xml b/frameworks/projects/Charts/build.xml
index 5858654..630fe51 100644
--- a/frameworks/projects/Charts/build.xml
+++ b/frameworks/projects/Charts/build.xml
@@ -28,16 +28,11 @@
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
     <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
     <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
-    <property name="gjslint" value="gjslint" />
-    <property name="jshint" value="jshint" />
-    <condition property="no.lint" value="true">
-        <os family="windows"/>
-    </condition>
 
     <target name="main" depends="clean,compile,test" description="Clean build of Charts.swc">
     </target>
 
-    <target name="all" depends="main,compile-asjs,lint-js,test-js" description="Full build
of Charts.swc">
+    <target name="all" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test"
description="Full build of Charts.swc">
     </target>
 
     <target name="test" unless="is.jenkins">
@@ -46,12 +41,6 @@
          -->
     </target>
     
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
-         -->
-    </target>
-    
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
@@ -97,11 +86,13 @@
             <load-config filename="compile-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::JS,false" />
         </compc>
     </target>
 
-    <target name="compile-asjs" >
-        <echo message="Cross-compiling Charts/asjs"/>
+    <target name="compile-asjs">
+        <echo message="Cross-compiling Charts"/>
         <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
         <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
             <jvmarg value="-Xmx384m" />
@@ -116,45 +107,56 @@
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"
/>
+            <!-- this is not on external-library path otherwise goog.requires are not
generated -->
+            <arg value="-library-path+=${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc"
/>
+            <arg value="-define=COMPILE::AS3,false" />
+            <arg value="-define=COMPILE::JS,true" />
         </java>
     </target>
 
-    <target name="lint-js" depends="gjslint, jshint, copy-js" />
-    <target name="copy-js" >
+    <target name="compile-extern-swc" description="Compiles .as files into .swc used for
cross-compiling other projects">
+        <echo message="Compiling externs/Charts.swc"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+        <!-- make JS output folder now so include-file doesn't error -->
+        <mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+        
+        <!-- Load the <compc> task. We can't do this at the <project> level
-->
+        <!-- because targets that run before flexTasks.jar gets built would fail. -->
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+        <!--
+         Link in the classes (and their dependencies) for the MXML tags
+         listed in this project's manifest.xml.
+         Also link the additional classes (and their dependencies)
+         listed in CoreClasses.as,
+         because these aren't referenced by the manifest classes.
+         Keep the standard metadata when compiling.
+         Include the appropriate CSS files and assets in the SWC.
+         Don't include any resources in the SWC.
+         Write a bundle list of referenced resource bundles
+         into the file bundles.properties in this directory.
+         -->
+        <compc fork="true"
+            output="${FLEXJS_HOME}/frameworks/externs/Charts.swc">
+            <jvmarg line="${compc.jvm.args}"/>
+            <load-config filename="compile-asjs-config.xml" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"
/>
+            <!-- this is not on external-library path otherwise goog.requires are not
generated -->
+            <arg value="-library-path+=${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc"
/>
+            <arg value="-define=COMPILE::AS3,false" />
+            <arg value="-define=COMPILE::JS,true" />
+        </compc>
+    </target>
+
+    <target name="copy-js">
         <copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
-            <fileset dir="${basedir}/js/src">
-                <include name="**/**" />
-            </fileset>
             <fileset dir="${basedir}/js/out">
-                <include name="**/**" />
+                <include name="**/**"/>
             </fileset>
         </copy>
     </target>
 
-    <target name="gjslint" unless="no.lint">
-        <echo>running gjslint</echo>
-        <exec executable="${gjslint}" dir="${basedir}" failonerror="true">
-            <arg value="--strict" />
-            <arg value="--disable" />
-            <arg value="006,100,214,300" />
-            <!-- 006: wrong indentation -->
-            <!-- 100: cannot have non-primitive value -->
-            <!-- 214: @fileoverview tag missing description -->
-            <!-- 300: missing newline at end of file -->
-            <arg value="--max_line_length" />
-            <arg value="120" />
-            <arg value="-r" />
-            <arg value="${basedir}/js/src" />
-        </exec>
-    </target>
-
-    <target name="jshint" unless="no.lint">
-        <echo>running jshint</echo>
-        <exec executable="${jshint}" dir="${basedir}" failonerror="true">
-            <arg value="--config" />
-            <arg value="${FLEX_HOME}/frameworks/js/jshint.properties" />
-            <arg value="${basedir}/js/src" />
-        </exec>
-    </target>
-
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/compile-as-to-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/compile-as-to-js-config.xml b/frameworks/projects/Charts/compile-as-to-js-config.xml
new file mode 100644
index 0000000..ee3cac0
--- /dev/null
+++ b/frameworks/projects/Charts/compile-as-to-js-config.xml
@@ -0,0 +1,76 @@
+<!--
+
+  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.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/js.swc</path-element>
+            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/gcl.swc</path-element>
+        </external-library-path>
+
+        <mxml>
+            <children-as-data>true</children-as-data>
+        </mxml>
+        <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+        <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+        <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+            <name>Bindable</name>
+            <name>Managed</name>
+            <name>ChangeEvent</name>
+            <name>NonCommittingChangeEvent</name>
+            <name>Transient</name>
+        </keep-as3-metadata>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <locale/>
+
+        <source-path>
+            <!--<path-element>as/src</path-element>-->
+        </source-path>
+
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+
+    <include-sources>
+        <path-element>as/src</path-element>
+    </include-sources>
+
+    <include-classes>
+        <class>ChartsClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+    </include-namespaces>
+        
+    <target-player>11.1</target-player>
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/compile-asjs-config.xml b/frameworks/projects/Charts/compile-asjs-config.xml
index 19ab3bd..a55ee3f 100644
--- a/frameworks/projects/Charts/compile-asjs-config.xml
+++ b/frameworks/projects/Charts/compile-asjs-config.xml
@@ -49,18 +49,17 @@
             <path-element>../../libs/Core.swc</path-element>
             <path-element>../../libs/Graphics.swc</path-element>
             <path-element>../../libs/HTML.swc</path-element>
-            <path-element>../../libs/Charts.swc</path-element>
         </library-path>
         
         <source-path>
-            <path-element>asjs/src</path-element>
+            <path-element>as/src</path-element>
         </source-path>
         
         <warn-no-constructor>false</warn-no-constructor>
     </compiler>
     
     <include-sources>
-        <path-element>asjs/src</path-element>
+        <path-element>as/src</path-element>
     </include-sources>
     
     <include-namespaces>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/compile-config.xml b/frameworks/projects/Charts/compile-config.xml
index 588688e..f64b4d6 100644
--- a/frameworks/projects/Charts/compile-config.xml
+++ b/frameworks/projects/Charts/compile-config.xml
@@ -56,7 +56,6 @@
         
         <source-path>
             <path-element>as/src</path-element>
-            <path-element>asjs/src</path-element>
         </source-path>
         
         <warn-no-constructor>false</warn-no-constructor>
@@ -64,7 +63,7 @@
     
     <include-file>
         <name>defaults.css</name>
-        <path>asjs/defaults.css</path>
+        <path>as/defaults.css</path>
     </include-file>
     <include-file>
         <name>js/out/*</name>
@@ -77,7 +76,6 @@
 
     <include-classes>
         <class>ChartsClasses</class>
-        <class>ChartASJSClasses</class>
     </include-classes>
     
     <include-namespaces>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af2be21d/frameworks/projects/Charts/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/compile-js-config.xml b/frameworks/projects/Charts/compile-js-config.xml
new file mode 100644
index 0000000..3c3784b
--- /dev/null
+++ b/frameworks/projects/Charts/compile-js-config.xml
@@ -0,0 +1,87 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+            <path-element>asjs/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>js/out/*</name>
+        <path>js/out/*</path>
+    </include-file>
+    <!--
+    <include-file>
+        <name>js/src/*</name>
+        <path>js/src/*</path>
+    </include-file>
+     -->
+    
+    <include-classes>
+        <class>CoreJSClasses</class>
+        <!-- leave out for now until we get Application to compile
+        <class>CoreASJSClasses</class>-->
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+		<uri>library://ns.apache.org/flexjs/svg</uri>
+    </include-namespaces>  
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>


Mime
View raw message