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

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


The following commit(s) were added to refs/heads/feature/DividedBox by this 
push:
     new 99d9c89  Figured out a better way to load the divider classes per 
divider type: declare in CSS and load via ValuesManager.
99d9c89 is described below

commit 99d9c89b8bbe859347d9a38f1d1b4d604960d4e0
Author: Peter Ent <p...@apache.org>
AuthorDate: Wed Feb 14 15:20:01 2018 -0500

    Figured out a better way to load the divider classes per divider type: 
declare in CSS and load via ValuesManager.
---
 .../projects/Basic/src/main/resources/defaults.css |  6 ++-
 .../projects/Basic/src/main/royale/BasicClasses.as |  3 +-
 .../org/apache/royale/html/beads/DividedBoxView.as | 16 +------
 .../apache/royale/html/beads/HDividedBoxView.as    | 55 ----------------------
 .../apache/royale/html/beads/VDividedBoxView.as    | 55 ----------------------
 .../html/supportClasses/HDividedBoxGripper.as      |  1 -
 6 files changed, 7 insertions(+), 129 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/resources/defaults.css 
b/frameworks/projects/Basic/src/main/resources/defaults.css
index 1bec7dc..80f2cca 100644
--- a/frameworks/projects/Basic/src/main/resources/defaults.css
+++ b/frameworks/projects/Basic/src/main/resources/defaults.css
@@ -310,15 +310,17 @@ DateField {
 /** DividedBox */
 
 HDividedBox {
-       IBeadView: 
ClassReference("org.apache.royale.html.beads.HDividedBoxView");
+       IBeadView: 
ClassReference("org.apache.royale.html.beads.DividedBoxView");
        IBeadModel: 
ClassReference("org.apache.royale.html.beads.models.DividedBoxModel");
        IBeadLayout: 
ClassReference("org.apache.royale.html.beads.layouts.HDividedBoxLayout");
+       IDividerFactory: 
ClassReference("org.apache.royale.html.supportClasses.HDividedBoxDivider");
 }
 
 VDividedBox {
-       IBeadView: 
ClassReference("org.apache.royale.html.beads.VDividedBoxView");
+       IBeadView: 
ClassReference("org.apache.royale.html.beads.DividedBoxView");
        IBeadModel: 
ClassReference("org.apache.royale.html.beads.models.DividedBoxModel");
        IBeadLayout: 
ClassReference("org.apache.royale.html.beads.layouts.VDividedBoxLayout");
+       IDividerFactory: 
ClassReference("org.apache.royale.html.supportClasses.VDividedBoxDivider");
 }
 
 HDividedBoxDivider {
diff --git a/frameworks/projects/Basic/src/main/royale/BasicClasses.as 
b/frameworks/projects/Basic/src/main/royale/BasicClasses.as
index ef44fb7..437ae86 100644
--- a/frameworks/projects/Basic/src/main/royale/BasicClasses.as
+++ b/frameworks/projects/Basic/src/main/royale/BasicClasses.as
@@ -41,8 +41,7 @@ internal class BasicClasses
     import org.apache.royale.html.beads.AlertView; AlertView;
     import org.apache.royale.html.beads.controllers.AlertController; 
AlertController;
        
-       import org.apache.royale.html.beads.HDividedBoxView; HDividedBoxView;
-       import org.apache.royale.html.beads.VDividedBoxView; VDividedBoxView;
+       import org.apache.royale.html.beads.DividedBoxView; DividedBoxView;
        import org.apache.royale.html.beads.models.DividedBoxModel; 
DividedBoxModel;
        import org.apache.royale.html.beads.layouts.HDividedBoxLayout; 
HDividedBoxLayout;
        import org.apache.royale.html.beads.layouts.VDividedBoxLayout; 
VDividedBoxLayout;
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DividedBoxView.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DividedBoxView.as
index 9ad0dfb..56f61cd 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DividedBoxView.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DividedBoxView.as
@@ -22,6 +22,7 @@ package org.apache.royale.html.beads
        import org.apache.royale.core.IStrand;
        import org.apache.royale.core.IUIBase;
        import org.apache.royale.core.UIBase;
+       import org.apache.royale.core.ValuesManager;
        import org.apache.royale.events.Event;
        import org.apache.royale.events.IEventDispatcher;
        import org.apache.royale.html.DividedBox;
@@ -76,19 +77,6 @@ package org.apache.royale.html.beads
                }
                
                /**
-                * A sub-class should create an instance of a DividedBoxDivider 
and return it.
-                *  
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion Royale 0.9
-                */
-               protected function createSeparator():IDividedBoxDivider
-               {
-                       return null;
-               }
-               
-               /**
                 * Handles the "childrenAdded" event and generates the 
separators between them
                 * based on the direction of the box.
                 *  
@@ -106,7 +94,7 @@ package org.apache.royale.html.beads
                        var adjustments:Array = [];
                        if (n > 1) {
                                for(var i:int=0; i < (n-1); i++) {
-                                       var sep:IDividedBoxDivider = 
createSeparator();
+                                       var sep:IDividedBoxDivider = 
ValuesManager.valuesImpl.newInstance(_strand, "iDividerFactory") as 
IDividedBoxDivider;
                                        (host as UIBase).addElement(sep);
                                        seps.push(sep);
                                        adjustments.push(0);
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/HDividedBoxView.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/HDividedBoxView.as
deleted file mode 100644
index 59f4624..0000000
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/HDividedBoxView.as
+++ /dev/null
@@ -1,55 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 org.apache.royale.html.beads
-{
-       import org.apache.royale.html.supportClasses.HDividedBoxDivider;
-       import org.apache.royale.html.supportClasses.IDividedBoxDivider;
-
-       /**
-        * Creates a horizontal DividedBoxDivider.
-        *  
-        *  @langversion 3.0
-        *  @playerversion Flash 10.2
-        *  @playerversion AIR 2.6
-        *  @productversion Royale 0.9
-        */
-       public class HDividedBoxView extends DividedBoxView
-       {
-               /**
-                * Constructor.
-                *  
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion Royale 0.9
-                */
-               public function HDividedBoxView()
-               {
-                       super();
-               }
-               
-               /**
-                * @private
-                */
-               override protected function createSeparator():IDividedBoxDivider
-               {
-                       return new HDividedBoxDivider();
-               }
-       }
-}
\ No newline at end of file
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VDividedBoxView.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VDividedBoxView.as
deleted file mode 100644
index 80b28fe..0000000
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/VDividedBoxView.as
+++ /dev/null
@@ -1,55 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 org.apache.royale.html.beads
-{
-       import org.apache.royale.html.supportClasses.IDividedBoxDivider;
-       import org.apache.royale.html.supportClasses.VDividedBoxDivider;
-
-       /**
-        * Creates a vertical DividerBoxDivider.
-        *  
-        *  @langversion 3.0
-        *  @playerversion Flash 10.2
-        *  @playerversion AIR 2.6
-        *  @productversion Royale 0.9
-        */
-       public class VDividedBoxView extends DividedBoxView
-       {
-               /**
-                * Constructor.
-                *  
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion Royale 0.9
-                */
-               public function VDividedBoxView()
-               {
-                       super();
-               }
-               
-               /**
-                * @private
-                */
-               override protected function createSeparator():IDividedBoxDivider
-               {
-                       return new VDividedBoxDivider();
-               }
-       }
-}
\ No newline at end of file
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/HDividedBoxGripper.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/HDividedBoxGripper.as
index 200c512..3192d5c 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/HDividedBoxGripper.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/HDividedBoxGripper.as
@@ -23,7 +23,6 @@ package org.apache.royale.html.supportClasses
        import org.apache.royale.core.UIBase;
        import org.apache.royale.events.Event;
        import org.apache.royale.events.IEventDispatcher;
-       import org.apache.royale.graphics.SolidColor;
        import org.apache.royale.graphics.SolidColorStroke;
        import org.apache.royale.svg.Path;
 

-- 
To stop receiving notification emails like this one, please contact
p...@apache.org.

Reply via email to