Repository: flex-asjs
Updated Branches:
  refs/heads/develop 49398ef88 -> 5a6c1bb26


Renamed "Module" to "SubAppLoader" since it is really just loading applications 
below the main application.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b476b137
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b476b137
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b476b137

Branch: refs/heads/develop
Commit: b476b1375055bb1d98c2abca57230fe813bef72f
Parents: 361067d
Author: Peter Ent <[email protected]>
Authored: Fri Feb 3 16:40:16 2017 -0500
Committer: Peter Ent <[email protected]>
Committed: Fri Feb 3 16:40:16 2017 -0500

----------------------------------------------------------------------
 .../projects/HTML/src/main/flex/HTMLClasses.as  |   2 +-
 .../main/flex/org/apache/flex/html/Module.as    | 137 -------------------
 .../flex/org/apache/flex/html/SubAppLoader.as   | 137 +++++++++++++++++++
 .../HTML/src/main/resources/basic-manifest.xml  |   2 +-
 4 files changed, 139 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b476b137/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as 
b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
index 4451835..433663d 100644
--- a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
+++ b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
@@ -215,7 +215,7 @@ internal class HTMLClasses
                import org.apache.flex.html.beads.MultilineTextFieldView; 
MultilineTextFieldView;
        }
        
-       import org.apache.flex.html.Module; Module;
+       import org.apache.flex.html.SubAppLoader; SubAppLoader;
 }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b476b137/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Module.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Module.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Module.as
