Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/NumericStepper.as
+++ frameworks/projects/mx/src/mx/controls/NumericStepper.as
@@ -0,0 +1,1401 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls
+{
+
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.events.TextEvent;
+import flash.text.TextField;
+import flash.text.TextLineMetrics;
+import flash.ui.Keyboard;
+import mx.controls.listClasses.BaseListData;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.core.FlexVersion;
+import mx.core.IDataRenderer;
+import mx.core.IFlexDisplayObject;
+import mx.core.IIMESupport;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+import mx.events.NumericStepperEvent;
+import mx.managers.IFocusManager;
+import mx.managers.IFocusManagerComponent;
+import mx.styles.StyleProxy;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the value of the NumericStepper control changes
+ *  as a result of user interaction.
+ *
+ *  @eventType mx.events.NumericStepperEvent.CHANGE
+ */
+[Event(name="change", type="mx.events.NumericStepperEvent")]
+
+/**
+ *  Dispatched when the data property changes.
+ *
+ *
When you use a component as an item renderer,
+ *  the data property contains the data to display.
+ *  You can listen for this event and update the component
+ *  when the data property changes.

+ *
+ *  @eventType mx.events.FlexEvent.DATA_CHANGE
+ */
+[Event(name="dataChange", type="mx.events.FlexEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../styles/metadata/BorderStyles.as"
+include "../styles/metadata/FocusStyles.as"
+include "../styles/metadata/IconColorStyles.as"
+include "../styles/metadata/LeadingStyle.as"
+include "../styles/metadata/PaddingStyles.as"
+include "../styles/metadata/TextStyles.as"
+
+/**
+ *  Name of the class to use as the default skin for the down arrow.
+ *
+ *  @default mx.skins.halo.NumericStepperDownSkin
+ */
+[Style(name="downArrowSkin", type="Class", inherit="no", states="up, over, down, disabled")]
+
+/**
+ *  Name of the class to use as the skin for the Down arrow
+ *  when the arrow is disabled.
+ *
+ *  @default mx.skins.halo.NumericStepperDownSkin
+ */
+[Style(name="downArrowDisabledSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the Down arrow
+ *  when the arrow is enabled and a user presses the mouse button over the arrow.
+ *
+ *  @default mx.skins.halo.NumericStepperDownSkin
+ */
+[Style(name="downArrowDownSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the Down arrow
+ *  when the arrow is enabled and the mouse pointer is over the arrow.
+ *
+ *  @default mx.skins.halo.NumericStepperDownSkin
+ */
+[Style(name="downArrowOverSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the Down arrow
+ *  when the arrow is enabled and the mouse pointer is not on the arrow.
+ *  There is no default.
+ */
+[Style(name="downArrowUpSkin", type="Class", inherit="no")]
+
+/**
+ *  Alphas used for the highlight fill of controls.
+ *
+ *  @default [ 0.3, 0.0 ]
+ */
+[Style(name="highlightAlphas", type="Array", arrayType="Number", inherit="no")]
+
+/**
+ *  Name of the class to use as the default skin for the up arrow.
+ *
+ *  @default mx.skins.halo.NumericStepperUpSkin
+ */
+[Style(name="upArrowSkin", type="Class", inherit="no", states="up, over, down, disabled")]
+
+/**
+ *  Name of the class to use as the skin for the Up arrow
+ *  when the arrow is disabled.
+ *
+ *  @default mx.skins.halo.NumericStepperUpSkin
+ */
+[Style(name="upArrowDisabledSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the Up arrow
+ *  when the arrow is enabled and a user presses the mouse button over the arrow.
+ *
+ *  @default mx.skins.halo.NumericStepperUpSkin
+ */
+[Style(name="upArrowDownSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the Up arrow
+ *  when the arrow is enabled and the mouse pointer is over the arrow.
+ *
+ *  @default mx.skins.halo.NumericStepperUpSkin
+ */
+[Style(name="upArrowOverSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the Up arrow
+ *  when the arrow is enabled and the mouse pointer is not on the arrow.
+ *
+ *  @default mx.skins.halo.NumericStepperUpSkin
+ */
+[Style(name="upArrowUpSkin", type="Class", inherit="no")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[IconFile("NumericStepper.png")]
+
+[DefaultBindingProperty(source="value", destination="value")]
+
+[DefaultTriggerEvent("change")]
+
+/**
+ *  The NumericStepper control lets the user select
+ *  a number from an ordered set.
+ *  The NumericStepper 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.
+ *
+ *
The NumericStepper control has the following default characteristics:

+ *

+ *

+ *           Characteristic
+ *           Description
+ *

+ *

+ *           Default size
+ *           Wide enough to display the maximum number of digits used by the control
+ *

+ *

+ *           Minimum size
+ *           Based on the size of the text.
+ *

+ *

+ *           Maximum size
+ *           Undefined
+ *

+ *

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

+ *  <mx:NumericStepper
+ *    Properties
+ *    imeMode="null"
+ *    maxChars="10"
+ *    maximum="10"
+ *    minimum="0"
+ *    stepSize="1"
+ *    value="0"
+ *
+ *    Styles
+ *    backgroundAlpha="1.0"
+ *    backgroundColor="undefined"
+ *    backgroundImage="undefined"
+ *    backgroundSize="auto"
+ *    borderColor="0xAAB3B3"
+ *    borderSides="left top right bottom"
+ *    borderSkin="HaloBorder"
+ *    borderStyle="inset"
+ *    borderThickness="1"
+ *    color="0x0B333C"
+ *    cornerRadius="0"
+ *    disabledColor="0xAAB3B3"
+ *    disabledIconColor="0x999999"
+ *    downArrowDisabledSkin="NumericStepperDownSkin"
+ *    downArrowDownSkin="NumericStepperDownSkin"
+ *    downArrowOverSkin="NumericStepperDownSkin"
+ *    downArrowUpSkin="NumericStepperDownSkin"
+ *    dropShadowEnabled="false"
+ *    dropShadowColor="0x000000"
+ *    focusAlpha="0.5"
+ *    focusRoundedCorners="tl tr bl br"
+ *    fontAntiAliasType="advanced"
+ *    fontFamily="Verdana"
+ *    fontGridFitType="pixel"
+ *    fontSharpness="0"
+ *    fontSize="10"
+ *    fontStyle="normal|italic"
+ *    fontThickness="0"
+ *    fontWeight="normal|bold"
+ *    highlightAlphas="[0.3,0.0]"
+ *    iconColor="0x111111"
+ *    leading="2"
+ *    paddingLeft="0"
+ *    paddingRight="0"
+ *    shadowDirection="center"
+ *    shadowDistance="2"
+ *    textAlign="left|center|right"
+ *    textDecoration="none|underline"
+ *    textIndent="0"
+ *    upArrowDisabledSkin="NumericStepperUpSkin"
+ *    upArrowDownSkin="NumericStepperUpSkin"
+ *    upArrowOverSkin="NumericStepperUpSkin"
+ *    upArrowUpSkin="NumericStepperUpSkin"
+ *
+ *    Events
+ *    change="No default"
+ *    dataChange="No default"
+ *  />
+ *

+ *
+ *  @includeExample examples/NumericStepperExample.mxml
+ *
+ */
+public class NumericStepper extends UIComponent
+                            implements IDataRenderer, IDropInListItemRenderer,
+                            IFocusManagerComponent, IIMESupport,
+                            IListItemRenderer
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function NumericStepper()
+    {
+        super();
+        tabChildren = true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    mx_internal var inputField:TextInput;
+
+    /**
+     *  @private
+     */
+    mx_internal var nextButton:Button;
+
+    /**
+     *  @private
+     */
+    mx_internal var prevButton:Button;
+
+    /**
+     *  @private
+     *  Flag that will block default data/listData behavior
+     */
+    private var valueSet:Boolean;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     *  The baselinePosition of a NumericStepper is calculated
+     *  for its inputField.
+     */
+    override public function get baselinePosition():Number
+    {
+        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+            return inputField ? inputField.baselinePosition : NaN;
+
+        if (!validateBaselinePosition())
+            return NaN;
+
+        return inputField.y + inputField.baselinePosition;
+    }
+
+    //----------------------------------
+    //  enabled
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var enabledChanged:Boolean = false;
+
+    [Inspectable(category="General", enumeration="true,false", defaultValue="true")]
+
+    /**
+     *  @private
+     */
+    override public function set enabled(value:Boolean):void
+    {
+        super.enabled = value;
+        enabledChanged = true;
+
+        invalidateProperties();
+    }
+
+    /**
+     *  @private
+     */
+    override public function get enabled():Boolean
+    {
+        return super.enabled;
+    }
+
+    //----------------------------------
+    //  tabIndex
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the tabIndex property.
+     */
+    private var _tabIndex:int = -1;
+
+    /**
+     *  @private
+     */
+    private var tabIndexChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  Tab order in which the control receives the focus when navigating
+     *  with the Tab key.
+     *
+     *  @default -1
+     *  @tiptext tabIndex of the component
+     *  @helpid 3198
+     */
+    override public function get tabIndex():int
+    {
+        return _tabIndex;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set tabIndex(value:int):void
+    {
+        if (value == _tabIndex)
+            return;
+
+        _tabIndex = value;
+        tabIndexChanged = true;
+
+        invalidateProperties();
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the data property.
+     */
+    private var _data:Object;
+
+    [Bindable("dataChange")]
+    [Inspectable(environment="none")]
+
+    /**
+     *  The data property lets you pass a value to the component
+     *  when you use it in an item renderer or item editor.
+     *  You typically use data binding to bind a field of the data
+     *  property to a property of this component.
+     *
+     *
When you use the control as a drop-in item renderer or drop-in
+     *  item editor, Flex automatically writes the current value of the item
+     *  to the value property of this control.

+     *
+     *  @default null
+     *  @see mx.core.IDataRenderer
+     */
+    public function get data():Object
+    {
+        if (!_listData)
+            data = this.value;
+
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+        _data = value;
+
+        if (!valueSet)
+        {
+            this.value = _listData ? parseFloat(_listData.label) : Number(_data);
+            valueSet = false;
+        }
+
+        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+    }
+
+    //----------------------------------
+    //  downArrowStyleFilters
+    //----------------------------------
+
+    /**
+     *  Set of styles to pass from the NumericStepper to the down arrow.
+     *  @see mx.styles.StyleProxy
+     */
+    protected function get downArrowStyleFilters():Object
+    {
+        return _downArrowStyleFilters;
+    }
+
+    private static var _downArrowStyleFilters:Object =
+    {
+        "cornerRadius" : "cornerRadius",
+        "highlightAlphas" : "highlightAlphas",
+        "downArrowUpSkin" : "downArrowUpSkin",
+        "downArrowOverSkin" : "downArrowOverSkin",
+        "downArrowDownSkin" : "downArrowDownSkin",
+        "downArrowDisabledSkin" : "downArrowDisabledSkin",
+        "downArrowSkin" : "downArrowSkin",
+        "repeatDelay" : "repeatDelay",
+        "repeatInterval" : "repeatInterval"
+    };
+
+    //----------------------------------
+    //  imeMode
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _imeMode:String = null;
+
+    [Inspectable(defaultValue="")]
+
+    /**
+     *  Specifies the IME (Input Method Editor) mode.
+     *  The IME enables users to enter text in Chinese, Japanese, and Korean.
+     *  Flex sets the specified IME mode when the control gets the focus
+     *  and sets it back to previous value when the control loses the focus.
+     *
+     *
The flash.system.IMEConversionMode class defines constants for the
+     *  valid values for this property.
+     *  You can also specify null to specify no IME.

+     *
+     *  @see flash.system.IMEConversionMode
+     *
+     *  @default null
+     */
+    public function get imeMode():String
+    {
+        return _imeMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set imeMode(value:String):void
+    {
+        _imeMode = value;
+
+        if (inputField)
+            inputField.imeMode = _imeMode;
+    }
+
+    //----------------------------------
+    //  inputFieldStyleFilters
+    //----------------------------------
+
+    /**
+     *  Set of styles to pass from the NumericStepper to the input field.
+     *  @see mx.styles.StyleProxy
+     */
+    protected function get inputFieldStyleFilters():Object
+    {
+        return _inputFieldStyleFilters;
+    }
+
+    private static var _inputFieldStyleFilters:Object =
+    {
+        "backgroundAlpha" : "backgroundAlpha",
+        "backgroundColor" : "backgroundColor",
+        "backgroundImage" : "backgroundImage",
+        "backgroundDisabledColor" : "backgroundDisabledColor",
+        "backgroundSize" : "backgroundSize",
+        "borderAlpha" : "borderAlpha",
+        "borderColor" : "borderColor",
+        "borderSides" : "borderSides",
+        "borderSkin" : "borderSkin",
+        "borderStyle" : "borderStyle",
+        "borderThickness" : "borderThickness",
+        "dropShadowColor" : "dropShadowColor",
+        "dropShadowEnabled" : "dropShadowEnabled",
+        "embedFonts" : "embedFonts",
+        "focusAlpha" : "focusAlpha",
+        "focusBlendMode" : "focusBlendMode",
+        "focusRoundedCorners" : "focusRoundedCorners",
+        "focusThickness" : "focusThickness",
+        "paddingLeft" : "paddingLeft",
+        "paddingRight" : "paddingRight",
+        "shadowDirection" : "shadowDirection",
+        "shadowDistance" : "shadowDistance",
+        "textDecoration" : "textDecoration"
+    };
+
+    //----------------------------------
+    //  listData
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the listData property.
+     */
+    private var _listData:BaseListData;
+
+    [Bindable("dataChange")]
+    [Inspectable(environment="none")]
+
+    /**
+     *  When a component is used as a drop-in item renderer or drop-in
+     *  item editor, Flex initializes the listData property
+     *  of the component with the appropriate data from the List control.
+     *  The component can then use the listData property
+     *  to initialize the data property of the drop-in
+     *  item renderer or drop-in item editor.
+     *
+     *
You do not set this property in MXML or ActionScript;
+     *  Flex sets it when the component is used as a drop-in item renderer
+     *  or drop-in item editor.

+     *
+     *  @default null
+     *  @see mx.controls.listClasses.IDropInListItemRenderer
+     */
+    public function get listData():BaseListData
+    {
+        return _listData;
+    }
+
+    /**
+     *  @private
+     */
+    public function set listData(value:BaseListData):void
+    {
+        _listData = value;
+    }
+
+    //----------------------------------
+    //  maxChars
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the maxChars property.
+     */
+    private var _maxChars:int = 0;
+
+    /**
+     *  @private
+     */
+    private var maxCharsChanged:Boolean = false;
+
+    [Bindable("maxCharsChanged")]
+
+    /**
+     *  The maximum number of characters that can be entered in the field.
+     *  A value of 0 means that any number of characters can be entered.
+     *
+     *  @default 0
+     */
+    public function get maxChars():int
+    {
+        return _maxChars;
+    }
+
+    public function set maxChars(value:int):void
+    {
+        if (value == _maxChars)
+            return;
+
+        _maxChars = value;
+        maxCharsChanged = true;
+
+        invalidateProperties();
+
+        dispatchEvent(new Event("maxCharsChanged"));
+    }
+
+    //----------------------------------
+    //  maximum
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for maximum property.
+     */
+    private var _maximum:Number = 10;
+
+    [Bindable("maximumChanged")]
+    [Inspectable(category="General", defaultValue="10")]
+
+    /**
+     *  Maximum value of the NumericStepper.
+     *  The maximum can be any number, including a fractional value.
+     *
+     *  @default 10
+     */
+    public function get maximum():Number
+    {
+        return _maximum;
+    }
+
+    public function set maximum(value:Number):void
+    {
+        _maximum = value;
+
+        // To validate the value as min/max/stepsize has changed.
+        if (!valueChanged)
+        {
+            this.value = this.value;
+            valueSet = false;
+        }
+
+        dispatchEvent(new Event("maximumChanged"));
+    }
+
+    //----------------------------------
+    //  minimum
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for minimum property.
+     */
+    private var _minimum:Number = 0;
+
+    [Bindable("minimumChanged")]
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  Minimum value of the NumericStepper.
+     *  The minimum can be any number, including a fractional value.
+     *
+     *  @default 0
+     */
+    public function get minimum():Number
+    {
+        return _minimum;
+    }
+
+    public function set minimum(value:Number):void
+    {
+        _minimum = value;
+
+        // To validate the value as min/max/stepsize has changed.
+        if (!valueChanged)
+        {
+            this.value = this.value;
+            valueSet = false;
+        }
+
+        dispatchEvent(new Event("minimumChanged"));
+    }
+
+    //----------------------------------
+    //  nextValue
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the nextValue property.
+     */
+    private var _nextValue:Number = 0;
+
+    /**
+     *  The value that is one step larger than the current value
+     *  property and not greater than the maximum property value.
+     */
+    public function get nextValue():Number
+    {
+        if (checkRange(value + stepSize))
+            _nextValue = value + stepSize;
+
+        return _nextValue;
+    }
+
+    //----------------------------------
+    //  previousValue
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the previousValue property.
+     */
+    private var _previousValue:Number = 0;
+
+    /**
+     *  The value that is one step smaller than the current value
+     *  property and not smaller than the maximum property value.
+     */
+    public function get previousValue():Number
+    {
+        if (checkRange(_value - stepSize))
+            _previousValue = value - stepSize;
+
+        return _previousValue;
+    }
+
+    //----------------------------------
+    //  stepSize
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the stepSize property.
+     */
+    private var _stepSize:Number = 1;
+
+    [Bindable("stepSizeChanged")]
+    [Inspectable(category="General", defaultValue="1")]
+
+    /**
+     *  Non-zero unit of change between values.
+     *  The value property must be a multiple of this number.
+     *
+     *  @default 1
+     */
+    public function get stepSize():Number
+    {
+        return _stepSize;
+    }
+
+    /**
+     *  @private
+     */
+    public function set stepSize(value:Number):void
+    {
+        _stepSize = value;
+
+        // To validate the value as min/max/stepsize has changed.
+        if (!valueChanged)
+        {
+            this.value = this.value;
+            valueSet = false;
+        }
+
+        dispatchEvent(new Event("stepSizeChanged"));
+    }
+
+    //----------------------------------
+    //  upArrowStyleFilters
+    //----------------------------------
+
+    /**
+     *  Set of styles to pass from the NumericStepper to the up arrow.
+     *  @see mx.styles.StyleProxy
+     */
+    protected function get upArrowStyleFilters():Object
+    {
+        return _upArrowStyleFilters;
+    }
+
+    private static var _upArrowStyleFilters:Object =
+    {
+        "cornerRadius" : "cornerRadius",
+        "highlightAlphas" : "highlightAlphas",
+        "upArrowUpSkin" : "upArrowUpSkin",
+        "upArrowOverSkin" : "upArrowOverSkin",
+        "upArrowDownSkin" : "upArrowDownSkin",
+        "upArrowDisabledSkin" : "upArrowDisabledSkin",
+        "upArrowSkin" : "upArrowSkin",
+        "repeatDelay" : "repeatDelay",
+        "repeatInterval" : "repeatInterval"
+    };
+
+    //----------------------------------
+    //  value
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the value property.
+     */
+    private var _value:Number = 0;
+
+    /**
+     *  @private
+     *  last value we send CHANGE for.
+     *  _value will hold uncommitted values as well
+     */
+    private var lastValue:Number = 0;
+
+    /**
+     *  @private
+     *  Holds the value of the value property
+     *  until it is committed in commitProperties().
+     */
+    private var proposedValue:Number = 0;
+
+    /**
+     *  @private
+     *  Keeps track of whether we need to update
+     *  the value in commitProperties().
+     */
+    private var valueChanged:Boolean = false;
+
+    [Bindable("change")]
+    [Bindable("valueCommit")]
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  Current value displayed in the text area of the NumericStepper control.
+     *  If a user enters number that is not a multiple of the
+     *  stepSize property or is not in the range
+     *  between the maximum and minimum properties,
+     *  this property is set to the closest valid value.
+     *
+     *  @default 0
+     */
+    public function get value():Number
+    {
+        return valueChanged ? proposedValue : _value;
+    }
+
+    /**
+     *  @private
+     */
+    public function set value(value:Number):void
+    {
+        valueSet = true;
+
+        proposedValue = value;
+        valueChanged = true;
+
+        invalidateProperties();
+        invalidateSize();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        if (!inputField)
+        {
+            inputField = new TextInput();
+
+            inputField.styleName = new StyleProxy(this, inputFieldStyleFilters);
+            inputField.focusEnabled = false;
+
+            // restrict to numbers - dashes - commas - decimals
+            inputField.restrict = "0-9\\-\\.\\,";
+
+            inputField.maxChars = _maxChars;
+            inputField.text = String(_value);
+            inputField.parentDrawsFocus = true;
+            inputField.imeMode = _imeMode;
+
+            inputField.addEventListener(FocusEvent.FOCUS_IN, inputField_focusInHandler);
+            inputField.addEventListener(FocusEvent.FOCUS_OUT, inputField_focusOutHandler);
+            inputField.addEventListener(KeyboardEvent.KEY_DOWN, inputField_keyDownHandler);
+            inputField.addEventListener(Event.CHANGE, inputField_changeHandler);
+
+            addChild(inputField);
+        }
+
+        if (!nextButton)
+        {
+            nextButton = new Button();
+            nextButton.styleName = new StyleProxy(this, upArrowStyleFilters);
+            nextButton.upSkinName = "upArrowUpSkin";
+            nextButton.overSkinName = "upArrowOverSkin";
+            nextButton.downSkinName = "upArrowDownSkin";
+            nextButton.disabledSkinName = "upArrowDisabledSkin";
+            nextButton.skinName = "upArrowSkin";
+            nextButton.upIconName = "";
+            nextButton.overIconName = "";
+            nextButton.downIconName = "";
+            nextButton.disabledIconName = "";
+
+            nextButton.focusEnabled = false;
+            nextButton.autoRepeat = true;
+
+            nextButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
+            nextButton.addEventListener(FlexEvent.BUTTON_DOWN, buttonDownHandler);
+
+            addChild(nextButton);
+        }
+
+        if (!prevButton)
+        {
+            prevButton = new Button();
+            prevButton.styleName = new StyleProxy(this, downArrowStyleFilters);
+            prevButton.upSkinName = "downArrowUpSkin";
+            prevButton.overSkinName = "downArrowOverSkin";
+            prevButton.downSkinName = "downArrowDownSkin";
+            prevButton.disabledSkinName = "downArrowDisabledSkin";
+            prevButton.skinName = "downArrowSkin";
+            prevButton.upIconName = "";
+            prevButton.overIconName = "";
+            prevButton.downIconName = "";
+            prevButton.disabledIconName = "";
+
+            prevButton.focusEnabled = false;
+            prevButton.autoRepeat = true;
+
+            prevButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
+            prevButton.addEventListener(FlexEvent.BUTTON_DOWN, buttonDownHandler);
+
+            addChild(prevButton);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (maxCharsChanged)
+        {
+            maxCharsChanged = false;
+            inputField.maxChars = _maxChars;
+        }
+
+        if (valueChanged)
+        {
+            valueChanged = false;
+
+            setValue(isNaN(proposedValue) ? 0 : proposedValue, false);
+        }
+
+        if (enabledChanged)
+        {
+            enabledChanged = false;
+
+            prevButton.enabled = enabled;
+            nextButton.enabled = enabled;
+            inputField.enabled = enabled;
+        }
+
+        if (tabIndexChanged)
+        {
+            inputField.tabIndex = _tabIndex;
+
+            tabIndexChanged = false;
+        }
+
+    }
+
+    /**
+     *  @private
+     *  Return the preferred sizes of the stepper.
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var widestNumber:Number = minimum.toString().length >
+                                  maximum.toString().length ?
+                                  minimum :
+                                  maximum;
+        widestNumber += stepSize;
+
+        var lineMetrics:TextLineMetrics = measureText(widestNumber.toString());
+
+        var textHeight:Number = inputField.getExplicitOrMeasuredHeight();
+        var buttonHeight:Number = prevButton.getExplicitOrMeasuredHeight() +
+                                  nextButton.getExplicitOrMeasuredHeight();
+
+        var h:Number = Math.max(textHeight, buttonHeight);
+        h = Math.max(DEFAULT_MEASURED_MIN_HEIGHT, h);
+
+        var textWidth:Number = lineMetrics.width + UITextField.TEXT_WIDTH_PADDING;
+        var buttonWidth:Number = Math.max(prevButton.getExplicitOrMeasuredWidth(),
+                                          nextButton.getExplicitOrMeasuredWidth());
+
+        var w:Number = textWidth + buttonWidth + 20;
+        w = Math.max(DEFAULT_MEASURED_MIN_WIDTH, w);
+
+        measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH;
+        measuredMinHeight = DEFAULT_MEASURED_MIN_HEIGHT;
+
+        measuredWidth = w;
+        measuredHeight = h;
+    }
+
+    /**
+     *  @private
+     *  Place the buttons to the right of the text field.
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var w:Number = nextButton.getExplicitOrMeasuredWidth();
+        var h:Number = Math.round(unscaledHeight / 2);
+        var h2:Number = unscaledHeight - h;
+
+        nextButton.x = unscaledWidth - w;
+        nextButton.y = 0;
+        nextButton.setActualSize(w, h2);
+
+        prevButton.x = unscaledWidth - w;
+        prevButton.y = unscaledHeight - h;
+        prevButton.setActualSize(w, h);
+
+        inputField.setActualSize(unscaledWidth - w, unscaledHeight);
+    }
+
+    /**
+     *  @private
+     *  Update the text field.
+     */
+    override public function setFocus():void
+    {
+        if (stage)
+            stage.focus = TextField(inputField.getTextField());
+    }
+
+    /**
+     *  @private
+     */
+    override protected function isOurFocus(target:DisplayObject):Boolean
+    {
+        return target == inputField || super.isOurFocus(target);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Verify that the value is within range.
+     */
+    private function checkRange(v:Number):Boolean
+    {
+        return v >= minimum && v <= maximum;
+    }
+
+    /**
+     *  @private
+     */
+    private function checkValidValue(value:Number):Number
+    {
+        if (isNaN(value))
+            return this.value;
+
+        var closest:Number = stepSize * Math.round(value / stepSize);
+
+        // The following logic has been implemented to fix bug 135045.
+        // It assumes that the above line of code which rounds off the
+        // value is not removed ! (That is, the precision of the value is
+        // never expected to be greater than the step size.
+        // ex : value = 1.11111 stepSize = 0.01)
+
+        // Use precision of the step to round of the value.
+        // When the stepSize is very small the system tends to put it in
+        // exponential format.(ex : 1E-7) The following string split logic
+        // cannot work with exponential notation. Hence we add 1 to the stepSize
+        // to make it get represented in the decimal format.
+        // We are only interested in the number of digits towards the right
+        // of the decimal place so it doesnot affect anything else.
+        var parts:Array = (new String(1 + stepSize)).split(".");
+
+        // we need to do the round of (to remove the floating point error)
+        // if the stepSize had a fractional value
+        if (parts.length == 2)
+        {
+            var scale:Number = Math.pow(10, parts[1].length);
+            closest = Math.round(closest * scale) / scale;
+        }
+
+        if (closest > maximum)
+            return maximum;
+        else if (closest < minimum)
+            return minimum;
+        else
+            return closest;
+    }
+
+    /**
+     *  @private
+     */
+    private function setValue(value:Number,
+                              sendEvent:Boolean = true,
+                              trigger:Event = null):void
+    {
+
+        var v:Number = checkValidValue(value);
+        if (v == lastValue)
+            return;
+
+        lastValue = _value = v;
+        inputField.text = v.toString();
+
+        if (sendEvent)
+        {
+            var event:NumericStepperEvent =
+                new NumericStepperEvent(NumericStepperEvent.CHANGE);
+            event.value = _value;
+            event.triggerEvent = trigger;
+
+            dispatchEvent(event);
+        }
+
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+    }
+
+    /**
+     *  @private
+     *  Checks the value in the text field. If it is valid value
+     *  and different from the current value, it is taken as new value.
+     */
+    private function takeValueFromTextField(trigger:Event = null):void
+    {
+        var inputValue:Number = Number(inputField.text);
+        if ((inputValue != lastValue &&
+            (Math.abs(inputValue - lastValue) >= 0.000001 || isNaN(inputValue))) ||
+            inputField.text == "")
+        {
+            var newValue:Number = checkValidValue(Number(inputField.text));
+            inputField.text = newValue.toString();
+            setValue(newValue, trigger != null, trigger);
+        }
+    }
+
+    /**
+     *  @private
+     *  Increase/decrease the step value.
+     */
+    private function buttonPress(button:Button, trigger:Event = null):void
+    {
+        if (enabled)
+        {
+            // we may get a buttonPress message before focusOut event for
+            // the text field. Hence we need to check the value in
+            // inputField.
+            takeValueFromTextField();
+
+            var oldValue:Number = lastValue;
+            setValue(button == nextButton ?
+                     lastValue + stepSize :
+                     lastValue - stepSize, true, trigger);
+
+            if (oldValue != lastValue)
+                inputField.getTextField().setSelection(0,0);
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Remove the focus from the text field.
+     */
+    override protected function focusInHandler(event:FocusEvent):void
+    {
+        super.focusInHandler(event);
+
+        var fm:IFocusManager = focusManager;
+        if (fm)
+            fm.defaultButtonEnabled = false;
+    }
+
+    /**
+     *  @private
+     *  Remove the focus from the text field.
+     */
+    override protected function focusOutHandler(event:FocusEvent):void
+    {
+        var fm:IFocusManager = focusManager;
+        if (fm)
+            fm.defaultButtonEnabled = true;
+
+        super.focusOutHandler(event);
+
+        takeValueFromTextField(event);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function buttonDownHandler(event:FlexEvent):void
+    {
+        buttonPress(Button(event.currentTarget), event);
+    }
+
+    /**
+     *  @private
+     */
+    private function buttonClickHandler(event:MouseEvent):void
+    {
+        inputField.setFocus();
+        inputField.getTextField().setSelection(0, 0);
+    }
+
+    /**
+     *  @private
+     */
+    private function inputField_focusInHandler(event:FocusEvent):void
+    {
+        focusInHandler(event);
+
+        // Send out a new FocusEvent because the TextInput eats the event
+        // Make sure that it does not bubble.
+        dispatchEvent(new FocusEvent(event.type, false, false,
+                                     event.relatedObject,
+                                     event.shiftKey, event.keyCode));
+    }
+
+    /**
+     *  @private
+     */
+    private function inputField_focusOutHandler(event:FocusEvent):void
+    {
+        focusOutHandler(event);
+
+        // Send out a new FocusEvent because the TextInput eats the event
+        // Make sure that it does not bubble
+        dispatchEvent(new FocusEvent(event.type, false, false,
+                                     event.relatedObject,
+                                     event.shiftKey,event.keyCode));
+    }
+
+    /**
+     *  @private
+     */
+    private function inputField_keyDownHandler(event:KeyboardEvent):void
+    {
+        var tmpV:Number;
+
+        switch (event.keyCode)
+        {
+            case Keyboard.DOWN:
+            {
+                tmpV = value - stepSize;
+                setValue(tmpV, true);
+                break;
+            }
+
+            case Keyboard.UP:
+            {
+                tmpV = stepSize + value;
+                setValue(tmpV, true);
+                break;
+            }
+
+            case Keyboard.HOME:
+            {
+                inputField.text = minimum.toString();
+                setValue(minimum, true);
+                break;
+            }
+
+            case Keyboard.END:
+            {
+                inputField.text = maximum.toString();
+                setValue(maximum, true);
+                break;
+            }
+
+            case Keyboard.ENTER:
+            case Keyboard.TAB:
+            {
+                var inputValue:Number = Number(inputField.text);
+                if (inputValue != lastValue &&
+                    (Math.abs(inputValue - lastValue) >= 0.000001 ||
+                     isNaN(inputValue)))
+                {
+                    var newValue:Number = checkValidValue(Number(inputField.text));
+                    inputField.text = newValue.toString();
+                    setValue(newValue, true);
+                }
+
+                // Prevent the defaultButton from firing
+                event.stopImmediatePropagation();
+                break;
+            }
+        }
+
+        // Act as a proxy because the TextInput stops propogation
+        dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     */
+    private function inputField_changeHandler(event:Event):void
+    {
+        // Stop the event from bubbling up.
+        event.stopImmediatePropagation();
+
+        var inputValue:Number = Number(inputField.text);
+        if ((inputValue != value &&
+            (Math.abs(inputValue - value) >= 0.000001 || isNaN(inputValue))) ||
+            inputField.text == "")
+        {
+            _value = checkValidValue(inputValue);
+        }
+    }
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 7743
Author:   clucier@adobe.com
Date:     2009-06-11T13:53:10.203664Z

Log Message:
-----------
Moving away from using namespace qualifiers in most cases in the SDK.  We've run into a few cases now where the use of qualifiers in code that is called excessively can slow things down.
Bugs: SDK-21337
Reviewer: Ryan, Paul
QE Notes: None
Tests: Ran several random Mustella test groups, checkintests.

Modified Paths:
--------------
106 paths were modified

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

--- frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as
+++ frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as
@@ -223,7 +223,7 @@
         // channelSet.
         if (asyncRequest.channelSet == null && remoteObject.endpoint != null)
         {
-            remoteObject.mx_internal::initEndpoint();
+            remoteObject.initEndpoint();
         }

         if (!args || (args.length == 0 && this.arguments))


Transferred from the Adobe Open Source Subversion Repository

Revision: 4576
Author:   egeorgie@adobe.com
Date:     2009-01-17T00:17:50.968438Z

Log Message:
-----------
Fix bug http://bugs.adobe.com/jira/browse/SDK-18096 Cant set Gumbo FxButton control's content property dynamically at runtime using ActionScript http://bugs.adobe.com/jira/browse/SDK-18661  FxButton setting data property doesn't update label http://bugs.adobe.com/jira/browse/SDK-18394 The ASDoc for the "data" property of FxButton does not say what the property is for.
Fix: Remove "content" property. We should use "data" property now instead. Fix label property to be a String typed facade to data property. Make the "label" property the default one.

QE Notes: None
Doc Notes: None
Bugs: SDK-18096 SDK-18661 SDK-18394
Reviewer: Chet
tests: checkintest, mustella (FxButton)

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as

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

--- frameworks/projects/spark/src/spark/components/Button.as
+++ frameworks/projects/spark/src/spark/components/Button.as
@@ -65,7 +65,7 @@

 [DefaultTriggerEvent("click")]

-[DefaultProperty("content")]
+[DefaultProperty("label")]

 [IconFile("FxButton.png")]

@@ -141,21 +141,59 @@
     //
     //--------------------------------------------------------------------------

-    [Bindable]
+    /**
+     *  @private
+     *  Storage for the data property.
+     */
+    private var _data:Object;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The data property lets you pass an arbitrary object
+     *  to be used in a custom skin of the button.
+     *
+     *  When a skin defines the optional part labelField then
+     *  a string representation of data will be pushed down to
+     *  that part's text property.
+     *
+     *  The default skin uses this mechanism to render the data
+     *  as the button label.
+     *
+     *
When FxButton is used as an item renderer, the data
+     *  property will be set to the item value.

+     *
+     *
The label property is a String typed
+     *  facade of this property.  This property is bindable and it shares
+     *  the "dataChange" event with the label property.

+     *
+     *  @default null
+     *  @eventType dataChange
+     *  @see #label
+     *  @see mx.core.IDataRenderer
+     */
     public function get data():Object
     {
-        return content;
-    }
-
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
     public function set data(value:Object):void
     {
-        content = value;
-    }
-
-    [Bindable("labelChanged")]
+        _data = value;
+
+        // Push to the optional labelField skin part
+        if (labelField)
+            labelField.text = label;
+        dispatchEvent(new Event("dataChange"));
+    }
+
+    [Bindable("dataChange")]
     /**
      *  Text to appear on the FxButton control.
-     *
+     *
      *
If the label is wider than the FxButton control,
      *  the label is truncated and terminated by an ellipsis (...).
      *  The full label displays as a tooltip
@@ -163,27 +201,32 @@
      *  If you have also set a tooltip by using the tooltip
      *  property, the tooltip is displayed rather than the label text.

      *
+     *
This is the default FxButton property.

+     *
+     *
This property is a String typed facade to the
+     *  data property.  This property is bindable and it shares
+     *  dispatching the "dataChange" event with the data
+     *  property.

+     *
      *  @default ""
+     *  @see #data
+     *  @eventType dataChange
      */
     public function set label(value:String):void
     {
-        content = value;
-        dispatchEvent(new Event("labelChanged"));
-
-        if (labelField)
-            labelField.text = label;
-    }
+        // label property is just a proxy to the data.
+        // The data setter will dispatch the event.
+        data = value;
+    }
+
     /**
      *  @private
      */
     public function get label():String
     {
-        return (content != null) ? content.toString():"";
-    }
-
-    [Bindable]
-    public var content:*
-
+        return (data != null) ? data.toString() : "";
+    }
+
     // -----------------------------------------------------------------------
     //
     // Public properties defining the state of the button.


Regex was returning a list of length 9, with the 8th field empty.

Summary: This was not expected.

Test Plan: manual

Reviewers: bvanous

Reviewed By: bvanous

Differential Revision: https://phab.playfabdev.com/D4031

--- targets/actionscript/source/com/playfab/PlayFabUtil.as
+++ targets/actionscript/source/com/playfab/PlayFabUtil.as
@@ -24,7 +24,7 @@
             var second:Number = parseInt(result[6]);

             var milliseconds:Number = 0;
-            if(result.length == 9)
+            if(result.length == 9 && result[8])
                 milliseconds = parseInt(result[8]);

             if(data.charAt(data.length-1) == "Z")
@@ -37,4 +37,4 @@
             }
         }
     }
-}+}


fix for seeking

fix for seeking

--- src/flash/htmlelements/YouTubeElement.as
+++ src/flash/htmlelements/YouTubeElement.as
@@ -74,6 +74,9 @@
 		public function setSize(width:Number, height:Number):void {
 			if (_player != null) {
 				_player.setSize(width, height);
+			} else {
+				initHeight = height;
+				initWidth = width;
 			}
 		}

@@ -347,7 +350,8 @@
 		}

 		public function setCurrentTime(pos:Number):void {
-			_player.seekTo(pos, false);
+			//_player.seekTo(pos, false);
+			_player.seekTo(pos, true); // works in all places now
 		}

 		public function setVolume(volume:Number):void {


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

--- frameworks/projects/framework/src/mx/geom/CompoundTransform.as
+++ frameworks/projects/framework/src/mx/geom/CompoundTransform.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2008 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.geom
 {
     import __AS3__.vec.Vector;


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

--- frameworks/projects/framework/src/mx/geom/CompoundTransform.as
+++ frameworks/projects/framework/src/mx/geom/CompoundTransform.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2008 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.geom
 {
     import __AS3__.vec.Vector;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

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

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

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/graphics/GradientEntry.as
+++ frameworks/projects/framework/src/mx/graphics/GradientEntry.as
@@ -38,6 +38,11 @@
  *
  *  @see mx.graphics.LinearGradient
  *  @see mx.graphics.RadialGradient
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class GradientEntry extends EventDispatcher
 {
@@ -63,6 +68,11 @@
 	 *
 	 *  @param alpha The alpha value for this entry in the gradient.
 	 *  This parameter is optional. The default value is 1.0.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function GradientEntry(color:uint = 0x000000,
 								  ratio:Number = NaN,
@@ -95,6 +105,11 @@
 	 *  Possible values are 0.0 (invisible) through 1.0 (opaque).
 	 *
 	 *  @default 1.0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get alpha():Number
 	{
@@ -122,6 +137,11 @@

 	/**
 	 *  The color value for a gradient fill.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get color():uint
 	{
@@ -152,6 +172,11 @@
 	 *  Flex starts the transition to the associated color.
 	 *  For example, a ratio of 0.33 means Flex begins the transition
 	 *  to that color 33% of the way through the graphical element.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get ratio():Number
 	{


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/managers/IPopUpManager.as
+++ frameworks/projects/framework/src/mx/managers/IPopUpManager.as
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-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.managers
+{
+
+import flash.display.DisplayObject;
+import mx.core.IFlexDisplayObject;
+
+[ExcludeClass]
+
+/**
+ *  @private
+ */
+public interface IPopUpManager
+{
+	function createPopUp(parent:DisplayObject,
+			className:Class,
+			modal:Boolean = false,
+			childList:String = null):IFlexDisplayObject;
+	function addPopUp(window:IFlexDisplayObject,
+			parent:DisplayObject,
+			modal:Boolean = false,
+			childList:String = null):void;
+	function centerPopUp(popUp:IFlexDisplayObject):void;
+	function removePopUp(popUp:IFlexDisplayObject):void;
+	function bringToFront(popUp:IFlexDisplayObject):void;
+}
+
+}
+


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

--- frameworks/projects/spark/src/spark/components/DataRenderer.as
+++ frameworks/projects/spark/src/spark/components/DataRenderer.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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: 7045
Author:   dsubrama@adobe.com
Date:     2009-05-18T20:55:10.752713Z

Log Message:
-----------
Single and multiple selection are now funneled through a single method, commitSelection(), to validate and commit selection. selectionChanged and selectionChanging events are now properly dispatched.

QA: Yes - please write tests for selectionChanged/selectionChanging
Doc: Now
Checkintests: Pass
Reviewer: Hans

Bugfixes:
https://bugs.adobe.com/jira/browse/SDK-21141
https://bugs.adobe.com/jira/browse/SDK-21157

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/IndexChangedEvent.as</path>

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

--- frameworks/projects/spark/src/spark/components/DropDownList.as
+++ frameworks/projects/spark/src/spark/components/DropDownList.as
@@ -434,10 +434,11 @@
 	/**
 	 *  @private
 	 */
-	override protected function commitMultipleSelection():void
-    {
-    	super.commitMultipleSelection();
+	override protected function commitSelection(dispatchSelectionChanged:Boolean = true):Boolean
+    {
+    	var retVal:Boolean = super.commitSelection(dispatchSelectionChanged);
        	updateLabelElement();
+       	return retVal;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5223
Author:   egeorgie@adobe.com
Date:     2009-03-10T20:10:07.223108Z

Log Message:
-----------
Introduce ButtonBase and ToggleButtonBase classes and make FxButton extend ButtonBase, ToggleButtonBase extend ButtonBase, FxToggleButton, FxCheckBox, FxRadioButton extend ToggleButtonBase.as.
The emphasized property and IButton are pushed down to the FxButton, so the rest of the buttons don't have them.

QE Notes: None
Doc Notes:
Bugs: SDK-19671, SDK-19670
Reviewer: Glenn
tests: checkintests, mustella (gumbo/components)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxCheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ButtonBarButton.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/ButtonBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/ToggleButtonBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/ToggleButton.as
+++ frameworks/projects/spark/src/spark/components/ToggleButton.as
@@ -12,70 +12,8 @@
 package mx.components
 {

-import flash.events.Event;
-import flash.events.MouseEvent;
+import mx.components.baseClasses.ToggleButtonBase;

-import mx.core.mx_internal;
-import mx.events.FlexEvent;
-
-/**
- *  Dispatched when the selected property
- *  changes for the FxToggleButton control.
- *
- *  This event is dispatched only when the
- *  user interacts with the control by using the mouse.
- *
- *  @eventType flash.events.Event.CHANGE
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Event(name="change", type="flash.events.Event")]
-
-/**
- *  Up State of the Button when it's selected
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("upAndSelected")]
-
-/**
- *  Over State of the Button when it's selected
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("overAndSelected")]
-
-/**
- *  Down State of the Button when it's selected
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("downAndSelected")]
-
-/**
- *  Disabled State of the Button when it's selected
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("disabledAndSelected")]
-
-// TODO EGeorgie: figure out whether we need this?
-[DefaultBindingProperty(source="selected", destination="label")]

 [IconFile("FxToggleButton.png")]

@@ -96,7 +34,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class FxToggleButton extends FxButton
+public class FxToggleButton extends ToggleButtonBase
 {
     include "../core/Version.as";

@@ -118,85 +56,5 @@
     {
         super();
     }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  selected
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the selected property
-     */
-    private var _selected:Boolean;
-
-    [Bindable]
-
-    /**
-     *  true if the button is in the down state,
-     *  and false if it is in the up state.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get selected():Boolean
-    {
-        return _selected;
-    }
-
-    /**
-     *  @private
-     */
-    public function set selected(value:Boolean):void
-    {
-        if (value == _selected)
-            return;
-
-        _selected = value;
-        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
-        invalidateSkinState();
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  States
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    protected override function getCurrentSkinState():String
-    {
-        if( !selected )
-            return super.getCurrentSkinState();
-        else
-            return super.getCurrentSkinState() + "AndSelected";
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Event handling
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override protected function clickHandler(event:MouseEvent):void
-    {
-        super.clickHandler(event);
-        selected = !selected;
-        dispatchEvent(new Event(Event.CHANGE));
-        event.updateAfterEvent();
-    }
 }
-
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4806
Author:   pfarland@adobe.com
Date:     2009-02-03T05:01:18.665465Z

Log Message:
-----------
Fixes for Advanced CSS applying to inner components. The changes involved three areas:

1. mx.styles.StyleProxy needed updating to support IAdvancedStyleClient

2. mx.styles.StyleProtoChain required refactoring so that advanced selector matching functionality could be shared outside of this class (see next). The main change is in StyleProtoChain.addProperties() which is recursively called to handle the case when styleName is set to another IStyleClient (instead of a String). The change concerns the order of building the proto chain for this special case. Before advanced CSS, it seems we recursively did the following in the addProperties() subroutine:
  - Find type selectors, add to proto chain
  - Examine styleName:
    - if a CSSStyleDeclaration, add it to the proto chain next
    - if a IStyleClient, recurse again by calling addProperties to this IStyleClient
    - if a String, apply class selectors to proto chain
  - Finally, add inline style declarations to proto chain

Advanced CSS might involve other universal selectors that aren't necessarily class selectors (such as id selectors), or we could have type selectors that are more specific that class selectors. So the new logic for Advanced CSS is:
  - Examine styleName:
    - if a CSSStyleDeclaration, add it to the list of selectors
  - Get all matching selectors, sort by specificity, and add to the proto chain.
  - Then, if styleName was an IStyleClient, recurse again by calling addProperties to this IStyleClient
  - Finally, add inline styleDeclarations to proto chain

A styleName pointing to an IStyleClient means that it has a very high specificity and will override any other selector. The only thing that continues to always win are inline style declarations which are added last to the proto chain.

3. mx.core.UIComponent.initThemeColor() needed updating to support advanced CSS selectors. This required the use of a new utility method in StyleProtoChain to find matching selectors.

QA: Yes, please watch styles test results closely. Take a look at descendant/id/class selectors on more advanced components like DataGrid.
Doc: No
Checkintests: Pass
Reviewer: Glenn
Bugs:
SDK-17358 - [Advanced CSS] When using an id selector without a Type selector, styles are not passed onto sub components (e.g. the drop down of a ComboBox)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleProxy.as
+++ frameworks/projects/framework/src/mx/styles/StyleProxy.as
@@ -18,12 +18,13 @@
 use namespace mx_internal;

 /**
- *  Wraps an object that implements the IStyleClient interface. This interface
- *  supports a filterMap property that contains style-source/style-destination pairs.
+ *  Wraps an object that implements the IAdvancedStyleClient interface. This
+ *  interface supports a filterMap property that contains
+ *  style-source/style-destination pairs.
  *
- *  @see mx.styles.IStyleClient
+ *  @see mx.styles.IAdvancedStyleClient
  */
-public class StyleProxy implements IStyleClient
+public class StyleProxy implements IAdvancedStyleClient
 {
     include "../core/Version.as";

@@ -46,25 +47,13 @@
         this.filterMap = filterMap;
         this.source = source;
     }
-
+
     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------

-    //----------------------------------
-    //  className
-    //----------------------------------
-
-    /**
-     *  @copy mx.styles.IStyleClient#className
-     */
-    public function get className():String
-    {
-        return _source.className;
-    }
-
     //----------------------------------
     //  filterMap
     //----------------------------------
@@ -97,19 +86,70 @@
     {
         _filterMap = value;
     }
+
+    //----------------------------------
+    //  source
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the source property.
+     */
+    private var _source:IStyleClient;
+
+    /**
+     *  @private
+     */
+    private var _advancedSource:IAdvancedStyleClient;
+
+    /**
+     *  The object that implements the IStyleClient interface. This is the object
+     *  that is being proxied.
+     */
+    public function get source():IStyleClient
+    {
+        return _source;
+    }
+
+    /**
+     *  @private
+     */
+    public function set source(value:IStyleClient):void
+    {
+        _source = value;
+        _advancedSource = value as IAdvancedStyleClient;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties - IStyleClient
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  className
+    //----------------------------------
+
+    /**
+     *  @copy mx.styles.IStyleClient#className
+     */
+    public function get className():String
+    {
+        return _source.className;
+    }
+
+    //----------------------------------
+    //  inheritingStyles
+    //----------------------------------
+
+    /**
+     *  @copy mx.styles.IStyleClient#inheritingStyles
+     */
+    public function get inheritingStyles():Object
+    {
+        return _source.inheritingStyles;
+    }

-    //----------------------------------
-    //  inheritingStyles
-    //----------------------------------
-
-    /**
-     *  @copy mx.styles.IStyleClient#inheritingStyles
-     */
-    public function get inheritingStyles():Object
-    {
-        return _source.inheritingStyles;
-    }
-
     /**
      *  @private
      */
@@ -117,7 +157,7 @@
     {
         // This should never happen
     }
-
+
     //----------------------------------
     //  nonInheritingStyles
     //----------------------------------
@@ -131,7 +171,7 @@
                _source.nonInheritingStyles :
                null; // This will always need to get reconstructed
     }
-
+
     /**
      *  @private
      */
@@ -139,34 +179,7 @@
     {
         // This should never happen
     }
-
-    //----------------------------------
-    //  source
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the filterMap property.
-     */
-    private var _source:IStyleClient;
-
-    /**
-     *  The object that implements the IStyleClient interface. This is the object
-     *  that is being proxied.
-     */
-    public function get source():IStyleClient
-    {
-        return _source;
-    }
-
-    /**
-     *  @private
-     */
-    public function set source(value:IStyleClient):void
-    {
-        _source = value;
-    }
-
+
     //----------------------------------
     //  styleDeclaration
     //----------------------------------
@@ -178,7 +191,7 @@
     {
         return _source.styleDeclaration;
     }
-
+
     /**
      *  @private
      */
@@ -186,7 +199,7 @@
     {
         _source.styleDeclaration = styleDeclaration;
     }
-
+
     //----------------------------------
     //  styleName
     //----------------------------------
@@ -201,7 +214,7 @@
         else
             return _source.styleName;
     }
-
+
     /**
      *  @private
      */
@@ -209,10 +222,52 @@
     {
         _source.styleName = value;
     }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Methods
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties - IAdvancedStyleClient
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  pseudoSelectorState
+    //----------------------------------
+
+    /**
+     *  @copy mx.styles.IAdvancedStyleClient#pseudoSelectorState
+     */
+    public function get pseudoSelectorState():String
+    {
+        return _advancedSource ? _advancedSource.pseudoSelectorState : null;
+    }
+
+    //----------------------------------
+    //  id
+    //----------------------------------
+
+    /**
+     *  @copy mx.styles.IAdvancedStyleClient#id
+     */
+    public function get id():String
+    {
+        return _advancedSource ? _advancedSource.id : null;
+    }
+
+    //----------------------------------
+    //  styleParent
+    //----------------------------------
+
+    /**
+     *  @copy mx.styles.IAdvancedStyleClient#styleParent
+     */
+    public function get styleParent():IAdvancedStyleClient
+    {
+        return _advancedSource ? _advancedSource.styleParent : null;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods - ISimpleStyleClient and IStyleClient
     //
     //--------------------------------------------------------------------------

@@ -223,7 +278,7 @@
     {
         return _source.styleChanged(styleProp);
     }
-
+
     /**
      *  @copy mx.styles.IStyleClient#getStyle()
      */
@@ -231,7 +286,7 @@
     {
         return _source.getStyle(styleProp);
     }
-
+
     /**
      *  @copy mx.styles.IStyleClient#setStyle()
      */
@@ -239,7 +294,7 @@
     {
         _source.setStyle(styleProp, newValue);
     }
-
+
     /**
      *  @copy mx.styles.IStyleClient#clearStyle()
      */
@@ -247,7 +302,7 @@
     {
         _source.clearStyle(styleProp);
     }
-
+
     /**
      *  @copy mx.styles.IStyleClient#getClassStyleDeclarations()
      */
@@ -255,7 +310,7 @@
     {
         return _source.getClassStyleDeclarations();
     }
-
+
     /**
      *  @copy mx.styles.IStyleClient#notifyStyleChangeInChildren()
      */
@@ -264,7 +319,7 @@
     {
         return _source.notifyStyleChangeInChildren(styleProp, recursive);
     }
-
+
     /**
      *  @copy mx.styles.IStyleClient#regenerateStyleCache()
      */
@@ -273,7 +328,7 @@
         _source.regenerateStyleCache(recursive);
         return;
     }
-
+
     /**
      *  @copy mx.styles.IStyleClient#registerEffects()
      */
@@ -281,6 +336,29 @@
     {
         return _source.registerEffects(effects);
     }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods - IAdvancedStyleClient
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy mx.styles.IAdvancedStyleClient#isAssignableToType()
+     */
+    public function isAssignableToType(type:String):Boolean
+    {
+        return _advancedSource ? _advancedSource.isAssignableToType(type) : false;
+    }
+
+    /**
+     *  @copy mx.styles.IAdvancedStyleClient#applyStateStyles()
+     */
+    public function applyStateStyles(oldState:String, newState:String, recursive:Boolean):void
+    {
+        if (_advancedSource)
+            _advancedSource.applyStateStyles(oldState, newState, recursive);
+    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 21680
Author:   jszeto@adobe.com
Date:     2011-07-21T21:56:22.533455Z

Log Message:
-----------
Item Snapping, SpinnerList and DateSpinner Initial checkin

Merging in changes from sandbox development branch

SpinnerList and DateSpinner are in usable states, but there is still unimplemented functionality.

QE notes: none
Doc notes: none
Bugs: none
Reviewer: Tom Kraikit, Eric Day, Jason Szeto
Tests run: checkintests, full cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateAndTimeRangeList.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.settings/org.eclipse.core.resources.prefs</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListScrollerSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalendarDate.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSelectorDisplayMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.settings</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/DateSpinnerTest-app.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/effects/ThrowEffect.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/views</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/layouts/VerticalSpinnerLayout.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.flexProperties</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/libs</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.actionScriptProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/bundles/en_US/components.properties</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/TouchScrollHelper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/TabbedViewNavigatorButtonBarFirstButton_down.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/DateSpinnerTest.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/blackberry-tablet.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/views/DateSpinnerTestHomeView.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="dir" action="M">/private/flex/sdk/branches/4.y</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/.settings</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.project</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerShadow.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerShadow.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerShadow.fxg</path>

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

--- frameworks/projects/mobiletheme/src/MobileThemeClasses.as
+++ frameworks/projects/mobiletheme/src/MobileThemeClasses.as
@@ -32,11 +32,15 @@
 import spark.skins.mobile.CalloutViewNavigatorSkin; spark.skins.mobile.CalloutViewNavigatorSkin;
 import spark.skins.mobile.CheckBoxSkin; spark.skins.mobile.CheckBoxSkin;
 import spark.skins.mobile.DefaultButtonSkin; spark.skins.mobile.DefaultButtonSkin;
+import spark.skins.mobile.DateSpinnerSkin; spark.skins.mobile.DateSpinnerSkin;
 import spark.skins.mobile.HScrollBarSkin; spark.skins.mobile.HScrollBarSkin;
 import spark.skins.mobile.HSliderSkin; spark.skins.mobile.HSliderSkin;
 import spark.skins.mobile.ImageSkin; spark.skins.mobile.ImageSkin;
 import spark.skins.mobile.ListSkin; spark.skins.mobile.ListSkin;
 import spark.skins.mobile.RadioButtonSkin; spark.skins.mobile.RadioButtonSkin;
+import spark.skins.mobile.SpinnerListContainerSkin; SpinnerListContainerSkin;
+import spark.skins.mobile.SpinnerListScrollerSkin; SpinnerListScrollerSkin;
+import spark.skins.mobile.SpinnerListSkin; SpinnerListSkin;
 import spark.skins.mobile.SkinnableContainerSkin; SkinnableContainerSkin;
 import spark.skins.mobile.StageTextAreaSkin; StageTextAreaSkin;
 import spark.skins.mobile.StageTextInputSkin; StageTextInputSkin;


fix null pointer error

fix null pointer error

Change-Id: I0e44faee096bf245825f75d76dc3b127ed8dfc64

--- WeaveData/src/weave/data/Transforms/PartitionDataTransform.as
+++ WeaveData/src/weave/data/Transforms/PartitionDataTransform.as
@@ -57,7 +57,7 @@
         public function getInputColumnTitle(name:String):String
         {
             var column:IAttributeColumn = inputColumns.getObject(name) as IAttributeColumn;
-            return column.getMetadata(ColumnMetadata.TITLE);
+            return column ? column.getMetadata(ColumnMetadata.TITLE) : '';
         }

         override protected function generateHierarchyNode(metadata:Object):IWeaveTreeNode
@@ -84,12 +84,6 @@
             if (!_rootNode)
                 _rootNode = new PartitionTransformNode(this);
             return _rootNode;
-        }
-
-        override protected function requestHierarchyFromSource(subtreeNode:XML = null):void
-        {
-            // do nothing, as the hierarchy is known ahead of time.
-            return;
         }

         override protected function requestColumnFromSource(proxyColumn:ProxyColumn):void


Try to factor out the ExternalInterface calling

--- src/CameraMan.as
+++ src/CameraMan.as
@@ -87,6 +87,13 @@
             videoface.height = cam.height;
         }

+        public function callback(eventname:String, ... args) : void {
+            eventname = "cameraman._" + eventname;
+            var callargs:Array = [eventname] + args;
+            if (ExternalInterface.available)
+                ExternalInterface.call.apply(callargs);
+        }
+
         public function takePhoto() : void {
             // freeze image
             try {
@@ -101,9 +108,7 @@
                 trace(err.name + " " + err.message);
             }

-            if (ExternalInterface.available) {
-                ExternalInterface.call('cameraman._tookPhoto');
-            }
+            this.callback('tookPhoto');
         }

         public function dropPhoto() : void {
@@ -118,9 +123,7 @@
                 trace(err.name + " " + err.message);
             }

-            if (ExternalInterface.available) {
-                ExternalInterface.call('cameraman._droppedPhoto');
-            }
+            this.callback('droppedPhoto');
         }

         public function sendPhoto() : void {
@@ -161,8 +164,7 @@

         public function sentPhoto(event:Event) : void {
             var url:String = event.target.data;
-            if (ExternalInterface.available)
-                ExternalInterface.call('cameraman._sentPhoto', url);
+            this.callback('sentPhoto', url);
         }

     }


Extract that handy method.

Extract that handy method.

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@413 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/ezgame/client/GameControlBackend.as
+++ src/as/com/threerings/ezgame/client/GameControlBackend.as
@@ -758,12 +758,8 @@
     protected function endGame_v2 (... winnerIds) :void
     {
         validateConnected();
-        var winners :TypedArray = TypedArray.create(int);
-        while (winnerIds.length > 0) {
-            winners.push(int(winnerIds.shift()));
-        }
         _ezObj.ezGameService.endGame(
-            _ctx.getClient(), winners, createLoggingConfirmListener("endGame"));
+            _ctx.getClient(), toTypedIntArray(winnerIds), createLoggingConfirmListener("endGame"));
     }

     protected function getDictionaryLetterSet_v1 (
@@ -901,6 +897,18 @@
         _ezObj.commitTransaction();
     }

+    /**
+     * Converts a Flash array of ints to a TypedArray for delivery over the wire to the server.
+     */
+    protected function toTypedIntArray (array :Array) :TypedArray
+    {
+        var tarray :TypedArray = TypedArray.create(int);
+        while (array.length > 0) {
+            tarray.push(int(array.shift()));
+        }
+        return tarray;
+    }
+
     protected var _ctx :CrowdContext;

     protected var _userListener :MessageAdapter =


gid rid of points label completely

gid rid of points label completely

--- src/battlecode/client/viewer/render/DrawHUD.as
+++ src/battlecode/client/viewer/render/DrawHUD.as
@@ -22,15 +22,12 @@

         private var teamNameBox:HBox;
         private var teamNameLabel:Label;
-        private var pointLabel:Label;
+        private var winMarkerCanvas:Canvas;
         private var archonBoxes:Object; // id -> DrawHUDArchon
         private var unitBoxes:Array;
-        private var winMarkerCanvas:Canvas;

         private var lastRound:uint = 0;
         private var maxArchons:uint = 0;
-
-        private var formatter:NumberFormatter;

         public function DrawHUD(controller:MatchController, team:String) {
             this.controller = controller;
@@ -76,20 +73,6 @@
             winMarkerCanvas.height = teamNameBox.height;
             teamNameBox.addChild(winMarkerCanvas);

-            pointLabel = new Label();
-            pointLabel.width = width;
-            pointLabel.height = 30;
-            pointLabel.x = 0;
-            pointLabel.y = 50;
-            pointLabel.filters = [ new DropShadowFilter(3, 45, 0x333333, 1, 2, 2) ];
-            pointLabel.setStyle("color", team == Team.A ? 0xFF6666 : 0x9999FF);
-            pointLabel.setStyle("fontSize", 24);
-            pointLabel.setStyle("fontWeight", "bold");
-            pointLabel.setStyle("textAlign", "center");
-            pointLabel.setStyle("fontFamily", "Courier New");
-            pointLabel.visible = false; // TODO where to put this?
-            addChild(pointLabel);
-
             archonBoxes = {};

             unitBoxes = new Array();
@@ -99,18 +82,11 @@
                 addChild(unitBox);
             }

-            formatter = new NumberFormatter();
-            formatter.rounding = "down";
-            formatter.precision = 0;
-
             drawArchonBoxes();
             drawUnitCounts();
         }

         private function onRoundChange(e:MatchEvent):void {
-            var points:Number = controller.currentState.getPoints(team);
-            pointLabel.text = formatter.format(points);
-
             lastRound = e.currentRound;

             var archons:Object = controller.currentState.getArchons(team);
@@ -142,8 +118,6 @@
             teamNameLabel.text = team == Team.A
                     ? controller.match.getTeamA()
                     : controller.match.getTeamB();
-
-            pointLabel.text = "0";

             // clear archon boxes
             for (var a:String in archonBoxes) {


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

--- frameworks/projects/framework/src/mx/utils/LinkedListNode.as
+++ frameworks/projects/framework/src/mx/utils/LinkedListNode.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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.utils
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19270
Author:   cframpto@adobe.com
Date:     2010-12-10T18:21:34.150045Z

Log Message:
-----------
Add mouseWheelChanging event to VScrollBar, HScrollBar and Scroller.  The event is dispatched before the mouseWheel event modifies the scroll position.  The event can be canceled to prevent the mouseWheel handler's default behavior or the event's delta can be modified and that value will be used by the mouseWheel handler when calculating the new scroll position.  In RichEditableText, when pasting, add null check before accessing the TextScrap.  There is a bug in one or more version of the player such that this can be null at times.

QE notes: Hans said we will do a PARB review by email for the new event
Doc notes:
Bugs: SDK-27106, SDK-26432
Reviewer: Hans (scroller), Darrell (RET)
Tests run: cyclone
Is noteworthy for integration: yes - new mouseWheelChanging event on VScrollBar, HScrollBar and Scroller

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexMouseEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/MouseEventUtil.as</path>

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

--- frameworks/projects/spark/src/spark/components/VScrollBar.as
+++ frameworks/projects/spark/src/spark/components/VScrollBar.as
@@ -16,14 +16,44 @@

 import mx.core.IInvalidating;
 import mx.core.mx_internal;
+import mx.events.FlexMouseEvent;
 import mx.events.PropertyChangeEvent;
 import mx.events.ResizeEvent;

 import spark.components.supportClasses.ScrollBarBase;
 import spark.core.IViewport;
 import spark.core.NavigationUnit;
+import spark.utils.MouseEventUtil;

 use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the verticalScrollPosition is going
+ *  to change due to a mouseWheel event.
+ *
+ *
The default behavior is to scroll vertically by the event
+ *  delta number of "steps".
+ *  The viewport's getVerticalScrollPositionDelta method using
+ *  either UP or DOWN, depending on the scroll
+ *  direction, determines the height of the step.

+ *
+ *
Calling the preventDefault() method
+ *  on the event prevents the vertical scroll position from changing.
+ *  Otherwise if you modify the delta property of the event,
+ *  that value will be used as the number of vertical "steps".

+ *
+ *  @eventType mx.events.FlexMouseEvent.MOUSE_WHEEL_CHANGING
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+[Event(name="mouseWheelChanging", type="mx.events.FlexMouseEvent")]

 //--------------------------------------
 //  Other metadata
@@ -405,7 +435,7 @@
             maximum = viewport.contentHeight - viewport.height;
         }
     }
-
+
     /**
      *  @private
      *  Scroll vertically by event.delta "steps".  This listener is added to both the scrollbar
@@ -422,12 +452,23 @@
         if (event.isDefaultPrevented() || !vp || !vp.visible || !visible)
             return;

-        var nSteps:uint = Math.abs(event.delta);
+        // Dispatch the "mouseWheelChanging" event. If preventDefault() is called
+        // on this event, the event will be cancelled.  Otherwise if  the delta
+        // is modified the new value will be used.
+        var changingEvent:FlexMouseEvent = MouseEventUtil.createMouseWheelChangingEvent(event);
+        if (!dispatchEvent(changingEvent))
+        {
+            event.preventDefault();
+            return;
+        }
+
+        const delta:int = changingEvent.delta;
+
+        var nSteps:uint = Math.abs(delta);
         var navigationUnit:uint;

-        // Scroll event.delta "steps".
-
-        navigationUnit = (event.delta < 0) ? NavigationUnit.DOWN : NavigationUnit.UP;
+        // Scroll delta "steps".
+        navigationUnit = (delta < 0) ? NavigationUnit.DOWN : NavigationUnit.UP;
         for (var vStep:int = 0; vStep < nSteps; vStep++)
         {
             var vspDelta:Number = vp.getVerticalScrollPositionDelta(navigationUnit);


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

--- frameworks/projects/framework/src/mx/events/FlexMouseEvent.as
+++ frameworks/projects/framework/src/mx/events/FlexMouseEvent.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


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

--- frameworks/projects/framework/src/mx/managers/PopUpManager.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManager.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.managers
 {