You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2020/10/22 08:23:45 UTC

[royale-asjs] branch develop updated (78792d7 -> 38cf5ac)

This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.


    from 78792d7  Update MXRoyaleClasses.as
     new 6951466  Add datagrid item renderer to manifest
     new 300bbf4  Emulation stubs
     new 38cf5ac  Merge branch 'develop' of https://github.com/apache/royale-asjs into develop

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/resources/mx-royale-manifest.xml      |   1 +
 .../MXRoyale/src/main/royale/mx/controls/Tree.as   | 246 +++++++++++----------
 .../mx/controls/listClasses/DataGridListBase.as    |  24 +-
 .../src/main/royale/spark/components/List.as       |  60 ++---
 4 files changed, 169 insertions(+), 162 deletions(-)


[royale-asjs] 03/03: Merge branch 'develop' of https://github.com/apache/royale-asjs into develop

Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 38cf5acb464d1996ffcfc98c107b0047919adc36
Merge: 300bbf4 78792d7
Author: Yishay Weiss <yi...@yell.com>
AuthorDate: Thu Oct 22 09:11:58 2020 +0100

    Merge branch 'develop' of https://github.com/apache/royale-asjs into develop

 .../MXRoyale/src/main/royale/MXRoyaleClasses.as    |   1 +
 .../src/main/royale/mx/core/BitmapAsset.as         | 155 +++++++++++++++++++++
 2 files changed, 156 insertions(+)


[royale-asjs] 01/03: Add datagrid item renderer to manifest

Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 695146607ea91982ecffb88f026d60c404919ea1
Author: Yishay Weiss <yi...@yell.com>
AuthorDate: Thu Oct 22 09:10:54 2020 +0100

    Add datagrid item renderer to manifest
---
 frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
index efe5e09..d69dfeb 100644
--- a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
+++ b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
@@ -134,6 +134,7 @@
 	<component id="GridRow" class="mx.containers.GridRow"/>
 	<component id="Parallel" class="mx.effects.Parallel"/>
 	<component id="Fade" class="mx.effects.Fade"/>
+	<component id="DataGridItemRenderer" class="mx.controls.dataGridClasses.DataGridItemRenderer" />
 	<component id="AdvancedDataGridItemRenderer" class="mx.controls.advancedDataGridClasses.AdvancedDataGridItemRenderer" />
 	<component id="Tree" class="mx.controls.Tree"/>
 	<component id="LinkBar" class="mx.controls.LinkBar"/>


[royale-asjs] 02/03: Emulation stubs

Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 300bbf446882ba7b52546ad4032a36860b94b35d
Author: Yishay Weiss <yi...@yell.com>
AuthorDate: Thu Oct 22 09:11:47 2020 +0100

    Emulation stubs
---
 .../MXRoyale/src/main/royale/mx/controls/Tree.as   | 246 +++++++++++----------
 .../mx/controls/listClasses/DataGridListBase.as    |  24 +-
 .../src/main/royale/spark/components/List.as       |  60 ++---
 3 files changed, 168 insertions(+), 162 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Tree.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Tree.as
index f3df2e5..b55559e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Tree.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Tree.as
@@ -1283,35 +1283,36 @@ public class Tree extends List
      *  @private
      *  Position indicator bar that shows where an item will be placed in the list.
      */
