You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/09/25 18:03:43 UTC

[01/50] git commit: [flex-asjs] [refs/heads/develop] - declarative invalidation of layout

Repository: flex-asjs
Updated Branches:
  refs/heads/develop 24d052e97 -> 0fba10b8c


declarative invalidation of layout


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

Branch: refs/heads/develop
Commit: 31142854c5b4318cf4734d406579f60618b264e5
Parents: c0847cf
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 13:35:15 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:39 2014 -0700

----------------------------------------------------------------------
 .../html/beads/layouts/LayoutChangeNotifier.as  | 84 ++++++++++++++++++++
 1 file changed, 84 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31142854/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
new file mode 100644
index 0000000..9a33910
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.layouts
+{	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	/**
+	 *  The LayoutChangeNotifier notifies layouts when a property
+     *  it is watching changes.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class LayoutChangeNotifier implements IBead
+	{
+		/**
+		 *  constructor.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function LayoutChangeNotifier()
+		{
+		}
+		
+		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 _value:* = undefined;
+        
+		/**
+		 *  The number of tiles to fit horizontally into the layout.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function set watchedProperty(value:Object):void
+		{
+			if (_value !== value)
+            {
+                _value = value;
+                IEventDispatcher(_strand).dispatchEvent(new Event("layoutNeeded"));
+            }
+		}
+		
+	}
+}


[12/50] git commit: [flex-asjs] [refs/heads/develop] - allow override of destination in ConstantBinding as well

Posted by ah...@apache.org.
allow override of destination in ConstantBinding as well


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

Branch: refs/heads/develop
Commit: 28270395dfd6d3c914272dc94eb5637da07e76f5
Parents: 5b6365c
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 16 23:19:53 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:45 2014 -0700

----------------------------------------------------------------------
 .../FlexJSUI/src/org/apache/flex/binding/ConstantBinding.as    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/28270395/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/ConstantBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/ConstantBinding.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/ConstantBinding.as
index efbf89f..ab8cca7 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/ConstantBinding.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/ConstantBinding.as
@@ -81,7 +81,7 @@ package org.apache.flex.binding
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        protected var destination:Object;
+        public var destination:Object;
 
         /**
          *  If not null, the id of the mxml tag who's property
@@ -126,7 +126,9 @@ package org.apache.flex.binding
          */
 		public function set strand(value:IStrand):void
 		{
-			destination = value;
+            if (destination == null)
+                destination = value;
+            
 			source = document[sourceID];
 			destination[destinationPropertyName] = source[sourcePropertyName];
 		}


[37/50] git commit: [flex-asjs] [refs/heads/develop] - handle more cases

Posted by ah...@apache.org.
handle more cases


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

Branch: refs/heads/develop
Commit: e4d65e296730d4c33f64ad5e5211f40b238c9cf0
Parents: b5d9be8
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 14:34:50 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:31 2014 -0700

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e4d65e29/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
index 16e85a7..099a0a4 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -120,10 +120,10 @@ org.apache.flex.utils.Language.is = function(leftOperand, rightOperand) {
       (leftOperand instanceof /** @type {Object} */(rightOperand))) {
     return true;
   }
-  if ((rightOperand === Number && typeof leftOperand === 'number') ||
-    (leftOperand instanceof /** @type {Object} */(rightOperand))) {
+  if (typeof leftOperand === 'number')
+    return rightOperand === Number;
+  if (rightOperand === Array && Array.isArray(leftOperand))
     return true;
-  }
 
   if (leftOperand.FLEXJS_CLASS_INFO.interfaces) {
     if (checkInterfaces(leftOperand)) {


[44/50] git commit: [flex-asjs] [refs/heads/develop] - adjust timing of properties and valuesImpl init

Posted by ah...@apache.org.
adjust timing of properties and valuesImpl init


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

Branch: refs/heads/develop
Commit: ef5c7403a82e1a43133d00c2a5d871961d1998e6
Parents: b1f2396
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 25 07:57:21 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Sep 25 07:57:21 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/core/Application.as        | 12 +++++++-----
 .../FlexJS/src/org/apache/flex/core/Application.js | 17 +++++++++--------
 2 files changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ef5c7403/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
index 397fa5b..215a883 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
@@ -99,7 +99,8 @@ package org.apache.flex.core
 			{
 				stage.align = StageAlign.TOP_LEFT;
 				stage.scaleMode = StageScaleMode.NO_SCALE;
-				stage.quality = StageQuality.HIGH_16X16_LINEAR;
+                // should be opt-in
+				//stage.quality = StageQuality.HIGH_16X16_LINEAR;
 			}
 			
             loaderInfo.addEventListener(flash.events.Event.INIT, initHandler);
@@ -120,9 +121,6 @@ package org.apache.flex.core
         
         private function initHandler(event:flash.events.Event):void
         {
-            ValuesManager.valuesImpl = valuesImpl;
-            ValuesManager.valuesImpl.init(this);
-
             dispatchEvent(new Event("initialize"));
 
             if (initialView)
@@ -147,7 +145,11 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public var valuesImpl:IValuesImpl;
+        public function set valuesImpl(value:IValuesImpl):void
+        {
+            ValuesManager.valuesImpl = value;
+            ValuesManager.valuesImpl.init(this);
+        }
 
         /**
          *  The initial view.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ef5c7403/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
index 2088956..c3a8e1e 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
@@ -15,7 +15,7 @@
 goog.provide('org.apache.flex.core.Application');
 
 goog.require('org.apache.flex.core.HTMLElementWrapper');
-goog.require('org.apache.flex.core.SimpleValuesImpl');
+goog.require('org.apache.flex.core.IValuesImpl');
 goog.require('org.apache.flex.core.ValuesManager');
 goog.require('org.apache.flex.utils.MXMLDataInterpreter');
 
@@ -65,9 +65,15 @@ org.apache.flex.core.Application.prototype.model = null;
 
 /**
  * @expose
- * @type {org.apache.flex.core.SimpleValuesImpl}
+ * @param {org.apache.flex.core.IValuesImpl} value The IValuesImpl.
  */
-org.apache.flex.core.Application.prototype.valuesImpl = null;
+org.apache.flex.core.Application.prototype.set_valuesImpl =
+    function(value) {
+  org.apache.flex.core.ValuesManager.valuesImpl = value;
+  if (value.init) {
+    value.init(this);
+  }
+};
 
 
 /**
@@ -77,11 +83,6 @@ org.apache.flex.core.Application.prototype.start = function() {
   this.element = document.getElementsByTagName('body')[0];
   this.element.flexjs_wrapper = this;
 
-  org.apache.flex.core.ValuesManager.valuesImpl = this.valuesImpl;
-  if (this.valuesImpl.init) {
-    this.valuesImpl.init(this);
-  }
-
   this.dispatchEvent('initialize');
 
   this.initialView.applicationModel = this.model;


[27/50] git commit: [flex-asjs] [refs/heads/develop] - compensate for JS codegen

Posted by ah...@apache.org.
compensate for JS codegen


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

Branch: refs/heads/develop
Commit: b4ae6a1a185c1e460b8ea92fbabb13ebc385f335
Parents: 4101979
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:44:26 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:19 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b4ae6a1a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
index e810a04..4ba80ea 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
@@ -250,7 +250,10 @@ package org.apache.flex.core
             var n:int = bindingData.length;
             var index:int = 0;
             var watcherData:Object;
-            while (index < n)
+            // FalconJX adds an extra null to the data so make sure
+            // we have enough data for a complete watcher otherwise
+            // say we are done
+            while (index < n - 2)
             {
                 var watcherIndex:int = bindingData[index++];
                 var type:int = bindingData[index++];


[20/50] git commit: [flex-asjs] [refs/heads/develop] - handle null in 'is' or 'as'

Posted by ah...@apache.org.
handle null in 'is' or 'as'


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

Branch: refs/heads/develop
Commit: 3bb202d7cf4810938e4a3133c78a5ac6df5bfe01
Parents: 0729034
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:39:38 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:15 2014 -0700

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3bb202d7/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
index 619edb1..16e85a7 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -92,9 +92,8 @@ org.apache.flex.utils.Language._int = function(value) {
 org.apache.flex.utils.Language.is = function(leftOperand, rightOperand) {
   var checkInterfaces, superClass;
 
-  // (erikdebruin) we intentionally DON'T do null checks on the
-  //               [class].FLEXJS_CLASS_INFO property, as it MUST be
-  //               declared for every FLEXJS JS (framework) class
+  if (!leftOperand)
+    return false;
 
   if (leftOperand && !rightOperand) {
     return false;


[31/50] git commit: [flex-asjs] [refs/heads/develop] - change timing of adding chrome

Posted by ah...@apache.org.
change timing of adding chrome


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

Branch: refs/heads/develop
Commit: 2ed1a94d2fa11cd3712f568a0c71403b93d51744
Parents: 7023f87
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:47:43 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:21 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/html/beads/PanelView.js | 23 ++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2ed1a94d/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
index 232efcc..6a87bca 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
@@ -20,6 +20,11 @@ goog.provide('org.apache.flex.html.beads.PanelView');
  * @constructor
  */
 org.apache.flex.html.beads.PanelView = function() {
+  /**
+   * @private
+   * @type {boolean}
+  */
+  this.titleBarAdded_ = false;
 
 };
 
@@ -45,13 +50,14 @@ org.apache.flex.html.beads.PanelView.prototype.set_strand =
   this.strand_ = value;
 
   this.strand_.titleBar = new org.apache.flex.html.TitleBar();
-  this.strand_.titleBar.addedToParent();
-  this.strand_.titleBar.element.id = 'titleBar';
-  this.strand_.addElement(this.strand_.titleBar);
+  this.strand_.titleBar.set_id('titleBar');
+  this.strand_.titleBar.set_model(this.strand_.get_model());
 
   this.strand_.controlBar =
       new org.apache.flex.html.ControlBar();
-  this.strand_.addElement(this.strand_.controlBar);
+
+  this.strand_.addEventListener('childrenAdded',
+      goog.bind(this.changeHandler, this));
 
   // listen for changes to the strand's model so items can be changed
   // in the view
@@ -66,7 +72,16 @@ org.apache.flex.html.beads.PanelView.prototype.set_strand =
  */
 org.apache.flex.html.beads.PanelView.prototype.changeHandler =
     function(event) {
+  if (!this.titleBarAdded_)
+  {
+    this.titleBarAdded_ = true;
+    this.strand_.addElement(this.strand_.titleBar);
+    this.strand_.addElement(this.strand_.controlBar);
+  }
+
   if (event.type == 'titleChange') {
     this.strand_.titleBar.set_title(this.strand_.model.get_title());
   }
+
+  this.strand_.dispatchEvent('layoutNeeded');
 };


[02/50] git commit: [flex-asjs] [refs/heads/develop] - custom databinding or MXMLBeadViewBase

Posted by ah...@apache.org.
custom databinding or MXMLBeadViewBase


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

Branch: refs/heads/develop
Commit: c0847cfb5cc17de651ca9b694cb3f98c0bc8acdf
Parents: 61191fa
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 13:34:54 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:39 2014 -0700

----------------------------------------------------------------------
 .../flex/core/MXMLBeadViewBaseDataBinding.as    | 324 +++++++++++++++++++
 1 file changed, 324 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c0847cfb/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
new file mode 100644
index 0000000..e59709e
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
@@ -0,0 +1,324 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.binding.ConstantBinding;
+    import org.apache.flex.binding.GenericBinding;
+    import org.apache.flex.binding.PropertyWatcher;
+    import org.apache.flex.binding.SimpleBinding;
+    import org.apache.flex.binding.WatcherBase;
+    import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.events.Event;
+    import org.apache.flex.events.IEventDispatcher;
+    
+    /**
+     *  The ViewBaseDataBinding class implements databinding for
+     *  ViewBase instances.  Different classes can have
+     *  different databinding implementation that optimize for
+     *  the different lifecycles.  For example, an item renderer
+     *  databinding implementation can wait to execute databindings
+     *  until the data property is set.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class MXMLBeadViewBaseDataBinding implements IBead
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function MXMLBeadViewBaseDataBinding()
+		{
+			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
+         */
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            IEventDispatcher(_strand).addEventListener("initComplete", initCompleteHandler);
+        }    
+
+        private function initCompleteHandler(event:Event):void
+        {
+            var fieldWatcher:Object;
+            var sb:SimpleBinding;
+            if (!("_bindings" in _strand))
+                return;
+            var bindingData:Array = _strand["_bindings"];
+            var n:int = bindingData[0];
+            var bindings:Array = [];
+            var i:int;
+            var index:int = 1;
+            for (i = 0; i < n; i++)
+            {
+                var binding:Object = {};
+                binding.source = bindingData[index++];
+				binding.destFunc = bindingData[index++];
+                binding.destination = bindingData[index++];
+                bindings.push(binding);
+            }
+            var watchers:Object = decodeWatcher(bindingData.slice(index));
+            for (i = 0; i < n; i++)
+            {
+                    binding = bindings[i];
+                if (binding.source is Array)
+                {
+                    if (binding.source[0] == "model")
+                    {
+                        if (binding.source.length == 2 && binding.destination.length == 2)
+                        {
+                            var destObject:Object;
+                            var destination:IStrand;
+                            // can be simplebinding or constantbinding
+                            var modelWatcher:Object = watchers.watcherMap["model"];
+                            fieldWatcher = modelWatcher.children.watcherMap[binding.source[1]];
+                            if (fieldWatcher.eventNames is String)
+                            {
+                                sb = new SimpleBinding();
+                                sb.destinationPropertyName = binding.destination[1];
+                                sb.eventName = fieldWatcher.eventNames as String;
+                                sb.sourceID = binding.source[0];
+                                sb.sourcePropertyName = binding.source[1];
+                                sb.setDocument(_strand);
+                                destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
+                                destination = destObject as IStrand;
+                                if (destination)
+                                    destination.addBead(sb);
+                                else
+                                {
+                                    if (destObject)
+                                    {
+                                        sb.destination = destObject;
+                                        _strand.addBead(sb);
+                                    }
+                                    else
+                                    {
+                                        deferredBindings[binding.destination[0]] = sb;
+                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                                    }
+                                }
+                            }
+                            else if (fieldWatcher.eventNames == null)
+                            {
+                                var cb:ConstantBinding = new ConstantBinding();
+                                cb.destinationPropertyName = binding.destination[1];
+                                cb.sourceID = binding.source[0];
+                                cb.sourcePropertyName = binding.source[1];
+                                cb.setDocument(_strand);
+                                destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
+                                destination = destObject as IStrand;
+                                if (destination)
+                                    destination.addBead(cb);
+                                else
+                                {
+                                    if (destObject)
+                                    {
+                                        sb.destination = destObject;
+                                        _strand.addBead(sb);
+                                    }
+                                    else
+                                    {
+                                        deferredBindings[binding.destination[0]] = sb;
+                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                else if (binding.source is String)
+                {
+                    fieldWatcher = watchers.watcherMap[binding.source];
+                    if (fieldWatcher.eventNames is String)
+                    {
+                        sb = new SimpleBinding();
+                        sb.destinationPropertyName = binding.destination[1];
+                        sb.eventName = fieldWatcher.eventNames as String;
+                        sb.sourcePropertyName = binding.source;
+                        sb.setDocument(_strand);
+                        destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
+                        destination = destObject as IStrand;
+                        if (destination)
+                            destination.addBead(sb);
+                        else
+                        {
+                            if (destObject)
+                            {
+                                sb.destination = destObject;
+                                _strand.addBead(sb);
+                            }
+                            else
+                            {
+                                deferredBindings[binding.destination[0]] = sb;
+                                IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    makeGenericBinding(binding, i, watchers);
+                }
+            }
+        }
+
+        private function makeGenericBinding(binding:Object, index:int, watchers:Object):void
+        {
+            var gb:GenericBinding = new GenericBinding();
+            gb.setDocument(_strand);
+            gb.destinationData = binding.destination;
+			gb.destinationFunction = binding.destFunc;
+            gb.source = binding.source;
+            setupWatchers(gb, index, watchers.watchers, null);
+        }
+        
+        private function setupWatchers(gb:GenericBinding, index:int, watchers:Array, parentWatcher:WatcherBase):void
+        {
+            var n:int = watchers.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var watcher:Object = watchers[i];
+                if (watcher.bindings.indexOf(index) != -1)
+                {
+                    var type:String = watcher.type;
+                    switch (type)
+                    {
+                        case "property":
+                        {
+                            var pw:PropertyWatcher = new PropertyWatcher(this, 
+                                        watcher.propertyName, 
+                                        watcher.eventNames,
+                                        watcher.getterFunction);
+                            watcher.watcher = pw;
+                            if (parentWatcher)
+                                pw.parentChanged(parentWatcher.value);
+                            else
+                                pw.parentChanged(_strand);
+                            if (parentWatcher)
+                                parentWatcher.addChild(pw);
+                            if (watcher.children == null)
+                                pw.addBinding(gb);
+                            break;
+                        }
+                    }
+                    if (watcher.children)
+                    {
+                        setupWatchers(gb, index, watcher.children, watcher.watcher);
+                    }
+                }
+            }
+        }
+        
+        private function decodeWatcher(bindingData:Array):Object
+        {
+            var watcherMap:Object = {};
+            var watchers:Array = [];
+            var n:int = bindingData.length;
+            var index:int = 0;
+            var watcherData:Object;
+            while (index < n)
+            {
+                var watcherIndex:int = bindingData[index++];
+                var type:int = bindingData[index++];
+                switch (type)
+                {
+                    case 0:
+                    {
+                        watcherData = { type: "function" };
+                        watcherData.functionName = bindingData[index++];
+						watcherData.paramFunction = bindingData[index++];
+                        watcherData.eventNames = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        break;
+                    }
+                    case 1:
+					{
+						watcherData = { type: "static" };
+						watcherData.propertyName = bindingData[index++];
+						watcherData.eventNames = bindingData[index++];
+						watcherData.bindings = bindingData[index++];
+						watcherData.getterFunction = bindingData[index++];
+						watcherData.parentObj = bindingData[index++];
+						watcherMap[watcherData.propertyName] = watcherData;
+						break;
+					}
+                    case 2:
+                    {
+                        watcherData = { type: "property" };
+                        watcherData.propertyName = bindingData[index++];
+                        watcherData.eventNames = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        watcherData.getterFunction = bindingData[index++];
+                        watcherMap[watcherData.propertyName] = watcherData;
+                        break;
+                    }
+                    case 3:
+                    {
+                        watcherData = { type: "xml" };
+                        watcherData.propertyName = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        watcherMap[watcherData.propertyName] = watcherData;
+                        break;
+                    }
+                }
+                watcherData.children = bindingData[index++];
+                if (watcherData.children != null)
+                {
+                    watcherData.children = decodeWatcher(watcherData.children);
+                }
+                watcherData.index = watcherIndex;
+                watchers.push(watcherData);
+            }            
+            return { watchers: watchers, watcherMap: watcherMap };
+        }
+        
+        private var deferredBindings:Object = {};
+        private function deferredBindingsHandler(event:Event):void
+        {
+            for (var p:String in deferredBindings)
+            {
+                if (_strand[p] != null)
+                {
+                    var destination:IStrand = _strand[p] as IStrand;
+                    destination.addBead(deferredBindings[p]);
+                    delete deferredBindings[p];
+                }
+            }
+        }
+        
+    }
+}
\ No newline at end of file


[06/50] git commit: [flex-asjs] [refs/heads/develop] - new layout for titlebar

Posted by ah...@apache.org.
new layout for titlebar


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

Branch: refs/heads/develop
Commit: f55e862c3cdefa542806398b75e66800bf79909f
Parents: b24d574
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 13:38:50 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:41 2014 -0700

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/defaults.css | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f55e862c/frameworks/as/projects/FlexJSUI/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css
index 28410c4..886f1c0 100644
--- a/frameworks/as/projects/FlexJSUI/defaults.css
+++ b/frameworks/as/projects/FlexJSUI/defaults.css
@@ -374,8 +374,9 @@ TitleBar
 {
     IBeadModel: ClassReference("org.apache.flex.html.beads.models.TitleBarModel");
     IBeadView: ClassReference("org.apache.flex.html.beads.TitleBarView");
-    IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.NonVirtualHorizontalLayout");
+    IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout");
     iMeasurementBead: ClassReference("org.apache.flex.html.beads.TitleBarMeasurementBead");
+    background-color: #FFFFFF;
 }
 
 ToggleTextButton


[14/50] git commit: [flex-asjs] [refs/heads/develop] - fix bug

Posted by ah...@apache.org.
fix bug


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

Branch: refs/heads/develop
Commit: 5b023f2a85ad477402337a85a6446ba0baf95bdc
Parents: 2827039
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 16 23:20:48 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:46 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5b023f2a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
index e59709e..e810a04 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
@@ -147,7 +147,7 @@ package org.apache.flex.core
                                 {
                                     if (destObject)
                                     {
-                                        sb.destination = destObject;
+                                        cb.destination = destObject;
                                         _strand.addBead(sb);
                                     }
                                     else


[46/50] git commit: [flex-asjs] [refs/heads/develop] - use host

Posted by ah...@apache.org.
use host


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

Branch: refs/heads/develop
Commit: e95eee4b15c9513e122c46553e05950e31321db6
Parents: 669d04b
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 25 07:59:22 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Sep 25 07:59:22 2014 -0700

----------------------------------------------------------------------
 .../FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e95eee4b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as
index d73aaf7..9bce189 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as
@@ -141,7 +141,7 @@ package org.apache.flex.html.beads
 			vsbm.value = 0;
 			vsb.model = vsbm;
 			vsb.width = 16;
-            IParent(strand).addElement(vsb);
+            IParent(host).addElement(vsb);
 			
 			vsb.addEventListener("scroll", scrollHandler);
 			
@@ -162,13 +162,13 @@ package org.apache.flex.html.beads
 		
 		private function sizeChangedHandler(event:Event):void
 		{
-			var ww:Number = DisplayObject(strand).width - DisplayObject(vScrollBar).width;
+			var ww:Number = DisplayObject(host).width - DisplayObject(vScrollBar).width;
 			if( !isNaN(ww) && ww > 0 ) {
 				textField.width = ww;
 				_border.width = ww;
 			}
 			
-			var hh:Number = DisplayObject(strand).height;
+			var hh:Number = DisplayObject(host).height;
 			if( !isNaN(hh) && hh > 0 ) {
 				textField.height = hh;
 				_border.height = hh;


[40/50] git commit: [flex-asjs] [refs/heads/develop] - handle text-align

Posted by ah...@apache.org.
handle text-align


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

Branch: refs/heads/develop
Commit: a3ae11ba88aec10c901f817e40744396950006b3
Parents: d53ed7d
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 14:35:25 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:32 2014 -0700

----------------------------------------------------------------------
 .../projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a3ae11ba/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
index bc8cecf..ab40d04 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
@@ -82,6 +82,11 @@ package org.apache.flex.core
 			if (paddingRight == null) paddingRight = padding;
 			tf.leftMargin = paddingLeft;
 			tf.rightMargin = paddingRight;
+            var align:Object = ValuesManager.valuesImpl.getValue(sp, "text-align");
+            if (align == "center")
+                tf.align = "center";
+            else if (align == "right")
+                tf.align = "right";
 
 			defaultTextFormat = tf;
 			super.text = value;


[29/50] git commit: [flex-asjs] [refs/heads/develop] - use host

Posted by ah...@apache.org.
use host


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

Branch: refs/heads/develop
Commit: cecbcf43933d5e7774861734227a12eef31e26a4
Parents: b4ae6a1
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:44:57 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:20 2014 -0700

----------------------------------------------------------------------
 .../org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cecbcf43/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
index 9a33910..dd7eec8 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
@@ -19,6 +19,7 @@
 package org.apache.flex.html.beads.layouts
 {	
 	import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
@@ -76,7 +77,7 @@ package org.apache.flex.html.beads.layouts
 			if (_value !== value)
             {
                 _value = value;
-                IEventDispatcher(_strand).dispatchEvent(new Event("layoutNeeded"));
+                IBeadView(_strand).host.dispatchEvent(new Event("layoutNeeded"));
             }
 		}
 		


[25/50] git commit: [flex-asjs] [refs/heads/develop] - allow bindings to have different destinations

Posted by ah...@apache.org.
allow bindings to have different destinations


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

Branch: refs/heads/develop
Commit: 410197980fcc9c72e71bef9f6e4442f42f46126d
Parents: 9e5c3b8
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:43:50 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:18 2014 -0700

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41019798/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
index 18dc1f9..77a303d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
@@ -80,7 +80,8 @@ org.apache.flex.binding.BindingBase.prototype.sourceID = null;
  * @param {Object} value The strand (owner) of the bead.
  */
 org.apache.flex.binding.BindingBase.prototype.set_strand = function(value) {
-  this.destination = value;
+  if (this.destination == null)
+    this.destination = value;
 
   if (this.sourceID != null)
   {


[36/50] git commit: [flex-asjs] [refs/heads/develop] - make closebutton smaller. Still ugly

Posted by ah...@apache.org.
make closebutton smaller.  Still ugly


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

Branch: refs/heads/develop
Commit: b5d9be82acac99893dd0e245f7efec277e61495e
Parents: f7868c5
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 14:34:20 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:30 2014 -0700

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b5d9be82/frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js
index 4f52584..9e3207e 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js
@@ -47,6 +47,9 @@ org.apache.flex.html.CloseButton.prototype.createElement =
   org.apache.flex.html.CloseButton.base(this, 'createElement');
   this.element.innerHTML = 'x';
 
+  this.element.style.padding = 0;
+  this.set_height(11);
+  this.set_width(11);
   return this.element;
 };
 


[47/50] git commit: [flex-asjs] [refs/heads/develop] - more attempts to fix autosizing

Posted by ah...@apache.org.
more attempts to fix autosizing


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

Branch: refs/heads/develop
Commit: d8755674ec2c5714951bca3d7774caafe9b8a0a7
Parents: e95eee4
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 25 08:00:27 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Sep 25 08:00:27 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/html/beads/TextFieldViewBase.as         | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d8755674/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
index 006f765..bf361ef 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
@@ -92,8 +92,6 @@ package org.apache.flex.html.beads
             _textModel.addEventListener("widthChanged", widthChangeHandler);
             _textModel.addEventListener("heightChanged", heightChangeHandler);
 			DisplayObjectContainer(value).addChild(_textField);
-            textField.width = DisplayObject(_strand).width;
-            textField.height = DisplayObject(_strand).height;
 			if (_textModel.text !== null)
 				text = _textModel.text;
 			if (_textModel.html !== null)
@@ -155,7 +153,6 @@ package org.apache.flex.html.beads
 		private function textChangeHandler(event:Event):void
 		{
 			text = _textModel.text;
-			sizeChangeHandler(event);
 		}
 		
 		private function htmlChangeHandler(event:Event):void
@@ -172,7 +169,7 @@ package org.apache.flex.html.beads
             autoWidth = false;
 			textField.width = DisplayObject(_strand).width;
             if (autoHeight)
-    			textField.height = textField.textHeight + 4;
+    	        textField.height = textField.textHeight + 4;
             else
                 textField.height = DisplayObject(_strand).height;
 		}


[05/50] git commit: [flex-asjs] [refs/heads/develop] - custom layout of title bars and other stretchy things

Posted by ah...@apache.org.
custom layout of title bars and other stretchy things


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

Branch: refs/heads/develop
Commit: fea0a05ecc7061ee5effa474b23d84b27cbea7f6
Parents: 3114285
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 13:35:43 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:40 2014 -0700

----------------------------------------------------------------------
 .../FlexibleFirstChildHorizontalLayout.as       | 179 +++++++++++++++++++
 1 file changed, 179 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fea0a05e/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
new file mode 100644
index 0000000..dd47b2e
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -0,0 +1,179 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.layouts
+{
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	
+	import org.apache.flex.core.IBeadLayout;
+	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+
+    /**
+     *  The FlexibleFirstChildHorizontalLayout class is a simple layout
+     *  bead.  It takes the set of children and lays them out
+     *  horizontally in one row, separating them according to
+     *  CSS layout rules for margin and padding styles. But it
+     *  will size the first child to take up as much or little
+     *  room as possible.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class FlexibleFirstChildHorizontalLayout implements IBeadLayout
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function FlexibleFirstChildHorizontalLayout()
+		{
+		}
+		
+		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;
+            IEventDispatcher(value).addEventListener("layoutNeeded", changeHandler);
+			IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
+			IEventDispatcher(value).addEventListener("childrenAdded", changeHandler);
+			IEventDispatcher(value).addEventListener("itemsCreated", changeHandler);
+		}
+	
+		private function changeHandler(event:Event):void
+		{
+			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
+			var contentView:DisplayObjectContainer = layoutParent.contentView;
+			
+			var n:int = contentView.numChildren;
+			var marginLeft:Object;
+			var marginRight:Object;
+			var marginTop:Object;
+			var marginBottom:Object;
+			var margin:Object;
+			var maxHeight:Number = 0;
+			var verticalMargins:Array = [];
+			
+			for (var i:int = n - 1; i >= 0; i--)
+			{
+				var child:DisplayObject = contentView.getChildAt(i);
+				margin = ValuesManager.valuesImpl.getValue(child, "margin");
+				if (margin is Array)
+				{
+					if (margin.length == 1)
+						marginLeft = marginTop = marginRight = marginBottom = margin[0];
+					else if (margin.length <= 3)
+					{
+						marginLeft = marginRight = margin[1];
+						marginTop = marginBottom = margin[0];
+					}
+					else if (margin.length == 4)
+					{
+						marginLeft = margin[3];
+						marginBottom = margin[2];
+						marginRight = margin[1];
+						marginTop = margin[0];					
+					}
+				}
+				else if (margin == null)
+				{
+					marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
+					marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
+					marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
+					marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
+				}
+				else
+				{
+					marginLeft = marginTop = marginBottom = marginRight = margin;
+				}
+				var ml:Number;
+				var mr:Number;
+				var mt:Number;
+				var mb:Number;
+				var lastmr:Number;
+				mt = Number(marginTop);
+				if (isNaN(mt))
+					mt = 0;
+				mb = Number(marginBottom);
+				if (isNaN(mb))
+					mb = 0;
+				if (marginLeft == "auto")
+					ml = 0;
+				else
+				{
+					ml = Number(marginLeft);
+					if (isNaN(ml))
+						ml = 0;
+				}
+				if (marginRight == "auto")
+					mr = 0;
+				else
+				{
+					mr = Number(marginRight);
+					if (isNaN(mr))
+						mr = 0;
+				}
+				child.y = mt;
+				maxHeight = Math.max(maxHeight, ml + child.height + mr);
+				var xx:Number = contentView.width;
+				if (i == 0)
+                {
+                    child.x = ml;
+                    child.width = xx - mr;
+                }
+				else
+                    child.x = xx - child.width - mr;
+				xx -= child.width + mr + ml;
+				lastmr = mr;
+				var valign:Object = ValuesManager.valuesImpl.getValue(child, "vertical-align");
+				verticalMargins.push({ marginTop: marginTop, marginBottom: marginBottom, valign: valign });
+			}
+			for (i = 0; i < n; i++)
+			{
+				var obj:Object = verticalMargins[0]
+				child = contentView.getChildAt(i);
+				if (obj.valign == "middle")
+					child.y = maxHeight - child.height / 2;
+				else if (valign == "bottom")
+					child.y = maxHeight - child.height - obj.marginBottom;
+				else
+					child.y = obj.marginTop;
+			}
+		}
+	}
+}


[28/50] git commit: [flex-asjs] [refs/heads/develop] - panel should pull beads from css

Posted by ah...@apache.org.
panel should pull beads from css


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

Branch: refs/heads/develop
Commit: a0dd906ea24dd2c5b8df3f75f13c8eb7a821b40e
Parents: cecbcf4
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:45:17 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:20 2014 -0700

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/defaults.css | 38 ++++++++++++++---------
 1 file changed, 23 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a0dd906e/frameworks/as/projects/FlexJSUI/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css
index dd8bff1..e6fe059 100644
--- a/frameworks/as/projects/FlexJSUI/defaults.css
+++ b/frameworks/as/projects/FlexJSUI/defaults.css
@@ -106,6 +106,28 @@ Map
     IBeadView: ClassReference("org.apache.flex.maps.google.beads.MapView");
 }
 
+Panel
+{
+    IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel");
+    IBeadView: ClassReference("org.apache.flex.html.beads.PanelView");
+    
+    background-color: #FFFFFF;
+    border-style: solid;
+    border-color: #000000;
+    border-thickness: 1;
+}
+
+PanelWithControlBar
+{
+    IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel");
+    IBeadView: ClassReference("org.apache.flex.html.beads.PanelWithControlBarView");
+    
+    background-color: #FFFFFF;
+    border-style: solid;
+    border-color: #000000;
+    border-thickness: 1;
+}
+
 SimpleList
 {
     IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
@@ -276,28 +298,14 @@ NumericStepper
 
 Panel
 {
-    IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel");
-    IBeadView: ClassReference("org.apache.flex.html.beads.PanelView");
     iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
-    iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
-    
-    background-color: #FFFFFF;
-    border-style: solid;
-    border-color: #000000;
-    border-thickness: 1;
+    iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");    
 }
 
 PanelWithControlBar
 {
-    IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel");
-    IBeadView: ClassReference("org.apache.flex.html.beads.PanelWithControlBarView");
     iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
     iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
-    
-    background-color: #FFFFFF;
-    border-style: solid;
-    border-color: #000000;
-    border-thickness: 1;
 }
 
 RadioButton


[21/50] git commit: [flex-asjs] [refs/heads/develop] - add missing property

Posted by ah...@apache.org.
add missing property


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

Branch: refs/heads/develop
Commit: 7dfcd3d6b0b2353e73ca8253ad9a0bd5abf3e1e7
Parents: 45d6b4f
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:40:47 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:16 2014 -0700

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/html/Label.js   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7dfcd3d6/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
index bf1b3ec..3670908 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
@@ -59,3 +59,21 @@ org.apache.flex.html.Label.prototype.get_text = function() {
 org.apache.flex.html.Label.prototype.set_text = function(value) {
   this.element.innerHTML = value;
 };
+
+
+/**
+ * @expose
+ * @return {string} The html getter.
+ */
+org.apache.flex.html.Label.prototype.get_html = function() {
+    return this.element.innerHTML;
+};
+
+
+/**
+ * @expose
+ * @param {string} value The html setter.
+ */
+org.apache.flex.html.Label.prototype.set_html = function(value) {
+    this.element.innerHTML = value;
+};


[34/50] git commit: [flex-asjs] [refs/heads/develop] - add close button

Posted by ah...@apache.org.
add close button


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

Branch: refs/heads/develop
Commit: d03c8a4fd6f1baf0a6c0fceb5fe72bd34e98a747
Parents: e5756a0
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:50:39 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:26 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/html/CloseButton.js     | 52 ++++++++++++++++++++
 1 file changed, 52 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d03c8a4f/frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js
new file mode 100644
index 0000000..4f52584
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/CloseButton.js
@@ -0,0 +1,52 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.CloseButton');
+
+goog.require('org.apache.flex.html.Button');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.html.Button}
+ */
+org.apache.flex.html.CloseButton = function() {
+  org.apache.flex.html.CloseButton.base(this, 'constructor');
+};
+goog.inherits(org.apache.flex.html.CloseButton,
+    org.apache.flex.html.Button);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.CloseButton.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'CloseButton',
+                qName: 'org.apache.flex.html.CloseButton'}] };
+
+
+/**
+ * @override
+ */
+org.apache.flex.html.CloseButton.prototype.createElement =
+    function() {
+  org.apache.flex.html.CloseButton.base(this, 'createElement');
+  this.element.innerHTML = 'x';
+
+  return this.element;
+};
+


[30/50] git commit: [flex-asjs] [refs/heads/develop] - add getElement and numElements

Posted by ah...@apache.org.
add getElement and numElements


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

Branch: refs/heads/develop
Commit: 7023f874bebd0d0bdb2c5c01551ee6c8f995a7ac
Parents: a0dd906
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:46:42 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:21 2014 -0700

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/core/UIBase.js | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7023f874/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
index 0833831..5aecfa8 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -122,6 +122,16 @@ org.apache.flex.core.UIBase.prototype.addElementAt = function(c, index) {
 
 
 /**
+ * @param {number} index The index in parent.
+ * @return {Object} The child element.
+ */
+org.apache.flex.core.UIBase.prototype.getElementAt = function(index) {
+  var children = this.internalChildren();
+  return children[index].flexjs_wrapper;
+};
+
+
+/**
  * @param {Object} c The child element.
  * @return {number} The index in parent.
  */
@@ -146,6 +156,15 @@ org.apache.flex.core.UIBase.prototype.removeElement = function(c) {
 
 
 /**
+ * @return {number} The number of child elements.
+ */
+org.apache.flex.core.UIBase.prototype.get_numElements = function() {
+  var children = this.internalChildren();
+  return children.length;
+};
+
+
+/**
  * @return {Object} The parent of this object.
  */
 org.apache.flex.core.UIBase.prototype.get_parent = function() {


[35/50] git commit: [flex-asjs] [refs/heads/develop] - add ContainerView

Posted by ah...@apache.org.
add ContainerView


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

Branch: refs/heads/develop
Commit: f7868c5604d22ad452e5399c9bae7d687dcb2640
Parents: d03c8a4
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:51:10 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:29 2014 -0700

----------------------------------------------------------------------
 .../org/apache/flex/html/beads/ContainerView.js | 67 ++++++++++++++++++++
 1 file changed, 67 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f7868c56/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ContainerView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ContainerView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ContainerView.js
new file mode 100644
index 0000000..c578c6d
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ContainerView.js
@@ -0,0 +1,67 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.beads.ContainerView');
+
+goog.require('org.apache.flex.core.BeadViewBase');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.BeadViewBase}
+ */
+org.apache.flex.html.beads.ContainerView = function() {
+  this.lastSelectedIndex = -1;
+  org.apache.flex.html.beads.ContainerView.base(this, 'constructor');
+
+  this.className = 'ContainerView';
+};
+goog.inherits(
+    org.apache.flex.html.beads.ContainerView,
+    org.apache.flex.core.BeadViewBase);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.beads.ContainerView.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'ContainerView',
+                qName: 'org.apache.flex.html.beads.ContainerView' }],
+    interfaces: [org.apache.flex.core.ILayoutParent]
+    };
+
+
+/**
+ * @expose
+ * @return {Object} value The content view.
+ */
+org.apache.flex.html.beads.ContainerView.prototype.get_contentView =
+    function() {
+
+  return this._strand;
+};
+
+
+/**
+ * @expose
+ * @return {Object} value The resizeable view.
+ */
+org.apache.flex.html.beads.ContainerView.prototype.get_resizableView =
+function() {
+
+  return this._strand;
+};


[17/50] git commit: [flex-asjs] [refs/heads/develop] - get rid of DisplayObject and DisplayObjectContainer dependencies in ILayoutParent

Posted by ah...@apache.org.
get rid of DisplayObject and DisplayObjectContainer dependencies in ILayoutParent


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

Branch: refs/heads/develop
Commit: af8213da154653b8130d7e71c513b869251612b0
Parents: 727195d
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 18 11:17:18 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:13 2014 -0700

----------------------------------------------------------------------
 .../apache/flex/html/beads/TitleBarView.mxml    |  2 +-
 .../src/org/apache/flex/core/Application.as     | 13 +++++
 .../src/org/apache/flex/core/ILayoutParent.as   | 10 +---
 .../src/org/apache/flex/core/IParent.as         | 15 ++++-
 .../src/org/apache/flex/core/IParentIUIBase.as  | 33 +++++++++++
 .../org/apache/flex/core/MXMLBeadViewBase.as    | 11 ++--
 .../FlexJSUI/src/org/apache/flex/core/UIBase.as | 15 ++++-
 .../org/apache/flex/createjs/core/ViewBase.as   |  5 ++
 .../org/apache/flex/html/beads/ContainerView.as | 17 +++---
 .../src/org/apache/flex/html/beads/ListView.as  | 12 ++--
 .../flex/html/beads/NumericStepperView.as       | 15 +++--
 .../flex/html/beads/ScrollingContainerView.as   | 14 ++---
 .../flex/html/beads/layouts/ButtonBarLayout.as  | 23 +++-----
 .../FlexibleFirstChildHorizontalLayout.as       | 15 +++--
 .../beads/layouts/NonVirtualHorizontalLayout.as | 14 ++---
 .../NonVirtualHorizontalScrollingLayout.as      | 13 ++---
 .../beads/layouts/NonVirtualVerticalLayout.as   | 12 ++--
 .../NonVirtualVerticalScrollingLayout.as        | 61 +++++++++-----------
 18 files changed, 175 insertions(+), 125 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
index 6ed8ccf..47e72c2 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
@@ -20,7 +20,7 @@ limitations under the License.
 <basic:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:basic="library://ns.apache.org/flexjs/basic" 
                   xmlns:mx="library://ns.adobe.com/flex/mx"
-                  implements="org.apache.flex.core.ILayoutParent">
+                  >
     <fx:Script>
         <![CDATA[
             import org.apache.flex.html.TitleBar;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
index 54f4f8b..397fa5b 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
@@ -356,6 +356,19 @@ package org.apache.flex.core
         }
 
         /**
+         *  @copy org.apache.flex.core.IParent#getElementAt()
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function getElementAt(index:int):Object
+        {
+            return getChildAt(index);
+        }
+        
+        /**
          *  @copy org.apache.flex.core.IParent#getElementIndex()
          * 
          *  @langversion 3.0

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ILayoutParent.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ILayoutParent.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ILayoutParent.as
index bbf818e..a9e199a 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ILayoutParent.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ILayoutParent.as
@@ -18,12 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
-	import org.apache.flex.html.supportClasses.Border;
-	import org.apache.flex.html.supportClasses.ScrollBar;
-
     /**
      *  The ILayoutParent interface is the basic interface for the 
      *  container that have an IBeadLayout.  The layout implementation
@@ -45,7 +39,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		function get contentView():DisplayObjectContainer;
+		function get contentView():IParentIUIBase;
 		
         /**
          *  The container whose size changes
@@ -57,6 +51,6 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		function get resizableView():DisplayObject;
+		function get resizableView():IUIBase;
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IParent.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IParent.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IParent.as
index 864382a..e9c46d3 100755
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IParent.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IParent.as
@@ -89,5 +89,18 @@ package org.apache.flex.core
         *  @productversion FlexJS 0.0
         */
        function get numElements():int;
-	}
+
+       /**
+        *  Get a component from the parent.
+        * 
+        *  @param c The index of the subcomponent.
+        * 
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       function getElementAt(index:int):Object;
+
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IParentIUIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IParentIUIBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IParentIUIBase.as
new file mode 100755
index 0000000..f36d006
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IParentIUIBase.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+    /**
+     *  The IParentIUIBase interface is a convenience interface 
+     *  for IUIBase components that contains subcomponents.
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+    public interface IParentIUIBase extends IParent, IUIBase
+	{
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
index 7d45d57..49172ae 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
@@ -24,6 +24,7 @@ package org.apache.flex.core
 	import mx.states.State;
 	
 	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
@@ -42,7 +43,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class MXMLBeadViewBase extends BeadViewBase implements IStrand
+	public class MXMLBeadViewBase extends BeadViewBase implements IStrand, ILayoutParent
 	{
         /**
          *  Constructor.
@@ -321,9 +322,9 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public function get contentView():DisplayObjectContainer
+        public function get contentView():IParentIUIBase
         {
-            return _strand as DisplayObjectContainer;
+            return _strand as IParentIUIBase;
         }
         
         /**
@@ -334,9 +335,9 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public function get resizableView():DisplayObject
+        public function get resizableView():IUIBase
         {
-            return _strand as DisplayObject;
+            return _strand as IUIBase;
         }
         
     }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as
index 37ab732..8965db8 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as
@@ -49,7 +49,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class UIBase extends Sprite implements IStrand, IEventDispatcher, IUIBase, IParent, IStyleableObject, IChild
+	public class UIBase extends Sprite implements IStrand, IEventDispatcher, IParentIUIBase, IStyleableObject, IChild
 	{
         /**
          *  Constructor.
@@ -622,6 +622,19 @@ package org.apache.flex.core
         }
         
         /**
+         *  @copy org.apache.flex.core.IParent#getElementAt()
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function getElementAt(index:int):Object
+        {
+            return getChildAt(index);
+        }        
+        
+        /**
          *  @copy org.apache.flex.core.IParent#getElementIndex()
          * 
          *  @langversion 3.0

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/core/ViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/core/ViewBase.as
index 120d22e..9d7fe95 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/core/ViewBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/core/ViewBase.as
@@ -71,6 +71,11 @@ package org.apache.flex.createjs.core
             addChildAt(c as DisplayObject, index);
         }
         
+        public function getElementAt(index:int):Object
+        {
+            return getChildAt(index);
+        }
+        
         public function getElementIndex(c:Object):int
         {
             return getChildIndex(c as DisplayObject);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
index 755dd63..1e12776 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
@@ -18,15 +18,14 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
     import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.ILayoutParent;
+    import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.UIBase;
+    import org.apache.flex.core.IUIBase;
+    import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.html.Container;
 	import org.apache.flex.html.supportClasses.Border;
@@ -66,7 +65,7 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */        
-		protected var actualParent:DisplayObjectContainer;
+		protected var actualParent:UIBase;
 				
         /**
          *  @copy org.apache.flex.core.IBead#strand
@@ -85,7 +84,7 @@ package org.apache.flex.html.beads
 			if (contentAreaNeeded())
 			{
 				actualParent = new ContainerContentArea();
-				DisplayObjectContainer(value).addChild(actualParent);
+				UIBase(value).addElement(actualParent);
 				Container(value).setActualParent(actualParent);
 				actualParent.x = padding.paddingLeft;
 				actualParent.y = padding.paddingTop;
@@ -191,7 +190,7 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function get contentView():DisplayObjectContainer
+		public function get contentView():IParentIUIBase
 		{
 			return actualParent;
 		}
@@ -204,9 +203,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function get resizableView():DisplayObject
+		public function get resizableView():IUIBase
 		{
-			return _strand as DisplayObject;
+			return _strand as IUIBase;
 		}
 				
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
index 0b98577..3173acb 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
@@ -18,9 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {	
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
 	import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadLayout;
@@ -30,6 +27,7 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.IParent;
+    import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IRollOverModel;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
@@ -136,17 +134,17 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function get contentView():DisplayObjectContainer
+		public function get contentView():IParentIUIBase
 		{
-			return _dataGroup as DisplayObjectContainer;
+			return _dataGroup as IParentIUIBase;
 		}
 		
 		/**
 		 * @private
 		 */
-		public function get resizableView():DisplayObject
+		public function get resizableView():IUIBase
 		{
-			return _strand as DisplayObject;
+			return _strand as IUIBase;
 		}
 		
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/NumericStepperView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/NumericStepperView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/NumericStepperView.as
index d8b3104..33e14de 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/NumericStepperView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/NumericStepperView.as
@@ -18,15 +18,14 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
     import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.ILayoutParent;
-	import org.apache.flex.core.IParent;
+    import org.apache.flex.core.IParent;
+	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IRangeModel;
 	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.createjs.Label;
 	import org.apache.flex.events.Event;
@@ -175,9 +174,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function get contentView():DisplayObjectContainer
+		public function get contentView():IParentIUIBase
 		{
-			return _strand as DisplayObjectContainer;
+			return _strand as IParentIUIBase;
 		}
 		
 		/**
@@ -207,9 +206,9 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-		public function get resizableView():DisplayObject
+		public function get resizableView():IUIBase
 		{
-			return _strand as DisplayObject;
+			return _strand as IUIBase;
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollingContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollingContainerView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollingContainerView.as
index 4feb591..af1ee3a 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollingContainerView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollingContainerView.as
@@ -18,15 +18,15 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
 	
 	import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IScrollingLayoutParent;
 	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IParentIUIBase;
     import org.apache.flex.core.IParent;
+    import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.html.Container;
@@ -68,7 +68,7 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */        
-		protected var actualParent:DisplayObjectContainer;
+		protected var actualParent:UIBase;
 				
         /**
          *  @copy org.apache.flex.core.IBead#strand
@@ -87,7 +87,7 @@ package org.apache.flex.html.beads
 			if (contentAreaNeeded())
 			{
 				actualParent = new ContainerContentArea();
-				DisplayObjectContainer(value).addChild(actualParent);
+				IParent(value).addElement(actualParent);
 				Container(value).setActualParent(actualParent);
 				actualParent.x = padding.paddingLeft;
 				actualParent.y = padding.paddingTop;
@@ -193,7 +193,7 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function get contentView():DisplayObjectContainer
+		public function get contentView():IParentIUIBase
 		{
 			return actualParent;
 		}
@@ -219,9 +219,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function get resizableView():DisplayObject
+		public function get resizableView():IUIBase
 		{
-			return _strand as DisplayObject;
+			return _strand as IUIBase;
 		}
 		
         private var _vScrollBar:ScrollBar;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
index 55148ca..69fd35b 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
@@ -17,10 +17,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads.layouts
-{
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
+{	
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IItemRenderer;
 	import org.apache.flex.core.IItemRendererClassFactory;
@@ -28,7 +25,8 @@ package org.apache.flex.html.beads.layouts
 	import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.UIBase;
+    import org.apache.flex.core.IParent;
+    import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
@@ -105,19 +103,12 @@ package org.apache.flex.html.beads.layouts
 		private function changeHandler(event:Event):void
 		{
 			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
-			var contentView:DisplayObjectContainer = layoutParent.contentView;
-			
-			var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
-			var dp:Array = selectionModel.dataProvider as Array;
-			if (!dp)
-				return;
-			
-			var itemRendererFactory:IItemRendererClassFactory = _strand.getBeadByType(IItemRendererClassFactory) as IItemRendererClassFactory;
+			var contentView:IParent = layoutParent.contentView;
 			
-			var n:int = dp.length;
+			var n:int = contentView.numElements;
 			var xpos:Number = 0;
-			var useWidth:Number = DisplayObject(_strand).width / n;
-			var useHeight:Number = DisplayObject(_strand).height;
+			var useWidth:Number = IUIBase(_strand).width / n;
+			var useHeight:Number = IUIBase(_strand).height;
 			
 			for (var i:int = 0; i < n; i++)
 			{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
index dd47b2e..2e315b1 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -18,12 +18,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads.layouts
 {
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IParent;
+    import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
@@ -78,9 +77,9 @@ package org.apache.flex.html.beads.layouts
 		private function changeHandler(event:Event):void
 		{
 			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
-			var contentView:DisplayObjectContainer = layoutParent.contentView;
+			var contentView:IParent = layoutParent.contentView;
 			
-			var n:int = contentView.numChildren;
+			var n:int = contentView.numElements;
 			var marginLeft:Object;
 			var marginRight:Object;
 			var marginTop:Object;
@@ -91,7 +90,7 @@ package org.apache.flex.html.beads.layouts
 			
 			for (var i:int = n - 1; i >= 0; i--)
 			{
-				var child:DisplayObject = contentView.getChildAt(i);
+				var child:IUIBase = contentView.getElementAt(i) as IUIBase;
 				margin = ValuesManager.valuesImpl.getValue(child, "margin");
 				if (margin is Array)
 				{
@@ -150,7 +149,7 @@ package org.apache.flex.html.beads.layouts
 				}
 				child.y = mt;
 				maxHeight = Math.max(maxHeight, ml + child.height + mr);
-				var xx:Number = contentView.width;
+				var xx:Number = layoutParent.resizableView.width;
 				if (i == 0)
                 {
                     child.x = ml;
@@ -166,7 +165,7 @@ package org.apache.flex.html.beads.layouts
 			for (i = 0; i < n; i++)
 			{
 				var obj:Object = verticalMargins[0]
-				child = contentView.getChildAt(i);
+				child = contentView.getElementAt(i) as IUIBase;
 				if (obj.valign == "middle")
 					child.y = maxHeight - child.height / 2;
 				else if (valign == "bottom")

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as
index 37b3dbf..3d133de 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as
@@ -18,13 +18,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads.layouts
 {
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.UIBase;
+    import org.apache.flex.core.IParentIUIBase;
+    import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
@@ -76,9 +74,9 @@ package org.apache.flex.html.beads.layouts
 		private function changeHandler(event:Event):void
 		{
 			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
-			var contentView:DisplayObjectContainer = layoutParent.contentView;
+			var contentView:IParentIUIBase = layoutParent.contentView;
 			
-			var n:int = contentView.numChildren;
+			var n:int = contentView.numElements;
 			var marginLeft:Object;
 			var marginRight:Object;
 			var marginTop:Object;
@@ -89,7 +87,7 @@ package org.apache.flex.html.beads.layouts
 			
 			for (var i:int = 0; i < n; i++)
 			{
-				var child:DisplayObject = contentView.getChildAt(i);
+				var child:IUIBase = contentView.getElementAt(i) as IUIBase;
 				margin = ValuesManager.valuesImpl.getValue(child, "margin");
 				if (margin is Array)
 				{
@@ -161,7 +159,7 @@ package org.apache.flex.html.beads.layouts
 			for (i = 0; i < n; i++)
 			{
 				var obj:Object = verticalMargins[0]
-				child = contentView.getChildAt(i);
+				child = contentView.getElementAt(i) as IUIBase;
 				if (obj.valign == "middle")
 					child.y = maxHeight - child.height / 2;
 				else if (valign == "bottom")

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalScrollingLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalScrollingLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalScrollingLayout.as
index cf62129..4cc9657 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalScrollingLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalScrollingLayout.as
@@ -18,13 +18,12 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads.layouts
 {
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IBorderModel;
+    import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IScrollingLayoutParent;
-	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IUIBase;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.html.supportClasses.Border;
@@ -81,7 +80,7 @@ package org.apache.flex.html.beads.layouts
 		{            
 			var layoutParent:IScrollingLayoutParent = 
                         _strand.getBeadByType(IScrollingLayoutParent) as IScrollingLayoutParent;
-			var contentView:DisplayObjectContainer = layoutParent.contentView;
+			var contentView:IParentIUIBase = layoutParent.contentView;
 			var border:Border = layoutParent.border;
 			var borderModel:IBorderModel = border.model as IBorderModel;
 			
@@ -95,11 +94,11 @@ package org.apache.flex.html.beads.layouts
 			contentView.x = borderModel.offsets.left;
 			contentView.y = borderModel.offsets.top;
 			
-			var n:int = contentView.numChildren;
+			var n:int = contentView.numElements;
 			var xx:Number = 0;
 			for (var i:int = 0; i < n; i++)
 			{
-				var ir:DisplayObject = contentView.getChildAt(i);
+				var ir:IUIBase = contentView.getElementAt(i) as IUIBase;
 				ir.x = xx;
 				ir.height = contentView.height;
 				xx += ir.width;			

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.as
index cf1d3ce..1d0bb2a 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.as
@@ -18,12 +18,12 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads.layouts
 {
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
 	
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.ILayoutParent;
+    import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
@@ -75,9 +75,9 @@ package org.apache.flex.html.beads.layouts
 		private function changeHandler(event:Event):void
 		{
 			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
-			var contentView:DisplayObjectContainer = layoutParent.contentView;
+			var contentView:IParentIUIBase = layoutParent.contentView;
 			
-			var n:int = contentView.numChildren;
+			var n:int = contentView.numElements;
 			var hasHorizontalFlex:Boolean;
 			var flexibleHorizontalMargins:Array = [];
 			var marginLeft:Object;
@@ -88,7 +88,7 @@ package org.apache.flex.html.beads.layouts
 			var maxWidth:Number = 0;
 			for (var i:int = 0; i < n; i++)
 			{
-				var child:DisplayObject = contentView.getChildAt(i);
+				var child:IUIBase = contentView.getElementAt(i) as IUIBase;
 				margin = ValuesManager.valuesImpl.getValue(child, "margin");
 				if (margin is Array)
 				{
@@ -178,7 +178,7 @@ package org.apache.flex.html.beads.layouts
 			{
 				for (i = 0; i < n; i++)
 				{
-					child = contentView.getChildAt(i);
+					child = contentView.getElementAt(i) as IUIBase;
 					var obj:Object = flexibleHorizontalMargins[i];
 					if (obj.marginLeft == "auto" && obj.marginRight == "auto")
 						child.x = maxWidth - child.width / 2;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af8213da/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as
index 4d3e1c3..21ccbf2 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as
@@ -19,8 +19,7 @@
 package org.apache.flex.html.beads.layouts
 {
 	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	import flash.geom.Rectangle;
+    import flash.geom.Rectangle;
 	
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IBorderModel;
@@ -35,11 +34,21 @@ package org.apache.flex.html.beads.layouts
 =======
 	import org.apache.flex.core.IScrollingLayoutParent;
     import org.apache.flex.core.ILayoutParent;
+<<<<<<< HEAD
 >>>>>>> refactor ILayoutParent into IScrollingLayoutParent
+||||||| merged common ancestors
+=======
+    import org.apache.flex.core.IParentIUIBase;
+>>>>>>> get rid of DisplayObject and DisplayObjectContainer dependencies in ILayoutParent
 	import org.apache.flex.core.IScrollBarModel;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
+<<<<<<< HEAD
 	import org.apache.flex.core.UIBase;
+||||||| merged common ancestors
+=======
+    import org.apache.flex.core.IUIBase;
+>>>>>>> get rid of DisplayObject and DisplayObjectContainer dependencies in ILayoutParent
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.html.List;
@@ -96,46 +105,32 @@ package org.apache.flex.html.beads.layouts
 		
 		private function changeHandler(event:Event):void
 		{            
+<<<<<<< HEAD
             var layoutParent:IScrollingLayoutParent = 
                 _strand.getBeadByType(IScrollingLayoutParent) as IScrollingLayoutParent;
             var contentView:IContentView = layoutParent.contentView as IContentView;
 			var border:Border = layoutParent.border;
 			var borderModel:IBorderModel = border.model as IBorderModel;
 			
-			var ww:Number = DisplayObject(layoutParent.resizableView).width;
-			var hh:Number = DisplayObject(layoutParent.resizableView).height;
-			border.width = ww;
-			border.height = hh;
-			
+            var ww:Number = layoutParent.resizableView.width;
+            var hh:Number = layoutParent.resizableView.height;
+            border.width = ww;
+            border.height = hh;
+           
 			contentView.width = ww - borderModel.offsets.left - borderModel.offsets.right;
 			contentView.height = hh - borderModel.offsets.top - borderModel.offsets.bottom;
 			contentView.x = borderModel.offsets.left;
 			contentView.y = borderModel.offsets.top;
 			
-			var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
-			var dp:Array = selectionModel.dataProvider as Array;
-			if (!dp)
-				return;
-			
-			var itemRendererFactory:IItemRendererClassFactory = _strand.getBeadByType(IItemRendererClassFactory) as IItemRendererClassFactory;
-			
-			var n:int = dp.length;
+			var n:int = contentView.numElements;
 			var yy:Number = 0;
 			
 			for (var i:int = 0; i < n; i++)
 			{
-				var needsAdd:Boolean = false;
-				var ir:IItemRenderer = IItemRendererParent(contentView).getItemRendererForIndex(i);
-				if (ir == null) {
-					ir = itemRendererFactory.createItemRenderer(contentView as IItemRendererParent) as IItemRenderer;
-				}
-				ir.index = i;
-				ir.labelField = (_strand as List).labelField;
-				ir.data = dp[i];
-				UIBase(ir).y = yy;
-				UIBase(ir).x = 0;
-				UIBase(ir).width = contentView.width;
-				yy += UIBase(ir).height;			
+				var ir:IUIBase = contentView.getElementAt(i) as IUIBase;
+				ir.y = yy;
+				ir.width = contentView.width;
+				yy += ir.height;			
 			}
 			if (yy > contentView.height)
 			{
@@ -148,13 +143,13 @@ package org.apache.flex.html.beads.layouts
 				vScrollBar.height = contentView.height;
 				vScrollBar.y = contentView.y;
 				vScrollBar.x = contentView.width;
-				var vpos:Number = IScrollBarModel(vScrollBar.model).value;
-				DisplayObjectContainer(contentView).scrollRect = new Rectangle(0, vpos, contentView.width, vpos + contentView.height);
-				vScrollBar.addEventListener("scroll", scrollHandler);
+                var vpos:Number = IScrollBarModel(vScrollBar.model).value;
+                DisplayObject(contentView).scrollRect = new Rectangle(0, vpos, contentView.width, vpos + contentView.height);
+                vScrollBar.addEventListener("scroll", scrollHandler);
 			}
 			else if (vScrollBar)
 			{
-				DisplayObjectContainer(contentView).scrollRect = null;
+                DisplayObject(contentView).scrollRect = null;
 				vScrollBar.visible = false;
 			}
 		}
@@ -162,10 +157,10 @@ package org.apache.flex.html.beads.layouts
         private function scrollHandler(event:Event):void
         {
 			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
-			var contentView:DisplayObjectContainer = layoutParent.contentView;
+			var contentView:IParentIUIBase = layoutParent.contentView;
 			
             var vpos:Number = IScrollBarModel(vScrollBar.model).value;
-			contentView.scrollRect = new Rectangle(0, vpos, contentView.width, vpos + contentView.height);
+			DisplayObject(contentView).scrollRect = new Rectangle(0, vpos, contentView.width, vpos + contentView.height);
         }
 	}
 }


[33/50] git commit: [flex-asjs] [refs/heads/develop] - fix how we generate MXML properties to match AS side

Posted by ah...@apache.org.
fix how we generate MXML properties to match AS side


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

Branch: refs/heads/develop
Commit: c0f8b45b941a93fd6c4c29a8a4a35975aacad8e0
Parents: 2ed1a94
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:49:40 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:23 2014 -0700

----------------------------------------------------------------------
 .../org/apache/flex/core/MXMLBeadViewBase.as    |  6 +----
 .../src/org/apache/flex/core/ContainerBase.as   |  6 +----
 .../src/org/apache/flex/core/Application.js     | 12 +++++++---
 .../src/org/apache/flex/core/ContainerBase.js   | 23 +++-----------------
 .../org/apache/flex/core/HTMLElementWrapper.js  | 10 ---------
 .../FlexJS/src/org/apache/flex/core/ViewBase.js |  9 ++++----
 6 files changed, 18 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c0f8b45b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
index aa8d336..1a63cac 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
@@ -72,8 +72,6 @@ package org.apache.flex.core
             // each MXML file can also have styles in fx:Style block
             ValuesManager.valuesImpl.init(this);
             
-            MXMLDataInterpreter.generateMXMLProperties(this, mxmlProperties);
-            
             dispatchEvent(new Event("strandChanged"));            
             MXMLDataInterpreter.generateMXMLInstances(this, IParent(value), MXMLDescriptor);
             
@@ -112,8 +110,6 @@ package org.apache.flex.core
             return null;
         }
         
-        private var mxmlProperties:Array ;
-        
         /**
          *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
          *  
@@ -124,7 +120,7 @@ package org.apache.flex.core
          */
         public function generateMXMLAttributes(data:Array):void
         {
-            mxmlProperties = data;
+            MXMLDataInterpreter.generateMXMLProperties(this, data);
         }
         
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c0f8b45b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as
index e4bb7d6..d83a601 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as
@@ -100,8 +100,6 @@ package org.apache.flex.core
 			// each MXML file can also have styles in fx:Style block
 			ValuesManager.valuesImpl.init(this);
 			
-			MXMLDataInterpreter.generateMXMLProperties(this, mxmlProperties);
-			
 			super.addedToParent();
 			
 			MXMLDataInterpreter.generateMXMLInstances(this, this, MXMLDescriptor);
@@ -123,8 +121,6 @@ package org.apache.flex.core
 			return null;
 		}
 		
-		private var mxmlProperties:Array ;
-		
         /**
          *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
          *  
@@ -135,7 +131,7 @@ package org.apache.flex.core
          */
 		public function generateMXMLAttributes(data:Array):void
 		{
-			mxmlProperties = data;
+            MXMLDataInterpreter.generateMXMLProperties(this, data);
 		}
 		
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c0f8b45b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
index ac95d68..2088956 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
@@ -77,9 +77,6 @@ org.apache.flex.core.Application.prototype.start = function() {
   this.element = document.getElementsByTagName('body')[0];
   this.element.flexjs_wrapper = this;
 
-  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
-      this.get_MXMLProperties());
-
   org.apache.flex.core.ValuesManager.valuesImpl = this.valuesImpl;
   if (this.valuesImpl.init) {
     this.valuesImpl.init(this);
@@ -95,6 +92,15 @@ org.apache.flex.core.Application.prototype.start = function() {
 
 
 /**
+ * @expose
+ * @param {Array} data The data for the attributes.
+ */
+org.apache.flex.core.Application.prototype.generateMXMLAttributes = function(data) {
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this, data);
+};
+
+
+/**
  * @param {Object} c The child element.
  */
 org.apache.flex.core.Application.prototype.addElement =

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c0f8b45b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
index cdf7500..91ad3bc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
@@ -40,13 +40,6 @@ org.apache.flex.core.ContainerBase.prototype.mxmlContent = null;
  * @expose
  * @type {Array}
  */
-org.apache.flex.core.ContainerBase.prototype.mxmlProperties = null;
-
-
-/**
- * @expose
- * @type {Array}
- */
 org.apache.flex.core.ContainerBase.prototype.mxmlDescriptor = null;
 
 
@@ -64,7 +57,6 @@ org.apache.flex.core.ContainerBase.prototype.FLEXJS_CLASS_INFO =
  * @override
  */
 org.apache.flex.core.ContainerBase.prototype.addedToParent = function() {
-  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this, this.get_MXMLProperties());
   org.apache.flex.core.ContainerBase.base(this, 'addedToParent');
   org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, this, this.get_MXMLDescriptor());
 
@@ -75,10 +67,10 @@ org.apache.flex.core.ContainerBase.prototype.addedToParent = function() {
 
 /**
  * @expose
- * @return {Array} An array of properties.
+ * @param {Array} data The data for the attributes.
  */
-org.apache.flex.core.ContainerBase.prototype.get_MXMLProperties = function() {
-  return this.mxmlProperties;
+org.apache.flex.core.ContainerBase.prototype.generateMXMLAttributes = function(data) {
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this, data);
 };
 
 
@@ -89,12 +81,3 @@ org.apache.flex.core.ContainerBase.prototype.get_MXMLProperties = function() {
 org.apache.flex.core.ContainerBase.prototype.get_MXMLDescriptor = function() {
   return this.mxmlDescriptor;
 };
-
-
-/**
- * @expose
- * @param {Array} data Property name/value pairs for this instance.
- */
-org.apache.flex.core.ContainerBase.prototype.generateMXMLAttributes = function(data) {
-  this.mxmlProperties = data;
-};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c0f8b45b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
index 65c1762..d07ab9d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
@@ -108,16 +108,6 @@ org.apache.flex.core.HTMLElementWrapper.prototype.get_MXMLDescriptor =
 
 /**
  * @expose
- * @return {Array} The array of properties.
- */
-org.apache.flex.core.HTMLElementWrapper.prototype.get_MXMLProperties =
-    function() {
-  return null;
-};
-
-
-/**
- * @expose
  * @param {Object} bead The bead to remove.
  * @return {Object} The bead.
  */

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c0f8b45b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
index dc07012..9785941 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -73,9 +73,11 @@ org.apache.flex.core.ViewBase.prototype.applicationModel = null;
 
 /**
  * @expose
- * @type {Array}
+ * @param {Array} data The data for the attributes.
  */
-org.apache.flex.core.ViewBase.prototype.MXMLProperties = null;
+org.apache.flex.core.ViewBase.prototype.generateMXMLAttributes = function(data) {
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this, data);
+};
 
 
 /**
@@ -96,9 +98,6 @@ org.apache.flex.core.ViewBase.prototype.addedToParent = function() {
     org.apache.flex.core.ValuesManager.valuesImpl.init(this);
   }
 
-  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
-      this.get_MXMLProperties());
-
   org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this,
       this, this.get_MXMLDescriptor());
 


[16/50] git commit: [flex-asjs] [refs/heads/develop] - move TitleBarView to FlexJSJX

Posted by ah...@apache.org.
move TitleBarView to FlexJSJX


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

Branch: refs/heads/develop
Commit: a99dfd4cb387be0808b62dd4997c9da790c011f2
Parents: 5b023f2
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 16 23:21:40 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:47 2014 -0700

----------------------------------------------------------------------
 .../as/projects/FlexJSJX/compile-config.xml     |  15 +++
 .../as/projects/FlexJSJX/src/FlexJSJXClasses.as |   4 +
 .../flex/html/beads/TitleBarMeasurementBead.as  | 108 +++++++++++++++++++
 .../apache/flex/html/beads/TitleBarView.mxml    |  54 ++++++++++
 frameworks/as/projects/FlexJSUI/build.xml       |   4 -
 .../as/projects/FlexJSUI/compile-config.xml     |   8 ++
 .../as/projects/FlexJSUI/src/FlexJSUIClasses.as |   2 -
 .../flex/html/beads/TitleBarMeasurementBead.as  | 108 -------------------
 .../apache/flex/html/beads/TitleBarView.mxml    |  54 ----------
 9 files changed, 189 insertions(+), 168 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSJX/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/compile-config.xml b/frameworks/as/projects/FlexJSJX/compile-config.xml
index 2006657..31a8edd 100644
--- a/frameworks/as/projects/FlexJSJX/compile-config.xml
+++ b/frameworks/as/projects/FlexJSJX/compile-config.xml
@@ -25,6 +25,21 @@
             <path-element>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
             <path-element>../../libs/FlexJSUI.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/>
         

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
index 6526ced..8b993cc 100644
--- a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
+++ b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
@@ -67,6 +67,10 @@ internal class FlexJSJXClasses
 	import org.apache.flex.html.beads.controllers.DateFieldMouseController; DateFieldMouseController;
 	import org.apache.flex.html.supportClasses.DataGridColumn; DataGridColumn;
 	import org.apache.flex.html.supportClasses.DateChooserButton; DateChooserButton;
+    
+    import org.apache.flex.html.beads.TitleBarView; TitleBarView;
+    import org.apache.flex.html.beads.TitleBarMeasurementBead; TitleBarMeasurementBead;
+
 }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
new file mode 100644
index 0000000..8195f70
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads
+{
+	import org.apache.flex.core.IMeasurementBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.html.TitleBar;
+	
+	/**
+	 *  The TitleBarMeasurementBead class measures the overall size of a 
+	 *  org.apache.flex.html.TitleBar.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class TitleBarMeasurementBead implements IMeasurementBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function TitleBarMeasurementBead()
+		{
+		}
+		
+		/**
+		 *  The overall width of the org.apache.flex.html.TitleBar.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get measuredWidth():Number
+		{
+			var mwidth:Number = 0;
+			var titleBar:TitleBar = _strand as TitleBar;
+			var titleView:TitleBarView = _strand.getBeadByType(TitleBarView) as TitleBarView;
+			var labelMeasure:IMeasurementBead = titleView.titleLabel.measurementBead;
+			mwidth = labelMeasure.measuredWidth;
+			if( titleBar.showCloseButton ) {
+				var buttonMeasure:IMeasurementBead = titleView.closeButton.measurementBead;
+				mwidth += buttonMeasure.measuredWidth;
+			}
+			return mwidth;
+		}
+		
+		/**
+		 *  The overall height of the org.apache.flex.html.TitleBar.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get measuredHeight():Number
+		{
+			var mheight:Number = 0;
+			var titleBar:TitleBar = _strand as TitleBar;
+			var titleView:TitleBarView = _strand.getBeadByType(TitleBarView) as TitleBarView;
+			var labelMeasure:IMeasurementBead = titleView.titleLabel.measurementBead;
+			mheight = labelMeasure.measuredHeight;
+			if( titleBar.showCloseButton ) {
+				var buttonMeasure:IMeasurementBead = titleView.closeButton.measurementBead;
+				mheight = Math.max(mheight,buttonMeasure.measuredHeight);
+			}
+			return mheight;
+		}
+		
+		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;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
new file mode 100644
index 0000000..6ed8ccf
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
@@ -0,0 +1,54 @@
+<?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.
+
+-->
+<basic:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+                  xmlns:basic="library://ns.apache.org/flexjs/basic" 
+                  xmlns:mx="library://ns.adobe.com/flex/mx"
+                  implements="org.apache.flex.core.ILayoutParent">
+    <fx:Script>
+        <![CDATA[
+            import org.apache.flex.html.TitleBar;
+            import org.apache.flex.core.ITitleBarModel;
+            import org.apache.flex.core.UIBase;
+            import org.apache.flex.events.Event;
+            
+            private function clickHandler():void
+            {
+                var newEvent:org.apache.flex.events.Event = new org.apache.flex.events.Event('close',true);
+                UIBase(_strand).dispatchEvent(newEvent)   
+            }
+        ]]>
+    </fx:Script>
+    <basic:beads>
+        <basic:MXMLBeadViewBaseDataBinding />
+        <basic:LayoutChangeNotifier watchedProperty="{ITitleBarModel(model).title}" />
+        <basic:SolidBackgroundBead />
+    </basic:beads>
+
+    <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" 
+                                 html="{ITitleBarModel(model).htmlTitle}" >
+        <basic:style>
+            <basic:SimpleCSSStyles fontWeight="inherit" />
+        </basic:style>
+    </basic:Label>
+    <basic:CloseButton id="closeButton" click="clickHandler()"
+                       visible="{ITitleBarModel(model).showCloseButton}";
+/>
+    
+</basic:MXMLBeadViewBase>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/build.xml b/frameworks/as/projects/FlexJSUI/build.xml
index 056ccd0..6a911c9 100644
--- a/frameworks/as/projects/FlexJSUI/build.xml
+++ b/frameworks/as/projects/FlexJSUI/build.xml
@@ -71,10 +71,6 @@
                output="${FLEXJS_HOME}/frameworks/as/libs/FlexJSUI.swc">
             <jvmarg line="${compc.jvm.args}"/>
             <load-config filename="compile-config.xml" />
-            <arg value="-compiler.mxml.children-as-data" />
-            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-type=valueChange" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
         </compc>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/compile-config.xml b/frameworks/as/projects/FlexJSUI/compile-config.xml
index 0825a35..7da5476 100644
--- a/frameworks/as/projects/FlexJSUI/compile-config.xml
+++ b/frameworks/as/projects/FlexJSUI/compile-config.xml
@@ -32,6 +32,14 @@
 		<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/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 85f1f5f..51b0839 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -79,8 +79,6 @@ internal class FlexJSUIClasses
     import org.apache.flex.html.beads.TextFieldView; TextFieldView;
     import org.apache.flex.html.beads.TextInputView; TextInputView;
     import org.apache.flex.html.beads.TextInputWithBorderView; TextInputWithBorderView;
-    import org.apache.flex.html.beads.TitleBarMeasurementBead; TitleBarMeasurementBead;
-	import org.apache.flex.html.beads.TitleBarView; TitleBarView;
     import org.apache.flex.html.beads.models.AlertModel; AlertModel;
     import org.apache.flex.html.beads.models.ArraySelectionModel; ArraySelectionModel;
     import org.apache.flex.html.beads.models.ComboBoxModel; ComboBoxModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
deleted file mode 100644
index 8195f70..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
+++ /dev/null
@@ -1,108 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads
-{
-	import org.apache.flex.core.IMeasurementBead;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.html.TitleBar;
-	
-	/**
-	 *  The TitleBarMeasurementBead class measures the overall size of a 
-	 *  org.apache.flex.html.TitleBar.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class TitleBarMeasurementBead implements IMeasurementBead
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function TitleBarMeasurementBead()
-		{
-		}
-		
-		/**
-		 *  The overall width of the org.apache.flex.html.TitleBar.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function get measuredWidth():Number
-		{
-			var mwidth:Number = 0;
-			var titleBar:TitleBar = _strand as TitleBar;
-			var titleView:TitleBarView = _strand.getBeadByType(TitleBarView) as TitleBarView;
-			var labelMeasure:IMeasurementBead = titleView.titleLabel.measurementBead;
-			mwidth = labelMeasure.measuredWidth;
-			if( titleBar.showCloseButton ) {
-				var buttonMeasure:IMeasurementBead = titleView.closeButton.measurementBead;
-				mwidth += buttonMeasure.measuredWidth;
-			}
-			return mwidth;
-		}
-		
-		/**
-		 *  The overall height of the org.apache.flex.html.TitleBar.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function get measuredHeight():Number
-		{
-			var mheight:Number = 0;
-			var titleBar:TitleBar = _strand as TitleBar;
-			var titleView:TitleBarView = _strand.getBeadByType(TitleBarView) as TitleBarView;
-			var labelMeasure:IMeasurementBead = titleView.titleLabel.measurementBead;
-			mheight = labelMeasure.measuredHeight;
-			if( titleBar.showCloseButton ) {
-				var buttonMeasure:IMeasurementBead = titleView.closeButton.measurementBead;
-				mheight = Math.max(mheight,buttonMeasure.measuredHeight);
-			}
-			return mheight;
-		}
-		
-		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;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
deleted file mode 100644
index 6ed8ccf..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?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.
-
--->
-<basic:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
-                  xmlns:basic="library://ns.apache.org/flexjs/basic" 
-                  xmlns:mx="library://ns.adobe.com/flex/mx"
-                  implements="org.apache.flex.core.ILayoutParent">
-    <fx:Script>
-        <![CDATA[
-            import org.apache.flex.html.TitleBar;
-            import org.apache.flex.core.ITitleBarModel;
-            import org.apache.flex.core.UIBase;
-            import org.apache.flex.events.Event;
-            
-            private function clickHandler():void
-            {
-                var newEvent:org.apache.flex.events.Event = new org.apache.flex.events.Event('close',true);
-                UIBase(_strand).dispatchEvent(newEvent)   
-            }
-        ]]>
-    </fx:Script>
-    <basic:beads>
-        <basic:MXMLBeadViewBaseDataBinding />
-        <basic:LayoutChangeNotifier watchedProperty="{ITitleBarModel(model).title}" />
-        <basic:SolidBackgroundBead />
-    </basic:beads>
-
-    <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" 
-                                 html="{ITitleBarModel(model).htmlTitle}" >
-        <basic:style>
-            <basic:SimpleCSSStyles fontWeight="inherit" />
-        </basic:style>
-    </basic:Label>
-    <basic:CloseButton id="closeButton" click="clickHandler()"
-                       visible="{ITitleBarModel(model).showCloseButton}";
-/>
-    
-</basic:MXMLBeadViewBase>


[39/50] git commit: [flex-asjs] [refs/heads/develop] - don't bind both html and text for now

Posted by ah...@apache.org.
don't bind both html and text for now


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

Branch: refs/heads/develop
Commit: 434ab8c731d86dd780cf704b17ef510acce3d8c8
Parents: a3ae11b
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 14:35:55 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:32 2014 -0700

----------------------------------------------------------------------
 .../FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/434ab8c7/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
index 28a29eb..d3abd05 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
@@ -40,8 +40,7 @@ limitations under the License.
         <basic:LayoutChangeNotifier watchedProperty="{ITitleBarModel(model).title}" />
     </basic:beads>
 
-    <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" 
-                                 html="{ITitleBarModel(model).htmlTitle}" >
+    <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" >
         <basic:style>
             <basic:SimpleCSSStyles fontWeight="inherit" />
         </basic:style>


[15/50] git commit: [flex-asjs] [refs/heads/develop] - change TitleBar to use beads. It won't work until I fix other things, but it is a start

Posted by ah...@apache.org.
change TitleBar to use beads.  It won't work until I fix other things, but it is a start


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

Branch: refs/heads/develop
Commit: 727195d3dd799a61f99b0eac30f88b876170652b
Parents: a99dfd4
Author: Alex Harui <ah...@apache.org>
Authored: Wed Sep 17 15:00:49 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:47 2014 -0700

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/defaults.css    | 18 +++----
 .../FlexJS/src/org/apache/flex/html/TitleBar.js | 50 --------------------
 2 files changed, 9 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/727195d3/frameworks/as/projects/FlexJSUI/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css
index 886f1c0..a723ceb 100644
--- a/frameworks/as/projects/FlexJSUI/defaults.css
+++ b/frameworks/as/projects/FlexJSUI/defaults.css
@@ -124,6 +124,15 @@ StringItemRenderer
     height: 16;
 }
 
+TitleBar
+{
+    IBeadModel: ClassReference("org.apache.flex.html.beads.models.TitleBarModel");
+    IBeadView: ClassReference("org.apache.flex.html.beads.TitleBarView");
+    IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout");
+    iMeasurementBead: ClassReference("org.apache.flex.html.beads.TitleBarMeasurementBead");
+    background-color: #FFFFFF;
+}
+
 /* Global Style Declaration */
 global
 {
@@ -370,15 +379,6 @@ TextInput
 	height: 20;
 }
 
-TitleBar
-{
-    IBeadModel: ClassReference("org.apache.flex.html.beads.models.TitleBarModel");
-    IBeadView: ClassReference("org.apache.flex.html.beads.TitleBarView");
-    IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout");
-    iMeasurementBead: ClassReference("org.apache.flex.html.beads.TitleBarMeasurementBead");
-    background-color: #FFFFFF;
-}
-
 ToggleTextButton
 {
     IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/727195d3/frameworks/js/FlexJS/src/org/apache/flex/html/TitleBar.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/TitleBar.js b/frameworks/js/FlexJS/src/org/apache/flex/html/TitleBar.js
index 16e60f6..0f4a405 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/TitleBar.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/TitleBar.js
@@ -27,9 +27,6 @@ goog.require('org.apache.flex.html.beads.models.TitleBarModel');
  */
 org.apache.flex.html.TitleBar = function() {
 
-  this.model =
-      new org.apache.flex.html.beads.models.TitleBarModel();
-
   org.apache.flex.html.TitleBar.base(this, 'constructor');
 };
 goog.inherits(org.apache.flex.html.TitleBar,
@@ -54,63 +51,16 @@ org.apache.flex.html.TitleBar.prototype.createElement =
 
   this.element = document.createElement('div');
 
-  this.titleLabel = new org.apache.flex.html.Label();
-  this.addElement(this.titleLabel);
-  this.titleLabel.element.id = 'title';
-  this.titleLabel.positioner.style.display = 'inline-block';
-  this.titleLabel.set_className('TitleBarLabel');
-
-  this.titleButton = new org.apache.flex.html.TextButton();
-  this.addElement(this.titleButton);
-  this.titleButton.element.id = 'closeButton';
-  this.titleButton.text = 'Close';
-  this.titleButton.positioner.style.position = 'absolute';
-  this.titleButton.positioner.style.right = '0px';
-
   this.positioner = this.element;
   this.element.flexjs_wrapper = this;
 
   this.set_className('TitleBar');
 
-  // listen for changes to the model so items can be changed in the view
-  this.model.addEventListener('titleChange',
-      goog.bind(this.changeHandler, this));
-
   return this.element;
 };
 
 
 /**
- * @override
- */
-org.apache.flex.html.TitleBar.prototype.addedToParent =
-    function() {
-
-  this.titleLabel.set_text(this.model.get_title());
-
-  if (this.model.showCloseButton) {
-    this.titleButton.positioner.style.display = 'inline-block';
-  } else {
-    this.titleButton.positioner.style.display = 'none';
-  }
-};
-
-
-/**
- * @param {Object} event The event that triggered this handler.
- */
-org.apache.flex.html.TitleBar.prototype.changeHandler =
-    function(event) {
-  if (event.type == 'titleChange') {
-    this.titleLabel.set_text(this.model.get_title());
-  }
-  else if (event.type == 'htmlTitleChange') {
-    this.titleLabel.set_text(this.model.get_htmlTitle());
-  }
-};
-
-
-/**
  * @expose
  * @return {string} The title getter.
  */


[18/50] git commit: [flex-asjs] [refs/heads/develop] - fix components after moving them

Posted by ah...@apache.org.
fix components after moving them


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

Branch: refs/heads/develop
Commit: 072903452f3bb9740e25d3254e9eb24c8559865d
Parents: b462b00
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 18 14:07:27 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:14 2014 -0700

----------------------------------------------------------------------
 .../as/projects/FlexJSJX/basic-manifest.xml     |  6 ++++
 .../as/projects/FlexJSJX/src/FlexJSJXClasses.as |  1 +
 .../org/apache/flex/core/MXMLBeadViewBase.as    | 36 +++-----------------
 .../apache/flex/html/beads/TitleBarView.mxml    |  1 -
 .../as/projects/FlexJSUI/basic-manifest.xml     |  5 ---
 frameworks/as/projects/FlexJSUI/defaults.css    |  7 ++++
 .../as/projects/FlexJSUI/src/FlexJSUIClasses.as |  1 -
 7 files changed, 18 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/07290345/frameworks/as/projects/FlexJSJX/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/basic-manifest.xml b/frameworks/as/projects/FlexJSJX/basic-manifest.xml
index a542c14..d601d3c 100644
--- a/frameworks/as/projects/FlexJSJX/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSJX/basic-manifest.xml
@@ -62,4 +62,10 @@
     <component id="NumberFormatter" class="org.apache.flex.html.accessories.NumberFormatter"/>
     <component id="CurrencyFormatter" class="org.apache.flex.html.accessories.CurrencyFormatter"/>
 
+    <component id="SimpleCSSStyles" class="org.apache.flex.core.SimpleCSSStyles"/>
+    <component id="MXMLBeadViewBase" class="org.apache.flex.core.MXMLBeadViewBase"/>
+    <component id="MXMLBeadViewBaseDataBinding" class="org.apache.flex.core.MXMLBeadViewBaseDataBinding"/>
+    <component id="LayoutChangeNotifier" class="org.apache.flex.html.beads.layouts.LayoutChangeNotifier"/>
+    <component id="ImageButton" class="org.apache.flex.html.ImageButton"/>
+
 </componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/07290345/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
index 8b993cc..d103772 100644
--- a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
+++ b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
@@ -60,6 +60,7 @@ internal class FlexJSJXClasses
 	import org.apache.flex.html.beads.FormatableLabelView; FormatableLabelView;
 	import org.apache.flex.html.beads.FormatableTextInputView; FormatableTextInputView;
 	import org.apache.flex.html.beads.layouts.DataGridLayout; DataGridLayout;
+    import org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout; FlexibleFirstChildHorizontalLayout;
 	import org.apache.flex.html.beads.models.DataGridModel; DataGridModel;
 	import org.apache.flex.html.beads.models.DateChooserModel; DateChooserModel;
 	import org.apache.flex.html.beads.models.DataGridPresentationModel; DataGridPresentationModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/07290345/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
index 49172ae..aa8d336 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
@@ -18,15 +18,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
 	import mx.states.State;
 	
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.ValuesManager;
+    import org.apache.flex.html.beads.ContainerView;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.ValueChangeEvent;
 	import org.apache.flex.utils.MXMLDataInterpreter;
@@ -43,7 +41,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class MXMLBeadViewBase extends BeadViewBase implements IStrand, ILayoutParent
+	public class MXMLBeadViewBase extends ContainerView implements IStrand, ILayoutParent
 	{
         /**
          *  Constructor.
@@ -255,7 +253,7 @@ package org.apache.flex.core
          */
         public var beads:Array;
         
-        private var _beads:Vector.<IBead>;
+        private var _beads:Array;
         
         /**
          *  @copy org.apache.flex.core.IStrand#addBead()
@@ -268,7 +266,7 @@ package org.apache.flex.core
         public function addBead(bead:IBead):void
         {
             if (!_beads)
-                _beads = new Vector.<IBead>;
+                _beads = [];
             _beads.push(bead);
             bead.strand = this;            
         }
@@ -314,31 +312,5 @@ package org.apache.flex.core
             return null;
         }
 
-        /**
-         *  The parent of the children.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get contentView():IParentIUIBase
-        {
-            return _strand as IParentIUIBase;
-        }
-        
-        /**
-         *  The host component, which can resize to different slots.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get resizableView():IUIBase
-        {
-            return _strand as IUIBase;
-        }
-        
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/07290345/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
index 47e72c2..28a29eb 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
@@ -38,7 +38,6 @@ limitations under the License.
     <basic:beads>
         <basic:MXMLBeadViewBaseDataBinding />
         <basic:LayoutChangeNotifier watchedProperty="{ITitleBarModel(model).title}" />
-        <basic:SolidBackgroundBead />
     </basic:beads>
 
     <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/07290345/frameworks/as/projects/FlexJSUI/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/basic-manifest.xml b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
index f97d70d..01cc765 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -23,10 +23,7 @@
 
     <component id="Application" class="org.apache.flex.core.Application"/>
     <component id="SimpleValuesImpl" class="org.apache.flex.core.SimpleValuesImpl"/>
-    <component id="SimpleCSSStyles" class="org.apache.flex.core.SimpleCSSStyles"/>
     <component id="SimpleCSSValuesImpl" class="org.apache.flex.core.SimpleCSSValuesImpl"/>
-    <component id="MXMLBeadViewBase" class="org.apache.flex.core.MXMLBeadViewBase"/>
-    <component id="MXMLBeadViewBaseDataBinding" class="org.apache.flex.core.MXMLBeadViewBaseDataBinding"/>
     <component id="ViewBase" class="org.apache.flex.core.ViewBase"/>
     <component id="ConstantBinding" class="org.apache.flex.binding.ConstantBinding"/>
     <component id="SimpleBinding" class="org.apache.flex.binding.SimpleBinding"/>
@@ -36,7 +33,6 @@
     <component id="DropDownList" class="org.apache.flex.html.DropDownList"/>
     <component id="DropDownListList" class="org.apache.flex.html.supportClasses.DropDownListList"/>
     <component id="Image" class="org.apache.flex.html.Image"/>
-    <component id="ImageButton" class="org.apache.flex.html.ImageButton"/>
     <component id="Label" class="org.apache.flex.html.Label"/>
     <component id="TextButton" class="org.apache.flex.html.TextButton"/>
     <component id="ToggleTextButton" class="org.apache.flex.html.ToggleTextButton"/>
@@ -68,7 +64,6 @@
     <component id="NonVirtualVerticalScrollingLayout" class="org.apache.flex.html.beads.layouts.NonVirtualVerticalScrollingLayout"/>
     <component id="NonVirtualHorizontalScrollingLayout" class="org.apache.flex.html.beads.layouts.NonVirtualHorizontalScrollingLayout"/>
     <component id="TileLayout" class="org.apache.flex.html.beads.layouts.TileLayout"/>
-    <component id="LayoutChangeNotifier" class="org.apache.flex.html.beads.layouts.LayoutChangeNotifier"/>
     
     <component id="SimpleAlert" class="org.apache.flex.html.SimpleAlert"/>
     <component id="Alert" class="org.apache.flex.html.Alert"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/07290345/frameworks/as/projects/FlexJSUI/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css
index a723ceb..dd8bff1 100644
--- a/frameworks/as/projects/FlexJSUI/defaults.css
+++ b/frameworks/as/projects/FlexJSUI/defaults.css
@@ -379,6 +379,13 @@ TextInput
 	height: 20;
 }
 
+TitleBar
+{
+    iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
+    iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+    background-color: #FFFFFF;
+}
+
 ToggleTextButton
 {
     IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/07290345/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 51b0839..4d2f225 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -101,7 +101,6 @@ internal class FlexJSUIClasses
 	import org.apache.flex.html.beads.layouts.ButtonBarLayout; ButtonBarLayout;
     import org.apache.flex.html.beads.layouts.NonVirtualVerticalScrollingLayout; NonVirtualVerticalScrollingLayout;  
 	import org.apache.flex.html.beads.layouts.NonVirtualHorizontalScrollingLayout; NonVirtualHorizontalScrollingLayout;
-    import org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout; FlexibleFirstChildHorizontalLayout;
     import org.apache.flex.html.beads.layouts.VScrollBarLayout; VScrollBarLayout;
 	import org.apache.flex.html.beads.layouts.TileLayout; TileLayout;
     import org.apache.flex.html.beads.TextItemRendererFactoryForArrayData; TextItemRendererFactoryForArrayData;


[23/50] git commit: [flex-asjs] [refs/heads/develop] - don't assume model and view

Posted by ah...@apache.org.
don't assume model and view


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

Branch: refs/heads/develop
Commit: 7d679ef0eb6bdd541cc48b6128deacc40d6cac0b
Parents: 7dfcd3d
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:41:17 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:16 2014 -0700

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/html/Panel.js | 30 ++++++++++++++------
 1 file changed, 22 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7d679ef0/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
index 001eddc..e5b3c61 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
@@ -27,8 +27,6 @@ goog.require('org.apache.flex.html.beads.models.PanelModel');
  * @extends {org.apache.flex.html.Container}
  */
 org.apache.flex.html.Panel = function() {
-  this.model =
-      new org.apache.flex.html.beads.models.PanelModel();
   org.apache.flex.html.Panel.base(this, 'constructor');
 };
 goog.inherits(org.apache.flex.html.Panel,
@@ -123,9 +121,6 @@ org.apache.flex.html.Panel.prototype.createElement =
   this.contentArea.flexjs_wrapper = this;
   this.element.appendChild(this.contentArea);
 
-  this.panelView = new org.apache.flex.html.beads.PanelView();
-  this.panelView.set_strand(this);
-
   this.positioner = this.element;
   this.element.flexjs_wrapper = this;
 
@@ -144,10 +139,29 @@ org.apache.flex.html.Panel.prototype.addedToParent =
 
 /**
  * @expose
+ * @return {boolean} The showCloseButton getter.
+ */
+org.apache.flex.html.Panel.prototype.get_showCloseButton = function() {
+  return this.model.get_showCloseButton();
+};
+
+
+/**
+ * @expose
+ * @param {boolean} value The showCloseButton setter.
+ */
+org.apache.flex.html.Panel.prototype.set_showCloseButton =
+    function(value) {
+  this.model.set_showCloseButton(value);
+};
+
+
+/**
+ * @expose
  * @return {string} The title getter.
  */
 org.apache.flex.html.Panel.prototype.get_title = function() {
-  return this.model.get_title();
+    return this.model.get_title();
 };
 
 
@@ -156,8 +170,8 @@ org.apache.flex.html.Panel.prototype.get_title = function() {
  * @param {string} value The title setter.
  */
 org.apache.flex.html.Panel.prototype.set_title =
-    function(value) {
-  this.model.set_title(value);
+function(value) {
+    this.model.set_title(value);
 };
 
 


[50/50] git commit: [flex-asjs] [refs/heads/develop] - add platform abstraction so databinding impls can cross-compile

Posted by ah...@apache.org.
add platform abstraction so databinding impls can cross-compile


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

Branch: refs/heads/develop
Commit: 0fba10b8c4af9663128c2d29c9f53cab21281b50
Parents: 00402c8
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 25 08:36:52 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Sep 25 08:36:52 2014 -0700

----------------------------------------------------------------------
 .../flex/core/MXMLBeadViewBaseDataBinding.as    |  8 +--
 .../as/projects/FlexJSUI/src/FlexJSUIClasses.as |  3 +-
 .../src/org/apache/flex/core/DataBindingBase.as | 70 ++++++++++++++++++++
 .../src/org/apache/flex/core/DataBindingBase.js | 65 ++++++++++++++++++
 4 files changed, 141 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0fba10b8/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
index 4ba80ea..18d6f05 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
@@ -41,7 +41,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class MXMLBeadViewBaseDataBinding implements IBead
+	public class MXMLBeadViewBaseDataBinding extends DataBindingBase implements IBead
 	{
         /**
          *  Constructor.
@@ -114,7 +114,7 @@ package org.apache.flex.core
                                 sb.sourceID = binding.source[0];
                                 sb.sourcePropertyName = binding.source[1];
                                 sb.setDocument(_strand);
-                                destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
+                                destObject = getProperty(_strand, binding.destination[0]);                                
                                 destination = destObject as IStrand;
                                 if (destination)
                                     destination.addBead(sb);
@@ -139,7 +139,7 @@ package org.apache.flex.core
                                 cb.sourceID = binding.source[0];
                                 cb.sourcePropertyName = binding.source[1];
                                 cb.setDocument(_strand);
-                                destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
+                                destObject = getProperty(_strand, binding.destination[0]);                                
                                 destination = destObject as IStrand;
                                 if (destination)
                                     destination.addBead(cb);
@@ -170,7 +170,7 @@ package org.apache.flex.core
                         sb.eventName = fieldWatcher.eventNames as String;
                         sb.sourcePropertyName = binding.source;
                         sb.setDocument(_strand);
-                        destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
+                        destObject = getProperty(_strand, binding.destination[0]);                                
                         destination = destObject as IStrand;
                         if (destination)
                             destination.addBead(sb);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0fba10b8/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 4d2f225..358795e 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -126,7 +126,8 @@ internal class FlexJSUIClasses
 	import org.apache.flex.core.graphics.GraphicsContainer; GraphicsContainer;
 	import org.apache.flex.core.graphics.LinearGradient; LinearGradient;
     import org.apache.flex.core.DropType; DropType;
-    import org.apache.flex.effects.PlatformWiper; PlatformWiper;
+    import org.apache.flex.core.DataBindingBase; DataBindingBase;
+    import org.apache.flex.effects.PlatformWiper; PlatformWiper;    
     
 	import mx.core.ClassFactory; ClassFactory;
     import mx.states.AddItems; AddItems;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0fba10b8/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/DataBindingBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/DataBindingBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/DataBindingBase.as
new file mode 100644
index 0000000..5614d41
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/DataBindingBase.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+    /**
+     *  The DataBindingBase class is the base class for custom data binding
+     *  implementations that can be cross-compiled.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class DataBindingBase
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function DataBindingBase()
+		{
+		}
+		
+        /**
+         *  Get a property from an object.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        protected function getProperty(obj:Object, propName:String):*
+        {
+            return obj[propName];
+        }
+        
+        /**
+         *  Set a property on an object.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        protected function setProperty(obj:Object, propName:String, value:*):void
+        {
+            obj[propName] = value;
+        }
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0fba10b8/frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js
new file mode 100644
index 0000000..75313c3
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js
@@ -0,0 +1,65 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.core.DataBindingBase');
+
+
+
+/**
+ * @constructor
+ */
+org.apache.flex.core.DataBindingBase = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.core.DataBindingBase.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'DataBindingBase',
+                qName: 'org.apache.flex.core.DataBindingBase'}] };
+
+
+/**
+ * @expose
+ * @param {Object} obj The object.
+ * @param {string} propName The name of the property.
+ * @return {Object} value The value of the property.
+ */
+org.apache.flex.core.DataBindingBase.prototype.getProperty =
+    function(obj, propName) {
+  if (typeof obj['get_' + propName] === 'function') {
+    return obj['get_' + propName]();
+  }
+  return obj[propName];
+};
+
+
+/**
+ * @expose
+ * @param {Object} obj The object.
+ * @param {string} propName The name of the property.
+ * @param {Object} value The value of the property.
+ */
+org.apache.flex.core.DataBindingBase.prototype.setProperty =
+function(obj, propName, value) {
+  if (typeof obj['set_' + propName] === 'function') {
+    obj['set_' + propName](value);
+  } else {
+    obj[propName] = value;
+  }
+};
+


[11/50] git commit: [flex-asjs] [refs/heads/develop] - add a few more styles

Posted by ah...@apache.org.
add a few more styles


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

Branch: refs/heads/develop
Commit: 00eddfe78da3d7e08d17598bea58e6515d053060
Parents: a63ef45
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 14:59:39 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:44 2014 -0700

----------------------------------------------------------------------
 .../projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/00eddfe7/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as
index d88c819..f3add4d 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as
@@ -88,6 +88,8 @@ package org.apache.flex.core
         public var fontFamily:*;
         public var fontSize:*;
         public var color:*;
+        public var fontWeight:*;
+        public var fontStyle:*;
         public var backgroundAlpha:*;
         public var backgroundColor:*;
         public var backgroundImage:*;


[24/50] git commit: [flex-asjs] [refs/heads/develop] - fix bug in margin handling

Posted by ah...@apache.org.
fix bug in margin handling


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

Branch: refs/heads/develop
Commit: 90e73a209b29d74231c376a1961bfadc6f8f3c42
Parents: 7d679ef
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:42:24 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:17 2014 -0700

----------------------------------------------------------------------
 .../flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as  | 2 +-
 .../apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/90e73a20/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
index 2e315b1..c331d5b 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -160,7 +160,7 @@ package org.apache.flex.html.beads.layouts
 				xx -= child.width + mr + ml;
 				lastmr = mr;
 				var valign:Object = ValuesManager.valuesImpl.getValue(child, "vertical-align");
-				verticalMargins.push({ marginTop: marginTop, marginBottom: marginBottom, valign: valign });
+				verticalMargins.push({ marginTop: mt, marginBottom: mb, valign: valign });
 			}
 			for (i = 0; i < n; i++)
 			{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/90e73a20/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as
index 3d133de..1da19a8 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.as
@@ -154,7 +154,7 @@ package org.apache.flex.html.beads.layouts
 				xx = child.x + child.width;
 				lastmr = mr;
 				var valign:Object = ValuesManager.valuesImpl.getValue(child, "vertical-align");
-				verticalMargins.push({ marginTop: marginTop, marginBottom: marginBottom, valign: valign });
+				verticalMargins.push({ marginTop: mt, marginBottom: mb, valign: valign });
 			}
 			for (i = 0; i < n; i++)
 			{


[04/50] git commit: [flex-asjs] [refs/heads/develop] - get MXMLBeadViewBase up and running. Allows Views to be specified in MXML

Posted by ah...@apache.org.
get MXMLBeadViewBase up and running.  Allows Views to be specified in MXML


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

Branch: refs/heads/develop
Commit: b37956695ffeca1be3ba3b3eb4e5354d93416b95
Parents: fea0a05
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 13:37:02 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:40 2014 -0700

----------------------------------------------------------------------
 .../org/apache/flex/core/MXMLBeadViewBase.as    | 45 ++++++++++++++++----
 1 file changed, 37 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b3795669/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
index 7e3ec39..7d45d57 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
@@ -18,14 +18,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	
 	import mx.states.State;
 	
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IStrand;
-    import org.apache.flex.core.ValuesManager;
-    import org.apache.flex.events.Event;
-    import org.apache.flex.events.ValueChangeEvent;
-    import org.apache.flex.utils.MXMLDataInterpreter;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.ValueChangeEvent;
+	import org.apache.flex.utils.MXMLDataInterpreter;
 
     [DefaultProperty("mxmlContent")]
     
@@ -66,12 +69,12 @@ package org.apache.flex.core
          */
         override public function set strand(value:IStrand):void
         {
+            super.strand = value;
             // each MXML file can also have styles in fx:Style block
             ValuesManager.valuesImpl.init(this);
             
             MXMLDataInterpreter.generateMXMLProperties(this, mxmlProperties);
             
-            super.strand = value;
             dispatchEvent(new Event("strandChanged"));            
             MXMLDataInterpreter.generateMXMLInstances(this, IParent(value), MXMLDescriptor);
             
@@ -83,7 +86,7 @@ package org.apache.flex.core
          *  @private
          *  Needed for databinding expressions
          */
-        protected function get strand():IStrand
+        public function get strand():IStrand
         {
             return _strand;
         }
@@ -92,7 +95,7 @@ package org.apache.flex.core
         /**
          *  The model object.
          */
-        protected function get model():Object
+        public function get model():Object
         {
             return _strand["model"];
         }
@@ -310,5 +313,31 @@ package org.apache.flex.core
             return null;
         }
 
-   }
+        /**
+         *  The parent of the children.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get contentView():DisplayObjectContainer
+        {
+            return _strand as DisplayObjectContainer;
+        }
+        
+        /**
+         *  The host component, which can resize to different slots.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get resizableView():DisplayObject
+        {
+            return _strand as DisplayObject;
+        }
+        
+    }
 }
\ No newline at end of file


[43/50] git commit: [flex-asjs] [refs/heads/develop] - lint

Posted by ah...@apache.org.
lint


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

Branch: refs/heads/develop
Commit: b1f2396b8e560ae935d02709d1cfa576e4af2911
Parents: 1652c14
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 14:38:35 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:04:02 2014 -0700

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/html/Label.js | 4 ++--
 frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b1f2396b/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
index 3670908..97720ca 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
@@ -66,7 +66,7 @@ org.apache.flex.html.Label.prototype.set_text = function(value) {
  * @return {string} The html getter.
  */
 org.apache.flex.html.Label.prototype.get_html = function() {
-    return this.element.innerHTML;
+  return this.element.innerHTML;
 };
 
 
@@ -75,5 +75,5 @@ org.apache.flex.html.Label.prototype.get_html = function() {
  * @param {string} value The html setter.
  */
 org.apache.flex.html.Label.prototype.set_html = function(value) {
-    this.element.innerHTML = value;
+  this.element.innerHTML = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b1f2396b/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
index e5b3c61..50f1607 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
@@ -142,7 +142,7 @@ org.apache.flex.html.Panel.prototype.addedToParent =
  * @return {boolean} The showCloseButton getter.
  */
 org.apache.flex.html.Panel.prototype.get_showCloseButton = function() {
-  return this.model.get_showCloseButton();
+  return this.get_model().get_showCloseButton();
 };
 
 
@@ -152,7 +152,7 @@ org.apache.flex.html.Panel.prototype.get_showCloseButton = function() {
  */
 org.apache.flex.html.Panel.prototype.set_showCloseButton =
     function(value) {
-  this.model.set_showCloseButton(value);
+  this.get_model().set_showCloseButton(value);
 };
 
 
@@ -161,7 +161,7 @@ org.apache.flex.html.Panel.prototype.set_showCloseButton =
  * @return {string} The title getter.
  */
 org.apache.flex.html.Panel.prototype.get_title = function() {
-    return this.model.get_title();
+  return this.get_model().get_title();
 };
 
 
@@ -171,7 +171,7 @@ org.apache.flex.html.Panel.prototype.get_title = function() {
  */
 org.apache.flex.html.Panel.prototype.set_title =
 function(value) {
-    this.model.set_title(value);
+  this.get_model().set_title(value);
 };
 
 


[10/50] git commit: [flex-asjs] [refs/heads/develop] - support inline styles

Posted by ah...@apache.org.
support inline styles


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

Branch: refs/heads/develop
Commit: 0358d0bc14c1a6318854e6003fdf81cdcb2728b7
Parents: 00eddfe
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 15:00:55 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:44 2014 -0700

----------------------------------------------------------------------
 .../org/apache/flex/core/SimpleCSSValuesImpl.as | 46 ++++++++++++++++++--
 1 file changed, 43 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0358d0bc/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
index 902e5b5..95b0987 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -268,9 +268,23 @@ package org.apache.flex.core
 			var className:String;
 			var selectorName:String;
 			
-			if ("className" in thisObject)
+			if (thisObject is IStyleableObject)
 			{
-				className = thisObject.className;
+                var styleable:IStyleableObject = IStyleableObject(thisObject);
+                if (styleable.style != null)
+                {
+                    try {
+                        value = styleable.style[valueName];
+                    }
+                    catch (e:Error) {
+                        value = undefined;
+                    }
+                    if (value == "inherit")
+                        return getInheritingValue(thisObject, valueName, state, attrs);
+                    if (value !== undefined)
+                        return value;
+                }
+				className = styleable.className;
 				if (state)
 				{
 					selectorName = className + ":" + state;
@@ -278,6 +292,8 @@ package org.apache.flex.core
 					if (o)
 					{
 						value = o[valueName];
+                        if (value == "inherit")
+                            return getInheritingValue(thisObject, valueName, state, attrs);
 						if (value !== undefined)
 							return value;
 					}
@@ -287,6 +303,8 @@ package org.apache.flex.core
 				if (o)
 				{
 					value = o[valueName];
+                    if (value == "inherit")
+                        return getInheritingValue(thisObject, valueName, state, attrs);
 					if (value !== undefined)
 						return value;
 				}
@@ -303,6 +321,8 @@ package org.apache.flex.core
 					if (o)
 					{
 						value = o[valueName];
+                        if (value == "inherit")
+                            return getInheritingValue(thisObject, valueName, state, attrs);
 						if (value !== undefined)
 							return value;
 					}
@@ -312,6 +332,8 @@ package org.apache.flex.core
 	            if (o)
 	            {
 	                value = o[valueName];
+                    if (value == "inherit")
+                        return getInheritingValue(thisObject, valueName, state, attrs);
 	                if (value !== undefined)
 	                    return value;
 	            }
@@ -339,9 +361,27 @@ package org.apache.flex.core
 			{
 				return o[valueName];
 			}
-			return null;
+			return undefined;
 		}
 		
+        private function getInheritingValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
+        {
+            var value:*;
+            if (thisObject is IChild)
+            {
+                var parentObject:Object = IChild(thisObject).parent;
+                if (parentObject)
+                {
+                    value = getValue(parentObject, valueName, state, attrs);
+                    if (value == "inherit" || value === undefined)
+                        return getInheritingValue(parentObject, valueName, state, attrs);
+                    if (value !== undefined)
+                        return value;
+                }
+            }
+            return "inherit";
+        }
+        
         /**
          *  A method that stores a value to be shared with other objects.
          *  It is global, not per instance.  Fancier implementations


[26/50] git commit: [flex-asjs] [refs/heads/develop] - add new prop and fix inheritance

Posted by ah...@apache.org.
add new prop and fix inheritance


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

Branch: refs/heads/develop
Commit: 9e5c3b81a2bdfc453e2d778b9c02a012c1217303
Parents: 90e73a2
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:43:14 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:18 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/core/BeadViewBase.js      | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9e5c3b81/frameworks/js/FlexJS/src/org/apache/flex/core/BeadViewBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/BeadViewBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/BeadViewBase.js
index 6b8c131..1058c68 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/BeadViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/BeadViewBase.js
@@ -15,15 +15,21 @@
 goog.provide('org.apache.flex.core.BeadViewBase');
 
 goog.require('org.apache.flex.core.IBeadView');
+goog.require('org.apache.flex.events.EventDispatcher');
 
 
 
 /**
  * @constructor
+ * @extends {org.apache.flex.events.EventDispatcher}
  * @implements {org.apache.flex.core.IBeadView}
  */
 org.apache.flex.core.BeadViewBase = function() {
-};
+    org.apache.flex.core.BeadViewBase.base(this, 'constructor');
+  };
+goog.inherits(
+              org.apache.flex.core.BeadViewBase,
+              org.apache.flex.events.EventDispatcher);
 
 
 /**
@@ -54,3 +60,13 @@ function(value) {
     this._strand = value;
   }
 };
+
+
+/**
+ * @expose
+ * @return {Object} value The strand.
+ */
+org.apache.flex.core.BeadViewBase.prototype.get_host =
+function() {
+  return this._strand;
+};


[09/50] git commit: [flex-asjs] [refs/heads/develop] - expose host property in views

Posted by ah...@apache.org.
expose host property in views


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

Branch: refs/heads/develop
Commit: a63ef456ad192b77849d54032e7484757251f33e
Parents: f55e862
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 13:39:09 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:43 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/core/BeadViewBase.as    | 15 +++++++
 .../src/org/apache/flex/core/IBeadView.as       | 10 +++++
 .../org/apache/flex/html/beads/ContainerView.as | 41 +-------------------
 .../DataItemRendererFactoryForArrayData.as      |  2 +-
 .../src/org/apache/flex/html/beads/IListView.as | 12 +-----
 .../src/org/apache/flex/html/beads/ListView.as  | 13 +++++--
 .../org/apache/flex/html/beads/ScrollBarView.as | 14 +++++++
 .../org/apache/flex/html/beads/TextAreaView.as  | 14 +++----
 .../apache/flex/html/beads/TextFieldViewBase.as |  5 ++-
 .../org/apache/flex/html/beads/TextInputView.as | 16 ++++----
 .../flex/html/beads/TextInputWithBorderView.as  | 10 ++---
 .../ListSingleSelectionMouseController.as       |  4 +-
 12 files changed, 77 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/BeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/BeadViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/BeadViewBase.as
index f2b941e..87de127 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/BeadViewBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/BeadViewBase.as
@@ -56,6 +56,8 @@ package org.apache.flex.core
         protected var _strand:IStrand;
         
         /**
+         *  Get the strand for this bead
+         * 
          *  Override this for whatever else you need to do when
          *  being hooked to the Strand
          * 
@@ -70,6 +72,19 @@ package org.apache.flex.core
 		{
             _strand = value;
 		}
+        
+        /**
+         *  The host component. 
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get host():IUIBase
+        {
+            return _strand as IUIBase;
+        }
 		
         /**
          *  @copy org.apache.flex.core.IBeadView#viewHeight

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IBeadView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IBeadView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IBeadView.as
index 9f49c9c..1934134 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IBeadView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IBeadView.as
@@ -34,6 +34,16 @@ package org.apache.flex.core
 	public interface IBeadView extends IBead
 	{
         /**
+         *  The host component. 
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        function get host():IUIBase
+
+        /**
          *  The width of the view. 
          * 
          *  @langversion 3.0

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
index 78dd64d..755dd63 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
@@ -197,19 +197,6 @@ package org.apache.flex.html.beads
 		}
 		
         /**
-         *  The border.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get border():Border
-		{
-			return null;
-		}
-		
-        /**
          *  The host component, which can resize to different slots.
          *  
          *  @langversion 3.0
@@ -221,32 +208,6 @@ package org.apache.flex.html.beads
 		{
 			return _strand as DisplayObject;
 		}
-		
-        /**
-         *  The vertical ScrollBar, if it exists.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get vScrollBar():ScrollBar
-		{
-			return null;
-		}
-		
-        /**
-         *  The horizontal ScrollBar, if it exists.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get hScrollBar():ScrollBar
-		{
-			return null;
-		}
-		
+				
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as
index 0472e4a..b91328b 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as
@@ -78,7 +78,7 @@ package org.apache.flex.html.beads
 			dataGroup = listView.dataGroup;
 			selectionModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
 			
-			labelField = (listView.strand as List).labelField;
+			labelField = (listView.host as List).labelField;
 			
 			if (!itemRendererFactory)
 			{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/IListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/IListView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/IListView.as
index 5046399..f9159ce 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/IListView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/IListView.as
@@ -18,6 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {	
+	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.IStrand;
 
@@ -30,7 +31,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public interface IListView
+	public interface IListView extends IBeadView
 	{
 		/**
 		 *  The component which parents all of the itemRenderers for each
@@ -43,14 +44,5 @@ package org.apache.flex.html.beads
 		 */
 		function get dataGroup():IItemRendererParent;
 		
-		/**
-		 *  The host component.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		function get strand():IStrand;
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
index 0b21db8..0b98577 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
@@ -33,6 +33,7 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.IRollOverModel;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.Strand;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
@@ -148,6 +149,14 @@ package org.apache.flex.html.beads
 			return _strand as DisplayObject;
 		}
 		
+        /**
+         * @private
+         */
+        public function get host():IUIBase
+        {
+            return _strand as IUIBase;
+        }
+        
 		private var _strand:IStrand;
 		
 		/**
@@ -158,10 +167,6 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function get strand():IStrand
-		{
-			return _strand;
-		}
 		public function set strand(value:IStrand):void
 		{
 			_strand = value;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollBarView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollBarView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollBarView.as
index 00ad495..67979bd 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollBarView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ScrollBarView.as
@@ -24,6 +24,7 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IScrollBarModel;
 	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.Strand;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
@@ -61,6 +62,19 @@ package org.apache.flex.html.beads
 		private var _strand:IStrand;
 		
         /**
+         *  The host component. 
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get host():IUIBase
+        {
+            return _strand as IUIBase;
+        }
+
+        /**
          *  @copy org.apache.flex.core.IBead#strand
          *  
          *  @langversion 3.0

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as
index 3bb10fd..d73aaf7 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextAreaView.as
@@ -108,22 +108,22 @@ package org.apache.flex.html.beads
 			_border = new Border();
 			_border.model = new (ValuesManager.valuesImpl.getValue(value, "iBorderModel")) as IBeadModel;
 			_border.addBead(new (ValuesManager.valuesImpl.getValue(value, "iBorderBead")) as IBead);
-            IParent(strand).addElement(border);
+            IParent(host).addElement(border);
 			
 			var vb:ScrollBar = vScrollBar;
 			
 			// Default size
-			var ww:Number = DisplayObject(strand).width;
-			if( isNaN(ww) || ww == 0 ) DisplayObject(strand).width = 100;
-			var hh:Number = DisplayObject(strand).height;
-			if( isNaN(hh) || hh == 0 ) DisplayObject(strand).height = 42;
+			var ww:Number = DisplayObject(host).width;
+			if( isNaN(ww) || ww == 0 ) DisplayObject(host).width = 100;
+			var hh:Number = DisplayObject(host).height;
+			if( isNaN(hh) || hh == 0 ) DisplayObject(host).height = 42;
 			
 			// for input, listen for changes to the _textField and update
 			// the model
 			textField.addEventListener(Event.SCROLL, textScrollHandler);
 			
-			IEventDispatcher(strand).addEventListener("widthChanged", sizeChangedHandler);
-			IEventDispatcher(strand).addEventListener("heightChanged", sizeChangedHandler);
+			IEventDispatcher(host).addEventListener("widthChanged", sizeChangedHandler);
+			IEventDispatcher(host).addEventListener("heightChanged", sizeChangedHandler);
 			sizeChangedHandler(null);
 		}
 				

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
index 7653095..ac4fcd3 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
@@ -25,6 +25,7 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.ITextModel;
+    import org.apache.flex.core.IUIBase;
     import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
@@ -101,9 +102,9 @@ package org.apache.flex.html.beads
         /**
          *  @private
          */
-		public function get strand() : IStrand
+		public function get host() : IUIBase
 		{
-			return _strand;
+			return _strand as IUIBase;
 		}
 		
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputView.as
index c5b39c6..dcbce38 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputView.as
@@ -66,22 +66,22 @@ package org.apache.flex.html.beads
 			super.strand = value;
 			
 			// Default size
-			var ww:Number = DisplayObject(strand).width;
-			if( isNaN(ww) || ww == 0 ) DisplayObject(strand).width = 100;
-			var hh:Number = DisplayObject(strand).height;
-			if( isNaN(hh) || hh == 0 ) DisplayObject(strand).height = 18;
+			var ww:Number = DisplayObject(host).width;
+			if( isNaN(ww) || ww == 0 ) DisplayObject(host).width = 100;
+			var hh:Number = DisplayObject(host).height;
+			if( isNaN(hh) || hh == 0 ) DisplayObject(host).height = 18;
 			
-			IEventDispatcher(strand).addEventListener("widthChanged", sizeChangedHandler);
-			IEventDispatcher(strand).addEventListener("heightChanged", sizeChangedHandler);
+			IEventDispatcher(host).addEventListener("widthChanged", sizeChangedHandler);
+			IEventDispatcher(host).addEventListener("heightChanged", sizeChangedHandler);
 			sizeChangedHandler(null);
 		}
 		
 		private function sizeChangedHandler(event:Event):void
 		{
-			var ww:Number = DisplayObject(strand).width;
+			var ww:Number = DisplayObject(host).width;
 			if( !isNaN(ww) && ww > 0 ) textField.width = ww;
 			
-			var hh:Number = DisplayObject(strand).height;
+			var hh:Number = DisplayObject(host).height;
 			if( !isNaN(hh) && hh > 0 ) textField.height = hh;
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputWithBorderView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputWithBorderView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputWithBorderView.as
index d205086..9ca0aed 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputWithBorderView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextInputWithBorderView.as
@@ -60,19 +60,19 @@ package org.apache.flex.html.beads
 			_border = new Border();
 			_border.model = new (ValuesManager.valuesImpl.getValue(value, "iBorderModel")) as IBeadModel;
 			_border.addBead(new (ValuesManager.valuesImpl.getValue(value, "iBorderBead")) as IBead);
-            IParent(strand).addElement(_border);
+            IParent(host).addElement(_border);
 			
-			IEventDispatcher(strand).addEventListener("widthChanged", sizeChangedHandler);
-			IEventDispatcher(strand).addEventListener("heightChanged", sizeChangedHandler);
+			IEventDispatcher(host).addEventListener("widthChanged", sizeChangedHandler);
+			IEventDispatcher(host).addEventListener("heightChanged", sizeChangedHandler);
 			sizeChangedHandler(null);
 		}
 		
 		private function sizeChangedHandler(event:Event):void
 		{
-			var ww:Number = DisplayObject(strand).width;
+			var ww:Number = DisplayObject(host).width;
 			_border.width = ww;
 			
-			var hh:Number = DisplayObject(strand).height;
+			var hh:Number = DisplayObject(host).height;
 			_border.height = hh;
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a63ef456/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.as
index 07f769a..79e6352 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.as
@@ -111,13 +111,13 @@ package org.apache.flex.html.beads.controllers
         private function selectedHandler(event:Event):void
         {
             listModel.selectedIndex = ISelectableItemRenderer(event.target).index;
-            IEventDispatcher(listView.strand).dispatchEvent(new Event("change"));
+            listView.host.dispatchEvent(new Event("change"));
         }
 		
         private function rolloverHandler(event:Event):void
         {
             IRollOverModel(listModel).rollOverIndex = ISelectableItemRenderer(event.target).index;
-            IEventDispatcher(listView.strand).dispatchEvent(new Event("rollover"));
+            listView.host.dispatchEvent(new Event("rollover"));
         }
 	
 	}


[45/50] git commit: [flex-asjs] [refs/heads/develop] - ListView needs to be IScrollingLayoutParent

Posted by ah...@apache.org.
ListView needs to be IScrollingLayoutParent


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

Branch: refs/heads/develop
Commit: 669d04bb88fdab759dbc0e425adb81ed4666b750
Parents: ef5c740
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 25 07:59:02 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Sep 25 07:59:02 2014 -0700

----------------------------------------------------------------------
 .../FlexJSUI/src/org/apache/flex/html/beads/ListView.as        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/669d04bb/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
index 3173acb..f7e08d4 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
@@ -25,7 +25,7 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.ISelectableItemRenderer;
 	import org.apache.flex.core.IItemRendererParent;
-	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.IScrollingLayoutParent;
 	import org.apache.flex.core.IParent;
     import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IRollOverModel;
@@ -54,7 +54,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class ListView extends Strand implements IBeadView, IStrand, IListView, ILayoutParent
+	public class ListView extends Strand implements IBeadView, IStrand, IListView, IScrollingLayoutParent
 	{
 		public function ListView()
 		{
@@ -190,7 +190,7 @@ package org.apache.flex.html.beads
             if (_strand.getBeadByType(IBeadLayout) == null)
             {
                 var mapper:IBeadLayout = new (ValuesManager.valuesImpl.getValue(_strand, "iBeadLayout")) as IBeadLayout;
-				strand.addBead(mapper);
+				_strand.addBead(mapper);
             }  
 			
 			handleSizeChange(null);


[07/50] git commit: [flex-asjs] [refs/heads/develop] - new components to get TitleBar to work in MXML

Posted by ah...@apache.org.
new components to get TitleBar to work in MXML


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

Branch: refs/heads/develop
Commit: b24d57468b1d755b51dd2b2818470abfafc112d0
Parents: 1163b7b
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 13:38:10 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:41 2014 -0700

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/basic-manifest.xml     | 3 +++
 frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as | 1 +
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b24d5746/frameworks/as/projects/FlexJSUI/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/basic-manifest.xml b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
index fd4f98f..f97d70d 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -26,6 +26,7 @@
     <component id="SimpleCSSStyles" class="org.apache.flex.core.SimpleCSSStyles"/>
     <component id="SimpleCSSValuesImpl" class="org.apache.flex.core.SimpleCSSValuesImpl"/>
     <component id="MXMLBeadViewBase" class="org.apache.flex.core.MXMLBeadViewBase"/>
+    <component id="MXMLBeadViewBaseDataBinding" class="org.apache.flex.core.MXMLBeadViewBaseDataBinding"/>
     <component id="ViewBase" class="org.apache.flex.core.ViewBase"/>
     <component id="ConstantBinding" class="org.apache.flex.binding.ConstantBinding"/>
     <component id="SimpleBinding" class="org.apache.flex.binding.SimpleBinding"/>
@@ -67,6 +68,8 @@
     <component id="NonVirtualVerticalScrollingLayout" class="org.apache.flex.html.beads.layouts.NonVirtualVerticalScrollingLayout"/>
     <component id="NonVirtualHorizontalScrollingLayout" class="org.apache.flex.html.beads.layouts.NonVirtualHorizontalScrollingLayout"/>
     <component id="TileLayout" class="org.apache.flex.html.beads.layouts.TileLayout"/>
+    <component id="LayoutChangeNotifier" class="org.apache.flex.html.beads.layouts.LayoutChangeNotifier"/>
+    
     <component id="SimpleAlert" class="org.apache.flex.html.SimpleAlert"/>
     <component id="Alert" class="org.apache.flex.html.Alert"/>
     <component id="Spinner" class="org.apache.flex.html.Spinner"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b24d5746/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 6211e18..85f1f5f 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -103,6 +103,7 @@ internal class FlexJSUIClasses
 	import org.apache.flex.html.beads.layouts.ButtonBarLayout; ButtonBarLayout;
     import org.apache.flex.html.beads.layouts.NonVirtualVerticalScrollingLayout; NonVirtualVerticalScrollingLayout;  
 	import org.apache.flex.html.beads.layouts.NonVirtualHorizontalScrollingLayout; NonVirtualHorizontalScrollingLayout;
+    import org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout; FlexibleFirstChildHorizontalLayout;
     import org.apache.flex.html.beads.layouts.VScrollBarLayout; VScrollBarLayout;
 	import org.apache.flex.html.beads.layouts.TileLayout; TileLayout;
     import org.apache.flex.html.beads.TextItemRendererFactoryForArrayData; TextItemRendererFactoryForArrayData;


[19/50] git commit: [flex-asjs] [refs/heads/develop] - move components that look like they can be cross-compiled

Posted by ah...@apache.org.
move components that look like they can be cross-compiled


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

Branch: refs/heads/develop
Commit: b462b002564ad6af68bc49a0469f72e26dbb6256
Parents: af8213d
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 18 14:06:11 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:14 2014 -0700

----------------------------------------------------------------------
 .../org/apache/flex/core/MXMLBeadViewBase.as    | 344 +++++++++++++++++++
 .../flex/core/MXMLBeadViewBaseDataBinding.as    | 324 +++++++++++++++++
 .../src/org/apache/flex/core/SimpleCSSStyles.as | 100 ++++++
 .../src/org/apache/flex/html/ImageButton.as     |  59 ++++
 .../FlexibleFirstChildHorizontalLayout.as       | 178 ++++++++++
 .../html/beads/layouts/LayoutChangeNotifier.as  |  84 +++++
 .../org/apache/flex/core/MXMLBeadViewBase.as    | 344 -------------------
 .../flex/core/MXMLBeadViewBaseDataBinding.as    | 324 -----------------
 .../src/org/apache/flex/core/SimpleCSSStyles.as | 100 ------
 .../src/org/apache/flex/html/ImageButton.as     |  59 ----
 .../FlexibleFirstChildHorizontalLayout.as       | 178 ----------
 .../html/beads/layouts/LayoutChangeNotifier.as  |  84 -----
 12 files changed, 1089 insertions(+), 1089 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
new file mode 100644
index 0000000..49172ae
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
@@ -0,0 +1,344 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	
+	import mx.states.State;
+	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IParentIUIBase;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.ValueChangeEvent;
+	import org.apache.flex.utils.MXMLDataInterpreter;
+
+    [DefaultProperty("mxmlContent")]
+    
+    /**
+     *  The MXMLBeadViewBase class extends BeadViewBase
+     *  and adds support for databinding and specification
+     *  of children in MXML.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class MXMLBeadViewBase extends BeadViewBase implements IStrand, ILayoutParent
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function MXMLBeadViewBase()
+		{
+			super();
+		}
+		
+        [Bindable("strandChanged")]
+        /**
+         *  An MXMLBeadViewBase doesn't create its children until it is added to
+         *  the 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;
+            // each MXML file can also have styles in fx:Style block
+            ValuesManager.valuesImpl.init(this);
+            
+            MXMLDataInterpreter.generateMXMLProperties(this, mxmlProperties);
+            
+            dispatchEvent(new Event("strandChanged"));            
+            MXMLDataInterpreter.generateMXMLInstances(this, IParent(value), MXMLDescriptor);
+            
+            dispatchEvent(new Event("initComplete"))
+            dispatchEvent(new Event("childrenAdded"));
+        }
+        
+        /**
+         *  @private
+         *  Needed for databinding expressions
+         */
+        public function get strand():IStrand
+        {
+            return _strand;
+        }
+        
+        [Bindable("__NoChangeEvent__")]
+        /**
+         *  The model object.
+         */
+        public function get model():Object
+        {
+            return _strand["model"];
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.Application#MXMLDescriptor
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get MXMLDescriptor():Array
+        {
+            return null;
+        }
+        
+        private var mxmlProperties:Array ;
+        
+        /**
+         *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function generateMXMLAttributes(data:Array):void
+        {
+            mxmlProperties = data;
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public var mxmlContent:Array;
+        
+        private var _states:Array;
+        
+        /**
+         *  The array of view states. These should
+         *  be instances of mx.states.State.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get states():Array
+        {
+            return _states;
+        }
+        
+        /**
+         *  @private
+         */
+        public function set states(value:Array):void
+        {
+            _states = value;
+            _currentState = _states[0].name;
+            
+            try{
+                if (getBeadByType(IStatesImpl) == null)
+                    addBead(new (ValuesManager.valuesImpl.getValue(this, "iStatesImpl")) as IBead);
+            }
+            //TODO:  Need to handle this case more gracefully
+            catch(e:Error)
+            {
+                trace(e.message);
+            }
+            
+        }
+        
+        /**
+         *  <code>true</code> if the array of states
+         *  contains a state with this name.
+         * 
+         *  @param state The state namem.
+         *  @return True if state in state array
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function hasState(state:String):Boolean
+        {
+            for each (var s:State in _states)
+            {
+                if (s.name == state)
+                    return true;
+            }
+            return false;
+        }
+        
+        private var _currentState:String;
+        
+        /**
+         *  The name of the current state.
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get currentState():String
+        {
+            return _currentState;   
+        }
+        
+        /**
+         *  @private
+         */
+        public function set currentState(value:String):void
+        {
+            var event:ValueChangeEvent = new ValueChangeEvent("currentStateChanged", false, false, _currentState, value)
+            _currentState = value;
+            dispatchEvent(event);
+        }
+        
+        private var _transitions:Array;
+        
+        /**
+         *  The array of transitions.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get transitions():Array
+        {
+            return _transitions;   
+        }
+        
+        /**
+         *  @private
+         */
+        public function set transitions(value:Array):void
+        {
+            _transitions = value;   
+        }
+
+        /**
+         *  @copy org.apache.flex.core.Application#beads
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public var beads:Array;
+        
+        private var _beads:Vector.<IBead>;
+        
+        /**
+         *  @copy org.apache.flex.core.IStrand#addBead()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */        
+        public function addBead(bead:IBead):void
+        {
+            if (!_beads)
+                _beads = new Vector.<IBead>;
+            _beads.push(bead);
+            bead.strand = this;            
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IStrand#getBeadByType()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function getBeadByType(classOrInterface:Class):IBead
+        {
+            for each (var bead:IBead in _beads)
+            {
+                if (bead is classOrInterface)
+                    return bead;
+            }
+            return null;
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IStrand#removeBead()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function removeBead(value:IBead):IBead	
+        {
+            var n:int = _beads.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var bead:IBead = _beads[i];
+                if (bead == value)
+                {
+                    _beads.splice(i, 1);
+                    return bead;
+                }
+            }
+            return null;
+        }
+
+        /**
+         *  The parent of the children.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get contentView():IParentIUIBase
+        {
+            return _strand as IParentIUIBase;
+        }
+        
+        /**
+         *  The host component, which can resize to different slots.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get resizableView():IUIBase
+        {
+            return _strand as IUIBase;
+        }
+        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
new file mode 100644
index 0000000..e810a04
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
@@ -0,0 +1,324 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.binding.ConstantBinding;
+    import org.apache.flex.binding.GenericBinding;
+    import org.apache.flex.binding.PropertyWatcher;
+    import org.apache.flex.binding.SimpleBinding;
+    import org.apache.flex.binding.WatcherBase;
+    import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.events.Event;
+    import org.apache.flex.events.IEventDispatcher;
+    
+    /**
+     *  The ViewBaseDataBinding class implements databinding for
+     *  ViewBase instances.  Different classes can have
+     *  different databinding implementation that optimize for
+     *  the different lifecycles.  For example, an item renderer
+     *  databinding implementation can wait to execute databindings
+     *  until the data property is set.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class MXMLBeadViewBaseDataBinding implements IBead
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function MXMLBeadViewBaseDataBinding()
+		{
+			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
+         */
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            IEventDispatcher(_strand).addEventListener("initComplete", initCompleteHandler);
+        }    
+
+        private function initCompleteHandler(event:Event):void
+        {
+            var fieldWatcher:Object;
+            var sb:SimpleBinding;
+            if (!("_bindings" in _strand))
+                return;
+            var bindingData:Array = _strand["_bindings"];
+            var n:int = bindingData[0];
+            var bindings:Array = [];
+            var i:int;
+            var index:int = 1;
+            for (i = 0; i < n; i++)
+            {
+                var binding:Object = {};
+                binding.source = bindingData[index++];
+				binding.destFunc = bindingData[index++];
+                binding.destination = bindingData[index++];
+                bindings.push(binding);
+            }
+            var watchers:Object = decodeWatcher(bindingData.slice(index));
+            for (i = 0; i < n; i++)
+            {
+                    binding = bindings[i];
+                if (binding.source is Array)
+                {
+                    if (binding.source[0] == "model")
+                    {
+                        if (binding.source.length == 2 && binding.destination.length == 2)
+                        {
+                            var destObject:Object;
+                            var destination:IStrand;
+                            // can be simplebinding or constantbinding
+                            var modelWatcher:Object = watchers.watcherMap["model"];
+                            fieldWatcher = modelWatcher.children.watcherMap[binding.source[1]];
+                            if (fieldWatcher.eventNames is String)
+                            {
+                                sb = new SimpleBinding();
+                                sb.destinationPropertyName = binding.destination[1];
+                                sb.eventName = fieldWatcher.eventNames as String;
+                                sb.sourceID = binding.source[0];
+                                sb.sourcePropertyName = binding.source[1];
+                                sb.setDocument(_strand);
+                                destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
+                                destination = destObject as IStrand;
+                                if (destination)
+                                    destination.addBead(sb);
+                                else
+                                {
+                                    if (destObject)
+                                    {
+                                        sb.destination = destObject;
+                                        _strand.addBead(sb);
+                                    }
+                                    else
+                                    {
+                                        deferredBindings[binding.destination[0]] = sb;
+                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                                    }
+                                }
+                            }
+                            else if (fieldWatcher.eventNames == null)
+                            {
+                                var cb:ConstantBinding = new ConstantBinding();
+                                cb.destinationPropertyName = binding.destination[1];
+                                cb.sourceID = binding.source[0];
+                                cb.sourcePropertyName = binding.source[1];
+                                cb.setDocument(_strand);
+                                destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
+                                destination = destObject as IStrand;
+                                if (destination)
+                                    destination.addBead(cb);
+                                else
+                                {
+                                    if (destObject)
+                                    {
+                                        cb.destination = destObject;
+                                        _strand.addBead(sb);
+                                    }
+                                    else
+                                    {
+                                        deferredBindings[binding.destination[0]] = sb;
+                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                else if (binding.source is String)
+                {
+                    fieldWatcher = watchers.watcherMap[binding.source];
+                    if (fieldWatcher.eventNames is String)
+                    {
+                        sb = new SimpleBinding();
+                        sb.destinationPropertyName = binding.destination[1];
+                        sb.eventName = fieldWatcher.eventNames as String;
+                        sb.sourcePropertyName = binding.source;
+                        sb.setDocument(_strand);
+                        destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
+                        destination = destObject as IStrand;
+                        if (destination)
+                            destination.addBead(sb);
+                        else
+                        {
+                            if (destObject)
+                            {
+                                sb.destination = destObject;
+                                _strand.addBead(sb);
+                            }
+                            else
+                            {
+                                deferredBindings[binding.destination[0]] = sb;
+                                IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    makeGenericBinding(binding, i, watchers);
+                }
+            }
+        }
+
+        private function makeGenericBinding(binding:Object, index:int, watchers:Object):void
+        {
+            var gb:GenericBinding = new GenericBinding();
+            gb.setDocument(_strand);
+            gb.destinationData = binding.destination;
+			gb.destinationFunction = binding.destFunc;
+            gb.source = binding.source;
+            setupWatchers(gb, index, watchers.watchers, null);
+        }
+        
+        private function setupWatchers(gb:GenericBinding, index:int, watchers:Array, parentWatcher:WatcherBase):void
+        {
+            var n:int = watchers.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var watcher:Object = watchers[i];
+                if (watcher.bindings.indexOf(index) != -1)
+                {
+                    var type:String = watcher.type;
+                    switch (type)
+                    {
+                        case "property":
+                        {
+                            var pw:PropertyWatcher = new PropertyWatcher(this, 
+                                        watcher.propertyName, 
+                                        watcher.eventNames,
+                                        watcher.getterFunction);
+                            watcher.watcher = pw;
+                            if (parentWatcher)
+                                pw.parentChanged(parentWatcher.value);
+                            else
+                                pw.parentChanged(_strand);
+                            if (parentWatcher)
+                                parentWatcher.addChild(pw);
+                            if (watcher.children == null)
+                                pw.addBinding(gb);
+                            break;
+                        }
+                    }
+                    if (watcher.children)
+                    {
+                        setupWatchers(gb, index, watcher.children, watcher.watcher);
+                    }
+                }
+            }
+        }
+        
+        private function decodeWatcher(bindingData:Array):Object
+        {
+            var watcherMap:Object = {};
+            var watchers:Array = [];
+            var n:int = bindingData.length;
+            var index:int = 0;
+            var watcherData:Object;
+            while (index < n)
+            {
+                var watcherIndex:int = bindingData[index++];
+                var type:int = bindingData[index++];
+                switch (type)
+                {
+                    case 0:
+                    {
+                        watcherData = { type: "function" };
+                        watcherData.functionName = bindingData[index++];
+						watcherData.paramFunction = bindingData[index++];
+                        watcherData.eventNames = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        break;
+                    }
+                    case 1:
+					{
+						watcherData = { type: "static" };
+						watcherData.propertyName = bindingData[index++];
+						watcherData.eventNames = bindingData[index++];
+						watcherData.bindings = bindingData[index++];
+						watcherData.getterFunction = bindingData[index++];
+						watcherData.parentObj = bindingData[index++];
+						watcherMap[watcherData.propertyName] = watcherData;
+						break;
+					}
+                    case 2:
+                    {
+                        watcherData = { type: "property" };
+                        watcherData.propertyName = bindingData[index++];
+                        watcherData.eventNames = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        watcherData.getterFunction = bindingData[index++];
+                        watcherMap[watcherData.propertyName] = watcherData;
+                        break;
+                    }
+                    case 3:
+                    {
+                        watcherData = { type: "xml" };
+                        watcherData.propertyName = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        watcherMap[watcherData.propertyName] = watcherData;
+                        break;
+                    }
+                }
+                watcherData.children = bindingData[index++];
+                if (watcherData.children != null)
+                {
+                    watcherData.children = decodeWatcher(watcherData.children);
+                }
+                watcherData.index = watcherIndex;
+                watchers.push(watcherData);
+            }            
+            return { watchers: watchers, watcherMap: watcherMap };
+        }
+        
+        private var deferredBindings:Object = {};
+        private function deferredBindingsHandler(event:Event):void
+        {
+            for (var p:String in deferredBindings)
+            {
+                if (_strand[p] != null)
+                {
+                    var destination:IStrand = _strand[p] as IStrand;
+                    destination.addBead(deferredBindings[p]);
+                    delete deferredBindings[p];
+                }
+            }
+        }
+        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as
new file mode 100644
index 0000000..f3add4d
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as
@@ -0,0 +1,100 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.Event;
+	import org.apache.flex.events.EventDispatcher;
+
+    /**
+     *  The SimpleCSSStyles class contains CSS style
+     *  properties supported by SimpleCSSValuesImpl.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class SimpleCSSStyles 
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function SimpleCSSStyles()
+		{
+			super();
+		}
+		
+		
+		private var _object:IStyleableObject;
+                
+        /**
+         *  The object to which these styles apply.
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function get object():IStyleableObject
+		{
+			return _object;
+		}
+        
+        /**
+         *  @private
+         */
+		public function set object(value:IStyleableObject):void
+		{
+			if (_object != value)
+			{
+                _object = value;
+			}
+		}
+		
+        public var top:*;
+        public var bottom:*;
+        public var left:*;
+        public var right:*;
+        public var padding:*;
+		public var paddingLeft:*;
+        public var paddingRight:*;
+        public var paddingTop:*;
+        public var paddingBottom:*;
+        public var horizontalCenter:*;
+        public var verticalCenter:*;
+        public var horizontalAlign:*;
+        public var verticalAlign:*;
+        public var fontFamily:*;
+        public var fontSize:*;
+        public var color:*;
+        public var fontWeight:*;
+        public var fontStyle:*;
+        public var backgroundAlpha:*;
+        public var backgroundColor:*;
+        public var backgroundImage:*;
+        public var borderColor:*;
+        public var borderStyle:*;
+        public var borderRadius:*;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/ImageButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/ImageButton.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/ImageButton.as
new file mode 100644
index 0000000..6db46d0
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/ImageButton.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.html
+{
+    import org.apache.flex.core.SimpleCSSStyles;
+
+    /**
+     *  The CloseButton class is Button that displays an X
+     *  and is commonly used in a Panel's TitleBar.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class ImageButton extends Button
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function ImageButton()
+		{
+			super();
+		}
+        
+        public function get backgroundImage():String
+        {
+            return style.backgroundImage;
+        }
+        
+        public function set backgroundImage(url:String):void
+        {
+            if (!style)
+                style = new SimpleCSSStyles();
+            style.backgroundImage = url;
+        }
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
new file mode 100644
index 0000000..2e315b1
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -0,0 +1,178 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.layouts
+{
+	import org.apache.flex.core.IBeadLayout;
+	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IParent;
+    import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+
+    /**
+     *  The FlexibleFirstChildHorizontalLayout class is a simple layout
+     *  bead.  It takes the set of children and lays them out
+     *  horizontally in one row, separating them according to
+     *  CSS layout rules for margin and padding styles. But it
+     *  will size the first child to take up as much or little
+     *  room as possible.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class FlexibleFirstChildHorizontalLayout implements IBeadLayout
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function FlexibleFirstChildHorizontalLayout()
+		{
+		}
+		
+		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;
+            IEventDispatcher(value).addEventListener("layoutNeeded", changeHandler);
+			IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
+			IEventDispatcher(value).addEventListener("childrenAdded", changeHandler);
+			IEventDispatcher(value).addEventListener("itemsCreated", changeHandler);
+		}
+	
+		private function changeHandler(event:Event):void
+		{
+			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
+			var contentView:IParent = layoutParent.contentView;
+			
+			var n:int = contentView.numElements;
+			var marginLeft:Object;
+			var marginRight:Object;
+			var marginTop:Object;
+			var marginBottom:Object;
+			var margin:Object;
+			var maxHeight:Number = 0;
+			var verticalMargins:Array = [];
+			
+			for (var i:int = n - 1; i >= 0; i--)
+			{
+				var child:IUIBase = contentView.getElementAt(i) as IUIBase;
+				margin = ValuesManager.valuesImpl.getValue(child, "margin");
+				if (margin is Array)
+				{
+					if (margin.length == 1)
+						marginLeft = marginTop = marginRight = marginBottom = margin[0];
+					else if (margin.length <= 3)
+					{
+						marginLeft = marginRight = margin[1];
+						marginTop = marginBottom = margin[0];
+					}
+					else if (margin.length == 4)
+					{
+						marginLeft = margin[3];
+						marginBottom = margin[2];
+						marginRight = margin[1];
+						marginTop = margin[0];					
+					}
+				}
+				else if (margin == null)
+				{
+					marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
+					marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
+					marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
+					marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
+				}
+				else
+				{
+					marginLeft = marginTop = marginBottom = marginRight = margin;
+				}
+				var ml:Number;
+				var mr:Number;
+				var mt:Number;
+				var mb:Number;
+				var lastmr:Number;
+				mt = Number(marginTop);
+				if (isNaN(mt))
+					mt = 0;
+				mb = Number(marginBottom);
+				if (isNaN(mb))
+					mb = 0;
+				if (marginLeft == "auto")
+					ml = 0;
+				else
+				{
+					ml = Number(marginLeft);
+					if (isNaN(ml))
+						ml = 0;
+				}
+				if (marginRight == "auto")
+					mr = 0;
+				else
+				{
+					mr = Number(marginRight);
+					if (isNaN(mr))
+						mr = 0;
+				}
+				child.y = mt;
+				maxHeight = Math.max(maxHeight, ml + child.height + mr);
+				var xx:Number = layoutParent.resizableView.width;
+				if (i == 0)
+                {
+                    child.x = ml;
+                    child.width = xx - mr;
+                }
+				else
+                    child.x = xx - child.width - mr;
+				xx -= child.width + mr + ml;
+				lastmr = mr;
+				var valign:Object = ValuesManager.valuesImpl.getValue(child, "vertical-align");
+				verticalMargins.push({ marginTop: marginTop, marginBottom: marginBottom, valign: valign });
+			}
+			for (i = 0; i < n; i++)
+			{
+				var obj:Object = verticalMargins[0]
+				child = contentView.getElementAt(i) as IUIBase;
+				if (obj.valign == "middle")
+					child.y = maxHeight - child.height / 2;
+				else if (valign == "bottom")
+					child.y = maxHeight - child.height - obj.marginBottom;
+				else
+					child.y = obj.marginTop;
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
new file mode 100644
index 0000000..9a33910
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.layouts
+{	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	/**
+	 *  The LayoutChangeNotifier notifies layouts when a property
+     *  it is watching changes.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class LayoutChangeNotifier implements IBead
+	{
+		/**
+		 *  constructor.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function LayoutChangeNotifier()
+		{
+		}
+		
+		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 _value:* = undefined;
+        
+		/**
+		 *  The number of tiles to fit horizontally into the layout.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function set watchedProperty(value:Object):void
+		{
+			if (_value !== value)
+            {
+                _value = value;
+                IEventDispatcher(_strand).dispatchEvent(new Event("layoutNeeded"));
+            }
+		}
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
deleted file mode 100644
index 49172ae..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBase.as
+++ /dev/null
@@ -1,344 +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.core
-{
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	
-	import mx.states.State;
-	
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IParentIUIBase;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.ValueChangeEvent;
-	import org.apache.flex.utils.MXMLDataInterpreter;
-
-    [DefaultProperty("mxmlContent")]
-    
-    /**
-     *  The MXMLBeadViewBase class extends BeadViewBase
-     *  and adds support for databinding and specification
-     *  of children in MXML.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class MXMLBeadViewBase extends BeadViewBase implements IStrand, ILayoutParent
-	{
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function MXMLBeadViewBase()
-		{
-			super();
-		}
-		
-        [Bindable("strandChanged")]
-        /**
-         *  An MXMLBeadViewBase doesn't create its children until it is added to
-         *  the 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;
-            // each MXML file can also have styles in fx:Style block
-            ValuesManager.valuesImpl.init(this);
-            
-            MXMLDataInterpreter.generateMXMLProperties(this, mxmlProperties);
-            
-            dispatchEvent(new Event("strandChanged"));            
-            MXMLDataInterpreter.generateMXMLInstances(this, IParent(value), MXMLDescriptor);
-            
-            dispatchEvent(new Event("initComplete"))
-            dispatchEvent(new Event("childrenAdded"));
-        }
-        
-        /**
-         *  @private
-         *  Needed for databinding expressions
-         */
-        public function get strand():IStrand
-        {
-            return _strand;
-        }
-        
-        [Bindable("__NoChangeEvent__")]
-        /**
-         *  The model object.
-         */
-        public function get model():Object
-        {
-            return _strand["model"];
-        }
-        
-        /**
-         *  @copy org.apache.flex.core.Application#MXMLDescriptor
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get MXMLDescriptor():Array
-        {
-            return null;
-        }
-        
-        private var mxmlProperties:Array ;
-        
-        /**
-         *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function generateMXMLAttributes(data:Array):void
-        {
-            mxmlProperties = data;
-        }
-        
-        /**
-         *  @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public var mxmlContent:Array;
-        
-        private var _states:Array;
-        
-        /**
-         *  The array of view states. These should
-         *  be instances of mx.states.State.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get states():Array
-        {
-            return _states;
-        }
-        
-        /**
-         *  @private
-         */
-        public function set states(value:Array):void
-        {
-            _states = value;
-            _currentState = _states[0].name;
-            
-            try{
-                if (getBeadByType(IStatesImpl) == null)
-                    addBead(new (ValuesManager.valuesImpl.getValue(this, "iStatesImpl")) as IBead);
-            }
-            //TODO:  Need to handle this case more gracefully
-            catch(e:Error)
-            {
-                trace(e.message);
-            }
-            
-        }
-        
-        /**
-         *  <code>true</code> if the array of states
-         *  contains a state with this name.
-         * 
-         *  @param state The state namem.
-         *  @return True if state in state array
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function hasState(state:String):Boolean
-        {
-            for each (var s:State in _states)
-            {
-                if (s.name == state)
-                    return true;
-            }
-            return false;
-        }
-        
-        private var _currentState:String;
-        
-        /**
-         *  The name of the current state.
-         * 
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get currentState():String
-        {
-            return _currentState;   
-        }
-        
-        /**
-         *  @private
-         */
-        public function set currentState(value:String):void
-        {
-            var event:ValueChangeEvent = new ValueChangeEvent("currentStateChanged", false, false, _currentState, value)
-            _currentState = value;
-            dispatchEvent(event);
-        }
-        
-        private var _transitions:Array;
-        
-        /**
-         *  The array of transitions.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get transitions():Array
-        {
-            return _transitions;   
-        }
-        
-        /**
-         *  @private
-         */
-        public function set transitions(value:Array):void
-        {
-            _transitions = value;   
-        }
-
-        /**
-         *  @copy org.apache.flex.core.Application#beads
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public var beads:Array;
-        
-        private var _beads:Vector.<IBead>;
-        
-        /**
-         *  @copy org.apache.flex.core.IStrand#addBead()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */        
-        public function addBead(bead:IBead):void
-        {
-            if (!_beads)
-                _beads = new Vector.<IBead>;
-            _beads.push(bead);
-            bead.strand = this;            
-        }
-        
-        /**
-         *  @copy org.apache.flex.core.IStrand#getBeadByType()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function getBeadByType(classOrInterface:Class):IBead
-        {
-            for each (var bead:IBead in _beads)
-            {
-                if (bead is classOrInterface)
-                    return bead;
-            }
-            return null;
-        }
-        
-        /**
-         *  @copy org.apache.flex.core.IStrand#removeBead()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function removeBead(value:IBead):IBead	
-        {
-            var n:int = _beads.length;
-            for (var i:int = 0; i < n; i++)
-            {
-                var bead:IBead = _beads[i];
-                if (bead == value)
-                {
-                    _beads.splice(i, 1);
-                    return bead;
-                }
-            }
-            return null;
-        }
-
-        /**
-         *  The parent of the children.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get contentView():IParentIUIBase
-        {
-            return _strand as IParentIUIBase;
-        }
-        
-        /**
-         *  The host component, which can resize to different slots.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get resizableView():IUIBase
-        {
-            return _strand as IUIBase;
-        }
-        
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
deleted file mode 100644
index e810a04..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/MXMLBeadViewBaseDataBinding.as
+++ /dev/null
@@ -1,324 +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.core
-{
-    import org.apache.flex.binding.ConstantBinding;
-    import org.apache.flex.binding.GenericBinding;
-    import org.apache.flex.binding.PropertyWatcher;
-    import org.apache.flex.binding.SimpleBinding;
-    import org.apache.flex.binding.WatcherBase;
-    import org.apache.flex.core.IBead;
-    import org.apache.flex.core.IStrand;
-    import org.apache.flex.events.Event;
-    import org.apache.flex.events.IEventDispatcher;
-    
-    /**
-     *  The ViewBaseDataBinding class implements databinding for
-     *  ViewBase instances.  Different classes can have
-     *  different databinding implementation that optimize for
-     *  the different lifecycles.  For example, an item renderer
-     *  databinding implementation can wait to execute databindings
-     *  until the data property is set.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class MXMLBeadViewBaseDataBinding implements IBead
-	{
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function MXMLBeadViewBaseDataBinding()
-		{
-			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
-         */
-        public function set strand(value:IStrand):void
-        {
-            _strand = value;
-            IEventDispatcher(_strand).addEventListener("initComplete", initCompleteHandler);
-        }    
-
-        private function initCompleteHandler(event:Event):void
-        {
-            var fieldWatcher:Object;
-            var sb:SimpleBinding;
-            if (!("_bindings" in _strand))
-                return;
-            var bindingData:Array = _strand["_bindings"];
-            var n:int = bindingData[0];
-            var bindings:Array = [];
-            var i:int;
-            var index:int = 1;
-            for (i = 0; i < n; i++)
-            {
-                var binding:Object = {};
-                binding.source = bindingData[index++];
-				binding.destFunc = bindingData[index++];
-                binding.destination = bindingData[index++];
-                bindings.push(binding);
-            }
-            var watchers:Object = decodeWatcher(bindingData.slice(index));
-            for (i = 0; i < n; i++)
-            {
-                    binding = bindings[i];
-                if (binding.source is Array)
-                {
-                    if (binding.source[0] == "model")
-                    {
-                        if (binding.source.length == 2 && binding.destination.length == 2)
-                        {
-                            var destObject:Object;
-                            var destination:IStrand;
-                            // can be simplebinding or constantbinding
-                            var modelWatcher:Object = watchers.watcherMap["model"];
-                            fieldWatcher = modelWatcher.children.watcherMap[binding.source[1]];
-                            if (fieldWatcher.eventNames is String)
-                            {
-                                sb = new SimpleBinding();
-                                sb.destinationPropertyName = binding.destination[1];
-                                sb.eventName = fieldWatcher.eventNames as String;
-                                sb.sourceID = binding.source[0];
-                                sb.sourcePropertyName = binding.source[1];
-                                sb.setDocument(_strand);
-                                destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
-                                destination = destObject as IStrand;
-                                if (destination)
-                                    destination.addBead(sb);
-                                else
-                                {
-                                    if (destObject)
-                                    {
-                                        sb.destination = destObject;
-                                        _strand.addBead(sb);
-                                    }
-                                    else
-                                    {
-                                        deferredBindings[binding.destination[0]] = sb;
-                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
-                                    }
-                                }
-                            }
-                            else if (fieldWatcher.eventNames == null)
-                            {
-                                var cb:ConstantBinding = new ConstantBinding();
-                                cb.destinationPropertyName = binding.destination[1];
-                                cb.sourceID = binding.source[0];
-                                cb.sourcePropertyName = binding.source[1];
-                                cb.setDocument(_strand);
-                                destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
-                                destination = destObject as IStrand;
-                                if (destination)
-                                    destination.addBead(cb);
-                                else
-                                {
-                                    if (destObject)
-                                    {
-                                        cb.destination = destObject;
-                                        _strand.addBead(sb);
-                                    }
-                                    else
-                                    {
-                                        deferredBindings[binding.destination[0]] = sb;
-                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-                else if (binding.source is String)
-                {
-                    fieldWatcher = watchers.watcherMap[binding.source];
-                    if (fieldWatcher.eventNames is String)
-                    {
-                        sb = new SimpleBinding();
-                        sb.destinationPropertyName = binding.destination[1];
-                        sb.eventName = fieldWatcher.eventNames as String;
-                        sb.sourcePropertyName = binding.source;
-                        sb.setDocument(_strand);
-                        destObject = MXMLBeadViewBase(_strand)[binding.destination[0]];                                
-                        destination = destObject as IStrand;
-                        if (destination)
-                            destination.addBead(sb);
-                        else
-                        {
-                            if (destObject)
-                            {
-                                sb.destination = destObject;
-                                _strand.addBead(sb);
-                            }
-                            else
-                            {
-                                deferredBindings[binding.destination[0]] = sb;
-                                IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
-                            }
-                        }
-                    }
-                }
-                else
-                {
-                    makeGenericBinding(binding, i, watchers);
-                }
-            }
-        }
-
-        private function makeGenericBinding(binding:Object, index:int, watchers:Object):void
-        {
-            var gb:GenericBinding = new GenericBinding();
-            gb.setDocument(_strand);
-            gb.destinationData = binding.destination;
-			gb.destinationFunction = binding.destFunc;
-            gb.source = binding.source;
-            setupWatchers(gb, index, watchers.watchers, null);
-        }
-        
-        private function setupWatchers(gb:GenericBinding, index:int, watchers:Array, parentWatcher:WatcherBase):void
-        {
-            var n:int = watchers.length;
-            for (var i:int = 0; i < n; i++)
-            {
-                var watcher:Object = watchers[i];
-                if (watcher.bindings.indexOf(index) != -1)
-                {
-                    var type:String = watcher.type;
-                    switch (type)
-                    {
-                        case "property":
-                        {
-                            var pw:PropertyWatcher = new PropertyWatcher(this, 
-                                        watcher.propertyName, 
-                                        watcher.eventNames,
-                                        watcher.getterFunction);
-                            watcher.watcher = pw;
-                            if (parentWatcher)
-                                pw.parentChanged(parentWatcher.value);
-                            else
-                                pw.parentChanged(_strand);
-                            if (parentWatcher)
-                                parentWatcher.addChild(pw);
-                            if (watcher.children == null)
-                                pw.addBinding(gb);
-                            break;
-                        }
-                    }
-                    if (watcher.children)
-                    {
-                        setupWatchers(gb, index, watcher.children, watcher.watcher);
-                    }
-                }
-            }
-        }
-        
-        private function decodeWatcher(bindingData:Array):Object
-        {
-            var watcherMap:Object = {};
-            var watchers:Array = [];
-            var n:int = bindingData.length;
-            var index:int = 0;
-            var watcherData:Object;
-            while (index < n)
-            {
-                var watcherIndex:int = bindingData[index++];
-                var type:int = bindingData[index++];
-                switch (type)
-                {
-                    case 0:
-                    {
-                        watcherData = { type: "function" };
-                        watcherData.functionName = bindingData[index++];
-						watcherData.paramFunction = bindingData[index++];
-                        watcherData.eventNames = bindingData[index++];
-                        watcherData.bindings = bindingData[index++];
-                        break;
-                    }
-                    case 1:
-					{
-						watcherData = { type: "static" };
-						watcherData.propertyName = bindingData[index++];
-						watcherData.eventNames = bindingData[index++];
-						watcherData.bindings = bindingData[index++];
-						watcherData.getterFunction = bindingData[index++];
-						watcherData.parentObj = bindingData[index++];
-						watcherMap[watcherData.propertyName] = watcherData;
-						break;
-					}
-                    case 2:
-                    {
-                        watcherData = { type: "property" };
-                        watcherData.propertyName = bindingData[index++];
-                        watcherData.eventNames = bindingData[index++];
-                        watcherData.bindings = bindingData[index++];
-                        watcherData.getterFunction = bindingData[index++];
-                        watcherMap[watcherData.propertyName] = watcherData;
-                        break;
-                    }
-                    case 3:
-                    {
-                        watcherData = { type: "xml" };
-                        watcherData.propertyName = bindingData[index++];
-                        watcherData.bindings = bindingData[index++];
-                        watcherMap[watcherData.propertyName] = watcherData;
-                        break;
-                    }
-                }
-                watcherData.children = bindingData[index++];
-                if (watcherData.children != null)
-                {
-                    watcherData.children = decodeWatcher(watcherData.children);
-                }
-                watcherData.index = watcherIndex;
-                watchers.push(watcherData);
-            }            
-            return { watchers: watchers, watcherMap: watcherMap };
-        }
-        
-        private var deferredBindings:Object = {};
-        private function deferredBindingsHandler(event:Event):void
-        {
-            for (var p:String in deferredBindings)
-            {
-                if (_strand[p] != null)
-                {
-                    var destination:IStrand = _strand[p] as IStrand;
-                    destination.addBead(deferredBindings[p]);
-                    delete deferredBindings[p];
-                }
-            }
-        }
-        
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as
deleted file mode 100644
index f3add4d..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSStyles.as
+++ /dev/null
@@ -1,100 +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.core
-{
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.EventDispatcher;
-
-    /**
-     *  The SimpleCSSStyles class contains CSS style
-     *  properties supported by SimpleCSSValuesImpl.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class SimpleCSSStyles 
-	{
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function SimpleCSSStyles()
-		{
-			super();
-		}
-		
-		
-		private var _object:IStyleableObject;
-                
-        /**
-         *  The object to which these styles apply.
-         * 
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get object():IStyleableObject
-		{
-			return _object;
-		}
-        
-        /**
-         *  @private
-         */
-		public function set object(value:IStyleableObject):void
-		{
-			if (_object != value)
-			{
-                _object = value;
-			}
-		}
-		
-        public var top:*;
-        public var bottom:*;
-        public var left:*;
-        public var right:*;
-        public var padding:*;
-		public var paddingLeft:*;
-        public var paddingRight:*;
-        public var paddingTop:*;
-        public var paddingBottom:*;
-        public var horizontalCenter:*;
-        public var verticalCenter:*;
-        public var horizontalAlign:*;
-        public var verticalAlign:*;
-        public var fontFamily:*;
-        public var fontSize:*;
-        public var color:*;
-        public var fontWeight:*;
-        public var fontStyle:*;
-        public var backgroundAlpha:*;
-        public var backgroundColor:*;
-        public var backgroundImage:*;
-        public var borderColor:*;
-        public var borderStyle:*;
-        public var borderRadius:*;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/ImageButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/ImageButton.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/ImageButton.as
deleted file mode 100644
index 6db46d0..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/ImageButton.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.html
-{
-    import org.apache.flex.core.SimpleCSSStyles;
-
-    /**
-     *  The CloseButton class is Button that displays an X
-     *  and is commonly used in a Panel's TitleBar.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class ImageButton extends Button
-	{
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function ImageButton()
-		{
-			super();
-		}
-        
-        public function get backgroundImage():String
-        {
-            return style.backgroundImage;
-        }
-        
-        public function set backgroundImage(url:String):void
-        {
-            if (!style)
-                style = new SimpleCSSStyles();
-            style.backgroundImage = url;
-        }
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
deleted file mode 100644
index 2e315b1..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
+++ /dev/null
@@ -1,178 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads.layouts
-{
-	import org.apache.flex.core.IBeadLayout;
-	import org.apache.flex.core.ILayoutParent;
-	import org.apache.flex.core.IStrand;
-    import org.apache.flex.core.IParent;
-    import org.apache.flex.core.IUIBase;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.IEventDispatcher;
-
-    /**
-     *  The FlexibleFirstChildHorizontalLayout class is a simple layout
-     *  bead.  It takes the set of children and lays them out
-     *  horizontally in one row, separating them according to
-     *  CSS layout rules for margin and padding styles. But it
-     *  will size the first child to take up as much or little
-     *  room as possible.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class FlexibleFirstChildHorizontalLayout implements IBeadLayout
-	{
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function FlexibleFirstChildHorizontalLayout()
-		{
-		}
-		
-		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;
-            IEventDispatcher(value).addEventListener("layoutNeeded", changeHandler);
-			IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
-			IEventDispatcher(value).addEventListener("childrenAdded", changeHandler);
-			IEventDispatcher(value).addEventListener("itemsCreated", changeHandler);
-		}
-	
-		private function changeHandler(event:Event):void
-		{
-			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
-			var contentView:IParent = layoutParent.contentView;
-			
-			var n:int = contentView.numElements;
-			var marginLeft:Object;
-			var marginRight:Object;
-			var marginTop:Object;
-			var marginBottom:Object;
-			var margin:Object;
-			var maxHeight:Number = 0;
-			var verticalMargins:Array = [];
-			
-			for (var i:int = n - 1; i >= 0; i--)
-			{
-				var child:IUIBase = contentView.getElementAt(i) as IUIBase;
-				margin = ValuesManager.valuesImpl.getValue(child, "margin");
-				if (margin is Array)
-				{
-					if (margin.length == 1)
-						marginLeft = marginTop = marginRight = marginBottom = margin[0];
-					else if (margin.length <= 3)
-					{
-						marginLeft = marginRight = margin[1];
-						marginTop = marginBottom = margin[0];
-					}
-					else if (margin.length == 4)
-					{
-						marginLeft = margin[3];
-						marginBottom = margin[2];
-						marginRight = margin[1];
-						marginTop = margin[0];					
-					}
-				}
-				else if (margin == null)
-				{
-					marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
-					marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
-					marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
-					marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
-				}
-				else
-				{
-					marginLeft = marginTop = marginBottom = marginRight = margin;
-				}
-				var ml:Number;
-				var mr:Number;
-				var mt:Number;
-				var mb:Number;
-				var lastmr:Number;
-				mt = Number(marginTop);
-				if (isNaN(mt))
-					mt = 0;
-				mb = Number(marginBottom);
-				if (isNaN(mb))
-					mb = 0;
-				if (marginLeft == "auto")
-					ml = 0;
-				else
-				{
-					ml = Number(marginLeft);
-					if (isNaN(ml))
-						ml = 0;
-				}
-				if (marginRight == "auto")
-					mr = 0;
-				else
-				{
-					mr = Number(marginRight);
-					if (isNaN(mr))
-						mr = 0;
-				}
-				child.y = mt;
-				maxHeight = Math.max(maxHeight, ml + child.height + mr);
-				var xx:Number = layoutParent.resizableView.width;
-				if (i == 0)
-                {
-                    child.x = ml;
-                    child.width = xx - mr;
-                }
-				else
-                    child.x = xx - child.width - mr;
-				xx -= child.width + mr + ml;
-				lastmr = mr;
-				var valign:Object = ValuesManager.valuesImpl.getValue(child, "vertical-align");
-				verticalMargins.push({ marginTop: marginTop, marginBottom: marginBottom, valign: valign });
-			}
-			for (i = 0; i < n; i++)
-			{
-				var obj:Object = verticalMargins[0]
-				child = contentView.getElementAt(i) as IUIBase;
-				if (obj.valign == "middle")
-					child.y = maxHeight - child.height / 2;
-				else if (valign == "bottom")
-					child.y = maxHeight - child.height - obj.marginBottom;
-				else
-					child.y = obj.marginTop;
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b462b002/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
deleted file mode 100644
index 9a33910..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
+++ /dev/null
@@ -1,84 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads.layouts
-{	
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.IEventDispatcher;
-	
-	/**
-	 *  The LayoutChangeNotifier notifies layouts when a property
-     *  it is watching changes.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class LayoutChangeNotifier implements IBead
-	{
-		/**
-		 *  constructor.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function LayoutChangeNotifier()
-		{
-		}
-		
-		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 _value:* = undefined;
-        
-		/**
-		 *  The number of tiles to fit horizontally into the layout.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function set watchedProperty(value:Object):void
-		{
-			if (_value !== value)
-            {
-                _value = value;
-                IEventDispatcher(_strand).dispatchEvent(new Event("layoutNeeded"));
-            }
-		}
-		
-	}
-}


[49/50] git commit: [flex-asjs] [refs/heads/develop] - hack ButtonBar into compiling cleanly. Probably needs revisiting

Posted by ah...@apache.org.
hack ButtonBar into compiling cleanly.  Probably needs revisiting


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

Branch: refs/heads/develop
Commit: 00402c8a15875a7d1004fe1936be2addf685f32c
Parents: 133214f
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 25 08:36:27 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Sep 25 08:36:27 2014 -0700

----------------------------------------------------------------------
 .../flex/html/beads/layouts/ButtonBarLayout.as  | 22 +++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/00402c8a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
index 69fd35b..f871baa 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
@@ -19,14 +19,15 @@
 package org.apache.flex.html.beads.layouts
 {	
 	import org.apache.flex.core.IBeadLayout;
-	import org.apache.flex.core.IItemRenderer;
 	import org.apache.flex.core.IItemRendererClassFactory;
 	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.ISelectionModel;
+    import org.apache.flex.core.ISelectableItemRenderer;
 	import org.apache.flex.core.IStrand;
     import org.apache.flex.core.IParent;
     import org.apache.flex.core.IUIBase;
+    import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
@@ -102,19 +103,26 @@ package org.apache.flex.html.beads.layouts
 		 */
 		private function changeHandler(event:Event):void
 		{
-			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
-			var contentView:IParent = layoutParent.contentView;
-			
-			var n:int = contentView.numElements;
+            var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
+            var contentView:IParent = layoutParent.contentView;
+            
+            var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
+            var dp:Array = selectionModel.dataProvider as Array;
+            if (!dp)
+                return;
+            
+            var itemRendererFactory:IItemRendererClassFactory = _strand.getBeadByType(IItemRendererClassFactory) as IItemRendererClassFactory;
+            
+			var n:int = dp.length;
 			var xpos:Number = 0;
 			var useWidth:Number = IUIBase(_strand).width / n;
 			var useHeight:Number = IUIBase(_strand).height;
 			
 			for (var i:int = 0; i < n; i++)
 			{
-				var ir:IItemRenderer = IItemRendererParent(contentView).getItemRendererForIndex(i);
+				var ir:ISelectableItemRenderer = IItemRendererParent(contentView).getItemRendererForIndex(i) as ISelectableItemRenderer;
 				if (ir == null) {
-					ir = itemRendererFactory.createItemRenderer(contentView as IItemRendererParent) as IItemRenderer;
+					ir = itemRendererFactory.createItemRenderer(contentView as IItemRendererParent) as ISelectableItemRenderer;
 				}
 				ir.index = i;
 				ir.labelField = (_strand as List).labelField;


[42/50] git commit: [flex-asjs] [refs/heads/develop] - handle autosizing better

Posted by ah...@apache.org.
handle autosizing better


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

Branch: refs/heads/develop
Commit: 1652c1461dbfd4057832ff55fb305fe3fe7aa80f
Parents: 4f9e27c
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 14:38:24 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:04:02 2014 -0700

----------------------------------------------------------------------
 .../apache/flex/html/beads/TextFieldViewBase.as | 34 ++++++++++++++++----
 1 file changed, 27 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1652c146/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
index ac4fcd3..006f765 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
@@ -87,12 +87,13 @@ package org.apache.flex.html.beads
 		{
 			_strand = value;
 			_textModel = value.getBeadByType(ITextModel) as ITextModel;
-			IEventDispatcher(value).addEventListener("textChanged", textChangeHandler);
-			IEventDispatcher(value).addEventListener("htmlChanged", htmlChangeHandler);
-			IEventDispatcher(value).addEventListener("widthChanged", sizeChangeHandler);
-			IEventDispatcher(value).addEventListener("heightChanged", sizeChangeHandler);
+            _textModel.addEventListener("textChange", textChangeHandler);
+            _textModel.addEventListener("htmlChange", htmlChangeHandler);
+            _textModel.addEventListener("widthChanged", widthChangeHandler);
+            _textModel.addEventListener("heightChanged", heightChangeHandler);
 			DisplayObjectContainer(value).addChild(_textField);
-			sizeChangeHandler(null);
+            textField.width = DisplayObject(_strand).width;
+            textField.height = DisplayObject(_strand).height;
 			if (_textModel.text !== null)
 				text = _textModel.text;
 			if (_textModel.html !== null)
@@ -162,12 +163,31 @@ package org.apache.flex.html.beads
 			html = _textModel.html;
 		}
 		
-		private function sizeChangeHandler(event:Event):void
+        private var autoHeight:Boolean = true;
+        private var autoWidth:Boolean = true;
+        
+		private function widthChangeHandler(event:Event):void
 		{
+            textField.autoSize = "none";
+            autoWidth = false;
 			textField.width = DisplayObject(_strand).width;
-			textField.height = DisplayObject(_strand).height;
+            if (autoHeight)
+    			textField.height = textField.textHeight + 4;
+            else
+                textField.height = DisplayObject(_strand).height;
 		}
 
+        private function heightChangeHandler(event:Event):void
+        {
+            textField.autoSize = "none";
+            autoHeight = false;
+            textField.height = DisplayObject(_strand).height;
+            if (autoWidth)
+                textField.width = textField.textWidth + 4;
+            else
+                textField.width = DisplayObject(_strand).width;
+        }
+        
         /**
          *  @copy org.apache.flex.core.IBeadView#viewHeight
          *  


[13/50] git commit: [flex-asjs] [refs/heads/develop] - use 'inherit' for fontWeight

Posted by ah...@apache.org.
use 'inherit' for fontWeight


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

Branch: refs/heads/develop
Commit: 5b6365c7915cb5299abacbfa9e15db31aacdaf21
Parents: 0358d0b
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 15:01:22 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:45 2014 -0700

----------------------------------------------------------------------
 .../FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5b6365c7/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
index bd1cc39..6ed8ccf 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
@@ -42,7 +42,11 @@ limitations under the License.
     </basic:beads>
 
     <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" 
-                                 html="{ITitleBarModel(model).htmlTitle}" />
+                                 html="{ITitleBarModel(model).htmlTitle}" >
+        <basic:style>
+            <basic:SimpleCSSStyles fontWeight="inherit" />
+        </basic:style>
+    </basic:Label>
     <basic:CloseButton id="closeButton" click="clickHandler()"
                        visible="{ITitleBarModel(model).showCloseButton}";
 />


[32/50] git commit: [flex-asjs] [refs/heads/develop] - add missing interfaces

Posted by ah...@apache.org.
add missing interfaces


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

Branch: refs/heads/develop
Commit: e5756a096f81e051ebaf3670307431fcc9e00170
Parents: c0f8b45
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:50:11 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:23 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/core/IParentIUIBase.js  | 46 ++++++++++++++++++++
 .../org/apache/flex/core/IStyleableObject.js    | 46 ++++++++++++++++++++
 2 files changed, 92 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e5756a09/frameworks/js/FlexJS/src/org/apache/flex/core/IParentIUIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/IParentIUIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/IParentIUIBase.js
new file mode 100644
index 0000000..1958f94
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/IParentIUIBase.js
@@ -0,0 +1,46 @@
+/**
+ * Licensed 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.
+ */
+
+/**
+ * org.apache.flex.core.IParentIUIBase
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes}
+ */
+
+goog.provide('org.apache.flex.core.IParentIUIBase');
+
+goog.require('org.apache.flex.core.IParent');
+goog.require('org.apache.flex.core.IUIBase');
+
+
+
+/**
+ * @interface
+ */
+org.apache.flex.core.IParentIUIBase = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.core.IParentIUIBase.prototype.FLEXJS_CLASS_INFO = {
+  names: [{ name: 'IParentIUIBase', qName: 'org.apache.flex.core.IParentIUIBase'}],
+  interfaces: [org.apache.flex.core.IParent,
+             org.apache.flex.core.IUIBase]
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e5756a09/frameworks/js/FlexJS/src/org/apache/flex/core/IStyleableObject.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/IStyleableObject.js b/frameworks/js/FlexJS/src/org/apache/flex/core/IStyleableObject.js
new file mode 100644
index 0000000..eaaf5b4
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/IStyleableObject.js
@@ -0,0 +1,46 @@
+/**
+ * Licensed 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.
+ */
+
+/**
+ * org.apache.flex.core.IStyleableObject
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes}
+ */
+
+goog.provide('org.apache.flex.core.IStyleableObject');
+
+goog.require('org.apache.flex.events.IEventDispatcher');
+
+
+
+/**
+ * @interface
+ * @extends {org.apache.flex.events.IEventDispatcher}
+ */
+org.apache.flex.core.IStyleableObject = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.core.IStyleableObject.prototype.FLEXJS_CLASS_INFO = {
+  names: [{ name: 'IStyleableObject',
+    qName: 'org.apache.flex.core.IStyleableObject'}],
+  interfaces: [org.apache.flex.events.IEventDispatcher]
+};


[48/50] git commit: [flex-asjs] [refs/heads/develop] - restore old way of making renderers for now

Posted by ah...@apache.org.
restore old way of making renderers for now


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

Branch: refs/heads/develop
Commit: 133214fa3b97d752a1f02d1c617acbda4d460e33
Parents: d875567
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 25 08:01:16 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Sep 25 08:01:16 2014 -0700

----------------------------------------------------------------------
 .../FlexJSUI/src/org/apache/flex/html/List.as   | 10 +++++-----
 .../NonVirtualVerticalScrollingLayout.as        | 21 +-------------------
 2 files changed, 6 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/133214fa/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/List.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/List.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/List.as
index a690b9b..029747e 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/List.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/List.as
@@ -177,11 +177,11 @@ package org.apache.flex.html
 		{
             super.addedToParent();
             
-//            if (getBeadByType(IDataProviderItemRendererMapper) == null)
-//            {
-//                var mapper:IDataProviderItemRendererMapper = new (ValuesManager.valuesImpl.getValue(this, "iDataProviderItemRendererMapper")) as IDataProviderItemRendererMapper;
-//                addBead(mapper);
-//            }
+            if (getBeadByType(IDataProviderItemRendererMapper) == null)
+            {
+                var mapper:IDataProviderItemRendererMapper = new (ValuesManager.valuesImpl.getValue(this, "iDataProviderItemRendererMapper")) as IDataProviderItemRendererMapper;
+                addBead(mapper);
+            }
 			var itemRendererFactory:IItemRendererClassFactory = getBeadByType(IItemRendererClassFactory) as IItemRendererClassFactory;
 			if (!itemRendererFactory)
 			{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/133214fa/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as
index 21ccbf2..a6bca76 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.as
@@ -23,32 +23,14 @@ package org.apache.flex.html.beads.layouts
 	
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IBorderModel;
-<<<<<<< HEAD
 	import org.apache.flex.core.IContentView;
-	import org.apache.flex.core.IItemRenderer;
-	import org.apache.flex.core.IItemRendererClassFactory;
-	import org.apache.flex.core.IItemRendererParent;
-	import org.apache.flex.core.ILayoutParent;
-||||||| merged common ancestors
-	import org.apache.flex.core.ILayoutParent;
-=======
 	import org.apache.flex.core.IScrollingLayoutParent;
     import org.apache.flex.core.ILayoutParent;
-<<<<<<< HEAD
->>>>>>> refactor ILayoutParent into IScrollingLayoutParent
-||||||| merged common ancestors
-=======
     import org.apache.flex.core.IParentIUIBase;
->>>>>>> get rid of DisplayObject and DisplayObjectContainer dependencies in ILayoutParent
 	import org.apache.flex.core.IScrollBarModel;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
-<<<<<<< HEAD
-	import org.apache.flex.core.UIBase;
-||||||| merged common ancestors
-=======
     import org.apache.flex.core.IUIBase;
->>>>>>> get rid of DisplayObject and DisplayObjectContainer dependencies in ILayoutParent
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.html.List;
@@ -105,10 +87,9 @@ package org.apache.flex.html.beads.layouts
 		
 		private function changeHandler(event:Event):void
 		{            
-<<<<<<< HEAD
             var layoutParent:IScrollingLayoutParent = 
                 _strand.getBeadByType(IScrollingLayoutParent) as IScrollingLayoutParent;
-            var contentView:IContentView = layoutParent.contentView as IContentView;
+            var contentView:IParentIUIBase = layoutParent.contentView as IParentIUIBase;
 			var border:Border = layoutParent.border;
 			var borderModel:IBorderModel = border.model as IBorderModel;
 			


[22/50] git commit: [flex-asjs] [refs/heads/develop] - models must implement IBeadModel

Posted by ah...@apache.org.
models must implement IBeadModel


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

Branch: refs/heads/develop
Commit: 45d6b4f1045bbdd3b3cf177c038b55ced6fa7e2e
Parents: 3bb202d
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 09:40:23 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:16 2014 -0700

----------------------------------------------------------------------
 .../FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js | 3 ++-
 .../src/org/apache/flex/html/beads/models/TitleBarModel.js     | 6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/45d6b4f1/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js
index 34cc112..8dc4319 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js
@@ -52,7 +52,8 @@ goog.inherits(org.apache.flex.html.beads.models.PanelModel,
  */
 org.apache.flex.html.beads.models.PanelModel.prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'PanelModel',
-                qName: 'org.apache.flex.html.beads.models.PanelModel'}] };
+                qName: 'org.apache.flex.html.beads.models.PanelModel'}],
+      interfaces: [org.apache.flex.core.IBeadModel] };
 
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/45d6b4f1/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js
index e982446..5cfdc7b 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js
@@ -14,6 +14,7 @@
 
 goog.provide('org.apache.flex.html.beads.models.TitleBarModel');
 
+goog.require('org.apache.flex.core.IBeadModel');
 goog.require('org.apache.flex.events.EventDispatcher');
 
 
@@ -21,6 +22,7 @@ goog.require('org.apache.flex.events.EventDispatcher');
 /**
  * @constructor
  * @extends {org.apache.flex.events.EventDispatcher}
+ * @implements {org.apache.flex.core.IBeadModel}
  */
 org.apache.flex.html.beads.models.TitleBarModel = function() {
   org.apache.flex.html.beads.models.TitleBarModel.base(this, 'constructor');
@@ -52,7 +54,9 @@ goog.inherits(org.apache.flex.html.beads.models.TitleBarModel,
  */
 org.apache.flex.html.beads.models.TitleBarModel.prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'RangeModel',
-                qName: 'org.apache.flex.html.beads.models.TitleBarModel'}] };
+                qName: 'org.apache.flex.html.beads.models.TitleBarModel'}],
+      interfaces: [org.apache.flex.core.IBeadModel]
+    };
 
 
 /**


[03/50] git commit: [flex-asjs] [refs/heads/develop] - allow as bead of view as well as component

Posted by ah...@apache.org.
allow as bead of view as well as component


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

Branch: refs/heads/develop
Commit: 61191face972cd9876a78209b2b865afd95304ef
Parents: 12904aa
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 13:33:56 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:39 2014 -0700

----------------------------------------------------------------------
 .../flex/html/beads/SolidBackgroundBead.as      | 24 +++++++++++++-------
 1 file changed, 16 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/61191fac/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SolidBackgroundBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SolidBackgroundBead.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SolidBackgroundBead.as
index 605664f..255b4e3 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SolidBackgroundBead.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SolidBackgroundBead.as
@@ -18,11 +18,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
+    import flash.display.Sprite;
 	import flash.display.Graphics;
 	
 	import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.UIBase;
+	import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
@@ -52,6 +54,8 @@ package org.apache.flex.html.beads
 				
 		private var _strand:IStrand;
 		
+        private var host:IUIBase;
+        
         /**
          *  @copy org.apache.flex.core.IBead#strand
          *  
@@ -63,15 +67,20 @@ package org.apache.flex.html.beads
 		public function set strand(value:IStrand):void
 		{
 			_strand = value;
-            IEventDispatcher(value).addEventListener("heightChanged", changeHandler);
-            IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
+            if (value is IUIBase)
+                host = IUIBase(value);
+            else if (value is IBeadView)
+                host = IUIBase(IBeadView(value).host);
+            
+            IEventDispatcher(host).addEventListener("heightChanged", changeHandler);
+            IEventDispatcher(host).addEventListener("widthChanged", changeHandler);
 			
-			var bgColor:Object = ValuesManager.valuesImpl.getValue(value, "background-color");
+			var bgColor:Object = ValuesManager.valuesImpl.getValue(host, "background-color");
 			if( bgColor != null ) {
-				backgroundColor = uint(bgColor);
+				backgroundColor = ValuesManager.valuesImpl.convertColor(bgColor);
 			}
 			
-			var bgAlpha:Object = ValuesManager.valuesImpl.getValue(value, "opacity");
+			var bgAlpha:Object = ValuesManager.valuesImpl.getValue(host, "opacity");
 			if( bgAlpha != null ) {
 				opacity = Number(bgAlpha);
 			}
@@ -129,8 +138,7 @@ package org.apache.flex.html.beads
 		
 		private function changeHandler(event:Event):void
 		{
-            var host:UIBase = UIBase(_strand);
-            var g:Graphics = host.graphics;
+            var g:Graphics = Sprite(host).graphics;
             var w:Number = host.width;
             var h:Number = host.height;
 			


[38/50] git commit: [flex-asjs] [refs/heads/develop] - handle text-align

Posted by ah...@apache.org.
handle text-align


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

Branch: refs/heads/develop
Commit: d53ed7d95954436dec47d2532c2f5161a9a4a78a
Parents: e4d65e2
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 14:35:11 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:31 2014 -0700

----------------------------------------------------------------------
 .../FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d53ed7d9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
index 95b0987..103e732 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -482,7 +482,8 @@ package org.apache.flex.core
             "color" : 1,
             "fontFamily" : 1,
             "fontSize" : 1,
-            "fontStyle" : 1
+            "fontStyle" : 1,
+            "textAlign" : 1
         }
                                                         
 	}


[08/50] git commit: [flex-asjs] [refs/heads/develop] - titlebar in MXML

Posted by ah...@apache.org.
titlebar in MXML


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

Branch: refs/heads/develop
Commit: 1163b7b3fe17f6d35b1c8198ea9e7ca2b261a03e
Parents: b379566
Author: Alex Harui <ah...@apache.org>
Authored: Mon Sep 15 13:37:38 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:41 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/html/beads/TitleBarView.mxml        | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1163b7b3/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
index a144d6b..bd1cc39 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
@@ -20,7 +20,7 @@ limitations under the License.
 <basic:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:basic="library://ns.apache.org/flexjs/basic" 
                   xmlns:mx="library://ns.adobe.com/flex/mx"
-                  >
+                  implements="org.apache.flex.core.ILayoutParent">
     <fx:Script>
         <![CDATA[
             import org.apache.flex.html.TitleBar;
@@ -35,7 +35,12 @@ limitations under the License.
             }
         ]]>
     </fx:Script>
-    
+    <basic:beads>
+        <basic:MXMLBeadViewBaseDataBinding />
+        <basic:LayoutChangeNotifier watchedProperty="{ITitleBarModel(model).title}" />
+        <basic:SolidBackgroundBead />
+    </basic:beads>
+
     <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" 
                                  html="{ITitleBarModel(model).htmlTitle}" />
     <basic:CloseButton id="closeButton" click="clickHandler()"


[41/50] git commit: [flex-asjs] [refs/heads/develop] - handle padding

Posted by ah...@apache.org.
handle padding


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

Branch: refs/heads/develop
Commit: 4f9e27ccf3882edb8abfb752f207ef5d8a5071c5
Parents: 434ab8c
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 23 14:36:20 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 15:01:33 2014 -0700

----------------------------------------------------------------------
 .../FlexibleFirstChildHorizontalLayout.as       | 65 +++++++++++++++++++-
 1 file changed, 62 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4f9e27cc/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
index c331d5b..6003f43 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -88,7 +88,11 @@ package org.apache.flex.html.beads.layouts
 			var maxHeight:Number = 0;
 			var verticalMargins:Array = [];
 			
-			for (var i:int = n - 1; i >= 0; i--)
+            var xx:Number = layoutParent.resizableView.width;
+            var padding:Object = determinePadding();
+            xx -= padding.paddingLeft + padding.paddingRight;
+            
+            for (var i:int = n - 1; i >= 0; i--)
 			{
 				var child:IUIBase = contentView.getElementAt(i) as IUIBase;
 				margin = ValuesManager.valuesImpl.getValue(child, "margin");
@@ -149,7 +153,6 @@ package org.apache.flex.html.beads.layouts
 				}
 				child.y = mt;
 				maxHeight = Math.max(maxHeight, ml + child.height + mr);
-				var xx:Number = layoutParent.resizableView.width;
 				if (i == 0)
                 {
                     child.x = ml;
@@ -173,6 +176,62 @@ package org.apache.flex.html.beads.layouts
 				else
 					child.y = obj.marginTop;
 			}
+            layoutParent.resizableView.height = maxHeight;
 		}
-	}
+
+        // TODO (aharui): utility class or base class
+        /**
+         *  Determines the top and left padding values, if any, as set by
+         *  padding style values. This includes "padding" for all padding values
+         *  as well as "padding-left" and "padding-top".
+         * 
+         *  Returns an object with paddingLeft and paddingTop properties.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        protected function determinePadding():Object
+        {
+            var paddingLeft:Object;
+            var paddingTop:Object;
+            var paddingRight:Object;
+            var padding:Object = ValuesManager.valuesImpl.getValue(_strand, "padding");
+            if (typeof(padding) == "Array")
+            {
+                if (padding.length == 1)
+                    paddingLeft = paddingTop = paddingRight = padding[0];
+                else if (padding.length <= 3)
+                {
+                    paddingLeft = padding[1];
+                    paddingTop = padding[0];
+                    paddingRight = padding[1];
+                }
+                else if (padding.length == 4)
+                {
+                    paddingLeft = padding[3];
+                    paddingTop = padding[0];					
+                    paddingRight = padding[1];
+                }
+            }
+            else if (padding == null)
+            {
+                paddingLeft = ValuesManager.valuesImpl.getValue(_strand, "padding-left");
+                paddingTop = ValuesManager.valuesImpl.getValue(_strand, "padding-top");
+                paddingRight = ValuesManager.valuesImpl.getValue(_strand, "padding-right");
+            }
+            else
+            {
+                paddingLeft = paddingTop = paddingRight = padding;
+            }
+            var pl:Number = Number(paddingLeft);
+            var pt:Number = Number(paddingTop);
+            var pr:Number = Number(paddingRight);
+            
+            return {paddingLeft:pl, paddingTop:pt, paddingRight:pr};
+        }
+
+    }
+        
 }