You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2017/08/21 09:11:56 UTC

[01/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - fix keyboard events for TLFEditTestFlexJS

Repository: flex-asjs
Updated Branches:
  refs/heads/feature/dragAndDrop bdc624644 -> 2443273b6


fix keyboard events for TLFEditTestFlexJS


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

Branch: refs/heads/feature/dragAndDrop
Commit: 2b2c10092ab0cac0c6f8cee2dac231f789f8e13f
Parents: 367f8b9
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 8 10:01:04 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 8 10:01:16 2017 -0700

----------------------------------------------------------------------
 .../textLayout/beads/DispatchTLFKeyboardEventBead.as   | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2b2c1009/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/beads/DispatchTLFKeyboardEventBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/beads/DispatchTLFKeyboardEventBead.as b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/beads/DispatchTLFKeyboardEventBead.as
index c308f9d..a671239 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/beads/DispatchTLFKeyboardEventBead.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/beads/DispatchTLFKeyboardEventBead.as
@@ -25,7 +25,8 @@ package org.apache.flex.textLayout.beads
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.events.KeyboardEvent;
-	import org.apache.flex.events.utils.KeyboardEventConverter;
+	import org.apache.flex.events.utils.EditingKeys;
+    import org.apache.flex.events.utils.KeyboardEventConverter;
 	import org.apache.flex.text.events.TextEvent;
 	import org.apache.flex.textLayout.events.FocusEvent;
 
@@ -202,12 +203,16 @@ package org.apache.flex.textLayout.beads
 			}
 		}
 		
+        private var inKeyEventHandler:Boolean;
+        
 		/**
 		 * @private
 		 */
 		COMPILE::JS
 		protected function keyEventHandler(event:KeyboardEvent):void
 		{
+            if (inKeyEventHandler) return;
+            inKeyEventHandler = true;
 			event.stopImmediatePropagation();
 			var newEvent:org.apache.flex.events.KeyboardEvent = KeyboardEventConverter.convert(event);
 			(_strand as IEventDispatcher).dispatchEvent(newEvent);
@@ -217,6 +222,10 @@ package org.apache.flex.textLayout.beads
 			}
 			if (event.type == "keypress")
 			{
+                // don't send along a TextInput event for "Backspace".  It should get handled
+                // in keyDownHandler
+                if (event.key == EditingKeys.BACKSPACE)
+                    return;
 				var textEvent:org.apache.flex.text.events.TextEvent = new org.apache.flex.text.events.TextEvent(TextEvent.TEXT_INPUT);
 				if (event.key != null)
 					textEvent.text = event.key;
@@ -226,7 +235,7 @@ package org.apache.flex.textLayout.beads
 					textEvent.text = String.fromCharCode(event['keyCode']);
 				(_strand as IEventDispatcher).dispatchEvent(textEvent);
 			}
-
+            inKeyEventHandler = false;
 		}
 
 		/**


[09/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Cleaned up HTML components

Posted by pe...@apache.org.
Cleaned up HTML components


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

Branch: refs/heads/feature/dragAndDrop
Commit: 5277a0cbd6a6e2abed71efc3d7da63997d7895c8
Parents: 6e55c55
Author: Harbs <ha...@in-tools.com>
Authored: Sat Aug 12 22:01:10 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sat Aug 12 22:01:10 2017 +0300

----------------------------------------------------------------------
 .../projects/HTML/src/main/flex/org/apache/flex/html/A.as     | 6 ++----
 .../projects/HTML/src/main/flex/org/apache/flex/html/H1.as    | 6 ++----
 .../projects/HTML/src/main/flex/org/apache/flex/html/H2.as    | 6 ++----
 .../projects/HTML/src/main/flex/org/apache/flex/html/H3.as    | 6 ++----
 .../projects/HTML/src/main/flex/org/apache/flex/html/H4.as    | 6 ++----
 .../projects/HTML/src/main/flex/org/apache/flex/html/H5.as    | 6 ++----
 .../projects/HTML/src/main/flex/org/apache/flex/html/H6.as    | 6 ++----
 .../projects/HTML/src/main/flex/org/apache/flex/html/I.as     | 6 ++----
 .../projects/HTML/src/main/flex/org/apache/flex/html/Li.as    | 7 ++-----
 .../HTML/src/main/flex/org/apache/flex/html/Select.as         | 3 +--
 .../projects/HTML/src/main/flex/org/apache/flex/html/Ul.as    | 5 +----
 11 files changed, 20 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as
index fdb39b3..23c0cde 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as
@@ -111,10 +111,8 @@ package org.apache.flex.html
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var a:HTMLElement = document.createElement('a') as HTMLElement;
-            a.setAttribute('href', href);
-            
-			element = a as WrappedHTMLElement;
+            element = document.createElement('a') as WrappedHTMLElement;
+            element.setAttribute('href', href);
             
             positioner = element;
 			element.flexjs_wrapper = this;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as
index 904b4dc..6a7d274 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as
@@ -94,12 +94,10 @@ package org.apache.flex.html
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var h1:HTMLElement = document.createElement('h1') as HTMLElement;
+            element = document.createElement('h1') as WrappedHTMLElement;
             
             textNode = document.createTextNode('') as Text;
-            h1.appendChild(textNode); 
-
-			element = h1 as WrappedHTMLElement;
+            element.appendChild(textNode); 
             
             positioner = element;
 			element.flexjs_wrapper = this;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as
index e515fd5..7594984 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as
@@ -94,12 +94,10 @@ package org.apache.flex.html
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var h2:HTMLElement = document.createElement('h2') as HTMLElement;
+            element = document.createElement('h2') as WrappedHTMLElement;
             
             textNode = document.createTextNode('') as Text;
-            h2.appendChild(textNode); 
-
-			element = h2 as WrappedHTMLElement;
+            element.appendChild(textNode); 
             
             positioner = element;
 			element.flexjs_wrapper = this;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as
index 6886e87..03badb0 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as
@@ -94,12 +94,10 @@ package org.apache.flex.html
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var h3:HTMLElement = document.createElement('h3') as HTMLElement;
+            element = document.createElement('h3') as WrappedHTMLElement;
             
             textNode = document.createTextNode('') as Text;
-            h3.appendChild(textNode); 
-
-			element = h3 as WrappedHTMLElement;
+            element.appendChild(textNode); 
             
             positioner = element;
 			element.flexjs_wrapper = this;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as
index 096658a..305d5ff 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as
@@ -94,12 +94,10 @@ package org.apache.flex.html
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var h4:HTMLElement = document.createElement('h4') as HTMLElement;
+            element = document.createElement('h4') as WrappedHTMLElement;
             
             textNode = document.createTextNode('') as Text;
-            h4.appendChild(textNode); 
-
-			element = h4 as WrappedHTMLElement;
+            element.appendChild(textNode); 
             
             positioner = element;
 			element.flexjs_wrapper = this;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as
index 932c69e..6f587f7 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as
@@ -94,12 +94,10 @@ package org.apache.flex.html
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var h5:HTMLElement = document.createElement('h5') as HTMLElement;
+            element = document.createElement('h5') as WrappedHTMLElement;
             
             textNode = document.createTextNode('') as Text;
-            h5.appendChild(textNode); 
-
-			element = h5 as WrappedHTMLElement;
+            element.appendChild(textNode); 
             
             positioner = element;
 			element.flexjs_wrapper = this;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as
index b03eb24..a68ecd1 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as
@@ -94,13 +94,11 @@ package org.apache.flex.html
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var h6:HTMLElement = document.createElement('h6') as HTMLElement;
+            element = document.createElement('h6') as WrappedHTMLElement;
             
             textNode = document.createTextNode('') as Text;
-            h6.appendChild(textNode); 
+            element.appendChild(textNode); 
 
-			element = h6 as WrappedHTMLElement;
-            
             positioner = element;
 			element.flexjs_wrapper = this;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as
index a1904ce..a0b3fdc 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as
@@ -94,12 +94,10 @@ package org.apache.flex.html
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var a:HTMLElement = document.createElement('i') as HTMLElement;
+            element = document.createElement('i') as WrappedHTMLElement;
             
             textNode = document.createTextNode('') as Text;
-            a.appendChild(textNode); 
-
-			element = a as WrappedHTMLElement;
+            element.appendChild(textNode);
             
             positioner = element;
 			element.flexjs_wrapper = this;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as
index 90ea4ea..8a2a60f 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as
@@ -50,15 +50,12 @@ package org.apache.flex.html
 		
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-		 * @flexjsignorecoercion HTMLDivElement
+		 * @flexjsignorecoercion HTMLElement
          */
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var li:HTMLLIElement = document.createElement('li') as HTMLLIElement;
-            
-            element = li as WrappedHTMLElement;
-            
+			element = document.createElement('li') as WrappedHTMLElement;
             positioner = element;
 			element.flexjs_wrapper = this;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as
index 99c024a..e7cb862 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as
@@ -57,8 +57,7 @@ package org.apache.flex.html
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var select:HTMLSelectElement = document.createElement('select') as HTMLSelectElement;
-			element = select as WrappedHTMLElement;
+			element = document.createElement('select') as WrappedHTMLElement;
             
             positioner = element;
 			element.flexjs_wrapper = this;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5277a0cb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as
index 6c97f64..770d37f 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as
@@ -50,14 +50,11 @@ package org.apache.flex.html
 		
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-		 * @flexjsignorecoercion HTMLDivElement
          */
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var ul:HTMLUListElement = document.createElement('ul') as HTMLUListElement;
-            
-            element = ul as WrappedHTMLElement;
+			element = document.createElement('ul') as WrappedHTMLElement;
             
             positioner = element;
 			element.flexjs_wrapper = this;


[04/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - guess at a size if no fontloader

Posted by pe...@apache.org.
guess at a size if no fontloader


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

Branch: refs/heads/feature/dragAndDrop
Commit: 3bb3f41a1f05e68c7caad86204a3b10c02dc6678
Parents: 9decbb6
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 8 09:59:38 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 8 10:01:16 2017 -0700

----------------------------------------------------------------------
 .../flex/org/apache/flex/text/engine/ElementFormat.as     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3bb3f41a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ElementFormat.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ElementFormat.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ElementFormat.as
index 00a5c82..47e9bb2 100644
--- a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ElementFormat.as
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ElementFormat.as
@@ -86,7 +86,15 @@ package org.apache.flex.text.engine
 		public function getFontMetrics():FontMetrics
 		{
 			assert(fontDescription != null,"fontDescription not assigned!");
-			return fontDescription.fontLoader.getFont(fontDescription.fontName,fontDescription.fontStyle).fontMetrics.clone();
+            if (fontDescription.fontLoader)
+    			return fontDescription.fontLoader.getFont(fontDescription.fontName,fontDescription.fontStyle).fontMetrics.clone();
+            else
+            {
+                var fm:FontMetrics = new FontMetrics();
+                // just a guess for now
+                fm.emBox = new Rectangle(0, 1.2 - fontSize, fontSize, 1.2);
+                return fm;                
+            }
 		}
 	}
 }
\ No newline at end of file


