flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [08/13] git commit: [flex-asjs] [refs/heads/VF2JS] - add viewHeight/viewWidth to view beads on the AS side because we can't always trust the sprite bounding box size
Date Mon, 28 Jul 2014 09:30:58 GMT
add viewHeight/viewWidth to view beads on the AS side because we can't always trust the sprite bounding box size


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

Branch: refs/heads/VF2JS
Commit: 7027ad8029012d21e8cd82bd2027443ec78c88c4
Parents: 4d83995
Author: Alex Harui <aharui@apache.org>
Authored: Wed Jul 9 21:29:59 2014 -0700
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Mon Jul 28 11:28:11 2014 +0200

----------------------------------------------------------------------
 .../org/apache/flex/html/beads/DataGridView.as  |   9 +-
 .../apache/flex/html/beads/DateChooserView.as   |   9 +-
 .../org/apache/flex/html/beads/DateFieldView.as |   9 +-
 .../src/org/apache/flex/core/BeadViewBase.as    | 101 +++++++++++++++++++
 .../src/org/apache/flex/core/IBeadView.as       |  23 ++++-
 .../FlexJSUI/src/org/apache/flex/core/UIBase.as |  57 ++++++++++-
 .../src/org/apache/flex/core/UIButtonBase.as    |  50 ++++++++-
 .../src/org/apache/flex/html/beads/AlertView.as |   9 +-
 .../org/apache/flex/html/beads/CSSButtonView.as |   9 +-
 .../apache/flex/html/beads/CSSTextButtonView.as |   7 +-
 .../org/apache/flex/html/beads/CheckBoxView.as  |   7 +-
 .../org/apache/flex/html/beads/ComboBoxView.as  |   9 +-
 .../org/apache/flex/html/beads/ContainerView.as |   9 +-
 .../flex/html/beads/DownArrowButtonView.as      |   9 +-
 .../apache/flex/html/beads/DropDownListView.as  |   9 +-
 .../apache/flex/html/beads/ImageButtonView.as   |   9 +-
 .../src/org/apache/flex/html/beads/ImageView.as |   8 +-
 .../src/org/apache/flex/html/beads/ListView.as  |  28 +++++
 .../flex/html/beads/NumericStepperView.as       |   9 +-
 .../apache/flex/html/beads/RadioButtonView.as   |   9 +-
 .../org/apache/flex/html/beads/ScrollBarView.as |  27 +++++
 .../apache/flex/html/beads/SimpleAlertView.as   |   9 +-
 .../apache/flex/html/beads/SliderThumbView.as   |   9 +-
 .../apache/flex/html/beads/SliderTrackView.as   |   9 +-
 .../org/apache/flex/html/beads/SliderView.as    |   9 +-
 .../org/apache/flex/html/beads/SpinnerView.as   |   9 +-
 .../apache/flex/html/beads/TextButtonView.as    |   9 +-
 .../apache/flex/html/beads/TextFieldViewBase.as |  38 ++++++-
 .../apache/flex/html/beads/UpArrowButtonView.as |   9 +-
 .../flex/html/beads/VScrollBarThumbView.as      |   9 +-
 .../flex/html/beads/VScrollBarTrackView.as      |   9 +-
 .../apache/flex/maps/google/beads/MapView.as    |   7 +-
 32 files changed, 415 insertions(+), 127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DataGridView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DataGridView.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DataGridView.as
