Transferred from the Adobe Open Source Subversion Repository

Revision: 4222
Author:   clucier@adobe.com
Date:     2008-12-03T18:37:15.518501Z

Log Message:
-----------
Now that Shader is a first class Embed, we've modified the interface for ShaderFilter to accept a Shader instance directly (or Class representing a Shader Embed).
Reviewer: Pete Farland
QE Notes: Mustella tests require updating.
Doc Notes: ASDocs have been update, just sanity check.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateFilterInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>

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

--- frameworks/projects/spark/src/spark/filters/ShaderFilter.as
+++ frameworks/projects/spark/src/spark/filters/ShaderFilter.as
@@ -21,7 +21,6 @@
 import flash.events.IEventDispatcher;
 import flash.filters.BitmapFilter;
 import flash.filters.ShaderFilter;
-import flash.utils.ByteArray;
 import flash.utils.Proxy;
 import flash.utils.flash_proxy;

@@ -35,11 +34,11 @@
  * the stock Flash ShaderFilter, Shader, and ShaderData classes to apply a
  * Pixel Bender shader as a filter.
  *
- *
The ShaderFilter class must be initialized with byte code representing a
- * compiled Pixel Bender shader. After that the class will create (behind the scenes) a
- * Shader instance from the byte code. The ShaderFilter class then serves as a proxy to the
- * underlying Shader, providing a convenience mechanism for accessing both scalar
- * and multi-dimensional shader input parameters directly as simple named properties.

+ *
The ShaderFilter class must be initialized with either an instance of a Shader
+ * object or Class representative of a Shader (such as from an Embed). The ShaderFilter
+ * class then serves as a proxy to the underlying Shader, providing a convenience
+ * mechanism for accessing both scalar and multi-dimensional shader input parameters
+ * directly as simple named properties.

  *
  *
To set a simple scalar shader input parameter (e.g. of type FLOAT or INT), you can simply
  * refer to the property directly, e.g. myFilter.radius.

@@ -99,7 +98,7 @@
  *
  *     <Label text="ABCDEF">
  *         <filters>
- *             <ShaderFilter byteCode="@Embed(source="shaders/spherize.pbj', mimeType='application/octet-stream')"
+ *             <ShaderFilter shader="@Embed(source='shaders/spherize.pbj')"
  *                 radius="25" center_x="50" center_y="15" />
  *        </filters>
  *     </Label>
@@ -130,13 +129,14 @@

     /**
      *  Constructor.
-     *  @param byteCode Compiled Pixel Bender byte code as ByteArray or Class.
-     */
-    public function ShaderFilter(byteCode:*=null)
+     *  @param shader Fully realized flash.display.Shader instance, or
+     *  Class representing a Shader (such as from an Embed).
+     */
+    public function ShaderFilter(shader:*=null)
     {
         super();
         eventDispatcher = new EventDispatcher();
-        this.byteCode = byteCode;
+        this.shader = shader;
     }

     //--------------------------------------------------------------------------
@@ -148,54 +148,37 @@
     //----------------------------------
     //  shaderInstance
     //----------------------------------
+
     /**
      *  @private
-     *  Storage for the shaderInstance property.
+     *  Storage for the shader property.
      */
     private var _shader:Shader;

     /**
-     * flash.display.Shader instance (valid once byteCode is assigned).
-     */
-    public function get shaderInstance():Shader
-    {
-        return _shader;
-    }
-
-    //----------------------------------
-    //  byteCode
-    //----------------------------------
-
-    /**
      *  @private
-     *  Storage for the custom filter byteCode.
-     */
-    private var _byteCode:*;
-
-    /**
-     * The shader bytecode for this Shader instance, either a Class or ByteArray
-     * instance.
-     */
-    public function set byteCode(value:*):void
-    {
-        // Since our bytecode is sometimes reassigned by the
-        // binding infrastructure we only initialize ourselves
-        // upon the first instance.
-        if (value == _byteCode)
-            return;
-
-        // Create our shader instance from the byteCode provided.
-        if (value is ByteArray)
-        {
-            _shader = new Shader(value);
-        }
-        else if (value is Class)
+     *  Storage for the last assigned Shader Class.
+     */
+    private var _shaderClass:Class;
+
+    /**
+     * An object representing the Shader to use with this filter, either a Class
+     * or Shader instance is allowed.
+     */
+    public function set shader(value:*):void
+    {
+        // Create our shader instance from the byteCode provided. Since our
+        // bytecode is sometimes reassigned by the binding infrastructure we
+        // only initialize ourselves upon the first instance.
+        if (value is Shader && value != _shader)
+        {
+            _shader = value;
+        }
+        else if (value is Class && value != _shaderClass)
         {
             var obj:* = new value();
-            if (obj is Shader)
-                _shader = obj as Shader;
-            else if (obj is ByteArray)
-                _shader = new Shader(obj as ByteArray);
+            _shader = obj as Shader;
+            _shaderClass = value;
         }

         // Push any pending properties onto the new shader instance.
@@ -203,9 +186,16 @@

         // Our new filter is ready to do its work.
         notifyFilterChanged();
-        _byteCode = value;
-    }
-
+    }
+
+    /**
+     * flash.display.Shader instance.
+     */
+    public function get shader():Shader
+    {
+        return _shader;
+    }
+
     //----------------------------------
     //  bottomExtension
     //----------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

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

