You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ca...@apache.org on 2017/02/21 15:25:27 UTC

[01/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - Adding StyleChangeNotifier and StyleChangeEvent to Core. Replacing SolidBackgroundWithChangeListenerBead with a simplified, SWF-only, version. [Forced Update!]

Repository: flex-asjs
Updated Branches:
  refs/heads/feature/spriteflexjs-refactor a6cb0b48c -> 3aeda903d (forced update)


Adding StyleChangeNotifier and StyleChangeEvent to Core. Replacing SolidBackgroundWithChangeListenerBead with a simplified, SWF-only, version.


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 839d5dc6b6135d671ca008cd4a55b1546c8962a6
Parents: 6096099
Author: Peter Ent <pe...@apache.org>
Authored: Thu Feb 16 10:11:25 2017 -0500
Committer: Peter Ent <pe...@apache.org>
Committed: Thu Feb 16 10:11:25 2017 -0500

----------------------------------------------------------------------
 .../projects/Core/src/main/flex/CoreClasses.as  |   2 +
 .../org/apache/flex/core/StyleChangeNotifier.as |  82 ++++++++++++
 .../org/apache/flex/events/StyleChangeEvent.as  |  79 ++++++++++++
 .../Core/src/main/resources/basic-manifest.xml  |   2 +
 .../projects/HTML/src/main/flex/HTMLClasses.as  |   2 +-
 .../flex/html/beads/SolidBackgroundBead.as      |  21 ++--
 .../SolidBackgroundWithChangeListenerBead.as    | 124 ++-----------------
 .../HTML/src/main/resources/basic-manifest.xml  |   1 -
 8 files changed, 188 insertions(+), 125 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/839d5dc6/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 7ce401b..690d84c 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -107,9 +107,11 @@ internal class CoreClasses
 		import org.apache.flex.core.IViewportScroller; IViewportScroller;
 	}
     import org.apache.flex.core.SimpleStatesImpl; SimpleStatesImpl;
+	import org.apache.flex.core.StyleChangeNotifier; StyleChangeNotifier;
 	import org.apache.flex.events.CustomEvent; CustomEvent;
     import org.apache.flex.events.Event; Event;
     import org.apache.flex.events.ProgressEvent; ProgressEvent;
+	import org.apache.flex.events.StyleChangeEvent; StyleChangeEvent;
     import org.apache.flex.events.EventDispatcher; EventDispatcher;
     import org.apache.flex.events.IEventDispatcher; IEventDispatcher;
 	import org.apache.flex.events.MouseEvent; MouseEvent;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/839d5dc6/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleChangeNotifier.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleChangeNotifier.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleChangeNotifier.as
