You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/06/07 19:38:48 UTC

[royale-asjs] 04/06: jewel-view: add ViewLayout

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 721b20ad42f40bfd4a69c8b7e6d145b44fc874bc
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Jun 7 21:12:50 2020 +0200

    jewel-view: add ViewLayout
---
 .../projects/Jewel/src/main/resources/defaults.css |  2 +-
 .../Jewel/src/main/resources/jewel-manifest.xml    |  1 +
 .../royale/jewel/beads/layouts/ViewLayout.as       | 61 ++++++++++++++++++++++
 .../projects/Jewel/src/main/sass/_global.sass      |  2 +-
 4 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index cbf3b2f..34f96d4 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -50,7 +50,7 @@ button, input, textarea {
 
 j|View {
   IBeadView: ClassReference("org.apache.royale.html.beads.GroupView");
-  IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.NullLayout");
+  IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.ViewLayout");
 }
 
 j|ApplicationResponsiveView {
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index 3ca9b30..9bc20a7 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -196,6 +196,7 @@
 
     <component id="LayoutChildren" class="org.apache.royale.jewel.beads.layouts.LayoutChildren"/>
     <component id="BasicLayout" class="org.apache.royale.jewel.beads.layouts.BasicLayout"/>
+    <component id="ViewLayout" class="org.apache.royale.jewel.beads.layouts.ViewLayout"/>
     <component id="NullLayout" class="org.apache.royale.jewel.beads.layouts.NullLayout"/>
     <component id="SimpleHorizontalLayout" class="org.apache.royale.jewel.beads.layouts.SimpleHorizontalLayout"/>
     <component id="SimpleVerticalLayout" class="org.apache.royale.jewel.beads.layouts.SimpleVerticalLayout"/>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/ViewLayout.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/ViewLayout.as
new file mode 100644
index 0000000..bd5f423
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/ViewLayout.as
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.jewel.beads.layouts
+{
+    /**
+     *  The ViewLayout class is a layout class used in Jewel View class
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.10.0
+     */
+	public class ViewLayout extends StyledLayoutBase
+	{
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.10.0
+         */
+        public function ViewLayout()
+        {
+            super();
+        }
+        
+        /**
+         * @copy org.apache.royale.core.IBeadLayout#layout
+         */
+		override public function layout():Boolean
+		{
+            COMPILE::SWF
+            {
+				// SWF TODO
+				return true;
+            }
+
+            COMPILE::JS
+            {
+                return true;
+            }
+		}     
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/_global.sass
index dca0bb3..edf3d91 100644
--- a/frameworks/projects/Jewel/src/main/sass/_global.sass
+++ b/frameworks/projects/Jewel/src/main/sass/_global.sass
@@ -49,7 +49,7 @@ button, input, textarea
 	
 j|View
 	IBeadView: ClassReference("org.apache.royale.html.beads.GroupView")
-	IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.NullLayout")
+	IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.ViewLayout")
 
 j|ApplicationResponsiveView
 	IBeadView: ClassReference("org.apache.royale.html.beads.GroupView")