--- frameworks/projects/spark/src/spark/filters/ShaderFilter.as
+++ frameworks/projects/spark/src/spark/filters/ShaderFilter.as
@@ -9,7 +9,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package mx.filters {
+package spark.filters {

 import flash.display.Shader;
 import flash.display.ShaderInput;
@@ -71,12 +71,12 @@
  * ShaderFilter will automatically re-apply itself to the filters array of the visual
  * component it is applied to.</p>
  *
- * @see mx.effects.FxAnimateFilter
+ * @see mx.effects.AnimateFilter
  *
  * @example Simple ShaderFilter example:
  * <listing version="3.0">
  * <?xml version="1.0"?>
- * <FxApplication xmlns="http://ns.adobe.com/mxml/2009">
+ * <Application xmlns="http://ns.adobe.com/mxml/2009">
  *
  *     <!-- The hypothetical 'spherize' shader applied below has two input parameters, 'center' and 'radius'
  *          with the following attributes:
@@ -103,7 +103,7 @@
  *        </filters>
  *     </Label>
  *
- * </FxApplication>
+ * </Application>
  * </listing>
  *
  *  @langversion 3.0


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@1259522 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/core/ITextFieldInterface.as
+++ frameworks/projects/framework/src/mx/core/ITextFieldInterface.as
@@ -1,32 +1,5 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  The ITextField interface defines the basic set of APIs
- *  for flash.display.TextField
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Flex 3
- */
-
-    /**
-     *  @copy flash.text.TextField#alwaysShowSelection
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
+
+
     function get alwaysShowSelection():Boolean;
     function set alwaysShowSelection(value:Boolean):void;


Fixed comment

Fixed comment

--- frameworks/projects/framework/src/mx/validators/DateValidator.as
+++ frameworks/projects/framework/src/mx/validators/DateValidator.as
@@ -795,8 +795,8 @@

 	/**
 	 *  If true the date format is shown in some
-	 *  validation error messages. Setting to false changes all
-	 *  DateValidators.
+	 *  validation error messages. Setting to false
+	 *  changes all DateValidators.
 	 *
 	 *  @default true
 	 *


Attempt to support 1 and 2 digit months and dates

--- frameworks/projects/framework/src/mx/validators/DateValidator.as
+++ frameworks/projects/framework/src/mx/validators/DateValidator.as
@@ -143,10 +143,7 @@

 		var validInput:String = DECIMAL_DIGITS + allowedFormatChars;

-		var dateObj:Object = {};
-		dateObj.month = "";
-		dateObj.day = "";
-		dateObj.year = "";
+		var dateObj:Object = {day:"", month:"", year:""};

 		var dayProp:String = baseField;
 		var yearProp:String = baseField;
@@ -284,8 +281,7 @@
 			else
 			{
 				var len:Number = stringValue.length;
-				if (len > inputFormat.length ||
-					len + 2 < inputFormat.length)
+				if (len < inputFormat.length - 2 || len > inputFormat.length + 2)
 				{
 					results.push(new ValidationResult(
 						true, baseField, "wrongLength",
@@ -479,9 +475,9 @@
 				yearCounter++;
 		}

-		if ((monthCounter == 2 &&
+		if ((monthCounter >= 1 &&  monthCounter <= 2 &&
 			 (yearCounter == 2 || yearCounter == 4)) ||
-			(monthCounter == 2 && dayCounter == 2 &&
+			(monthCounter >= 1 &&  monthCounter <= 2  && dayCounter >= 1 &&  dayCounter <= 2  &&
 			 (yearCounter == 0 || yearCounter == 2 || yearCounter == 4)))
 		{
 			return null; // Passes format validation


Transferred from the Adobe Open Source Subversion Repository

Revision: 11995
Author:   doug.lee@ssbbartgroup.com
Date:     2009-11-19T18:50:30.831767Z

Log Message:
-----------
Updated all AccImpls that use MSAA constants (except TextLayout) to
use the new AccConst references instead of hard-coding hex numbers and
local copies of the constants.

QE notes:
Doc notes:
Bugs:
Reviewer: gordon
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LabelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextInputAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowedApplicationAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SpinnerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/DropDownListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RichEditableTextAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/NumericStepperAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SkinnableTextBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ToggleButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/VideoPlayerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TitleWindowAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/LinkButtonAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/LinkButtonAccImpl.as
@@ -12,6 +12,7 @@
 package mx.accessibility
 {

+import mx.accessibility.AccConst;
 import mx.controls.LinkButton;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
@@ -91,7 +92,7 @@
 	{
 		super(master);

-		role = 0x1E; // ROLE_SYSTEM_LINK
+		role = AccConst.ROLE_SYSTEM_LINK;
 	}

 	//--------------------------------------------------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

--- frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPMultiService.as
+++ frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPMultiService.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.rpc.http.mxml
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7929
Author:   hmuller@adobe.com
Date:     2009-06-17T23:06:42.698986Z

Log Message:
-----------
Range et al PARB changes, Opus #1.   In addition to the changes listed below, updated
flex4tests, notably ScrollBarFrenzy, for the new API.   These changes will break
performance test suite (TwoThumbSlider.as).

Range
  valueInterval => snapInterval
  step() => changeValueByStep()
  remove protected nearestValidSize() method

Slider
  Add protected pendingValue property
  Remove protected pointClickToPosition() method

TrackBase
  Add two new protected methods: updateSkinDisplayList(), pointToValue()
  Remove the following protected properties: get trackSize:Number, thumbSize:Number
  Remove the following protected methods:
      clickOffset()
      positionToValue()
      valueToPosition()
      pointToPosition()
      positionThumb()
      sizeThumb()
      calculateThumbSize()
      calculateNewValue()

ScrollBar
  page() => changeValueByPage()

Spinner
  valueWrap => allowValueWrap

NumericStepper
  displayFormatFunction => valueFormatFunction
  extractValueFunction => valueParseFunction
  commitTextInput => make private

QE Notes: Most Mustella tests passed after the protected API changes but prior to the renames.
Doc Notes:
Bugs:
Reviewer: Jason, Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/ScrubBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/SkinTest.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/testWheel.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/ScrollbarFrenzy.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/flex4test.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/components/CircularScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/skins/CircularScrollBarSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/NumericStepper.as
+++ frameworks/projects/spark/src/spark/components/NumericStepper.as
@@ -57,7 +57,7 @@
  *  An input value is committed when
  *  the user presses the Enter key, removes focus from the
  *  component, or steps the NumericStepper by pressing an arrow button
- *  or by calling the step() method.

+ *  or by calling the changeValueByStep() method.

  *
  *  @see mx.components.Spinner
  *
@@ -167,11 +167,11 @@
     }

     //---------------------------------
-    // displayFormatFunction
+    // valueFormatFunction
     //---------------------------------

-    private var _displayFormatFunction:Function;
-    private var displayFormatFunctionChanged:Boolean;
+    private var _valueFormatFunction:Function;
+    private var valueFormatFunctionChanged:Boolean;

      /**
      *  Callback function that formats the value displayed
@@ -191,27 +191,27 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function get displayFormatFunction():Function
-    {
-        return _displayFormatFunction;
-    }
-
-    /**
-     *  @private
-     */
-    public function set displayFormatFunction(value:Function):void
-    {
-        _displayFormatFunction = value;
-        displayFormatFunctionChanged = true;
+    public function get valueFormatFunction():Function
+    {
+        return _valueFormatFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set valueFormatFunction(value:Function):void
+    {
+        _valueFormatFunction = value;
+        valueFormatFunctionChanged = true;
         invalidateProperties();
     }

     //---------------------------------
-    // extractValueFunction
+    // valueParseFunction
     //---------------------------------

-    private var _extractValueFunction:Function;
-    private var extractValueFunctionChanged:Boolean;
+    private var _valueParseFunction:Function;
+    private var valueParseFunctionChanged:Boolean;

      /**
      *  Callback function that extracts the numeric
@@ -233,18 +233,18 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function get extractValueFunction():Function
-    {
-        return _extractValueFunction;
-    }
-
-    /**
-     *  @private
-     */
-    public function set extractValueFunction(value:Function):void
-    {
-        _extractValueFunction = value;
-        extractValueFunctionChanged = true;
+    public function get valueParseFunction():Function
+    {
+        return _valueParseFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set valueParseFunction(value:Function):void
+    {
+        _valueParseFunction = value;
+        valueParseFunctionChanged = true;
         invalidateProperties();
     }

@@ -387,24 +387,24 @@
     {
         super.commitProperties();

-        if (maxChanged || stepSizeChanged || displayFormatFunctionChanged)
+        if (maxChanged || stepSizeChanged || valueFormatFunctionChanged)
         {
             textDisplay.widthInChars = calculateWidestValue();
             maxChanged = false;
             stepSizeChanged = false;

-            if (displayFormatFunctionChanged)
+            if (valueFormatFunctionChanged)
             {
                 applyDisplayFormatFunction();

-                displayFormatFunctionChanged = false;
+                valueFormatFunctionChanged = false;
             }
         }

-        if (extractValueFunctionChanged)
+        if (valueParseFunctionChanged)
         {
             commitTextInput(false);
-            extractValueFunctionChanged = false;
+            valueParseFunctionChanged = false;
         }

         if (maxCharsChanged)
@@ -499,11 +499,11 @@
      *  @private
      *  Calls commitTextInput() before stepping.
      */
-    override public function step(increase:Boolean = true):void
+    override public function changeValueByStep(increase:Boolean = true):void
     {
         commitTextInput();

-        super.step(increase);
+        super.changeValueByStep(increase);
     }

     //--------------------------------------------------------------------------
@@ -513,11 +513,12 @@
     //--------------------------------------------------------------------------

     /**
+     *  @private
      *  Commits the current text of textDisplay
      *  to the value property.
      *  This method uses the nearestValidValue() method
      *  to round the input value to the closest multiple of
-     *  the valueInterval property,
+     *  the snapInterval property,
      *  and constrains the value to the range defined by the
      *  maximum and minimum properties.
      *
@@ -526,20 +527,20 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function commitTextInput(dispatchChange:Boolean = false):void
+    private function commitTextInput(dispatchChange:Boolean = false):void
     {
         var inputValue:Number;
         var prevValue:Number = value;

-        if (extractValueFunction != null)
-            inputValue = extractValueFunction(textDisplay.text);
+        if (valueParseFunction != null)
+            inputValue = valueParseFunction(textDisplay.text);
         else
             inputValue = Number(textDisplay.text);

         if (textDisplay.text == "" || (inputValue != value &&
             (Math.abs(inputValue - value) >= 0.000001 || isNaN(inputValue))))
         {
-            setValue(nearestValidValue(inputValue, valueInterval));
+            setValue(nearestValidValue(inputValue, snapInterval));

             // Dispatch valueCommit if the display needs to change.
             if (value == prevValue && inputValue != prevValue)
@@ -573,20 +574,20 @@
                               maximum;
         widestNumber += stepSize;

-        if (displayFormatFunction != null)
-            return displayFormatFunction(widestNumber).length;
+        if (valueFormatFunction != null)
+            return valueFormatFunction(widestNumber).length;
         else
            return widestNumber.toString().length;
     }

     /**
      *  @private
-     *  Helper method that applies the displayFormatFunction
+     *  Helper method that applies the valueFormatFunction
      */
     private function applyDisplayFormatFunction():void
     {
-        if (displayFormatFunction != null)
-            textDisplay.text = displayFormatFunction(value);
+        if (valueFormatFunction != null)
+            textDisplay.text = valueFormatFunction(value);
         else
             textDisplay.text = value.toString();
     }


Do something sensible when people set the width on this control

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

--- src/as/com/threerings/flex/LabeledSlider.as
+++ src/as/com/threerings/flex/LabeledSlider.as
@@ -1,4 +1,6 @@
 package com.threerings.flex {
+
+import mx.core.ScrollPolicy;

 import mx.containers.HBox;

@@ -19,10 +21,14 @@
     /**
      * Create a LabeledSlider holding the specified slider.
      */
-    public function LabeledSlider (slider :Slider)
+    public function LabeledSlider (slider :Slider, labelWidth :int = 17)
     {
         _label = new Label();
         _label.text = String(slider.value);
+        _label.width = labelWidth;
+
+        horizontalScrollPolicy = ScrollPolicy.OFF;
+        setStyle("horizontalGap", 2);

         addChild(_label);
         this.slider = slider;
@@ -30,6 +36,12 @@
         addChild(slider);

         slider.addEventListener(SliderEvent.CHANGE, handleSliderChange, false, 0, true);
+    }
+
+    override public function set width (width :Number) :void
+    {
+        super.width = width;
+        slider.width = width - _label.width - 2;
     }

     protected function handleSliderChange (event :SliderEvent) :void


Transferred from the Adobe Open Source Subversion Repository

Revision: 1098
Author:   jimurphy@adobe.com
Date:     2008-04-03T21:50:39.896200Z

Log Message:
-----------
Merge 3.0.x -- 362:394, 427:429, 603:608, 644:645, 651:663, 672:676, 755:756, 763:766, 785:790, 812:814, 854:861, 862:866, 866:933,971:1009, 1050:1056 --> trunk

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/controls/treeClasses/DefaultDataDescriptor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VRule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/IList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IRepeaterClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/VideoError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/Locale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/Responder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/MessageSerializationError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/SOAPMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IBrowserManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ComponentDescriptor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/IViewCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.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/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManager.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/controls/menuClasses/IMenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ILayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Spacer.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/rpc/src/mx/rpc/Fault.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/XMLListCollection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SliderEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/ScrollEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/CuePointManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/CrossDomainRSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/NumericStepperEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/BrowserManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/events/ChannelFaultEvent.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/collections/CursorBookmark.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/WSDLLoadEvent.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/rpc/src/mx/rpc/soap/LoadEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/FlexClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/SubscriptionInfo.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/DescribeTypeCache.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/logging/LogLogger.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageAgent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/build_framework.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/HeaderEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/build.xml</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/dataGridClasses/DataGridDragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/DownloadProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/ITreeDataDescriptor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemDragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/events/HeaderEvent.as
+++ frameworks/projects/rpc/src/mx/rpc/events/HeaderEvent.as
@@ -59,6 +59,9 @@
     /**
      * Creates a new HeaderEvent.
      *
+     * @param type The event type; indicates the action that caused the event.
+     * @param bubbles Specifies whether the event can bubble up the display list hierarchy.
+     * @param cancelable Specifies whether the behavior associated with the event can be prevented. The dfault is true, but the preventDefault() method has no effect.
      * @param header Object that holds the header of the call.
      * @param token AsyncToken that represents the call to the method. Used in the asynchronous completion token pattern.
      * @param message Source Message of the header.
@@ -79,6 +82,15 @@
         return _header;
     }

+    /**
+     * Utility method to create a new HeaderEvent that doesn't bubble and is cancelable.
+     *
+     * @param header Object that holds the header of the call.
+     * @param token AsyncToken that represents the call to the method. Used in the asynchronous completion token pattern.
+     * @param message Source Message header.
+     *
+     * @return Returns a new HeaderEvent that doesn't bubble and is cancelable.
+     */
     public static function createEvent(header:Object, token:AsyncToken, message:IMessage):HeaderEvent
     {
         return new HeaderEvent(HeaderEvent.HEADER, false, true, header, token, message);


DefaultListRenderer now renders a 20px high textfield thats centered, not something that grows along with the height of the renderer.

--- src/org/openPyro/controls/listClasses/DefaultListRenderer.as
+++ src/org/openPyro/controls/listClasses/DefaultListRenderer.as
@@ -11,6 +11,13 @@
 	import org.openPyro.painters.IPainter;
 	import org.openPyro.skins.ISkin;

+	/**
+	 * The default list item renderer. Creates a _labelField of height 20px that is
+	 * centered no matter how tall the renderer is. It should be noted that the
+	 * creation of the labelField is pretty nicely encapsulated in the
+	 * createLabelField function that can be overridden in your own
+	 * subclass.
+	 */
 	public class DefaultListRenderer extends UIControl implements IListDataRenderer
 	{

@@ -67,6 +74,7 @@
 			else{
 				_labelField.defaultTextFormat = _labelFormat;
 			}
+			_labelField.height = 20;
 			addChild(_labelField);
 		}

@@ -165,10 +173,9 @@
 			if(_highlightCursorSprite.visible){
 				drawHighlightCursor();
 			}
-			_labelField.x = _labelField.y = 5;
+			_labelField.y = (unscaledHeight-_labelField.height)/2
+			_labelField.x = 5
 			_labelField.width = unscaledWidth-10
-			_labelField.height = Math.max(unscaledHeight-10,20);
-
 		}

 		protected function drawHighlightCursor():void{


Transferred from the Adobe Open Source Subversion Repository

Revision: 17360
Author:   chiedozi@adobe.com
Date:     2010-08-18T00:07:57.520197Z

Log Message:
-----------
ViewNavigator now executes navigation operations a frame later to allow renderers to properly redraw themselves before creating a view (SDK-27068).
Refactored some of the session persistence logic out of the application classes into ViewNavigatorBase.
The label, icon and activeView properties now exist on ViewNavigatorBase

QE notes:
Doc notes:
Bugs: SDK-27068
Reviewer: Ryan
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/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<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/TabbedMobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.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@1264554 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
@@ -30,31 +30,30 @@
 [Exclude(name="controlBarLayout", kind="property")]
 [Exclude(name="controlBarVisible", kind="property")]
 [Exclude(name="layout", kind="property")]
-[Exclude(name="preloaderChromeColor", kind="property")] // TODO (chiedozi): Check this
-[Exclude(name="rollOverColor", kind="style")]   // TODO (chiedozi): Check this
-[Exclude(name="backgroundAlpha", kind="style")] // TODO (chiedozi): Check this
+[Exclude(name="preloaderChromeColor", kind="property")]
+[Exclude(name="backgroundAlpha", kind="style")]

 //--------------------------------------
 //  Events
 //--------------------------------------

 /**
- *  @inheritDoc
+ *
  */
 [Event(name="applicationPersist", type="mx.events.FlexEvent")]

 /**
- *  @inheritDoc
+ *
  */
 [Event(name="applicationPersisting", type="mx.events.FlexEvent")]

 /**
- *  @inheritDoc
+ *
  */
 [Event(name="applicationRestore", type="mx.events.FlexEvent")]

 /**
- *  @inheritDoc
+ *
  */
 [Event(name="applicationRestoring", type="mx.events.FlexEvent")]

@@ -94,6 +93,7 @@
     {
         return _persistenceManager;
     }
+
     /**
      *  @private
      */
@@ -124,6 +124,7 @@
     {
         return _sessionCachingEnabled;
     }
+
     /**
      * @private
      */
@@ -137,8 +138,13 @@
     //  Methods
     //
     //--------------------------------------------------------------------------
-    /**
-     *
+
+    /**
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function addApplicationListeners():void
     {
@@ -165,16 +171,24 @@
             NativeApplication.nativeApplication.
                 addEventListener(Event.DEACTIVATE, applicationDeactivateHandler);
     }
-
-    /**
-     *
-     */
+
+    /**
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     protected function applicationActivateHandler(event:Event):void
     {
     }

     /**
-     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function applicationDeactivateHandler(event:Event):void
     {
@@ -199,7 +213,11 @@
     }

     /**
-     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function backKeyHandler():void
     {
@@ -207,9 +225,13 @@
     }

     /**
-     *
-     */
-    public function canCancelDefaultBackKeyBehavior():Boolean
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get canCancelBackKeyBehavior():Boolean
     {
         return false;
     }
@@ -224,14 +246,22 @@
     }

     /**
-     *
-     */
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     protected function orientationChangeHandler(event:StageOrientationEvent):void
     {
-    }
-
-    /**
-     *
+    }
+
+    /**
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function persistApplicationState():void
     {
@@ -246,21 +276,33 @@
     }

     /**
-     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function registerPeristenceClassAliases():void
     {
     }

     /**
-     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function restoreApplicationState():void
     {
     }

     /**
-     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     // TODO (chiedozi): Do we need to support unknown orientation?
     public function get landscapeOrientation():Boolean
@@ -270,7 +312,11 @@
     }

     /**
-     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function deviceKeyDownHandler(event:KeyboardEvent):void
     {
@@ -278,18 +324,22 @@

         // We want to prevent the default down behavior for back key if
         // the navigator has a view to pop back to
-        if (key == Keyboard.BACK && canCancelDefaultBackKeyBehavior())
+        if (key == Keyboard.BACK && canCancelBackKeyBehavior)
             event.preventDefault();
     }

     /**
-     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function deviceKeyUpHandler(event:KeyboardEvent):void
     {
         var key:uint = event.keyCode;

-        if (key == Keyboard.BACK && canCancelDefaultBackKeyBehavior())
+        if (key == Keyboard.BACK && canCancelBackKeyBehavior)
             backKeyHandler();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 22095
Author:   smgilson@adobe.com
Date:     2011-08-19T15:05:35.517487Z

Log Message:
-----------
ASDoc updates for new ZOOM attribute of BitmapScaleMode.as

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapFillMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as
@@ -13,8 +13,12 @@
 {

 /**
- *  An enum of the scale modes that determine how a BitmapImage
- *  scales image content when fillMode is set to BitmapImage.SCALE.
+ *  The BitmapScaleMode class defines an enumeration for the scale modes
+ *  that determine how a BitmapImage scales image content when
+ *  fillMode is set to mx.graphics.BitmapFillMode.SCALE.
+ *
+ *  @see spark.components.Image#scaleMode
+ *  @see spark.primitives.BitmapImage#scaleMode
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


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@1263086 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/validators/DateValidator.as
+++ frameworks/projects/framework/src/mx/validators/DateValidator.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: 3626
Author:   smgilson@adobe.com
Date:     2008-10-14T17:00:31.950167Z

Log Message:
-----------
ASDoc updates

Checkin Test Passed: Yes
QA: No
Bug:
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>

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

--- frameworks/projects/spark/src/spark/components/NumericStepper.as
+++ frameworks/projects/spark/src/spark/components/NumericStepper.as
@@ -19,17 +19,25 @@
 import mx.managers.IFocusManagerComponent;

 /**
- *  The NumericStepper control lets the user select
+ *  The FxNumericStepper control lets you select
  *  a number from an ordered set.
- *  The NumericStepper control consists of a single-line
+ *  The FxNumericStepper provides the same functionality as
+ *  the FxSpinner component, but adds a TextInput control
+ *  so that you can directly edit the value of the component,
+ *  rather than modifying it by using the control's arrow buttons.
+ *
+ *
The FxNumericStepper control consists of a single-line
  *  input text field and a pair of arrow buttons
  *  for stepping through the possible values.
  *  The Up Arrow and Down Arrow keys also cycle through
- *  the values. An inputted value is committed whenever
- *  the user presses enter, focuses out of the
- *  NumericStepper, or steps the NumericStepper.
+ *  the values.
+ *  An input value is committed when
+ *  the user presses the Enter key, removes focus from the
+ *  component, or steps the FxNumericStepper by pressing an arrow button
+ *  or by calling the step() method.

+ *
+ *  @see mx.components.FxSpinner
  *
- *  @see mx.components.Spinner
  */
 public class FxNumericStepper extends FxSpinner implements IFocusManagerComponent
 {
@@ -58,11 +66,12 @@
     [SkinPart]

     /**
-     *  textInput is a SkinPart that defines a
-     *  TextInput which allows a user to edit the value of
-     *  the NumericStepper. The value is rounded and committed
+     *  A skin part that defines a TextInput control
+     *  which allows a user to edit the value of
+     *  the FxNumericStepper component.
+     *  The value is rounded and committed
      *  when the user presses enter, focuses out of
-     *  the NumericStepper, or steps the NumericStepper.
+     *  the FxNumericStepper, or steps the FxNumericStepper.
      */
     public var textInput:FxTextInput;

@@ -82,13 +91,13 @@
      */
     override public function set value(newValue:Number):void
     {
-    	if (newValue == value)
-    	   return;
-
-    	super.value = newValue;
-
-    	valueChanged = true;
-    	invalidateProperties();
+        if (newValue == value)
+           return;
+
+        super.value = newValue;
+
+        valueChanged = true;
+        invalidateProperties();
     }

     //--------------------------------------------------------------------------
@@ -102,10 +111,10 @@
      */
     override protected function setValue(value:Number):void
     {
-    	super.setValue(value);
-
-    	valueChanged = true;
-    	invalidateProperties();
+        super.setValue(value);
+
+        valueChanged = true;
+        invalidateProperties();
     }

     /**
@@ -113,43 +122,43 @@
      */
     override protected function commitProperties():void
     {
-    	super.commitProperties();
-
-    	if (valueChanged)
-    	{
-    		valueChanged = false;
-    		textInput.text = value.toString();
-    	}
-    }
-
-	/**
-	 *  @private
-	 */
-	override protected function partAdded(partName:String, instance:Object):void
-	{
+        super.commitProperties();
+
+        if (valueChanged)
+        {
+            valueChanged = false;
+            textInput.text = value.toString();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function partAdded(partName:String, instance:Object):void
+    {
         super.partAdded(partName, instance);

-	    if (instance == textInput)
-	    {
-	        textInput.addEventListener(FlexEvent.ENTER,
-	                                   textInput_enterHandler);
-	        textInput.text = value.toString();
-	    }
-	}
-
-    /**
-     *  @private
-     */
-	override protected function partRemoved(partName:String, instance:Object):void
-	{
+        if (instance == textInput)
+        {
+            textInput.addEventListener(FlexEvent.ENTER,
+                                       textInput_enterHandler);
+            textInput.text = value.toString();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
         super.partRemoved(partName, instance);

-	    if (instance == textInput)
-	    {
+        if (instance == textInput)
+        {
             textInput.removeEventListener(FlexEvent.ENTER,
                                           textInput_enterHandler);
         }
-	}
+    }

     /**
      *  @private
@@ -190,9 +199,13 @@
     }

     /**
-     *  Commits the current text of textInput as
-     *  value after rounding the new value using
-     *  nearestValidValue.
+     *  Commits the current text of textInput
+     *  to the value property.
+     *  This method uses the nearestValidValue() method
+     *  to round the input value to the closest multiple of
+     *  the valueInterval property,
+     *  and constrains the value to the range defined by the
+     *  maximum and minimum properties.
      */
     protected function commitTextInput():void
     {
@@ -224,6 +237,7 @@
     //---------------------------------

     /**
+     *  @private
      *  When the enter key is pressed, NumericStepper commits the
      *  text currently displayed.
      */


Change 20081218-maxcarlson-N by maxcarlson@Bank.lan on 2008-12-18 18:19:24 PST
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Better prevention of duplicate key events in swf9

Bugs Fixed: LPP-7432 - onkeydown event keep firing

Technical Reviewer: andre.bargull@udo.edu
QA Reviewer: promanik

Details: Use a hash to track keyboard state, to handle modifier keys accurately.

Tests: See LPP-7432

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@12194 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as
@@ -16,20 +16,18 @@
         var s, k = e.keyCode;
         var keyisdown = t == 'onkeydown';
         s = String.fromCharCode(k).toLowerCase();
-        if (keyisdown) {
-            // prevent duplicate onkeydown events - see LPP-7432
-            if (k == __lastkeydown) return;
-            __lastkeydown = k;
-        } else {
-            __lastkeydown = null;
-        }
+
+        // prevent duplicate onkeydown events - see LPP-7432
+        if (__keyState[k] == keyisdown) return;
+        __keyState[k] = keyisdown;
+
         delta[s] = keyisdown;
         if (this.__callback) this.__scope[this.__callback](delta, k, t);
     }

     var __callback = null;
     var __scope = null;
-    var __lastkeydown = null;
+    var __keyState:Object = {};

     function setCallback (scope, funcname) {
         this.__scope = scope;


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@1252126 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkLabelAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkLabelAutomationImpl.as
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.automation.delegates.components
+{
+	import flash.display.DisplayObject;
+
+	import mx.automation.Automation;
+	import mx.core.mx_internal;
+
+	import spark.automation.delegates.components.supportClasses.SparkTextBaseAutomationImpl;
+	import spark.components.Label;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  Label control.
+	 *
+	 *  @see spark.components.Label
+	 *
+	 */
+	public class SparkLabelAutomationImpl extends SparkTextBaseAutomationImpl
+	{
+
+		include "../../../core/Version.as";
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(spark.components.Label, SparkLabelAutomationImpl);
+		}
+
+		/**
+		 *  Constructor.
+		 * @param obj Label object to be automated.
+		 */
+		public function SparkLabelAutomationImpl(obj:spark.components.Label)
+		{
+			super(obj);
+
+		}
+
+		/**
+		 *  @private
+		 *  storage for the owner component
+		 */
+		protected function get label():spark.components.Label
+		{
+			return uiComponent as spark.components.Label;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function get automationName():String
+		{
+			return label.id||label.text || super.automationName;
+		}
+
+		//----------------------------------
+		//  automationValue
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationValue():Array
+		{
+			return [ automationName ];
+		}
+
+
+	}
+
+}


Added support for label functions. Code cleanup.

--- WeaveUI/src/weave/ui/SubMenu.as
+++ WeaveUI/src/weave/ui/SubMenu.as
@@ -67,38 +67,41 @@
 			tabEnabled = false;
 			owner = DisplayObjectContainer(WeaveAPI.topLevelApplication);
 			showRoot = false; //test this
+
+			addEventListener(MenuEvent.ITEM_CLICK,handleSubMenuItemClick);
+			addEventListener(MenuEvent.MENU_HIDE,function():void{toggleSubMenu = false;});
+			this.labelFunction = getLabel;
+		}
+
+		private function getLabel(item:SubMenuItem):String
+		{
+			return String(item.label is Function ? item.label() : item.label);
 		}

 		private var _uiParent:UIComponent = null;
-
-		//		private var subMenu:Menu;

 		private var subMenuDataProvider:Array = [];

 		/**
 		 * Adds an item to the menu.
-		 * @param label The Label string to show when the menu is open
+		 * @param label The Label string (or function that returns a string) to show when the menu is open.
 		 * @param listener The function to call when the item is clicked.
 		 * @param params An Array of parameters to pass to the listener function.
+		 * @return An object containing the three parameters (label, listener, params) which can be modified later.
 		 */
-		public function addSubMenuItem(label:String,listener:Function,params:Array=null):void
+		public function addSubMenuItem(label:Object, listener:Function, params:Array = null):Object
 		{
 			var menuItem:SubMenuItem = new SubMenuItem();
 			menuItem.label = label;
 			menuItem.listener = listener;
 			menuItem.params = params;
-
 			subMenuDataProvider.push(menuItem);
-
-			//			subMenu = Menu.createMenu(_uiParent,subMenuDataProvider,false);
-
-
-			addEventListener(MenuEvent.ITEM_CLICK,handleSubMenuItemClick);
-
-			addEventListener(MenuEvent.MENU_HIDE,function():void{toggleSubMenu = false;});
-
-
+			return menuItem;
 		}
+
+		public static const LABEL:String = 'label';
+		public static const LISTENER:String = 'listener';
+		public static const PARAMS:String = 'params';

 		/**
 		 * Removes all menu items
@@ -132,13 +135,7 @@

 			toggleSubMenu = true;

-			//			if(subMenuDataProvider.length == 0)
-			//				subMenu = Menu.createMenu(_uiParent,new SubMenuItem(),false);
-
-
 			showSubMenu();
-
-
 		}

 		private function closeSubMenu(event:Event):void
@@ -181,7 +178,7 @@

 internal class SubMenuItem
 {
-	public var label:String;
+	public var label:Object;
 	public var listener:Function;
 	public var params:Array;
 }


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@1248557 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
@@ -0,0 +1,862 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.controls.advancedDataGridClasses
+{
+
+import flash.display.DisplayObject;
+import flash.display.Sprite;
+import flash.events.Event;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.text.TextLineMetrics;
+
+import mx.controls.AdvancedDataGrid;
+import mx.controls.listClasses.BaseListData;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.core.ClassFactory;
+import mx.core.IDataRenderer;
+import mx.core.IFactory;
+import mx.core.IInvalidating;
+import mx.core.IToolTip;
+import mx.core.IUITextField;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+import mx.events.ToolTipEvent;
+
+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
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Event(name="dataChange", type="mx.events.FlexEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Text color of a component label.
+ *  @default 0x0B333C
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="color", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  Color of the separator between the text part and icon part.
+ *  @default 0xCCCCCC
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="separatorColor", type="uint", format="Color", inherit="yes")]
+
+
+/**
+ *  Horizontal alignment of the header text.
+ *  Possible values are "left", "center",
+ *  and "right".
+ *
+ *  @default "center"
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="horizontalAlign", type="String", enumeration="left,center,right", inherit="no")]
+
+/**
+ *  Vertical alignment of the header text.
+ *  Possible values are "top", "middle",
+ *  and "bottom".
+ *
+ *  @default "middle"
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="verticalAlign", type="String", enumeration="top,middle,bottom", inherit="no")]
+
+/**
+ *  The AdvancedDataGridHeaderRenderer class defines the default header
+ *  renderer for a AdvancedDataGrid control.
+ *  By default, the header renderer
+ *  draws the text associated with each header in the list, and an optional
+ *  sort arrow (if sorted by that column).
+ *
+ *
 By default, the custom header renderer uses the default
+ *  sort item renderer defined by the AdvancedDataGridSortItemRenderer class.
+ *  The sort item renderer controls the display of the
+ *  sort icon and sort sequence number.
+ *  You can specify a custom sort item renderer by using
+ *  the sortItemRenderer property.

+ *
+ *
You can override the default header renderer by creating a custom
+ *  header renderer.
+ *  The only requirement for a custom header renderer is that it
+ *  must include the size of the sortItemRenderer
+ *  in any size calculations performed by an override of the
+ *  measure() and updateDisplayList() methods.

+ *
+ *
You can customize when the sorting gets triggered by
+ *  handling or dispatching the AdvancedDataGridEvent.SORT event.

+ *
+ *  @see mx.controls.AdvancedDataGrid
+ *  @see mx.controls.advancedDataGridClasses.AdvancedDataGridSortItemRenderer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class AdvancedDataGridHeaderRenderer
+       extends UIComponent
+       implements IDataRenderer,
+                  IDropInListItemRenderer,
+                  IListItemRenderer
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function AdvancedDataGridHeaderRenderer()
+    {
+        super();
+
+        // InteractiveObject variables.
+        tabEnabled   = false;
+
+        addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var grid:AdvancedDataGrid;
+
+    /**
+     *  @private
+     *  The value of the unscaledWidth parameter during the most recent
+     *  call to updateDisplayList
+     */
+    private var oldUnscaledWidth:Number = -1;
+
+    /**
+     *  @private
+     *  header separator skin
+     */
+    private var partsSeparatorSkinClass:Class;
+    private var partsSeparatorSkin:DisplayObject;
+
+    /**
+     *  @private
+     *  Storage for the sortItemRenderer property
+     */
+    private var sortItemRendererInstance:UIComponent;
+    private var sortItemRendererChanged:Boolean = false;
+
+    /**
+     *  The internal UITextField that displays the text in this renderer.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected var label:IUITextField;
+
+    /**
+     *  This background is used as a mouseShield so that the mouse clicks do not pass
+     *  through to the parent component, but all mouse events within the header area
+     *  are handled by the header itself.
+     *
+     *  Inspired by mouseShield in mx/core/Container.as and mx/skins/halo/HaloBorder.as.
+     *
+     *  @private
+     */
+    protected var background:Sprite;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get baselinePosition():Number
+    {
+        return label.baselinePosition;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the data property.
+     */
+    private var _data:Object;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the data property
+     *  as defined by the IDataRenderer interface.
+     *  When set, it stores the value and invalidates the component
+     *  to trigger a relayout of the component.
+     *
+     *  @see mx.core.IDataRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get data():Object
+    {
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+        _data = value;
+
+        invalidateProperties();
+
+        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+    }
+
+    //----------------------------------
+    //  sortItemRenderer
+    //----------------------------------
+
+    private var _sortItemRenderer:IFactory;
+
+    [Inspectable(category="Data")]
+    /**
+     *  Specifies a custom sort item renderer.
+     *  By default, the AdvancedDataGridHeaderRenderer class uses
+     *  AdvancedDataGridSortItemRenderer as the sort item renderer.
+     *
+     *
Note that the sort item renderer controls the display of the
+     *  sort icon and sort sequence number.
+     *  A custom header renderer must include code to display the
+     *  sort item renderer, regardless of whether it is the default or custom
+     *  sort item renderer.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get sortItemRenderer():IFactory
+    {
+            return _sortItemRenderer;
+    }
+
+    /**
+     *  @private
+     */
+    public function set sortItemRenderer(value:IFactory):void
+    {
+            _sortItemRenderer = value;
+
+            sortItemRendererChanged = true;
+            invalidateSize();
+            invalidateDisplayList();
+
+            dispatchEvent(new Event("sortItemRendererChanged"));
+    }
+
+    //----------------------------------
+    //  listData
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the listData property.
+     */
+    private var _listData:AdvancedDataGridListData;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the listData property
+     *  as defined by the IDropInListItemRenderer interface.
+     *
+     *  @see mx.controls.listClasses.IDropInListItemRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get listData():BaseListData
+    {
+        return _listData;
+    }
+
+    /**
+     *  @private
+     */
+    public function set listData(value:BaseListData):void
+    {
+        _listData = AdvancedDataGridListData(value);
+        grid      = AdvancedDataGrid(_listData.owner);
+
+        invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        if (!label)
+        {
+            label = IUITextField(createInFontContext(UITextField));
+            addChild(DisplayObject(label));
+        }
+
+        if (!background)
+        {
+            background = new UIComponent();
+            addChild(background);
+        }
+    }
+
+    /**
+     *  @private
+     *  Apply the data and listData.
+     *  Create an instance of the sort item renderer if specified,
+     *  and set the text into the text field.
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (!initialized)
+            label.styleName = this;
+
+        if (!sortItemRendererInstance || sortItemRendererChanged)
+        {
+            if (!sortItemRenderer)
+                sortItemRenderer = ClassFactory(grid.sortItemRenderer);
+
+            if (sortItemRenderer)
+            {
+                sortItemRendererInstance = sortItemRenderer.newInstance();
+
+                // TODO Ideally, we should be doing this, but commenting out
+                // now because of Bug 204187:
+                //
+                // sortItemRendererInstance.owner = grid;
+
+                addChild( DisplayObject(sortItemRendererInstance) );
+            }
+
+             sortItemRendererChanged = false;
+        }
+
+        // Handle skin for the separator between the text and icon parts
+        var oldPartsSeparatorSkinClass:Class = partsSeparatorSkinClass;
+        if (!partsSeparatorSkinClass
+                || partsSeparatorSkinClass != grid.getStyle("headerSortSeparatorSkin"))
+        {
+            partsSeparatorSkinClass = grid.getStyle("headerSortSeparatorSkin");
+        }
+        if (grid.sortExpertMode || partsSeparatorSkinClass != oldPartsSeparatorSkinClass)
+        {
+            if (partsSeparatorSkin)
+                removeChild(partsSeparatorSkin);
+            if (!grid.sortExpertMode)
+            {
+                partsSeparatorSkin = new partsSeparatorSkinClass();
+                addChild(partsSeparatorSkin);
+            }
+        }
+        if (partsSeparatorSkin)
+            partsSeparatorSkin.visible = !(_data is AdvancedDataGridColumnGroup);
+
+        if (_data != null)
+        {
+            label.text      = listData.label ? listData.label : " ";
+            label.multiline = grid.variableRowHeight;
+            if( _data is AdvancedDataGridColumn)
+                label.wordWrap = grid.columnHeaderWordWrap(_data as AdvancedDataGridColumn);
+
+
+//             if (listData.columnIndex > -1)
+//                 label.wordWrap = grid.columnHeaderWordWrap(grid.columns[listData.columnIndex]);
+            else
+                label.wordWrap = grid.wordWrap;
+
+            if (_data is AdvancedDataGridColumn)
+            {
+                var column:AdvancedDataGridColumn =
+                    _data as AdvancedDataGridColumn;
+
+                var dataTips:Boolean = grid.showDataTips;
+                if (column.showDataTips == true)
+                    dataTips = true;
+                if (column.showDataTips == false)
+                    dataTips = false;
+                if (dataTips)
+                {
+                    if (label.textWidth > label.width
+                        || column.dataTipFunction || column.dataTipField
+                        || grid.dataTipFunction || grid.dataTipField)
+                    {
+                        toolTip = column.itemToDataTip(_data);
+                    }
+                    else
+                    {
+                        toolTip = null;
+                    }
+                }
+                else
+                {
+                    toolTip = null;
+                }
+             }
+        }
+        else
+        {
+            label.text = " ";
+            toolTip = null;
+        }
+
+        if (sortItemRendererInstance is IInvalidating)
+            IInvalidating(sortItemRendererInstance).invalidateProperties();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        // Cache padding values
+        var paddingLeft:int   = getStyle("paddingLeft");
+        var paddingRight:int  = getStyle("paddingRight");
+        var paddingTop:int    = getStyle("paddingTop");
+        var paddingBottom:int = getStyle("paddingBottom");
+
+        // Measure sortItemRenderer
+        var sortItemRendererWidth:Number  = sortItemRendererInstance ?
+                                sortItemRendererInstance.getExplicitOrMeasuredWidth()  : 0;
+        var sortItemRendererHeight:Number = sortItemRendererInstance ?
+                                sortItemRendererInstance.getExplicitOrMeasuredHeight() : 0;
+        if (grid.sortExpertMode && getFieldSortInfo() == null)
+        {
+            sortItemRendererWidth  = 0;
+            sortItemRendererHeight = 0;
+        }
+
+        var horizontalGap:Number = getStyle("horizontalGap");
+        if (sortItemRendererWidth == 0)
+            horizontalGap = 0;
+
+        // Measure text
+        var labelWidth:Number  = 0;
+        var labelHeight:Number = 0;
+        var w:Number = 0;
+        var h:Number = 0;
+
+        // By default, we already get the column's width
+        if (!isNaN(explicitWidth))
+        {
+            w = explicitWidth;
+            labelWidth = w - sortItemRendererWidth
+                            - horizontalGap
+                            - (partsSeparatorSkin ? partsSeparatorSkin.width + 10 : 0)
+                            - paddingLeft - paddingRight;
+            label.width = labelWidth;
+            // Inspired by mx.controls.Label#measureTextFieldBounds():
+            // In order to display the text completely,
+            // a TextField must be 4-5 pixels larger.
+            labelHeight = label.textHeight + UITextField.TEXT_HEIGHT_PADDING;
+        }
+        else
+        {
+            var lineMetrics:TextLineMetrics = measureText(label.text);
+            labelWidth  = lineMetrics.width + UITextField.TEXT_WIDTH_PADDING;
+            labelHeight = lineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
+            w = labelWidth + horizontalGap
+                           + (partsSeparatorSkin ? partsSeparatorSkin.width : 0)
+                           + sortItemRendererWidth
+        }
+
+        h = Math.max(labelHeight, sortItemRendererHeight);
+        h = Math.max(h, (partsSeparatorSkin ? partsSeparatorSkin.height : 0));
+
+        // Add padding
+        w += paddingLeft + paddingRight;
+        h += paddingTop  + paddingBottom;
+
+        // Set required width and height
+        measuredMinWidth  = measuredWidth  = w;
+        measuredMinHeight = measuredHeight = h;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        if (unscaledWidth == 0)
+            return;
+
+        // Cache padding values
+        var paddingLeft:int   = getStyle("paddingLeft");
+        var paddingRight:int  = getStyle("paddingRight");
+        var paddingTop:int    = getStyle("paddingTop");
+        var paddingBottom:int = getStyle("paddingBottom");
+
+        // Size of sortItemRenderer
+        var sortItemRendererWidth:Number  = sortItemRendererInstance ?
+                                sortItemRendererInstance.getExplicitOrMeasuredWidth()  : 0;
+        var sortItemRendererHeight:Number = sortItemRendererInstance ?
+                                sortItemRendererInstance.getExplicitOrMeasuredHeight() : 0;
+        if (sortItemRendererInstance)
+            sortItemRendererInstance.setActualSize(sortItemRendererWidth,
+                                                    sortItemRendererHeight);
+        if (grid.sortExpertMode && getFieldSortInfo() == null)
+        {
+            sortItemRendererWidth  = 0;
+            sortItemRendererHeight = 0;
+        }
+
+        var horizontalGap:Number = getStyle("horizontalGap");
+        if (sortItemRendererWidth == 0)
+            horizontalGap = 0;
+
+        // Size of label
+        const MINIMUM_SIZE:TextLineMetrics = measureText("w");
+
+        // Adjust to given width
+        var lineMetrics:TextLineMetrics = measureText(label.text);
+        var labelWidth:Number  = lineMetrics.width + UITextField.TEXT_WIDTH_PADDING;
+        var maxLabelWidth:int = unscaledWidth - sortItemRendererWidth
+                                - horizontalGap - paddingLeft - paddingRight;
+        if (maxLabelWidth < 0)
+            maxLabelWidth = 0; // set the max width to 0, if its < 0
+
+        var truncate:Boolean = false;
+
+        if (maxLabelWidth < labelWidth)
+        {
+            truncate = true;
+            labelWidth = maxLabelWidth;
+        }
+
+        // Adjust to given height
+        var labelHeight:Number = label.textHeight + UITextField.TEXT_HEIGHT_PADDING;
+        var maxLabelHeight:int = unscaledHeight - paddingTop - paddingBottom;
+
+        if (maxLabelHeight < labelHeight)
+        {
+            truncate = true;
+            labelHeight = maxLabelHeight;
+        }
+
+        // Size of label
+        label.setActualSize(labelWidth, labelHeight);
+
+        // truncate only if the truncate flag is set
+        if (truncate && !label.multiline)
+            label.truncateToFit();
+
+        // Calculate position of label, by default center it
+        var labelX:Number;
+        var horizontalAlign:String = getStyle("horizontalAlign");
+        if (horizontalAlign == "left")
+        {
+            labelX = paddingLeft;
+        }
+        else if (horizontalAlign == "right")
+        {
+            labelX = unscaledWidth - paddingRight - sortItemRendererWidth
+                        - horizontalGap - labelWidth;
+        }
+        else // if (horizontalAlign == "center")
+        {
+            labelX = (unscaledWidth - labelWidth - paddingLeft
+                        - paddingRight - horizontalGap
+                        - sortItemRendererWidth)/2 + paddingLeft;
+        }
+        labelX = Math.max(labelX, 0);
+
+        var labelY:Number;
+        var verticalAlign:String = getStyle("verticalAlign");
+        if (verticalAlign == "top")
+        {
+            labelY = paddingTop;
+        }
+        else if (verticalAlign == "bottom")
+        {
+            labelY = unscaledHeight - labelHeight - paddingBottom + 2; // 2 for gutter
+        }
+        else // if (verticalAlign == "middle")
+        {
+            labelY = (unscaledHeight - labelHeight - paddingBottom - paddingTop)/2
+                     + paddingTop;
+        }
+        labelY = Math.max(labelY, 0);
+
+        // Set positions
+        label.x = Math.round(labelX);
+        label.y = Math.round(labelY);
+
+        if (sortItemRendererInstance)
+        {
+            // Calculate position of sortItemRenderer (to the right of the headerRenderer)
+            var sortItemRendererX:Number = unscaledWidth
+                                            - sortItemRendererWidth
+                                            - paddingRight
+                                            ;
+            var sortItemRendererY:Number = (unscaledHeight - sortItemRendererHeight
+                                            - paddingTop - paddingBottom
+                                            ) / 2
+                                            + paddingTop;
+
+            sortItemRendererInstance.x = Math.round(sortItemRendererX);
+            sortItemRendererInstance.y = Math.round(sortItemRendererY);
+        }
+
+        // Draw the separator
+        graphics.clear();
+        if (sortItemRendererInstance && !grid.sortExpertMode
+                &&  !(_data is AdvancedDataGridColumnGroup))
+        {
+            if (!partsSeparatorSkinClass)
+            {
+                graphics.lineStyle(1, getStyle("separatorColor") !== undefined
+                                        ? getStyle("separatorColor") : 0xCCCCCC);
+                graphics.moveTo(sortItemRendererInstance.x - 1, 1);
+                graphics.lineTo(sortItemRendererInstance.x - 1, unscaledHeight - 1);
+            }
+            else
+            {
+                partsSeparatorSkin.x = sortItemRendererInstance.x
+                                       - horizontalGap - partsSeparatorSkin.width;
+                partsSeparatorSkin.y = (unscaledHeight - partsSeparatorSkin.height) / 2;
+            }
+        }
+
+        // Set text color
+        var labelColor:Number;
+
+        if (data && parent)
+        {
+            if (!enabled)
+                labelColor = getStyle("disabledColor");
+            else if (grid.isItemHighlighted(listData.uid))
+                labelColor = getStyle("textRollOverColor");
+            else if (grid.isItemSelected(listData.uid))
+                labelColor = getStyle("textSelectedColor");
+            else
+                labelColor = getStyle("color");
+
+           label.setColor(labelColor);
+        }
+
+        // Set background size, position, color
+        if (background)
+        {
+            background.graphics.clear();
+            background.graphics.beginFill(0xFFFFFF, 0.0); // transparent
+            background.graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
+            background.graphics.endFill();
+            setChildIndex( DisplayObject(background), 0 );
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Indicates if the mouse pointer was over the text part or icon part
+     *  of the header when the mouse event occurred.
+     *
+     *
This method has to be implemented in custom header renderers for sorting
+     *  to work. Note that this implicitly means you will need to display both
+     *  text (which can be displayed any way the custom header renderer
+     *  wants; by default, Flex display text) and an icon (which is the
+     *  default or custom sort item renderer).

+     *
+     *  @param event The mouse event.
+     *
+     *  @return AdvancedDataGrid.HEADERTEXTPART if the mouse was over the header text,
+     *  and AdvancedDataGrid.HEADERICONPART if the mouse was over the header icon.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function mouseEventToHeaderPart(event:MouseEvent):String
+    {
+        var point:Point = new Point(event.stageX, event.stageY);
+        point = globalToLocal(point);
+
+        // Needs to be in sync with the logic in measure() and updateDisplayList()
+        return point.x < sortItemRendererInstance.x
+                         ? AdvancedDataGrid.HEADER_TEXT_PART
+                         : AdvancedDataGrid.HEADER_ICON_PART;
+    }
+
+    /**
+     *  Returns the sort information for this column from the AdvancedDataGrid control
+     *  so that the control can display the column's number in the sort sequence,
+     *  and whether the sort is ascending or descending.
+     *  The sorting information is represented by an instance of the SortInfo class,
+     *  where each column in the AdvancedDataGrid control has an associated
+     *  SortInfo instance.
+     *
+     *  @return A SortInfo instance.
+     *
+     *  @see mx.controls.advancedDataGridClasses.SortInfo
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function getFieldSortInfo():SortInfo
+    {
+       	return grid.getFieldSortInfo(grid.columns[listData.columnIndex]);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Positions the tooltip in the header.
+     *
+     *  @param The Event object.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function toolTipShowHandler(event:ToolTipEvent):void
+    {
+        var toolTip:IToolTip = event.toolTip;
+		var xPos:int = DisplayObject(systemManager).mouseX + 11;
+        var yPos:int = DisplayObject(systemManager).mouseY + 22;
+        // Calculate global position of label.
+        var pt:Point = new Point(xPos, yPos);
+        pt = DisplayObject(systemManager).localToGlobal(pt);
+        pt = DisplayObject(systemManager.getSandboxRoot()).globalToLocal(pt);
+
+        toolTip.move(pt.x, pt.y + (height - toolTip.height) / 2);
+
+        var screen:Rectangle = toolTip.screen;
+        var screenRight:Number = screen.x + screen.width;
+        if (toolTip.x + toolTip.width > screenRight)
+            toolTip.move(screenRight - toolTip.width, toolTip.y);
+
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function getLabel():IUITextField
+    {
+        return label;
+    }
+
+} // end class
+
+} // end package


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@1248577 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridRendererProvider.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridRendererProvider.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  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.
 //
 ////////////////////////////////////////////////////////////////////////////////