This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new ca4f0a9382 Added Container
ca4f0a9382 is described below
commit ca4f0a9382655d86862eb3bf273b842d0b6a343c
Author: Harbs <[email protected]>
AuthorDate: Fri Mar 20 10:57:01 2026 +0200
Added Container
---
.../Style/src/main/resources/style-manifest.xml | 1 +
.../royale/org/apache/royale/style/Container.as | 56 +++++++++++
.../org/apache/royale/style/FlexContainer.as | 107 ++++++++++++++-------
3 files changed, 131 insertions(+), 33 deletions(-)
diff --git a/frameworks/projects/Style/src/main/resources/style-manifest.xml
b/frameworks/projects/Style/src/main/resources/style-manifest.xml
index 5813912de1..b5fb9db0e6 100644
--- a/frameworks/projects/Style/src/main/resources/style-manifest.xml
+++ b/frameworks/projects/Style/src/main/resources/style-manifest.xml
@@ -22,6 +22,7 @@
<componentPackage>
<component id="Application" class="org.apache.royale.style.Application"/>
<component id="View" class="org.apache.royale.style.View"/>
+ <component id="Container" class="org.apache.royale.style.Container"/>
<component id="CheckBox" class="org.apache.royale.style.CheckBox"/>
<component id="Divider" class="org.apache.royale.style.Divider"/>
<component id="FlexContainer" class="org.apache.royale.style.FlexContainer"/>
diff --git
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/Container.as
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/Container.as
new file mode 100644
index 0000000000..e7314857c0
--- /dev/null
+++
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/Container.as
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.style
+{
+ import org.apache.royale.binding.DataBindingBase;
+ import org.apache.royale.binding.ContainerDataBinding;
+
+ /**
+ * Minimum container which supports binding.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
+ public class Container extends Group
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
+ public function Container()
+ {
+ super();
+ }
+ override public function addedToParent():void{
+ if (!_bindingsInited) initBindings()
+ super.addedToParent();
+ }
+
+ private var _bindingsInited:Boolean
+ protected function initBindings():void{
+ _bindingsInited = true;
+ if ('_bindings' in this &&
!getBeadByType(DataBindingBase)) {
+ addBead(new ContainerDataBinding());
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/FlexContainer.as
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/FlexContainer.as
index 758af76fc9..01b6f7b56e 100644
---
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/FlexContainer.as
+++
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/FlexContainer.as
@@ -18,70 +18,81 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.royale.style
{
- import org.apache.royale.binding.ContainerDataBinding;
- import org.apache.royale.binding.DataBindingBase;
+ /**
+ * The FlexContainer class is a container with CSS flex display
enabled.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
- public class FlexContainer extends Group
+ public class FlexContainer extends Container
{
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function FlexContainer()
{
super();
setStyle("display","flex");
}
-
- override public function addedToParent():void{
- if (!_bindingsInited) initBindings()
- super.addedToParent();
- }
-
- private var _bindingsInited:Boolean
- protected function initBindings():void{
- _bindingsInited = true;
- if ('_bindings' in this &&
!getBeadByType(DataBindingBase)) {
- addBead(new ContainerDataBinding());
- }
- }
-
+
+ /**
+ * Returns the align-content style value.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get alignContent():String{
COMPILE::SWF{return "";}
COMPILE::JS{return element.style.alignContent;}
}
- /**
- * Takes any of the values accepted by flexbox align-content
- */
public function set alignContent(value:String):void{
setStyle("alignContent",value);
}
+ /**
+ * Returns the align-items style value.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get alignItems():String{
COMPILE::SWF{return "";}
COMPILE::JS{return element.style.alignItems;}
}
- /**
- * Takes any of the values accepted by flexbox align-items
- */
public function set alignItems(value:String):void{
setStyle("alignItems",value);
}
+ /**
+ * Returns the justify-content style value.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get justifyContent():String{
COMPILE::SWF{return "";}
COMPILE::JS{return element.style.justifyContent;}
}
- /**
- * Takes any of the values accepted by flexbox justify-content
- */
public function set justifyContent(value:String):void{
setStyle("justifyContent",value);
}
private var _vertical:Boolean = false;
+ /**
+ * Whether the main axis is vertical.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get vertical():Boolean
{
return _vertical;
}
-
public function set vertical(value:Boolean):void
{
_vertical = value;
@@ -90,11 +101,16 @@ package org.apache.royale.style
private var _reverse:Boolean;
+ /**
+ * Whether the current flex direction is reversed.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get reverse():Boolean
{
return _reverse;
}
-
public function set reverse(value:Boolean):void
{
_reverse = value;
@@ -110,11 +126,16 @@ package org.apache.royale.style
private var _wrap:Boolean;
+ /**
+ * Whether items should wrap onto multiple lines.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get wrap():Boolean
{
return _wrap;
}
-
public function set wrap(value:Boolean):void
{
_wrap = value;
@@ -126,11 +147,16 @@ package org.apache.royale.style
private var _reverseWrap:Boolean;
+ /**
+ * Whether wrapping should use reverse order.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get reverseWrap():Boolean
{
return _reverseWrap;
}
-
public function set reverseWrap(value:Boolean):void
{
_reverseWrap = value;
@@ -154,11 +180,16 @@ package org.apache.royale.style
private var _gap:String;
+ /**
+ * Returns the gap style value.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get gap():String
{
return _gap;
}
-
public function set gap(value:String):void
{
_gap = value;
@@ -166,11 +197,16 @@ package org.apache.royale.style
}
private var _columnGap:String;
+ /**
+ * Returns the column-gap style value.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get columnGap():String
{
return _columnGap;
}
-
public function set columnGap(value:String):void
{
_columnGap = value;
@@ -178,11 +214,16 @@ package org.apache.royale.style
}
private var _rowGap:String;
+ /**
+ * Returns the row-gap style value.
+ *
+ * @langversion 3.0
+ * @productversion Royale 1.0.0
+ */
public function get rowGap():String
{
return _rowGap;
}
-
public function set rowGap(value:String):void
{
_rowGap = value;