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/11/21 01:31:04 UTC

[royale-asjs] branch develop updated (ad120ad -> 90c48e0)

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 ad120ad  center mx Alert.  Fixes #565
     new 23080b4  remove import
     new 90c48e0  fill out adg with alternating row colors

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:
 .../MXRoyale/src/main/royale/mx/controls/Alert.as  |  5 +---
 .../beads/DataGridLinesBeadForICollectionView.as   | 28 ++++++++++++++++------
 2 files changed, 22 insertions(+), 11 deletions(-)


[royale-asjs] 01/02: remove import

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

View the commit online:
https://github.com/apache/royale-asjs/commit/23080b4224a9ca691ab8fe7c37eef8bf138523b8

commit 23080b4224a9ca691ab8fe7c37eef8bf138523b8
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Nov 20 17:30:31 2019 -0800

    remove import
---
 frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as
index a49af67..4f1c3f9 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as
@@ -18,10 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 package mx.controls
-{
-
-    import flash.events.EventPhase;
-    
+{    
     import mx.containers.Panel;
     import mx.core.FlexGlobals;
     import mx.core.IFlexDisplayObject;


[royale-asjs] 02/02: fill out adg with alternating row colors

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

View the commit online:
https://github.com/apache/royale-asjs/commit/90c48e0899edb7d88b950d9cf92b2c42bd7a5c62

commit 90c48e0899edb7d88b950d9cf92b2c42bd7a5c62
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Nov 20 17:30:51 2019 -0800

    fill out adg with alternating row colors
---
 .../beads/DataGridLinesBeadForICollectionView.as   | 28 ++++++++++++++++------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/DataGridLinesBeadForICollectionView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/DataGridLinesBeadForICollectionView.as
index af8f51f..54ada07 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/DataGridLinesBeadForICollectionView.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/DataGridLinesBeadForICollectionView.as
@@ -19,6 +19,8 @@
 package mx.controls.beads
 {
     import mx.collections.ICollectionView;
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
+    import mx.core.UIComponent;
     
     import org.apache.royale.core.IBeadModel;
     import org.apache.royale.core.IDataGridModel;
@@ -30,7 +32,6 @@ package mx.controls.beads
     import org.apache.royale.graphics.SolidColorStroke;
     import org.apache.royale.html.beads.DataGridLinesBead;
     import org.apache.royale.html.beads.models.DataGridPresentationModel;
-    import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
     
 	public class DataGridLinesBeadForICollectionView extends DataGridLinesBead
 	{
@@ -75,6 +76,8 @@ package mx.controls.beads
             var rowHeight:Number = presentationModel.rowHeight;
             var n:int = getDataProviderLength();
             var totalHeight:Number = n * rowHeight;
+            if (totalHeight < contentView.height)
+                totalHeight = contentView.height;
             
             // translate the stroke to a fill since rectangles are used for the grid
             // lines and not lines.
@@ -93,6 +96,23 @@ package mx.controls.beads
             
             _overlay.clear();
             
+            // draw the horizontals
+            if (contentView.height > n * rowHeight)
+            {
+                var bgColors:Array = (_strand as UIComponent).getStyle("alternatingItemColors");
+                var yy:Number = n * rowHeight;
+                
+                var bgFill0:SolidColor = new SolidColor();
+                bgFill0.color = bgColors[0];
+                var bgFill1:SolidColor = new SolidColor();
+                bgFill1.color = bgColors[1];
+                for (i=n; yy < contentView.height; i++, yy += rowHeight) {
+                    _overlay.fill = (i % 2 == 1) ? bgFill1 : bgFill0;
+                    _overlay.drawRect(0, yy, _area.width, rowHeight);
+                }                
+            }
+            
+            _overlay.fill = lineFill;            
             // draw the verticals
             for (var i:int=0; i < columns.length - 1; i++) {
                 var column:AdvancedDataGridColumn = columns[i] as AdvancedDataGridColumn;
@@ -103,12 +123,6 @@ package mx.controls.beads
                 }
             }
             
-            /*
-            // draw the horizontals
-            for (i=1; i < n+1; i++) {
-                _overlay.drawRect(0, i*rowHeight, _area.width, weight);
-            }
-            */
         }
 
 	}