flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pio...@apache.org
Subject [04/16] git commit: [flex-asjs] [refs/heads/feature/chart-work] - - Missing implementation of IList in MDL Menu - Clean up List from unused imports
Date Thu, 30 Mar 2017 05:21:28 GMT
- Missing implementation of IList in MDL Menu
- Clean up List from unused imports


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

Branch: refs/heads/feature/chart-work
Commit: 00941ff37d0f5965752cf589be3b9e80b6915f41
Parents: 13ed095
Author: piotrz <piotrz@apache.org>
Authored: Fri Mar 24 22:03:05 2017 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Fri Mar 24 22:03:05 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/List.as   | 17 +++--
 .../src/main/flex/org/apache/flex/mdl/Menu.as   | 68 ++++++++++++++++++--
 2 files changed, 73 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/00941ff3/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
index cbfcf11..a9d78e9 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
@@ -25,12 +25,10 @@ package org.apache.flex.mdl
 	import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.ILayoutView;
 	import org.apache.flex.core.ISelectionModel;
-	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IFactory;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.IChild;
 	import org.apache.flex.events.ItemAddedEvent;
-	import org.apache.flex.events.ItemClickedEvent;
 	import org.apache.flex.events.ItemRemovedEvent;
 
     COMPILE::JS
@@ -132,10 +130,15 @@ package org.apache.flex.mdl
 		{
 			return this;
 		}
-		
-		/**
-		 * 
-		 */
+
+        /**
+         *  @copy org.apache.flex.core.IList#dataGroup
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
 		public function get dataGroup():IItemRendererParent
 		{
 			return this;
@@ -168,7 +171,7 @@ package org.apache.flex.mdl
 		 *  @langversion 3.0
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
+		 *  @productversion FlexJS 0.8
 		 */
 		public function get hasItemRenderer():Boolean
 		{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/00941ff3/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
index 3d5cb37..b860fac 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
@@ -20,15 +20,15 @@ package org.apache.flex.mdl
 {
     import org.apache.flex.core.GroupBase;
     import org.apache.flex.core.IChild;
+    import org.apache.flex.core.IFactory;
     import org.apache.flex.core.IItemRenderer;
     import org.apache.flex.core.IItemRendererParent;
     import org.apache.flex.core.ILayoutHost;
     import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.ILayoutView;
-    import org.apache.flex.core.IParentIUIBase;
+    import org.apache.flex.core.IList;
     import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.events.ItemAddedEvent;
-	import org.apache.flex.events.ItemClickedEvent;
 	import org.apache.flex.events.ItemRemovedEvent;
 
     COMPILE::JS
@@ -53,7 +53,7 @@ package org.apache.flex.mdl
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.8
      */    
-	public class Menu extends GroupBase implements IItemRendererParent, ILayoutParent, ILayoutHost,
ILayoutView
+	public class Menu extends GroupBase implements IItemRendererParent, ILayoutParent, ILayoutHost,
ILayoutView, IList
 	{
         /**
          *  Constructor.
@@ -145,7 +145,65 @@ package org.apache.flex.mdl
         {
             return this;
         }
-		
+
+        /**
+         *  @copy org.apache.flex.core.IList#dataGroup
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
+        public function get dataGroup():IItemRendererParent
+        {
+            return this;
+        }
+
+        private var _itemRenderer:IFactory;
+
+        /**
+         *  The class or factory used to display each item.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
+        public function get itemRenderer():IFactory
+        {
+            return _itemRenderer;
+        }
+        public function set itemRenderer(value:IFactory):void
+        {
+            _itemRenderer = value;
+        }
+
+        /**
+         * Returns whether or not the itemRenderer property has been set.
+         *
+         *  @see org.apache.flex.core.IItemRendererProvider
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
+        public function get hasItemRenderer():Boolean
+        {
+            var result:Boolean = false;
+
+            COMPILE::SWF {
+                result = _itemRenderer != null;
+            }
+
+            COMPILE::JS {
+                var test:* = _itemRenderer;
+                result = _itemRenderer !== null && test !== undefined;
+            }
+
+            return result;
+        }
+
 		/**
 		 * @copy org.apache.flex.core.IItemRendererParent#addItemRenderer()
 		 * @private
@@ -216,7 +274,7 @@ package org.apache.flex.mdl
 
         /**
          *  update all item renderers
-         *  
+         *
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6


Mime
View raw message