flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - MaterialDesignLite should compile now.
Date Thu, 23 Mar 2017 18:29:06 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 3ea6b07ed -> 4011d649d


MaterialDesignLite should compile now.


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

Branch: refs/heads/develop
Commit: 4011d649da796627e3fed4438aa5b00da9b7c968
Parents: 3ea6b07
Author: Peter Ent <pent@apache.org>
Authored: Thu Mar 23 14:29:05 2017 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Thu Mar 23 14:29:05 2017 -0400

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/List.as   | 48 +++++++++++++++++--
 .../src/main/flex/org/apache/flex/mdl/Menu.as   | 50 ++++++++++++++++++--
 .../src/main/flex/org/apache/flex/mdl/TabBar.as | 35 ++++++++++++--
 .../src/main/flex/org/apache/flex/mdl/Tabs.as   | 35 ++++++++++++--
 .../TabsItemRendererFactoryForArrayData.as      |  4 +-
 .../TabsItemRendererFactoryForArrayListData.as  |  4 +-
 6 files changed, 155 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4011d649/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 1ac1423..7938bab 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
@@ -22,10 +22,14 @@ package org.apache.flex.mdl
 	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.ISelectionModel;
 	import org.apache.flex.core.IParentIUIBase;
 	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
     {
@@ -44,7 +48,7 @@ package org.apache.flex.mdl
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */  
-	public class List extends UIBase implements IItemRendererParent, ILayoutParent, ILayoutHost
+	public class List extends UIBase implements IItemRendererParent, ILayoutParent, ILayoutHost,
ILayoutView
 	{
         /**
          *  Constructor.
@@ -122,10 +126,48 @@ package org.apache.flex.mdl
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-		public function get contentView():IParentIUIBase
+		public function get contentView():ILayoutView
 		{
 			return this;
 		}
+		
+		/**
+		 * @copy org.apache.flex.core.IItemRendererParent#addItemRenderer()
+		 * @private
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function addItemRenderer(renderer:IItemRenderer):void
+		{
+			addElement(renderer, true);
+			
+			var newEvent:ItemAddedEvent = new ItemAddedEvent("itemAdded");
+			newEvent.item = renderer;
+			
+			dispatchEvent(newEvent);
+		}
+		
+		/**
+		 * @copy org.apache.flex.core.IItemRendererParent#removeItemRenderer()
+		 * @private
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function removeItemRenderer(renderer:IItemRenderer):void
+		{
+			removeElement(renderer, true);
+			
+			var newEvent:ItemRemovedEvent = new ItemRemovedEvent("itemRemoved");
+			newEvent.item = renderer;
+			
+			dispatchEvent(newEvent);
+		}
 
 		/**
          *  get item renderer for index
@@ -149,7 +191,7 @@ package org.apache.flex.mdl
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-		public function removeAllElements():void
+		public function removeAllItemRenderers():void
 		{
 			while (numElements > 0) {
 				var child:IChild = getElementAt(0);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4011d649/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 f1a535a..3d5cb37 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
@@ -18,14 +18,18 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-    import org.apache.flex.core.ContainerBase;
+    import org.apache.flex.core.GroupBase;
     import org.apache.flex.core.IChild;
     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.ISelectionModel;
+	import org.apache.flex.events.ItemAddedEvent;
+	import org.apache.flex.events.ItemClickedEvent;
+	import org.apache.flex.events.ItemRemovedEvent;
 
     COMPILE::JS
     {
@@ -49,7 +53,7 @@ package org.apache.flex.mdl
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.8
      */    
-	public class Menu extends ContainerBase implements IItemRendererParent, ILayoutParent, ILayoutHost
+	public class Menu extends GroupBase implements IItemRendererParent, ILayoutParent, ILayoutHost,
ILayoutView
 	{
         /**
          *  Constructor.
@@ -137,10 +141,48 @@ package org.apache.flex.mdl
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-        public function get contentView():IParentIUIBase
+        public function get contentView():ILayoutView
         {
             return this;
         }
+		
+		/**
+		 * @copy org.apache.flex.core.IItemRendererParent#addItemRenderer()
+		 * @private
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function addItemRenderer(renderer:IItemRenderer):void
+		{
+			addElement(renderer, true);
+			
+			var newEvent:ItemAddedEvent = new ItemAddedEvent("itemAdded");
+			newEvent.item = renderer;
+			
+			dispatchEvent(newEvent);
+		}
+		
+		/**
+		 * @copy org.apache.flex.core.IItemRendererParent#removeItemRenderer()
+		 * @private
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function removeItemRenderer(renderer:IItemRenderer):void
+		{
+			removeElement(renderer, true);
+			
+			var newEvent:ItemRemovedEvent = new ItemRemovedEvent("itemRemoved");
+			newEvent.item = renderer;
+			
+			dispatchEvent(newEvent);
+		}
 
         /**
          *  get item renderer for index
@@ -164,7 +206,7 @@ package org.apache.flex.mdl
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-        public function removeAllElements():void
+        public function removeAllItemRenderers():void
         {
             while (numElements > 0) {
                 var child:IChild = getElementAt(0);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4011d649/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
index a2080c1..ec15b27 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
@@ -18,14 +18,18 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-	import org.apache.flex.core.ContainerBase;
     import org.apache.flex.core.IChild;
     import org.apache.flex.core.IChrome;
     import org.apache.flex.core.IItemRenderer;
     import org.apache.flex.core.IItemRendererParent;
     import org.apache.flex.core.ILayoutHost;
+	import org.apache.flex.core.ILayoutView;
     import org.apache.flex.core.ILayoutParent;
     import org.apache.flex.core.IParentIUIBase;
+	import org.apache.flex.html.Group;
+	import org.apache.flex.events.ItemAddedEvent;
+	import org.apache.flex.events.ItemClickedEvent;
+	import org.apache.flex.events.ItemRemovedEvent;
     import org.apache.flex.mdl.beads.models.ITabModel;
 
     COMPILE::JS
@@ -53,7 +57,7 @@ package org.apache.flex.mdl
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.8
 	 */
-	public class TabBar extends ContainerBase implements IItemRendererParent, ILayoutParent,
ILayoutHost, IChrome
+	public class TabBar extends Group implements IItemRendererParent, ILayoutParent, ILayoutHost,
ILayoutView, IChrome
 	{
 		/**
 		 *  constructor.
@@ -127,12 +131,13 @@ package org.apache.flex.mdl
             ITabModel(model).selectedIndex = value;
         }
 
-        public function getLayoutHost():ILayoutHost
+        override public function getLayoutHost():ILayoutHost
         {
+			// can probably eliminate this function now
             return this;
         }
 
-        public function get contentView():IParentIUIBase
+        public function get contentView():ILayoutView
         {
             return this;
         }
@@ -142,8 +147,28 @@ package org.apache.flex.mdl
             var child:IItemRenderer = getElementAt(index) as IItemRenderer;
             return child;
         }
+		
+		public function addItemRenderer(renderer:IItemRenderer):void
+		{
+			addElement(renderer, true);
+			
+			var newEvent:ItemAddedEvent = new ItemAddedEvent("itemAdded");
+			newEvent.item = renderer;
+			
+			dispatchEvent(newEvent);
+		}
+		
+		public function removeItemRenderer(renderer:IItemRenderer):void
+		{
+			removeElement(renderer, true);
+			
+			var newEvent:ItemRemovedEvent = new ItemRemovedEvent("itemRemoved");
+			newEvent.item = renderer;
+			
+			dispatchEvent(newEvent);
+		}
 
-        public function removeAllElements():void
+        public function removeAllItemRenderers():void
         {
             while (numElements > 0) {
                 var child:IChild = getElementAt(0);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4011d649/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
index a3a16fd..a47f9af 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
@@ -18,13 +18,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-	import org.apache.flex.core.ContainerBase;
     import org.apache.flex.core.IChild;
     import org.apache.flex.core.IItemRenderer;
     import org.apache.flex.core.IItemRendererParent;
     import org.apache.flex.core.ILayoutHost;
+	import org.apache.flex.core.ILayoutView;
     import org.apache.flex.core.ILayoutParent;
     import org.apache.flex.core.IParentIUIBase;
+	import org.apache.flex.html.Group;
+	import org.apache.flex.events.ItemAddedEvent;
+	import org.apache.flex.events.ItemClickedEvent;
+	import org.apache.flex.events.ItemRemovedEvent;
     import org.apache.flex.mdl.beads.models.ITabModel;
 
     COMPILE::JS
@@ -49,7 +53,7 @@ package org.apache.flex.mdl
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.8
 	 */
-	public class Tabs extends ContainerBase implements IItemRendererParent, ILayoutParent, ILayoutHost
+	public class Tabs extends Group implements IItemRendererParent, ILayoutParent, ILayoutHost,
ILayoutView
 	{
 		/**
 		 *  constructor.
@@ -147,8 +151,9 @@ package org.apache.flex.mdl
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-        public function getLayoutHost():ILayoutHost
+        override public function getLayoutHost():ILayoutHost
         {
+			// can probably eliminate this function now
             return this;
         }
 
@@ -160,7 +165,7 @@ package org.apache.flex.mdl
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-        public function get contentView():IParentIUIBase
+        public function get contentView():ILayoutView
         {
             return this;
         }
@@ -178,6 +183,26 @@ package org.apache.flex.mdl
             var child:IItemRenderer = getElementAt(index) as IItemRenderer;
             return child;
         }
+		
+		public function addItemRenderer(renderer:IItemRenderer):void
+		{
+			addElement(renderer, true);
+			
+			var newEvent:ItemAddedEvent = new ItemAddedEvent("itemAdded");
+			newEvent.item = renderer;
+			
+			dispatchEvent(newEvent);
+		}
+		
+		public function removeItemRenderer(renderer:IItemRenderer):void
+		{
+			removeElement(renderer, true);
+			
+			var newEvent:ItemRemovedEvent = new ItemRemovedEvent("itemRemoved");
+			newEvent.item = renderer;
+			
+			dispatchEvent(newEvent);
+		}
 
         /**
          *  remove all elements
@@ -187,7 +212,7 @@ package org.apache.flex.mdl
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.8
          */
-        public function removeAllElements():void
+        public function removeAllItemRenderers():void
         {
             while (numElements > 0) {
                 var child:IChild = getElementAt(0);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4011d649/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayData.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayData.as
index 6197f5b..6548550 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayData.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayData.as
@@ -149,7 +149,7 @@ package org.apache.flex.mdl.beads
                 return;
             }
 
-            dataGroup.removeAllElements();
+            dataGroup.removeAllItemRenderers();
 
             var presentationModel:IListPresentationModel = _strand.getBeadByType(IListPresentationModel)
as IListPresentationModel;
 
@@ -157,7 +157,7 @@ package org.apache.flex.mdl.beads
             for (var i:int = 0; i < n; i++)
             {
                 var ir:ITabItemRenderer = itemRendererFactory.createItemRenderer(dataGroup)
as ITabItemRenderer;
-                dataGroup.addElement(ir);
+                dataGroup.addItemRenderer(ir);
                 ir.index = i;
                 ir.labelField = labelField;
                 ir.tabIdField = tabsIdField;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4011d649/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
index b1c191d..c0650b8 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
@@ -151,7 +151,7 @@ package org.apache.flex.mdl.beads
             if (!dp)
                 return;
 
-            dataGroup.removeAllElements();
+            dataGroup.removeAllItemRenderers();
 
             var presentationModel:IListPresentationModel = _strand.getBeadByType(IListPresentationModel)
as IListPresentationModel;
 
@@ -159,7 +159,7 @@ package org.apache.flex.mdl.beads
             for (var i:int = 0; i < n; i++)
             {
                 var ir:ITabItemRenderer = itemRendererFactory.createItemRenderer(dataGroup)
as ITabItemRenderer;
-                dataGroup.addElement(ir);
+                dataGroup.addItemRenderer(ir);
                 ir.index = i;
                 ir.labelField = labelField;
                 ir.tabIdField = tabsIdField;


Mime
View raw message