flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [39/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - clean up after merge
Date Thu, 25 Aug 2016 15:32:47 GMT
clean up after merge


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

Branch: refs/heads/spark
Commit: 1144a4424051dff7b26d5d93e1ff4653e9502d1f
Parents: cced948
Author: Alex Harui <aharui@apache.org>
Authored: Wed Aug 17 13:03:51 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Wed Aug 17 13:03:51 2016 -0700

----------------------------------------------------------------------
 frameworks/js/FlexJS/projects/MXJS/build.xml    | 23 +------
 .../MXJS/src/main/config/compile-js-config.xml  | 10 +--
 .../org/apache/flex/charts/core/IAxisGroup.as   |  4 +-
 .../main/flex/org/apache/flex/geom/Rectangle.as | 10 +++
 .../flex/org/apache/flex/utils/PointUtils.as    |  2 +-
 .../org/apache/flex/svg/GraphicContainer.as     | 72 ++++++++++++++++----
 .../apache/flex/html/beads/DateChooserView.as   |  2 +-
 .../MX/src/main/flex/flex/display/Graphics.as   | 24 ++++---
 .../MX/src/main/flex/flex/display/Shape.as      |  4 +-
 .../MX/src/main/flex/flex/display/Sprite.as     |  4 +-
 .../MX/src/main/flex/flex/text/TextField.as     | 12 ----
 .../MX/src/main/flex/mx/core/UIComponent.as     |  4 +-
 12 files changed, 97 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/js/FlexJS/projects/MXJS/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/MXJS/build.xml b/frameworks/js/FlexJS/projects/MXJS/build.xml
index 5618669..931b965 100644
--- a/frameworks/js/FlexJS/projects/MXJS/build.xml
+++ b/frameworks/js/FlexJS/projects/MXJS/build.xml
@@ -59,13 +59,8 @@
             <arg value="-compiler.strict-xml=true" />
             <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion
annotations -->
             <arg value="-output=${basedir}/target/generated-sources/flexjs" />
-            <arg value="-load-config=${basedir}/src/main/config/compile-js-config.xml"
/>
-            <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+=${JS.SWC}" />
-            <!-- this is not on external-library path otherwise goog.requires are not
generated -->
-            <arg value="-library-path+=${GCL.SWC}" />
+            <arg value="-load-config=${FLEX_HOME}/frameworks/js-config.xml" />
+            <arg value="-load-config+=${basedir}/src/main/config/compile-js-config.xml"
/>
         </java>
     </target>
     
@@ -79,13 +74,9 @@
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
+            <load-config filename="${FLEX_HOME}/frameworks/js-config.xml" />
             <load-config filename="src/main/config/compile-js-config.xml" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
             <arg value="-compiler.strict-xml=true" />
-            <arg value="-external-library-path=${JS.SWC}" />
-            <!-- this is not on external-library path otherwise goog.requires are not
generated -->
-            <arg value="-library-path+=${GCL.SWC}" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/js/FlexJS/libs/${target.name}"
/>
     </target>
@@ -100,14 +91,6 @@
     </target>
     
     <target name="check-compiler" depends="check-falcon-home, check-falconjx-home">
-        <condition property="JS.SWC" value="${FALCONJX_HOME}/../js/libs/js.swc" >
-            <available file="${FALCONJX_HOME}/../js/libs/js.swc" />
-        </condition>
-        <property name="JS.SWC" value="${FALCONJX_HOME}/../externs/js/target/js.swc" />
-        <condition property="GCL.SWC" value="${FALCONJX_HOME}/../js/libs/GCL.swc" >
-            <available file="${FALCONJX_HOME}/../js/libs/GCL.swc" />
-        </condition>
-        <property name="GCL.SWC" value="${FALCONJX_HOME}/../externs/GCL/target/GCL.swc"
/>
         <path id="lib.path">
             <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
         </path>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/js/FlexJS/projects/MXJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/MXJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/MXJS/src/main/config/compile-js-config.xml
index a1e507a..73ab68a 100644
--- a/frameworks/js/FlexJS/projects/MXJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/MXJS/src/main/config/compile-js-config.xml
@@ -21,9 +21,6 @@
     <compiler>
         <accessible>false</accessible>
         
-        <external-library-path>
-        </external-library-path>
-        
 		<mxml>
 			<children-as-data>true</children-as-data>
 		</mxml>
@@ -61,11 +58,13 @@
         <locale/>
         
         <library-path>
+            <path-element>../../../../../../../../js/libs/GCL.swc</path-element>
             <!-- asjscompc won't 'link' these classes in, but will list their requires
                  if these swcs are on the external-library-path then their requires
                  will not be listed -->
             <path-element>../../../../../libs/BindingJS.swc</path-element>
             <path-element>../../../../../libs/CoreJS.swc</path-element>
+            <path-element>../../../../../libs/LanguageJS.swc</path-element>
             <path-element>../../../../../libs/GraphicsJS.swc</path-element>
             <path-element>../../../../../libs/CollectionsJS.swc</path-element>
             <path-element>../../../../../libs/ReflectionJS.swc</path-element>
@@ -99,8 +98,5 @@
     <include-namespaces>
         <uri>library://ns.apache.org/flexjs/mx</uri>
     </include-namespaces>
-        
-    <target-player>${playerglobal.version}</target-player>
-	
-
+    
 </flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
index 575c91d..5b9a1d9 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
@@ -18,8 +18,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.charts.core
 {
-	import org.apache.flex.core.graphics.IFill;
-	import org.apache.flex.core.graphics.IStroke;
+	import org.apache.flex.graphics.IFill;
+	import org.apache.flex.graphics.IStroke;
 	import org.apache.flex.core.IVisualElement;
 
 	/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
index 08aea55..d893738 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
@@ -255,6 +255,16 @@ public class Rectangle
 		width = widtha;
 		height = heighta;
 	}
+	
+       
+    /**
+     *  Convert rectangles of other types to this Rectangle type.
+     */
+    public static function convert(obj:Object):org.apache.flex.geom.Rectangle
+    {
+        return new org.apache.flex.geom.Rectangle(obj.x, obj.y, obj.width, obj.height);
+    }
+
 }
 
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
index 8a7cedb..134ff09 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
@@ -58,7 +58,7 @@ package org.apache.flex.utils
 		 *  @productversion FlexJS 0.0
          *  @flexjsignorecoercion HTMLElement
 		 */