-    /* override public function showDropFeedback(event:DragEvent):void
-    {
-        super.showDropFeedback(event);
-        // Adjust for indent
-        var vm:EdgeMetrics = viewMetrics;
-        var offset:int = 0;
-        updateDropData(event);
-        var indent:int = 0;
-        var depth:int;
-        if (_dropData.parent)
-        {
-            offset = getItemIndex(iterator.current);
-            depth = getItemDepth(_dropData.parent, Math.abs(offset - getItemIndex(_dropData.parent)));
-            indent = (depth + 1) * getStyle("indentation");
-        }
-        else 
-        {
-            indent = getStyle("indentation");
-        }
-        if (indent < 0)
-            indent = 0;
-        //position drop indicator
-        dropIndicator.width = listContent.width - indent;
-        dropIndicator.x = indent + vm.left + 2;
-        if (_dropData.emptyFolder)
-        {
-            dropIndicator.y += _dropData.rowHeight / 2;
-        }
-    } */
+	// not implemented
+    /*override */public function showDropFeedback(event:DragEvent):void
+    {
+        //super.showDropFeedback(event);
+        //// Adjust for indent
+        //var vm:EdgeMetrics = viewMetrics;
+        //var offset:int = 0;
+        //updateDropData(event);
+        //var indent:int = 0;
+        //var depth:int;
+        //if (_dropData.parent)
+        //{
+            //offset = getItemIndex(iterator.current);
+            //depth = getItemDepth(_dropData.parent, Math.abs(offset - getItemIndex(_dropData.parent)));
+            //indent = (depth + 1) * getStyle("indentation");
+        //}
+        //else 
+        //{
+            //indent = getStyle("indentation");
+        //}
+        //if (indent < 0)
+            //indent = 0;
+        ////position drop indicator
+        //dropIndicator.width = listContent.width - indent;
+        //dropIndicator.x = indent + vm.left + 2;
+        //if (_dropData.emptyFolder)
+        //{
+            //dropIndicator.y += _dropData.rowHeight / 2;
+        //}
+    }
 
     /**
      *  @private
@@ -3383,100 +3384,101 @@ public class Tree extends List
      *  @playerversion AIR 1.1
      *  @productversion Royale 0.9.3
      */
