Transferred from the Adobe Open Source Subversion Repository

Revision: 3430
Author:   gruehle@adobe.com
Date:     2008-09-30T23:43:13.377931Z

Log Message:
-----------
This is a collection of minor component changes, done for consistency.

* Data is always "pushed" into skin parts. We were doing this in some places like ItemsComponent.contentGroup, but not in other places. Affected components are TextInput, TextArea, NumericStepper, and Button.

* Button (and every subclass) has an optional "labelField" SkinPart. The Button "label" property is pushed into this part if it is defined.

* Added skin states to the following components:
  TrackBase (includes H/VScrollBar and H/VSlider): States "normal" and "disabled".
  Spinner (includes NumericStepper): States "normal" and "disabled".
  ContainerBase (includes ItemsComponent, Selector, and List): States "normal" and "disabled".

  The appearance of "disabled" states is controlled by the skin. The behavior of "disabled" states is still controlled by the component (ie ScrollBar disables the thumb, track and arrow when it is disabled).

* Added new ContainerBase class, which is the base class for ItemsComponent and DataComponent. The base class manages the skin states and puts up a mouse shield when disabled.

* Thumb positioning code in slider and scrollbar always rounds to the nearest pixel boundary. Sub-pixel positioning makes the thumbs look blurry.

* TextView measurement is rounded to integer values. It was commonly returning non-integer values which was causing subsequent components in relative layouts to be positioned on sub-pixel boundaries.

Bugs: SDK-16933 Make Label be an optional part of Button and related components
QE: The pixel alignment changes may result in bitmap comparison failures. The bitmaps should be regenerated with the pixel alignment. There should be no functional changes to any of the components.
Reviewer: Chet, Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DataComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ItemsComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SelectorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ComplexPanelSkin.mxml</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1281296 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/VSlider.as
+++ frameworks/projects/spark/src/spark/components/VSlider.as
@@ -104,8 +104,8 @@
             }

             thumbLItem.setActualPosition(thumbLItem.actualPosition.x,
-                                         trackPos + trackLen - thumbPos
-                                         - thumbLItem.actualSize.y);
+                                         Math.round(trackPos + trackLen - thumbPos
+                                         - thumbLItem.actualSize.y));
         }
     }


increase update time for splinepath

increase update time for splinepath

--- bin/Data/Scripts/Editor/EditorViewDebugIcons.as
+++ bin/Data/Scripts/Editor/EditorViewDebugIcons.as
@@ -13,8 +13,12 @@

 Node@ debugIconsNode = null;

-int stepDebugIconsUpdate = 40; //ms
+int stepDebugIconsUpdate = 60; //ms
 int timeToNextDebugIconsUpdate = 0;
+
+int stepDebugIconsUpdateSplinePath = 500; //ms
+int timeToNextDebugIconsUpdateSplinePath = 0;
+
 const int splinePathResolution = 16;
 bool debugIconsShow = true;
 Vector2 debugIconsSize = Vector2(0.025, 0.025);
@@ -311,59 +315,65 @@
         }
     }

-    if (debugIconsSetSplinesPoints !is null)
-    {
-        debugIconsSetSplinesPoints.enabled = debugIconsShow;
-
-        // Collect all scene's SplinePath and add it
-        Array<Node@> nodes = editorScene.GetChildrenWithComponent("SplinePath", true);
-
-        if (nodes.length > 0)
-        {
-            debugIconsSetSplinesPoints.numBillboards = nodes.length * splinePathResolution;
-
-            float splineStep = 1.0f / splinePathResolution;
-
-            for(int i=0; i < nodes.length; i++)
-            {
-
-                SplinePath@ sp = nodes[i].GetComponent("SplinePath");
-                if(sp !is null)
+
+    if (timeToNextDebugIconsUpdateSplinePath < time.systemTime)
+    {
+        if (debugIconsSetSplinesPoints !is null)
+        {
+            debugIconsSetSplinesPoints.enabled = debugIconsShow;
+
+            // Collect all scene's SplinePath and add it
+            Array<Node@> nodes = editorScene.GetChildrenWithComponent("SplinePath", true);
+
+            if (nodes.length > 0)
+            {
+                debugIconsSetSplinesPoints.numBillboards = nodes.length * splinePathResolution;
+
+                float splineStep = 1.0f / splinePathResolution;
+
+                for(int i=0; i < nodes.length; i++)
                 {
-                    Vector3 splinePoint;
-                    // Create path
-                    for(int step=0; step < splinePathResolution; step++)
+
+                    SplinePath@ sp = nodes[i].GetComponent("SplinePath");
+                    if(sp !is null)
                     {
-                        splinePoint = sp.GetPoint(splineStep * step);
-
-                        float distance = (camPos - splinePoint).length;
-                        int index = (i * splinePathResolution) + step;
-                        Billboard@ bb = debugIconsSetSplinesPoints.billboards[index];
-                        bb.position = splinePoint;
-                        bb.size = debugIconsSizeSmall * distance;
-
-                        if (step == 0)
+                        Vector3 splinePoint;
+                        // Create path
+                        for(int step=0; step < splinePathResolution; step++)
                         {
-                            bb.color = Color(1,1,0);
-                            bb.size = debugIconsSize * distance;
+                            splinePoint = sp.GetPoint(splineStep * step);
+
+                            float distance = (camPos - splinePoint).length;
+                            int index = (i * splinePathResolution) + step;
+                            Billboard@ bb = debugIconsSetSplinesPoints.billboards[index];
+                            bb.position = splinePoint;
+                            bb.size = debugIconsSizeSmall * distance;
+
+                            if (step == 0)
+                            {
+                                bb.color = Color(1,1,0);
+                                bb.size = debugIconsSize * distance;
+                            }
+                            else if ((step+1) >= (splinePathResolution - splineStep))
+                            {
+                                bb.color = Color(0,1,0);
+                                bb.size = debugIconsSize * distance;
+                            }
+                            else
+                            {
+                                bb.color = Color(1,1,1);
+                                bb.size = debugIconsSizeSmall * distance;
+                            }
+                            bb.enabled = sp.enabled;
                         }
-                        else if ((step+1) >= (splinePathResolution - splineStep))
-                        {
-                            bb.color = Color(0,1,0);
-                            bb.size = debugIconsSize * distance;
-                        }
-                        else
-                        {
-                            bb.color = Color(1,1,1);
-                            bb.size = debugIconsSizeSmall * distance;
-                        }
-                        bb.enabled = sp.enabled;
-                    }
-                }
-            }
-
-            debugIconsSetSplinesPoints.Commit();
-        }
+                    }
+                }
+
+                debugIconsSetSplinesPoints.Commit();
+            }
+        }
+
+        timeToNextDebugIconsUpdateSplinePath = time.systemTime + stepDebugIconsUpdateSplinePath;
     }


Mic settings

Mic settings

--- MicrophoneMain.as
+++ MicrophoneMain.as
@@ -54,9 +54,10 @@
             invoke("__onLog", "No microphones detected.");
             return;
         }
-        mic = Microphone.getMicrophone();
-        mic.gain = 100;
+        mic = Microphone["getEnhancedMicrophone"]();
+        mic.gain = 50;
         mic.rate = 44;