[16/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - initial module example

Posted by pe...@apache.org.
initial module example


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

Branch: refs/heads/feature/dragAndDrop
Commit: ba3140beeeb9b66cd8175dae4253821daefc47f6
Parents: 8e7c653
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 15 13:19:00 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 15 13:19:34 2017 -0700

----------------------------------------------------------------------
 examples/build.xml                              |  3 +
 examples/flexjs/ModuleExample/MainApp/build.xml | 55 ++++++++++++
 .../src/main/config/compile-app-config.xml      | 24 +++++
 .../MainApp/src/main/flex/MainApp.mxml          | 34 +++++++
 examples/flexjs/ModuleExample/Module/build.xml  | 76 ++++++++++++++++
 .../src/main/config/compile-app-config.xml      | 26 ++++++
 .../Module/src/main/flex/Module.mxml            | 30 +++++++
 examples/flexjs/ModuleExample/build.xml         | 95 ++++++++++++++++++++
 8 files changed, 343 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/build.xml
----------------------------------------------------------------------
diff --git a/examples/build.xml b/examples/build.xml
index 5913b78..9d7e3cd 100644
--- a/examples/build.xml
+++ b/examples/build.xml
@@ -97,6 +97,7 @@
         <ant dir="${basedir}/flexjs/MobileMap"/>
         <ant dir="${basedir}/flexjs/MobileStocks"/>
         <ant dir="${basedir}/flexjs/MobileTrader"/>
+        <ant dir="${basedir}/flexjs/ModuleExample"/>
         <ant dir="${basedir}/flexjs/ChartExample"/>
         <ant dir="${basedir}/flexjs/StorageExample"/>
         <ant dir="${basedir}/flexjs/StyleExample"/>
@@ -142,6 +143,7 @@
         <ant dir="${basedir}/flexjs/MobileTrader" target="clean"/>
         <ant dir="${basedir}/flexjs/MobileStocks" target="clean"/>
         <ant dir="${basedir}/flexjs/MobileMap" target="clean"/>
+        <ant dir="${basedir}/flexjs/ModuleExample" target="clean"/>
         <ant dir="${basedir}/flexjs/ChartExample" target="clean"/>
         <ant dir="${basedir}/flexjs/StorageExample" target="clean"/>
         <ant dir="${basedir}/flexjs/StyleExample" target="clean"/>
@@ -177,6 +179,7 @@
         <ant dir="${basedir}/flexjs/MobileTrader" target="examine"/>
         <ant dir="${basedir}/flexjs/MobileStocks" target="examine"/>
         <ant dir="${basedir}/flexjs/MobileMap" target="examine"/>
+        <ant dir="${basedir}/flexjs/ModuleExample" target="examine"/>
         <ant dir="${basedir}/flexjs/ChartExample" target="examine"/>
         <ant dir="${basedir}/flexjs/StorageExample" target="examine"/>
         <ant dir="${basedir}/flexjs/StyleExample" target="examine"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/MainApp/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/MainApp/build.xml b/examples/flexjs/ModuleExample/MainApp/build.xml
new file mode 100644
index 0000000..a69e99f
--- /dev/null
+++ b/examples/flexjs/ModuleExample/MainApp/build.xml
@@ -0,0 +1,55 @@
+<?xml version="1.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.
+
+-->
+
+
+<project name="MainApp" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../../.."/>
+    <property name="example" value="MainApp" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../../../build_example.xml" />
+
+    <!-- MainApp must be build before Module to generate variable and property maps -->
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+
+    <target name="examine" depends="build_example.get.browser">
+        <property name="which" value="debug" />
+        <echo message="Make sure label appears."/>
+        <exec executable="${browser}" dir="${basedir}/bin-${which}" failonerror="true">
+            <arg value="${basedir}/bin-${which}/${example}.html"/>
+        </exec>
+        <exec executable="${browser}" dir="${basedir}/bin/js-${which}" failonerror="true">
+            <arg value="${basedir}/bin/js-${which}/index.html"/>
+        </exec>
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/MainApp/src/main/config/compile-app-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/MainApp/src/main/config/compile-app-config.xml b/examples/flexjs/ModuleExample/MainApp/src/main/config/compile-app-config.xml
new file mode 100644
index 0000000..cb6846f
--- /dev/null
+++ b/examples/flexjs/ModuleExample/MainApp/src/main/config/compile-app-config.xml
@@ -0,0 +1,24 @@
+<!--
+
+  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.
+
+-->
+<flex-config>
+    <js-compiler-option>
+        <option>--variable_map_output_file gccvars.txt</option>
+        <option>--property_map_output_file gccprops.txt</option>
+    </js-compiler-option>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/MainApp/src/main/flex/MainApp.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/MainApp/src/main/flex/MainApp.mxml b/examples/flexjs/ModuleExample/MainApp/src/main/flex/MainApp.mxml
new file mode 100644
index 0000000..9e101bb
--- /dev/null
+++ b/examples/flexjs/ModuleExample/MainApp/src/main/flex/MainApp.mxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+                   xmlns:js="library://ns.apache.org/flexjs/basic" >
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+    <js:initialView>
+        <js:View>
+            <js:beads>
+                <js:VerticalLayout />
+            </js:beads>
+        	<js:Label text="Module Should Appear Below" />
+            <js:UIModuleLoader modulePath="modules" moduleName="Module" />
+        </js:View>
+    </js:initialView>
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/Module/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/Module/build.xml b/examples/flexjs/ModuleExample/Module/build.xml
new file mode 100644
index 0000000..b9e5a18
--- /dev/null
+++ b/examples/flexjs/ModuleExample/Module/build.xml
@@ -0,0 +1,76 @@
+<?xml version="1.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.
+
+-->
+
+
+<project name="Module" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../../.."/>
+    <property name="example" value="Module" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <include file="${basedir}/../../../build_example.xml" />
+    
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+        <mkdir dir="${basedir}/../MainApp/bin-debug/modules" />
+        <mkdir dir="${basedir}/../MainApp/bin/js-debug/modules" />
+        <mkdir dir="${basedir}/../MainApp/bin/js-release/modules" />
+        <replace file="${basedir}/bin/js-debug/Module__deps.js"
+            token="/Module.js"
+            value="/modules/Module.js" />
+        <copy file="${basedir}/bin-debug/Module.swf" todir="${basedir}/../MainApp/bin-debug/modules" failonerror="false" />
+        <copy todir="${basedir}/../MainApp/bin/js-debug/modules" failonerror="false">
+            <fileset dir="${basedir}/bin/js-debug">
+                <include name="*"/>
+            </fileset>
+        </copy>
+        <copy todir="${basedir}/../MainApp/bin/js-debug/org" failonerror="false">
+            <fileset dir="${basedir}/bin/js-debug/org">
+                <include name="**/**"/>
+            </fileset>
+        </copy>
+        <copy todir="${basedir}/../MainApp/bin/js-release/modules" failonerror="false">
+            <fileset dir="${basedir}/bin/js-release">
+                <include name="**/**"/>
+            </fileset>
+        </copy>
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+
+    <target name="examine" depends="build_example.get.browser">
+        <property name="which" value="debug" />
+        <echo message="Make sure label appears."/>
+        <exec executable="${browser}" dir="${basedir}/bin-${which}" failonerror="true">
+            <arg value="${basedir}/bin-${which}/${example}.html"/>
+        </exec>
+        <exec executable="${browser}" dir="${basedir}/bin/js-${which}" failonerror="true">
+            <arg value="${basedir}/bin/js-${which}/index.html"/>
+        </exec>
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/Module/src/main/config/compile-app-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/Module/src/main/config/compile-app-config.xml b/examples/flexjs/ModuleExample/Module/src/main/config/compile-app-config.xml
new file mode 100644
index 0000000..f9aa67e
--- /dev/null
+++ b/examples/flexjs/ModuleExample/Module/src/main/config/compile-app-config.xml
@@ -0,0 +1,26 @@
+<!--
+
+  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.
+
+-->
+<flex-config>
+    <js-compiler-option>
+        <option>--variable_map_input_file ../../../MainApp/bin/js-release/gccvars.txt</option>
+        <option>--property_map_input_file ../../../MainApp/bin/js-release/gccprops.txt</option>
+        <option>--variable_map_output_file modgccvars.txt</option>
+        <option>--property_map_output_file modgccprops.txt</option>
+    </js-compiler-option>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/Module/src/main/flex/Module.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/Module/src/main/flex/Module.mxml b/examples/flexjs/ModuleExample/Module/src/main/flex/Module.mxml
new file mode 100644
index 0000000..949d445
--- /dev/null
+++ b/examples/flexjs/ModuleExample/Module/src/main/flex/Module.mxml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<js:UIModule xmlns:fx="http://ns.adobe.com/mxml/2009"
+                   xmlns:js="library://ns.apache.org/flexjs/basic" >
+    <js:beads>
+        <js:VerticalLayout />
+    </js:beads>
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+	<js:Label text="This Label is in the module" />
+    <js:TextInput id="ti" text="This TextInput is also in the module" />
+</js:UIModule>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba3140be/examples/flexjs/ModuleExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/build.xml b/examples/flexjs/ModuleExample/build.xml
new file mode 100644
index 0000000..508ee87
--- /dev/null
+++ b/examples/flexjs/ModuleExample/build.xml
@@ -0,0 +1,95 @@
+<?xml version="1.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.
+
+-->
+
+<!-- Note:
+    If you modify this file you may have to make the same change in build_framework.xml.
+    build_framework.xml is renamed to build.xml when it is packaged.
+    It is used to build the frameworks directory from the zip file. 
+-->
+<project name="ModuleExample" default="main" basedir=".">
+
+    <property name="FLEXJS_HOME" location=".."/>
+
+    <!-- Required for OSX 10.6 / Snow Leopard Performance. -->
+    <!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
+    <!-- local.d32 is set/used in build.properties so this needs to be done first. -->
+    <condition property="local.d32" value="-d32">
+        <and>
+            <os family="mac"/>
+            <matches pattern="1.6.*" string="${java.version}"/>
+            <equals arg1="${sun.arch.data.model}" arg2="64"/>
+            <equals arg1="${os.arch}" arg2="x86_64"/>
+        </and>
+    </condition>
+
+    <!-- Property for the platform.  -->
+    <condition property="isMac">
+        <os family="mac"/>
+    </condition>
+    <condition property="isWindows">
+        <os family="windows" />
+    </condition>   
+    <condition property="isLinux">
+        <and>
+          <os family="unix"/>    
+          <not>
+            <os family="mac"/>    
+          </not>
+        </and>
+    </condition>  
+ 
+    <target name="main" depends="check-compile-env,clean,prepare,compile" 
+        description="Clean build of all examples"/>
+
+    <target name="check-compile-env" description="Check for the required environment variables">
+    </target>
+
+    
+    <target name="prepare" depends="thirdparty-downloads"/>
+            
+    <target name="thirdparty-downloads" unless="no.thirdparty-downloads" description="Downloads all the required thirdparty code.">
+        <!--<ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>-->
+    </target>
+    
+    <target name="compile" description="Compile Examples" >
+        <ant dir="${basedir}/MainApp/" inheritall="false"/>
+        <ant dir="${basedir}/Module" inheritall="false"/>
+    </target>
+    
+    <!--
+		Cleanup
+	-->
+
+    <target name="super-clean" depends="thirdparty-clean,clean" description="Cleans everything including thirdparty downloads."/>
+	
+    <target name="thirdparty-clean" unless="no.thirdparty-clean" description="Removes all thirdparty downloads.">
+        <!--<ant antfile="${basedir}/downloads.xml" target="clean" dir="${basedir}"/>-->
+    </target>
+    
+    <target name="clean" description="Cleans all SWCs and their resource bundles">
+        <ant dir="${basedir}/MainApp" target="clean"/>
+        <ant dir="${basedir}/Module" target="clean"/>
+    </target>
+
+    <target name="examine" description="Cleans all SWCs and their resource bundles">
+        <ant dir="${basedir}/MainApp" target="examine"/>
+    </target>
+
+</project>


[26/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Update MDL Example - MDL Grid should have at least one MDL GridCell

Posted by pe...@apache.org.
Update MDL Example - MDL Grid should have at least one MDL GridCell


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

Branch: refs/heads/feature/dragAndDrop
Commit: 65b7eb99497532dadd8bd91f9932e3904ef6987b
Parents: d526a4a
Author: piotrz <pi...@apache.org>
Authored: Sun Aug 20 23:47:21 2017 +0200
Committer: piotrz <pi...@apache.org>
Committed: Sun Aug 20 23:47:21 2017 +0200

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/Badges.mxml |  53 +++---
 .../MDLExample/src/main/flex/Buttons.mxml       | 176 ++++++++++---------
 .../flexjs/MDLExample/src/main/flex/Chips.mxml  |  19 +-
 .../MDLExample/src/main/flex/Dialogs.mxml       |  14 +-
 .../MDLExample/src/main/flex/DropDownList.mxml  |   5 +-
 .../MDLExample/src/main/flex/Footers.mxml       |  10 +-
 .../flexjs/MDLExample/src/main/flex/Grids.mxml  |   5 -
 .../flexjs/MDLExample/src/main/flex/Icons.mxml  |  58 +++---
 .../flexjs/MDLExample/src/main/flex/Lists.mxml  | 171 +++++++-----------
 .../flexjs/MDLExample/src/main/flex/Menus.mxml  |  37 ++--
 .../MDLExample/src/main/flex/Sliders.mxml       |  11 +-
 .../MDLExample/src/main/flex/Snackbar.mxml      |  13 +-
 .../flexjs/MDLExample/src/main/flex/Tables.mxml | 123 ++++++-------
 .../flexjs/MDLExample/src/main/flex/Tabs.mxml   |   4 +-
 .../MDLExample/src/main/flex/TextFields.mxml    | 116 ++++++------
 .../MDLExample/src/main/flex/Toggles.mxml       |  90 +++++-----
 16 files changed, 443 insertions(+), 462 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Badges.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Badges.mxml b/examples/flexjs/MDLExample/src/main/flex/Badges.mxml
index 11ee536..581f41b 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Badges.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Badges.mxml
@@ -32,30 +32,35 @@ limitations under the License.
         <js:ContainerDataBinding/>
     </mdl:beads>
 
-    <mdl:Grid width="50" style="margin:20px">
-        <js:Div style="color: rgba(0, 0, 0, 0.24);" className="material-icons" text="{MaterialIconType.ACCOUNT_BOX}">
-            <js:beads>
-                <mdl:Badge dataBadge="2" overlap="true"/>
-            </js:beads>
-        </js:Div>
-
-        <js:Span text="Inbox" style="color: rgba(0, 0, 0, 0.24);" className="mdl-badge">
-            <js:beads>
-                <mdl:Badge dataBadge="4"/>
-            </js:beads>
-        </js:Span>
-
-        <js:A id="badge1" text="Badge Normal" href="http://flex.apache.org">
-            <js:beads>
-                <mdl:Badge dataBadge="1"/>
-            </js:beads>
-        </js:A>
-
-        <js:A text="Badge No Background" href="http://flex.apache.org">
-            <js:beads>
-                <mdl:Badge dataBadge="5" noBackground="true"/>
-            </js:beads>
-        </js:A>
+    <mdl:Grid>
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="500"/>
+        </mdl:style>
+        <mdl:GridCell column="12">
+            <js:Div style="color: rgba(0, 0, 0, 0.24);" className="material-icons" text="{MaterialIconType.ACCOUNT_BOX}">
+                <js:beads>
+                    <mdl:Badge dataBadge="2" overlap="true"/>
+                </js:beads>
+            </js:Div>
+
+            <js:Span text="Inbox" style="color: rgba(0, 0, 0, 0.24);" className="mdl-badge">
+                <js:beads>
+                    <mdl:Badge dataBadge="4"/>
+                </js:beads>
+            </js:Span>
+
+            <js:A id="badge1" text="Badge Normal" href="http://flex.apache.org">
+                <js:beads>
+                    <mdl:Badge dataBadge="1"/>
+                </js:beads>
+            </js:A>
+
+            <js:A text="Badge No Background" href="http://flex.apache.org">
+                <js:beads>
+                    <mdl:Badge dataBadge="5" noBackground="true"/>
+                </js:beads>
+            </js:A>
+        </mdl:GridCell>
     </mdl:Grid>
 
 </mdl:TabBarPanel>             
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml b/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
index 1f99688..9131d53 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
@@ -33,92 +33,96 @@ limitations under the License.
     </mdl:beads>
 
     <!-- Buttons https://getmdl.io/components/index.html#buttons-section -->
-    <mdl:Grid width="100">
-        
-        <mdl:Button className="mdlbtn"/>
-        
-        <!-- Fab button -->
-        <mdl:Button id="mybtn" fab="true" colored="true">
-            <mdl:beads>
-                <mdl:Tooltip text="A simple tooltip"/>
-            </mdl:beads>
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.ADD}"/>
-            </mdl:materialIcon>
-        </mdl:Button>
-
-        <mdl:Button fab="true" colored="true">
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.KEYBOARD_ARROW_DOWN}"/>
-            </mdl:materialIcon>
-        </mdl:Button>
-        
-        <!-- Fab with Ripple -->
-        <mdl:Button fab="true" ripple="true">
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.FACE}"/>
-            </mdl:materialIcon>
-        </mdl:Button>
-        
-        <!-- Raised button -->
-        <mdl:Button text="COLORED" raised="true" colored="true"/>
-        
-        <!-- Raised button with ripple -->
-        <mdl:Button text="ACCENT" raised="true" ripple="true" accent="true"/>
-        
-        <!-- Raised disabled button-->
-        <mdl:Button text="DISABLED" raised="true">
-            <mdl:beads>
-                <mdl:Disabled/>
-            </mdl:beads>
-        </mdl:Button>
-
-        <!-- Flat button -->
-        <mdl:Button text="Flat"/>
-
-        <!-- Flat button with ripple -->
-        <mdl:Button text="Ripple" ripple="true"/>
-
-        <!-- Disabled flat button -->
-        <mdl:Button text="Disabled">
-            <mdl:beads>
-                <mdl:Disabled/>
-            </mdl:beads>
-        </mdl:Button>
-
-        <!-- Primary-colored flat button -->
-        <mdl:Button text="primary" primary="true"/>
-
-        <!-- Accent-colored flat button -->
-        <mdl:Button text="accent" accent="true"/>
-
-        <!-- Icon button -->
-        <mdl:Button icon="true">
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.MOOD}"/>
-            </mdl:materialIcon>
-        </mdl:Button>
-
-        <!-- Colored icon button -->
-        <mdl:Button icon="true" colored="true">
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.MOOD}"/>
-            </mdl:materialIcon>
-        </mdl:Button>
-
-        <!-- Mini FAB button -->
-        <mdl:Button fab="true" minifab="true">
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.ADD}"/>
-            </mdl:materialIcon>
-        </mdl:Button>
-
-        <!-- Colored mini FAB button -->
-        <mdl:Button fab="true" minifab="true" colored="true">
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.ADD}"/>
-            </mdl:materialIcon>
-        </mdl:Button>
+    <mdl:Grid>
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="150"/>
+        </mdl:style>
+        <mdl:GridCell column="12">
+            <mdl:Button className="mdlbtn"/>
+
+            <!-- Fab button -->
+            <mdl:Button id="mybtn" fab="true" colored="true">
+                <mdl:beads>
+                    <mdl:Tooltip text="A simple tooltip"/>
+                </mdl:beads>
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.ADD}"/>
+                </mdl:materialIcon>
+            </mdl:Button>
+
+            <mdl:Button fab="true" colored="true">
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.KEYBOARD_ARROW_DOWN}"/>
+                </mdl:materialIcon>
+            </mdl:Button>
+
+            <!-- Fab with Ripple -->
+            <mdl:Button fab="true" ripple="true">
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.FACE}"/>
+                </mdl:materialIcon>
+            </mdl:Button>
+
+            <!-- Raised button -->
+            <mdl:Button text="COLORED" raised="true" colored="true"/>
+
+            <!-- Raised button with ripple -->
+            <mdl:Button text="ACCENT" raised="true" ripple="true" accent="true"/>
+
+            <!-- Raised disabled button-->
+            <mdl:Button text="DISABLED" raised="true">
+                <mdl:beads>
+                    <mdl:Disabled/>
+                </mdl:beads>
+            </mdl:Button>
+
+            <!-- Flat button -->
+            <mdl:Button text="Flat"/>
+
+            <!-- Flat button with ripple -->
+            <mdl:Button text="Ripple" ripple="true"/>
+
+            <!-- Disabled flat button -->
+            <mdl:Button text="Disabled">
+                <mdl:beads>
+                    <mdl:Disabled/>
+                </mdl:beads>
+            </mdl:Button>
+
+            <!-- Primary-colored flat button -->
+            <mdl:Button text="primary" primary="true"/>
+
+            <!-- Accent-colored flat button -->
+            <mdl:Button text="accent" accent="true"/>
+
+            <!-- Icon button -->
+            <mdl:Button icon="true">
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.MOOD}"/>
+                </mdl:materialIcon>
+            </mdl:Button>
+
+            <!-- Colored icon button -->
+            <mdl:Button icon="true" colored="true">
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.MOOD}"/>
+                </mdl:materialIcon>
+            </mdl:Button>
+
+            <!-- Mini FAB button -->
+            <mdl:Button fab="true" minifab="true">
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.ADD}"/>
+                </mdl:materialIcon>
+            </mdl:Button>
+
+            <!-- Colored mini FAB button -->
+            <mdl:Button fab="true" minifab="true" colored="true">
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.ADD}"/>
+                </mdl:materialIcon>
+            </mdl:Button>
+        </mdl:GridCell>
     </mdl:Grid>
 
 </mdl:TabBarPanel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Chips.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Chips.mxml b/examples/flexjs/MDLExample/src/main/flex/Chips.mxml
index 287a235..bc1f5d0 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Chips.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Chips.mxml
@@ -31,12 +31,15 @@ limitations under the License.
         <js:ContainerDataBinding/>
     </mdl:beads>
     
-    <mdl:Grid width="120">
-        
+    <mdl:Grid>
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="120"/>
+        </mdl:style>
+        <mdl:GridCell column="12">
             <mdl:Chip text="Basic Chip" />
-        
+
             <mdl:ButtonChip text="Button Chip" />
-            
+
             <mdl:Chip text="Deletable Chip">
                 <mdl:beads>
                     <mdl:DeletableChip />