-    /* override protected function dragDropHandler(event:DragEvent):void
+ 	// not implemented
+    /* override */protected function dragDropHandler(event:DragEvent):void
     {
-        if (event.isDefaultPrevented())
-            return;
-
-        hideDropFeedback(event);
-
-		if (event.dragSource.hasFormat("treeItems"))
-		{
-        	var items:Array = event.dragSource.dataForFormat("treeItems") as Array;
-        	var i:int;
-        	var n:int;
-            	
-			// if we're moving to ourselves, we need to treat it specially and check for "parent" 
-			// problems where we could recurse forever.
-			if (event.action == DragManager.MOVE && dragMoveEnabled)
-			{
-				if (event.dragInitiator == this)
-				{
-					// If we're dropping onto ourselves or a child of a descendant then dont actually drop
-					
-					calculateDropIndex(event);
-									
-					// If we did start this drag op then we need to remove first
-					var index:int;
-					var parent:*;
-					var parentItem:*;
-					var dropIndex:int = _dropData.index;
-                
-					//get ancestors of the drop target item
-					var dropParentStack:Array = getParentStack(_dropData.parent);
-					dropParentStack.unshift(_dropData.parent);
-                
-					n = items.length;
-					for (i = 0; i < n; i++) 
-					{ 
-						parent = getParentItem(items[i]);
-						index = getChildIndexInParent(parent, items[i]);
-						//check ancestors of the dropTarget if the item matches, we're invalid
-                    
-						for each (parentItem in dropParentStack)
-						{ 
-							//we dont want to drop into one of our own sets of children
-							if (items[i] === parentItem)
-								return;
-						}
-                    
-						//we remove before we add due to the behavior 
-						//of structures with parent pointers like e4x
-						removeChildItem(parent, items[i], index);
-                    
-						//is the removed item before the drop location?
-						// then we need to shift the dropIndex accordingly
-						if (parent == _dropData.parent && index < _dropData.index)
-                        	dropIndex--;
-                    
-						addChildItem(_dropData.parent, items[i], dropIndex);
-					}
-                
-					return;
-				}
-			}
-        
-			// If not dropping onto ourselves, then add the 
-			// items here if it's a copy operation.
-			// If it's a move operation (and not on ourselves), then they 
-			// are added in dragCompleteHandler and are removed from 
-			// the source's dragCompleteHandler.  We do both in dragCompleteHandler
-			// because in order to be re-parented, they must be removed from their
-			// original source FIRST.  This means our code isn't coupled fantastically 
-			// as dragCompleteHandler must get the destination tree and 
-			// cast it to a Tree.
-        
-			if (event.action == DragManager.COPY)
-			{
-				if (!dataProvider) {
-					// Create an empty collection to drop items into.
-					dataProvider = [];
-					validateNow();
-				}
-				
-				n = items.length;
-				for (i = 0; i < n; i++) 
-				{ 
-	            	var item:Object = copyItemWithUID(items[i]);
-	            	
-					addChildItem(_dropData.parent, 
-	                   			 item, 
-	                       		 _dropData.index);
-				}
-	    	}
-		}
-		lastDragEvent = null;
-    } */
+        //if (event.isDefaultPrevented())
+            //return;
+//
+        //hideDropFeedback(event);
+//
+		//if (event.dragSource.hasFormat("treeItems"))
+		//{
+        	//var items:Array = event.dragSource.dataForFormat("treeItems") as Array;
+        	//var i:int;
+        	//var n:int;
+            	//
+			//// if we're moving to ourselves, we need to treat it specially and check for "parent" 
+			//// problems where we could recurse forever.
+			//if (event.action == DragManager.MOVE && dragMoveEnabled)
+			//{
+				//if (event.dragInitiator == this)
+				//{
+					//// If we're dropping onto ourselves or a child of a descendant then dont actually drop
+					//
+					//calculateDropIndex(event);
+									//
+					//// If we did start this drag op then we need to remove first
+					//var index:int;
+					//var parent:*;
+					//var parentItem:*;
+					//var dropIndex:int = _dropData.index;
+                //
+					////get ancestors of the drop target item
+					//var dropParentStack:Array = getParentStack(_dropData.parent);
+					//dropParentStack.unshift(_dropData.parent);
+                //
+					//n = items.length;
+					//for (i = 0; i < n; i++) 
+					//{ 
+						//parent = getParentItem(items[i]);
+						//index = getChildIndexInParent(parent, items[i]);
+						////check ancestors of the dropTarget if the item matches, we're invalid
+                    //
+						//for each (parentItem in dropParentStack)
+						//{ 
+							////we dont want to drop into one of our own sets of children
+							//if (items[i] === parentItem)
+								//return;
+						//}
+                    //
+						////we remove before we add due to the behavior 
+						////of structures with parent pointers like e4x
+						//removeChildItem(parent, items[i], index);
+                    //
+						////is the removed item before the drop location?
+						//// then we need to shift the dropIndex accordingly
+						//if (parent == _dropData.parent && index < _dropData.index)
+                        	//dropIndex--;
+                    //
+						//addChildItem(_dropData.parent, items[i], dropIndex);
+					//}
+                //
+					//return;
+				//}
+			//}
+        //
+			//// If not dropping onto ourselves, then add the 
+			//// items here if it's a copy operation.
+			//// If it's a move operation (and not on ourselves), then they 
+			//// are added in dragCompleteHandler and are removed from 
+			//// the source's dragCompleteHandler.  We do both in dragCompleteHandler
+			//// because in order to be re-parented, they must be removed from their
+			//// original source FIRST.  This means our code isn't coupled fantastically 
+			//// as dragCompleteHandler must get the destination tree and 
+			//// cast it to a Tree.
+        //
+			//if (event.action == DragManager.COPY)
+			//{
+				//if (!dataProvider) {
+					//// Create an empty collection to drop items into.
+					//dataProvider = [];
+					//validateNow();
+				//}
+				//
+				//n = items.length;
+				//for (i = 0; i < n; i++) 
+				//{ 
+	            	//var item:Object = copyItemWithUID(items[i]);
+	            	//
+					//addChildItem(_dropData.parent, 
+	                   			 //item, 
+	                       		 //_dropData.index);
+				//}
+	    	//}
+		//}
+		//lastDragEvent = null;
+    }
 
     /**
      *  Handles <code>DragEvent.DRAG_COMPLETE</code> events.  This method
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/DataGridListBase.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/DataGridListBase.as
index 52416b1..29dc2f9 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/DataGridListBase.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/DataGridListBase.as
@@ -21,6 +21,7 @@
 package mx.controls.listClasses
 {
 import mx.controls.dataGridClasses.DataGridColumnList;
+import mx.events.DragEvent;
 
 /* import flash.display.DisplayObject;
 import flash.display.Graphics;
@@ -9222,18 +9223,19 @@ public class DataGridListBase extends ListBase /* extends UIComponent
      *  @playerversion AIR 1.1
      *  @productversion Royale 0.9.4
      */
