You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pe...@apache.org on 2018/03/28 19:25:13 UTC

[royale-asjs] branch feature/MXRoyale updated: Spacer

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 392a0a3  Spacer
392a0a3 is described below

commit 392a0a3f53795819c4972d2cb99872af985d8426
Author: Peter Ent <pe...@apache.org>
AuthorDate: Wed Mar 28 15:25:06 2018 -0400

    Spacer
---
 .../src/main/resources/mx-royale-manifest.xml      |  1 +
 .../MXRoyale/src/main/royale/mx/controls/Spacer.as | 82 ++++++++++++++++++++++
 2 files changed, 83 insertions(+)

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 1448a50..ca118ab 100644
--- a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
+++ b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
@@ -28,6 +28,7 @@
 	<component id="Label" class="mx.controls.Label" />
 	<component id="RadioButton" class="mx.controls.RadioButton" />
 	<component id="RadioButtonGroup" class="mx.controls.RadioButtonGroup" />
+	<component id="Spacer" class="mx.controls.Spacer" />
 	<component id="Text" class="mx.controls.Text" />
 	<component id="TextArea" class="mx.controls.TextArea" />
 	<component id="TextInput" class="mx.controls.TextInput" />
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Spacer.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Spacer.as
new file mode 100644
index 0000000..3740222
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Spacer.as
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.controls
+{
+
+import mx.core.UIComponent;
+
+/**
+ *  The Spacer control helps you lay out children within a parent container.
+ *  Although the Spacer control does not draw anything, it does allocate space
+ *  for itself within its parent container. 
+ *  
+ *  <p>In the following example, a flexible Spacer control is used
+ *  to push the Button control to the right, so that the Button control
+ *  is aligned with the right edge of the HBox container:</p>
+ *
+ *  <pre>
+ *  &lt;mx:HBox&gt;
+ *      &lt;mx:Image source="Logo.jpg"/&gt;
+ *      &lt;mx:Label text="Company XYZ"/&gt;
+ *      &lt;mx:Spacer width="100%"/&gt;
+ *      &lt;mx:Button label="Close"/&gt;
+ *  &lt;/mx:HBox&gt;
+ *  </pre>
+ *
+ *  @mxml
+ *  
+ *  <p>The <code>&lt;mx:Spacer&gt;</code> tag inherits all of the tag attributes
+ *  of its superclass, and adds no new tag attributes.</p>
+ *  
+ *  <pre>
+ *  &lt;mx:Spacer/&gt;
+ *  </pre>
+ *  
+ *  @includeExample examples/SpacerExample.mxml
+ *  
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class Spacer extends UIComponent
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function Spacer()
+    {
+        super();
+    }
+}
+
+}

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