index d442bd5..33ea1a5 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DataGridView.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DataGridView.as
@@ -18,6 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IDataGridLayout;
@@ -46,7 +47,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class DataGridView implements IDataGridView
+	public class DataGridView extends BeadViewBase implements IDataGridView
 	{
 		/**
 		 *  constructor.
@@ -79,8 +80,6 @@ package org.apache.flex.html.beads
 			return columns;
 		}
 		
-		private var _strand:IStrand;
-		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
 		 *  
@@ -89,9 +88,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			var sharedModel:IDataGridModel = _strand.getBeadByType(IBeadModel) as IDataGridModel;
 			IEventDispatcher(sharedModel).addEventListener("dataProviderChanged",onDataProviderChanged);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateChooserView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateChooserView.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateChooserView.as
index 34d422e..51a709d 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateChooserView.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateChooserView.as
@@ -21,6 +21,7 @@ package org.apache.flex.html.beads
 	import org.apache.flex.html.beads.models.DateChooserModel;
 	import org.apache.flex.html.supportClasses.DateChooserButton;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
@@ -38,7 +39,7 @@ package org.apache.flex.html.beads
 	 * months, the labels for the days of the week, and the buttons for each day
 	 * of the month.
 	 */
-	public class DateChooserView implements IBeadView
+	public class DateChooserView extends BeadViewBase implements IBeadView
 	{
 		/**
 		 *  constructor
@@ -52,8 +53,6 @@ package org.apache.flex.html.beads
 		{
 		}
 		
-		private var _strand:IStrand;
-		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
 		 *  
@@ -62,9 +61,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			// make sure there is a model.
 			model = _strand.getBeadByType(IBeadModel) as DateChooserModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateFieldView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateFieldView.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateFieldView.as
index 7ead1ab..2254d6e 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateFieldView.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/DateFieldView.as
@@ -18,6 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IDateChooserModel;
 	import org.apache.flex.core.IFormatBead;
@@ -43,7 +44,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class DateFieldView implements IBeadView
+	public class DateFieldView extends BeadViewBase implements IBeadView
 	{
 		/**
 		 *  constructor.
@@ -57,8 +58,6 @@ package org.apache.flex.html.beads
 		{
 		}
 		
-		private var _strand:IStrand;
-		
 		private var _textInput:TextInput;
 		private var _button:TextButton;
 		
@@ -96,9 +95,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{	
-			_strand = value;
+			super.strand = value;
 			
 			_textInput = new TextInput();
 			UIBase(_strand).addElement(_textInput);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/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
new file mode 100644
index 0000000..ef08284
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/BeadViewBase.as
@@ -0,0 +1,101 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.core.IBeadView;
+    import org.apache.flex.core.IStrand;
+    
+    /**
+     *  The BeadViewBase class is the base class for most view beads.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class BeadViewBase implements IBeadView
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function BeadViewBase()
+		{
+			super();
+		}
+		
+        /**
+         *  The strand
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        protected var _strand:IStrand;
+        
+        /**
+         *  Override this for whatever else you need to do when
+         *  being hooked to the Strand
+         * 
+         *  @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;
+		}
+		
+        /**
+         *  @copy org.apache.flex.core.IBeadView#viewHeight
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function get viewHeight():Number
+		{
+            // don't want to put $height in an interface
+			return _strand["$height"];
+		}
+		
+        /**
+         *  @copy org.apache.flex.core.IBeadView#viewWidth
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get viewWidth():Number
+        {
+            // don't want to put $width in an interface
+            return _strand["$width"];
+        }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/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 6c224ed..9f49c9c 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
@@ -20,8 +20,8 @@ package org.apache.flex.core
 {
 
     /**
-     *  The IBeadView interface is a "marker" interface for beads that 
-     *  represent the view for a control.  A marker interface has no addtional APIs.
+     *  The IBeadView interface is the interface for beads that 
+     *  represent the view for a control.  
      *  It is used to find the view bead on the strand via calls to getBeadByType.
      * 
      *  @see org.apache.flex.core.IStrand#getBeadByType
@@ -33,5 +33,24 @@ package org.apache.flex.core
      */
 	public interface IBeadView extends IBead
 	{
+        /**
+         *  The width of the view. 
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        function get viewWidth():Number;
+        
+        /**
+         *  The height of the view. 
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        function get viewHeight():Number;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/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 db3a079..fd0682b 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
@@ -230,7 +230,11 @@ package org.apache.flex.core
             {
                 var value:* = ValuesManager.valuesImpl.getValue(this, "width");
                 if (value === undefined)
+                {
+                    if (view)
+                        return view.viewWidth;
                     return $width;
+                }
 				_width = Number(value);
             }
 			return _width;
@@ -255,13 +259,14 @@ package org.apache.flex.core
 
         /**
          *  Retrieve the low-level bounding box width.
+         *  Not implemented in JS.
          *  
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		protected function get $width():Number
+		public function get $width():Number
 		{
 			return super.width;
 		}
@@ -285,7 +290,11 @@ package org.apache.flex.core
             {
                 var value:* = ValuesManager.valuesImpl.getValue(this, "height");
                 if (value === undefined)
+                {
+                    if (view)
+                        return view.viewHeight;
                     return $height;
+                }
   	            _height = Number(value);
             }
 			return _height;
@@ -310,13 +319,14 @@ package org.apache.flex.core
         
         /**
          *  Retrieve the low-level bounding box height.
+         *  Not implemented in JS.
          *  
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		protected function get $height():Number
+		public function get $height():Number
 		{
 			return super.height;
 		}
@@ -353,7 +363,46 @@ package org.apache.flex.core
 			}
 		}
 		
-		private var _id:String;
+        private var _view:IBeadView;
+        
+        /**
+         *  An IBeadView that serves as the view for the component.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get view():IBeadView
+        {
+            if (_view == null)
+            {
+                var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
+                if (c)
+                {
+                    if (c)
+                    {
+                        _view = (new c()) as IBeadView;
+                        addBead(_view);
+                    }
+                }
+            }
+            return _view;
+        }
+        
+        /**
+         *  @private
+         */
+        public function set view(value:IBeadView):void
+        {
+            if (_view != value)
+            {
+                addBead(value as IBead);
+                dispatchEvent(new org.apache.flex.events.Event("viewChanged"));
+            }
+        }
+
+        private var _id:String;
 
         /**
          *  An id property for MXML documents.
@@ -448,6 +497,8 @@ package org.apache.flex.core
 			_beads.push(bead);
 			if (bead is IBeadModel)
 				_model = bead as IBeadModel;
+            else if (bead is IBeadView)
+                _view = bead as IBeadView;
 			bead.strand = this;
 			
 			if (bead is IBeadView) {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as
index ea446d4..089d37f 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as
@@ -330,7 +330,11 @@ package org.apache.flex.core
             {
                 var value:* = ValuesManager.valuesImpl.getValue(this, "width");
                 if (value === undefined)
+                {
+                    if (view)
+                        return view.viewWidth;
                     return $width;
+                }
                 _width = Number(value);
             }
             return _width;
@@ -355,13 +359,14 @@ package org.apache.flex.core
 
         /**
          *  Retrieve the low-level bounding box width.
+         *  Not implemented in JS.
          *  
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		protected function get $width():Number
+		public function get $width():Number
 		{
 			return super.width;
 		}
@@ -382,7 +387,11 @@ package org.apache.flex.core
             {
                 var value:* = ValuesManager.valuesImpl.getValue(this, "height");
                 if (value === undefined)
+                {
+                    if (view)
+                        return view.viewHeight;
                     return $height;
+                }
                 _height = Number(value);
             }
             return _height;
@@ -407,13 +416,14 @@ package org.apache.flex.core
         
         /**
          *  Retrieve the low-level bounding box height.
+         *  Not implemented in JS.
          *  
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		protected function get $height():Number
+		public function get $height():Number
 		{
 			return super.height;
 		}
@@ -450,6 +460,42 @@ package org.apache.flex.core
             }
         }
 		
+        private var _view:IBeadView;
+        
+        /**
+         *  An IBeadView that serves as the view for the component.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get view():IBeadView
+        {
+            if (_view == null)
+            {
+                var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
+                if (c)
+                {
+                    _view = (new c()) as IBeadView;
+                    addBead(_view);
+                }
+            }
+            return _view;
+        }
+        
+        /**
+         *  @private
+         */
+        public function set view(value:IBeadView):void
+        {
+            if (_view != value)
+            {
+                addBead(value as IBead);
+                dispatchEvent(new org.apache.flex.events.Event("viewChanged"));
+            }
+        }
+        
 		private var _id:String;
 
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/AlertView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/AlertView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/AlertView.as
index f8f9e52..6caac5e 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/AlertView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/AlertView.as
@@ -18,6 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IAlertModel;
 	import org.apache.flex.core.IBead;
     import org.apache.flex.core.IBeadView;
@@ -46,7 +47,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class AlertView implements IBeadView
+	public class AlertView extends BeadViewBase implements IBeadView
 	{
 		/**
 		 *  constructor.
@@ -68,8 +69,6 @@ package org.apache.flex.html.beads
 		private var _yesButton:TextButton;
 		private var _noButton:TextButton;
 		
-		private var _strand:IStrand;
-		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
 		 *  
@@ -78,9 +77,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 
             var backgroundColor:Object = ValuesManager.valuesImpl.getValue(value, "background-color");
 			var backgroundImage:Object = ValuesManager.valuesImpl.getValue(value, "background-image");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSButtonView.as
index 52775c8..f93ca3e 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSButtonView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSButtonView.as
@@ -25,6 +25,7 @@ package org.apache.flex.html.beads
 	import flash.events.Event;
 	import flash.net.URLRequest;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.ITextModel;
@@ -44,7 +45,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class CSSButtonView implements IBeadView
+	public class CSSButtonView extends BeadViewBase implements IBeadView
 	{
         /**
          *  Constructor.
@@ -63,8 +64,6 @@ package org.apache.flex.html.beads
 		
 		private var textModel:ITextModel;
 		
-		private var _strand:IStrand;
-		
 		private var shape:Shape;
 		
         /**
@@ -75,9 +74,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			shape = new Shape();
 			shape.graphics.beginFill(0xCCCCCC);
 			shape.graphics.drawRect(0, 0, 10, 10);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as
index 45d0fa4..4772e7b 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as
@@ -28,6 +28,7 @@ package org.apache.flex.html.beads
 	import flash.text.TextField;
 	import flash.text.TextFieldType;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.CSSTextField;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
@@ -51,7 +52,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class CSSTextButtonView implements IBeadView
+	public class CSSTextButtonView extends BeadViewBase implements IBeadView
 	{
         /**
          *  Constructor.
@@ -85,8 +86,6 @@ package org.apache.flex.html.beads
 		
 		private var textModel:ITextModel;
 		
-		private var _strand:IStrand;
-		
 		private var shape:Shape;
 		
         /**
@@ -97,7 +96,7 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
 			_strand = value;
 			textModel = value.getBeadByType(ITextModel) as ITextModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CheckBoxView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CheckBoxView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CheckBoxView.as
index f92f857..1cd8b49 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CheckBoxView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CheckBoxView.as
@@ -24,6 +24,7 @@ package org.apache.flex.html.beads
 	import flash.text.TextFieldAutoSize;
 	import flash.text.TextFieldType;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.CSSTextField;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
@@ -47,7 +48,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class CheckBoxView implements IBeadView
+	public class CheckBoxView extends BeadViewBase implements IBeadView
 	{
         /**
          *  Constructor.
@@ -106,9 +107,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
             
 			_toggleButtonModel = value.getBeadByType(IToggleButtonModel) as IToggleButtonModel;
 			_toggleButtonModel.addEventListener("textChange", textChangeHandler);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ComboBoxView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ComboBoxView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ComboBoxView.as
index 65527d4..e725517 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ComboBoxView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ComboBoxView.as
@@ -22,6 +22,7 @@ package org.apache.flex.html.beads
 	import flash.display.DisplayObjectContainer;
 	import flash.display.Sprite;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IComboBoxModel;
 	import org.apache.flex.core.IPopUpHost;
@@ -43,7 +44,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class ComboBoxView implements IBeadView, IComboBoxView
+	public class ComboBoxView extends BeadViewBase implements IBeadView, IComboBoxView
 	{
 		/**
 		 *  constructor.
@@ -99,8 +100,6 @@ package org.apache.flex.html.beads
 			textInput.html = value;
 		}
 		
-		private var _strand:IStrand;
-		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
 		 *  
@@ -113,9 +112,9 @@ package org.apache.flex.html.beads
 		{
 			return _strand;
 		}
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
         
 			selectionModel = value.getBeadByType(IComboBoxModel) as IComboBoxModel;
 			selectionModel.addEventListener("selectedIndexChanged", selectionChangeHandler);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/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 d65229f..dcf0698 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
@@ -21,6 +21,7 @@ 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;
@@ -43,7 +44,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class ContainerView implements IBeadView, ILayoutParent
+	public class ContainerView extends BeadViewBase implements IBeadView, ILayoutParent
 	{
         /**
          *  Constructor.
@@ -67,8 +68,6 @@ package org.apache.flex.html.beads
          */        
 		protected var actualParent:DisplayObjectContainer;
 				
-		private var _strand:IStrand;
-		
         /**
          *  @copy org.apache.flex.core.IBead#strand
          *  
@@ -77,9 +76,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			var backgroundColor:Object = ValuesManager.valuesImpl.getValue(value, "background-color");
 			var backgroundImage:Object = ValuesManager.valuesImpl.getValue(value, "background-image");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DownArrowButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DownArrowButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DownArrowButtonView.as
index 6f461ed..39ce6b4 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DownArrowButtonView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DownArrowButtonView.as
@@ -22,6 +22,7 @@ package org.apache.flex.html.beads
 	import flash.display.Shape;
 	import flash.display.SimpleButton;
 
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IStrand;
     import org.apache.flex.core.IBeadView;
 	
@@ -34,7 +35,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class DownArrowButtonView implements IBeadView
+	public class DownArrowButtonView extends BeadViewBase implements IBeadView
 	{
         /**
          *  Constructor.
@@ -70,8 +71,6 @@ package org.apache.flex.html.beads
 			g.endFill();
 		}
 		
-		private var _strand:IStrand;
-		
 		private var shape:Shape;
 		
         /**
@@ -82,9 +81,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			shape = new Shape();
 			shape.graphics.beginFill(0xCCCCCC);
 			shape.graphics.drawRect(0, 0, 16, 16);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DropDownListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DropDownListView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DropDownListView.as
index 4f9f40d..cc885f6 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DropDownListView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/DropDownListView.as
@@ -26,6 +26,7 @@ package org.apache.flex.html.beads
 	import flash.display.Sprite;
 	import flash.text.TextFieldType;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.CSSTextField;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IPopUpHost;
@@ -48,7 +49,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class DropDownListView implements IDropDownListView, IBeadView
+	public class DropDownListView extends BeadViewBase implements IDropDownListView, IBeadView
 	{
         /**
          *  Constructor.
@@ -127,8 +128,6 @@ package org.apache.flex.html.beads
         
 		private var selectionModel:ISelectionModel;
 		
-		private var _strand:IStrand;
-		
 		private var shape:Shape;
 		
         /**
@@ -139,9 +138,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;;
             selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
             selectionModel.addEventListener("selectedIndexChanged", selectionChangeHandler);
 			shape = new Shape();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageButtonView.as
index b2f3f19..6eddb22 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageButtonView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageButtonView.as
@@ -25,6 +25,7 @@ package org.apache.flex.html.beads
 	import flash.events.Event;
 	import flash.net.URLRequest;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
@@ -41,7 +42,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class ImageButtonView implements IBeadView, IBead
+	public class ImageButtonView extends BeadViewBase implements IBeadView, IBead
 	{
 		/**
 		 *  Constructor.
@@ -58,8 +59,6 @@ package org.apache.flex.html.beads
 			overSprite = new Sprite();
 		}
 		
-		private var _strand:IStrand;
-		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
 		 *  
@@ -68,9 +67,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			shape = new Shape();
 			shape.graphics.beginFill(0xCCCCCC);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageView.as
index 9c5bd9b..c3911d2 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageView.as
@@ -23,6 +23,7 @@ package org.apache.flex.html.beads
 	import flash.display.LoaderInfo;
 	import flash.net.URLRequest;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IImageModel;
 	import org.apache.flex.core.IStrand;
@@ -38,7 +39,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class ImageView implements IBeadView
+	public class ImageView extends BeadViewBase implements IBeadView
 	{
 		/**
 		 *  constructor.
@@ -55,7 +56,6 @@ package org.apache.flex.html.beads
 		private var bitmap:Bitmap;
 		private var loader:Loader;
 		
-		private var _strand:IStrand;
 		private var _model:IImageModel;
 		
 		/**
@@ -66,9 +66,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			IEventDispatcher(_strand).addEventListener("widthChanged",handleSizeChange);
 			IEventDispatcher(_strand).addEventListener("heightChanged",handleSizeChange);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/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 3a4a72b..1bb3605 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
@@ -21,6 +21,7 @@ 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;
 	import org.apache.flex.core.IBeadModel;
@@ -266,5 +267,32 @@ package org.apache.flex.html.beads
 			UIBase(_dataGroup).height = UIBase(_strand).height;
 		}
 				
+        /**
+         *  @copy org.apache.flex.core.IBeadView#viewHeight
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get viewHeight():Number
+        {
+            // don't want to put $height in an interface
+            return _strand["$height"];
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IBeadView#viewWidth
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get viewWidth():Number
+        {
+            // don't want to put $width in an interface
+            return _strand["$width"];
+        }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/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 bafb3f5..d8b3104 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
@@ -21,6 +21,7 @@ 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;
@@ -47,7 +48,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class NumericStepperView implements IBeadView, ILayoutParent
+	public class NumericStepperView extends BeadViewBase implements IBeadView, ILayoutParent
 	{
 		/**
 		 *  constructor.
@@ -61,8 +62,6 @@ package org.apache.flex.html.beads
 		{
 		}
 		
-		private var _strand:IStrand;
-		
 		private var label:Label;
 		private var input:TextInput;
 		private var spinner:Spinner;
@@ -75,9 +74,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			// add a horizontal layout bead
 			value.addBead(new NonVirtualHorizontalLayout());

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/RadioButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/RadioButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/RadioButtonView.as
index b133259..24a169b 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/RadioButtonView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/RadioButtonView.as
@@ -24,6 +24,7 @@ package org.apache.flex.html.beads
 	import flash.text.TextFieldAutoSize;
 	import flash.text.TextFieldType;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.CSSTextField;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
@@ -39,7 +40,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class RadioButtonView implements IBeadView
+	public class RadioButtonView extends BeadViewBase implements IBeadView
 	{
 		/**
 		 *  constructor.
@@ -95,8 +96,6 @@ package org.apache.flex.html.beads
 			return _toggleButtonModel;
 		}
 		
-		private var _strand:IStrand;
-		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
 		 *  
@@ -105,9 +104,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			_toggleButtonModel = value.getBeadByType(IValueToggleButtonModel) as IValueToggleButtonModel;
 			_toggleButtonModel.addEventListener("textChange", textChangeHandler);
 			_toggleButtonModel.addEventListener("htmlChange", htmlChangeHandler);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/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 7575ed2..00ad495 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
@@ -154,5 +154,32 @@ package org.apache.flex.html.beads
 			return _thumb;
 		}
 		
+        /**
+         *  @copy org.apache.flex.core.IBeadView#viewHeight
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get viewHeight():Number
+        {
+            // don't want to put $height in an interface
+            return _strand["$height"];
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IBeadView#viewWidth
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get viewWidth():Number
+        {
+            // don't want to put $width in an interface
+            return _strand["$width"];
+        }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SimpleAlertView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SimpleAlertView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SimpleAlertView.as
index 17080cb..019023b 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SimpleAlertView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SimpleAlertView.as
@@ -18,6 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IAlertModel;
 	import org.apache.flex.core.IBead;
     import org.apache.flex.core.IBeadView;
@@ -42,7 +43,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class SimpleAlertView implements IBeadView
+	public class SimpleAlertView extends BeadViewBase implements IBeadView
 	{
 		/**
 		 *  constructor.
@@ -59,8 +60,6 @@ package org.apache.flex.html.beads
 		private var messageLabel:Label;
 		private var okButton:TextButton;
 		
-		private var _strand:IStrand;
-		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
 		 *  
@@ -69,9 +68,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
             
 			var backgroundColor:Object = ValuesManager.valuesImpl.getValue(value, "background-color");
 			var backgroundImage:Object = ValuesManager.valuesImpl.getValue(value, "background-image");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderThumbView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderThumbView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderThumbView.as
index 702e515..24f832c 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderThumbView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderThumbView.as
@@ -22,6 +22,7 @@ package org.apache.flex.html.beads
 	import flash.display.Shape;
 	import flash.display.SimpleButton;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
@@ -36,7 +37,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class SliderThumbView implements IBeadView
+	public class SliderThumbView extends BeadViewBase implements IBeadView
 	{
 		/**
 		 *  constructor.
@@ -66,8 +67,6 @@ package org.apache.flex.html.beads
 			g.endFill();
 		}
 		
-		private var _strand:IStrand;
-		
 		private var hitArea:Shape;
 		
 		/**
@@ -78,9 +77,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			drawView(hitArea.graphics, 0xDD0000);
 			drawView(upView.graphics, 0xFFFFFF);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderTrackView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderTrackView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderTrackView.as
index 6bd6001..e79ef10 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderTrackView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderTrackView.as
@@ -22,6 +22,7 @@ package org.apache.flex.html.beads
 	import flash.display.Shape;
 	import flash.display.SimpleButton;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
@@ -36,7 +37,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class SliderTrackView implements IBeadView
+	public class SliderTrackView extends BeadViewBase implements IBeadView
 	{
 		/**
 		 *  constructor.
@@ -66,8 +67,6 @@ package org.apache.flex.html.beads
 			g.endFill();
 		}
 		
-		private var _strand:IStrand;
-		
 		private var hitArea:Shape;
 		
 		/**
@@ -78,9 +77,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			drawView(hitArea.graphics, 0xDD0000);
 			drawView(upView.graphics, 0xCCCCCC);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderView.as
index 6ee07a7..071dd8d 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SliderView.as
@@ -21,6 +21,7 @@ package org.apache.flex.html.beads
 	import flash.display.DisplayObject;
 	import flash.display.Sprite;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IBeadView;
@@ -41,7 +42,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class SliderView implements ISliderView, IBeadView
+	public class SliderView extends BeadViewBase implements ISliderView, IBeadView
 	{
 		/**
 		 *  constructor.
@@ -57,8 +58,6 @@ package org.apache.flex.html.beads
 		
 		private var rangeModel:IRangeModel;
 		
-		private var _strand:IStrand;
-		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
 		 *  
@@ -67,9 +66,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			_track = new Button();
 			Button(_track).addBead(new (ValuesManager.valuesImpl.getValue(_strand, "iTrackView")) as IBead);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SpinnerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SpinnerView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SpinnerView.as
index edfd6ac..630c85c 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SpinnerView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/SpinnerView.as
@@ -20,6 +20,7 @@ package org.apache.flex.html.beads
 {
 	import flash.display.DisplayObject;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IRangeModel;
@@ -39,7 +40,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class SpinnerView implements ISpinnerView, IBeadView
+	public class SpinnerView extends BeadViewBase implements ISpinnerView, IBeadView
 	{
 		/**
 		 *  constructor.
@@ -55,8 +56,6 @@ package org.apache.flex.html.beads
 		
 		private var rangeModel:IRangeModel;
 		
-		private var _strand:IStrand;
-		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
 		 *  
@@ -65,9 +64,9 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
             
 			_increment = new Button();
 			Button(_increment).addBead(new UpArrowButtonView());

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextButtonView.as
index 3a8c9d6..b1ab648 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextButtonView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextButtonView.as
@@ -23,6 +23,7 @@ package org.apache.flex.html.beads
 	import flash.display.SimpleButton;
 	import flash.text.TextFieldType;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.CSSTextField;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
@@ -39,7 +40,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class TextButtonView implements IBeadView
+	public class TextButtonView extends BeadViewBase implements IBeadView
 	{
         /**
          *  Constructor.
@@ -80,8 +81,6 @@ package org.apache.flex.html.beads
 		
 		private var textModel:ITextModel;
 		
-		private var _strand:IStrand;
-		
 		private var shape:Shape;
 		
         /**
@@ -92,9 +91,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			textModel = value.getBeadByType(ITextModel) as ITextModel;
 			textModel.addEventListener("textChange", textChangeHandler);
 			textModel.addEventListener("htmlChange", htmlChangeHandler);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/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 a18180d..f10a52e 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.ValuesManager;
 	import org.apache.flex.events.Event;
 	
     /**
@@ -163,5 +164,40 @@ package org.apache.flex.html.beads
 			textField.width = DisplayObject(_strand).width;
 			textField.height = DisplayObject(_strand).height;
 		}
-	}
+
+        /**
+         *  @copy org.apache.flex.core.IBeadView#viewHeight
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get viewHeight():Number
+        {
+            // textfields with autosize collapse if no text
+            if (_textField.text == "" && _textField.autoSize != "none")
+                return ValuesManager.valuesImpl.getValue(_strand, "fontSize") + 4;
+
+            return _textField.height;
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IBeadView#viewWidth
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get viewWidth():Number
+        {
+            // textfields with autosize collapse if no text
+            if (_textField.text == "" && _textField.autoSize != "none")
+                return 0;
+            
+            return _textField.width;
+        }
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/UpArrowButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/UpArrowButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/UpArrowButtonView.as
index b7da755..10101ed 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/UpArrowButtonView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/UpArrowButtonView.as
@@ -22,6 +22,7 @@ package org.apache.flex.html.beads
 	import flash.display.Shape;
 	import flash.display.SimpleButton;
 
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IStrand;
     import org.apache.flex.core.IBeadView;
 	
@@ -34,7 +35,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class UpArrowButtonView implements IBeadView
+	public class UpArrowButtonView extends BeadViewBase implements IBeadView
 	{
         /**
          *  Constructor.
@@ -70,8 +71,6 @@ package org.apache.flex.html.beads
 			g.endFill();
 		}
 		
-		private var _strand:IStrand;
-		
 		private var shape:Shape;
 		
         /**
@@ -82,9 +81,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			shape = new Shape();
 			shape.graphics.beginFill(0xCCCCCC);
 			shape.graphics.drawRect(0, 0, 16, 16);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarThumbView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarThumbView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarThumbView.as
index 201e421..79794d8 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarThumbView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarThumbView.as
@@ -23,6 +23,7 @@ package org.apache.flex.html.beads
 	import flash.display.SimpleButton;
     import flash.display.DisplayObject;
 
+    import org.apache.flex.core.BeadViewBase;
     import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
@@ -37,7 +38,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class VScrollBarThumbView implements IBeadView
+	public class VScrollBarThumbView extends BeadViewBase implements IBeadView
 	{
         /**
          *  Constructor.
@@ -68,8 +69,6 @@ package org.apache.flex.html.beads
 			g.lineTo(12, hh + 4);
 		}
 		
-		private var _strand:IStrand;
-		
 		private var shape:Shape;
 		
         /**
@@ -80,9 +79,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
             
             upView = new Shape();
             downView = new Shape();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarTrackView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarTrackView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarTrackView.as
index 4f12d8b..884c57b 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarTrackView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/VScrollBarTrackView.as
@@ -23,6 +23,7 @@ package org.apache.flex.html.beads
 	import flash.display.Shape;
 	import flash.display.SimpleButton;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
@@ -36,7 +37,7 @@ package org.apache.flex.html.beads
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class VScrollBarTrackView implements IBeadView
+	public class VScrollBarTrackView extends BeadViewBase implements IBeadView
 	{
         /**
          *  Constructor.
@@ -81,8 +82,6 @@ package org.apache.flex.html.beads
 			
 		}
 		
-		private var _strand:IStrand;
-		
 		private var shape:Shape;
 		
         /**
@@ -93,9 +92,9 @@ package org.apache.flex.html.beads
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			SimpleButton(value).addEventListener("heightChanged", heightChangeHandler);
 			shape = new Shape();
 			SimpleButton(value).upState = upView;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7027ad80/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
index 94bd44f..dedce67 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
@@ -22,6 +22,7 @@ package org.apache.flex.maps.google.beads
 	import flash.html.HTMLLoader;
 	import flash.net.URLRequest;
 	
+    import org.apache.flex.core.BeadViewBase;
 	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
@@ -42,7 +43,7 @@ package org.apache.flex.maps.google.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class MapView implements IBeadView
+	public class MapView extends BeadViewBase implements IBeadView
 	{
 		/**
 		 *  Constructor.
@@ -68,9 +69,9 @@ package org.apache.flex.maps.google.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function set strand(value:IStrand):void
+		override public function set strand(value:IStrand):void
 		{
-			_strand = value;
+			super.strand = value;
 			
 			_loader = new HTMLLoader();
 			_loader.x = 0;


Mime
View raw message