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/10/30 01:51:30 UTC

[1/6] git commit: [flex-asjs] [refs/heads/develop] - try to fix align right

Repository: flex-asjs
Updated Branches:
  refs/heads/develop e2ad230bb -> f4eb38ee2


try to fix align right


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

Branch: refs/heads/develop
Commit: ec524990804ef678c93985a2915009d8726da571
Parents: e2ad230
Author: Alex Harui <ah...@apache.org>
Authored: Wed Oct 29 13:43:41 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Oct 29 13:43:41 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec524990/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 ab40d04..fa23ccd 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
@@ -19,6 +19,7 @@
 package org.apache.flex.core
 {
 	import flash.text.TextField;
+    import flash.text.TextFieldAutoSize;
 	import flash.text.TextFormat;
 	
 	import org.apache.flex.core.ValuesManager;
@@ -84,9 +85,15 @@ package org.apache.flex.core
 			tf.rightMargin = paddingRight;
             var align:Object = ValuesManager.valuesImpl.getValue(sp, "text-align");
             if (align == "center")
+			{
+				autoSize = TextFieldAutoSize.NONE;
                 tf.align = "center";
+			}
             else if (align == "right")
+			{
                 tf.align = "right";
+				autoSize = TextFieldAutoSize.NONE;	
+			}
 
 			defaultTextFormat = tf;
 			super.text = value;


[4/6] git commit: [flex-asjs] [refs/heads/develop] - fix autosizing

Posted by ah...@apache.org.
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/22cf44dc
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/22cf44dc
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/22cf44dc

Branch: refs/heads/develop
Commit: 22cf44dc25905141a11911e80e62db8937d4e9e2
Parents: 776bfce
Author: Alex Harui <ah...@apache.org>
Authored: Wed Oct 29 16:24:05 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Oct 29 16:24:05 2014 -0700

----------------------------------------------------------------------
 .../apache/flex/html/beads/TextFieldViewBase.as | 31 ++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/22cf44dc/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 8c423df..5ef80a9 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
@@ -23,6 +23,7 @@ package org.apache.flex.html.beads
 	
 	import org.apache.flex.core.CSSTextField;
 	import org.apache.flex.core.IBeadView;
+    import org.apache.flex.core.ILayoutChild;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.ITextModel;
 	import org.apache.flex.core.IUIBase;
@@ -92,11 +93,18 @@ package org.apache.flex.html.beads
             _textModel.addEventListener("htmlChange", htmlChangeHandler);
             IEventDispatcher(_strand).addEventListener("widthChanged", widthChangeHandler);
             IEventDispatcher(_strand).addEventListener("heightChanged", heightChangeHandler);
+            IEventDispatcher(_strand).addEventListener("sizeChanged", sizeChangeHandler);
 			DisplayObjectContainer(value).addChild(_textField);
 			if (_textModel.text !== null)
 				text = _textModel.text;
 			if (_textModel.html !== null)
 				html = _textModel.html;
+            
+            var ilc:ILayoutChild = host as ILayoutChild;
+            
+            autoHeight = ilc.isHeightSizedToContent();
+            autoWidth = ilc.isWidthSizedToContent();
+
 		}
 		
         /**
@@ -188,8 +196,8 @@ package org.apache.flex.html.beads
 			html = _textModel.html;
 		}
 		
-        private var autoHeight:Boolean = true;
-        private var autoWidth:Boolean = true;
+        private var autoHeight:Boolean;
+        private var autoWidth:Boolean;
         private var inHeightChange:Boolean = false;
         private var inWidthChange:Boolean = false;
         
@@ -221,6 +229,25 @@ package org.apache.flex.html.beads
             }
         }
         
+        private function sizeChangeHandler(event:Event):void
+        {
+            var ilc:ILayoutChild = host as ILayoutChild;
+
+            autoHeight = ilc.isHeightSizedToContent();
+            if (!autoHeight)
+            {
+                textField.autoSize = "none";
+                textField.height = DisplayObject(_strand).height;
+            }
+            
+            autoWidth = ilc.isWidthSizedToContent();
+            if (!autoWidth)
+            {
+                textField.autoSize = "none";
+                textField.width = DisplayObject(_strand).width;
+            }
+        }
+        
         /**
          *  @copy org.apache.flex.core.IBeadView#viewHeight
          *  


[3/6] git commit: [flex-asjs] [refs/heads/develop] - add optional flag to addElement to control notifications

Posted by ah...@apache.org.
add optional flag to addElement to control notifications


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

Branch: refs/heads/develop
Commit: 776bfce596dc9d289e3a6c3e139c4ee1d93ac193
Parents: b91788a
Author: Alex Harui <ah...@apache.org>
Authored: Wed Oct 29 13:44:42 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Oct 29 13:44:42 2014 -0700

----------------------------------------------------------------------
 .../supportClasses/optimized/SVGChartDataGroup.as       |  4 ++--
 .../FlexJSUI/src/org/apache/flex/core/Application.as    |  6 +++---
 .../FlexJSUI/src/org/apache/flex/core/IContentView.as   |  2 +-
 .../FlexJSUI/src/org/apache/flex/core/IParent.as        |  9 ++++++---
 .../FlexJSUI/src/org/apache/flex/core/UIBase.as         |  8 ++++----
 .../src/org/apache/flex/createjs/core/ViewBase.as       |  6 +++---
 .../FlexJSUI/src/org/apache/flex/html/Container.as      | 12 +++++++++---
 .../src/org/apache/flex/html/beads/PanelView.as         |  2 +-
 .../apache/flex/html/beads/PanelWithControlBarView.as   |  6 +++---
 .../apache/flex/html/beads/ScrollingContainerView.as    |  2 +-
 .../src/org/apache/flex/utils/MXMLDataInterpreter.as    |  2 +-
 11 files changed, 34 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/supportClasses/optimized/SVGChartDataGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/supportClasses/optimized/SVGChartDataGroup.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/supportClasses/optimized/SVGChartDataGroup.as
index c1a48d1..6f7d7b4 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/supportClasses/optimized/SVGChartDataGroup.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/supportClasses/optimized/SVGChartDataGroup.as
@@ -120,7 +120,7 @@ package org.apache.flex.charts.supportClasses.optimized
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		override public function addElement(value:Object):void
+		override public function addElement(value:Object, dispatchEvent:Boolean = true):void
 		{
 			_children.push(value);
 			
@@ -137,7 +137,7 @@ package org.apache.flex.charts.supportClasses.optimized
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		override public function addElementAt(value:Object, index:int):void
+		override public function addElementAt(value:Object, index:int, dispatchEvent:Boolean = true):void
 		{
 			if (index >= _children.length) _children.push(value);
 			else _children.splice(index, 0, value);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/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 7ff9660..9b9506e 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
@@ -340,7 +340,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public function addElement(c:Object):void
+        public function addElement(c:Object, dispatchEvent:Boolean = true):void
         {
             if (c is IUIBase)
             {
@@ -359,7 +359,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public function addElementAt(c:Object, index:int):void
+        public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
         {
             if (c is IUIBase)
             {
@@ -407,7 +407,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public function removeElement(c:Object):void
+        public function removeElement(c:Object, dispatchEvent:Boolean = true):void
         {
             if (c is IUIBase)
             {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IContentView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IContentView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IContentView.as
index 692d85c..486a672 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IContentView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IContentView.as
@@ -32,7 +32,7 @@ package org.apache.flex.core
 		function get height():Number;
 		function set height(value:Number):void;
 		
-		function addElement(value:Object):void;
+		function addElement(value:Object, dispatchEvent:Boolean = true):void;
 		function removeAllElements():void;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/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 e9c46d3..d90588a 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
@@ -34,26 +34,28 @@ package org.apache.flex.core
          *  Add a component to the parent.
          * 
          *  @param c The subcomponent to add.
+         *  @param dispatchEvent Whether to dispatch an event after adding the child.
          * 
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        function addElement(c:Object):void;
+        function addElement(c:Object, dispatchEvent:Boolean = true):void;
 
         /**
          *  Add a component to the parent.
          * 
          *  @param c The subcomponent to add.
          *  @param c The index where the subcomponent should be added.
+         *  @param dispatchEvent Whether to dispatch an event after adding the child.
          * 
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        function addElementAt(c:Object, index:int):void;
+        function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void;
         
         /**
          *  Gets the index of this subcomponent.
@@ -72,13 +74,14 @@ package org.apache.flex.core
          *  Remove a component from the parent.
          * 
          *  @param c The subcomponent to remove.
+         *  @param dispatchEvent Whether to dispatch an event after removing the child.
          * 
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-       function removeElement(c:Object):void;
+       function removeElement(c:Object, dispatchEvent:Boolean = true):void;
        
        /**
         *  The number of elements in the parent.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/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 deb1c2f..e837e36 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
@@ -24,7 +24,7 @@ package org.apache.flex.core
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.events.MouseEvent;
-    import org.apache.flex.events.utils.MouseEventConverter;
+	import org.apache.flex.events.utils.MouseEventConverter;
 	
 	/**
 	 *  Set a different class for click events so that
@@ -750,7 +750,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function addElement(c:Object):void
+		public function addElement(c:Object, dispatchEvent:Boolean = true):void
 		{
             if (c is IUIBase)
             {
@@ -769,7 +769,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public function addElementAt(c:Object, index:int):void
+        public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
         {
             if (c is IUIBase)
             {
@@ -817,7 +817,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public function removeElement(c:Object):void
+        public function removeElement(c:Object, dispatchEvent:Boolean = true):void
         {
             if (c is IUIBase)
                 removeChild(IUIBase(c).element as DisplayObject);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/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 9d7fe95..d3ffe23 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
@@ -61,12 +61,12 @@ package org.apache.flex.createjs.core
 			return _applicationModel;
 		}
         
-        public function addElement(c:Object):void
+        public function addElement(c:Object, dispatchEvent:Boolean = true):void
         {
             addChild(c as DisplayObject);
         }
 
-        public function addElementAt(c:Object, index:int):void
+        public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
         {
             addChildAt(c as DisplayObject, index);
         }
@@ -81,7 +81,7 @@ package org.apache.flex.createjs.core
             return getChildIndex(c as DisplayObject);
         }
         
-        public function removeElement(c:Object):void
+        public function removeElement(c:Object, dispatchEvent:Boolean = true):void
         {
             removeChild(c as DisplayObject);
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/Container.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/Container.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/Container.as
index 9ae090a..70caf45 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/Container.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/Container.as
@@ -105,7 +105,7 @@ package org.apache.flex.html
         /**
          *  @private
          */
