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

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


The following commit(s) were added to refs/heads/feature/MXRoyale by this push:
     new 914592a  Added HBox and VBox
914592a is described below

commit 914592ac6a8cd5bc962f987bf6f620f38eb503b7
Author: Peter Ent <[email protected]>
AuthorDate: Wed Mar 14 16:59:53 2018 -0400

    Added HBox and VBox
---
 .../src/main/resources/mx-royale-manifest.xml      |   3 +-
 .../MXRoyale/src/main/royale/mx/containers/HBox.as | 120 +++++++++++++++++++++
 .../MXRoyale/src/main/royale/mx/containers/VBox.as | 116 ++++++++++++++++++++
 3 files changed, 238 insertions(+), 1 deletion(-)

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 654f834..b2f5a87 100644
--- a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
+++ b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
@@ -32,5 +32,6 @@
        
        <component id="Box" class="mx.containers.Box" />
        <component id="Container" class="mx.core.Container" />
-       
+       <component id="HBox" class="mx.containers.HBox" />
+       <component id="VBox" class="mx.containers.VBox" />      
 </componentPackage>
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/HBox.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/HBox.as
new file mode 100644
index 0000000..4374e05
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/HBox.as
@@ -0,0 +1,120 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+/*
+import mx.core.mx_internal;
+use namespace mx_internal;
+*/
+
+/**
+ *  The Halo HBox container lays out its children in a single horizontal row.
+ *  You use the <code>&lt;mx:HBox&gt;</code> tag instead of the
+ *  <code>&lt;mx:Box&gt;</code> tag as a shortcut to avoid having to
+ *  set the <code>direction</code> property to
+ *  <code>"horizontal"</code>.
+ * 
+ *  <p><b>Note:</b> Adobe recommends that, when possible, you use the Spark 
containers 
+ *  with HorizontalLayout instead of the Halo HBox container.</p>
+ *
+ *  <p>An HBox container has the following default sizing characteristics:</p>
+ *     <table class="innertable">
+ *        <tr>
+ *           <th>Characteristic</th>
+ *           <th>Description</th>
+ *        </tr>
+ *        <tr>
+ *           <td>Default size</td>
+ *           <td>The width is large enough to hold all its children at the 
default or explicit width of the children, 
+ *               plus any horizontal gap between the children, plus the left 
and right padding of the container. 
+ *               The height is the default or explicit height of the tallest 
child, 
+ *               plus the top and bottom padding for the container.
+ *           </td>
+ *        </tr>
+ *        <tr>
+ *           <td>Default padding</td>
+ *           <td>0 pixels for the top, bottom, left, and right values.</td>
+ *        </tr>
+ *     </table>
+ *
+ *  @mxml
+ *  
+ *  <p>The <code>&lt;mx:HBox&gt;</code> tag inherits all of the tag 
+ *  attributes of its superclass, except <code>direction</code>, and adds 
+ *  no new tag attributes.</p>
+ *
+ *  @includeExample examples/HBoxExample.mxml
+ *
+ *  @see mx.core.Container
+ *  @see mx.containers.Box
+ *  @see mx.containers.VBox
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class HBox extends Box
+{
+
+    
//--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    
//--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function HBox()
+    {
+        super();
+        
+        super.direction = BoxDirection.HORIZONTAL;
+    }
+
+    
//--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    
//--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  direction
+    //----------------------------------
+    
+    [Inspectable(environment="none")]   
+
+    /**
+     *  @private
+     *  Don't allow user to change the direction
+     */
+    override public function set direction(value:String):void
+    {
+    }
+
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/VBox.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/VBox.as
new file mode 100644
index 0000000..0278848
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/VBox.as
@@ -0,0 +1,116 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+/*
+import mx.core.mx_internal;
+use namespace mx_internal;
+*/
+
+/**
+ *  The Halo VBox container lays out its children in a single vertical column.
+ *  You use the <code>&lt;mx:VBox&gt;</code> tag instead of the
+ *  <code>&lt;mx:Box&gt;</code> tag as a shortcut to avoid having to
+ *  set the <code>direction</code> property to <code>"vertical"</code>.
+ * 
+ *  <p><b>Note:</b> Adobe recommends that, when possible, you use the Spark 
containers 
+ *  with VerticalLayout instead of the Halo VBox container.</p>
+ *
+ *  <p>An VBox container has the following default sizing characteristics:</p>
+ *     <table class="innertable">
+ *        <tr>
+ *           <th>Characteristic</th>
+ *           <th>Description</th>
+ *        </tr>
+ *        <tr>
+ *           <td>Default size</td>
+ *           <td>The height is large enough to hold all its children at the 
default or explicit height of the children, 
+ *               plus any vertical gap between the children, plus the top and 
bottom padding of the container.
+ *               The width is the default or explicit width of the widest 
child, plus the left and right padding of the container.
+ *           </td>
+ *        </tr>
+ *        <tr>
+ *           <td>Default padding</td>
+ *           <td>0 pixels for the top, bottom, left, and right values.</td>
+ *        </tr>
+ *     </table>
+ *
+ *  @mxml
+ *  
+ *  <p>The <code>&lt;mx:VBox&gt;</code> tag inherits all of the tag 
+ *  attributes of its superclass, except <code>direction</code>, and adds 
+ *  no new tag attributes.</p></p>
+ *  
+ *  @includeExample examples/VBoxExample.mxml
+ *
+ *  @see mx.core.Container
+ *  @see mx.containers.Box
+ *  @see mx.containers.HBox
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class VBox extends Box
+{    
+    
//--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    
//--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function VBox()
+    {
+        super();
+        
+        super.direction = BoxDirection.VERTICAL;
+    }
+    
+    
//--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    
//--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  direction
+    //----------------------------------
+    
+    [Inspectable(environment="none")]   
+
+    /**
+     *  @private
+     *  Don't allow user to change the direction
+     */
+    override public function set direction(value:String):void
+    {
+    }
+}
+
+}

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to