+        mic.setSilenceLevel(0);
     }

     private function enable():void {


- change: Further fixes to focus handling

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@749 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/core/FocusManager.as
+++ src/reprise/core/FocusManager.as
@@ -11,12 +11,13 @@

 package reprise.core
 {
-	import reprise.utils.DisplayListUtil;
 	import reprise.ui.DocumentView;
 	import reprise.ui.UIObject;
+	import reprise.utils.DisplayListUtil;

 	import flash.display.DisplayObject;
 	import flash.events.FocusEvent;
+	import flash.events.MouseEvent;
 	import flash.ui.Keyboard;
 	import flash.utils.getTimer;

@@ -46,11 +47,33 @@
 		public function FocusManager(document : DocumentView)
 		{
 			m_document = document;
-			document.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, self_keyFocusChange);
-			document.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, self_mouseFocusChange);
-			document.addEventListener(FocusEvent.FOCUS_IN, self_focusIn);
+			document.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, document_keyFocusChange);
+			document.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, document_mouseFocusChange);
+			document.addEventListener(FocusEvent.FOCUS_IN, document_focusIn);
+			document.addEventListener(MouseEvent.MOUSE_DOWN, document_mouseDown);
 		}

+		/**
+		 * Because of the entirely borked focus management of the Flash Player, we need to make
+		 * sure that we really, really get the focus under all conditions. As it turns out, in
+		 * certain cases, the player doesn't even dispatch a FOCUS_IN event for TextFields when
+		 * they are clicked.
+		 * This method catches these cases.
+		 */
+		protected function document_mouseDown(event : MouseEvent) : void
+		{
+			if (m_focus)
+			{
+				return;
+			}
+			var element : UIObject = DisplayListUtil.locateElementContainingDisplayObject(
+				DisplayObject(event.target), true);
+			if (element)
+			{
+				setFocusedElement(element, FOCUS_METHOD_MOUSE);
+			}
+		}
+
 		reprise function setFocusedElement(element : UIObject, method : String) : Boolean
 		{
 			if (m_focus && m_focus == element)
@@ -61,6 +84,10 @@
 			{
 				m_focus.setFocus(false, method);
 			}
+			else
+			{
+				m_document.removeEventListener(MouseEvent.MOUSE_DOWN, document_mouseDown);
+			}
 			m_focus = element;
 			if (element && element.document == m_document)
 			{
@@ -68,13 +95,16 @@
 				element.setFocus(true, method);
 				return true;
 			}
+			//else
+			m_focus = null;
+			m_document.addEventListener(MouseEvent.MOUSE_DOWN, document_mouseDown);
 			return false;
 		}

 		/***************************************************************************
 		*							protected methods							   *
 		***************************************************************************/
-		protected function self_keyFocusChange(e:FocusEvent):void
+		protected function document_keyFocusChange(e:FocusEvent):void
 		{
 			if (m_inFocusHandling)
 			{
@@ -110,7 +140,7 @@
 	        }
 			m_inFocusHandling = false;
 		}