-        override public function addElement(c:Object):void
+        override public function addElement(c:Object, dispatchEvent:Boolean = true):void
         {
             if (c is IUIBase)
             {
@@ -126,12 +126,14 @@ package org.apache.flex.html
 					actualParent.addChild(c as DisplayObject);
 				}
 			}
+            if (dispatchEvent)
+                this.dispatchEvent(new Event("childrenAdded"));
         }
         
         /**
          *  @private
          */
-        override public function addElementAt(c:Object, index:int):void
+        override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
         {
             if (c is IUIBase)
             {
@@ -151,17 +153,21 @@ package org.apache.flex.html
                 	actualParent.addChildAt(c as DisplayObject, index);
 				}
 			}
+            if (dispatchEvent)
+                this.dispatchEvent(new Event("childrenAdded"));
         }
         
         /**
          *  @private
          */
-        override public function removeElement(c:Object):void
+        override public function removeElement(c:Object, dispatchEvent:Boolean = true):void
         {
             if (c is IUIBase)
                 actualParent.removeChild(IUIBase(c).element as DisplayObject);
             else
                 actualParent.removeChild(c as DisplayObject);
+            if (dispatchEvent)
+                this.dispatchEvent(new Event("childrenRemoved"));
         }
         
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelView.as
index c832a13..dac93ad 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelView.as
@@ -97,7 +97,7 @@ package org.apache.flex.html.beads
 			// any changes to values in the Panel's model that correspond values in the TitleBar will 
 			// be picked up automatically by the TitleBar.
 			titleBar.model = host.model;
