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

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

commit 38599c2675cb8019d793b285e120a2179686d1e3
Author: Carlos Rovira <[email protected]>
AuthorDate: Sun Jun 7 20:23:27 2020 +0200

    StyledLayoutBase: add LayoutChildren bead support
---
 .../royale/jewel/beads/layouts/StyledLayoutBase.as | 34 +++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/StyledLayoutBase.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/StyledLayoutBase.as
index 7f0f46e..e25b588 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/StyledLayoutBase.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/StyledLayoutBase.as
@@ -25,8 +25,10 @@ package org.apache.royale.jewel.beads.layouts
        import org.apache.royale.core.LayoutBase;
        import org.apache.royale.core.StyledUIBase;
        import org.apache.royale.core.ValuesManager;
+       import org.apache.royale.core.layout.ILayoutChildren;
        import org.apache.royale.core.layout.ILayoutStyleProperties;
        import org.apache.royale.events.Event;
+       import org.apache.royale.utils.loadBeadFromValuesManager;
        import org.apache.royale.utils.sendStrandEvent;
        
     /**
@@ -329,7 +331,9 @@ package org.apache.royale.jewel.beads.layouts
                public function executeLayout():void
                {
                        if (layout()) {
-                               viewBead.afterLayout();
+                               if(layoutChildren)
+                                       layoutChildren.executeLayoutChildren();
+                               viewBead.afterLayout(); 
                        }
 
                        isLayoutRunning = false;
@@ -351,5 +355,33 @@ package org.apache.royale.jewel.beads.layouts
                        }
                        */
                }
+
+               private var _layoutChildren:ILayoutChildren;
+        
+        /**
+         *  The org.apache.royale.core.ILayoutChildren used 
+         *  to initialize instances of item renderers.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.10.0
+         *  @royaleignorecoercion 
org.apache.royale.core.IItemRendererInitializer
+         */
+        public function get layoutChildren():ILayoutChildren
+        {
+            if(!_layoutChildren)
+                _layoutChildren = loadBeadFromValuesManager(ILayoutChildren, 
"iItemRendererInitializer", _strand) as ILayoutChildren;
+            
+            return _layoutChildren;
+        }
+        
+        /**
+         *  @private
+         */
+        public function set layoutChildren(value:ILayoutChildren):void
+        {
+            _layoutChildren = value;
+        }
        }
 }

Reply via email to