flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject [1/2] git commit: [flex-asjs] [refs/heads/develop] - Added explicitWidth, explicitHeight, percentWidth, and percentHeight.
Date Fri, 26 Jul 2013 12:57:57 GMT
Updated Branches:
  refs/heads/develop d478d6279 -> e62326b70


Added explicitWidth, explicitHeight, percentWidth, and percentHeight.


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

Branch: refs/heads/develop
Commit: 4032ff16cce344e3750e8702be62a15da7e481b2
Parents: d478d62
Author: Peter Ent <pent@apache.org>
Authored: Fri Jul 26 08:56:34 2013 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Fri Jul 26 08:56:34 2013 -0400

----------------------------------------------------------------------
 .../as/src/org/apache/flex/core/UIBase.as       | 83 ++++++++++++++++++++
 1 file changed, 83 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4032ff16/frameworks/as/src/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/UIBase.as b/frameworks/as/src/org/apache/flex/core/UIBase.as
index 944c942..dd435ce 100644
--- a/frameworks/as/src/org/apache/flex/core/UIBase.as
+++ b/frameworks/as/src/org/apache/flex/core/UIBase.as
@@ -31,6 +31,79 @@ package org.apache.flex.core
 			super();
 		}
 		
+		private var _explicitWidth:Number;
+		public function get explicitWidth():Number
+		{
+			return _explicitWidth;
+		}
+		public function set explicitWidth(value:Number):void
+		{
+			if (_explicitWidth == value)
+				return;
+			
+			// width can be pixel or percent not both
+			if (!isNaN(value))
+				_percentWidth = NaN;
+			
+			_explicitWidth = value;
+			
+			dispatchEvent(new Event("explicitWidthChanged"));
+		}
+		
+		private var _explicitHeight:Number;
+		public function get explicitHeight():Number
+		{
+			return _explicitHeight;
+		}
+		public function set explicitHeight(value:Number):void
+		{
+			if (_explicitHeight == value)
+				return;
+			
+			// height can be pixel or percent not both
+			if (!isNaN(value))
+				_percentHeight = NaN;
+			
+			_explicitHeight = value;
+			
+			dispatchEvent(new Event("explicitHeightChanged"));
+		}
+		
+		private var _percentWidth:Number;
+		public function get percentWidth():Number
+		{
+			return _percentWidth;
+		}
+		public function set percentWidth(value:Number):void
+		{
+			if (_percentWidth == value)
+				return;
+			
+			if (!isNaN(value))
+				_explicitWidth = NaN;
+			
+			_percentWidth = value;
+			
+			dispatchEvent(new Event("percentWidthChanged"));
+		}
+		private var _percentHeight:Number;
+		public function get percentHeight():Number
+		{
+			return _percentHeight;
+		}
+		public function set percentHeight(value:Number):void
+		{
+			if (_percentHeight == value)
+				return;
+			
+			if (!isNaN(value))
+				_explicitHeight = NaN;
+			
+			_percentHeight = value;
+			
+			dispatchEvent(new Event("percentHeightChanged"));
+		}
+		
 		private var _width:Number;
 		override public function get width():Number
 		{
@@ -45,6 +118,11 @@ package org.apache.flex.core
 		}
 		override public function set width(value:Number):void
 		{
+			if (explicitWidth != value)
+			{
+				explicitWidth = value;
+			}
+			
 			if (_width != value)
 			{
 				_width = value;
@@ -70,6 +148,11 @@ package org.apache.flex.core
 		}
 		override public function set height(value:Number):void
 		{
+			if (explicitHeight != value)
+			{
+				explicitHeight = value;
+			}
+			
 			if (_height != value)
 			{
 				_height = value;


Mime
View raw message