-			host.addElement(titleBar);
+			host.addElement(titleBar, false);
 			titleBar.addEventListener("heightChanged", changeHandler);
             if (isNaN(host.explicitWidth) && isNaN(host.percentWidth))
                 titleBar.addEventListener("widthChanged", changeHandler);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelWithControlBarView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelWithControlBarView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelWithControlBarView.as
index 338c616..0ea7b35 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelWithControlBarView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/PanelWithControlBarView.as
@@ -107,17 +107,17 @@ package org.apache.flex.html.beads
 			// any changes to values in the Panel's model that correspond values in the TitleBar will 
 			// be picked up automatically by the TitleBar.
 			titleBar.model = UIBase(_strand).model as ITitleBarModel;
-			Container(_strand).addElement(titleBar);
+			Container(_strand).addElement(titleBar, false);
 			
 			var controlBarItems:Array = IPanelModel(UIBase(_strand).model).controlBar;
 			if( controlBarItems && controlBarItems.length > 0 ) {
 				_controlBar = new ControlBar();
 				
 				for each(var comp:IUIBase in controlBarItems) {
-					_controlBar.addElement(comp);
+					_controlBar.addElement(comp, false);
 				}
 				
-				Container(_strand).addElement(controlBar);
+				Container(_strand).addElement(controlBar, false);
 			}
 			
 			layoutChromeElements();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/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 e9b424a..b6098cc 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
@@ -210,7 +210,7 @@ package org.apache.flex.html.beads
             vsb = new ScrollBar();
             vsb.model = _vScrollBarModel;
             vsb.width = 16;
-            IParent(_strand).addElement(vsb);
+            IParent(_strand).addElement(vsb, false);
             return vsb;
         }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/776bfce5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
