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

[GitHub] alinakazi closed pull request #206: ChartItemEvent.as Added

alinakazi closed pull request #206: ChartItemEvent.as Added
URL: https://github.com/apache/royale-asjs/pull/206
 
 
   

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

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

diff --git a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
index db18701dd..a5ab0035e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
@@ -111,6 +111,7 @@ internal class MXRoyaleClasses
 	import mx.states.State; State;
 	import mx.collections.XMLListCollection; XMLListCollection;
 	import mx.controls.treeClasses.TreeItemRenderer; TreeItemRenderer;
+	import mx.charts.events.ChartItemEvent; ChartItemEvent;
 
     COMPILE::SWF
     {
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/events/ChartItemEvent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/events/ChartItemEvent.as
new file mode 100644
index 000000000..ca2b833bd
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/events/ChartItemEvent.as
@@ -0,0 +1,142 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts.events
+{
+
+/* import flash.events.Event;
+import flash.events.MouseEvent;
+import flash.display.InteractiveObject;
+import flash.geom.Point; */
+import mx.charts.HitData;
+import mx.charts.chartClasses.ChartBase;
+import org.apache.royale.events.MouseEvent;
+import org.apache.royale.events.Event;
+import org.apache.royale.events.IRoyaleEvent;
+import org.apache.royale.geom.Point;
+/**
+ * The ChartItemEvent class represents events that are specific
+ * to the chart components, such as when a chart item is clicked.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class ChartItemEvent extends  org.apache.royale.events.MouseEvent
+{
+  //  include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Event type constant; indicates that the user clicked the mouse button
+	 *  over a chart item representing data in the chart.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public static const ITEM_CLICK:String = "itemClick";
+	
+	
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *	Constructor.
+	 *
+	 *	@param type The type of the event.
+	 *
+	 *	@param hitSet An array of HitData structures describing
+	 *  the ChartItems that triggered the event.
+	 *
+	 *	@param triggerEvent The MouseEvent that triggered this ChartItemEvent.
+	 *
+	 *	@param target The chart on which the event was triggered.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public function ChartItemEvent(type:String, hitSet:Array=null,
+								   triggerEvent:MouseEvent=null, target:ChartBase=null)
+	{	
+		
+		
+		super(type, bubbles, cancelable,
+			  0,0, relatedObject,
+			  ctrlKey, altKey, shiftKey, buttonDown, delta);		
+		
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  hitData
+    //----------------------------------
+
+	[Inspectable(environment="none")]
+
+	/** 
+	 *  The first item in the hitSet array.
+	 *  This is a convenience function for developers who don't care
+	 *  about events corresponding to multiple items.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public function get hitData():HitData
+	{
+	return null;
+	}
+
+    
+		
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------
+
+	/** 
+	 *	@private
+	 */
+	override public function cloneEvent():IRoyaleEvent
+	{
+		return new ChartItemEvent(type, null, this,ChartBase(this.target));
+	}
+}
+
+}


 

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


With regards,
Apache Git Services