new file mode 100644
index 0000000..41ce7e7
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleChangeNotifier.as
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.ValueChangeEvent;
+	import org.apache.flex.events.StyleChangeEvent;
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IStyleableObject;
+	
+	/**
+	 * The StyleChangeNotifier can be added to the bead list of any UI component
+	 * that needs to react to dynamic changes to its styles.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+	 */
+	public class StyleChangeNotifier implements IBead
+	{
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function set strand(value:IStrand):void
+		{	
+			_strand = value;
+			
+			var style:Object = IStyleableObject(value).style as IEventDispatcher;
+			if (style) {
+				IEventDispatcher(style).addEventListener(ValueChangeEvent.VALUE_CHANGE, handleStyleChange);
+			}
+		}
+		
+		/**
+		 *  @private
+		 *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 *  @flexjsignorecoercion UIHTMLElementWrapper
+		 */
+		private function handleStyleChange(event:ValueChangeEvent):void
+		{
+			COMPILE::SWF {
+				var styleEvent:StyleChangeEvent = StyleChangeEvent.createChangeEvent(_strand, event.propertyName, event.oldValue, event.newValue);
+				IEventDispatcher(_strand).dispatchEvent(styleEvent);
+			}
+			COMPILE::JS {
+				var host:UIHTMLElementWrapper = UIHTMLElementWrapper(_strand);
+				if (host) {
+					var element:WrappedHTMLElement = host.element as WrappedHTMLElement;
+					if (element) {
+						element.style[event.propertyName] = event.newValue;
+					}
+				}
+			}
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/839d5dc6/frameworks/projects/Core/src/main/flex/org/apache/flex/events/StyleChangeEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/StyleChangeEvent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/StyleChangeEvent.as
new file mode 100644
index 0000000..00ec257
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/StyleChangeEvent.as
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events
+{
+    
+    /**
+     *  Instances of the StyleChangeEvent class are dispatched by the StyleChangeNotifier
+	 *  when it detects changes to a component's style.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class StyleChangeEvent extends ValueChangeEvent
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function StyleChangeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, 
+										 oldValue:Object = null, newValue:Object = null)
+		{
+    		super(type, bubbles, cancelable, oldValue, newValue);
+		}
+		
+        /**
+         *  The default event type.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public static const STYLE_CHANGE:String = "styleChange";
+        
+        /**
+         *  A convenience method to create an instance of the StyleChangeEvent.
+         * 
+         *  @param source The source of the object.
+         *  @param name The name of the style being changed.
+         *  @param oldValue The value before it was changed.
+         *  @param newValue The value after it was changed.
+         *  @return An instance of the StyleChangeEvent.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public static function createChangeEvent(source:Object, name:String, oldValue:Object, newValue:Object):StyleChangeEvent
+        {
+            var event:StyleChangeEvent = new StyleChangeEvent(STYLE_CHANGE, false, false, oldValue, newValue);
+            event.propertyName = name;
+            event.source = source;
+            return event;
+        }
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/839d5dc6/frameworks/projects/Core/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/basic-manifest.xml b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
index 5e15a52..398c03e 100644
--- a/frameworks/projects/Core/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
@@ -42,5 +42,7 @@
     <component id="TransformMoveYModel" class="org.apache.flex.core.TransformMoveYModel" />
     <component id="TransformScaleModel" class="org.apache.flex.core.TransformScaleModel" />
     
+    <component id="StyleChangeNotifier" class="org.apache.flex.core.StyleChangeNotifier"/>
+    
     <component id="State" class="org.apache.flex.states.State"/>
 </componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/839d5dc6/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
index f269f6d..68f94c6 100644
--- a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
+++ b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
@@ -80,10 +80,10 @@ internal class HTMLClasses
     	import org.apache.flex.html.beads.SingleLineBorderBead; SingleLineBorderBead;
 	}
 	import org.apache.flex.html.beads.SpinnerView; SpinnerView;
-	import org.apache.flex.html.beads.SolidBackgroundWithChangeListenerBead; SolidBackgroundWithChangeListenerBead;
 	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.SolidBackgroundBead; SolidBackgroundBead;
+		import org.apache.flex.html.beads.SolidBackgroundWithChangeListenerBead; SolidBackgroundWithChangeListenerBead;
     	import org.apache.flex.html.beads.TextButtonMeasurementBead; TextButtonMeasurementBead;
 		import org.apache.flex.html.beads.TextFieldLabelMeasurementBead; TextFieldLabelMeasurementBead;
     	import org.apache.flex.html.beads.TextAreaView; TextAreaView;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/839d5dc6/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundBead.as
index 6dade4d..6ea9701 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundBead.as
@@ -78,6 +78,13 @@ package org.apache.flex.html.beads
 			IEventDispatcher(host).addEventListener("sizeChanged", changeHandler);
 			IEventDispatcher(host).addEventListener("initComplete", changeHandler);
 			
+			setupStyle();
+            
+            changeHandler(null);
+		}
+		
+		protected function setupStyle():void
+		{
 			var bgColor:Object = ValuesManager.valuesImpl.getValue(host, "background-color");
 			if ((bgColor is String) && (bgColor == "transparent")) {
 				bgColor = null;
@@ -91,13 +98,11 @@ package org.apache.flex.html.beads
 			if( bgAlpha != null ) {
 				opacity = Number(bgAlpha);
 			}
-            
-            var corner:Object = ValuesManager.valuesImpl.getValue(host, "border-radius");
-            if( corner != null ) {
-                borderRadius = Number(corner);
-            }
-            
-            changeHandler(null);
+			
+			var corner:Object = ValuesManager.valuesImpl.getValue(host, "border-radius");
+			if( corner != null ) {
+				borderRadius = Number(corner);
+			}
 		}
 		
 		private var _backgroundColor:uint;
@@ -175,7 +180,7 @@ package org.apache.flex.html.beads
                 changeHandler(null);
         }
         
-		private function changeHandler(event:Event):void
+		protected function changeHandler(event:Event):void
 		{
             var g:Graphics = (host.$displayObject as Object).graphics as Graphics;
             var w:Number = host.width;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/839d5dc6/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundWithChangeListenerBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundWithChangeListenerBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundWithChangeListenerBead.as
index c0be00c..80462c9 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundWithChangeListenerBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SolidBackgroundWithChangeListenerBead.as
@@ -20,35 +20,20 @@ package org.apache.flex.html.beads
 {
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.events.Event;
-	import org.apache.flex.events.ValueChangeEvent;
-	import org.apache.flex.utils.CSSUtils;
-	
-	COMPILE::SWF {
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.BindableCSSStyles;
-	import org.apache.flex.html.beads.SolidBackgroundBead;
-	}
-		
-	COMPILE::JS {
-	import org.apache.flex.core.WrappedHTMLElement;
-	import org.apache.flex.core.IBead;
+	import org.apache.flex.events.StyleChangeEvent;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.UIBase;
-	}
+	import org.apache.flex.html.beads.SolidBackgroundBead;
 	
 	/**
-	 * Same as SolidBackgroundBead except it adds an event listener on a bindable style
-	 * (eg, BindableCSSStyles) to detect changes in some of its properties and then
-	 * apply those changes to itself.
-	 * 
-	 * Usage: <js:SolidBackgroundWithChangeListenerBead style="{bindableCSSStylesbead}" />
+	 * Same as SolidBackgroundBead except it listens for StyleChangeEvent events
+	 * and reacts by refreshing the background of its strand.
      *  
      *  @langversion 3.0
      *  @playerversion Flash 10.2
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
 	 */
-	COMPILE::SWF
 	public class SolidBackgroundWithChangeListenerBead extends SolidBackgroundBead
 	{
 		/**
@@ -70,108 +55,17 @@ package org.apache.flex.html.beads
 		override public function set strand(value:IStrand):void
 		{
 			super.strand = value;
-		}
-		
-		private var _style:IEventDispatcher;
-		
-		/**
-		 * The bindable style to use as the source of the changes.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-		 */
-		public function get style():IEventDispatcher
-		{
-			return _style;
-		}
-		public function set style(value:IEventDispatcher):void
-		{
-			_style = value;
-			if (_style) {
-				_style.addEventListener(ValueChangeEvent.VALUE_CHANGE, handleStyleChange);
-			}
-		}
-		
-		/**
-		 * @private
-		 */
-		private function handleStyleChange(event:ValueChangeEvent):void
-		{
-			if (event.propertyName == "backgroundColor") {
-				var valueAsNumber:uint;
-				if (event.newValue is String) {
-					valueAsNumber = CSSUtils.toColor(event.newValue);
-				} else {
-					valueAsNumber = event.newValue as uint;
-				}
-				this[event.propertyName] = valueAsNumber;
-			}
-		}
-	}
-	
-	COMPILE::JS
-	public class SolidBackgroundWithChangeListenerBead implements IBead
-	{
-		private var _strand:IStrand;
-		
-		/**
-		 *  @copy org.apache.flex.core.IBead#strand
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function set strand(value:IStrand):void
-		{	
-			_strand = value;
-		}
-		
-		private var _style:IEventDispatcher;
-		
-		/**
-		 * The bindable style to use as the source of the changes.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function get style():IEventDispatcher
-		{
-			return _style;
-		}
-		public function set style(value:IEventDispatcher):void
-		{
-			_style = value;
-			if (_style) {
-				_style.addEventListener(ValueChangeEvent.VALUE_CHANGE, handleStyleChange);
-			}
+			IEventDispatcher(value).addEventListener(StyleChangeEvent.STYLE_CHANGE, handleStyleChange);
+
 		}
 		
 		/**
 		 * @private
-		 *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-		 *  @flexjsignorecoercion UIBase
 		 */
-		private function handleStyleChange(event:ValueChangeEvent):void
+		private function handleStyleChange(event:StyleChangeEvent):void
 		{
-			var host:UIBase = UIBase(_strand);
-			var element:WrappedHTMLElement = host.element as WrappedHTMLElement;
-			
-			// For HTML/CSS, the color change value should be expressed as a hex string. It
-			// can be other things, but using element.style.backgroundColor requires a hex string.
-			if (event.propertyName === "backgroundColor") {
-				var valueAsString:String;
-				if (event.newValue is Number) {
-					valueAsString = CSSUtils.attributeFromColor(event.newValue as uint);
-				} else {
-					valueAsString = event.newValue as String;
-				}
-				element.style.backgroundColor = valueAsString;
-			}
+			setupStyle();
+			changeHandler(null);
 		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/839d5dc6/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index 52499e9..e3a27f3 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -143,7 +143,6 @@
     <component id="SubAppLoader" class="org.apache.flex.html.SubAppLoader" />
 
     <component id="Border" class="org.apache.flex.html.supportClasses.Border"/>
-    <component id="SolidBackgroundWithChangeListenerBead" class="org.apache.flex.html.beads.SolidBackgroundWithChangeListenerBead"/>
     
     <component id="WebBrowser" class="org.apache.flex.html.WebBrowser" />
 


[04/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - - Added configuration to make it possible to run each example via tomcat by the Maven command "mvn tomcat7:run"

Posted by ca...@apache.org.
- Added configuration to make it possible to run each example via tomcat by the Maven command "mvn tomcat7:run"


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: be982336e7c9bda7a959b23e7790673b60fa4b31
Parents: a8afc4e
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sat Feb 18 18:49:46 2017 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sat Feb 18 18:50:01 2017 +0100

----------------------------------------------------------------------
 examples/pom.xml | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be982336/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 948afed..aa6db36 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -136,6 +136,18 @@
         </plugin>
       </plugins>
     </pluginManagement>
+    <plugins>
+      <!-- Makes it possible to run the example directly by running 'mvn tomcat7:run' -->
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <version>2.2</version>
+        <configuration>
+          <ignorePackaging>true</ignorePackaging>
+          <warSourceDirectory>${build.directory}/${artifactId}-${version}</warSourceDirectory>
+        </configuration>
+      </plugin>
+    </plugins>
   </build>
 
   <!--


[05/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - - Changed the default port to 8081 to make it possible to communicate with a server running on 8080

Posted by ca...@apache.org.
- Changed the default port to 8081 to make it possible to communicate with a server running on 8080


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 9bce67eb50a7d63a18a428431c67b417a43bbb10
Parents: be98233
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sat Feb 18 18:57:46 2017 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sat Feb 18 18:57:46 2017 +0100

----------------------------------------------------------------------
 examples/pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9bce67eb/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index aa6db36..1e1257b 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -144,6 +144,7 @@
         <version>2.2</version>
         <configuration>
           <ignorePackaging>true</ignorePackaging>
+          <port>8081</port>
           <warSourceDirectory>${build.directory}/${artifactId}-${version}</warSourceDirectory>
         </configuration>
       </plugin>


[03/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - - ProductModel do not need extend EventDispatcher in order to working for ListExample

Posted by ca...@apache.org.
- ProductModel do not need extend EventDispatcher in order to working for ListExample


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: a8afc4eb324167d7ba8c5e4bea603c238bd41124
Parents: 3f8b06f
Author: piotrz <pi...@apache.org>
Authored: Sat Feb 18 15:10:58 2017 +0100
Committer: piotrz <pi...@apache.org>
Committed: Sat Feb 18 15:10:58 2017 +0100

----------------------------------------------------------------------
 .../flexjs/ListExample/src/main/flex/models/ProductsModel.as | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a8afc4eb/examples/flexjs/ListExample/src/main/flex/models/ProductsModel.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/ListExample/src/main/flex/models/ProductsModel.as b/examples/flexjs/ListExample/src/main/flex/models/ProductsModel.as
index 17ad68c..d1430b2 100644
--- a/examples/flexjs/ListExample/src/main/flex/models/ProductsModel.as
+++ b/examples/flexjs/ListExample/src/main/flex/models/ProductsModel.as
@@ -18,14 +18,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 package models
 {
-	import org.apache.flex.events.EventDispatcher;
-
-	public class ProductsModel extends EventDispatcher
+	public class ProductsModel
 	{
-		public function ProductsModel()
-		{
-		}
-
 		/**
 		 * Used for the GenericList example.
 		 */


[12/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - FLEX-35269 - Add UpgradeElement as default to Button and TextField which allows create them dynamically

Posted by ca...@apache.org.
FLEX-35269 - Add UpgradeElement as default to Button and TextField which allows create them dynamically


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 74ea47cbc541719fba88f4314c83054f713ca38d
Parents: 97c702b
Author: piotrz <pi...@apache.org>
Authored: Mon Feb 20 23:04:51 2017 +0100
Committer: piotrz <pi...@apache.org>
Committed: Mon Feb 20 23:04:51 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/Button.as                  | 2 ++
 .../src/main/flex/org/apache/flex/mdl/TextField.as               | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/74ea47cb/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
index 199b080..4a409b6 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
@@ -19,6 +19,7 @@
 package org.apache.flex.mdl
 {
     import org.apache.flex.html.TextButton;
+    import org.apache.flex.mdl.beads.UpgradeElement;
     import org.apache.flex.mdl.materialIcons.IMaterialIcon;
     import org.apache.flex.mdl.supportClasses.MaterialIconBase;    
     
@@ -51,6 +52,7 @@ package org.apache.flex.mdl
 			super();
 
             className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
+            addBead(new UpgradeElement());
 		}
         
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/74ea47cb/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as
index da2570f..689532f 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as
@@ -17,7 +17,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-	import org.apache.flex.events.Event;
+    import org.apache.flex.mdl.beads.UpgradeElement;
 
     import org.apache.flex.mdl.supportClasses.TextFieldBase;
 
@@ -77,6 +77,8 @@ package org.apache.flex.mdl
             var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
             div.className = typeNames;
 
+            addBead(new UpgradeElement(div));
+
             input = document.createElement('input') as HTMLInputElement;
             input.setAttribute('type', 'text');
             input.className = "mdl-textfield__input";


[06/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - FLEX-35268 - Fix Part 1: Adding element is working, but there is an issue when after recreation of alle item renderers tabs stopped working - it is probably related to FLEX-3526

Posted by ca...@apache.org.
FLEX-35268 - Fix Part 1: Adding element is working, but there is an issue when after recreation of alle item renderers tabs stopped working - it is probably related to FLEX-35269

- Add to MDL bead TabsItemRendererFactoryForArrayListData - responsible for creating item renderers for TabBar based on ArrayList
- Create separate TabBar models for Array and ArrayList


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: a352d4314f0b01fe59353f6fb733cc019cf15295
Parents: 9bce67e
Author: piotrz <pi...@apache.org>
Authored: Sat Feb 18 21:45:03 2017 +0100
Committer: piotrz <pi...@apache.org>
Committed: Sat Feb 18 21:45:03 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/MDLClasses.as                 |   4 +-
 .../TabsItemRendererFactoryForArrayListData.as  | 181 +++++++++++++++++++
 .../flex/mdl/beads/models/TabArrayListModel.as  |  59 ++++++
 .../flex/mdl/beads/models/TabArrayModel.as      |  59 ++++++
 .../apache/flex/mdl/beads/models/TabModel.as    |  59 ------
 5 files changed, 302 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a352d431/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
index 090f9d5..910e223 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
@@ -28,7 +28,9 @@ package
 	internal class MDLClasses
 	{
 		import org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayData; TabsItemRendererFactoryForArrayData;
-		import org.apache.flex.mdl.beads.models.TabModel; TabModel;
+		import org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayListData; TabsItemRendererFactoryForArrayListData;
+		import org.apache.flex.mdl.beads.models.TabArrayModel; TabArrayModel;
+		import org.apache.flex.mdl.beads.models.TabArrayListModel; TabArrayListModel;
 		import org.apache.flex.mdl.beads.models.ToastModel; ToastModel;
 		import org.apache.flex.mdl.beads.models.SnackbarModel; SnackbarModel;
 		import org.apache.flex.mdl.materialIcons.MaterialIconType; MaterialIconType;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a352d431/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
new file mode 100644
index 0000000..fb4131c
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
@@ -0,0 +1,181 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.beads
+{
+    import org.apache.flex.collections.IArrayList;
+    import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IDataProviderItemRendererMapper;
+    import org.apache.flex.core.IItemRendererClassFactory;
+    import org.apache.flex.core.IItemRendererParent;
+    import org.apache.flex.core.IListPresentationModel;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.SimpleCSSStyles;
+    import org.apache.flex.core.UIBase;
+    import org.apache.flex.core.ValuesManager;
+    import org.apache.flex.events.EventDispatcher;
+    import org.apache.flex.events.IEventDispatcher;
+    import org.apache.flex.events.ItemRendererEvent;
+    import org.apache.flex.html.beads.IListView;
+    import org.apache.flex.mdl.beads.models.ITabModel;
+    import org.apache.flex.mdl.supportClasses.ITabItemRenderer;
+    import org.apache.flex.events.Event;
+
+    [Event(name="itemRendererCreated",type="org.apache.flex.events.ItemRendererEvent")]
+
+    /**
+     *  The TabsItemRendererFactoryForArrayListData class reads an
+     *  array of data and creates an item renderer for every
+     *  ITabItemRenderer in the array.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.8
+     */
+    public class TabsItemRendererFactoryForArrayListData extends EventDispatcher implements IBead, IDataProviderItemRendererMapper
+    {
+        public function TabsItemRendererFactoryForArrayListData(target:Object = null)
+        {
+            super(target);
+        }
+
+        protected var dataProviderModel:ITabModel;
+
+        protected var labelField:String;
+        protected var tabsIdField:String;
+
+        private var _strand:IStrand;
+
+        /**
+         *  @copy org.apache.flex.core.IBead#strand
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            IEventDispatcher(value).addEventListener("beadsAdded",finishSetup);
+            IEventDispatcher(value).addEventListener("initComplete",finishSetup);
+        }
+
+        /**
+         *  finish setup
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
+        private function finishSetup(event:Event):void
+        {
+            IEventDispatcher(_strand).removeEventListener("beadsAdded",finishSetup);
+            IEventDispatcher(_strand).removeEventListener("initComplete",finishSetup);
+
+            dataProviderModel = _strand.getBeadByType(ITabModel) as ITabModel;
+            var listView:IListView = _strand.getBeadByType(IListView) as IListView;
+            dataGroup = listView.dataGroup;
+            dataProviderModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
+
+            tabsIdField = dataProviderModel.tabIdField;
+            labelField = dataProviderModel.labelField;
+
+            if (!itemRendererFactory)
+            {
+                _itemRendererFactory = new (ValuesManager.valuesImpl.getValue(_strand, "iItemRendererClassFactory")) as IItemRendererClassFactory;
+                _strand.addBead(_itemRendererFactory);
+            }
+
+            dataProviderChangeHandler(null);
+        }
+
+        private var _itemRendererFactory:IItemRendererClassFactory;
+
+        /**
+         *  The org.apache.flex.core.IItemRendererClassFactory used
+         *  to generate instances of item renderers.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
+        public function get itemRendererFactory():IItemRendererClassFactory
+        {
+            return _itemRendererFactory;
+        }
+
+        /**
+         *  @private
+         */
+        public function set itemRendererFactory(value:IItemRendererClassFactory):void
+        {
+            _itemRendererFactory = value;
+        }
+
+        /**
+         *  The org.apache.flex.core.IItemRendererParent that will
+         *  parent the item renderers.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
+        protected var dataGroup:IItemRendererParent;
+
+        protected function dataProviderChangeHandler(event:Event):void
+        {
+            var dp:IArrayList = dataProviderModel.dataProvider as IArrayList;
+            if (!dp)
+                return;
+
+            dataGroup.removeAllElements();
+
+            var presentationModel:IListPresentationModel = _strand.getBeadByType(IListPresentationModel) as IListPresentationModel;
+
+            var n:int = dp.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var ir:ITabItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ITabItemRenderer;
+                dataGroup.addElement(ir);
+                ir.index = i;
+                ir.labelField = labelField;
+                ir.tabIdField = tabsIdField;
+
+                if (presentationModel) {
+                    var style:SimpleCSSStyles = new SimpleCSSStyles();
+                    style.marginBottom = presentationModel.separatorThickness;
+                    UIBase(ir).style = style;
+                    UIBase(ir).height = presentationModel.rowHeight;
+                    UIBase(ir).percentWidth = 100;
+                }
+                ir.data = dp.getItemAt(i);
+
+                var newEvent:ItemRendererEvent = new ItemRendererEvent(ItemRendererEvent.CREATED);
+                newEvent.itemRenderer = ir;
+                dispatchEvent(newEvent);
+            }
+
+            IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a352d431/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabArrayListModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabArrayListModel.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabArrayListModel.as
new file mode 100644
index 0000000..4ceb4d1
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabArrayListModel.as
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.beads.models
+{
+    import org.apache.flex.html.beads.models.ArrayListSelectionModel;
+    import org.apache.flex.events.Event;
+    /**
+     *  The TabArrayListModel class defines the data associated with an org.apache.flex.mdl.Tabs
+     *  component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.8
+     */
+    public class TabArrayListModel extends ArrayListSelectionModel implements ITabModel
+    {
+        public function TabArrayListModel()
+        {
+            super();
+        }
+
+        private var _tabIdField:String;
+
+        /**
+         *  @copy org.apache.flex.mdl.beads.models.ITabModel#tabIdField
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
+        public function get tabIdField():String
+        {
+            return _tabIdField;
+        }
+
+        public function set tabIdField(value:String):void
+        {
+            _tabIdField = value;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a352d431/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabArrayModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabArrayModel.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabArrayModel.as
new file mode 100644
index 0000000..30738a9
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabArrayModel.as
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.beads.models
+{
+    import org.apache.flex.html.beads.models.ArraySelectionModel;
+
+    /**
+     *  The TabArrayModel class defines the data associated with an org.apache.flex.mdl.Tabs
+     *  component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.8
+     */
+    public class TabArrayModel extends ArraySelectionModel implements ITabModel
+    {
+        public function TabArrayModel()
+        {
+            super();
+        }
+
+        private var _tabIdField:String;
+
+        /**
+         *  @copy org.apache.flex.mdl.beads.models.ITabModel#tabIdField
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         */
+        public function get tabIdField():String
+        {
+            return _tabIdField;
+        }
+
+        public function set tabIdField(value:String):void
+        {
+            _tabIdField = value;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a352d431/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabModel.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabModel.as
deleted file mode 100644
index 097291a..0000000
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/models/TabModel.as
+++ /dev/null
@@ -1,59 +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.mdl.beads.models
-{
-    import org.apache.flex.html.beads.models.ArraySelectionModel;
-
-    /**
-     *  The TabModel class defines the data associated with an org.apache.flex.mdl.Tabs
-     *  component.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.8
-     */
-    public class TabModel extends ArraySelectionModel implements ITabModel
-    {
-        public function TabModel()
-        {
-            super();
-        }
-
-        private var _tabIdField:String;
-
-        /**
-         *  @copy org.apache.flex.mdl.beads.models.ITabModel#tabIdField
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.8
-         */
-        public function get tabIdField():String
-        {
-            return _tabIdField;
-        }
-
-        public function set tabIdField(value:String):void
-        {
-            _tabIdField = value;
-        }
-    }
-}


[08/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - MDL now depends on Collections

Posted by ca...@apache.org.
MDL now depends on Collections


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 3dacee673d13e852864bba4d5988c63b7b55507e
Parents: 3a8bf63
Author: yishayw <yi...@hotmail.com>
Authored: Sun Feb 19 11:41:45 2017 +0200
Committer: yishayw <yi...@hotmail.com>
Committed: Sun Feb 19 11:41:45 2017 +0200

----------------------------------------------------------------------
 .../MaterialDesignLite/src/main/config/compile-as-config.xml        | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3dacee67/frameworks/projects/MaterialDesignLite/src/main/config/compile-as-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/config/compile-as-config.xml b/frameworks/projects/MaterialDesignLite/src/main/config/compile-as-config.xml
index 9f81189..96d4699 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/config/compile-as-config.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/config/compile-as-config.xml
@@ -26,6 +26,7 @@
             <path-element>../../../../../libs/Binding.swc</path-element>
             <path-element>../../../../../libs/Core.swc</path-element>
             <path-element>../../../../../libs/Graphics.swc</path-element>
+            <path-element>../../../../../libs/Collections.swc</path-element>
             <path-element>../../../../../libs/HTML.swc</path-element>
         </external-library-path>
         


[14/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop

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

* 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs:
  FLEX-35269 - Add UpgradeElement as default to Button and TextField which allows create them dynamically
  FLEX-35269 - Make UpgradeElement available for using
  FLEX-35269 - Add UpgradeElement bead responsible for registering dynamically created class using "upgradeElement" method from MDL


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 36151f71c0e2074e9cbbf94d1d8eb986feaed5ef
Parents: f14d6a0 74ea47c
Author: Harbs <ha...@in-tools.com>
Authored: Tue Feb 21 10:40:38 2017 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Feb 21 10:40:38 2017 +0200

----------------------------------------------------------------------
 .../src/main/flex/MDLClasses.as                 |   1 +
 .../src/main/flex/org/apache/flex/mdl/Button.as |   2 +
 .../main/flex/org/apache/flex/mdl/TextField.as  |   4 +-
 .../org/apache/flex/mdl/beads/UpgradeElement.as | 122 +++++++++++++++++++
 4 files changed, 128 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[15/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - A new project to hold spriteflexjs refactor that does not see extern classes like HTMLCanvasElement

Posted by ca...@apache.org.
A new project to hold spriteflexjs refactor that does not see extern classes like HTMLCanvasElement


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 3aeda903d93961b9c35ba40c3b2067f7900de52d
Parents: 36151f7
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Feb 15 20:35:21 2017 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Tue Feb 21 16:24:51 2017 +0100

----------------------------------------------------------------------
 .../projects/spriteflexjs/.vscode/tasks.json    |  10 ++
 frameworks/projects/spriteflexjs/asconfig.json  |  21 ++++
 frameworks/projects/spriteflexjs/build.xml      | 116 +++++++++++++++++++
 frameworks/projects/spriteflexjs/pom.xml        |  67 +++++++++++
 .../src/main/config/compile-as-config.xml       |  82 +++++++++++++
 .../spriteflexjs/src/main/flex/SomeClass.as     |  37 ++++++
 .../spriteflexjs/src/main/flex/SpriteClasses.as |  34 ++++++
 .../src/main/resources/sprite-as-manifest.xml   |  25 ++++
 .../src/main/resources/sprite-manifest.xml      |  26 +++++
 9 files changed, 418 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aeda903/frameworks/projects/spriteflexjs/.vscode/tasks.json
----------------------------------------------------------------------
diff --git a/frameworks/projects/spriteflexjs/.vscode/tasks.json b/frameworks/projects/spriteflexjs/.vscode/tasks.json
new file mode 100644
index 0000000..c207148
--- /dev/null
+++ b/frameworks/projects/spriteflexjs/.vscode/tasks.json
@@ -0,0 +1,10 @@
+{
+	// See https://go.microsoft.com/fwlink/?LinkId=733558
+	// for the documentation about the tasks.json format
+	//"--flexHome=/Users/carlosrovira/Dev/Flex/sdks/flexjs-0.8.0"
+	"version": "0.1.0",
+	"command": "mvn",
+	"args": ["clean", "install", "-DskipTests"],
+	"isShellCommand": true,
+	"showOutput": "always"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aeda903/frameworks/projects/spriteflexjs/asconfig.json
----------------------------------------------------------------------
diff --git a/frameworks/projects/spriteflexjs/asconfig.json b/frameworks/projects/spriteflexjs/asconfig.json
new file mode 100644
index 0000000..706a181
--- /dev/null
+++ b/frameworks/projects/spriteflexjs/asconfig.json
@@ -0,0 +1,21 @@
+{
+    "config": "flex",
+    "compilerOptions": {
+        "debug": true,
+        "js-output-type": "flexjs",
+        "define": [
+            {
+                "name": "COMPILE::SWF",
+                "value": true
+            },
+            {
+                "name": "COMPILE::JS",
+                "value": false
+            }
+        ]
+    },
+    "files":
+    [
+        "src/main/flex/MDLClasses.as"
+    ]
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aeda903/frameworks/projects/spriteflexjs/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/spriteflexjs/build.xml b/frameworks/projects/spriteflexjs/build.xml
new file mode 100644
index 0000000..faae86c
--- /dev/null
+++ b/frameworks/projects/spriteflexjs/build.xml
@@ -0,0 +1,116 @@
+<?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="Sprite" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../.."/>
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,compile,compile-js,copy-swc,test" description="Full build of ${ant.project.name}.swc">
+    </target>
+    
+    <target name="compile-js">
+        <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
+    </target>
+    
+    <target name="copy-swc">
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
+    </target>
+    
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${FLEXJS_HOME}/frameworks/libs">
+                <include name="${target.name}"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
+    
+    <target name="compile" description="Compiles .as files into .swc">
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+        
+        <compc fork="true"
+            output="${basedir}/target/${target.name}">
+            <jvmarg line="${compc.jvm.args}"/>
+            <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-define=COMPILE::SWF,true" />
+            <arg value="-define=COMPILE::JS,false" />
+        </compc>
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aeda903/frameworks/projects/spriteflexjs/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/spriteflexjs/pom.xml b/frameworks/projects/spriteflexjs/pom.xml
new file mode 100644
index 0000000..e5682e1
--- /dev/null
+++ b/frameworks/projects/spriteflexjs/pom.xml
@@ -0,0 +1,67 @@
+<?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/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.flex.flexjs.framework</groupId>
+    <artifactId>projects</artifactId>
+    <version>0.8.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>spriteflexjs</artifactId>
+  <version>0.8.0-SNAPSHOT</version>
+  <packaging>swc</packaging>
+
+  <name>Apache Flex - FlexJS: Framework: Libs: spriteflexjs</name>
+
+  <build>
+    <sourceDirectory>src/main/flex</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.flex.flexjs.compiler</groupId>
+        <artifactId>flexjs-maven-plugin</artifactId>
+        <version>${flexjs.compiler.version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <namespaces>
+            <namespace>
+              <uri>library://ns.apache.org/flexjs/sprite</uri>
+              <manifest>${project.basedir}/src/main/resources/sprite-manifest.xml</manifest>
+            </namespace>
+            <namespace>
+              <type>as</type>
+              <uri>library://ns.apache.org/flexjs/sprite</uri>
+              <manifest>${project.basedir}/src/main/resources/sprite-as-manifest.xml</manifest>
+            </namespace>
+          </namespaces>
+          <includeClasses>
+            <includeClass>SpriteClasses</includeClass>
+          </includeClasses>
+          <includeLookupOnly>true</includeLookupOnly>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+  </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aeda903/frameworks/projects/spriteflexjs/src/main/config/compile-as-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/spriteflexjs/src/main/config/compile-as-config.xml b/frameworks/projects/spriteflexjs/src/main/config/compile-as-config.xml
new file mode 100644
index 0000000..e34c3a1
--- /dev/null
+++ b/frameworks/projects/spriteflexjs/src/main/config/compile-as-config.xml
@@ -0,0 +1,82 @@
+<!--
+
+  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>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>../../../../../libs/Binding.swc</path-element>
+            <path-element>../../../../../libs/Core.swc</path-element>
+            <path-element>../../../../../libs/Graphics.swc</path-element>
+            <path-element>../../../../../libs/HTML.swc</path-element>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/sprite</uri>
+                <manifest>../resources/sprite-manifest.xml</manifest>
+            </namespace>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/sprite</uri>
+                <manifest>../resources/sprite-as-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>../flex</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-lookup-only>true</include-lookup-only>
+    
+    <include-classes>
+        <class>SpriteClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/sprite</uri>
+    </include-namespaces>
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aeda903/frameworks/projects/spriteflexjs/src/main/flex/SomeClass.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spriteflexjs/src/main/flex/SomeClass.as b/frameworks/projects/spriteflexjs/src/main/flex/SomeClass.as
new file mode 100644
index 0000000..137beef
--- /dev/null
+++ b/frameworks/projects/spriteflexjs/src/main/flex/SomeClass.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 
+{
+	public class SomeClass 
+	{
+		public var canvas:HTMLCanvasElement;
+		public var c2d:CanvasRenderingContext2D;
+
+		public function start2():void
+		{
+			var button:Element = document.createElement("button");
+			button.onclick = function ():void {
+				alert("Hello browser from FalconJX!");
+			};
+			button.textContent = "Say Hello";
+			document.body.appendChild(button);
+		}
+
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aeda903/frameworks/projects/spriteflexjs/src/main/flex/SpriteClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spriteflexjs/src/main/flex/SpriteClasses.as b/frameworks/projects/spriteflexjs/src/main/flex/SpriteClasses.as
new file mode 100644
index 0000000..edce96c
--- /dev/null
+++ b/frameworks/projects/spriteflexjs/src/main/flex/SpriteClasses.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
+{
+
+	/**
+	*  @private
+	*  This class is used to link additional classes into sprite.swc
+	*  beyond those that are found by dependecy analysis starting
+	*  from the classes specified in manifest.xml.
+	*/
+	internal class SpriteClasses
+	{
+		import SomeClass; SomeClass;
+	}
+
+}
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aeda903/frameworks/projects/spriteflexjs/src/main/resources/sprite-as-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/spriteflexjs/src/main/resources/sprite-as-manifest.xml b/frameworks/projects/spriteflexjs/src/main/resources/sprite-as-manifest.xml
new file mode 100644
index 0000000..e38496a
--- /dev/null
+++ b/frameworks/projects/spriteflexjs/src/main/resources/sprite-as-manifest.xml
@@ -0,0 +1,25 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+    
+</componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aeda903/frameworks/projects/spriteflexjs/src/main/resources/sprite-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/spriteflexjs/src/main/resources/sprite-manifest.xml b/frameworks/projects/spriteflexjs/src/main/resources/sprite-manifest.xml
new file mode 100644
index 0000000..9d8bc45
--- /dev/null
+++ b/frameworks/projects/spriteflexjs/src/main/resources/sprite-manifest.xml
@@ -0,0 +1,26 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+    <component id="SomeClass" class="SomeClass"/>
+    
+</componentPackage>


[10/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - FLEX-35269 - Add UpgradeElement bead responsible for registering dynamically created class using "upgradeElement" method from MDL

Posted by ca...@apache.org.
FLEX-35269 - Add UpgradeElement bead responsible for registering dynamically created class using "upgradeElement" method from MDL


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: d68a482779fb53887e7bf2d99721c6eacbfacd3b
Parents: 6f30fb2
Author: piotrz <pi...@apache.org>
Authored: Mon Feb 20 23:01:03 2017 +0100
Committer: piotrz <pi...@apache.org>
Committed: Mon Feb 20 23:01:03 2017 +0100

----------------------------------------------------------------------
 .../org/apache/flex/mdl/beads/UpgradeElement.as | 122 +++++++++++++++++++
 1 file changed, 122 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d68a4827/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/UpgradeElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/UpgradeElement.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/UpgradeElement.as
new file mode 100644
index 0000000..ac7081b
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/UpgradeElement.as
@@ -0,0 +1,122 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.beads
+{
+    import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.UIBase;
+    import org.apache.flex.events.IEventDispatcher;
+    import org.apache.flex.events.Event;
+
+    /**
+     * UpgradeElement bead will automatically register in the case where you are creating DOM
+     * elements dynamically.
+     * Bead register new elements using the upgradeElement function from MDL library
+     *
+     * @langversion 3.0
+     * @playerversion Flash 10.2
+     * @playerversion AIR 2.6
+     * @productversion FlexJS 0.8
+     */
+    public class UpgradeElement implements IBead
+    {
+        /**
+         * @param element
+         * @param className
+         */
+        public function UpgradeElement(element:Object = null, className:String = null)
+        {
+            _element = element;
+            _className = className;
+        }
+
+        private var _strand:IStrand;
+        private var _element:Object;
+        private var _className:String;
+
+        /**
+         * The element we wish to upgrade
+         *
+         * @param value element for upgrade
+         *
+         * @langversion 3.0
+         * @playerversion Flash 10.2
+         * @playerversion AIR 2.6
+         * @productversion FlexJS 0.8
+         */
+        public function set element(value:Object):void
+        {
+            _element = value;
+        }
+
+        /**
+         * Optional name of the class we want to upgrade
+         * the element to.
+         * 
+         * @param value class name
+         *
+         * @langversion 3.0
+         * @playerversion Flash 10.2
+         * @playerversion AIR 2.6
+         * @productversion FlexJS 0.8
+         */
+        public function set className(value:String):void
+        {
+            _className = value;
+        }
+
+        /**
+         *  @copy org.apache.flex.core.IBead#strand
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.8
+         *  @flexjsignorecoercion HTMLInputElement
+         *  @flexjsignorecoercion org.apache.flex.core.UIBase;
+         */
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            IEventDispatcher(value).addEventListener("beadsAdded", beadsAddedHandler);
+        }
+
+        private function beadsAddedHandler(event:Event):void
+        {
+            IEventDispatcher(_strand).removeEventListener("beadsAdded", beadsAddedHandler);
+            COMPILE::JS
+            {
+                upgradeElement();
+            }
+        }
+
+        COMPILE::JS
+        private function upgradeElement():void
+        {
+            var componentHandler:Object = window["componentHandler"];
+            var host:UIBase = _strand as UIBase;
+
+            if (componentHandler && host && (host.element || _element))
+            {
+                var upgradeElement:Object = _element ? _element : host.element;
+                componentHandler.upgradeElement(upgradeElement, _className);
+            }
+        }
+    }
+}


[09/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - remove static folder from git

Posted by ca...@apache.org.
remove static folder from git


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 6f30fb21abc57a20b52b96a16dbc2b44f0a57d5c
Parents: 3dacee6
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Feb 20 16:30:49 2017 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Mon Feb 20 16:33:53 2017 +0100

----------------------------------------------------------------------
 examples/.gitignore | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6f30fb21/examples/.gitignore
----------------------------------------------------------------------
diff --git a/examples/.gitignore b/examples/.gitignore
index e660fd9..d15249a 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -1 +1,2 @@
 bin/
+static/


[07/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - FLEX-35268 - Fix build - Missed default.css in MDL

Posted by ca...@apache.org.
FLEX-35268 - Fix build - Missed default.css in MDL


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 3a8bf63de25a7576bb65d891727f249e836a2acb
Parents: a352d43
Author: piotrz <pi...@apache.org>
Authored: Sat Feb 18 22:24:12 2017 +0100
Committer: piotrz <pi...@apache.org>
Committed: Sat Feb 18 22:24:12 2017 +0100

----------------------------------------------------------------------
 .../projects/MaterialDesignLite/src/main/resources/defaults.css  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3a8bf63d/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 7373313..5271537 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
@@ -113,7 +113,7 @@ Menu
 Tabs
 {
     IBeadView: ClassReference("org.apache.flex.mdl.beads.views.TabsView");
-    IBeadModel: ClassReference("org.apache.flex.mdl.beads.models.TabModel");
+    IBeadModel: ClassReference("org.apache.flex.mdl.beads.models.TabArrayModel");
     IBeadLayout: ClassReference(null);
     IDataProviderItemRendererMapper: ClassReference("org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayData");
     IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
@@ -123,7 +123,7 @@ Tabs
 TabBar
 {
     IBeadView: ClassReference("org.apache.flex.mdl.beads.views.TabBarView");
-    IBeadModel: ClassReference("org.apache.flex.mdl.beads.models.TabModel");
+    IBeadModel: ClassReference("org.apache.flex.mdl.beads.models.TabArrayModel");
     IBeadLayout: ClassReference(null);
     IDataProviderItemRendererMapper: ClassReference("org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayData");
     IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");


[11/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - FLEX-35269 - Make UpgradeElement available for using

Posted by ca...@apache.org.
FLEX-35269 - Make UpgradeElement available for using


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 97c702b2610581caa2470d290370192f27e51376
Parents: d68a482
Author: piotrz <pi...@apache.org>
Authored: Mon Feb 20 23:03:34 2017 +0100
Committer: piotrz <pi...@apache.org>
Committed: Mon Feb 20 23:03:34 2017 +0100

----------------------------------------------------------------------
 frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/97c702b2/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
index 910e223..02ff26b 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
@@ -34,6 +34,7 @@ package
 		import org.apache.flex.mdl.beads.models.ToastModel; ToastModel;
 		import org.apache.flex.mdl.beads.models.SnackbarModel; SnackbarModel;
 		import org.apache.flex.mdl.materialIcons.MaterialIconType; MaterialIconType;
+		import org.apache.flex.mdl.beads.UpgradeElement; UpgradeElement;
 		
 		COMPILE::SWF
 		{


[13/15] flex-asjs git commit: Fixed ImageButton It’s now a button instead of an input as input was causing lots of issues

Posted by ca...@apache.org.
Fixed ImageButton
It\u2019s now a button instead of an input as input was causing lots of issues


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: f14d6a0996e7b768186feeff4642641e0a14beba
Parents: 6f30fb2
Author: Harbs <ha...@in-tools.com>
Authored: Tue Feb 21 10:39:22 2017 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Feb 21 10:39:22 2017 +0200

----------------------------------------------------------------------
 .../flex/org/apache/flex/html/ImageButton.as    | 45 +++++++++++---------
 .../HTML/src/main/resources/defaults.css        |  1 +
 2 files changed, 27 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f14d6a09/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ImageButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ImageButton.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ImageButton.as
index e5fc54c..5912a84 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ImageButton.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ImageButton.as
@@ -20,6 +20,7 @@ package org.apache.flex.html
 {
     import org.apache.flex.core.SimpleCSSStyles;
 	import org.apache.flex.events.Event;
+    import org.apache.flex.html.beads.models.ImageModel;
 	
     COMPILE::JS
     {
@@ -55,18 +56,17 @@ package org.apache.flex.html
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
          */
 		COMPILE::JS
-		override protected function createElement():WrappedHTMLElement
-		{
-			element = document.createElement("input") as WrappedHTMLElement;
-			positioner = element;
-			element.flexjs_wrapper = this;
-
-			var inputElement:HTMLInputElement = element as HTMLInputElement;
-			inputElement.type = "image";
-			inputElement.setAttribute("value", " ");
-
-			return element;
-		}
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('button') as WrappedHTMLElement;
+            element.setAttribute('type', 'button');
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            return element;
+        }        
 
 		[Bindable("srcChanged")]
 		/**
@@ -76,18 +76,25 @@ package org.apache.flex.html
 		 */
         public function get src():String
         {
-            return style.backgroundImage;
+            return ImageModel(model).url;
         }
 
         public function set src(url:String):void
         {
-            if (!style)
-                style = new SimpleCSSStyles();
-            style.backgroundImage = url;
+            ImageModel(model).url = url;
+            COMPILE::SWF
+            {
+                if (!style)
+                    style = new SimpleCSSStyles();
+                style.backgroundImage = url;
+            }
 
-            COMPILE::JS {
-            	var inputElement:HTMLInputElement = element as HTMLInputElement;
-				inputElement.src = url;
+            COMPILE::JS
+            {
+                var inner:String = '';
+                if (url)
+                    inner = "<img src='" + url + "'/>";
+                element.innerHTML = inner;
             }
 			
 			dispatchEvent(new Event("srcChanged"));

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f14d6a09/frameworks/projects/HTML/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/defaults.css b/frameworks/projects/HTML/src/main/resources/defaults.css
index 4eb6de6..8abe5ee 100644
--- a/frameworks/projects/HTML/src/main/resources/defaults.css
+++ b/frameworks/projects/HTML/src/main/resources/defaults.css
@@ -291,6 +291,7 @@ ImageAndTextButton
 
 ImageButton
 {
+	IBeadModel: ClassReference("org.apache.flex.html.beads.models.ImageModel");
 	border-style: none;
 }
 


[02/15] git commit: [flex-asjs] [refs/heads/feature/spriteflexjs-refactor] - Added SingleLineBorderWithChangeListenerBead so changes in border style can be executed at runtime.

Posted by ca...@apache.org.
Added SingleLineBorderWithChangeListenerBead so changes in border style can be executed at runtime.


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

Branch: refs/heads/feature/spriteflexjs-refactor
Commit: 3f8b06fc97e65af0fa8bfba8020f699987c83775
Parents: 839d5dc
Author: Peter Ent <pe...@apache.org>
Authored: Thu Feb 16 11:35:34 2017 -0500
Committer: Peter Ent <pe...@apache.org>
Committed: Thu Feb 16 11:35:34 2017 -0500

----------------------------------------------------------------------
 .../org/apache/flex/core/BindableCSSStyles.as   |  2 +
 .../projects/HTML/src/main/flex/HTMLClasses.as  |  1 +
 .../flex/html/beads/SingleLineBorderBead.as     |  2 +-
 .../SingleLineBorderWithChangeListenerBead.as   | 73 ++++++++++++++++++++
 4 files changed, 77 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f8b06fc/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
index ab808c0..1bcd87a 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
@@ -71,6 +71,7 @@ package org.apache.flex.core
             "backgroundAlpha": 1,
             "backgroundColor": 1,
             "backgroundImage": 1,
+			"border": 1,
             "borderColor": 1,
             "borderStyle": 1,
             "borderRadius": 1,
@@ -100,6 +101,7 @@ package org.apache.flex.core
         public var backgroundAlpha:*;
         public var backgroundColor:*;
         public var backgroundImage:*;
+		public var border:*;
         public var borderColor:*;
         public var borderStyle:*;
         public var borderRadius:*;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f8b06fc/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
index 68f94c6..f92ab08 100644
--- a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
+++ b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
@@ -78,6 +78,7 @@ internal class HTMLClasses
 		import org.apache.flex.html.beads.SliderTrackView; SliderTrackView;
 		import org.apache.flex.html.beads.SimpleAlertView; SimpleAlertView;
     	import org.apache.flex.html.beads.SingleLineBorderBead; SingleLineBorderBead;
+		import org.apache.flex.html.beads.SingleLineBorderWithChangeListenerBead; SingleLineBorderWithChangeListenerBead;
 	}
 	import org.apache.flex.html.beads.SpinnerView; SpinnerView;
 	COMPILE::SWF

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f8b06fc/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as
index 3663b56..af31e24 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as
@@ -72,7 +72,7 @@ package org.apache.flex.html.beads
             changeHandler(null);
 		}
 		        
-		private function changeHandler(event:Event):void
+		protected function changeHandler(event:Event):void
 		{
             var host:UIBase = UIBase(_strand);
             var g:Graphics = (host.$displayObject as Object).graphics as Graphics;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f8b06fc/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderWithChangeListenerBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderWithChangeListenerBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderWithChangeListenerBead.as
new file mode 100644
index 0000000..12dad18
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderWithChangeListenerBead.as
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.core.IStrand;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.events.StyleChangeEvent;
+
+    /**
+     *  The SingleLineBorderWithChangeListenerBead adds the ability to react to
+	 *  changes in border style at runtime.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class SingleLineBorderWithChangeListenerBead extends SingleLineBorderBead
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function SingleLineBorderWithChangeListenerBead()
+		{
+			super();
+		}
+		
+		private var _strand:IStrand;
+		
+        /**
+         *  @copy org.apache.flex.core.IBead#strand
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			IEventDispatcher(value).addEventListener(StyleChangeEvent.STYLE_CHANGE, handleStyleChange);
+		}
+		
+		/**
+		 * @private
+		 */
+		private function handleStyleChange(event:StyleChangeEvent):void
+		{
+			changeHandler(null);
+		}
+	}
+}