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 2019/06/16 19:41:41 UTC
[royale-asjs] branch develop updated: jewel-module: Jewel uses it's
own Group hierchy
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
The following commit(s) were added to refs/heads/develop by this push:
new f461a36 jewel-module: Jewel uses it's own Group hierchy
f461a36 is described below
commit f461a36bca9b3f833fc2906999143dce43e19d28
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Jun 16 21:41:34 2019 +0200
jewel-module: Jewel uses it's own Group hierchy
---
.../Jewel/src/main/resources/jewel-manifest.xml | 1 +
.../main/royale/org/apache/royale/jewel/Module.as | 138 +++++++++++++++++++++
2 files changed, 139 insertions(+)
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index e3d8df8..24fc8fe 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -22,6 +22,7 @@
<componentPackage>
<component id="Application" class="org.apache.royale.jewel.Application"/>
+ <component id="Module" class="org.apache.royale.jewel.Module"/>
<component id="View" class="org.apache.royale.jewel.View"/>
<component id="Group" class="org.apache.royale.jewel.Group"/>
<component id="HGroup" class="org.apache.royale.jewel.HGroup"/>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Module.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Module.as
new file mode 100644
index 0000000..945d31a
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Module.as
@@ -0,0 +1,138 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+{
+ COMPILE::SWF
+ {
+ import flash.system.ApplicationDomain;
+ import flash.utils.getQualifiedClassName;
+ }
+ import org.apache.royale.core.IFlexInfo;
+ import org.apache.royale.core.IModule;
+ import org.apache.royale.core.IValuesImpl;
+ import org.apache.royale.core.ValuesManager;
+ import org.apache.royale.events.Event;
+ import org.apache.royale.events.ValueChangeEvent;
+
+ /**
+ * Indicates that the state change has completed. All properties
+ * that need to change have been changed, and all transitinos
+ * that need to run have completed. However, any deferred work
+ * may not be completed, and the screen may not be updated until
+ * code stops executing.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.6
+ */
+ [Event(name="stateChangeComplete", type="org.apache.royale.events.Event")]
+
+ /**
+ * Indicates that the initialization of the container is complete.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.6
+ */
+ [Event(name="initComplete", type="org.apache.royale.events.Event")]
+
+ /**
+ * Indicates that the children of the container is have been added.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.6
+ */
+ [Event(name="childrenAdded", type="org.apache.royale.events.Event")]
+
+ /**
+ * The UIModule class is the base class for modules of user
+ * interface controls in Royale. It is usable as the root tag of MXML
+ * documents and UI controls and containers are added to it.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.6
+ */
+ public class Module extends Group implements IFlexInfo, IModule
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.6
+ */
+ public function Module()
+ {
+ super();
+ }
+
+ private var _info:Object;
+
+ /**
+ * An Object containing information generated
+ * by the compiler that is useful at startup time.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.6
+ */
+ public function info():Object
+ {
+ COMPILE::SWF
+ {
+ if (!_info)
+ {
+ var mainClassName:String = getQualifiedClassName(this);
+ var initClassName:String = "_" + mainClassName + "_FlexInit";
+ var c:Class = ApplicationDomain.currentDomain.getDefinition(initClassName) as Class;
+ _info = c.info();
+ }
+ }
+ return _info;
+ }
+
+ /**
+ * The org.apache.royale.core.IValuesImpl that is
+ * used by the loading application or module.
+ * A new instance is not created as the main
+ * one is shared but this adds the required
+ * depedencies for the JS compiler optimizer
+ * and adds the values for this module
+ *
+ * @see org.apache.royale.core.SimpleCSSValuesImpl
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.6
+ */
+ public function set valuesImpl(value:IValuesImpl):void
+ {
+ ValuesManager.valuesImpl.init(this);
+ }
+ }
+}