deleted file mode 100644
index 6f1603a..0000000
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Module.as
+++ /dev/null
@@ -1,137 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.flex.html
-{
-       import org.apache.flex.core.IUIBase;
-       import org.apache.flex.core.UIBase;
-       import org.apache.flex.utils.PointUtils;
-       import org.apache.flex.geom.Point;
-       import org.apache.flex.events.Event;
-       
-       COMPILE::SWF
-       {
-               import flash.display.Loader;
-               import flash.display.DisplayObjectContainer;
-               import flash.system.LoaderContext;
-               import flash.system.ApplicationDomain;
-               import flash.net.URLRequest;
-               import flash.events.Event;
-       }
-       
-    COMPILE::JS
-    {
-        import org.apache.flex.core.WrappedHTMLElement;            
-    }
-    
-    /**
-     *  The Module class can load Flash or HTML content into a space within an 
application. Use Module to
-        *  identify where the application should appear, then use its 
loadContent() function to load the
-        *  application dynamically.
-        * 
-     *  @toplevel
-     *  @see org.apache.flex.html.beads.layout
-     *  @see org.apache.flex.html.supportClasses.ScrollingViewport
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */    
-       public class Module extends UIBase
-       {
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-               public function Module()
-               {
-                       super();
-               }
-               
-               COMPILE::SWF
-               private var swfLoader:Loader;
-               
-               COMPILE::JS
-               private var htmlLoader:WrappedHTMLElement;
-               
-               /**
-                * @private
-                * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-                */
-               private function createLoader():void
-               {
-                       COMPILE::SWF {                          
-                               if (swfLoader != null) {
-                                       
$displayObjectContainer.removeChild(swfLoader);
-                               }
-                               
-                               swfLoader = new Loader();
-                               swfLoader.x = 0;
-                               swfLoader.y = 0;
-                       }
-                               
-                       COMPILE::JS {
-                               var origin:Point = new Point(0,0);
-                               var xlated:Point = 
PointUtils.localToGlobal(origin, parent);
-                               
-                               if (htmlLoader == null) {
-                                       htmlLoader = 
document.createElement('iframe') as WrappedHTMLElement;
-                                       htmlLoader["width"] = 
String(this.width);
-                                       htmlLoader["height"] = 
String(this.height);
-                                       htmlLoader.style.position = "absolute";
-                                       htmlLoader.style.left = 
String(xlated.x) + "px";
-                                       htmlLoader.style.top = String(xlated.y) 
+ "px";
-                                       htmlLoader.style.backgroundColor = 
String("white");
-                                       htmlLoader.style.border = "none";
-                                       document.body.appendChild(htmlLoader);
-                               }
-                       }
-               }
-               
-               /**
-                * Specifies the URL to load, depending on the runtime 
platform. Pass null for
-                * whichever URL is not being used.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-                */
-               public function loadContent(swfURL:String, htmlURL:String):void
-               {
-                       createLoader();
-                       
-                       COMPILE::SWF {
-                               var url:URLRequest = new URLRequest(swfURL);
-                               var loaderContext:LoaderContext = new 
LoaderContext(false, ApplicationDomain.currentDomain, null);
-                               swfLoader.load(url, loaderContext);
-                               if (swfLoader.parent == null) {
-                                       
$displayObjectContainer.addChild(swfLoader);
-                               }
-                       }
-                               
-                       COMPILE::JS {
-                               htmlLoader.setAttribute("src", htmlURL);
-                       }
-               }
-       }
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b476b137/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/SubAppLoader.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/SubAppLoader.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/SubAppLoader.as
new file mode 100644
index 0000000..3cbcf00
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/SubAppLoader.as
@@ -0,0 +1,137 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.flex.html
+{
+       import org.apache.flex.core.IUIBase;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.utils.PointUtils;
+       import org.apache.flex.geom.Point;
+       import org.apache.flex.events.Event;
+       
+       COMPILE::SWF
+       {
+               import flash.display.Loader;
+               import flash.display.DisplayObjectContainer;
+               import flash.system.LoaderContext;
+               import flash.system.ApplicationDomain;
+               import flash.net.URLRequest;
+               import flash.events.Event;
+       }
+       
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+    
+    /**
+     *  The SubAppLoader class can load Flash or HTML content into a space 
within an application. 
+        *  Use SubAppLoader to identify where the application should appear, 
then use its loadApplication() 
+        *  function to load the application dynamically.
+        * 
+     *  @toplevel
+     *  @see org.apache.flex.html.beads.layout
+     *  @see org.apache.flex.html.supportClasses.ScrollingViewport
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+       public class SubAppLoader extends UIBase
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function SubAppLoader()
+               {
+                       super();
+               }
+               
+               COMPILE::SWF
+               private var swfLoader:Loader;
+               
+               COMPILE::JS
+               private var htmlLoader:WrappedHTMLElement;
+               
+               /**
+                * @private
+                * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+                */
+               private function createLoader():void
+               {
+                       COMPILE::SWF {                          
+                               if (swfLoader != null) {
+                                       
$displayObjectContainer.removeChild(swfLoader);
+                               }
+                               
+                               swfLoader = new Loader();
+                               swfLoader.x = 0;
+                               swfLoader.y = 0;
+                       }
+                               
+                       COMPILE::JS {
+                               var origin:Point = new Point(0,0);
+                               var xlated:Point = 
PointUtils.localToGlobal(origin, parent);
+                               
+                               if (htmlLoader == null) {
+                                       htmlLoader = 
document.createElement('iframe') as WrappedHTMLElement;
+                                       htmlLoader["width"] = 
String(this.width);
+                                       htmlLoader["height"] = 
String(this.height);
+                                       htmlLoader.style.position = "absolute";
+                                       htmlLoader.style.left = 
String(xlated.x) + "px";
+                                       htmlLoader.style.top = String(xlated.y) 
+ "px";
+                                       htmlLoader.style.backgroundColor = 
String("white");
+                                       htmlLoader.style.border = "none";
+                                       document.body.appendChild(htmlLoader);
+                               }
+                       }
+               }
+               
+               /**
+                * Specifies the URL to load, depending on the runtime 
platform. Pass null for
+                * whichever URL is not being used.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+                */
+               public function loadApplication(swfURL:String, 
htmlURL:String):void
+               {
+                       createLoader();
+                       
+                       COMPILE::SWF {
+                               var url:URLRequest = new URLRequest(swfURL);
+                               var loaderContext:LoaderContext = new 
LoaderContext(false, ApplicationDomain.currentDomain, null);
+                               swfLoader.load(url, loaderContext);
+                               if (swfLoader.parent == null) {
+                                       
$displayObjectContainer.addChild(swfLoader);
+                               }
+                       }
+                               
+                       COMPILE::JS {
+                               htmlLoader.setAttribute("src", htmlURL);
+                       }
+               }
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b476b137/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml 
b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index cc10645..8b322f9 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -139,7 +139,7 @@
     <component id="OneFlexibleChildHorizontalLayout" 
class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout"/>
     <component id="MXMLBeadView" class="org.apache.flex.html.MXMLBeadView"/>
     
-    <component id="Module" class="org.apache.flex.html.Module" />
+    <component id="SubAppLoader" class="org.apache.flex.html.SubAppLoader" />
 
     <component id="Border" class="org.apache.flex.html.supportClasses.Border"/>
     

Reply via email to