You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/12/04 04:31:19 UTC

[royale-asjs] branch develop updated (499a16c -> 10d06fe)

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

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


    from 499a16c  fix selection and highlights in virtual lists.  Should fix #606
     new 0f1bbe0  Revert "show close button.  Needs CSS to position correctly"
     new 10d06fe  fix virtual list for ADG

The 2 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:
 .../apache/royale/html/beads/VirtualListView.as    |  6 +++--
 .../MXRoyale/src/main/resources/defaults.css       |  2 +-
 .../MXRoyale/src/main/royale/MXRoyaleClasses.as    |  1 +
 .../beads/AdvancedDataGridListVirtualListView.as}  | 26 +++++++++-------------
 .../royale/spark/components/beads/PanelView.as     |  3 ---
 5 files changed, 17 insertions(+), 21 deletions(-)
 copy frameworks/projects/MXRoyale/src/main/royale/mx/{collections/errors/SortError.as => containers/beads/AdvancedDataGridListVirtualListView.as} (73%)


[royale-asjs] 02/02: fix virtual list for ADG

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

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

commit 10d06fe0506249b880d04b0599da1c3ceacf9144
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Dec 3 19:30:08 2019 -0800

    fix virtual list for ADG
---
 .../apache/royale/html/beads/VirtualListView.as    |  6 ++-
 .../MXRoyale/src/main/resources/defaults.css       |  2 +-
 .../MXRoyale/src/main/royale/MXRoyaleClasses.as    |  1 +
 .../beads/AdvancedDataGridListVirtualListView.as   | 54 ++++++++++++++++++++++
 4 files changed, 60 insertions(+), 3 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualListView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualListView.as
index b09a77b..6cb55ca 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualListView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VirtualListView.as
@@ -75,19 +75,21 @@ package org.apache.royale.html.beads
 			super.handleInitComplete(event);
 		}
 
+        protected var firstElementIndex:int = 1;
+        
         override public function getItemRendererForIndex(index:int):IItemRenderer
         {
             if (contentView.numElements == 0)
                 return null;
             
-            var firstIndex:int = (contentView.getElementAt(1) as ISelectableItemRenderer).index;
+            var firstIndex:int = (contentView.getElementAt(firstElementIndex) as ISelectableItemRenderer).index;
             
             if (index < firstIndex) 
                 return null;
             if (index > (firstIndex + contentView.numElements))
                 return null;
             
-            return contentView.getElementAt(index - firstIndex + 1) as IItemRenderer;            
+            return contentView.getElementAt(index - firstIndex + firstElementIndex) as IItemRenderer;            
         }
         
 		/**
diff --git a/frameworks/projects/MXRoyale/src/main/resources/defaults.css b/frameworks/projects/MXRoyale/src/main/resources/defaults.css
index ca42c63..5f476fe 100644
--- a/frameworks/projects/MXRoyale/src/main/resources/defaults.css
+++ b/frameworks/projects/MXRoyale/src/main/resources/defaults.css
@@ -97,7 +97,7 @@ AdvancedDataGrid
 adg|AdvancedDataGridColumnList {
 	IBeadModel: ClassReference("mx.controls.beads.models.DataGridColumnICollectionViewModel");
 	IDataProviderItemRendererMapper: ClassReference("mx.controls.advancedDataGridClasses.DataItemRendererFactoryForICollectionViewAdvancedDataGridData");
-	IBeadView:  ClassReference("org.apache.royale.html.beads.VirtualListView");			
+	IBeadView:  ClassReference("mx.containers.beads.AdvancedDataGridListVirtualListView");			
 	IBeadController: ClassReference("mx.controls.advancedDataGridClasses.AdvancedDataGridSingleSelectionMouseController");
 	IBeadLayout: ClassReference("mx.controls.beads.layouts.AdvancedDataGridVirtualListVerticalLayout");
 	IItemRendererClassFactory: ClassReference("org.apache.royale.core.ItemRendererClassFactory");
diff --git a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
index 26088c7..c001742 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
@@ -50,6 +50,7 @@ internal class MXRoyaleClasses
 	import mx.events.ScrollEvent; ScrollEvent;
 	import mx.events.MoveEvent; MoveEvent;
 	import mx.events.ValidationResultEvent; ValidationResultEvent;
+    import mx.containers.beads.AdvancedDataGridListVirtualListView; AdvancedDataGridListVirtualListView;
 	import mx.containers.beads.ApplicationLayout; ApplicationLayout;
 	import mx.containers.beads.BoxLayout; BoxLayout;
     import mx.containers.beads.DividedBoxLayout; DividedBoxLayout;
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/AdvancedDataGridListVirtualListView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/AdvancedDataGridListVirtualListView.as
new file mode 100644
index 0000000..7fb33ab
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/AdvancedDataGridListVirtualListView.as
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.containers.beads
+{
+	import org.apache.royale.html.beads.VirtualListView;
+
+/**
+ *  @private
+ *  The CanvasLayout class is for internal use only.
+ */
+public class AdvancedDataGridListVirtualListView extends VirtualListView
+{
+    
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function AdvancedDataGridListVirtualListView()
+    {
+        super();
+        firstElementIndex = 0;
+    }
+
+}
+}
+


[royale-asjs] 01/02: Revert "show close button. Needs CSS to position correctly"

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

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

commit 0f1bbe09985a41a62940a9cfff344247d1fb3019
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Dec 3 17:16:50 2019 -0800

    Revert "show close button.  Needs CSS to position correctly"
    
    This reverts commit ffa58b856163b1d3e7a8d81771e0785fed7028d5.
---
 .../SparkRoyale/src/main/royale/spark/components/beads/PanelView.as    | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/PanelView.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/PanelView.as
index 44485f1..16bc209 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/PanelView.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/PanelView.as
@@ -65,9 +65,6 @@ public class PanelView extends org.apache.royale.html.beads.PanelView
     {
         titleBar = new PanelTitleBar();
         super.strand = value;
-        var host:SkinnableContainer = _strand as SkinnableContainer;
-        var model:PanelModel = host.model as PanelModel;
-        model.showCloseButton = true;
     }
     
     /**