Transferred from the Adobe Open Source Subversion Repository

Revision: 18514
Author:   dthakkar@adobe.com
Date:     2010-11-10T00:38:39.528767Z

Log Message:
-----------
QE notes: Some testcases in spark formatters are failing because of behavior change. These testcases are excluded prior to submission. Globalization QE team has been informed about this.
Doc notes: Spark Formatters ASDocs are updated and also added samples for the spark formatters.
Bugs: SDK-28145, SDK-28345 ,SDK-28320 ,SDK-28287,SDK-28314
Reviewer: Gordon , Craig, Masa, Xie
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/MatchingCollatorExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/NumberValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/CurrencyValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/NumberValidatorTests.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/CurrencyValidatorTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample1.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample1.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/bundles/en_US/validators.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/SortingCollator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/SortingCollatorExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/StringToolsExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/IValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/NumberValidatorBase.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationValidatorBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample2.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample2.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/NumberValidator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/CurrencyValidator.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/Validator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/GlobalizationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/IFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/DateTimeFormatterExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/LastOperationStatus.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberFormatterBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/MatchingCollator.as</path>

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

--- frameworks/projects/spark/src/spark/validators/CurrencyValidator.as
+++ frameworks/projects/spark/src/spark/validators/CurrencyValidator.as
@@ -0,0 +1,1109 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.validators
+{
+
+import flash.globalization.CurrencyParseResult;
+import flash.globalization.NationalDigitsType;
+import flash.globalization.NumberFormatter;
+
+import mx.core.mx_internal;
+import mx.formatters.IFormatter;
+import mx.managers.ISystemManager;
+import mx.managers.SystemManager;
+import mx.validators.NumberValidatorDomainType;
+import mx.validators.ValidationResult;
+
+import spark.globalization.LastOperationStatus;
+import spark.validators.supportClasses.NumberValidatorBase;
+import spark.validators.supportClasses.GlobalizationUtils;
+import spark.formatters.CurrencyFormatter;
+
+use namespace mx_internal;
+
+[ResourceBundle("validators")]
+
+/**
+ *  The CurrencyValidator class ensures that a String represents a valid
+ *  currency amount according to the conventions of a locale.
+ *
+ *
It can ensure that a currency string falls within a given range
+ *  (specified by minValue and maxValue properties),
+ *  is an integer (specified by domain property),
+ *  is non-negative (specified by allowNegative property),
+ *  has the grouping of digits correct according to the locale conventions,
+ *  has the correct way of specifying negative numbers and postive numbers,
+ *  has the correct currency ISO code or currency symbol,
+ *  and does not exceed the specified fractionalDigits. The
+ *  validator sets default property values from the operating system supplied
+ *  locale data but they can be customized for specific needs.

+ *
+ *
This class internally uses the
+ *  flash.globalization.CurrencyFormatter for acquiring
+ *  locale-specific validation data and parsing functionality.
+ *  The CurrencyValidator class can be used in MXML declarations or can be
+ *  used in ActionScript code.
+ *  This class uses the locale style for specifying the Locale ID,
+ *  and has methods and properties that are bindable.

+ *

+ *  The flash.globalization.CurrencyFormatter class uses the underlying
+ *  operating system to supply the locale specific data. In case the operating
+ *  system does not provide currency formatting, this class provides fallback
+ *  functionality.
+ *

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

+ *
+ *

+ *  <spark:CurrencyValidator
+ *    allowNegative="true|false"
+ *    currencyISOCode="(locale specified or cutomized by user)."
+ *    currencySymbol="(locale specified or cutomized by user)."
+ *    decimalPointCountError="The decimal separator can only occur once."
+ *    decimalSeparator="(locale specified string or customized by user)."
+ *    domain="real|int"
+ *    exceedsMaxError="The number entered is too large."
+ *    integerError="The number must be an integer."
+ *    invalidCharError="The input contains invalid characters."
+ *    invalidFormatCharsError="One of the formatting parameters is invalid."
+ *    lowerThanMinError="The amount entered is too small."
+ *    maxValue="NaN"
+ *    minValue="NaN"
+ *    negativeError="The amount may not be negative."
+ *    negativeCurrencyFormat="(locale specified or cutomized by user)."
+ *    positiveCurrencyFormat="(locale specified or cutomized by user)."
+ *    negativeCurrencyFormatError="The negative format of the input currency is
+ *    incorrect."
+ *    positiveCurrencyFormatError="The positive format of the input currency is
+ *    incorrect."
+ *    negativeNumberFormatError="The negative format of the input number is
+ *    incorrect."
+ *    negativeSymbol="(locale specified read-only string)."
+ *    negativeSymbolError="The negative symbol is repeated or not in right
+ *    place."
+ *    parseError="The input string could not be parsed."
+ *    fractionalDigits="(locale specified number or customized by user)."
+ *    fractionalDigitsError="The amount entered has too many digits beyond the
+ *    decimal point."
+ *    groupingPattern="(locale specified string or customized by user)."
+ *    groupingSeparator="(locale specified string or customized by user)."
+ *    groupingSeparationError="The number digits grouping is not following the
+ *    grouping pattern."
+ *  />
+ *

+ *
+ *  @see flash.globalization.CurrencyFormatter
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+public class CurrencyValidator extends NumberValidatorBase
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class Constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static const NEGATIVE_FORMATTING_CHARS:String = "-() ";
+    private static const CURRENCY_SPACE_SEP:String = " ";
+    private static const CURRENCY_ISOCODE_LEN:uint = 3;
+    private static const CURRENCY_ISOCODE:String = "currencyISOCode";
+    private static const CURRENCY_SYMBOL:String = "currencySymbol";
+    private static const NEGATIVE_CURRENCY_FORMAT:String =
+                                                    "negativeCurrencyFormat";
+    private static const POSITIVE_CURRENCY_FORMAT:String =
+                                                    "positiveCurrencyFormat";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructs a new CurrencyValidator object to validate numbers
+     *  representing currency amounts according to
+     *  the conventions of a given locale.
+     *

+     *  The locale for this class is supplied by the locale style. The
+     *  locale style can be set in several ways:
+     *

+     *

+     *

+     *  Inheriting the style from a UIComponent by calling the
+     *  UIComponent's addStyleClient method.
+     *

+     *

+     *  By using the class in an mxml declaration and inheriting the
+     *  locale from the document that contains the declaration.
+     *

+     *  <listing version="3.0" >
+     *  <fx:Declarations>
+     *         <s:CurrencyValidator id="cv" />
+     *  </fx:Declarations>
+     *  </listing>
+     *

+     *  By using an mxml declaration and specifying the locale value
+     *  in the list of assignments.
+     *

+     *  <listing version="3.0" >
+     *  <fx:Declarations>
+     *      <s:CurrencyValidator id="cv_turkish" locale="tr-TR" />
+     *  </fx:Declarations>
+     *  </listing>
+     *

+     *  Calling the setStyle method,
+     *  e.g. cv.setStyle("locale", "tr-TR")
+     *

+     *

+     *

+     *  If the locale style is not set by one of the above techniques,
+     *  the methods of this class that depend on the locale
+     *  will throw an error.
+     *
         *
+     *
The properties related to the currency string format are set to
+     *     default values based on the locale.

+     *
+     *
NOTE: When a fallback locale is used, the currency
+     *  properties are set to default values,
+     *  and therefore may not match the currency for which the validation is
+     *  intended. It is a good idea to
+     *  examine the currencySymbol and currencyISOCode property values before
+     *  validating a currency amount.
+     *

+     *
+     *  @see actualLocaleIDName
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function CurrencyValidator()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  actualLocaleIDName
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  @private
+     *  The actual locale id name that is being used.
+     *  @inheritDoc
+     *
+     *  @see flash.globalization.NumberFormatter.actualLocaleIDName
+     *  @see #NumberFormatter()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    override public function get actualLocaleIDName():String
+    {
+        return getActualLocaleIDName(CURRENCY_VALIDATOR_TYPE);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  currencyISOCode
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var currencySymbolOverride:String;
+    private var currencyISOCodeOverride:String;
+
+    [Bindable("change")]
+
+    /**
+     *  The three letter ISO 4217 currency code for the locale
+     *  being used.
+     *
+     *
This code is used to determine the currency symbol or string when
+     *  validating currency amounts using the validate() method.
+     *

+     *
+     *
This property is initialized by the constructor
+     *  based on the actual locale that is used. When a fallback
+     *  locale is used this property reflects the preferred, default
+     *  currency code for the fallback locale.

+     *
+     *  @default dependent on the actual locale and operating system
+     *
+     *  @see #validate()
+     *  @see #currencySymbol
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get currencyISOCode():String
+    {
+        if (g11nWorkingInstance)
+            return g11nWorkingInstance.currencyISOCode;
+
+        if ((localeStyle === undefined) || (localeStyle === null))
+        {
+            fallbackLastOperationStatus
+            = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+            return undefined;
+        }
+
+        return properties.currencyISOCode;
+    }
+
+    public function set currencyISOCode(value:String):void
+    {
+        if (currencyISOCodeOverride && (currencyISOCodeOverride == value))
+            return;
+
+        currencyISOCodeOverride = value;
+
+        if (g11nWorkingInstance)
+        {
+            g11nWorkingInstance.currencyISOCode = value;
+        }
+        else
+        {
+            if (!value)
+                throw new ArgumentError();
+
+            if (properties)
+                properties.currencyISOCode = value;
+            fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
+        }
+
+        update();
+    }
+
+    //----------------------------------
+    //  currencySymbol
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  The currency symbol or string for the locale being used.
+     *
+     *
This property is used as the currency symbol when validating
+     *  currency amounts using the validate() method.

+     *
+     *
This property is initialized by the constructor based on
+     *  the actual locale that is used. When a fallback
+     *  locale is used this property reflects the preferred, default
+     *  currency symbol for the fallback locale.

+     *
+     *  @default dependent on the actual locale and operating system
+     *
+     *  @see #format()
+     *  @see #setCurrency()
+     *  @see #formattingWithCurrencySymbolIsSafe
+     *  @see #currencyISOCode
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get currencySymbol():String
+    {
+        if (g11nWorkingInstance)
+            return g11nWorkingInstance.currencySymbol;
+
+        if ((localeStyle === undefined) || (localeStyle === null))
+        {
+            fallbackLastOperationStatus
+            = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+            return undefined;
+        }
+
+        return properties.currencySymbol;
+    }
+
+    public function set currencySymbol(value:String):void
+    {
+        if (currencySymbolOverride && (currencySymbolOverride == value))
+            return;
+
+        currencySymbolOverride = value;
+
+        if (g11nWorkingInstance)
+        {
+            g11nWorkingInstance.currencySymbol = value;
+        }
+        else
+        {
+            if (!value)
+                throw new ArgumentError();
+
+            if (properties)
+                properties.currencySymbol = value;
+            fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
+        }
+
+        update();
+    }
+
+    //----------------------------------
+    //  negativeCurrencyFormat
+    //----------------------------------
+
+    [Bindable("change")]
+    [Inspectable(category="General",
+                        enumeration="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15")]
+
+    /**
+     *   A numeric value that indicates a validating pattern for negative
+     *  currency amounts. This property defines the location of the
+     *  currency symbol and the negative symbol or parentheses in
+     *  relation to the numeric portion of the currency
+     *  amount. This property is used to validate whether or not the input
+     *  currency string follows this pattern for negative amounts.
+     *
+     *
The value of this property must be one of the constants
+     *  defined in the table below.
+     *

+     *
+     *
 The table below summarizes the possible patterns
+     *  for negative currency amounts.

+     *
+     *

+     *
The '¤' symbol represents the location of the currencyISOCode
+     *       or the currencySymbol in the currency string.
+     *

+     *
The '-' character represents the location of the
+     *       negativeNumberSymbol.

+     *
The 'n' character represents the currency amount.

+     *

+     *
+     *

+     *

+     *            Negative currency format type
+     *            Formatting pattern
+     *

+     *

+     *            0
+     *            (¤n)
+     *

+     *

+     *            1
+     *            -¤n
+     *

+     *

+     *            2
+     *            ¤-n
+     *

+     *

+     *            3
+     *            ¤n-
+     *

+     *

+     *            4
+     *            (n¤)
+     *

+     *

+     *            5
+     *            -n¤
+     *

+     *

+     *            6
+     *            n-¤
+     *

+     *

+     *            7
+     *            n¤-
+     *

+     *

+     *            8
+     *            -n ¤
+     *

+     *

+     *            9
+     *            -¤ n
+     *

+     *

+     *            10
+     *            n ¤-
+     *

+     *

+     *            11
+     *            ¤ n-
+     *

+     *

+     *            12
+     *            ¤ -n
+     *

+     *

+     *            13
+     *            n- ¤
+     *

+     *

+     *            14
+     *            (¤ n)
+     *

+     *

+     *            15
+     *            (n ¤)
+     *

+     *

+     *
+     *  @default dependent on the actual locale and operating system
+     *
+     *  @throws ArgumentError if the assigned value is not between 0 and 15.
+     *
+     *  @see #format()
+     *  @see #currencySymbol
+     *  @see #negativeSymbol
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get negativeCurrencyFormat():uint
+    {
+        return getBasicProperty(properties, NEGATIVE_CURRENCY_FORMAT);
+    }
+
+    public function set negativeCurrencyFormat(value:uint):void
+    {
+        if (!g11nWorkingInstance)
+        {
+            if (15 < value)
+                throw new TypeError();
+        }
+
+        setBasicProperty(properties, NEGATIVE_CURRENCY_FORMAT, value);
+    }
+
+    //----------------------------------
+    //  positiveCurrencyFormat
+    //----------------------------------
+
+    [Bindable("change")]
+    [Inspectable(category="General", enumeration="0,1,2,3")]
+
+    /**
+     *    A numeric value that indicates a validating pattern for positive
+     *  currency amounts. This property defines the location of currency symbol
+     *  relative to the numeric portion of the currency amount. This property
+     *  is used to validate if the input currency string
+     *  follows this pattern for positive amounts.
+     *
+     *
The value of this property must be one of the constants
+     *  defined in the table below.
+     *

+     *
+     *
 The table below summarizes the possible patterns
+     *  for positive currency amounts.
+     *

+     *
+     *

+     *
The '¤' symbol irepresents the location of the currencyISOCode
+     *       or the currencySymbol in the currency string.

+     *
The 'n' character represents the location of the currencyISOCode or
+     *       the currencySymbol in the currency string.

+     *

+     *
+     *

+     *

+     *            Positive currency format type
+     *            Formatting pattern
+     *

+     *

+     *            0
+     *            ¤n
+     *

+     *

+     *            1
+     *            n¤
+     *

+     *

+     *            2
+     *            ¤ n
+     *

+     *

+     *            3
+     *            n ¤
+     *

+     *

+     *
+     *  @throws ArgumentError if the assigned value is not between 0 and 3.
+     *
+     *  @default dependent on the actual locale and operating system
+     *
+     *  @see #currencySymbol
+     *  @see #format()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get positiveCurrencyFormat():uint
+    {
+        return getBasicProperty(properties, POSITIVE_CURRENCY_FORMAT);
+    }
+
+    public function set positiveCurrencyFormat(value:uint):void
+    {
+        if (!g11nWorkingInstance)
+        {
+            if (4 < value)
+                throw new TypeError();
+        }
+
+        setBasicProperty(properties, POSITIVE_CURRENCY_FORMAT, value);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties: Errors
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  currencyStringError
+    //----------------------------------
+
+    private var _currencyStringError:String;
+    private var currencyStringErrorOverride:String;
+
+    [Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+     *  Error message when the currency symbol or currency ISO code is repeated
+     *  or is in the incorrect location.
+     *
+     *  @default "Currency symbol or ISO code is repeated or not correct."
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get currencyStringError():String
+    {
+        return _currencyStringError;
+    }
+
+    public function set currencyStringError(value:String):void
+    {
+        currencyStringErrorOverride = value;
+
+        _currencyStringError = value ? value :
+                 resourceManager.getString("validators", "currencyStringError");
+    }
+
+    //----------------------------------
+    //  negativeCurrencyFormatError
+    //----------------------------------
+
+    private var _negativeCurrencyFormatError:String;
+    private var negativeCurrencyFormatErrorOverride:String;
+
+    [Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+     *  Error message when the negative number format of the input currency
+     *  string is incorrect.
+     *
+     *  @default "The negative format of the input currency is incorrect."
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get negativeCurrencyFormatError():String
+    {
+        return _negativeCurrencyFormatError;
+    }
+
+    public function set negativeCurrencyFormatError(value:String):void
+    {
+        negativeCurrencyFormatErrorOverride = value;
+
+        _negativeCurrencyFormatError = value ? value :
+         resourceManager.getString("validators", "negativeCurrencyFormatError");
+    }
+
+    //----------------------------------
+    //  positiveCurrencyFormatError
+    //----------------------------------
+
+    private var _positiveCurrencyFormatError:String;
+    private var positiveCurrencyFormatErrorOverride:String;
+
+    [Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+     *  Error message when the positive currency number format is incorrect.
+     *
+     *  @default "The positive format of the input currency is incorrect."
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get positiveCurrencyFormatError():String
+    {
+        return _positiveCurrencyFormatError;
+    }
+
+    /**
+     *  @private
+     */
+    public function set positiveCurrencyFormatError(value:String):void
+    {
+        positiveCurrencyFormatErrorOverride = value;
+
+        _positiveCurrencyFormatError = value ? value :
+         resourceManager.getString("validators", "positiveCurrencyFormatError");
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Load the error messages from the resource bundle.
+     */
+    override protected function resourcesChanged():void
+    {
+        super.resourcesChanged();
+        loadChangedResources();
+        negativeCurrencyFormatError = negativeCurrencyFormatErrorOverride;
+        positiveCurrencyFormatError = positiveCurrencyFormatErrorOverride;
+        currencyStringError = currencyStringErrorOverride;
+    }
+
+    /**
+     *  @private
+     *  Override of the base class doValidation() method
+     *  to validate currency amount.
+     *
+     *
You do not call this method directly;
+     *  Flex calls it as part of performing a validation.
+     *  If you create a custom Validator class, you must implement this
+     *  method.

+     *
+     *  @param value Object to validate.
+     *
+     *  @return An Array of ValidationResult objects, with one ValidationResult
+     *  object for each field examined by the validator.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    override protected function doValidation(value:Object):Array
+    {
+        var results:Array = super.doValidation(value);
+
+        // Return if there are errors
+        // or if the required property is set to false and
+        // length is 0.
+        var val:String = value ? String(value) : "";
+        if (results.length > 0 || ((val.length == 0) && !required))
+            return results;
+        else
+            return validateCurrency(value, null);
+    }
+
+    /**
+     *  Create internal formatter object and initialize all properties.
+     */
+    override mx_internal function createWorkingInstance():void
+    {
+        // release this array as it contains symbols based on previous locale
+        // grouping pattern.
+        groupingPatternSymbols = null;
+        createWorkingInstanceCore(CURRENCY_VALIDATOR_TYPE);
+        if (g11nWorkingInstance)
+        {
+            if (currencySymbolOverride)
+                g11nWorkingInstance.currencySymbol = currencySymbolOverride
+
+            if (currencyISOCodeOverride)
+                g11nWorkingInstance.currencyISOCode = currencyISOCodeOverride;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  Convenience method for calling a validator
+     *  from within a custom validation function.
+     *  Each of the standard Flex validators has a similar convenience method.
+     *  Caller must check the lastOperationStatus after this.
+     *
+     *  @param value A currency number string to validate.
+     *
+     *  @param baseField Text representation of the subfield
+     *  specified in the value parameter.
+     *  For example, if the value parameter specifies value.number,
+     *  the baseField value is "number".
+     *
+     *  @return An Array of ValidationResult objects, with one ValidationResult
+     *  object for each field examined by the validator.
+     *
+     *  @see mx.validators.ValidationResult
+     *
+     *  @see flash.globalization.CurrencyFormatter
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function validateCurrency(value:Object,
+                                     baseField:String):Array
+    {
+        var results:Array = [];
+
+        const inputStr:String = String(value);
+
+        // if the input can be a null/empty, return no error.
+        if (!inputStr)
+            return results;
+
+        // If spark formatter is null, no-go-forward.
+        if (!g11nWorkingInstance)
+        {
+            fallbackLastOperationStatus =
+                LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+            return results;
+        }
+
+        // g11nWorkingInstance for a locale is available.
+        // strip leading and trailing white spaces.
+        const input:String =
+            GlobalizationUtils.trim(inputStr);
+
+        const len:int = input.length;
+
+        // NumberValidatorBase has this method. Unlike flash globalization,
+        // validator gives error if decimal and grouping separator are same.
+        if (!validateCurrencyFormat(input, baseField, results))
+            return results;
+        const cf:spark.formatters.CurrencyFormatter =
+            g11nWorkingInstance as spark.formatters.CurrencyFormatter;
+        const cpdata:CurrencyParseResult = cf.parse(input);
+
+        // parse() only returns PARSE_ERROR if it finds any error in input
+        // string. If there is a PARSE_ERROR, validate the input
+        // string further, detect and report the error.
+        if (cf.lastOperationStatus == LastOperationStatus.PARSE_ERROR)
+        {
+            if (detectAndReportProblem(input, cpdata, results,
+                                       baseField) == false)
+            {
+                return results;
+            }
+            else
+            {
+                results.push(new ValidationResult(
+                    true, baseField, "parseError",
+                    parseError));
+                return results;
+            }
+        }
+        // See if negative number is allowed.
+        if (!validateNumberNegativity(cpdata.value, baseField, results))
+            return results;
+
+        if (!validateCurrencyString(cpdata, baseField, results))
+            return results;
+
+        var valStr:String = cpdata.value.toString();
+
+        if (cpdata.value < 0)
+            valStr = valStr.substring(1);
+
+        // We need the original number string extracted from input with grouping
+        // separators intact. Value may have different digits after decimal
+        // because of rounding by parse() but if there is a decimal, then last
+        // digit before decimal is what we need. Locales like Saudi currency ISO
+        // code have decimal inside them. Hence locate the correct decimal
+        // following the first digit only.
+        const numStart:int = input.indexOf(valStr.charAt(0));
+        const numEnd:int = input.lastIndexOf(valStr.charAt(valStr.length-1));
+        const decimalSeparatorIndex:int =
+            input.indexOf(decimalSeparator, numStart);
+        const end:int = (decimalSeparatorIndex == -1) ? numEnd :
+                                                      decimalSeparatorIndex - 1;
+        // check if fraction digits exceed the limit.
+        if (!validateFractionPart(input,
+                                  decimalSeparatorIndex, baseField, results))
+            return results;
+        if (!validateGrouping(input.substring(numStart, end), end-numStart))
+        {
+            results.push(new ValidationResult(
+                true, baseField, "groupingSeparation",
+                groupingSeparationError));
+            return results;
+        }
+
+        // Make sure the input is within the specified range.
+        // check the range of the number.
+        if (!validateNumberRange(cpdata.value, baseField, results))
+            return results;
+
+        return results;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Private Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     */
+    private function checkMultipleDecimals(input:String,
+                                           results:Array,
+                                           baseField:String):Boolean
+    {
+        const len:int = input.length;
+        // Saudi currency symbol has decimal symbol. So to establish multiple
+        // decimals problem, only number string must be considered.
+        const isoIndex:int = input.indexOf(currencySymbol);
+        var startIndex:int = 0;
+        var endIndex:int = len;
+        var numStr:String = input;
+        if (isoIndex != -1)
+        {
+            var pattern:RegExp = /\d/;
+            var digitIndex:int = input.search(pattern);
+            if (digitIndex > isoIndex) // isocode is before digits.
+                startIndex = digitIndex;
+            else
+                endIndex = isoIndex - 1; // isocode is after digit start
+                                         // or in  middle
+            if ((startIndex >= 0) && (endIndex <= len))
+                numStr = input.substring(startIndex, endIndex);
+        }
+
+        // Make sure there's only one decimal point.
+        if (numStr.indexOf(decimalSeparator) !=
+            numStr.lastIndexOf(decimalSeparator))
+        {
+            results.push(new ValidationResult(
+                         true, baseField, "decimalPointCount",
+                         decimalPointCountError));
+            return false;
+        }
+        else if (!validateDecimalString(numStr, baseField, results))
+        {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * @private
+     */
+    private function detectAndReportProblem(input:String,
+                                            cpdata:CurrencyParseResult,
+                                            results:Array,
+                                            baseField:String):Boolean
+    {
+        const len:int = input.length;
+        const inputHasNegativeSymbol:Boolean =
+            ((input.indexOf(negativeSymbol) != -1) ||
+            ((input.charAt(0) == "(") && (input.charAt(len-1) == ")")));
+        const inputHasCurrencyStr:Boolean =
+            ((input.indexOf(currencySymbol) != -1) ||
+             (input.indexOf(currencyISOCode) != -1));
+        // Check for invalid characters in input.
+        // One of the negative format of number is enclosing in parenthesis.
+        const validChars:String = DECIMAL_DIGITS + NEGATIVE_FORMATTING_CHARS +
+            decimalSeparator + groupingSeparator + currencySymbol +
+            currencyISOCode;
+
+        // check for invalid chracters in the input string
+        if (validateInputCharacters(input, len, validChars))
+        {
+            results.push(new ValidationResult(
+                true, baseField, "invalidChar",
+                invalidCharError));
+            return false;
+        }
+        else if (!checkMultipleDecimals(input, results, baseField))
+        {
+            return false;
+        }
+        // Find the currency symbol if it exists,
+        // then make sure that it's in the right place
+        // and that there is only one.
+        else if (input.indexOf(currencySymbol) !=
+                 input.lastIndexOf(currencySymbol))
+        {
+            results.push(new ValidationResult(
+                true, baseField, "currencyString",
+                currencyStringError));
+            return false;
+        }
+        else if (input.indexOf(currencyISOCode) !=
+                 input.lastIndexOf(currencyISOCode))
+        {
+            results.push(new ValidationResult(
+                true, baseField, "currencyString",
+                currencyStringError));
+            return false;
+        }
+        else if (inputHasNegativeSymbol)
+        {
+            results.push(new ValidationResult(
+                true, baseField, "negativeCurrencyFormat",
+                negativeCurrencyFormatError));
+            return false;
+        }
+        // An input like "0 1 2 3" should be parseError rather than
+        // postiveCurrencyFormatError.
+        else if (!inputHasNegativeSymbol && inputHasCurrencyStr)
+        {
+            results.push(new ValidationResult(
+                true, baseField, "positiveCurrencyFormat",
+                positiveCurrencyFormatError));
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     *  @private
+     *  Validate the properties of validator. Some properties cannnot be same
+     *  as others.
+     */
+    private function validateCurrencyFormat(input:String, baseField:String,
+                                            results:Array):Boolean
+    {
+        if (!validateNumberFormat(input, results, baseField))
+            return false;
+
+        if ((currencyISOCode == currencySymbol) ||
+            (currencyISOCode == decimalSeparator) ||
+            (currencyISOCode == groupingSeparator) ||
+            (currencyISOCode == negativeSymbol))
+        {
+            results.push(new ValidationResult(
+                true, baseField, "invalidFormatCharsError",
+                invalidFormatCharsError));
+            return false;
+        }
+
+        if ((currencySymbol == currencyISOCode) ||
+            (currencySymbol == decimalSeparator) ||
+            (currencySymbol == groupingSeparator) ||
+            (currencySymbol == negativeSymbol))
+        {
+            results.push(new ValidationResult(
+                true, baseField, "invalidFormatCharsError",
+                invalidFormatCharsError));
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     *  @private
+     *  Validate currency string. It must match either currency symbol or
+     *  ISO code. If it is null or empty, it is OK per existing mx:Validator
+     *  behaviour.
+     */
+    private function validateCurrencyString(cpdata:CurrencyParseResult,
+                                            baseField:String,
+                                            results:Array):Boolean
+    {
+        if (!cpdata.currencyString)
+            return true;
+
+        // flash globalization parse() method, appends a 0x200F (RTL mark)
+        // to the end of currencystring for RTL locales. However it appends
+        // this mark even for isocode which has no RTL characters like in
+        // parsing "SAR 12345678.78-". To make sure that everything works,
+        // strip RTL mark and compare.
+
+        var sCurString:String = cpdata.currencyString;
+        if (sCurString.charCodeAt(sCurString.length - 1) == 0x200F)
+            sCurString = sCurString.substring(0,
+                                     cpdata.currencyString.length - 1);
+
+        var sCurSym:String = currencySymbol;
+        if (sCurSym.charCodeAt(sCurSym.length - 1) == 0x200F)
+            sCurSym = sCurSym.substring(0, currencySymbol.length - 1);
+
+        var sCurIso:String = currencyISOCode;
+        if (sCurIso.charCodeAt(sCurIso.length - 1) == 0x200F)
+            sCurIso = sCurIso.substring(0, currencyISOCode.length - 1);
+
+        if ((sCurIso == sCurString) || (sCurSym == sCurString))
+        {
+            return true;
+        }
+        else
+        {
+            results.push(new ValidationResult(
+                true, baseField, "currencyString",
+                this.currencyStringError));
+            return false;
+
+        }
+    }
+   }
+
+}
+


OPEN - issue RITTERSPORTFREUNDE-10: Layer fuer hoechste Zoomstufe (Detailansicht)
http://j.fork.de:8080/browse/RITTERSPORTFREUNDE-10

	- change: continued implementation

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

--- src/reprise/core/TooltipManager.as
+++ src/reprise/core/TooltipManager.as
@@ -266,6 +266,7 @@

 		protected function mousedElement_tooltipDataChanged(e:DisplayEvent):void
 		{
+			log("e: " + (e));
 			updateTooltipForElement(m_lastMousedElement);
 		}
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3911
Author:   smgilson@adobe.com
Date:     2008-10-27T20:33:17.593824Z

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

QE Notes: None
Doc Notes: None
Bugs: -
Reviewer:

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBaseContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListBaseContentHolder.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListBaseContentHolder.as
@@ -42,6 +42,7 @@
 [ExcludeClass]

 /**
+ *  @private
  *  The ListBaseContentHolder class defines a container in a list-based control
  *  of all of the control's item renderers and item editors.
  *  Flex uses it to mask areas of the renderers that extend outside


_vpaidAd

--- src/org/openvv/OVVAsset.as
+++ src/org/openvv/OVVAsset.as
@@ -192,9 +192,13 @@

 		private var _vpaidEventsDispatcher:IEventDispatcher = null;
 		/**
-	     * Reference to the vpaid ad
+	     * Reference to the ad
          */
 	    private var _ad:*;
+        /**
+         * Reference to the vpaid ad
+         */
+        private var _vpaidAd:*;

         private var _isPaused: Boolean = false;
 		/**
@@ -295,8 +299,7 @@
 		_vpaidEventsDispatcher = vpaidEventsDispatcher;

         if ((Object)(vpaidEventsDispatcher).hasOwnProperty('getVPAID') && vpaidEventsDispatcher['getVPAID']  is Function) {
-            _ad = (Object)(_vpaidEventsDispatcher).getVPAID();
-            setStage();
+            _vpaidAd = (Object)(_vpaidEventsDispatcher).getVPAID();
         }
 	}

@@ -338,8 +341,9 @@
             if (results && !!results.error)
                 raiseError(results);

-            if (_ad != null && _ad.hasOwnProperty('adVolume')) {
-                results.volume = _ad['adVolume'];
+            if (_vpaidAd != null && _vpaidAd.hasOwnProperty('adVolume')) {
+
+                results.volume = _vpaidAd['adVolume'];
             }

             var displayState:String = getDisplayState(results);


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

--- frameworks/projects/sparkskins/src/mx/skins/spark/ProgressIndeterminateSkin.as
+++ frameworks/projects/sparkskins/src/mx/skins/spark/ProgressIndeterminateSkin.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-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.skins.spark
 {


updated to PureMVC 2.0.1 and made numerous best practice related changes

--- src/org/puremvc/as3/demos/flex/rails/indexcards/model/IndexCardProxy.as
+++ src/org/puremvc/as3/demos/flex/rails/indexcards/model/IndexCardProxy.as
@@ -14,9 +14,8 @@
 	import org.puremvc.as3.interfaces.IProxy;
 	import org.puremvc.as3.patterns.proxy.Proxy;

-	import org.puremvc.as3.demos.flex.rails.indexcards.ApplicationFacade;
+	import org.puremvc.as3.demos.flex.rails.indexcards.*;
 	import org.puremvc.as3.demos.flex.rails.indexcards.model.utils.*;
-	import org.puremvc.as3.demos.flex.rails.indexcards.vo.*;

 	public class IndexCardProxy extends Proxy implements IProxy, IResponder
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 17117
Author:   chiedozi@adobe.com
Date:     2010-07-29T18:08:08.058839Z

Log Message:
-----------
Added support for defining default view transitions to ViewNavigator.
ViewNavigatorSkin now defines default push and pop transitions
Updated the IViewTransition interface
ViewNavigator.popToRoot was renamed to ViewNavigator.popToFirstView

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/IViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/ViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as
@@ -233,7 +233,7 @@
         /**
          *  Removes all but the root object from the screen stack.
          */
-        public function popToRoot():void
+        public function popToFirstView():void
         {
             if (_source.length > 1)
                 _source.length = 1;


Move to correct package

Move to correct package

--- frameworks/projects/mobiletheme/src/spark/skins/android4/TransparentNavigationButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/android4/TransparentNavigationButtonSkin.as
@@ -17,7 +17,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package spark.skins.mobile
+package spark.skins.android4
 {
 import flash.display.DisplayObject;
 import flash.display.Graphics;


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

--- frameworks/projects/airframework/src/mx/controls/FileSystemEnumerationMode.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemEnumerationMode.as
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.controls
+{
+
+/**
+ *  The FileSystemEnumerationMode class defines the constant values
+ *  for the enumerationMode property
+ *  of the FileSystemList, FileSystemDataGrid,
+ *  and FileSystemTree classes.
+ *
+ *  @see mx.controls.FileSystemList#enumerationMode
+ *  @see mx.controls.FileSystemDataGrid#enumerationMode
+ *  @see mx.controls.FileSystemTree#enumerationMode
+ */
+public final class FileSystemEnumerationMode
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Specifies to show files but not directories.
+     */
+    public static const FILES_ONLY:String = "filesOnly";
+
+    /**
+     *  Specifies to show directories but not files.
+     */
+    public static const DIRECTORIES_ONLY:String = "directoriesOnly";
+
+    /**
+     *  Specifies to show files first, then directories.
+     */
+    public static const FILES_FIRST:String = "filesFirst";
+
+    /**
+     *  Specifies to show directories, then files.
+     */
+    public static const DIRECTORIES_FIRST:String = "directoriesFirst";
+
+    /**
+     *  Specifies to show both files and directories, mixed together.
+     */
+     public static const FILES_AND_DIRECTORIES:String = "filesAndDirectories";
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5119
Author:   smgilson@adobe.com
Date:     2009-03-01T15:19:39.936226Z

Log Message:
-----------
Clean up some ASDoc tags from the addition of the @productversion/@playerversion tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/NCManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/Base64Encoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/StringValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaMarshaller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IInteractiveObjectInterface.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/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ContainerRawChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDL.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/HistoryManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/Schema.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/HexEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDisplayObjectInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDisplayObjectContainerInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SoundEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISpriteInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/src/haloclassic/HaloRectBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/Operation.as</path>

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

--- frameworks/projects/framework/src/mx/core/IDisplayObjectContainerInterface.as
+++ frameworks/projects/framework/src/mx/core/IDisplayObjectContainerInterface.as
@@ -13,10 +13,6 @@
  *  The IDisplayObjectContainerInterface defines the basic set of APIs
  *  for web version of flash.display.DisplayObjectContainer
  *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Flex 3
  */
 import flash.text.TextSnapshot;
 import flash.geom.Point;


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

--- frameworks/projects/mx/src/mx/controls/videoClasses/NCManagerConnectClient.as
+++ frameworks/projects/mx/src/mx/controls/videoClasses/NCManagerConnectClient.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.videoClasses
+{
+
+import flash.net.NetConnection;
+
+[ExcludeClass]
+
+/**
+ *  @private
+ *
Holds client-side functions for remote procedure calls (rpc) from
+ *  the FCS during initial connection.  One of these objects is created and
+ *  passed to the NetConnection.client property.
+ */
+public class NCManagerConnectClient
+{
+	include "../../core/Version.as";
+
+    public var owner:NCManager;
+    public var netConnection:NetConnection;
+    public var connIndex:uint;
+    public var pending:Boolean;
+
+    public function NCManagerConnectClient(nc:NetConnection, owner:NCManager = null, connIndex:uint = 0)
+    {
+		super();
+
+        this.owner = owner;
+        this.netConnection = nc;
+        this.connIndex = connIndex;
+        this.pending = false;
+    }
+
+    public function onBWDone(... rest):void
+    {
+        var p_bw:Number;
+        if (rest.length > 0) p_bw = rest[0];
+
+        owner.onConnected(netConnection, p_bw);
+    }
+
+    public function onBWCheck(... rest):uint
+    {
+        return ++owner.payload;
+    }
+
+    public function onMetaData(... rest):void
+    {
+    }
+
+    public function onPlayStatus(... rest):void
+    {
+    }
+
+    public function close():void
+    {
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 20384
Author:   chiedozi@adobe.com
Date:     2011-02-18T20:01:10.762180Z

Log Message:
-----------
Updated ViewNavigator focus management to use the FocusManager instead of directly manipulating Stage.focus

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -13,6 +13,7 @@
 // the correct ViewNavigator.
 package spark.components
 {
+import flash.display.Stage;
 import flash.events.Event;
 import flash.events.IEventDispatcher;
 import flash.events.MouseEvent;
@@ -714,6 +715,18 @@
                     navigator.activeView.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE,
                                                             view_propertyChangeHandler);
                 }
+
+                // If there is no focus or the item that had focus isn't
+                // on the display list anymore, update the focus to be
+                // the active view or the view navigator
+                var focusedObject:Object = focusManager.getFocus();
+                if (!focusedObject || !focusedObject.stage || focusedObject == this)
+                {
+                    if (activeView)
+                        focusManager.setFocus(activeView);
+                    else
+                        focusManager.setFocus(this);
+                }
             }

             selectedIndexAdjusted = false;


Transferred from the Adobe Open Source Subversion Repository

Revision: 18514
Author:   dthakkar@adobe.com
Date:     2010-11-10T00:38:39.528767Z

Log Message:
-----------
QE notes: Some testcases in spark formatters are failing because of behavior change. These testcases are excluded prior to submission. Globalization QE team has been informed about this.
Doc notes: Spark Formatters ASDocs are updated and also added samples for the spark formatters.
Bugs: SDK-28145, SDK-28345 ,SDK-28320 ,SDK-28287,SDK-28314
Reviewer: Gordon , Craig, Masa, Xie
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/MatchingCollatorExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/NumberValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/CurrencyValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/NumberValidatorTests.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/CurrencyValidatorTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample1.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample1.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/bundles/en_US/validators.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/SortingCollator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/SortingCollatorExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/StringToolsExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/IValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/NumberValidatorBase.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationValidatorBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample2.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample2.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/NumberValidator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/CurrencyValidator.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/Validator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/GlobalizationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/IFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/DateTimeFormatterExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/LastOperationStatus.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberFormatterBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/MatchingCollator.as</path>

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

--- frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
+++ frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
@@ -28,17 +28,17 @@
  * SortingCollator and MatchingCollator classes.
  *
  *
This class is a wrapper class around the
- * flash.globalization.Collator.
+ * flash.globalization.Collator class.
  * Therefore the locale-specific string comparison is provided by the
- * flash.globalization.Collator.
- * However this class allows the SortingCollator and
- * MatchingCollator classes to be used in MXML declartions.
- * It uses the locale style for the requested Locale ID name,
- * and has methods and properties that are bindable.
+ * flash.globalization.Collator class.
+ * However by using this class as a base class, the SortingCollator
+ * and MatchingCollator classes can be used in MXML declartions.
+ * In these classes, the locale style is used for the
+ * requested Locale ID name and has methods and properties that are bindable.
  *

  *
  *
The flash.globalization.Collator class uses the underlying operating
- * system for the formatting functionality and to supply the locale
+ * system for the formatting functionality and to supply locale
  * specific data.
  * On some operating systems, the flash.globalization classes are
  * unsupported. On these systems the wrapper class provides fallback
@@ -75,26 +75,25 @@
      *  Constructs a new CollatorBase object to provide string comparisons
      *  according to the conventions of a specified locale.
      *
-     *
The initialMode parameter sets various collation
-     *  options for general uses.
-     *  It can be set to one of the following values:

+     *
The initialMode parameter sets the initial collation
+     *  options for two use cases: sorting and matching.
+     *  It can be set to one of the two following values:

      *
      *

-     *
CollatorMode.SORTING: sets collation options for
-     *       general linguistic sorting usages such as sorting a list of
+     *
CollatorMode.SORTING: sets the collation options for
+     *       general linguistic sorting uses such as sorting a list of
      *       text strings that are displayed to an end user.
      *       In this mode, differences in uppercase and lowercase letters,
      *       accented characters, and other differences specific to the
      *       locale are considered when doing string comparisons.

      *
CollatorMode.MATCHING: sets collation options for
-     *       general usages such as determining if two strings are
-     *       equivalent.
+     *       uses such as determining if two strings are equivalent.
      *       In this mode, differences in uppercase and lower case letters,
      *       accented characters, and so on are ignored when doing string
      *       comparisons.

      *

      *
-     *
For more details and examples when using these two modes, please
+     *
For more details and examples of using these two modes, please
      *  see the documentation for the
      *  flash.globalization.Collator class.

      *
@@ -103,13 +102,14 @@
      *
      *

      *
Inheriting the style from a UIComponent by calling
-     *          the UIComponent's addStyleClient method.

+     *          the UIComponent's addStyleClient method with
+	 * 			an instance of this object as the parameter.

      *
By using the class in an MXML declaration and inheriting the
-     *          locale from the document that contains the
+     *          locale style from the document that contains the
      *          declaration.
      *  <listing version="3.0">
      *  <fx:Declarations>
-     *         <s:StringTools id="st" />
+     *         <s:SortingCollator id="collator" />
      *  </fx:Declarations>
      *  </listing>
      *

@@ -117,20 +117,22 @@
      *          locale value in the list of assignments.
      *  <listing version="3.0">
      *  <fx:Declarations>
-     *      <s:StringTools id="st_turkish" locale="tr-TR" />
+     *      <s:SortingCollator id="collator_german" locale="de-DE" />
      *  </fx:Declarations>
      *  </listing>
      *

      *
Calling the setStyle method, e.g.
-     *              st.setStyle("locale", "tr-TR")

+     *              collator.setStyle("locale", "de-DE")

      *

      *
      *
If the locale style is not set by one of the above
      *  techniques, the
-     *  methods of this class that depend on the locale will throw
-     *  an error.

+     *  methods of this class that depend on the locale set the
+	 *  lastOperationStatus property to
+	 *  spark.globalization.LastOperationStatus.LOCALE_UNDEFINED_ERROR.

      *
      *  @see flash.globalization.Collator
+	 *  @see spark.globalization.LastOperationStatus
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
@@ -156,8 +158,8 @@
      *  @private
      *  Basic properies of the actual underlying working instance.
      *
-     *  It can be flash.globalization.Collator OR
-     *  the fallback's propery set.
+     *  This object can be a flash.globalization.Collator instance OR
+     *  an object that contains the fallback's propery set.
      */
     mx_internal var properties:Object = null;

@@ -182,9 +184,9 @@
      *  @see flash.globalization.Collator.actualLocaleIDName
      *  @see #CollatorBase()
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     override public function get actualLocaleIDName():String
@@ -266,10 +268,10 @@
      *  @see #compare()
      *  @see #equals()
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flex 4.5
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get ignoreCase():Boolean
     {
@@ -313,10 +315,10 @@
      *  @see #compare()
      *  @see #equals()
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flex 4.5
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get ignoreCharacterWidth():Boolean
     {
@@ -358,10 +360,10 @@
      *  @see #compare()
      *  @see #equals()
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flex 4.5
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get ignoreDiacritics():Boolean
     {
@@ -402,10 +404,10 @@
      *  @see #compare()
      *  @see #equals()
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flex 4.5
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get ignoreKanaType():Boolean
     {
@@ -442,10 +444,10 @@
      *  @see #compare()
      *  @see #equals()
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flex 4.5
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get ignoreSymbols():Boolean
     {
@@ -483,20 +485,15 @@
      *  are sorted into the following order: version1 < version10 <
      *  version2.

      *
-     *
The default value is true when the
-     *  CollatorBase() constructor's initialMode
-     *  parameter is set to Collator.MATCHING.
-     *  false when the CollatorBase()
-     *  constructor's initialMode parameter is set to
-     *  Collator.SORTING.

+     *  @default false
      *
      *  @see #compare()
      *  @see #equals()
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flex 4.5
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get numericComparison():Boolean
     {
@@ -588,10 +585,10 @@
      *  @see #CollatorBase()
      *  @see #equals()
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flex 4.5
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function compare(string1:String, string2:String):int
     {
@@ -628,10 +625,10 @@
      *  @see #CollatorBase()
      *  @see #compare
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flex 4.5
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function equals(string1:String, string2:String):Boolean
     {
@@ -657,9 +654,9 @@
      *  @return A vector of strings containing all of the locale ID names
      *         supported by this class and operating system.
      *
-     *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flash CS5
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public static function getAvailableLocaleIDNames():Vector.<String>


Transferred from the Adobe Open Source Subversion Repository

Revision: 4446
Author:   hmuller@adobe.com
Date:     2009-01-08T19:53:52.711496Z

Log Message:
-----------
Added support for virtualiztaion to HorizontalLayout.

Some refactoring and commenting of Horizontal,Verticallayout.

QE Notes: Existing mustella tests pass, virtualization tests are still TBD
Doc Notes: None
Bugs:
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as
@@ -59,8 +59,10 @@
     private var blockTable:Vector.<Block> = new Vector.<Block>(0, false);

-    public function LinearLayoutVector()
-    {
+    public function LinearLayoutVector(majorAxis:uint = VERTICAL)
+    {
+        super();
+        this.majorAxis = majorAxis;
     }

@@ -188,7 +190,7 @@
     //  majorAxis
     //----------------------------------

-    private var _majorAxis:Number = VERTICAL;
+    private var _majorAxis:uint = VERTICAL;

     /**
      *  Defines how the getBounds() method maps from
@@ -197,7 +199,7 @@
      *  @default VERTICAL
      *  @see #cacheDimensions
      */
-    public function get majorAxis():Number
+    public function get majorAxis():uint
     {
         return _majorAxis;
     }
@@ -205,7 +207,7 @@
     /**
      * @private
      */
-    public function set majorAxis(value:Number):void
+    public function set majorAxis(value:uint):void
     {
         _majorAxis = value;
     }
@@ -358,19 +360,14 @@
      *
      *  If index <(length-1) then the value of this
      *  function is defined as:
-     *  start(index) + get(index) + gap.
-     *
-     *  The gap isn't added for the last item.
+     *  start(index) + get(index).
      *
      *  @param index The item's index.
      *  @see #start
      */
     public function end(index:uint):Number
     {
-        var distance:Number = start(index) + getMajorSize(index);
-        if (index < (_length - 1))
-            distance += gap;
-       return distance;
+       return start(index) + getMajorSize(index);
     }

     /**
@@ -477,7 +474,7 @@
         {
             setMajorSize(index, elt.getLayoutBoundsWidth());
             minorSize = Math.max(minorSize, elt.getLayoutBoundsHeight());
-            var mh:Number =  isNaN(elt.percentHeight) ? elt.getPreferredBoundsWidth() : elt.getMinBoundsHeight();
+            var mh:Number =  isNaN(elt.percentHeight) ? elt.getPreferredBoundsHeight() : elt.getMinBoundsHeight();
             minMinorSize = Math.max(minMinorSize, mh);
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4337
Author:   egeorgie@adobe.com
Date:     2008-12-17T01:41:36.131845Z

Log Message:
-----------
ILayoutElement methods renames

Interface ILayoutElement
{
getLayoutWidth -> getLayoutBoundsWidth
getLayoutHeight -> getLayoutBoundsHeight
getLayoutPositionX -> getLayoutBoundsX
getLayoutPositionY -> getLayoutBoundsY
setLayoutSize -> setLayoutBoundsSize
setLayoutPosition -> setLayoutBoundsPosition
getPreferredWidth -> getPreferredBoundsWidth
getPreferredHeight -> getPreferredBoundsHeight
getMinWidth -> getMinBoundsWidth
getMinHeight -> getMinBoundsHeight
getMaxWidth -> getMaxBoundsWidth
getMaxHeight -> getMaxBoundsHeight

…unrelated stuff…
}

Reviewed by Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout_tester.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/graphics/GraphicTags_checkintests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Ellipse.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/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as
@@ -468,16 +468,16 @@

         if (majorAxis == VERTICAL)
         {
-            setMajorSize(index, elt.getLayoutHeight());
-            minorSize = Math.max(minorSize, elt.getLayoutWidth());
-            var mw:Number =  isNaN(elt.percentWidth) ? elt.getPreferredWidth() : elt.getMinWidth();
+            setMajorSize(index, elt.getLayoutBoundsHeight());
+            minorSize = Math.max(minorSize, elt.getLayoutBoundsWidth());
+            var mw:Number =  isNaN(elt.percentWidth) ? elt.getPreferredBoundsWidth() : elt.getMinBoundsWidth();
             minMinorSize = Math.max(minMinorSize, mw);
         }
         else
         {
-            setMajorSize(index, elt.getLayoutWidth());
-            minorSize = Math.max(minorSize, elt.getLayoutHeight());
-            var mh:Number =  isNaN(elt.percentHeight) ? elt.getPreferredHeight() : elt.getMinHeight();
+            setMajorSize(index, elt.getLayoutBoundsWidth());
+            minorSize = Math.max(minorSize, elt.getLayoutBoundsHeight());
+            var mh:Number =  isNaN(elt.percentHeight) ? elt.getPreferredBoundsWidth() : elt.getMinBoundsHeight();
             minMinorSize = Math.max(minMinorSize, mh);
         }
     }


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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


properly handle inverted scales in "motionTweenRotate", take 2.

--- exporter/src/main/as/flump/xfl/XflLayer.as
+++ exporter/src/main/as/flump/xfl/XflLayer.as
@@ -22,39 +22,45 @@
         }
         if (layer.keyframes.length == 0) lib.addError(location, ParseError.INFO, "No keyframes on layer");

-        // normalize rotations, so that we always rotate the shortest distance between
-        // two angles (we don't want to rotate more than Math.PI)
+        var additionalRotation :Number = 0;
+        var domFrames :XMLList = xml.frames.DOMFrame;
         for (var ii :int = 0; ii < layer.keyframes.length - 1; ++ii) {
             var kf :KeyframeMold = layer.keyframes[ii];
             var nextKf :KeyframeMold = layer.keyframes[ii+1];
-            if (kf.rotation + Math.PI < nextKf.rotation) nextKf.rotation -= Math.PI * 2;
-            else if (kf.rotation - Math.PI > nextKf.rotation) nextKf.rotation += Math.PI * 2;
-        }
+            frameEl = domFrames[ii];

-        // handle "motionTweenRotate", which applies additional rotations to the next
-        // keyframe
-        ii = 1;
-        var additionalRotation :Number = 0;
-        for each (frameEl in xml.frames.DOMFrame) {
-            if (ii >= layer.keyframes.length) break;
+            var motionTweenRotate :String =
+                XmlUtil.getStringAttr(frameEl, "motionTweenRotate", "none");

-            kf = layer.keyframes[ii];
+            // normalize rotations, so that we always rotate the shortest distance between
+            // two angles (we don't want to rotate more than Math.PI)
+            if (kf.rotation + Math.PI < nextKf.rotation) {
+                nextKf.rotation -= Math.PI * 2;
+            } else if (kf.rotation - Math.PI > nextKf.rotation) {
+                nextKf.rotation += Math.PI * 2;
+            }

-            if (XmlUtil.hasAttr(frameEl, "motionTweenRotateTimes") &&
-                XmlUtil.hasAttr(frameEl, "motionTweenRotate")) {
-                var thisRotation :Number =
-                    XmlUtil.getNumberAttr(frameEl, "motionTweenRotateTimes") * Math.PI * 2;
-                if (XmlUtil.getStringAttr(frameEl, "motionTweenRotate") == "clockwise") {
-                    thisRotation *= -1;
+            // If a direction is specified, take it into account
+            if (motionTweenRotate != "none") {
+                var direction :Number = (motionTweenRotate == "clockwise" ? -1 : 1);
+                // negative scales affect rotation direction
+                direction *= sign(nextKf.scaleX) * sign(nextKf.scaleY);
+
+                while (direction < 0 && kf.rotation < nextKf.rotation) {
+                    nextKf.rotation -= Math.PI * 2;
                 }
-                // inverted scales change the direction of rotation
-                thisRotation *= sign(kf.scaleX) * sign(kf.scaleY);
+                while (direction > 0 && kf.rotation > nextKf.rotation) {
+                    nextKf.rotation += Math.PI * 2;
+                }
+
+                // additional rotations specified?
+                var motionTweenRotateTimes :Number =
+                    XmlUtil.getNumberAttr(frameEl, "motionTweenRotateTimes", 0);
+                var thisRotation :Number = motionTweenRotateTimes * Math.PI * 2 * direction;
                 additionalRotation += thisRotation;
             }

-            kf.rotation += additionalRotation;
-
-            ii++;
+            nextKf.rotation += additionalRotation;
         }

         // round our keyframe values


code clean

code clean

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/input/TimeInputFieldPresenter.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/input/TimeInputFieldPresenter.as
@@ -1,13 +1,7 @@
 package org.openforis.collect.presenter.input {
-	import flash.events.Event;
 	import flash.events.FocusEvent;

-	import mx.controls.DateField;
-	import mx.events.CalendarLayoutChangeEvent;
-	import mx.events.DropdownEvent;
-
 	import org.openforis.collect.presenter.InputFieldPresenter;
-	import org.openforis.collect.ui.component.input.DateInputField;
 	import org.openforis.collect.ui.component.input.InputField;
 	import org.openforis.collect.ui.component.input.TimeInputField;
 	import org.openforis.collect.util.StringUtil;