@@ -45,7 +48,7 @@ limitations under the License.
                     <mdl:MaterialIcon text="{MaterialIconType.CANCEL}"/>
                 </mdl:materialIcon>
             </mdl:Chip>
-        
+
             <mdl:ButtonChip text="Deletable Button Chip">
                 <mdl:beads>
                     <mdl:DeletableChip />
@@ -54,7 +57,7 @@ limitations under the License.
                     <mdl:MaterialIcon text="{MaterialIconType.CANCEL}"/>
                 </mdl:materialIcon>
             </mdl:ButtonChip>
-        
+
             <mdl:Chip text="Contact Chip">
                 <mdl:beads>
                     <mdl:MdlColor color="teal" />
@@ -62,7 +65,7 @@ limitations under the License.
                     <mdl:ContactChip contactText="A" />
                 </mdl:beads>
             </mdl:Chip>
-        
+
             <mdl:Chip text="Contact Chip">
                 <mdl:beads>
                     <mdl:MdlColor color="teal" />
@@ -84,6 +87,6 @@ limitations under the License.
                     <mdl:MaterialIcon text="{MaterialIconType.CANCEL}"/>
                 </mdl:materialIcon>
             </mdl:Chip>
-        
+        </mdl:GridCell>
     </mdl:Grid>
 </mdl:TabBarPanel>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml b/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
index d739141..a97a8ac 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
@@ -18,8 +18,8 @@ limitations under the License.
 
 -->
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
-                 xmlns:js="library://ns.apache.org/flexjs/basic"
-                 xmlns:mdl="library://ns.apache.org/flexjs/mdl">
+                 xmlns:mdl="library://ns.apache.org/flexjs/mdl"
+                 xmlns:js="library://ns.apache.org/flexjs/basic">
 
     <fx:Script>
         <![CDATA[
@@ -37,9 +37,11 @@ limitations under the License.
     </fx:Script>
 
     <mdl:Grid>
-        
-        <mdl:Button text="Show Modal Dialog" raised="true" click="showModalDialog()"/>
-
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="150"/>
+        </mdl:style>
+        <mdl:GridCell column="12">
+            <mdl:Button text="Show Modal Dialog" raised="true" click="showModalDialog()"/>
+        </mdl:GridCell>
     </mdl:Grid>
-
 </mdl:TabBarPanel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml b/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
index 8dcf568..9905520 100644
--- a/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
@@ -20,9 +20,8 @@ limitations under the License.
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
                  xmlns:js="library://ns.apache.org/flexjs/basic"
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
-                 xmlns="http://www.w3.org/1999/xhtml" xmlns:models="models.*"
-                 xmlns:models2="org.apache.flex.html.beads.models.*">
-
+                 xmlns="http://www.w3.org/1999/xhtml"
+                 xmlns:models="models.*">
     <mdl:beads>
         <js:ContainerDataBinding />
     </mdl:beads>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Footers.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Footers.mxml b/examples/flexjs/MDLExample/src/main/flex/Footers.mxml
index 166b3ee..e5c3a54 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Footers.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Footers.mxml
@@ -28,7 +28,8 @@ limitations under the License.
     </mdl:model>
     
     <mdl:Grid>
-        <mdl:Footer mini="true" width="500">
+        <mdl:GridCell column="6">
+            <mdl:Footer mini="true">
 
             <mdl:FooterLeftSection>
                 <mdl:FooterLogo text="Mini-Footer"/>
@@ -48,8 +49,9 @@ limitations under the License.
                 <mdl:FooterSocialButton>3</mdl:FooterSocialButton>
             </mdl:FooterRightSection>
         </mdl:Footer>
-
-        <mdl:Footer width="600">
+        </mdl:GridCell>
+        <mdl:GridCell column="6">
+            <mdl:Footer>
             
             <mdl:FooterTopSection>
                  
@@ -116,7 +118,7 @@ limitations under the License.
             </mdl:FooterBottomSection>
 
         </mdl:Footer>
-
+        </mdl:GridCell>
     </mdl:Grid>
 
 </mdl:TabBarPanel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Grids.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Grids.mxml b/examples/flexjs/MDLExample/src/main/flex/Grids.mxml
index 226b994..a67a428 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Grids.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Grids.mxml
@@ -21,11 +21,8 @@ limitations under the License.
                  xmlns:js="library://ns.apache.org/flexjs/basic"
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                  xmlns="http://www.w3.org/1999/xhtml">
-
     <js:Div className="demo-grid">
-
         <mdl:Grid>
-            
             <mdl:GridCell column="1"><mdl:beads><js:InnerHTML text="1"/></mdl:beads></mdl:GridCell>
             <mdl:GridCell column="1"><mdl:beads><js:InnerHTML text="1"/></mdl:beads></mdl:GridCell>
             <mdl:GridCell column="1"><mdl:beads><js:InnerHTML text="1"/></mdl:beads></mdl:GridCell>
@@ -50,8 +47,6 @@ limitations under the License.
             <mdl:GridCell column="6" columnTablet="8"><mdl:beads><js:InnerHTML text="6 (8 Tablet)"/></mdl:beads></mdl:GridCell>
             <mdl:GridCell column="4" columnTablet="6"><mdl:beads><js:InnerHTML text="4 (6 Tablet)"/></mdl:beads></mdl:GridCell>
             <mdl:GridCell column="2" columnPhone="4"><mdl:beads><js:InnerHTML text="2 (4 Phone)"/></mdl:beads></mdl:GridCell>
-
         </mdl:Grid>
-        
     </js:Div>
 </mdl:TabBarPanel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Icons.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Icons.mxml b/examples/flexjs/MDLExample/src/main/flex/Icons.mxml
index bc67529..b149537 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Icons.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Icons.mxml
@@ -32,33 +32,39 @@ limitations under the License.
     </mdl:beads>
 
     <mdl:Grid>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" size="18"/>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" size="24"/>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" size="36"/>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" size="48"/>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" dark="true"/>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" inactive="true"/>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}">
-            <mdl:beads>
-                <mdl:MdlTextColor textColor="teal" />
-            </mdl:beads>
-        </mdl:MaterialIcon>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" className="orange600"/>
-        <mdl:MaterialIcon text="{MaterialIconType.BOOK}"/>
-        <mdl:MaterialIcon text="{MaterialIconType.FACE}"/>
-        
+        <mdl:GridCell column="12">
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" size="18"/>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" size="24"/>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" size="36"/>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" size="48"/>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" dark="true"/>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" inactive="true"/>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}">
+                <mdl:beads>
+                    <mdl:MdlTextColor textColor="teal" />
+                </mdl:beads>
+            </mdl:MaterialIcon>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" className="orange600"/>
+            <mdl:MaterialIcon text="{MaterialIconType.BOOK}"/>
+            <mdl:MaterialIcon text="{MaterialIconType.FACE}"/>
+        </mdl:GridCell>
     </mdl:Grid>
 
-    <mdl:Grid style="backgroundColor:'#000';">
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" light="true"/>
-        <mdl:MaterialIcon text="{MaterialIconType.ACCESSIBILITY}" size="48" light="true"/>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" inactive="true" light="true"/>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}">
-            <mdl:beads>
-                <mdl:MdlTextColor textColor="teal" />
-            </mdl:beads>
-        </mdl:MaterialIcon>
-        <mdl:MaterialIcon text="{MaterialIconType.ADD}" className="orange600"/>
-        <mdl:MaterialIcon text="{MaterialIconType.BOOK}" light="true"/>
+    <mdl:Grid>
+        <mdl:style>
+            <js:SimpleCSSStyles backgroundColor="#000"/>
+        </mdl:style>
+        <mdl:GridCell column="12">
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" light="true"/>
+            <mdl:MaterialIcon text="{MaterialIconType.ACCESSIBILITY}" size="48" light="true"/>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" inactive="true" light="true"/>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}">
+                <mdl:beads>
+                    <mdl:MdlTextColor textColor="teal" />
+                </mdl:beads>
+            </mdl:MaterialIcon>
+            <mdl:MaterialIcon text="{MaterialIconType.ADD}" className="orange600"/>
+            <mdl:MaterialIcon text="{MaterialIconType.BOOK}" light="true"/>
+        </mdl:GridCell>
     </mdl:Grid>
 </mdl:TabBarPanel>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Lists.mxml b/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
index c4b44a5..efb416e 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
@@ -28,116 +28,65 @@ limitations under the License.
 	</mdl:model>
 
     <mdl:Grid>
-        <mdl:List>
-            <mdl:beads>
-                <js:ConstantBinding
-                    sourceID="model"
-                    sourcePropertyName="things"
-                    destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:List>
-
-        <mdl:List labelField="actorName" className="actorNameListItemRenderer">
-            <mdl:beads>
-                <js:ConstantBinding
-                    sourceID="model"
-                    sourcePropertyName="actors"
-                    destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:List>
-
-        <mdl:List labelField="actorName" className="actorNameAndIconListItemRenderer">
-            <mdl:beads>
-                <js:ConstantBinding
-                    sourceID="model"
-                    sourcePropertyName="actors"
-                    destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:List>
-
-        <mdl:List labelField="actorName" className="avatarAndActionListItemRenderer">
-            <mdl:beads>
-                <js:ConstantBinding
-                    sourceID="model"
-                    sourcePropertyName="actors"
-                    destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:List>
-
-        <mdl:List labelField="actorName" className="avatarAndActionTwoLineListItemRenderer">
-            <mdl:beads>
-                <js:ConstantBinding
-                    sourceID="model"
-                    sourcePropertyName="actors"
-                    destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:List>
-
-        <mdl:List labelField="actorName" className="avatarAndActionThreeLineListItemRenderer">
-            <mdl:beads>
-                <js:ConstantBinding
-                    sourceID="model"
-                    sourcePropertyName="actors"
-                    destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:List>
-
-
+        <mdl:GridCell>
+            <mdl:List>
+                <mdl:beads>
+                    <js:ConstantBinding
+                        sourceID="model"
+                        sourcePropertyName="things"
+                        destinationPropertyName="dataProvider" />
+                </mdl:beads>
+            </mdl:List>
+        </mdl:GridCell>
+        <mdl:GridCell>
+            <mdl:List labelField="actorName" className="actorNameListItemRenderer">
+                <mdl:beads>
+                    <js:ConstantBinding
+                        sourceID="model"
+                        sourcePropertyName="actors"
+                        destinationPropertyName="dataProvider" />
+                </mdl:beads>
+            </mdl:List>
+        </mdl:GridCell>
+        <mdl:GridCell>
+            <mdl:List labelField="actorName" className="actorNameAndIconListItemRenderer">
+                <mdl:beads>
+                    <js:ConstantBinding
+                        sourceID="model"
+                        sourcePropertyName="actors"
+                        destinationPropertyName="dataProvider" />
+                </mdl:beads>
+            </mdl:List>
+        </mdl:GridCell>
+        <mdl:GridCell>
+            <mdl:List labelField="actorName" className="avatarAndActionListItemRenderer">
+                <mdl:beads>
+                    <js:ConstantBinding
+                        sourceID="model"
+                        sourcePropertyName="actors"
+                        destinationPropertyName="dataProvider" />
+                </mdl:beads>
+            </mdl:List>
+        </mdl:GridCell>
+        <mdl:GridCell>
+            <mdl:List labelField="actorName" className="avatarAndActionTwoLineListItemRenderer">
+                <mdl:beads>
+                    <js:ConstantBinding
+                        sourceID="model"
+                        sourcePropertyName="actors"
+                        destinationPropertyName="dataProvider" />
+                </mdl:beads>
+            </mdl:List>
+        </mdl:GridCell>
+        <mdl:GridCell column="12">
+            <mdl:List labelField="actorName" className="avatarAndActionThreeLineListItemRenderer">
+                <mdl:beads>
+                    <js:ConstantBinding
+                        sourceID="model"
+                        sourcePropertyName="actors"
+                        destinationPropertyName="dataProvider" />
+                </mdl:beads>
+            </mdl:List>
+        </mdl:GridCell>
     </mdl:Grid>
-
-    <!--
-    <mdl:List labelField="label" className="customListItemRenderer">
-            <mdl:beads>
-                <js:ConstantBinding
-                    sourceID="model"
-                    sourcePropertyName="productNames"
-                    destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:List>
-    
-    
-    xmlns:ui="org.apache.flex.core.*"
-                 xmlns:models="org.apache.flex.html.beads.models.*"
-                 xmlns:beads="org.apache.flex.html.beads.*"
-                 xmlns:controllers="org.apache.flex.html.beads.controllers.*"
-                 xmlns:layout="org.apache.flex.html.beads.layouts.*"
-                 xmlns:support="org.apache.flex.html.supportClasses.*"
-                 <ui:ListBase>
-        <ui:beads>
-            <models:ArraySelectionModel labelField="label">
-                <js:dataProvider>
-                    <fx:Array>
-                        <fx:Object label="Install SIM Card"/>
-                        <fx:Object label="Install SIM Card 1"/>
-                        <fx:Object label="Install SIM Card 2"/>
-                    </fx:Array>
-                </js:dataProvider>
-            </models:ArraySelectionModel>
-            
-            <models:ViewportModel/>
-            
-            <support:DataGroup/>
-            
-            <support:ScrollingViewport/>
-            
-            <beads:ListView/>
-            
-            <controllers:ListSingleSelectionMouseController/>
-            <layout:VerticalLayout/>
-            <ui:ItemRendererClassFactory>
-                <ui:itemRendererFactory>
-                    <fx:Component>
-                        <support:StringItemRenderer>
-                            <support:beads>
-                                <controllers:ItemRendererMouseController />
-                            </support:beads>
-                        </support:StringItemRenderer>
-                    </fx:Component>
-                </ui:itemRendererFactory>
-            </ui:ItemRendererClassFactory>
-            <beads:TextItemRendererFactoryForArrayData/>
-        </ui:beads>
-    </ui:ListBase>-->
-
-    
 </mdl:TabBarPanel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Menus.mxml b/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
index b6e4ee7..226ff1d 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
@@ -42,21 +42,26 @@ limitations under the License.
         <models:MenuModel id="menuModel"/>
     </mdl:model>
 
-    <mdl:Grid width="100">
-        <mdl:Button id="menu_btn" icon="true">
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.MORE_VERT}"/>
-            </mdl:materialIcon>
-        </mdl:Button>
-
-        <mdl:Menu id="myMenu" dataMdlFor="menu_btn" ripple="true" bottom="true" left="false" change="onMyMenuChange(event)"
-                  labelField="label" className="customMenuItemRenderer">
-            <mdl:beads>
-                <js:ConstantBinding
-                        sourceID="menuModel"
-                        sourcePropertyName="menuItems"
-                        destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:Menu>
+    <mdl:Grid>
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="100"/>
+        </mdl:style>
+        <mdl:GridCell column="12">
+            <mdl:Button id="menu_btn" icon="true">
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.MORE_VERT}"/>
+                </mdl:materialIcon>
+            </mdl:Button>
+
+            <mdl:Menu id="myMenu" dataMdlFor="menu_btn" ripple="true" bottom="true" left="false" change="onMyMenuChange(event)"
+                      labelField="label" className="customMenuItemRenderer">
+                <mdl:beads>
+                    <js:ConstantBinding
+                            sourceID="menuModel"
+                            sourcePropertyName="menuItems"
+                            destinationPropertyName="dataProvider" />
+                </mdl:beads>
+            </mdl:Menu>
+        </mdl:GridCell>
     </mdl:Grid>
 </mdl:TabBarPanel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml b/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml
index 0b3831e..1373485 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml
@@ -18,14 +18,12 @@ limitations under the License.
 
 -->
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
-                 xmlns:js="library://ns.apache.org/flexjs/basic"
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
+                 xmlns:js="library://ns.apache.org/flexjs/basic"
                  initComplete="initTextBoxes(event)">
 
     <fx:Script>
         <![CDATA[
-            import org.apache.flex.events.Event;
-
             private function initTextBoxes(event:Event):void
             {
                 slider1_txt.text = "Slider 1 Value: " + slider1.value;
@@ -46,7 +44,10 @@ limitations under the License.
     </fx:Script>
 
     <mdl:Grid>
-        
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="300"/>
+        </mdl:style>
+        <mdl:GridCell column="12">
             <mdl:Card className="demo-card-slider" shadow="2">
                 <mdl:CardTitle>
                     <mdl:CardTitleText id="slider1_txt"/>
@@ -77,7 +78,7 @@ limitations under the License.
                     </mdl:Slider>
                 </mdl:CardSupportingText>
             </mdl:Card>
-        
+        </mdl:GridCell>
     </mdl:Grid>
     
 </mdl:TabBarPanel>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Snackbar.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Snackbar.mxml b/examples/flexjs/MDLExample/src/main/flex/Snackbar.mxml
index 6589d9a..f843253 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Snackbar.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Snackbar.mxml
@@ -18,14 +18,18 @@ limitations under the License.
 
 -->
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
-                 xmlns:mdl="library://ns.apache.org/flexjs/mdl">
+                 xmlns:mdl="library://ns.apache.org/flexjs/mdl"
+                 xmlns:js="library://ns.apache.org/flexjs/basic">
     <mdl:Grid>
-        <mdl:GridCell column="1" width="200">
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="500"/>
+        </mdl:style>
+        <mdl:GridCell column="6">
             <mdl:Button id="showToast" click="onShowToastClick(event)"
                         text="Show Toast!" width="180" accent="true" colored="true" raised="true"/>
             <mdl:Toast id="toast" message="Toast message" timeout="3000"/>
         </mdl:GridCell>
-        <mdl:GridCell column="2" width="200">
+        <mdl:GridCell column="6">
             <mdl:Button id="showSnackbar" click="onShowSnackbarClick(event)"
                         text="Show Snackbar!" width="180" accent="true" colored="true" raised="true"/>
             <mdl:Snackbar id="snackbar" message="Snackbar message" actionText="Undo" timeout="3000"
@@ -33,9 +37,6 @@ limitations under the License.
         </mdl:GridCell>
     </mdl:Grid>
     <fx:Script><![CDATA[
-        import org.apache.flex.events.Event;
-        import org.apache.flex.events.MouseEvent;
-
         private function onShowToastClick(event:MouseEvent):void
         {
             toast.show();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Tables.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Tables.mxml b/examples/flexjs/MDLExample/src/main/flex/Tables.mxml
index 1f29d9a..e6bb690 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Tables.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Tables.mxml
@@ -27,36 +27,12 @@ limitations under the License.
         <models:TablesModel/>
 	</mdl:model>
 
-    <mdl:Grid width="450" className="center-items">
-
-       <mdl:Table shadow="2" selectable="true" className="customTableRowItemRenderer">
-            <mdl:columns>
-                <mdl:TableColumn headerText="Material"/>
-                <mdl:TableColumn headerText="Quantity">
-                    <mdl:beads>
-                        <mdl:TableNumericColumnEnable />
-                    </mdl:beads>
-                </mdl:TableColumn>
-                <mdl:TableColumn headerText="Unit price">
-                    <mdl:beads>
-                        <mdl:TableNumericColumnEnable />
-                    </mdl:beads>
-                </mdl:TableColumn>
-            </mdl:columns>
-            <mdl:beads>
-                <js:ConstantBinding
-                    sourceID="model"
-                    sourcePropertyName="materials"
-                    destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:Table>
-
-        <mdl:Card shadow="2" width="450">
-            <mdl:CardTitle expand="true">
-                <mdl:CardTitleText text="Card Header"/>
-            </mdl:CardTitle>
-
-            <mdl:Table className="customTableRowItemRenderer" width="100%">
+    <mdl:Grid className="center-items">
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="450"/>
+        </mdl:style>
+       <mdl:GridCell column="12">
+           <mdl:Table shadow="2" selectable="true" className="customTableRowItemRenderer">
                 <mdl:columns>
                     <mdl:TableColumn headerText="Material"/>
                     <mdl:TableColumn headerText="Quantity">
@@ -77,41 +53,68 @@ limitations under the License.
                         destinationPropertyName="dataProvider" />
                 </mdl:beads>
             </mdl:Table>
-            
-            <mdl:CardActions style="display:flex; ">
-                <mdl:Spacer/>
-                <mdl:Button text="Get Started" ripple="true" colored="true"/>
-            </mdl:CardActions>
-        </mdl:Card>
 
-        <mdl:Table shadow="8" className="tableRowItemRendererWithIcons">
-            <mdl:columns>
-                <mdl:TableColumn headerText="Material"/>
-                <mdl:TableColumn headerText="Quantity">
-                    <mdl:beads>
-                        <mdl:TableNumericColumnEnable />
-                    </mdl:beads>
-                </mdl:TableColumn>
-                <mdl:TableColumn headerText="Unit price">
-                    <mdl:beads>
-                        <mdl:TableNumericColumnEnable />
-                    </mdl:beads>
-                </mdl:TableColumn>
-                <mdl:TableColumn headerText="Mood">
+            <mdl:Card shadow="2" width="450">
+                <mdl:CardTitle expand="true">
+                    <mdl:CardTitleText text="Card Header"/>
+                </mdl:CardTitle>
+
+                <mdl:Table className="customTableRowItemRenderer" width="100%">
+                    <mdl:columns>
+                        <mdl:TableColumn headerText="Material"/>
+                        <mdl:TableColumn headerText="Quantity">
+                            <mdl:beads>
+                                <mdl:TableNumericColumnEnable />
+                            </mdl:beads>
+                        </mdl:TableColumn>
+                        <mdl:TableColumn headerText="Unit price">
+                            <mdl:beads>
+                                <mdl:TableNumericColumnEnable />
+                            </mdl:beads>
+                        </mdl:TableColumn>
+                    </mdl:columns>
                     <mdl:beads>
-                        <mdl:TableNumericColumnEnable />
+                        <js:ConstantBinding
+                            sourceID="model"
+                            sourcePropertyName="materials"
+                            destinationPropertyName="dataProvider" />
                     </mdl:beads>
-                </mdl:TableColumn>
-            </mdl:columns>
+                </mdl:Table>
 
-            <mdl:beads>
-                <js:ConstantBinding
-                    sourceID="model"
-                    sourcePropertyName="materials"
-                    destinationPropertyName="dataProvider" />
-            </mdl:beads>
-        </mdl:Table>
+                <mdl:CardActions style="display:flex; ">
+                    <mdl:Spacer/>
+                    <mdl:Button text="Get Started" ripple="true" colored="true"/>
+                </mdl:CardActions>
+            </mdl:Card>
 
+            <mdl:Table shadow="8" className="tableRowItemRendererWithIcons">
+                <mdl:columns>
+                    <mdl:TableColumn headerText="Material"/>
+                    <mdl:TableColumn headerText="Quantity">
+                        <mdl:beads>
+                            <mdl:TableNumericColumnEnable />
+                        </mdl:beads>
+                    </mdl:TableColumn>
+                    <mdl:TableColumn headerText="Unit price">
+                        <mdl:beads>
+                            <mdl:TableNumericColumnEnable />
+                        </mdl:beads>
+                    </mdl:TableColumn>
+                    <mdl:TableColumn headerText="Mood">
+                        <mdl:beads>
+                            <mdl:TableNumericColumnEnable />
+                        </mdl:beads>
+                    </mdl:TableColumn>
+                </mdl:columns>
+
+                <mdl:beads>
+                    <js:ConstantBinding
+                        sourceID="model"
+                        sourcePropertyName="materials"
+                        destinationPropertyName="dataProvider" />
+                </mdl:beads>
+            </mdl:Table>
+       </mdl:GridCell>
     </mdl:Grid>
     
 </mdl:TabBarPanel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml b/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml
index abcb43d..5a2b87f 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml
@@ -28,7 +28,7 @@ limitations under the License.
     </mdl:model>
 
     <mdl:Grid>
-        <mdl:GridCell column="1" percentWidth="100">
+        <mdl:GridCell column="12">
             <mdl:Tabs width="400" selectedIndex="1" tabIdField="tabId" labelField="label" className="customTabBarPanelItemRenderer">
                 <mdl:beads>
                     <js:ConstantBinding
@@ -38,7 +38,7 @@ limitations under the License.
                 </mdl:beads>
             </mdl:Tabs>
         </mdl:GridCell>
-       <mdl:GridCell column="1" percentWidth="100">
+       <mdl:GridCell column="12">
             <mdl:NavigationLayout width="600">
                 <mdl:Header>
                     <mdl:TabBar selectedIndex="0" tabIdField="tabId" labelField="label" className="customTabBarSetup">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml b/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml
index 8c50fc2..bbb99ba 100644
--- a/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml
@@ -22,71 +22,75 @@ limitations under the License.
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                  xmlns="http://www.w3.org/1999/xhtml">
     
-    <mdl:Grid width="300">
-    
-        <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
-        <js:Form action="#">
+    <mdl:Grid>
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="300"/>
+        </mdl:style>
+        <mdl:GridCell column="12">
+            <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
+            <js:Form action="#">
 
-            <mdl:TextField id="mdlti" change="mdlfloatingti.text = mdlti.text" width="100%">
-                <mdl:beads>
-                    <mdl:TextPrompt prompt="Normal Text Field..."/>
-                    <mdl:Tooltip text="A simple tooltip in a TextField"/>
-                </mdl:beads>
-            </mdl:TextField>
+                <mdl:TextField id="mdlti" change="mdlfloatingti.text = mdlti.text" width="100%">
+                    <mdl:beads>
+                        <mdl:TextPrompt prompt="Normal Text Field..."/>
+                        <mdl:Tooltip text="A simple tooltip in a TextField"/>
+                    </mdl:beads>
+                </mdl:TextField>
 
-            <mdl:TextField width="100%">
-                <mdl:beads>
-                    <mdl:Disabled/>
-                    <mdl:TextPrompt prompt="Disabled..."/>
-                </mdl:beads>
-            </mdl:TextField>
+                <mdl:TextField width="100%">
+                    <mdl:beads>
+                        <mdl:Disabled/>
+                        <mdl:TextPrompt prompt="Disabled..."/>
+                    </mdl:beads>
+                </mdl:TextField>
 
-            <mdl:TextField id="mdlfloatingti" floatingLabel= "true" width="100%">
-                <mdl:beads>
-                    <mdl:TextPrompt prompt="Floating Label"/>
-                </mdl:beads>
-            </mdl:TextField>
+                <mdl:TextField id="mdlfloatingti" floatingLabel= "true" width="100%">
+                    <mdl:beads>
+                        <mdl:TextPrompt prompt="Floating Label"/>
+                    </mdl:beads>
+                </mdl:TextField>
 
-            <mdl:TextField width="100%">
-                <mdl:beads>
-                    <mdl:TextPrompt prompt="Letters and spaces..."/>
-                    <mdl:Restrict pattern="[A-Z,a-z, ]*" error="Letters and spaces only"/>
-                </mdl:beads>
-            </mdl:TextField>
+                <mdl:TextField width="100%">
+                    <mdl:beads>
+                        <mdl:TextPrompt prompt="Letters and spaces..."/>
+                        <mdl:Restrict pattern="[A-Z,a-z, ]*" error="Letters and spaces only"/>
+                    </mdl:beads>
+                </mdl:TextField>
 
-            <mdl:TextField floatingLabel="true" width="100%">
-                <mdl:beads>
-                    <mdl:TextPrompt prompt="Numbers..."/>
-                    <mdl:Restrict pattern="-?[0-9]*(\.[0-9]+)?" error="Input is not a number!"/>
-                </mdl:beads>
-            </mdl:TextField>
+                <mdl:TextField floatingLabel="true" width="100%">
+                    <mdl:beads>
+                        <mdl:TextPrompt prompt="Numbers..."/>
+                        <mdl:Restrict pattern="-?[0-9]*(\.[0-9]+)?" error="Input is not a number!"/>
+                    </mdl:beads>
+                </mdl:TextField>
 
-            <mdl:TextField width="100%">
-                <mdl:beads>
-                    <mdl:TextPrompt prompt="Expandible..."/>
-                    <mdl:ExpandableSearch/>
-                </mdl:beads>
-            </mdl:TextField>
+                <mdl:TextField width="100%">
+                    <mdl:beads>
+                        <mdl:TextPrompt prompt="Expandible..."/>
+                        <mdl:ExpandableSearch/>
+                    </mdl:beads>
+                </mdl:TextField>
 
-            <mdl:TextField floatingLabel="true" width="100%">
-                <mdl:beads>
-                    <mdl:TextPrompt prompt="Floating and Expandible..."/>
-                    <mdl:ExpandableSearch/>
-                </mdl:beads>
-            </mdl:TextField>
+                <mdl:TextField floatingLabel="true" width="100%">
+                    <mdl:beads>
+                        <mdl:TextPrompt prompt="Floating and Expandible..."/>
+                        <mdl:ExpandableSearch/>
+                    </mdl:beads>
+                </mdl:TextField>
 
-            <mdl:TextArea width="100%">
-                <mdl:beads>
-                    <mdl:TextPrompt prompt="Text lines..."/>
-                </mdl:beads>
-            </mdl:TextArea>
+                <mdl:TextArea width="100%">
+                    <mdl:beads>
+                        <mdl:TextPrompt prompt="Text lines..."/>
+                    </mdl:beads>
+                </mdl:TextArea>
 
-            <mdl:TextArea floatingLabel="true" width="100%" rows="5" maxrows="8" isInvalid="true">
-                <mdl:beads>
-                    <mdl:TextPrompt prompt="Floating, maxrows 8, invalid on load"/>
-                </mdl:beads>
-            </mdl:TextArea>
-        </js:Form>
+                <mdl:TextArea floatingLabel="true" width="100%" rows="5" maxrows="8" isInvalid="true">
+                    <mdl:beads>
+                        <mdl:TextPrompt prompt="Floating, maxrows 8, invalid on load"/>
+                    </mdl:beads>
+                </mdl:TextArea>
+            </js:Form>
+        </mdl:GridCell>
     </mdl:Grid>
 
 </mdl:TabBarPanel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65b7eb99/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml b/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
index 74927e8..c6f7e21 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
@@ -24,7 +24,6 @@ limitations under the License.
     
     <fx:Script>
         <![CDATA[
-        import org.apache.flex.events.MouseEvent;
         import org.apache.flex.mdl.materialIcons.MaterialIconType;
 
             [Bindable]
@@ -55,50 +54,53 @@ limitations under the License.
         <js:ContainerDataBinding/>
     </mdl:beads>
 
-    <mdl:Grid width="250">
-    
-        <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section -->
-        <mdl:CheckBox id="mdlchk" text="Disabled at start" value="CheckBox Description" change="counter++"/>
-        <js:Label text="Chebox throw 'change' event {counter} times"/>
-        <mdl:CheckBox id="mdlchk1" text="Selected and with Ripple" selected="true" ripple="true"/>
-        
-        <mdl:IconToggle dataMdlFor="mdlBoldIcon" click="counter2++">
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.FORMAT_BOLD}"/>
-            </mdl:materialIcon>
-        </mdl:IconToggle>
-
-         <js:Label text="IconToggle throw 'click' event {counter2} times"/>
-        
-        <mdl:IconToggle dataMdlFor="mdlItalicIcon" change="counter3++">
-            <mdl:materialIcon>
-                <mdl:MaterialIcon text="{MaterialIconType.FORMAT_ITALIC}"/>
-            </mdl:materialIcon>
-        </mdl:IconToggle>
-
-        <js:Label text="IconToggle throw 'change' event {counter3} times"/>
-
-        <mdl:Button raised="true" text="Change Switch Text Label" colored="true" click="s1.text = 'hello'"/>
-        <mdl:Switch id="s1" text="Switch" ripple="true" selected="true" change="counter4++" textChange="trace('hello?')"/>
-        
-        <js:Label text="Switch throw 'click' event {counter4} times"/>
-        
-        <mdl:Switch id="s2" text="Switch" click="counter5++"/>
-        
-        <js:Label text="Switch throw 'click' event {counter5} times"/>
-
-        <mdl:RadioButton groupName="g1" text="Ripple 1" value="Test 1" ripple="true" change="counter6++"/>
-        <mdl:RadioButton groupName="g1" text="Ripple 2" value="Test 2" ripple="true" change="counter6++"/>
-        <mdl:RadioButton groupName="g1" text="Ripple 3" value="Test 3" ripple="true" change="counter6++"/>
-
-        <js:Label text="RadioButtons throw 'change' event {counter6} times"/>
-
-        <mdl:RadioButton groupName="g2" text="Black" click="counter7++"/>
-        <mdl:RadioButton groupName="g2" text="White" click="counter7++"/>
-        <mdl:RadioButton groupName="g2" text="Red" click="counter7++"/>
-
-        <js:Label text="RadioButtons throw 'click' event {counter7} times"/>
+    <mdl:Grid>
+        <mdl:style>
+            <js:AllCSSStyles maxWidth="250"/>
+        </mdl:style>
+        <mdl:GridCell column="12">
+            <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section -->
+            <mdl:CheckBox id="mdlchk" text="Disabled at start" value="CheckBox Description" change="counter++"/>
+            <js:Label text="Chebox throw 'change' event {counter} times"/>
+            <mdl:CheckBox id="mdlchk1" text="Selected and with Ripple" selected="true" ripple="true"/>
+
+            <mdl:IconToggle dataMdlFor="mdlBoldIcon" click="counter2++">
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.FORMAT_BOLD}"/>
+                </mdl:materialIcon>
+            </mdl:IconToggle>
+
+             <js:Label text="IconToggle throw 'click' event {counter2} times"/>
+
+            <mdl:IconToggle dataMdlFor="mdlItalicIcon" change="counter3++">
+                <mdl:materialIcon>
+                    <mdl:MaterialIcon text="{MaterialIconType.FORMAT_ITALIC}"/>
+                </mdl:materialIcon>
+            </mdl:IconToggle>
+
+            <js:Label text="IconToggle throw 'change' event {counter3} times"/>
+
+            <mdl:Button raised="true" text="Change Switch Text Label" colored="true" click="s1.text = 'hello'"/>
+            <mdl:Switch id="s1" text="Switch" ripple="true" selected="true" change="counter4++" textChange="trace('hello?')"/>
+
+            <js:Label text="Switch throw 'click' event {counter4} times"/>
+
+            <mdl:Switch id="s2" text="Switch" click="counter5++"/>
+
+            <js:Label text="Switch throw 'click' event {counter5} times"/>
+
+            <mdl:RadioButton groupName="g1" text="Ripple 1" value="Test 1" ripple="true" change="counter6++"/>
+            <mdl:RadioButton groupName="g1" text="Ripple 2" value="Test 2" ripple="true" change="counter6++"/>
+            <mdl:RadioButton groupName="g1" text="Ripple 3" value="Test 3" ripple="true" change="counter6++"/>
+
+            <js:Label text="RadioButtons throw 'change' event {counter6} times"/>
+
+            <mdl:RadioButton groupName="g2" text="Black" click="counter7++"/>
+            <mdl:RadioButton groupName="g2" text="White" click="counter7++"/>
+            <mdl:RadioButton groupName="g2" text="Red" click="counter7++"/>
 
+            <js:Label text="RadioButtons throw 'click' event {counter7} times"/>
+        </mdl:GridCell>
     </mdl:Grid>
 
 </mdl:TabBarPanel>
\ No newline at end of file


[23/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - switch to using IModule to trigger module output

Posted by pe...@apache.org.
switch to using IModule to trigger module output


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

Branch: refs/heads/feature/dragAndDrop
Commit: bbbd0f2024f16632a44575e77f24af63c85023dd
Parents: ccc699f
Author: Alex Harui <ah...@apache.org>
Authored: Fri Aug 18 22:08:37 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Aug 18 22:09:29 2017 -0700

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/html/UIModule.as  |  3 +-
 .../projects/Core/src/main/flex/CoreClasses.as  |  1 +
 .../main/flex/org/apache/flex/core/IModule.as   | 34 ++++++++++++++++++++
 3 files changed, 37 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbbd0f20/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModule.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModule.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModule.as
index 4c7784f..f81b9e9 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModule.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModule.as
@@ -24,6 +24,7 @@ package org.apache.flex.html
         import flash.utils.getQualifiedClassName;        
     }
     import org.apache.flex.core.IFlexInfo;
+    import org.apache.flex.core.IModule;
     import org.apache.flex.core.IValuesImpl;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
@@ -73,7 +74,7 @@ package org.apache.flex.html
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class UIModule extends Group implements IFlexInfo
+	public class UIModule extends Group implements IFlexInfo, IModule
 	{
         /**
          *  Constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbbd0f20/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/CoreClasses.as b/frameworks/projects/Core/src/main/flex/CoreClasses.as
index f1c3101..e616bb1 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -82,6 +82,7 @@ internal class CoreClasses
 	import org.apache.flex.core.ILayoutParent; ILayoutParent;
     import org.apache.flex.core.IListPresentationModel; IListPresentationModel;
 	import org.apache.flex.core.IMeasurementBead; IMeasurementBead;
+    import org.apache.flex.core.IModule; IModule;
     import org.apache.flex.core.IPanelModel; IPanelModel;
     import org.apache.flex.core.IParent; IParent;
     import org.apache.flex.core.IParentIUIBase; IParentIUIBase;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbbd0f20/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IModule.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IModule.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IModule.as
new file mode 100644
index 0000000..844619a
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IModule.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.core
+{
+    /**
+     *  The compiler checks the main class to see if it implements the
+     *  IModule interface and generates bootstrapping code for a module
+     *  instead of an application.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public interface IModule
+	{
+	}
+}


[08/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - fx:Style blocks in MXML weren't working. How did they ever work?

Posted by pe...@apache.org.
fx:Style blocks in MXML weren't working.  How did they ever work?


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

Branch: refs/heads/feature/dragAndDrop
Commit: bf706bc8022d735f70a739e73e34ef50c542f0d0
Parents: dcd748c
Author: Alex Harui <ah...@apache.org>
Authored: Wed Aug 9 10:18:29 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Aug 9 10:19:13 2017 -0700

----------------------------------------------------------------------
 .../Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bf706bc8/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
index 36198f6..3c3f955 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -91,7 +91,7 @@ package org.apache.flex.core
 				c = ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
                 generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
 			}
-			c = mainClass.constructor as Class;
+			c = main.constructor as Class;
             generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
             if (hasEventListener("init"))
                 dispatchEvent(new ValueEvent("init", false, false, c["fontFaces"]));


[18/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Setting checked state manually now works

Posted by pe...@apache.org.
Setting checked state manually now works


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

Branch: refs/heads/feature/dragAndDrop
Commit: 467d4bfdba723eab442e5f8c12ddc816c7f8bb9f
Parents: f208da8
Author: Harbs <ha...@in-tools.com>
Authored: Fri Aug 18 15:01:23 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Fri Aug 18 15:01:23 2017 +0300

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/mdl/CheckBox.as   | 49 +++++++++++++++++---
 .../src/main/resources/defaults.css             | 10 ++--
 2 files changed, 47 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/467d4bfd/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
index aeafe00..84afae8 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
@@ -143,7 +143,14 @@ package org.apache.flex.mdl
          */
 		override public function get text():String
 		{
-			return IToggleButtonModel(model).text;
+            COMPILE::SWF
+            {
+    			return IToggleButtonModel(model).text;
+            }
+            COMPILE::JS
+            {
+                return textNode ? textNode.nodeValue : "";
+            }
 		}
 
         /**
@@ -151,11 +158,14 @@ package org.apache.flex.mdl
          */
         override public function set text(value:String):void
 		{
-            IToggleButtonModel(model).text = value;
+            COMPILE::SWF
+            {
+                IToggleButtonModel(model).text = value;
+            }
 
             COMPILE::JS
 			{
-                if(textNode == null)
+                if(!textNode)
                 {
                     textNode = document.createTextNode('') as Text;
                     checkbox.appendChild(textNode);
@@ -175,11 +185,22 @@ package org.apache.flex.mdl
          */
         public function get value():String
         {
-            return IToggleButtonModel(model).html;
+            COMPILE::SWF
+            {
+                return IToggleButtonModel(model).html;
+            }
+
+            COMPILE::JS
+            {
+                return input.value;
+            }
         }
         public function set value(newValue:String):void
         {
-            IToggleButtonModel(model).html = newValue;
+            COMPILE::SWF
+            {
+                IToggleButtonModel(model).html = newValue;
+            }
 
             COMPILE::JS
             {
@@ -202,7 +223,14 @@ package org.apache.flex.mdl
          */
 		override public function get selected():Boolean
 		{
-			return IToggleButtonModel(model).selected;
+            COMPILE::SWF
+            {
+    			return IToggleButtonModel(model).selected;
+            }
+            COMPILE::JS
+            {
+                return input.checked;
+            }
 		}
 
         /**
@@ -210,11 +238,18 @@ package org.apache.flex.mdl
          */
         override public function set selected(value:Boolean):void
         {
-            IToggleButtonModel(model).selected = value;
+            COMPILE::SWF
+            {
+                IToggleButtonModel(model).selected = value;
+            }
 
             COMPILE::JS
 			{
                 input.checked = value;
+                if(value)
+                    element['MaterialCheckbox'].check();
+                else
+                    element['MaterialCheckbox'].uncheck();
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/467d4bfd/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
index 096f442..f8b3b05 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
@@ -54,11 +54,6 @@ TextArea
     IBeadController: ClassReference("org.apache.flex.html.beads.controllers.EditableTextKeyboardController");*/
 }
 
-CheckBox
-{
-    IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");			
-}
-
 IconToggle
 {
     IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");			
@@ -170,6 +165,11 @@ DropDownList
 
 @media -flex-flash
 {
+    CheckBox
+    {
+        IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");			
+    }
+    
     Slider
     {
         iThumbView: ClassReference("org.apache.flex.mdl.beads.views.SliderThumbView");


[25/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Added support for blink alpha and blink color for point cursor. HTML does not have the same transparency support as Flash and control over alternating colors is important.

Posted by pe...@apache.org.
Added support for blink alpha and blink color for point cursor.
HTML does not have the same transparency support as Flash and control over alternating colors is important.


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

Branch: refs/heads/feature/dragAndDrop
Commit: bde25ebea5b88095865050324d8f01073588683f
Parents: d526a4a
Author: Harbs <ha...@in-tools.com>
Authored: Sun Aug 20 21:39:17 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Aug 20 21:39:17 2017 +0300

----------------------------------------------------------------------
 .../textLayout/container/ContainerController.as | 38 ++++++++++++++++++--
 .../flex/textLayout/edit/SelectionFormat.as     | 32 +++++++++++++++--
 2 files changed, 65 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bde25ebe/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
index 8bf5d07..fc301e2 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
@@ -83,6 +83,7 @@ package org.apache.flex.textLayout.container
 	import org.apache.flex.utils.ObjectMap;
 	import org.apache.flex.utils.PointUtils;
 	import org.apache.flex.utils.Timer;
+	import org.apache.flex.graphics.IDrawable;
 
 
 
@@ -2751,7 +2752,7 @@ package org.apache.flex.textLayout.container
 		// TODO Want to evaluate whether there's a cleaner way to do this
 		
 		private var blinkTimer:Timer;
-		private var blinkObject:IUIBase;
+		private var blinkObject:IRect;
 		
 		/**
 		 * Starts a DisplayObject cursor blinking by changing its alpha value
@@ -2760,7 +2761,8 @@ package org.apache.flex.textLayout.container
 		 * @param obj The DisplayObject to use as the cursor.
 		 * 
 		 */
-		private function startBlinkingCursor(obj:IUIBase, blinkInterval:int):void
+		private  var blinkState:Boolean;
+		private function startBlinkingCursor(obj:IRect, blinkInterval:int):void
 		{
 			if (!blinkTimer)
 				blinkTimer = new Timer(blinkInterval,0);
@@ -2779,12 +2781,42 @@ package org.apache.flex.textLayout.container
 		{
 			if (blinkTimer)
 				blinkTimer.stop();
+			if(blinkObject)
+			{
+				var selFormat:SelectionFormat = interactionManager.currentSelectionFormat;
+				var fill:SolidColor = blinkObject.fill as SolidColor;
+				fill.alpha = selFormat.pointAlpha;
+				fill.color = selFormat.pointColor;
+				(blinkObject as IDrawable).draw();
+				blinkObject.alpha = 1;
+				blinkState = false;
+			}
 			blinkObject = null;
 		}	
 		
 		private function blinkTimerHandler(event:Event):void
 		{
-			blinkObject.alpha = (blinkObject.alpha == 1.0) ? 0.0 : 1.0;
+			var selFormat:SelectionFormat = interactionManager.currentSelectionFormat;
+			if(selFormat)
+			{
+				var fill:SolidColor = blinkObject.fill as SolidColor;
+				if(blinkState)
+				{
+					fill.alpha = selFormat.pointBlinkAlpha;
+					fill.color = selFormat.pointBlinkColor;
+				}
+				else
+				{
+					fill.alpha = selFormat.pointAlpha;
+					fill.color = selFormat.pointColor;
+				}
+				(blinkObject as IDrawable).draw();
+				blinkState = !blinkState;
+			}
+			else
+				blinkObject.alpha = (blinkObject.alpha == 1.0) ? 0.0 : 1.0;
+			
+				
 		}
 		
 		/** 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bde25ebe/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionFormat.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionFormat.as b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionFormat.as
index a7b4652..bc3392d 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionFormat.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionFormat.as
@@ -38,6 +38,8 @@ package org.apache.flex.textLayout.edit {
 		private var _pointAlpha:Number;
 		private var _pointBlendMode:String;
 		private var _pointBlinkRate:Number;
+		private var _pointBlinkAlpha:Number;
+		private var _pointBlinkColor:uint;
 		
 		/** 
 		 * Creates a SelectionFormat object with the specified properties.
@@ -70,7 +72,7 @@ package org.apache.flex.textLayout.edit {
 		 * @playerversion AIR 1.5
  	 	 * @langversion 3.0
 		 */
-		public function SelectionFormat(rangeColor:uint=0xffffff, rangeAlpha:Number=1.0, rangeBlendMode:String="difference", pointColor:uint=0xffffff, pointAlpha:Number=1.0, pointBlendMode:String="difference", pointBlinkRate:Number = 500)
+		public function SelectionFormat(rangeColor:uint=0xffffff, rangeAlpha:Number=1.0, rangeBlendMode:String="difference", pointColor:uint=0xffffff, pointAlpha:Number=1.0, pointBlendMode:String="difference", pointBlinkRate:Number = 500,pointBlinkAlpha:Number=0,pointBlinkColor:uint=0)
 		{ 
 			_rangeColor = rangeColor;
 			_rangeAlpha = rangeAlpha;
@@ -80,6 +82,8 @@ package org.apache.flex.textLayout.edit {
 			_pointAlpha = pointAlpha;
 			_pointBlendMode = pointBlendMode;
 			_pointBlinkRate = pointBlinkRate;
+			_pointBlinkAlpha = pointBlinkAlpha;
+			_pointBlinkColor = pointBlinkColor;
 		}
 		
 		/**
@@ -163,7 +167,31 @@ package org.apache.flex.textLayout.edit {
 		public function get pointBlinkRate():Number
 		{
 			return _pointBlinkRate;
-		}		
+		}
+
+		/**
+		 * The alpha of the cursor blinks while blinking.
+		 * 
+		 * @playerversion Flash 10
+		 * @playerversion AIR 1.5
+ 	 	 * @langversion 3.0
+		 */						
+		public function get pointBlinkAlpha():Number
+		{
+			return _pointBlinkAlpha;
+		}
+
+		/**
+		 * The color of the cursor while blinking.
+		 * 
+		 * @playerversion Flash 10
+		 * @playerversion AIR 1.5
+ 	 	 * @langversion 3.0
+		 */						
+		public function get pointBlinkColor():uint
+		{
+			return _pointBlinkColor;
+		}
 
 		/**
 		 * The blend mode for drawing the cursor.


[11/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - FLEX-35350 - Make HTML element "table" as main element of MDL Table component which allows to add bead to it instead of "tbody" - TableCell and TableColumnt now extends existing classes i

Posted by pe...@apache.org.
FLEX-35350 - Make HTML element "table" as main element of MDL Table component which allows to add bead to it instead of "tbody"
- TableCell and TableColumnt now extends existing classes in Basic module - accordingly TableCell and TableHeader


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

Branch: refs/heads/feature/dragAndDrop
Commit: 1d4eb6373c2e84594feea4a5b4247e752153a616
Parents: 003ccc4
Author: piotrz <pi...@apache.org>
Authored: Tue Aug 15 11:46:37 2017 +0200
Committer: piotrz <pi...@apache.org>
Committed: Tue Aug 15 11:46:37 2017 +0200

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/TBody.as  | 67 +++++++++++++++++
 .../src/main/flex/org/apache/flex/mdl/Table.as  | 78 +++++++++++---------
 .../main/flex/org/apache/flex/mdl/TableCell.as  | 14 ++--
 .../flex/org/apache/flex/mdl/TableColumn.as     | 14 ++--
 4 files changed, 125 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d4eb637/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TBody.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TBody.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TBody.as
new file mode 100644
index 0000000..8452c48
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TBody.as
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.mdl
+{
+	import org.apache.flex.html.Group;
+
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+
+	/**
+	 *  The TBody class is a Container component capable of presenting content of MDL Table
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.8
+	 */
+	public class TBody extends Group
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function TBody()
+		{
+			super();
+
+			//className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
+		}
+
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('tbody') as WrappedHTMLElement;
+
+			positioner = element;
+            element.flexjs_wrapper = this;
+
+            return element;
+        }
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d4eb637/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
index e08465b..22dbfe5 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
@@ -19,8 +19,7 @@
 package org.apache.flex.mdl
 {
 	import org.apache.flex.core.IChild;
-	import org.apache.flex.core.IUIBase;
-    
+
     COMPILE::JS
     {
         import org.apache.flex.core.WrappedHTMLElement;
@@ -82,7 +81,7 @@ package org.apache.flex.mdl
 				COMPILE::JS
             	{
 					for each (var column:TableColumn in _columns){
-						head.addElement(column);
+						thead.addElement(column);
 					}
 				}
 			}
@@ -99,34 +98,25 @@ package org.apache.flex.mdl
          */
 		override public function addElement(c:IChild, dispatchEvent:Boolean = true):void
 		{
-			COMPILE::SWF
-            {
-				// this part is not done for Table
-                /*if(_elements == null)
-                    _elements = [];
-                _elements[_elements.length] = c;
-                $displayObjectContainer.addChild(c.$displayObject);
-                if (c is IUIBase)
-                {
-                    IUIBase(c).addedToParent();
-                }*/
-            }
-
             COMPILE::JS
             {
-				if(c is THead) {
-					positioner.appendChild(c.positioner);
-					(c as IUIBase).addedToParent();
-				} else
-				{
-					element.appendChild(c.positioner);
-					(c as IUIBase).addedToParent();
-				}
+				addTHeadToParent();
+				addTBodyToParent();
+
+				if (_isTheadAddedToParent && _isTbodyAddedToParent)
+                {
+                    tbody.addElement(c);
+                }
             }
 		}
 		
 		COMPILE::JS
-		private var head:THead;
+		private var thead:THead;
+		private var _isTheadAddedToParent:Boolean = false;
+
+		COMPILE::JS
+		private var tbody:TBody;
+        private var _isTbodyAddedToParent:Boolean = false;
 
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
@@ -136,15 +126,13 @@ package org.apache.flex.mdl
         {
 			typeNames = "mdl-data-table mdl-js-data-table";
 
-            positioner = document.createElement('table') as WrappedHTMLElement;
-			
-			head = new THead();
-			addElement(head);
+			element = document.createElement('table') as WrappedHTMLElement;
+
+            thead = new THead();
+			tbody = new TBody();
 
-			element = document.createElement('tbody') as WrappedHTMLElement;
-			
-			positioner.appendChild(element);
-			element.flexjs_wrapper = this;
+			positioner = element;
+            element.flexjs_wrapper = this;
 
             return element;
         }
@@ -210,5 +198,29 @@ package org.apache.flex.mdl
 				typeNames = positioner.className;
 			}
         }
+
+		COMPILE::JS
+        private function addTHeadToParent():void
+        {
+            if (_isTheadAddedToParent) return;
+
+            if (thead)
+            {
+                super.addElement(thead);
+				_isTheadAddedToParent = true;
+            }
+        }
+
+        COMPILE::JS
+		private function addTBodyToParent():void
+		{
+			if (_isTbodyAddedToParent) return;
+
+			if (tbody)
+            {
+                super.addElement(tbody);
+				_isTbodyAddedToParent = true;
+            }
+		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d4eb637/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as
index b4abd7f..c90039f 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-	import org.apache.flex.html.Group;
+	import org.apache.flex.html.TableCell;
 
     COMPILE::JS
     {
@@ -33,7 +33,7 @@ package org.apache.flex.mdl
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.8
 	 */
-	public class TableCell extends Group
+	public class TableCell extends org.apache.flex.html.TableCell
 	{
 		/**
 		 *  constructor.
@@ -46,6 +46,8 @@ package org.apache.flex.mdl
 		public function TableCell()
 		{
 			super();
+
+			className = "";
 		}
 
 		private var _text:String = "";
@@ -87,13 +89,11 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			element = document.createElement('td') as WrappedHTMLElement;
-            element.classList.add("mdl-data-table__cell--non-numeric");
+            typeNames = "mdl-data-table__cell--non-numeric";
 
-            positioner = element;
-            element.flexjs_wrapper = this;
+           // element.classList.add("mdl-data-table__cell--non-numeric");
 
-            return element;
+            return super.createElement();;
         }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d4eb637/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as
index 2e67c28..d79eb66 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-	import org.apache.flex.html.Group;
+    import org.apache.flex.html.TableHeader;
 
     COMPILE::JS
     {
@@ -36,7 +36,7 @@ package org.apache.flex.mdl
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.8
 	 */
-	public class TableColumn extends Group
+	public class TableColumn extends TableHeader
 	{
 		/**
 		 *  constructor.
@@ -49,6 +49,8 @@ package org.apache.flex.mdl
 		public function TableColumn()
 		{
 			super();
+
+			className = "";
 		}
 
         private var _headerText:String = "";
@@ -90,13 +92,9 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			element = document.createElement('th') as WrappedHTMLElement;
-            element.classList.add("mdl-data-table__cell--non-numeric");
-
-            positioner = element;
-            element.flexjs_wrapper = this;
+			typeNames = "mdl-data-table__cell--non-numeric";
 
-            return element;
+            return super.createElement();;
         }
 		
         protected var _ascending:Boolean;


[13/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - FLEX-35350 - Add missing overrides of methods related to item renderers - Use in all places element instead positioner

Posted by pe...@apache.org.
FLEX-35350 - Add missing overrides of methods related to item renderers
- Use in all places element instead positioner


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

Branch: refs/heads/feature/dragAndDrop
Commit: 683db92f43d324bc786f6d8f99b5fab3b95aa842
Parents: 2950a79
Author: piotrz <pi...@apache.org>
Authored: Tue Aug 15 14:48:11 2017 +0200
Committer: piotrz <pi...@apache.org>
Committed: Tue Aug 15 14:48:11 2017 +0200

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/Table.as  | 68 +++++++++++++++-----
 1 file changed, 53 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/683db92f/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
index 22dbfe5..2513548 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
@@ -19,6 +19,7 @@
 package org.apache.flex.mdl
 {
 	import org.apache.flex.core.IChild;
+    import org.apache.flex.core.IItemRenderer;
 
     COMPILE::JS
     {
@@ -87,7 +88,8 @@ package org.apache.flex.mdl
 			}
         }
 
-		/**
+
+        /**
          *  @copy org.apache.flex.core.IParent#addElement()
          * 
          *  @langversion 3.0
@@ -109,8 +111,50 @@ package org.apache.flex.mdl
                 }
             }
 		}
-		
-		COMPILE::JS
+
+        override public function removeElement(c:IChild, dispatchEvent:Boolean = true):void
+        {
+			COMPILE::JS
+            {
+                if (_isTbodyAddedToParent)
+                {
+                    tbody.removeElement(c);
+                }
+            }
+        }
+
+        override public function removeAllItemRenderers():void
+        {
+			if (!_isTbodyAddedToParent) return;
+
+			COMPILE::JS
+            {
+                while (tbody.numElements)
+                {
+                    var child:IChild = tbody.getElementAt(0);
+                    removeElement(child);
+                }
+            }
+        }
+
+        override public function getItemRendererForIndex(index:int):IItemRenderer
+        {
+			if (!_isTbodyAddedToParent) return null;
+
+            COMPILE::JS
+            {
+                if (index < 0 || index >= tbody.numElements)
+				{
+					return null;
+                }
+
+                return tbody.getElementAt(index) as IItemRenderer;
+            }
+
+			return null;
+        }
+
+        COMPILE::JS
 		private var thead:THead;
 		private var _isTheadAddedToParent:Boolean = false;
 
@@ -136,13 +180,7 @@ package org.apache.flex.mdl
 
             return element;
         }
-		
-		COMPILE::JS
-		override protected function setClassName(value:String):void
-		{
-			positioner.className = value;
-		}
-        
+
 		protected var _shadow:Number = 0;
         /**
 		 *  A boolean flag to activate "mdl-shadow--Xdp" effect selector.
@@ -161,14 +199,14 @@ package org.apache.flex.mdl
         {
 			COMPILE::JS
 			{
-				positioner.classList.remove("mdl-shadow--" + _shadow + "dp");
+				element.classList.remove("mdl-shadow--" + _shadow + "dp");
 				
 				if(value == 2 || value == 3 || value == 4 || value == 6 || value == 8 || value == 16)
 				{
 					_shadow = value;
 
-					positioner.classList.add("mdl-shadow--" + _shadow + "dp");
-					typeNames = positioner.className;
+                    element.classList.add("mdl-shadow--" + _shadow + "dp");
+					typeNames = element.className;
 				}
 			}
         }
@@ -194,8 +232,8 @@ package org.apache.flex.mdl
 
 			COMPILE::JS
             {
-				positioner.classList.toggle("mdl-data-table--selectable", _selectable);
-				typeNames = positioner.className;
+                element.classList.toggle("mdl-data-table--selectable", _selectable);
+				typeNames = element.className;
 			}
         }
 


[07/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - try this price if we can't get other price data

Posted by pe...@apache.org.
try this price if we can't get other price data


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

Branch: refs/heads/feature/dragAndDrop
Commit: 6e55c55c716a79d09b62e63d58110b39037d5fcf
Parents: bf706bc
Author: Alex Harui <ah...@apache.org>
Authored: Wed Aug 9 10:18:58 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Aug 9 10:19:13 2017 -0700

----------------------------------------------------------------------
 examples/flexjs/DataBindingExample/src/main/flex/models/MyModel.as | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6e55c55c/examples/flexjs/DataBindingExample/src/main/flex/models/MyModel.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample/src/main/flex/models/MyModel.as b/examples/flexjs/DataBindingExample/src/main/flex/models/MyModel.as
index 5a16d02..0c05d63 100644
--- a/examples/flexjs/DataBindingExample/src/main/flex/models/MyModel.as
+++ b/examples/flexjs/DataBindingExample/src/main/flex/models/MyModel.as
@@ -58,6 +58,8 @@ package models
 			{
 				if (_requestedField == "Ask")
 					s = _responseData["Bid"];
+                if (s == null)
+                    s = _responseData["LastTradePriceOnly"];
 			}
 			return s;
 		}


[20/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - This should work better with MXML

Posted by pe...@apache.org.
This should work better with MXML


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

Branch: refs/heads/feature/dragAndDrop
Commit: 89145f1889b7389ca8f241ee98b46e753b63036d
Parents: 8eaaeff
Author: Harbs <ha...@in-tools.com>
Authored: Fri Aug 18 15:33:23 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Fri Aug 18 15:33:23 2017 +0300

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/CheckBox.as       | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/89145f18/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
index 217edf5..58966f5 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
@@ -245,10 +245,16 @@ package org.apache.flex.mdl
 
             COMPILE::JS
 			{
-                if(value)
-                    element['MaterialCheckbox'].check();
+                var instance:Object = element['MaterialCheckbox'];
+                if(instance)
+                {
+                    if(value)
+                        instance["check"]();
+                    else
+                        instance["uncheck"]();
+                }
                 else
-                    element['MaterialCheckbox'].uncheck();
+                    input.checked = value;
             }
         }
     }


[12/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Fix typo in import of KeyboardEvent

Posted by pe...@apache.org.
Fix typo in import of KeyboardEvent


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

Branch: refs/heads/feature/dragAndDrop
Commit: 2950a794ee83d0c5436f99861ed317d1e390dc2c
Parents: 1d4eb63
Author: piotrz <pi...@apache.org>
Authored: Tue Aug 15 13:18:14 2017 +0200
Committer: piotrz <pi...@apache.org>
Committed: Tue Aug 15 13:18:14 2017 +0200

----------------------------------------------------------------------
 .../flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2950a794/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
index 7b932e2..f83ed16 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
@@ -28,7 +28,7 @@ package org.apache.flex.html.beads
 	COMPILE::JS
 		{
 			import org.apache.flex.core.IRenderedObject;
-			import org.org.apache.flex.events.KeyboardEvent;
+			import org.apache.flex.events.KeyboardEvent;
 			import goog.events;
 		}
 		


[06/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Fixed event handling

Posted by pe...@apache.org.
Fixed event handling


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

Branch: refs/heads/feature/dragAndDrop
Commit: dcd748c8c2d3732891419599438cf13ecc6ce27b
Parents: e830366
Author: Harbs <ha...@in-tools.com>
Authored: Wed Aug 9 19:45:30 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Aug 9 19:45:30 2017 +0300

----------------------------------------------------------------------
 .../org/apache/flex/html/beads/DispatchInputFinishedBead.as   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dcd748c8/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
index 40cc900..7b932e2 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
@@ -23,10 +23,12 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.events.utils.WhitespaceKeys;
 	
 	COMPILE::JS
 		{
 			import org.apache.flex.core.IRenderedObject;
+			import org.org.apache.flex.events.KeyboardEvent;
 			import goog.events;
 		}
 		
@@ -35,6 +37,7 @@ package org.apache.flex.html.beads
 			import flash.events.FocusEvent;
 			import flash.events.KeyboardEvent;
 			import org.apache.flex.html.beads.ITextFieldView;
+			import org.apache.flex.events.utils.WhitespaceKeys;
 		}
 		
 		/**
@@ -118,9 +121,9 @@ package org.apache.flex.html.beads
 			 * @private
 			 */
 			COMPILE::JS
-			private function keydownHandler( event:Object ) : void
+			private function keydownHandler( event:KeyboardEvent ) : void
 			{
-				if (event.keyCode == 13) //enter
+				if (event.key == WhitespaceKeys.ENTER) //enter
 				{
 					(_strand as IEventDispatcher).dispatchEvent(new Event(INPUT_FINISHED));
 				}


[28/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Merge branch 'develop' into feature/dragAndDrop

Posted by pe...@apache.org.
Merge branch 'develop' into feature/dragAndDrop

* develop: (26 commits)
  Update MDL Example - MDL Grid should have at least one MDL GridCell
  Added support for blink alpha and blink color for point cursor. HTML does not have the same transparency support as Flash and control over alternating colors is important.
  revert this because it isn't needed now that we require the same IValuesImpl in the module as is in the main app.
  switch to using IModule to trigger module output
  Forgot import
  Added change event on CheckBox Fixed RadioButton too
  This should work better with MXML
  Forgot to remove this line.
  Setting checked state manually now works
  maven build for ModuleExample.  Module artifacts are not copied into the MainApp (yet)
  initial module example
  initialize modules
  UIModule and UIModuleLoader
  FLEX-35350 - Add missing overrides of methods related to item renderers - Use in all places element instead positioner
  Fix typo in import of KeyboardEvent
  FLEX-35350 - Make HTML element "table" as main element of MDL Table component which allows to add bead to it instead of "tbody" - TableCell and TableColumnt now extends existing classes in Basic module - accordingly TableCell and TableHeader
  Fix typo in comments of MDL CardInner
  Cleaned up HTML components
  try this price if we can't get other price data
  fx:Style blocks in MXML weren't working.  How did they ever work?
  ...


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

Branch: refs/heads/feature/dragAndDrop
Commit: 2443273b691c62df76f29dd05d68da88f7f7e88e
Parents: bdc6246 8b10930
Author: Peter Ent <pe...@apache.org>
Authored: Mon Aug 21 10:41:46 2017 +0200
Committer: Peter Ent <pe...@apache.org>
Committed: Mon Aug 21 10:41:46 2017 +0200

----------------------------------------------------------------------
 examples/build.xml                              |   3 +
 .../src/main/flex/models/MyModel.as             |   2 +
 .../flexjs/MDLExample/src/main/flex/Badges.mxml |  53 +++--
 .../MDLExample/src/main/flex/Buttons.mxml       | 176 +++++++-------
 .../flexjs/MDLExample/src/main/flex/Chips.mxml  |  19 +-
 .../MDLExample/src/main/flex/Dialogs.mxml       |  14 +-
 .../MDLExample/src/main/flex/DropDownList.mxml  |   5 +-
 .../MDLExample/src/main/flex/Footers.mxml       |  10 +-
 .../flexjs/MDLExample/src/main/flex/Grids.mxml  |   5 -
 .../flexjs/MDLExample/src/main/flex/Icons.mxml  |  58 ++---
 .../flexjs/MDLExample/src/main/flex/Lists.mxml  | 171 +++++---------
 .../flexjs/MDLExample/src/main/flex/Menus.mxml  |  37 +--
 .../MDLExample/src/main/flex/Sliders.mxml       |  11 +-
 .../MDLExample/src/main/flex/Snackbar.mxml      |  13 +-
 .../flexjs/MDLExample/src/main/flex/Tables.mxml | 123 +++++-----
 .../flexjs/MDLExample/src/main/flex/Tabs.mxml   |   4 +-
 .../MDLExample/src/main/flex/TextFields.mxml    | 116 ++++-----
 .../MDLExample/src/main/flex/Toggles.mxml       |  90 +++----
 examples/flexjs/ModuleExample/MainApp/build.xml |  55 +++++
 examples/flexjs/ModuleExample/MainApp/pom.xml   |  60 +++++
 .../src/main/config/compile-app-config.xml      |  24 ++
 .../MainApp/src/main/flex/MainApp.mxml          |  34 +++
 examples/flexjs/ModuleExample/Module/build.xml  |  76 ++++++
 examples/flexjs/ModuleExample/Module/pom.xml    |  60 +++++
 .../src/main/config/compile-app-config.xml      |  26 +++
 .../Module/src/main/flex/Module.mxml            |  30 +++
 examples/flexjs/ModuleExample/build.xml         |  95 ++++++++
 examples/flexjs/ModuleExample/pom.xml           | 162 +++++++++++++
 examples/flexjs/pom.xml                         |   1 +
 .../main/flex/org/apache/flex/html/UIModule.as  | 140 +++++++++++
 .../flex/org/apache/flex/html/UIModuleLoader.as | 233 +++++++++++++++++++
 .../html/beads/DispatchInputFinishedBead.as     |   7 +-
 .../beads/EasyDataProviderChangeNotifier.as     | 108 +++++++++
 .../beads/SimpleDataProviderChangeNotifier.as   |  90 -------
 .../Basic/src/main/resources/basic-manifest.xml |   5 +-
 .../projects/Core/src/main/flex/CoreClasses.as  |   1 +
 .../main/flex/org/apache/flex/core/IModule.as   |  34 +++
 .../org/apache/flex/core/SimpleCSSValuesImpl.as |   5 +-
 .../src/main/flex/org/apache/flex/html/A.as     |   6 +-
 .../src/main/flex/org/apache/flex/html/H1.as    |   6 +-
 .../src/main/flex/org/apache/flex/html/H2.as    |   6 +-
 .../src/main/flex/org/apache/flex/html/H3.as    |   6 +-
 .../src/main/flex/org/apache/flex/html/H4.as    |   6 +-
 .../src/main/flex/org/apache/flex/html/H5.as    |   6 +-
 .../src/main/flex/org/apache/flex/html/H6.as    |   6 +-
 .../src/main/flex/org/apache/flex/html/I.as     |   6 +-
 .../src/main/flex/org/apache/flex/html/Li.as    |   7 +-
 .../main/flex/org/apache/flex/html/Select.as    |   3 +-
 .../src/main/flex/org/apache/flex/html/Ul.as    |   5 +-
 .../main/flex/org/apache/flex/mdl/CheckBox.as   |  60 ++++-
 .../flex/org/apache/flex/mdl/RadioButton.as     |  15 +-
 .../src/main/flex/org/apache/flex/mdl/TBody.as  |  67 ++++++
 .../src/main/flex/org/apache/flex/mdl/Table.as  | 136 +++++++----
 .../main/flex/org/apache/flex/mdl/TableCell.as  |  14 +-
 .../flex/org/apache/flex/mdl/TableColumn.as     |  14 +-
 .../apache/flex/mdl/supportClasses/CardInner.as |   2 +-
 .../src/main/resources/defaults.css             |  10 +-
 .../projects/TLF/src/main/flex/TLFClasses.as    |   1 +
 .../beads/DispatchTLFKeyboardEventBead.as       |  13 +-
 .../textLayout/container/ContainerController.as |  38 ++-
 .../flex/textLayout/edit/SelectionFormat.as     |  32 ++-
 .../apache/flex/text/engine/ElementFormat.as    |  10 +-
 .../flex/org/apache/flex/text/html/TextLine.as  |   4 +-
 manualtests/TLFEditTestFlexJS/src/TLFEditor.as  |   4 +
 64 files changed, 1955 insertions(+), 684 deletions(-)
----------------------------------------------------------------------



[21/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Added change event on CheckBox Fixed RadioButton too

Posted by pe...@apache.org.
Added change event on CheckBox
Fixed RadioButton too


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

Branch: refs/heads/feature/dragAndDrop
Commit: 1d4211c4cb0200b2c8bae172adef6f9575ff553f
Parents: 89145f1
Author: Harbs <ha...@in-tools.com>
Authored: Fri Aug 18 15:46:25 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Fri Aug 18 15:46:25 2017 +0300

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/CheckBox.as    |  3 +++
 .../src/main/flex/org/apache/flex/mdl/RadioButton.as | 15 +++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d4211c4/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
index 58966f5..25d6846 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
@@ -245,6 +245,8 @@ package org.apache.flex.mdl
 
             COMPILE::JS
 			{
+                if(input.checked == value)
+                    return;
                 var instance:Object = element['MaterialCheckbox'];
                 if(instance)
                 {
@@ -255,6 +257,7 @@ package org.apache.flex.mdl
                 }
                 else
                     input.checked = value;
+                dispatchEvent(new Event(Event.CHANGE));
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d4211c4/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
index f07a048..1b93392 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
@@ -417,8 +417,19 @@ package org.apache.flex.mdl
         }
         public function set selected(value:Boolean):void
         {
-            icon.checked = value;
-            dispatchEvent(new Event(Event.CHANGE))
+            if(icon.checked == value)
+                return;
+            var instance:Object = element['MaterialRadio'];
+            if(instance)
+            {
+                if(value)
+                    instance["check"]();
+                else
+                    instance["uncheck"]();
+            }
+            else
+                icon.checked = value;
+            dispatchEvent(new Event(Event.CHANGE));
         }
         
         public function get value():Object


[22/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Forgot import

Posted by pe...@apache.org.
Forgot import


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

Branch: refs/heads/feature/dragAndDrop
Commit: ccc699f0bef00d258280d00625af8b314fbf7895
Parents: 1d4211c
Author: Harbs <ha...@in-tools.com>
Authored: Fri Aug 18 17:02:34 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Fri Aug 18 17:02:34 2017 +0300

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/CheckBox.as                   | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ccc699f0/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
index 25d6846..c3a405a 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
@@ -26,6 +26,7 @@ package org.apache.flex.mdl
     COMPILE::JS
     {
         import org.apache.flex.core.WrappedHTMLElement;
+        import org.apache.flex.events.Event;
     }
 
     /**


[19/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Forgot to remove this line.

Posted by pe...@apache.org.
Forgot to remove this line.


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

Branch: refs/heads/feature/dragAndDrop
Commit: 8eaaeffb03fc2c38ad2e89ab044425b7e366678c
Parents: 467d4bf
Author: Harbs <ha...@in-tools.com>
Authored: Fri Aug 18 15:26:24 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Fri Aug 18 15:26:24 2017 +0300

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/CheckBox.as                   | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8eaaeffb/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
index 84afae8..217edf5 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
@@ -245,7 +245,6 @@ package org.apache.flex.mdl
 
             COMPILE::JS
 			{
-                input.checked = value;
                 if(value)
                     element['MaterialCheckbox'].check();
                 else


[02/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - change coordinate space to something expected but different from the way Flash textLine works

Posted by pe...@apache.org.
change coordinate space to something expected but different from the way Flash textLine works


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

Branch: refs/heads/feature/dragAndDrop
Commit: 367f8b9793641cbc43d88c4bb8184d136b5a3d09
Parents: 3bb3f41
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 8 10:00:20 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 8 10:01:16 2017 -0700

----------------------------------------------------------------------
 .../Text/src/main/flex/org/apache/flex/text/html/TextLine.as     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/367f8b97/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
index 440ae30..c260c0c 100644
--- a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
@@ -356,7 +356,7 @@ package org.apache.flex.text.html
 				if (atomIndex == element.firstChild.textContent.length - 1)
 				{
 					w = (element.firstChild as HTMLElement).getClientRects()[0].width;
-					return new Rectangle(w, 1.2 - _textBlock.content.elementFormat.fontSize, 3, 1.2);
+					return new Rectangle(w, 1.2, 3, 1.2 + _textBlock.content.elementFormat.fontSize);
 				}
 				else
 				{
@@ -372,7 +372,7 @@ package org.apache.flex.text.html
                     span.innerHTML = s.substring(0, atomIndex + 1);
                     w = span.getClientRects()[0].width;
 					element.removeChild(span);
-					return new Rectangle(w1, 1.2 - _textBlock.content.elementFormat.fontSize, w - w1, 1.2);
+					return new Rectangle(w1, 1.2, w - w1, 1.2 + _textBlock.content.elementFormat.fontSize);
 				}
 			}
 		}


[03/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - TLFEditor needs StandardTLFFactory

Posted by pe...@apache.org.
TLFEditor needs StandardTLFFactory


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

Branch: refs/heads/feature/dragAndDrop
Commit: 9decbb65f7fcb4ab3425700ab6e8d311b05948c6
Parents: 574faa1
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 8 09:59:13 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 8 10:01:16 2017 -0700

----------------------------------------------------------------------
 frameworks/projects/TLF/src/main/flex/TLFClasses.as | 1 +
 manualtests/TLFEditTestFlexJS/src/TLFEditor.as      | 4 ++++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9decbb65/frameworks/projects/TLF/src/main/flex/TLFClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/TLFClasses.as b/frameworks/projects/TLF/src/main/flex/TLFClasses.as
index 29f9d14..6321c18 100644
--- a/frameworks/projects/TLF/src/main/flex/TLFClasses.as
+++ b/frameworks/projects/TLF/src/main/flex/TLFClasses.as
@@ -111,6 +111,7 @@ package
 		import org.apache.flex.textLayout.events.TextLayoutEvent; TextLayoutEvent;
 		
 		import org.apache.flex.textLayout.factory.TextLineFactoryBase; TextLineFactoryBase;
+        import org.apache.flex.textLayout.factory.StandardTLFFactory; StandardTLFFactory;
 		import org.apache.flex.textLayout.factory.StringTextLineFactory; StringTextLineFactory;
 		import org.apache.flex.textLayout.factory.TextFlowTextLineFactory; TextFlowTextLineFactory;
 		import org.apache.flex.textLayout.factory.TruncationOptions; TruncationOptions;		

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9decbb65/manualtests/TLFEditTestFlexJS/src/TLFEditor.as
----------------------------------------------------------------------
diff --git a/manualtests/TLFEditTestFlexJS/src/TLFEditor.as b/manualtests/TLFEditTestFlexJS/src/TLFEditor.as
index fc6ad76..8052a58 100644
--- a/manualtests/TLFEditTestFlexJS/src/TLFEditor.as
+++ b/manualtests/TLFEditTestFlexJS/src/TLFEditor.as
@@ -30,6 +30,8 @@ import flash.utils.setTimeout;
 
 import org.apache.flex.textLayout.beads.DispatchTLFKeyboardEventBead;
 import org.apache.flex.textLayout.container.TextContainerManager;
+import org.apache.flex.textLayout.factory.TLFFactory;
+import org.apache.flex.textLayout.factory.StandardTLFFactory;
 import org.apache.flex.textLayout.edit.EditingMode;
 import org.apache.flex.textLayout.edit.ISelectionManager;
 import org.apache.flex.textLayout.edit.SelectionFormat;
@@ -57,6 +59,8 @@ public class TLFEditor extends UIBase
 	
 	public function TLFEditor()
 	{
+        TLFFactory.defaultTLFFactory = new StandardTLFFactory();
+        
 		// Create the TLF TextContainerManager, using this component
 		// as the DisplayObjectContainer for its TextLines.
 		// This TextContainerManager instance persists for the lifetime


[17/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - maven build for ModuleExample. Module artifacts are not copied into the MainApp (yet)

Posted by pe...@apache.org.
maven build for ModuleExample.  Module artifacts are not copied into the MainApp (yet)


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

Branch: refs/heads/feature/dragAndDrop
Commit: f208da8d9a7836a6100b8426faf0ca08c9fed71e
Parents: ba3140b
Author: Alex Harui <ah...@apache.org>
Authored: Wed Aug 16 10:08:26 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Aug 16 10:08:26 2017 -0700

----------------------------------------------------------------------
 examples/flexjs/ModuleExample/MainApp/pom.xml |  60 ++++++++
 examples/flexjs/ModuleExample/Module/pom.xml  |  60 ++++++++
 examples/flexjs/ModuleExample/pom.xml         | 162 +++++++++++++++++++++
 examples/flexjs/pom.xml                       |   1 +
 4 files changed, 283 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f208da8d/examples/flexjs/ModuleExample/MainApp/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/MainApp/pom.xml b/examples/flexjs/ModuleExample/MainApp/pom.xml
new file mode 100644
index 0000000..8fc88e2
--- /dev/null
+++ b/examples/flexjs/ModuleExample/MainApp/pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.flex.flexjs.examples</groupId>
+    <artifactId>examples-flexjs-ModuleExample</artifactId>
+    <version>0.9.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>MainApp</artifactId>
+  <version>0.9.0-SNAPSHOT</version>
+  <packaging>swf</packaging>
+
+  <name>Apache Flex - FlexJS: Examples: FlexJS: ModuleExample: MainApp</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.flex.flexjs.compiler</groupId>
+        <artifactId>flexjs-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <mainClass>MainApp.mxml</mainClass>
+          <debug>false</debug>
+          <additionalCompilerOptions>-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>${flash.version}</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f208da8d/examples/flexjs/ModuleExample/Module/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/Module/pom.xml b/examples/flexjs/ModuleExample/Module/pom.xml
new file mode 100644
index 0000000..2001b0a
--- /dev/null
+++ b/examples/flexjs/ModuleExample/Module/pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.flex.flexjs.examples</groupId>
+    <artifactId>examples-flexjs-ModuleExample</artifactId>
+    <version>0.9.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>Module</artifactId>
+  <version>0.9.0-SNAPSHOT</version>
+  <packaging>swf</packaging>
+
+  <name>Apache Flex - FlexJS: Examples: FlexJS: ModuleExample: Module</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.flex.flexjs.compiler</groupId>
+        <artifactId>flexjs-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <mainClass>Module.mxml</mainClass>
+          <debug>false</debug>
+          <additionalCompilerOptions>-js-compiler-option=--variable_map_input_file ../../../../../MainApp/target/javascript/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/target/javascript/bin/js-release/gccprops.txt</additionalCompilerOptions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>${flash.version}</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f208da8d/examples/flexjs/ModuleExample/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ModuleExample/pom.xml b/examples/flexjs/ModuleExample/pom.xml
new file mode 100644
index 0000000..3e48e85
--- /dev/null
+++ b/examples/flexjs/ModuleExample/pom.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.flex.flexjs.examples</groupId>
+    <artifactId>examples-flexjs</artifactId>
+    <version>0.9.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>examples-flexjs-ModuleExample</artifactId>
+  <version>0.9.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>Apache Flex - FlexJS: Examples: FlexJS: ModuleExample</name>
+
+  <modules>
+    <module>MainApp</module>
+    <module>Module</module>
+  </modules>
+
+  <!--
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.19.1</version>
+        <executions>
+          <execution>
+            <id>tests-default</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <dependenciesToScan>
+                <dependency>org.apache.flex.flexjs.examples:examples-tests</dependency>
+              </dependenciesToScan>
+              <systemPropertyVariables>
+                <artifactId>${project.artifactId}</artifactId>
+                <version>${project.version}</version>
+                <type>${project.packaging}</type>
+                <targets>${project.build.plugins.plugin.configuration.targets}</targets>
+                <buildDirectory>${project.build.directory}</buildDirectory>
+              </systemPropertyVariables>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  -->
+
+  <dependencies>
+    <!--
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Collections</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Collections</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Binding</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Binding</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Graphics</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.flex.flexjs.framework</groupId>
+        <artifactId>Graphics</artifactId>
+        <version>0.9.0-SNAPSHOT</version>
+        <type>swc</type>
+        <classifier>js</classifier>
+    </dependency>
+     -->
+  </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f208da8d/examples/flexjs/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/pom.xml b/examples/flexjs/pom.xml
index 14abd70..2de6a5a 100644
--- a/examples/flexjs/pom.xml
+++ b/examples/flexjs/pom.xml
@@ -53,6 +53,7 @@
     <!--module>MDLBlogExample</module>-->
     <module>MDLDynamicTabsExample</module>
     <module>MDLExample</module>
+    <module>ModuleExample</module>
     <module>MobileMap</module>
     <module>MobileStocks</module>
     <module>MobileTrader</module>


[14/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - UIModule and UIModuleLoader

Posted by pe...@apache.org.
UIModule and UIModuleLoader


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

Branch: refs/heads/feature/dragAndDrop
Commit: 020c1cb9e4a825f228ced241728dd80e4cab8432
Parents: 683db92
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 15 13:15:50 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 15 13:19:34 2017 -0700

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/html/UIModule.as  | 139 +++++++++++
 .../flex/org/apache/flex/html/UIModuleLoader.as | 233 +++++++++++++++++++
 .../Basic/src/main/resources/basic-manifest.xml |   3 +
 3 files changed, 375 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/020c1cb9/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModule.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModule.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModule.as
new file mode 100644
index 0000000..4c7784f
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModule.as
@@ -0,0 +1,139 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+    COMPILE::SWF
+    {
+        import flash.system.ApplicationDomain;        
+        import flash.utils.getQualifiedClassName;        
+    }
+    import org.apache.flex.core.IFlexInfo;
+    import org.apache.flex.core.IValuesImpl;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.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 FlexJS 0.0
+     */
+    [Event(name="stateChangeComplete", type="org.apache.flex.events.Event")]
+    
+    /**
+     *  Indicates that the initialization of the container is complete.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+    [Event(name="initComplete", type="org.apache.flex.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 FlexJS 0.0
+     */
+    [Event(name="childrenAdded", type="org.apache.flex.events.Event")]
+    
+    /**
+     *  The UIModule class is the base class for modules of user
+     *  interface controls in FlexJS.  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 FlexJS 0.0
+     */
+	public class UIModule extends Group implements IFlexInfo
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function UIModule()
+		{
+			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 FlexJS 0.0
+         */
+        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.flex.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.flex.core.SimpleCSSValuesImpl
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function set valuesImpl(value:IValuesImpl):void
+        {
+            ValuesManager.valuesImpl.init(this);
+        }
+
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/020c1cb9/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModuleLoader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModuleLoader.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModuleLoader.as
new file mode 100644
index 0000000..db4acee
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/UIModuleLoader.as
@@ -0,0 +1,233 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events.Event;
+		import flash.system.LoaderContext;
+		import flash.system.ApplicationDomain;
+		import flash.net.URLRequest;
+	}
+	
+    COMPILE::JS
+    {
+        import goog.global;
+        import org.apache.flex.core.WrappedHTMLElement;   
+    }
+    
+    /**
+     *  The UIModuleLoader class can load a UIModule. 
+	 * 
+     *  @toplevel
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+	public class UIModuleLoader extends UIBase
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function UIModuleLoader()
+		{
+			super();
+		}
+		
+        private var _modulePath:String;
+        
+        /**
+         *  Path or URL of module.  This is combined
+         *  with the module name and a platform suffix
+         *  to determine the actual path or URL of the
+         *  module.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get modulePath():String
+        {
+            return _modulePath;
+        }
+        
+        /**
+         *  @private.
+         */
+        public function set modulePath(value:String):void
+        {
+            _modulePath = value;
+        }
+        
+        private var _moduleName:String;
+        
+        public function get moduleName():String
+        {
+            return _moduleName;
+        }
+        
+        public function set moduleName(value:String):void
+        {
+            _moduleName = value;
+        }
+        
+		COMPILE::SWF
+		private var swfLoader:Loader;
+		
+		COMPILE::JS
+		private var jsLoader:WrappedHTMLElement;
+
+        COMPILE::JS
+        private var jsDepsLoader:WrappedHTMLElement;
+        
+        override public function addedToParent():void
+        {
+            super.addedToParent();
+            if (_modulePath)
+                loadModule();
+        }
+        
+		/**
+		 * @private
+		 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 */
+		private function createLoader():void
+		{
+			COMPILE::SWF {				
+				if (swfLoader != null) {
+                    swfLoader.contentLoaderInfo.removeEventListener("complete", completeHandler);
+				}
+				
+				swfLoader = new Loader();
+                swfLoader.contentLoaderInfo.addEventListener("complete", completeHandler);
+			}
+				
+			COMPILE::JS {
+				var origin:Point = new Point(0,0);
+				var xlated:Point = PointUtils.localToGlobal(origin, parent);
+				
+                if (goog.DEBUG)
+                {
+                    if (jsDepsLoader == null) {
+                        jsDepsLoader = document.createElement('script') as WrappedHTMLElement;
+                        jsDepsLoader.onload = loadDepsHandler;
+                        document.body.appendChild(jsDepsLoader);
+                    }                    
+                }
+                else
+                {
+    				if (jsLoader == null) {
+    					jsLoader = document.createElement('script') as WrappedHTMLElement;
+                        jsLoader.onload = loadHandler;
+    					document.body.appendChild(jsLoader);
+    				}
+                }
+			}
+		}
+		
+		/**
+         *  Load the module.  Will be called automatically if modulePath
+         *  is set as the UIModuleLoader is added to the display list.
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+		 */
+		public function loadModule():void
+		{
+            if (moduleInstance)
+                removeElement(moduleInstance);
+            
+			createLoader();
+			
+			COMPILE::SWF {
+				var url:URLRequest = new URLRequest(modulePath ? modulePath + "/" + moduleName + ".swf" :
+                                                    moduleName + ".swf");
+				var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
+				swfLoader.load(url, loaderContext);
+				if (swfLoader.parent == null) {
+					addChild(swfLoader);
+				}
+			}
+				
+			COMPILE::JS {
+                if (!goog.DEBUG)
+    	   			jsLoader.setAttribute("src", modulePath ? modulePath + "/" + moduleName + ".js" :
+                        moduleName + ".js");
+                else
+                {
+                    // js-debug module loading requires that the __deps.js file has been tweaked
+                    // so that the path to the module class is correct and that any
+                    // framework js files have been copied into the same tree structure as
+                    // the main apps framework js files
+                    window["goog"]["ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING"] = true;
+                    jsDepsLoader.setAttribute("src", modulePath ? modulePath + "/" + moduleName + "__deps.js" :
+                        moduleName + "__deps.js");
+                }
+			}
+		}
+        
+        private var moduleInstance:IUIBase;
+        
+        COMPILE::SWF
+        protected function completeHandler(event:flash.events.Event):void
+        {
+            var c:Class = ApplicationDomain.currentDomain.getDefinition(moduleName) as Class;
+            moduleInstance = new c() as IUIBase;
+            addElement(moduleInstance);
+        }
+        
+        COMPILE::JS
+        protected function loadDepsHandler():void
+        {
+            // wait for other scripts to load
+            if (window[moduleName] == null)
+            {
+                setTimeout(loadDepsHandler, 250);
+            }
+            else
+                loadHandler();
+                
+        }
+        
+        COMPILE::JS
+        protected function loadHandler():void
+        {
+            var c:Class = window[moduleName];
+            moduleInstance = new c() as IUIBase;
+            addElement(moduleInstance);
+        }
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/020c1cb9/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
index 9df3370..a07fc40 100644
--- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
@@ -174,4 +174,7 @@
     <component id="TableCell" class="org.apache.flex.html.TableCell"/>
     <component id="TableHeader" class="org.apache.flex.html.TableHeader"/>
 
+    <component id="UIModule" class="org.apache.flex.html.UIModule"/>
+    <component id="UIModuleLoader" class="org.apache.flex.html.UIModuleLoader"/>
+
 </componentPackage>


[05/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Fixed SimpleDataProviderChangeNotifier and renamed it to EasyDataProviderChangeNotifier

Posted by pe...@apache.org.
Fixed SimpleDataProviderChangeNotifier and renamed it to EasyDataProviderChangeNotifier


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

Branch: refs/heads/feature/dragAndDrop
Commit: e830366e44f9643c30e62a2edcf998e8d36ac6cf
Parents: 2b2c100
Author: Harbs <ha...@in-tools.com>
Authored: Wed Aug 9 13:42:37 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Aug 9 13:42:37 2017 +0300

----------------------------------------------------------------------
 .../beads/EasyDataProviderChangeNotifier.as     | 108 +++++++++++++++++++
 .../beads/SimpleDataProviderChangeNotifier.as   |  90 ----------------
 .../Basic/src/main/resources/basic-manifest.xml |   2 +-
 3 files changed, 109 insertions(+), 91 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e830366e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/EasyDataProviderChangeNotifier.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/EasyDataProviderChangeNotifier.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/EasyDataProviderChangeNotifier.as
new file mode 100644
index 0000000..0832581
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/EasyDataProviderChangeNotifier.as
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.beads
+{
+	import org.apache.flex.collections.ArrayList;
+	import org.apache.flex.core.ISelectionModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.IEventDispatcher;
+
+    /**
+	 *  The EasyDataProviderChangeNotifier is similar to DataProviderChangeNotifier
+	 *  but allows the user to populate the data provider after it's been added.
+	 *  Also, no attributes are required. Just add <EasyDataProviderChangeNotifier/>.
+	 *  The dataProvider is assumed to be an ArrayList.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class EasyDataProviderChangeNotifier extends DataProviderChangeNotifier
+	{
+		/**
+		 *  constructor.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function EasyDataProviderChangeNotifier()
+		{
+			super();
+			changeEventName = "dataProviderChanged";
+		}
+		
+		override public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			if(changeEventName)
+				selectionModel.addEventListener(changeEventName, destinationChangedHandler);
+			
+			destinationChangedHandler(null);
+		}
+		
+		override protected function destinationChangedHandler(event:Event):void
+		{
+			if (!dataProvider)
+			{
+				setDataProvider();
+				if (!dataProvider && !changeEventName)
+					selectionModel.addEventListener("dataProviderChanged", setFirstDataProvider);
+				
+			} else
+			{
+				if(dataProvider == selectionModel.dataProvider)
+					return;
+				detachEventListeners();
+				setDataProvider();
+				attachEventListeners();
+			}
+		}
+		
+		private function setFirstDataProvider(e:Event):void
+		{
+			setDataProvider();
+			selectionModel.removeEventListener("dataProviderChanged", setFirstDataProvider);
+		}
+		
+		/**
+		 * @flexjsignorecoercion org.apache.flex.collections.ArrayList
+		 */
+		private function setDataProvider():void
+		{
+			dataProvider = selectionModel.dataProvider as ArrayList;
+			if(dataProvider)
+				attachEventListeners();
+		}
+		
+		/**
+		 * @flexjsignorecoercion org.apache.flex.core.UIBase
+		 * @flexjsignorecoercion org.apache.flex.core.ISelectionModel
+		 */
+		private function get selectionModel():ISelectionModel
+		{
+			return (_strand as UIBase).model as ISelectionModel;
+		}
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e830366e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/SimpleDataProviderChangeNotifier.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/SimpleDataProviderChangeNotifier.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/SimpleDataProviderChangeNotifier.as
deleted file mode 100644
index 1d55c76..0000000
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/SimpleDataProviderChangeNotifier.as
+++ /dev/null
@@ -1,90 +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.beads
-{
-	import org.apache.flex.collections.ArrayList;
-	import org.apache.flex.core.ISelectionModel;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.events.Event;
-
-    /**
-	 *  The SimpleDataProviderChangeNotifier is similar to DataProviderChangeNotifier
-	 *  but allows the user to populate the data provider after it's been added.
-	 *  Also, no attributes are required. Just add <SimpleDataProviderChangeNotifier/>.
-	 *  The dataProvider is assumed to be an ArrayList.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class SimpleDataProviderChangeNotifier extends DataProviderChangeNotifier
-	{
-		/**
-		 *  constructor.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function SimpleDataProviderChangeNotifier()
-		{
-			super();
-		}
-		
-		override public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			destinationChangedHandler(null);
-		}
-		
-		override protected function destinationChangedHandler(event:Event):void
-		{
-			if (!dataProvider)
-			{
-				setDataProvider();
-				if (!dataProvider)
-					selectionModel.addEventListener("dataProviderChanged", setFirstDataProvider);
-			} else
-			{
-				detachEventListeners();
-				attachEventListeners();
-			}
-		}
-		
-		private function setFirstDataProvider(e:Event):void
-		{
-			setDataProvider();
-			selectionModel.removeEventListener("dataProviderChanged", setFirstDataProvider);
-			destinationChangedHandler(null);
-		}
-		
-		private function setDataProvider():void
-		{
-			dataProvider = selectionModel.dataProvider as ArrayList;
-		}
-		
-		private function get selectionModel():ISelectionModel
-		{
-			return _strand.getBeadByType(ISelectionModel) as ISelectionModel;
-		}
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e830366e/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
index 43206f7..9df3370 100644
--- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
@@ -129,7 +129,7 @@
 
     <component id="DataGrid" class="org.apache.flex.html.DataGrid"/>
     <component id="DataProviderChangeNotifier" class="org.apache.flex.html.beads.DataProviderChangeNotifier"/>
-    <component id="SimpleDataProviderChangeNotifier" class="org.apache.flex.html.beads.SimpleDataProviderChangeNotifier"/>
+    <component id="EasyDataProviderChangeNotifier" class="org.apache.flex.html.beads.EasyDataProviderChangeNotifier"/>
     <component id="DataProviderCollectionChangeNotifier" class="org.apache.flex.html.beads.DataProviderCollectionChangeNotifier"/>
     <component id="DataProviderItemsChangeNotifier" class="org.apache.flex.html.beads.DataProviderItemsChangeNotifier"/>
     <component id="DataGridButtonBar" class="org.apache.flex.html.DataGridButtonBar"/>


[15/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - initialize modules

Posted by pe...@apache.org.
initialize modules


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

Branch: refs/heads/feature/dragAndDrop
Commit: 8e7c65320d79cc0f66c9949c4362ac68ac5266bc
Parents: 020c1cb
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 15 13:17:00 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 15 13:19:34 2017 -0700

----------------------------------------------------------------------
 .../flex/org/apache/flex/core/SimpleCSSValuesImpl.as    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8e7c6532/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
index 3c3f955..003ca12 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -81,16 +81,26 @@ package org.apache.flex.core
         public function init(main:Object):void
         {
 			var styleClassName:String;
+            var mainClassName:String;
+            
 			var c:Class;
 			if (!values)
 			{
 				values = {};
 	            mainClass = main;
-	            var mainClassName:String = getQualifiedClassName(mainClass);
+                mainClassName = getQualifiedClassName(mainClass);
 				styleClassName = "_" + mainClassName + "_Styles";
 				c = ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
                 generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
 			}
+            else if (main is IFlexInfo)
+            {
+                mainClass = main;
+                mainClassName = getQualifiedClassName(mainClass);
+                styleClassName = "_" + mainClassName + "_Styles";
+                c = ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
+                generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);                
+            }
 			c = main.constructor as Class;
             generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
             if (hasEventListener("init"))


[27/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop

Posted by pe...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop


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

Branch: refs/heads/feature/dragAndDrop
Commit: 8b1093013ec3323af9ecc79be6d926a1a8f6f6d1
Parents: 65b7eb9 bde25eb
Author: piotrz <pi...@apache.org>
Authored: Sun Aug 20 23:49:20 2017 +0200
Committer: piotrz <pi...@apache.org>
Committed: Sun Aug 20 23:49:20 2017 +0200

----------------------------------------------------------------------
 .../textLayout/container/ContainerController.as | 38 ++++++++++++++++++--
 .../flex/textLayout/edit/SelectionFormat.as     | 32 +++++++++++++++--
 2 files changed, 65 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[24/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - revert this because it isn't needed now that we require the same IValuesImpl in the module as is in the main app.

Posted by pe...@apache.org.
revert this because it isn't needed now that we require the same IValuesImpl in the module as is in the main app.


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

Branch: refs/heads/feature/dragAndDrop
Commit: d526a4a81df20449b8ab6b55ff870028cfe31563
Parents: bbbd0f2
Author: Alex Harui <ah...@apache.org>
Authored: Fri Aug 18 22:50:34 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Aug 18 22:50:34 2017 -0700

----------------------------------------------------------------------
 .../flex/org/apache/flex/core/SimpleCSSValuesImpl.as     | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d526a4a8/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
index 003ca12..d96558b 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -81,26 +81,17 @@ package org.apache.flex.core
         public function init(main:Object):void
         {
 			var styleClassName:String;
-            var mainClassName:String;
             
 			var c:Class;
 			if (!values)
 			{
 				values = {};
 	            mainClass = main;
-                mainClassName = getQualifiedClassName(mainClass);
+                var mainClassName:String = getQualifiedClassName(mainClass);
 				styleClassName = "_" + mainClassName + "_Styles";
 				c = ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
                 generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
 			}
-            else if (main is IFlexInfo)
-            {
-                mainClass = main;
-                mainClassName = getQualifiedClassName(mainClass);
-                styleClassName = "_" + mainClassName + "_Styles";
-                c = ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
-                generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);                
-            }
 			c = main.constructor as Class;
             generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
             if (hasEventListener("init"))


[10/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Fix typo in comments of MDL CardInner

Posted by pe...@apache.org.
Fix typo in comments of MDL CardInner


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

Branch: refs/heads/feature/dragAndDrop
Commit: 003ccc46bcf07029d6302021b55db26612dfb49a
Parents: 5277a0c
Author: piotrz <pi...@apache.org>
Authored: Mon Aug 14 00:02:36 2017 +0200
Committer: piotrz <pi...@apache.org>
Committed: Mon Aug 14 00:02:36 2017 +0200

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/003ccc46/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
index 281d5bf..4a0b449 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
@@ -26,7 +26,7 @@ package org.apache.flex.mdl.supportClasses
     }
 
 	/**
-	 *  The CardInner class is a base class por all Card inner containers.
+	 *  The CardInner class is a base class for all Card inner containers.
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion Flash 10.2