-		public static function globalToLocal( pt:flash.geom.Point, local:Object ):org.apache.flex.geom.Point
+		public static function globalToLocal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
 		{
             COMPILE::SWF
             {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as
index 48c51d1..d72bc04 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as
@@ -16,6 +16,7 @@ package org.apache.flex.svg
     import org.apache.flex.core.ContainerBase;
     import org.apache.flex.core.IFlexJSElement;
     import org.apache.flex.core.ITransformHost;
+    import org.apache.flex.core.IVisualElement;
 
 	COMPILE::JS
 	{
@@ -85,7 +86,7 @@ package org.apache.flex.svg
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		override public function getElementAt(index:int):Object
+		override public function getElementAt(index:int):IVisualElement
 		{
 			return graphicGroup.getElementAt(index);
 		}        
@@ -98,11 +99,11 @@ package org.apache.flex.svg
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		override public function addElement(c:Object, dispatchEvent:Boolean = true):void
+		override public function addElement(c:IVisualElement):IVisualElement
 		{
-			graphicGroup.addElement(c, dispatchEvent);
-			if (dispatchEvent)
-				this.dispatchEvent(new Event("childrenAdded"));
+			graphicGroup.addElement(c);
+			this.dispatchEvent(new Event("childrenAdded"));
+			return c;
 		}
 		
 		/**
@@ -113,11 +114,11 @@ package org.apache.flex.svg
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+		override public function addElementAt(c:IVisualElement, index:int):IVisualElement
 		{
-			graphicGroup.addElementAt(c, index, dispatchEvent);
-			if (dispatchEvent)
-				this.dispatchEvent(new Event("childrenAdded"));
+			graphicGroup.addElementAt(c, index);
+			this.dispatchEvent(new Event("childrenAdded"));
+			return c;
 		}
 		
 		/**
@@ -128,11 +129,11 @@ package org.apache.flex.svg
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		override public function removeElement(c:Object, dispatchEvent:Boolean = true):void
+		override public function removeElement(c:IVisualElement):IVisualElement
 		{
-			graphicGroup.removeElement(c, dispatchEvent);
-			if (dispatchEvent)
-				this.dispatchEvent(new Event("childrenRemoved"));
+			graphicGroup.removeElement(c);
+			this.dispatchEvent(new Event("childrenRemoved"));
+			return c;
 		}
 		
 		/**
@@ -156,7 +157,7 @@ package org.apache.flex.svg
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		override public function getElementIndex(c:Object):int
+		override public function getElementIndex(c:IVisualElement):int
 		{
 			return graphicGroup.getElementIndex(c);
 		}
@@ -174,6 +175,49 @@ package org.apache.flex.svg
 		{
 			return graphicGroup.numElements;
 		}
+
+		/**
+		 *  @copy org.apache.flex.core.IParent#addElement()
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function addElementNoChangeEvent(c:IVisualElement):IVisualElement
+		{
+			graphicGroup.addElement(c);
+			return c;
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.IParent#addElementAt()
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function addElementAtNoChangeEvent(c:IVisualElement, index:int):IVisualElement
+		{
+			graphicGroup.addElementAt(c, index);
+			return c;
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.IParent#removeElement()
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function removeElementNoChangeEvent(c:IVisualElement):IVisualElement
+		{
+			graphicGroup.removeElement(c);
+			return c;
+		}
+		
 	}
 }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
index 65220d3..58374af 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
@@ -184,7 +184,7 @@ package org.apache.flex.html.beads
 			dayContainer = new Container();
 			var tileLayout:TileLayout = new TileLayout();
 			dayContainer.addBead(tileLayout);
-            UIBase(_strand).addElement(dayContainer, false);
+            UIBase(_strand).addElement(dayContainer);
 			tileLayout.numColumns = 7;
 
 			// the calendar has 7 columns with 6 rows, the first row are the day names

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as b/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
index bee750c..8de5e3e 100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
@@ -19,14 +19,15 @@
 
 package flex.display
 {
-	import org.apache.flex.core.graphics.GraphicsContainer;
-	import org.apache.flex.core.graphics.SolidColor;
+	import org.apache.flex.svg.CompoundGraphic;
+	import org.apache.flex.graphics.SolidColor;
+    import org.apache.flex.graphics.PathBuilder;
 	
 	public class Graphics
 	{
-		private var host:GraphicsContainer;
+		private var host:CompoundGraphic;
 		
-		public function Graphics(host:GraphicsContainer)
+		public function Graphics(host:CompoundGraphic)
 		{
 			this.host = host;
 		}
@@ -64,19 +65,20 @@ package flex.display
 		
 		public function lineTo(x:Number, y:Number):void
 		{
-			var path:String = "M " + lastX.toString() + " " + lastY.toString();
-			path += "L " + x.toString() + " " + y.toString();
-			host.drawPath(path);
+            var path:PathBuilder = new PathBuilder();
+            path.moveTo(lastX, lastY);
+            path.lineTo(x, y);
+			host.drawPathCommands(path);
 			lastX = x;
 			lastY = y;
 		}
 		
 		public function curveTo(mx:Number, my:Number, x:Number, y:Number):void
 		{
-			var path:String = "M " + lastX.toString() + " " + lastY.toString();
-			path += "Q " + mx.toString() + " " + my.toString() + " "
-						+ x.toString() + " " + y.toString();
-			host.drawPath(path);
+            var path:PathBuilder = new PathBuilder();
+            path.moveTo(lastX, lastY);
+            path.quadraticCurveTo(mx, my, x, y);
+			host.drawPathCommands(path);
 			lastX = x;
 			lastY = y;
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/MX/src/main/flex/flex/display/Shape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/display/Shape.as b/frameworks/projects/MX/src/main/flex/flex/display/Shape.as
index bfcd184..bbdf1b4 100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/Shape.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/Shape.as
@@ -19,12 +19,12 @@
 
 package flex.display
 {	
-	import org.apache.flex.core.graphics.GraphicsContainer;
+	import org.apache.flex.svg.CompoundGraphic;
 	import org.apache.flex.geom.Point;
 	import org.apache.flex.utils.PointUtils;
 	import mx.managers.SystemManagerGlobals;
 	
-	public class Shape extends GraphicsContainer
+	public class Shape extends CompoundGraphic
 	{
 		COMPILE::JS
 		private var _name:String;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as b/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
index 6b6d668..a83a292 100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
@@ -19,12 +19,12 @@
 
 package flex.display
 {	
-	import org.apache.flex.core.graphics.GraphicsContainer;
+	import org.apache.flex.svg.CompoundGraphic;
 	import org.apache.flex.geom.Point;
 	import org.apache.flex.utils.PointUtils;
 	import mx.managers.SystemManagerGlobals;
 	
-	public class Sprite extends GraphicsContainer implements DisplayObjectContainer
+	public class Sprite extends CompoundGraphic implements DisplayObjectContainer
 	{
 		COMPILE::JS
 		private var _name:String;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/MX/src/main/flex/flex/text/TextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/text/TextField.as b/frameworks/projects/MX/src/main/flex/flex/text/TextField.as
index 80f88ff..3e97256 100644
--- a/frameworks/projects/MX/src/main/flex/flex/text/TextField.as
+++ b/frameworks/projects/MX/src/main/flex/flex/text/TextField.as
@@ -367,18 +367,6 @@ public class TextField extends Label
 		return null;
 	}
 	
-	private var _selectable:Boolean;
-	public function get selectable():Boolean
-	{
-		trace("TextField.selectable not implemented");
-		return _selectable;
-	}
-	public function set selectable(value:Boolean):void
-	{
-		_selectable = value;
-		trace("TextField.selectable not implemented");
-	}
-	
 	public function get selectionBeginIndex():int
 	{
 		trace("TextField.selectionBeginIndex not implemented");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1144a442/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as b/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
index 6fe7bff..ea50d16 100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
@@ -14026,7 +14026,7 @@ public class UIComponent extends Sprite
     {
         if (!root || root is TopOfDisplayList || root[fakeMouseX] === undefined)
             return super.mouseX;
-        return globalToLocal(new Point(root[fakeMouseX], 0)).x;
+        return PointUtils.globalToLocal(new Point(root[fakeMouseX], 0), this).x;
     }
 
     /**
@@ -14037,7 +14037,7 @@ public class UIComponent extends Sprite
     {
         if (!root || root is TopOfDisplayList || root[fakeMouseY] === undefined)
             return super.mouseY;
-        return globalToLocal(new Point(0, root[fakeMouseY])).y;
+        return PointUtils.globalToLocal(new Point(0, root[fakeMouseY]), this).y;
     }
 
 


Mime
View raw message