-   /*  protected function dragStartHandler(event:DragEvent):void
+// not implemented
+    protected function dragStartHandler(event:DragEvent):void
     {
-        if (event.isDefaultPrevented())
-            return;
-
-        var dragSource:DragSource = new DragSource();
-
-        addDragData(dragSource);
-
-        DragManager.doDrag(this, dragSource, event, dragImage,
-                           0, 0, 0.5, dragMoveEnabled);
-    } */
+        //if (event.isDefaultPrevented())
+            //return;
+//
+        //var dragSource:DragSource = new DragSource();
+//
+        //addDragData(dragSource);
+//
+        //DragManager.doDrag(this, dragSource, event, dragImage,
+                           //0, 0, 0.5, dragMoveEnabled);
+    }
 
     /**
      *  Handles <code>DragEvent.DRAG_ENTER</code> events.  This method
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/List.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/List.as
index 8744367..81cf37f 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/List.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/List.as
@@ -1738,8 +1738,9 @@ public class List extends ListBase implements IFocusManagerComponent
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    // protected function dragStartHandler(event:DragEvent):void
-    // {
+	// not implemented
+    protected function dragStartHandler(event:DragEvent):void
+    {
         // if (event.isDefaultPrevented())
             // return;
         
@@ -1753,7 +1754,7 @@ public class List extends ListBase implements IFocusManagerComponent
                            // 0 /*yOffset*/, 
                            // 0.5 /*imageAlpha*/, 
                            // dragMoveEnabled);
-    // } 
+    } 
     
     /**
      *  @private
@@ -1776,33 +1777,34 @@ public class List extends ListBase implements IFocusManagerComponent
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    /* protected function dragCompleteHandler(event:DragEvent):void
+	// not implemented
+    protected function dragCompleteHandler(event:DragEvent):void
     {
-        if (event.isDefaultPrevented())
-            return;
-        
-        // Remove the dragged items only if they were drag moved to
-        // a different list. If the items were drag moved to this
-        // list, the reordering was already handles in the 
-        // DragEvent.DRAG_DROP listener.
-        if (!dragMoveEnabled ||
-            event.action != DragManager.MOVE || 
-            event.relatedObject == this)
-            return;
-        
-        // Clear the selection, but remember which items were moved
-        var movedIndices:Vector.<int> = selectedIndices;
-        setSelectedIndices(new Vector.<int>(), true);
-        validateProperties(); // To commit the selection
-        
-        // Remove the moved items
-        movedIndices.sort(compareValues);
-        var count:int = movedIndices.length;
-        for (var i:int = count - 1; i >= 0; i--)
-        {
-            dataProvider.removeItemAt(movedIndices[i]);
-        }
-    } */
+        //if (event.isDefaultPrevented())
+            //return;
+        //
+        //// Remove the dragged items only if they were drag moved to
+        //// a different list. If the items were drag moved to this
+        //// list, the reordering was already handles in the 
+        //// DragEvent.DRAG_DROP listener.
+        //if (!dragMoveEnabled ||
+            //event.action != DragManager.MOVE || 
+            //event.relatedObject == this)
+            //return;
+        //
+        //// Clear the selection, but remember which items were moved
+        //var movedIndices:Vector.<int> = selectedIndices;
+        //setSelectedIndices(new Vector.<int>(), true);
+        //validateProperties(); // To commit the selection
+        //
+        //// Remove the moved items
+        //movedIndices.sort(compareValues);
+        //var count:int = movedIndices.length;
+        //for (var i:int = count - 1; i >= 0; i--)
+        //{
+            //dataProvider.removeItemAt(movedIndices[i]);
+        //}
+    }
     
     /**
      *  Creates an instance of a class that is used to display the visuals