-		protected function self_mouseFocusChange(event : FocusEvent) : void
+		protected function document_mouseFocusChange(event : FocusEvent) : void
 		{
 			if (m_inFocusHandling)
 			{
@@ -129,8 +159,9 @@
 			m_inFocusHandling = false;
 		}

-		protected function self_focusIn(event : FocusEvent) : void
+		protected function document_focusIn(event : FocusEvent) : void
 		{
+			log("event: " + (event.target));
 			if (m_inFocusHandling)
 			{
 				return;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
147 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1274065 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/rpc/AsyncToken.as
+++ frameworks/projects/rpc/src/mx/rpc/AsyncToken.as
@@ -28,6 +28,11 @@
  *  Dispatched when a property of the channel set changes.
  *
  *  @eventType mx.events.PropertyChangeEvent.PROPERTY_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="propertyChange", type="mx.events.PropertyChangeEvent")]

@@ -37,6 +42,11 @@
  *  for an individual call.
  *  The AsyncToken can be referenced in ResultEvent and
  *  FaultEvent from the token property.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public dynamic class AsyncToken extends EventDispatcher
 {
@@ -50,6 +60,11 @@
      * Constructs an instance of the token with the specified message.
      *
      * @param message The message with which the token is associated.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function AsyncToken(message:IMessage=null)
     {
@@ -71,6 +86,11 @@

     /**
      *  Provides access to the associated message.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get message():IMessage
     {
@@ -108,6 +128,11 @@
      *
      * Note that this will not prevent the service or operation's
      * result property from being assigned.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	public function get responders():Array
 	{
@@ -126,6 +151,11 @@
      * Once the result property on the token has been assigned
      * it will be strictly equal to the result property on the associated
      * ResultEvent.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get result():Object
     {
@@ -146,6 +176,11 @@
 	 *  @param responder A handler which will be called when the asynchronous request completes.
 	 *
 	 *  @see	mx.rpc.IResponder
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	public function addResponder(responder:IResponder):void
 	{
@@ -158,6 +193,11 @@
     /**
      * Determines if this token has at least one mx.rpc.IResponder registered.
      * @return true if at least one responder has been added to this token.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function hasResponder():Boolean
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1251433 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/automation/src/mx/automation/delegates/controls/ListItemRendererAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/ListItemRendererAutomationImpl.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  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
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


fixed issue where spaces in path on non-Windows platforms were not properly escaped (references BowlerHatLLC/vscode-nextgenas#151)

--- src/ASConfigC.as
+++ src/ASConfigC.as
@@ -619,7 +619,7 @@
 			{
 				//on other platforms, a backslash preceding a string will
 				//include the space in the path
-				path = path.replace(/\ /g, "\\ ");
+				path = path.replace(/[ ]/g, "\\ ");
 			}
 			return path;
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17193
Author:   chiedozi@adobe.com
Date:     2010-08-04T23:30:00.595161Z

Log Message:
-----------
Changed the interaction model behind focus and ViewNavigator.  When a view is activated, if the stage has no focus or the focused item is no longer on the display list, the focus is set to the active view.  In all other instances, the stage focus remains as is.

QE notes:
Doc notes:
Bugs: SDK-27086
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264337 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
@@ -754,6 +754,9 @@

                 navigatorProperties = newNavigatorProperties;
                 navigator.landscapeOrientation = landscapeOrientation;
+
+                // Set the stage focus to the navigator
+                systemManager.stage.focus = navigator;
             }
         }


remove getID() from AS3 side

remove getID() from AS3 side

--- actionscript/src/com/freshplanet/ane/AirDeviceId/AirDeviceId.as
+++ actionscript/src/com/freshplanet/ane/AirDeviceId/AirDeviceId.as
@@ -42,19 +42,7 @@
 		public static function get instance() : AirDeviceId {
 			return _instance ? _instance : new AirDeviceId();
 		}
-
-		/**
-		 * Get device id
-		 * @param salt a developer specific salt
-		 */
-		public function getID( salt:String ) : String {
-
-			if (isSupported)
-				return _context.call( 'getID', salt ) as String;
-
-			return null;
-		}
-
+
 		/**
 		 * Get vendor identifier
 		 * @return


Script fix

Script fix

--- Scripts/GameState.as
+++ Scripts/GameState.as
@@ -501,7 +501,7 @@
 							int min = entry.Score / 60;
 							int sec = entry.Score % 60;

-							score = (min < 10 ? "0" : "") + min + ":" + (sec < 10 ? "0" : "") + sec;
+							score = "" + (min < 10 ? "0" : "") + min + ":" + (sec < 10 ? "0" : "") + sec;
 						}
 						else
 							score = entry.Score;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5047
Author:   jszeto@adobe.com
Date:     2009-02-24T01:26:03.149191Z

Log Message:
-----------
Change default weight of Stroke from 0 to 1

SDK-19000 - Getting the default weight property of a Stroke returns 0 instead of 1

Changed default value from 0 to 1

QE Notes: This changes the size of scaled graphic elements
Doc Notes:
Bugs: SDK-19000
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261197 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as
+++ frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as
@@ -79,7 +79,7 @@
 	 *  The default value is 0x000000 (black).
 	 *
 	 *  @param weight Specifies the line weight, in pixels.
-	 *  The default value is 0.
+	 *  The default value is 1.
 	 *
 	 *  @param alpha Specifies the alpha value in the range 0.0 to 1.0.
 	 *  The default value is 1.0 (opaque).
@@ -112,7 +112,7 @@
 	 *  The default value is 0.
 	 */
 	public function SolidColorStroke(color:uint = 0x000000,
-	                                 weight:Number = 0,
+	                                 weight:Number = 1,
 						             alpha:Number = 1.0,
 						             pixelHinting:Boolean = false,
 						             scaleMode:String = "normal",


Transferred from the Adobe Open Source Subversion Repository

Revision: 10464
Author:   rfrishbe@adobe.com
Date:     2009-09-21T17:40:30.663638Z

Log Message:
-----------
Removing support in Flex framework for compatibility version < 3.  We won't support compatibility-version 2 or 2.01 anymore.  We only keep compatibility-version for one full release, so for Flex 4, we only support compatibility-version = 3.x.

This should reduce our code-size some as we no longer need this old code.  I didn't clean up the compiler's support for compatibility-versioning as it didn't seem worth the effort.

QE notes: -
Doc notes: -
Bugs: SDK-15360
Reviewer: Kevin
Tests run: checkintests, Joan ran all mustella tests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserYearArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PanelSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/Flex.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1268979 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/controls/menuClasses/MenuBarItem.as
+++ frameworks/projects/mx/src/mx/controls/menuClasses/MenuBarItem.as
@@ -15,7 +15,6 @@
 import flash.display.DisplayObject;
 import flash.text.TextLineMetrics;
 import mx.controls.MenuBar;
-import mx.core.FlexVersion;
 import mx.core.IFlexDisplayObject;
 import mx.core.IFlexModuleFactory;
 import mx.core.IFontContextComponent;
@@ -183,9 +182,6 @@
      */
     override public function get baselinePosition():Number
     {
-		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-			return super.baselinePosition;
-
 		if (!validateBaselinePosition())
 			return NaN;


#SUP-146 #time 1h #comment send "flavorAssetId" parameter to baseEntry.getContextData request when passing flavorId flashvar

--- kdp3Lib/src/com/kaltura/kdpfl/controller/media/GetMediaCommand.as
+++ kdp3Lib/src/com/kaltura/kdpfl/controller/media/GetMediaCommand.as
@@ -176,6 +176,11 @@
 						keedp.flavorTags = 	_flashvars.flavorTags;
 					}

+					if (_flashvars.flavorId)
+					{
+						keedp.flavorAssetId = _flashvars.flavorId;
+					}
+
 					var getExtraData : BaseEntryGetContextData = new BaseEntryGetContextData( _mediaProxy.vo.entry.id , keedp );
 					if (_isRefid) {
 						mr.addRequestParam(ind + ":entryId","{1:result:objects:0:id}");


Fixed tooltips on nonexistent buttons not vanishing (undo, redo, reset, load

--- src/LevelStates/LevelState.as
+++ src/LevelStates/LevelState.as
@@ -670,12 +670,12 @@
 		}

 		protected function checkMenuState():void {
-			undoButton.exists = canUndo();
-			redoButton.exists = canRedo();
+			undoButton.setExists(canUndo());
+			redoButton.setExists(canRedo());
 			if (loadButton) {
 				var successSave:String = findSuccessSave();
-				loadButton.exists = successSave != savedString && successSave != null;
-				resetButton.exists = savedString && savedString != RESET_SAVE;
+				loadButton.setExists(successSave != savedString && successSave != null);
+				resetButton.setExists(savedString && savedString != RESET_SAVE);
 			}

 			checkCursorState();


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1260856 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/formatters/DateFormatter.as
+++ frameworks/projects/framework/src/mx/formatters/DateFormatter.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  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
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1273846 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/messaging/management/Attribute.as
+++ frameworks/projects/rpc/src/mx/messaging/management/Attribute.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.messaging.management
 {


It's ok to BE null, it just can't be set to null.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@206 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/FloatingTextAnimation.as
+++ src/as/com/threerings/flash/FloatingTextAnimation.as
@@ -13,7 +13,9 @@
         format :TextFormat = null) :FloatingTextAnimation
     {
         var fta :FloatingTextAnimation = new FloatingTextAnimation();
-        fta.defaultTextFormat = format;
+        if (format != null) {
+            fta.defaultTextFormat = format;
+        }
         fta.autoSize = TextFieldAutoSize.CENTER;
         fta.text = text;
         fta.width = fta.textWidth + 5;


Reverted bitops-nsieve-bits.as to it's initial state (before increasing loop iterations to measure  performance).

--- src/avm2/tests/sunspider-typed/bitops-nsieve-bits.as
+++ src/avm2/tests/sunspider-typed/bitops-nsieve-bits.as
@@ -28,53 +28,46 @@
 //
 //  Contributed by Ian Osgood

-package {
-        function pad(n:int, width:int):String {
-          var s:String = n.toString();
-          while (s.length < width) s = ' ' + s;
-          return s;
-        }
+function pad(n,width) {
+  var s = n.toString();
+  while (s.length < width) s = ' ' + s;
+  return s;
+}

-        function primes(isPrime:Array, n:int):int {
-          var i:int, count:int = 0, m:int = 10000<<n, size:int = m+31>>5;
+function primes(isPrime, n) {
+  var i, count = 0, m = 10000<<n, size = m+31>>5;

-          for (i=0; i<size; i++) isPrime[i] = 0xffffffff;
+  for (i=0; i<size; i++) isPrime[i] = 0xffffffff;

-          for (i=2; i<m; i++)
-            if (isPrime[i>>5] & 1<<(i&31)) {
-              for (var j:int=i+i; j<m; j+=i)
-                isPrime[j>>5] &= ~(1<<(j&31));
-              count++;
-            }
-          return count;
-        }
+  for (i=2; i<m; i++)
+    if (isPrime[i>>5] & 1<<(i&31)) {
+      for (var j=i+i; j<m; j+=i)
+        isPrime[j>>5] &= ~(1<<(j&31));
+      count++;
+    }
+  return count;
+}

-        function sieve():int {
-            var res:int=0;
-            for (var i:int = 4; i <= 12; i++) {
-                var isPrime:Array = new Array((10000<<i)+31>>5);
-                print(isPrime.length);
-                res=primes(isPrime, i);
-            }
-            return res;
-        }
+function sieve() {
+    var res;
+    for (var i = 4; i <= 4; i++) {
+        var isPrime = new Array((10000<<i)+31>>5);
+        res=primes(isPrime, i);
+    }
+    return res;
+}

-
-        var start:Number = new Date();
-        var res:int = sieve();
-        var totaltime:Number = new Date() - start;
+var start=new Date();
+var res=sieve();
+var totaltime=new Date()-start;

-
-
-        if (res==2488465)
-          print("PASSED res=" + res);
-        else
-          print("FAILED nsieveBits expecting 2488465 got "+res);
-}
+if (res==2488465)
+  print("PASSED res=" + res);
+else
+  print("FAILED nsieveBits expecting 2488465 got "+res);
 /*
         if (res==14683)
           print("metric time " + totaltime);
         else
           print("error nsieveBits expecting 14683 got "+res);
-*/
-
+*/


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1252794 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/ChartsClasses.as
+++ frameworks/projects/charts/src/ChartsClasses.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package
+{
+
+/**
+ *  @private
+ *  This class is used to link additional classes into framework.swc
+ *  beyond those that are found by dependecy analysis starting
+ *  from the classes specified in manifest.xml.
+ */
+internal class ChartsClasses
+{
+	import mx.charts.renderers.CircleItemRenderer; CircleItemRenderer;
+	import mx.charts.renderers.CrossItemRenderer; CrossItemRenderer;
+	import mx.charts.renderers.DiamondItemRenderer; DiamondItemRenderer;
+	import mx.charts.renderers.LineRenderer; LineRenderer;
+	import mx.charts.renderers.ShadowBoxItemRenderer; ShadowBoxItemRenderer;
+	import mx.charts.renderers.ShadowLineRenderer; ShadowLineRenderer;
+	import mx.charts.renderers.TriangleItemRenderer; TriangleItemRenderer;
+	// Maintain alphabetical order
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1268198 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/controls/Label.as
+++ frameworks/projects/mx/src/mx/controls/Label.as
@@ -0,0 +1,1532 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2002-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls
+{
+
+import flash.display.DisplayObject;
+import flash.display.Graphics;
+import flash.events.Event;
+import flash.geom.Rectangle;
+import flash.text.StyleSheet;
+import flash.text.TextFormat;
+import flash.text.TextLineMetrics;
+import mx.controls.listClasses.BaseListData;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.core.FlexVersion;
+import mx.core.IDataRenderer;
+import mx.core.IFlexModuleFactory;
+import mx.core.IFontContextComponent;
+import mx.core.IUITextField;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+import mx.styles.StyleManager;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the data property changes.
+ *
+ *
When you use a component as an item renderer,
+ *  the data property contains the data to display.
+ *  You can listen for this event and update the component
+ *  when the data property changes.

+ *
+ *  @eventType mx.events.FlexEvent.DATA_CHANGE
+ */
+[Event(name="dataChange", type="mx.events.FlexEvent")]
+
+/**
+ *  Dispatched when a user clicks a hyperlink in an
+ *  HTML-enabled text field, where the URL begins with "event:".
+ *  The remainder of the URL after
+ *  "event:" is placed in the text property of the link event object.
+ *
+ *
When you handle the link event, the hyperlink is not automatically executed;
+ *  you need to execute the hyperlink from within your event handler.
+ *  You typically use the navigateToURL() method to execute the hyperlink.
+ *  This allows you to modify the hyperlink, or even prohibit it from occurring,
+ *  in your application.

+ *
+ *
The Label control must have the selectable property set
+ *  to true to generate the link event.

+ *
+ *  @eventType flash.events.TextEvent.LINK
+ */
+[Event(name="link", type="flash.events.TextEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../styles/metadata/TextStyles.as"
+
+/**
+ *  Number of pixels between the left of the Label and
+ *  the left of the text.
+ *
+ *  @default 0
+ */
+[Style(name="paddingLeft", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between the right of the Label and
+ *  the right of the text.
+ *
+ *  @default 0
+ */
+[Style(name="paddingRight", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between the bottom of the Label and
+ *  the bottom of the text.
+ *
+ *  @default 0
+ */
+[Style(name="paddingBottom", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between the top of the Label and
+ *  the top of the text.
+ *
+ *  @default 0
+ */
+[Style(name="paddingTop", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Color of the Label object's opaque background.
+ *  The default value is undefined,
+ *  which means that the background is transparent.
+ */
+//[Style(name="backgroundColor", type="uint", format="Color", inherit="no")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="focusEnabled", kind="property")]
+[Exclude(name="focusPane", kind="property")]
+[Exclude(name="mouseFocusEnabled", kind="property")]
+[Exclude(name="tabEnabled", kind="property")]
+[Exclude(name="focusBlendMode", kind="style")]
+[Exclude(name="focusSkin", kind="style")]
+[Exclude(name="focusThickness", kind="style")]
+[Exclude(name="themeColor", kind="style")]
+[Exclude(name="setFocus", kind="method")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[DefaultBindingProperty(destination="text")]
+
+[IconFile("Label.png")]
+
+/**
+ *  The Label control displays a single line of noneditable text.
+ *  Use the Text control to create blocks of multiline
+ *  noneditable text.
+ *
+ *
You can format Label text by using HTML tags,
+ *  which are applied after the Label control's CSS styles are applied.
+ *  You can also put padding around the four sides of the text.
+ *  The text of a Label is nonselectable by default,
+ *  but you can make it selectable.

+ *
+ *
If a Label is sized to be smaller than its text,
+ *  you can control whether the text is simply clipped or whether
+ *  it is truncated with a localizable string such as "...".
+ *  (Note: Plain text can be truncated, but HTML text cannot.)
+ *  If the entire text of the Label, either plain or HTML,
+ *  is not completely visible, and you haven't assigned a tooltip
+ *  to the Label, an automatic "truncation tip"
+ *  displays the complete plain text when a user holds the mouse over the Label control.

+ *
+ *
Label controls do not have backgrounds or borders
+ *  and cannot take focus.

+ *
+ *
The Label control has the following default sizing characteristics:

+ *

+ *

+ *           Characteristic
+ *           Description
+ *

+ *

+ *           Default size
+ *           Width and height large enough for the text
+ *

+ *

+ *           Minimum size
+ *           0 pixels
+ *

+ *

+ *           Maximum size
+ *           10000 by 10000 pixels
+ *

+ *

+ *
+ *  @mxml
+ *
+ *
The <mx:Label> tag inherits all of the tag attributes
+ *  of its superclass, and adds the following tag attributes:

+ *
+ *

+ *  <mx:Label
+ *    Properties
+ *    condenseWhite="true|false"
+ *    data="null"
+ *    htmlText=""
+ *    listData="null"
+ *    selectable="true|false"
+ *    text=""
+ *    truncateToFit="true|false"
+ *
+ *    Styles
+ *    color="0x0B333C"
+ *    disabledColor="0xAAB3B3"
+ *    fontAntiAliasType="advanced|normal"
+ *    fontFamily="Verdana"
+ *    fontGridFitType="pixel|none|subpixel"
+ *    fontSharpness="0"
+ *    fontSize="10"
+ *    fontStyle="normal|italic"
+ *    fontThickness="0"
+ *    fontWeight="normal|bold"
+ *    paddingLeft="0"
+ *    paddingRight="0"
+ *    paddingTop="0"
+ *    paddingBottom="0"
+ *    textAlign="left|right|center"
+ *    textDecoration="none|underline"
+ *    textIndent="0"
+ *
+ *    Events
+ *    dataChange="No default"
+ *  />
+ *

+ *
+ *  @includeExample examples/LabelExample.mxml
+ *
+ *  @see mx.controls.Text
+ *  @see mx.controls.TextInput
+ *  @see mx.controls.TextArea
+ *  @see mx.controls.RichTextEditor
+ */
+public class Label extends UIComponent
+                   implements IDataRenderer, IDropInListItemRenderer,
+                   IListItemRenderer, IFontContextComponent
+
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Implementation notes
+    //
+    //--------------------------------------------------------------------------
+
+    /*
+        A Label has a single internal child, a UITextField which displays
+        the Label's text or htmlText (whichever was last set).
+
+        See the implementation notes for UITextField to understand
+        more about how a Flash TextField works.
+
+        The 'text' and 'htmlText' properties of Label work somewhat
+        differently from those of a native TextField.
+
+        Because Flex uses invalidation, setting either 'text' or 'htmlText'
+        does very little work; the setter only sets a storage var and some
+        flags and dispatches an event to trigger bindings to update.
+
+        In fact, the setters are so fast that calling them in a loop
+        does not create a performance problem.
+        For example, if you have a Text component (which is a subclass of
+        Label intended for displaying multiple lines of text) you can
+        write code like myTextComponent.text += moreStuff[i] inside a
+        loop.
+
+        However, the Flex invalidation approach means that the 'text' and
+        'htmlText' properties are not coupled as immediately as with
+        a TextField.
+
+        If you set the 'text' of a Label, you can immediately get it back,
+        but if you immediately get the 'htmlText' it will be null,
+        indicating that it is invalid and will be calculated
+        the next time the LayoutManager runs.
+        Similarly, if you set the 'htmlText' of a Label, you can immediately
+        get back exactly what you set, but the 'text' will be null,
+        again an indication that it is invalid and will be calculated
+        the next time the LayoutManager runs.
+
+        Later, when the LayoutManager runs to re-validate the Label,
+        either the 'text' or the 'htmlText' that you set -- whichever one
+        was set last -- will be pushed down into the TextField.
+        After that happens, the Label's 'text' and 'htmlText' properties
+        will be the same as those of the TextFields; the 'text' and the
+        'htmlText' will be in sync with each other, but they will no
+        longer necessarily be what you set.
+
+        If you need to force the LayoutManager to run immediately,
+        you can call validateNow() on the Label.
+
+        Here are some examples of how these interactions work:
+
+        myLabel.htmlText = "This is bold."
+        trace(myLabel.htmlText);
+            This is bold.
+        trace(myLabel.text);
+            null
+        myLabel.validateNow();
+        trace(myLabel.htmlText);
+            <TEXTFORMAT LEADING="2">
+

+
+            This is bold.
+
+

+            </TEXTFORMAT>
+        trace(myLabel.text);
+            This is bold.
+    */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function Label()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Flag that will block default data/listData behavior.
+     */
+    private var textSet:Boolean;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     *  The baselinePosition of a Label is calculated for its textField.
+     */
+    override public function get baselinePosition():Number
+    {
+        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+        {
+            if (!textField)
+                return NaN;
+
+            // Ensure that textField.y is accurate.
+            validateNow();
+
+            var t:String = isHTML ? explicitHTMLText : text;
+
+            if (t == "")
+                t = " ";
+
+            // Measure the width and height of the text to be displayed.
+            // (This uses another TextField that isn't part of the
+            // DisplayObject hierarchy.)
+            var lineMetrics:TextLineMetrics = isHTML ?
+                                              measureHTMLText(t) :
+                                              measureText(t);
+
+            return textField.y + lineMetrics.ascent;
+        }
+
+        if (!validateBaselinePosition())
+            return NaN;
+
+        return textField.y + textField.baselinePosition;
+    }
+
+    //----------------------------------
+    //  enabled
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var enabledChanged:Boolean = false;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @private
+     */
+    override public function set enabled(value:Boolean):void
+    {
+        if (value == enabled)
+            return;
+
+        super.enabled = value;
+        enabledChanged = true;
+
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  textField
+    //----------------------------------
+
+    /**
+     *  The internal UITextField that renders the text of this Label.
+     */
+    protected var textField:IUITextField;
+
+    //----------------------------------
+    //  toolTip
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var toolTipSet:Boolean = false;
+
+    /**
+     *  @private
+     */
+    override public function set toolTip(value:String):void
+    {
+        super.toolTip = value;
+
+        toolTipSet = value != null;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  condenseWhite
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the condenseWhite property.
+     */
+    private var _condenseWhite:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var condenseWhiteChanged:Boolean = false;
+
+    [Bindable("condenseWhiteChanged")]
+    [Inspectable(category="General", defaultValue="false")]
+
+    /**
+     *  Specifies whether extra white space (spaces, line breaks,
+     *  and so on) should be removed in a Label control with HTML text.
+     *
+     *
The condenseWhite property affects only text set with
+     *  the htmlText property, not the text property.
+     *  If you set text with the text property,
+     *  condenseWhite is ignored.

+     *
+     *
If you set the condenseWhite property to true,
+     *  you must use standard HTML commands, such as <br>
+     *  and <p>, to place line breaks in the text field.

+     *
+     *  @default false;
+     */
+    public function get condenseWhite():Boolean
+    {
+        return _condenseWhite;
+    }
+
+    /**
+     *  @private
+     */
+    public function set condenseWhite(value:Boolean):void
+    {
+        if (value == _condenseWhite)
+            return;
+
+        _condenseWhite = value;
+        condenseWhiteChanged = true;
+
+        // Changing the condenseWhite property needs to trigger
+        // the same response as changing the htmlText property
+        // if this Label is displaying HTML.
+        if (isHTML)
+            htmlTextChanged = true;
+
+        invalidateProperties();
+        invalidateSize();
+        invalidateDisplayList();
+
+        dispatchEvent(new Event("condenseWhiteChanged"));
+    }
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the data property.
+     */
+    private var _data:Object;
+
+    [Bindable("dataChange")]
+    [Inspectable(environment="none")]
+
+    /**
+     *  Lets you pass a value to the component
+     *  when you use it in an item renderer or item editor.
+     *  You typically use data binding to bind a field of the data
+     *  property to a property of this component.
+     *
+     *
When you use the control as a drop-in item renderer or drop-in
+     *  item editor, Flex automatically writes the current value of the item
+     *  to the text property of this control.

+     *
+     *
You do not set this property in MXML.

+     *
+     *  @default null
+     *  @see mx.core.IDataRenderer
+     */
+    public function get data():Object
+    {
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+        var newText:*;
+
+        _data = value;
+
+        if (_listData)
+        {
+            newText = _listData.label;
+        }
+        else if (_data != null)
+        {
+            if (_data is String)
+                newText = String(_data);
+            else
+                newText = _data.toString();
+        }
+
+        if (newText !== undefined && !textSet)
+        {
+            text = newText;
+            textSet = false;
+        }
+
+        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+    }
+
+    //----------------------------------
+    //  fontContext
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     */
+    public function get fontContext():IFlexModuleFactory
+    {
+        return moduleFactory;
+    }
+
+    /**
+     *  @private
+     */
+    public function set fontContext(moduleFactory:IFlexModuleFactory):void
+    {
+        this.moduleFactory = moduleFactory;
+    }
+
+    //----------------------------------
+    //  htmlText
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the htmlText property.
+     *  In addition to being set in the htmlText setter,
+     *  it is automatically updated at two other times.
+     *  1. When the 'text' or 'htmlText' is pushed down into
+     *  the textField in commitProperties(), this causes
+     *  the textField to update its own 'htmlText'.
+     *  Therefore in commitProperties() we reset this storage var
+     *  to be in sync with the textField.
+     *  2. When the TextFormat of the textField changes
+     *  because a CSS style has changed (see validateNow()
+     *  in UITextField), the textField also updates its own 'htmlText'.
+     *  Therefore in textField_textFieldStyleChangeHandler()
+     */
+    private var _htmlText:String = "";
+
+    /**
+     *  @private
+     */
+    mx_internal var htmlTextChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  The last value of htmlText that was set.
+     *  We have to keep track of this because when you set the htmlText
+     *  of a TextField and read it back, you don't get what you set.
+     *  In general it will have additional HTML markup corresponding
+     *  to the defaultTextFormat set from the CSS styles.
+     *  If this var is null, it means that 'text' rather than 'htmlText'
+     *  was last set.
+     */
+    private var explicitHTMLText:String = null;
+
+    [Bindable("htmlTextChanged")]
+    [CollapseWhiteSpace]
+    [Inspectable(category="General", defaultValue="")]
+
+    /**
+     *  Specifies the text displayed by the Label control, including HTML markup that
+     *  expresses the styles of that text.
+     *  When you specify HTML text in this property, you can use the subset of HTML
+     *  tags that is supported by the Flash TextField control.
+     *
+     *
When you set this property, the HTML markup is applied
+     *  after the CSS styles for the Label instance are applied.
+     *  When you get this property, the HTML markup includes
+     *  the CSS styles.

+     *
+     *
For example, if you set this to be a string such as,
+     *  "This is an example of <b>bold</b> markup",
+     *  the text "This is an example of bold markup" appears
+     *  in the Label with whatever CSS styles normally apply.
+     *  Also, the word "bold" appears in boldface font because of the
+     *  <b> markup.

+     *
+     *
HTML markup uses characters such as < and >,
+     *  which have special meaning in XML (and therefore in MXML). So,
+     *  code such as the following does not compile:

+     *
+     *

+     *  <mx:Label htmlText="This is an example of <b>bold</b> markup"/>
+     *

+     *
+     *
There are three ways around this problem.

+     *
+     *

+     *
+     *

+     *
+     *
Set the htmlText property in an ActionScript method called as
+     *  an initialize handler:

+     *
+     *

+     *  <mx:Label id="myLabel" initialize="myLabel_initialize()"/>
+     *

+     *
+     *
where the myLabel_initialize method is in a script CDATA section:

+     *
+     *

+     *  <mx:Script>
+     *  <![CDATA[
+     *  private function myLabel_initialize():void {
+     *      myLabel.htmlText = "This is an example of <b>bold</b> markup";
+     *  }
+     *  ]]>
+     *  </mx:Script>
+     *
+     *

+     *
+     *
This is the simplest approach because the HTML markup
+     *  remains easily readable.
+     *  Notice that you must assign an id to the label
+     *  so you can refer to it in the initialize
+     *  handler.

+     *
+     *

+     *
+     *

+     *
+     *
Specify the htmlText property by using a child tag
+     *  with a CDATA section. A CDATA section in XML contains character data
+     *  where characters like < and > aren't given a special meaning.

+     *
+     *

+     *  <mx:Label>
+     *      <mx:htmlText><![CDATA[This is an example of <b>bold</b> markup]]></mx:htmlText>
+     *  <mx:Label/>
+     *

+     *
+     *
You must write the htmlText property as a child tag
+     *  rather than as an attribute on the <mx:Label> tag
+     *  because XML doesn't allow CDATA for the value of an attribute.
+     *  Notice that the markup is readable, but the CDATA section makes
+     *  this approach more complicated.

+     *
+     *

+     *
+     *

+     *
+     *
Use an hmtlText attribute where any occurences
+     *  of the HTML markup characters < and > in the attribute value
+     *  are written instead as the XML "entities" &lt;
+     *  and &gt;:

+     *
+     *

+     *  <mx:Label htmlText="This is an example of &lt;b&gt;bold&lt;/b&gt; markup"/&gt;
+     *

+     *
+     *  Adobe does not recommend this approach because the HTML markup becomes
+     *  nearly impossible to read.
+     *
+     *

+     *
+     *

+     *
+     *
If the condenseWhite property is true
+     *  when you set the htmlText property, multiple
+     *  white-space characters are condensed, as in HTML-based browsers;
+     *  for example, three consecutive spaces are displayed
+     *  as a single space.
+     *  The default value for condenseWhite is
+     *  false, so you must set condenseWhite
+     *  to true to collapse the white space.

+     *
+     *
If you read back the htmlText property quickly
+     *  after setting it, you get the same string that you set.
+     *  However, after the LayoutManager runs, the value changes
+     *  to include additional markup that includes the CSS styles.

+     *
+     *
Setting the htmlText property affects the text
+     *  property in several ways.
+     *  If you read the text property quickly after setting
+     *  the htmlText property, you get null,
+     *  which indicates that the text corresponding to the new
+     *  htmlText has not yet been determined.
+     *  However, after the LayoutManager runs, the text property
+     *  value changes to the htmlText string with all the
+     *  HTML markup removed; that is,
+     *  the value is the characters that the Label actually displays.

+     *
+     *
Conversely, if you set the text property,
+     *  any previously set htmlText is irrelevant.
+     *  If you read the htmlText property quickly after setting
+     *  the text property, you get null,
+     *  which indicates that the htmlText that corresponds to the new
+     *  text has not yet been determined.
+     *  However, after the LayoutManager runs, the htmlText property
+     *  value changes to the new text plus the HTML markup for the CSS styles.

+     *
+     *
To make the LayoutManager run immediately, you can call the
+     *  validateNow() method on the Label.
+     *  For example, you could set some htmlText,
+     *  call the validateNow() method, and immediately
+     *  obtain the corresponding text that doesn't have
+     *  the HTML markup.

+     *
+     *
If you set both text and htmlText properties
+     *  in ActionScript, whichever is set last takes effect.
+     *  Do not set both in MXML, because MXML does not guarantee that
+     *  the properties of an instance get set in any particular order.

+     *
+     *
Setting either text or htmlText property
+     *  inside a loop is a fast operation, because the underlying TextField
+     *  that actually renders the text is not updated until
+     *  the LayoutManager runs.

+     *
+     *
If you try to set this property to null,
+     *  it is set, instead, to the empty string.
+     *  If the property temporarily has the value null,
+     *  it indicates that the text has been recently set
+     *  and the corresponding htmlText
+     *  has not yet been determined.

+     *
+     *  @default ""
+     *
+     *  @see flash.text.TextField#htmlText
+     */
+    public function get htmlText():String
+    {
+        return _htmlText;
+    }
+
+    /**
+     *  @private
+     */
+    public function set htmlText(value:String):void
+    {
+        textSet = true;
+
+        // The htmlText property can't be set to null,
+        // only to the empty string, because if you set the htmlText
+        // of a TextField to null it throws an RTE.
+        // If the getter returns null, it means that 'text' was just set
+        // and the value of 'htmlText' isn't yet known, because the 'text'
+        // hasn't been committed into the textField and the 'htmlText'
+        // hasn't yet been read back out of the textField.
+        if (!value)
+            value = "";
+
+        if (isHTML && value == explicitHTMLText)
+            return;
+
+        _htmlText = value;
+        htmlTextChanged = true;
+
+        // The text property is unknown until commitProperties(),
+        // when we push the htmlText into the TextField and it
+        // calculates the text.
+        // But you can call validateNow() to make this happen right away.
+        _text = null;
+
+        explicitHTMLText = value;
+
+        invalidateProperties();
+        invalidateSize();
+        invalidateDisplayList();
+
+        // Trigger bindings to htmlText.
+        dispatchEvent(new Event("htmlTextChanged"));
+
+        // commitProperties() will dispatch a "valueCommit" event
+        // after the TextField determines the 'text' based on the
+        // 'htmlText'; this event will trigger any bindings to 'text'.
+    }
+
+    //----------------------------------
+    //  isHTML
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private function get isHTML():Boolean
+    {
+        return explicitHTMLText != null;
+    }
+
+    //----------------------------------
+    //  listData
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the listData property.
+     */
+    private var _listData:BaseListData;
+
+    [Bindable("dataChange")]
+    [Inspectable(environment="none")]
+
+    /**
+     *  When a component is used as a drop-in item renderer or drop-in
+     *  item editor, Flex initializes the listData property
+     *  of the component with the appropriate data from the List control.
+     *  The component can then use the listData property
+     *  to initialize the data property of the drop-in
+     *  item renderer or drop-in item editor.
+     *
+     *
You do not set this property in MXML or ActionScript;
+     *  Flex sets it when the component is used as a drop-in item renderer
+     *  or drop-in item editor.

+     *
+     *  @default null
+     *  @see mx.controls.listClasses.IDropInListItemRenderer
+     */
+    public function get listData():BaseListData
+    {
+        return _listData;
+    }
+
+    /**
+     *  @private
+     */
+    public function set listData(value:BaseListData):void
+    {
+        _listData = value;
+    }
+
+    //----------------------------------
+    //  selectable
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for selectable property.
+     */
+    private var _selectable:Boolean = false;
+
+    /**
+     *  @private
+     *  Change flag for selectable property.
+     */
+    private var selectableChanged:Boolean;
+
+    [Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  Specifies whether the text can be selected.
+     *  Making the text selectable lets you copy text from the control.
+     *
+     *
When a link event is specified in the Label control, the selectable property must be set
+     *  to true to execute the link event.

+     *
+     *  @default false;
+     */
+    public function get selectable():Boolean
+    {
+        return _selectable;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectable(value:Boolean):void
+    {
+        if (value == selectable)
+            return;
+
+        _selectable = value;
+        selectableChanged = true;
+
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  styleSheet
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    mx_internal function get styleSheet():StyleSheet
+    {
+        return textField.styleSheet;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function set styleSheet(value:StyleSheet):void
+    {
+        textField.styleSheet = value;
+    }
+
+    //----------------------------------
+    //  tabIndex
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the tabIndex property.
+     */
+    private var _tabIndex:int = -1;
+
+    /**
+     *  @private
+     *  Although Label/Text do not receive stage focus
+     *  since they are not tabEnabled or
+     *  implement IFocusManagerComponent,
+     *  for accessible applications, developers may set their
+     *  tabIndex to specify reading order
+     *  of Screen Reader's virtual cursor.
+     *  The default value is -1.
+     *
+     *  @tiptext tabIndex of the component
+     *  @helpid 3198
+     */
+    override public function get tabIndex():int
+    {
+        return _tabIndex;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set tabIndex(value:int):void
+    {
+        _tabIndex = value;
+
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  text
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the text property.
+     *  In addition to being set in the 'text' setter,
+     *  it is automatically updated at another time:
+     *  When the 'text' or 'htmlText' is pushed down into
+     *  the textField in commitProperties(), this causes
+     *  the textField to update its own 'text'.
+     *  Therefore in commitProperties() we reset this storage var
+     *  to be in sync with the textField.
+     */
+    private var _text:String = "";
+
+    /**
+     *  @private
+     */
+    mx_internal var textChanged:Boolean = false;
+
+    [Bindable("valueCommit")]
+    [CollapseWhiteSpace]
+    [Inspectable(category="General", defaultValue="")]
+
+    /**
+     *  Specifies the plain text displayed by this control.
+     *  Its appearance is determined by the CSS styles of this Label control.
+     *
+     *
When you set this property, any characters that might
+     *  look like HTML markup in the string have no special meaning
+     *  and appear as entered.

+     *
+     *
To display text formatted by using HTML tags,
+     *  use the htmlText property instead.
+     *  If you set the htmlText property,
+     *  the HTML replaces any text that you set using this property, and the
+     *  text property returns a plain-text version of the
+     *  HTML text, with all HTML tags stripped out.

+     *
+     *
To include the special characters left angle  bracket (<),
+     *  right angle bracket (>), or ampersand (&) in the text,
+     *  wrap the text string in the CDATA tag.
+     *  Alternatively, you can use HTML character entities for the
+     *  special characters, for example, &lt;.

+     *
+     *
If the text is wider than the Label control,
+     *  the text is truncated and terminated by an ellipsis (...).
+     *  The full text displays as a tooltip when
+     *  you move the mouse over the Label control.
+     *  If you also set a tooltip by using the tooltip
+     *  property, the tooltip is displayed rather than the text.

+     *
+     *
If you try to set this property to null,
+     *  it is set, instead, to the empty string.
+     *  The text property can temporarily have the value null,
+     *  which indicates that the htmlText has been recently set
+     *  and the corresponding text value
+     *  has not yet been determined.

+     *
+     *  @default ""
+     *  @tiptext Gets or sets the Label content
+     *  @helpid 3907
+    */
+    public function get text():String
+    {
+        return _text;
+    }
+
+    /**
+     *  @private
+     */
+    public function set text(value:String):void
+    {
+        textSet = true;
+
+        // The text property can't be set to null, only to the empty string.
+        // If the getter returns null, it means that 'htmlText' was just set
+        // and the value of 'text' isn't yet known, because the 'htmlText'
+        // hasn't been committed into the textField and the 'text'
+        // hasn't yet been read back out of the textField.
+        if (!value)
+            value = "";
+
+        if (!isHTML && value == _text)
+            return;
+
+        _text = value;
+        textChanged = true;
+
+        // The htmlText property is unknown until commitProperties(),
+        // when we push the text into the TextField and it
+        // calculates the htmlText.
+        // But you can call validateNow() to make this happen right away.
+        _htmlText = null;
+
+        explicitHTMLText = null;
+
+        invalidateProperties();
+        invalidateSize();
+        invalidateDisplayList();
+
+        // Trigger bindings to 'text'.
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+
+        // commitProperties() will dispatch an "htmlTextChanged" event
+        // after the TextField determines the 'htmlText' based on the
+        // 'text'; this event will trigger any bindings to 'htmlText'.
+    }
+
+    //----------------------------------
+    //  textHeight
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the textHeight property.
+     */
+    private var _textHeight:Number;
+
+    /**
+     *  The height of the text.
+     *
+     *
The value of the textHeight property is correct only
+     *  after the component has been validated.
+     *  If you set text and then immediately ask for the
+     *  textHeight, you might receive an incorrect value.
+     *  You should wait for the component to validate
+     *  or call the validateNow() method before you get the value.
+     *  This behavior differs from that of the flash.text.TextField control,
+     *  which updates the value immediately.

+     *
+     *  @see flash.text.TextField
+     */
+    public function get textHeight():Number
+    {
+        return _textHeight;
+    }
+
+    //----------------------------------
+    //  textWidth
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the textWidth property.
+     */
+    private var _textWidth:Number;
+
+    /**
+     *  The width of the text.
+     *
+     *
The value of the textWidth property is correct only
+     *  after the component has been validated.
+     *  If you set text and then immediately ask for the
+     *  textWidth, you might receive an incorrect value.
+     *  You should wait for the component to validate
+     *  or call the validateNow() method before you get the value.
+     *  This behavior differs from that of the flash.text.TextField control,
+     *  which updates the value immediately.

+     *
+     *  @see flash.text.TextField
+     */
+    public function get textWidth():Number
+    {
+        return _textWidth;
+    }
+
+    //----------------------------------
+    //  truncateToFit
+    //----------------------------------
+
+    /**
+     *  If this propery is true, and the Label control size is
+     *  smaller than its text, the text of the
+     *  Label control is truncated using
+     *  a localizable string, such as "...".
+     *  If this property is false, text that does not fit is clipped.
+     *
+     *  @default true
+     */
+    public var truncateToFit:Boolean = true;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+         if (!textField)
+            createTextField(-1);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        // if the font changed and we already created the textfield, we will need to
+        // destory it so it can be re-created, possibly in a different swf context.
+
+        if (hasFontContextChanged() && textField != null)
+        {
+            removeTextField();
+
+            condenseWhiteChanged = true;
+            enabledChanged = true;
+            selectableChanged = true;
+            textChanged = true;
+        }
+
+        if (!textField)
+            createTextField(-1);
+
+        if (condenseWhiteChanged)
+        {
+            textField.condenseWhite = _condenseWhite;
+
+            condenseWhiteChanged = false;
+        }
+
+        textField.tabIndex = tabIndex;
+
+        if (enabledChanged)
+        {
+            textField.enabled = enabled;
+
+            enabledChanged = false;
+        }
+
+        if (selectableChanged)
+        {
+            textField.selectable = _selectable;
+
+            selectableChanged = false;
+        }
+
+        if (textChanged || htmlTextChanged)
+        {
+            // If the 'text' and 'htmlText' properties have both changed,
+            // the last one set wins.
+            if (isHTML)
+                textField.htmlText = explicitHTMLText;
+            else
+                textField.text = _text;
+
+            textFieldChanged(false)
+
+            textChanged = false;
+            htmlTextChanged = false;
+        }
+    }
+
+    /**
+     *  @private
+     *  Measure min/max/preferred sizes.
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var t:String = isHTML ? explicitHTMLText : text;
+
+        t = getMinimumText(t);
+
+        // Determine how large the textField would need to be
+        // to display the entire text.
+        var textFieldBounds:Rectangle = measureTextFieldBounds(t);
+
+        // Add in the padding.
+        measuredMinWidth = measuredWidth = textFieldBounds.width +
+            getStyle("paddingLeft") + getStyle("paddingRight");
+        measuredMinHeight = measuredHeight = textFieldBounds.height +
+            getStyle("paddingTop") + getStyle("paddingBottom");
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        /*
+        var g:Graphics = graphics;
+        g.clear();
+        var backgroundColor:* = getStyle("backgroundColor");
+        if (StyleManager.isValidStyleValue(backgroundColor))
+        {
+            g.beginFill(getStyle("backgroundColor"));
+            g.drawRect(0, 0, unscaledWidth, unscaledHeight);
+            g.endFill();
+        }
+        */
+
+        // The textField occupies the entire Label bounds minus the padding.
+
+        var paddingLeft:Number = getStyle("paddingLeft");
+        var paddingTop:Number = getStyle("paddingTop");
+        var paddingRight:Number = getStyle("paddingRight");
+        var paddingBottom:Number = getStyle("paddingBottom");
+
+
+        textField.setActualSize(unscaledWidth - paddingLeft - paddingRight,
+                                unscaledHeight - paddingTop - paddingBottom);
+
+        textField.x = paddingLeft;
+        textField.y = paddingTop;
+
+        // Now handle truncation if the text doesn't fit.
+
+        var t:String = isHTML ? explicitHTMLText : text;
+
+        // Determine how large the textField would need to be
+        // to display the entire text.
+        var textFieldBounds:Rectangle = measureTextFieldBounds(t);
+
+        // Plain text gets truncated with a "...".
+        // HTML text simply gets clipped, because it is difficult
+        // to skip over the markup and truncate only the non-markup.
+        // But both plain text and HTML text gets an automatic tooltip
+        // if the full text isn't visible.
+        if (truncateToFit)
+        {
+            var truncated:Boolean;
+            if (isHTML)
+            {
+                truncated = textFieldBounds.width > textField.width;
+            }
+            else
+            {
+                // Reset the text in case it was previously
+                // truncated with a "...".
+                textField.text = _text;
+
+                // Determine whether the full text needs to be truncated
+                // based on the actual size of the TextField.
+                // Note that the actual size doesn't change;
+                // the text changes to fit within the actual size.
+                truncated = textField.truncateToFit();
+            }
+
+            // If no explicit tooltip has been set,
+            // implicitly set or clear a "truncation tip".
+            if (!toolTipSet)
+                super.toolTip = truncated ? text : null;
+        }
+
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Creates the text field child and adds it as a child of this component.
+     *
+     *  @param childIndex The index of where to add the child.
+     *  If -1, the text field is appended to the end of the list.
+     */
+    mx_internal function createTextField(childIndex:int):void
+    {
+        if (!textField)
+        {
+            textField = IUITextField(createInFontContext(UITextField));
+            textField.enabled = enabled;
+            textField.ignorePadding = true;
+            textField.selectable = selectable;
+            textField.styleName = this;
+            textField.addEventListener("textFieldStyleChange",
+                                       textField_textFieldStyleChangeHandler);
+            textField.addEventListener("textInsert",
+                                       textField_textModifiedHandler);
+            textField.addEventListener("textReplace",
+                                       textField_textModifiedHandler);
+
+            if (childIndex == -1)
+                addChild(DisplayObject(textField));
+            else
+                addChildAt(DisplayObject(textField), childIndex);
+        }
+    }
+
+
+   /**
+    *  @private
+    *  Removes the text field from this component.
+    */
+    mx_internal function removeTextField():void
+    {
+        if (textField)
+        {
+            textField.removeEventListener("textFieldStyleChange",
+                                          textField_textFieldStyleChangeHandler);
+            textField.removeEventListener("textInsert",
+                                          textField_textModifiedHandler);
+            textField.removeEventListener("textReplace",
+                                          textField_textModifiedHandler);
+            removeChild(DisplayObject(textField));
+            textField = null;
+        }
+    }
+
+    /**
+     *  Returns a TextLineMetrics object with information about the text
+     *  position and measurements for a line of text in the control.
+     *  The component must be validated to get a correct number.
+     *  If you set text and then immediately call
+     *  getLineMetrics() you may receive an incorrect value.
+     *  You should either wait for the component to validate
+     *  or call validateNow().
+     *  This is behavior differs from that of the flash.text.TextField class,
+     *  which updates the value immediately.
+     *
+     *  @param lineIndex The zero-based index of the line for which to get the metrics.
+     *  For the Label control, which has only a single line, must be 0.
+     *
+     *  @see flash.text.TextField
+     *  @see flash.text.TextLineMetrics
+     */
+    public function getLineMetrics(lineIndex:int):TextLineMetrics
+    {
+        return textField ? textField.getLineMetrics(lineIndex) : null;
+    }
+
+    /**
+     *  @private
+     *  Setting the 'htmlText' of textField changes its 'text',
+     *  and vice versa, so afterwards doing so we call this method
+     *  to update the storage vars for various properties.
+     *  Afterwards, the Label's 'text', 'htmlText', 'textWidth',
+     *  and 'textHeight' are all in sync with each other
+     *  and are identical to the TextField's.
+     */
+    private function textFieldChanged(styleChangeOnly:Boolean):void
+    {
+        var changed1:Boolean;
+        var changed2:Boolean;
+
+        if (!styleChangeOnly)
+        {
+            changed1 = _text != textField.text;
+            _text = textField.text;
+        }
+
+        changed2 = _htmlText != textField.htmlText;
+        _htmlText = textField.htmlText;
+
+        // If the 'text' property changes, dispatch a valueCommit
+        // event, which will trigger bindings to 'text'.
+        if (changed1)
+            dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+        // If the 'htmlText' property changes, trigger bindings to it.
+        if (changed2)
+            dispatchEvent(new Event("htmlTextChanged"));
+
+        _textWidth = textField.textWidth;
+        _textHeight = textField.textHeight;
+    }
+
+    /**
+     *  @private
+     */
+    private function measureTextFieldBounds(s:String):Rectangle
+    {
+        // Measure the text we need to display.
+        var lineMetrics:TextLineMetrics = isHTML ?
+                                          measureHTMLText(s) :
+                                          measureText(s);
+
+        // In order to display this text completely,
+        // a TextField must be 4-5 pixels larger.
+        return new Rectangle(0, 0,
+                             lineMetrics.width + UITextField.TEXT_WIDTH_PADDING,
+                             lineMetrics.height + UITextField.TEXT_HEIGHT_PADDING);
+    }
+
+    /**
+     *  @private
+     *  Some other components which use a Label as an internal
+     *  subcomponent need access to its UITextField, but can't access the
+     *  textField var because it is protected and therefore available
+     *  only to subclasses.
+     */
+    mx_internal function getTextField():IUITextField
+    {
+        return textField;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function getMinimumText(t:String):String
+    {
+         // If the text is null, empty, or a single character,
+        // make the measured size big enough to hold
+        // a capital and decending character using the current font.
+        if (!t || t.length < 2)
+            t = "Wj";
+
+        return t;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function textField_textFieldStyleChangeHandler(event:Event):void
+    {
+        textFieldChanged(true);
+    }
+
+    /**
+     *  @private
+     */
+    private function textField_textModifiedHandler(event:Event):void
+    {
+        textFieldChanged(false);
+    }
+
+}
+
+}