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:29:49 UTC

[GitHub] alinakazi closed pull request #207: DataTip.as Added

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

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 a5ab0035e..d76197c71 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
@@ -112,7 +112,8 @@ internal class MXRoyaleClasses
 	import mx.collections.XMLListCollection; XMLListCollection;
 	import mx.controls.treeClasses.TreeItemRenderer; TreeItemRenderer;
 	import mx.charts.events.ChartItemEvent; ChartItemEvent;
-
+	import mx.charts.chartClasses.DataTip; DataTip;
+  
     COMPILE::SWF
     {
         import mx.controls.beads.CSSImageAndTextButtonView; CSSImageAndTextButtonView;
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/DataTip.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/DataTip.as
new file mode 100644
index 000000000..838060f5b
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/DataTip.as
@@ -0,0 +1,169 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.chartClasses
+{
+
+//import flash.display.DisplayObject;
+//import flash.display.Graphics;
+//import flash.geom.Rectangle;
+//import flash.text.TextFieldAutoSize;
+//import flash.text.TextFormat;
+//import flash.utils.Dictionary;
+
+import mx.charts.HitData;
+//import mx.charts.styles.HaloDefaults;
+import mx.core.IDataRenderer;
+//import mx.core.IUITextField;
+import mx.core.UIComponent;
+//import mx.core.UITextField;
+import mx.events.FlexEvent;
+import mx.graphics.IFill;
+import mx.graphics.SolidColor;
+import mx.graphics.SolidColorStroke;
+//import mx.styles.CSSStyleDeclaration;
+//import mx.core.IFlexModuleFactory;
+
+
+/**
+ *  The DataTip control provides information
+ *  about a data point to chart users.
+ *  When a user moves their mouse over a graphical element, the DataTip
+ *  control displays text that provides information about the element.
+ *  You can use DataTip controls to guide users as they work with your
+ *  application or customize the DataTips to provide additional functionality.
+ *
+ *  <p>To enable DataTips on a chart, set its <code>showDataTips</code>
+ *  property to <code>true</code>.</p>
+ *
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class DataTip extends UIComponent implements IDataRenderer
+{
+/*     include "../../core/Version.as";
+ */	
+   
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function DataTip()
+    {
+        super();
+
+       // mouseChildren = false;
+       // mouseEnabled = false;
+    }
+
+  
+   
+  
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+    
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The HitData structure describing the data point
+     *  that the DataTip is rendering.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get data():Object
+    {
+      return super.data();
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+      super.data(value);
+        
+        invalidateDisplayList();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+	
+	
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+    }
+
+   
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+      
+    }
+
+    
+}
+
+}


 

----------------------------------------------------------------
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