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:14:55 UTC

[GitHub] alinakazi closed pull request #203: TreeItemRenderer.as Added

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

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 1a40c8fd3..db18701dd 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
@@ -110,6 +110,7 @@ internal class MXRoyaleClasses
 	import mx.charts.series.BarSeries; BarSeries;
 	import mx.states.State; State;
 	import mx.collections.XMLListCollection; XMLListCollection;
+	import mx.controls.treeClasses.TreeItemRenderer; TreeItemRenderer;
 
     COMPILE::SWF
     {
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/TreeItemRenderer.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/TreeItemRenderer.as
new file mode 100644
index 000000000..296929aa0
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/TreeItemRenderer.as
@@ -0,0 +1,177 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.controls.treeClasses
+{
+
+/* import flash.display.DisplayObject;
+import flash.display.InteractiveObject;
+import flash.events.Event;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import mx.controls.Tree;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.core.IDataRenderer;
+import mx.core.IFlexModuleFactory;
+import mx.core.IFontContextComponent;
+import mx.core.ILayoutDirectionElement;
+import mx.core.IToolTip;
+import mx.core.SpriteAsset;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.core.IUITextField;
+import mx.events.FlexEvent;
+import mx.events.ToolTipEvent;
+import mx.events.TreeEvent;
+import mx.managers.ISystemManager;
+import mx.utils.PopUpUtil;
+
+ */
+import mx.core.IFlexDisplayObject;
+import mx.controls.listClasses.BaseListData;
+import org.apache.royale.html.supportClasses.TreeItemRenderer;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+/**
+ *  The TreeItemRenderer class defines the default item renderer for a Tree control. 
+ *  By default, the item renderer draws the text associated with each item in the tree, 
+ *  an optional icon, and an optional disclosure icon.
+ *
+ *  <p>You can override the default item renderer by creating a custom item renderer.</p>
+ *
+ *  @see mx.controls.Tree
+ *  @see mx.core.IDataRenderer
+ *  @see mx.controls.listClasses.IDropInListItemRenderer
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class TreeItemRenderer extends org.apache.royale.html.supportClasses.TreeItemRenderer 
+{
+   
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function TreeItemRenderer()
+    {
+        super();
+    }
+
+   
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+  
+    
+  
+    
+    //----------------------------------
+    //  icon
+    //----------------------------------
+
+    /**
+     *  The internal IFlexDisplayObject that displays the icon in this renderer.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected var icon:IFlexDisplayObject;
+    
+    //----------------------------------
+    //  label
+    //----------------------------------
+
+    /**
+     *  The internal UITextField that displays the text in this renderer.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected var label:Object;
+    
+ 
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+     protected function createChildren():void
+    {
+    }
+
+   
+    /**
+     *  @private
+     */
+     protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+    }
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    
+    /**
+     *  @private
+     */
+    mx_internal function getLabel():Object
+    {
+        return label;
+    }
+    
+    
+   
+
+}
+
+}


 

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