index f9af9e3..ef3d3e4 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
@@ -260,7 +260,7 @@ public class MXMLDataInterpreter
         }
         if (parent && comp is DisplayObject)
         {
-            parent.addElement(comp);
+            parent.addElement(comp, !(comp is IContainer));
         }
         
         if (children)


[6/6] git commit: [flex-asjs] [refs/heads/develop] - add multiline textfield view

Posted by ah...@apache.org.
add multiline textfield 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/f4eb38ee
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f4eb38ee
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f4eb38ee

Branch: refs/heads/develop
Commit: f4eb38ee29ccc45fdb56789e08bc2293b5715584
Parents: 46f7af5
Author: Alex Harui <ah...@apache.org>
Authored: Wed Oct 29 17:51:13 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Oct 29 17:51:13 2014 -0700

----------------------------------------------------------------------
 .../as/projects/FlexJSUI/basic-manifest.xml     |  1 +
 .../flex/html/beads/MultilineTextFieldView.as   | 56 ++++++++++++++++++++
 2 files changed, 57 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f4eb38ee/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 07afdff..f22dcdb 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -68,6 +68,7 @@
     <component id="TileLayout" class="org.apache.flex.html.beads.layouts.TileLayout"/>
     <component id="ListView" class="org.apache.flex.html.beads.ListView"/>
     <component id="ListViewNoSelectionState" class="org.apache.flex.html.beads.ListViewNoSelectionState"/>
+    <component id="MultilineTextFieldView" class="org.apache.flex.html.beads.MultilineTextFieldView"/>
     
     <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/f4eb38ee/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/MultilineTextFieldView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/MultilineTextFieldView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/MultilineTextFieldView.as
new file mode 100644
index 0000000..72dc588
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/MultilineTextFieldView.as
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flash.text.TextFieldType;
+	
+    /**
+     *  The TextFieldView class is the default view for
+     *  the org.apache.flex.html.Label class.
+     *  It displays text using a TextField, so there is no
+     *  right-to-left text support in this view.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class MultilineTextFieldView extends TextFieldViewBase
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function MultilineTextFieldView()
+		{
+			super();
+			
+			textField.selectable = false;
+			textField.type = TextFieldType.DYNAMIC;
+			textField.mouseEnabled = false;
+			textField.autoSize = "left";
+            textField.multiline = true;
+            textField.wordWrap = true;
+		}
+	}
+}


[2/6] git commit: [flex-asjs] [refs/heads/develop] - some targets are not IUIBase

Posted by ah...@apache.org.
some targets are not IUIBase


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

Branch: refs/heads/develop
Commit: b91788af52f993305c527c4abf916a9d98dda2ad
Parents: ec52499
Author: Alex Harui <ah...@apache.org>
Authored: Wed Oct 29 13:44:02 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Oct 29 13:44:02 2014 -0700

----------------------------------------------------------------------
 .../projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b91788af/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
index 3c48870..dabdf35 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
@@ -117,7 +117,7 @@ package org.apache.flex.events
             if (!_stagePoint)
             {
                 var localPoint:Point = new Point(localX, localY);
-                _stagePoint = PointUtils.localToGlobal(localPoint, IUIBase(target));
+                _stagePoint = PointUtils.localToGlobal(localPoint, target);
             }
             return _stagePoint.x;
         }
@@ -128,7 +128,7 @@ package org.apache.flex.events
             if (!_stagePoint)
             {
                 var localPoint:Point = new Point(localX, localY);
-                _stagePoint = PointUtils.localToGlobal(localPoint, IUIBase(target));
+                _stagePoint = PointUtils.localToGlobal(localPoint, target);
             }
             return _stagePoint.y;            
         }


[5/6] git commit: [flex-asjs] [refs/heads/develop] - try this sizing logic

Posted by ah...@apache.org.
try this sizing logic


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

Branch: refs/heads/develop
Commit: 46f7af5a14a1ef2758b5d9ad27295674fdf4e0a8
Parents: 22cf44d
Author: Alex Harui <ah...@apache.org>
Authored: Wed Oct 29 17:50:50 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Oct 29 17:50:50 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/46f7af5a/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 5ef80a9..839420b 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
@@ -259,7 +259,7 @@ package org.apache.flex.html.beads
         public function get viewHeight():Number
         {
             // textfields with autosize collapse if no text
-            if (_textField.text == "" && _textField.autoSize != "none")
+            if (_textField.text == "" && autoHeight)
                 return ValuesManager.valuesImpl.getValue(_strand, "fontSize") + 4;
 
             return _textField.height;
@@ -276,7 +276,7 @@ package org.apache.flex.html.beads
         public function get viewWidth():Number
         {
             // textfields with autosize collapse if no text
-            if (_textField.text == "" && _textField.autoSize != "none")
+            if (_textField.text == "" && autoWidth)
                 return 0;
             
             return _textField.width;