Transferred from the Adobe Open Source Subversion Repository

Revision: 6018
Author:   pfarland@adobe.com
Date:     2009-04-08T15:36:36.925077Z

Log Message:
-----------
API changes from PARB review of Advanced CSS additions.

Changes include:
- Fold IStyleManager3 back into IStyleManager2
- Remove CSSSelectorKind enum as it is not needed.
- Update CSSStyleDeclaration constructor to accept either a CSSSelector or legacy String selector.
- Update CSSConditionKind enum to use Strings
- Revert concept of StyleManager.addCSSStyleDeclaration() so that we continue to use the Flex 3 restriction of one CSSStyleDeclaration per unique selector String.
- Minor renames for lower level APIs such as IAdvancedStyleClient's isPseudoSelectorMatch() -> matchesCSSState(), and isTypeSelectorMatch)() -> matchesCSSType()
- Update ASDoc comment version info for APIs that were really added in Gumbo
- Add compiler warning for unqualified type selectors (e.g. when a type selector probably needs a namespace prefix).
- Add compiler warning for unresolved qualified type selector (e.g. when a type is probably missing from a manifest).

QE: I have an update for the mustella tests of programmatic creation of CSSStyleDeclaration
Doc: Yes, if we can do an ASDoc review of CSS classes in the framework it would be much appreciated.
Checkintests: Pass
mustella StyleManager/AdvancedCSS: Pass
Reviewer: Glenn

Modified Paths:
--------------
<path kind="dir" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/flash</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager3.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleSelector.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelectorKind.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/UnqualifiedTypeSelector.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleCondition.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/UnresolvedQualifiedTypeSelector.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSConditionKind.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/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

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

--- frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as
+++ frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as
@@ -63,7 +63,7 @@
  *  style properties on a CSSStyleDeclaration.

  *
  *
You can also create and install a CSSStyleDeclaration at run time
- *  using the StyleManager.addStyleDeclaration() method:
+ *  using the StyleManager.setStyleDeclaration() method:
  *

  *  var newStyleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration(".bigMargins");
  *  newStyleDeclaration.defaultFactory = function():void
@@ -71,7 +71,7 @@
  *      leftMargin = 50;
  *      rightMargin = 50;
  *  }
- *  StyleManager.addStyleDeclaration(newStyleDeclaration, true);
+ *  StyleManager.setStyleDeclaration(".bigMargins", newStyleDeclaration, true);
  *

  *

  *
@@ -112,40 +112,37 @@
     /**
      *  Constructor.
      *
-     *  @param subject If not null, this CSSStyleDeclaration will be registered
-     *  with StyleManager. If the selector argument is not also specified,
-     *  this String is interpreted to be the legacy syntax of a String based
-     *  selector; if the value starts with a dot it is interpreted as a global
-     *  class selector, otherwise it represents a simple type selector.
-     *  @param selector The selector chain used to match IAdvancedStyleClient
-     *  components to this style declaration.
+     *  @param selector - If the selector is a CSSSelector then advanced
+     *  CSS selectors are supported. If a String is used for the selector then
+     *  only simple CSS selectors are supported. If the String starts with a
+     *  dot it is interpreted as a universal class selector, otherwise it must
+     *  represent a simple type selector. If not null, this CSSStyleDeclaration
+     *  will be registered with StyleManager.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function CSSStyleDeclaration(subject:String=null, selector:CSSSelector=null)
+    public function CSSStyleDeclaration(selector:Object=null)
     {
         super();

-        if (subject)
-        {
-            if (selector)
-            {
-                _subject = subject;
-                _selector = selector;
-                _specificity = _selector.specificity;
+        if (selector)
+        {
+            if (selector is CSSSelector)
+            {
+                this.selector = selector as CSSSelector;
             }
             else
             {
-                // A legacy Flex 3 styled constructor was used...
-                selectorString = subject;
-            }
-
-            // do not reference StyleManager directly because this is a bootstrap class
-            styleManager = Singleton.getInstance("mx.styles::IStyleManager3") as IStyleManager3;
-            styleManager.addStyleDeclaration(this, false);
+                // Otherwise, a legacy Flex 3 String selector was provided
+                selectorString = selector.toString();
+            }
+
+            // Do not reference StyleManager directly because this is a bootstrap class
+            styleManager = Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2;
+            styleManager.setStyleDeclaration(selectorString, this, false);
         }
     }

@@ -157,7 +154,7 @@

     /**
      *  @private
-     *  This Array keeps track of all the style name/value objects
+     *  This Dictionary keeps track of all the style name/value objects
      *  produced from this CSSStyleDeclaration and already inserted into
      *  prototype chains. Whenever this CSSStyleDeclaration's overrides object
      *  is updated by setStyle(), these clone objects must also be updated.
@@ -186,7 +183,7 @@
      *  @private
      *  reference to StyleManager
      */
-    private var styleManager:IStyleManager3;
+    private var styleManager:IStyleManager2;

     //--------------------------------------------------------------------------
     //
@@ -272,19 +269,26 @@
     private var _selector:CSSSelector;

     /**
-     *  A potential chain of rules used to match components to this style
-     *  declaration.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    mx_internal function get selector():CSSSelector
+     *  This property is the base selector of a potential chain of selectors
+     *  and conditions that are used to match CSS style declarations to
+     *  components.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get selector():CSSSelector
     {
         return _selector;
     }

+    public function set selector(value:CSSSelector):void
+    {
+        _selector = value;
+        _selectorString = null;
+    }
+
     //----------------------------------
     //  selectorString
     //----------------------------------
@@ -292,12 +296,16 @@
     private var _selectorString:String;

     /**
-     *  A String representation of the selector.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  Legacy support for setting a Flex 3 styled selector string after
+     *  the construction of a style declaration. Only universal class selectors
+     *  or simple type selectors are supported. Note that this style declaration
+     *  is not automatically registered with the StyleManager when using this
+     *  API.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     mx_internal function get selectorString():String
     {
@@ -307,42 +315,26 @@
         return _selectorString;
     }

-    /**
-     *  Legacy support for setting a Flex 3 styled selector string after
-     *  the construction of a style declaration. Only global class selectors or
-     *  simple type selectors are supported. Note that this style declaration is
-     *  not automatically registered with the StyleManager when using this API.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
     mx_internal function set selectorString(value:String):void
     {
-        // For the legacy API, the first arugment is either a simple
-        // type selector or a global class selector
+        // For the legacy API, the first argument is either a simple
+        // type selector or a universal class selector
         if (value.charAt(0) == ".")
         {
-            var condition:CSSCondition = new CSSCondition(CSSConditionKind.CLASS_CONDITION, value.substr(1));
-            _selector = new CSSSelector(CSSSelectorKind.CONDITIONAL_SELECTOR, "", [condition]);
-            _subject = "global";
+            var condition:CSSCondition = new CSSCondition(CSSConditionKind.CLASS, value.substr(1));
+            _selector = new CSSSelector("", [condition]);
         }
         else
         {
-            _subject = value;
-            _selector = new CSSSelector(CSSSelectorKind.TYPE_SELECTOR, value);
-        }
-
-        _specificity = _selector.specificity;
+            _selector = new CSSSelector(value);
+        }
+
         _selectorString = value;
     }

     //----------------------------------
     //  specificity
     //----------------------------------
-
-    private var _specificity:uint;

     /**
      *  Determines the order of precedence when applying multiple style
@@ -350,20 +342,18 @@
      *  precedence, the last one wins.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function get specificity():uint
-    {
-        return _specificity;
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get specificity():int
+    {
+        return _selector ? _selector.specificity : 0;
     }

     //----------------------------------
     //  subject
     //----------------------------------
-
-    private var _subject:String;

     /**
      *  The subject describes the name of a component that may be a potential
@@ -371,13 +361,23 @@
      *  most simple type selector in a potential chain of selectors.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get subject():String
     {
-        return _subject;
+        if (_selector != null)
+        {
+            // Check for an implicit universal selector which omits *
+            // for the subject but includes conditions.
+            if (_selector.subject == "" && _selector.conditions)
+                return "*";
+            else
+                return _selector.subject;
+        }
+
+        return null;
     }

     //--------------------------------------------------------------------------
@@ -385,33 +385,41 @@
     //  Methods
     //
     //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Determines whether the selector chain for this style declaration makes
+     *  use of a pseudo condition.
+     */
+    mx_internal function getPseudoCondition():String
+    {
+        return (selector != null) ? selector.getPseudoCondition() : null;
+    }

     /**
      * @private
      * Determines whether this style declaration has an advanced selector.
      */
-    public function isAdvanced():Boolean
+    mx_internal function isAdvanced():Boolean
     {
         if (selector != null)
         {
-            if (selector.kind == CSSSelectorKind.DESCENDANT_SELECTOR)
+            if (selector.ancestor)
             {
                 return true;
             }
-            else if (selector.kind == CSSSelectorKind.CONDITIONAL_SELECTOR)
+            else if (selector.conditions)
             {
                 if (subject != "*" && subject != "global")
                 {
                     return true;
                 }
-                else if (selector.conditions != null)
+
+                for each (var condition:CSSCondition in selector.conditions)
                 {
-                    for each (var condition:CSSCondition in selector.conditions)
+                    if (condition.kind != CSSConditionKind.CLASS)
                     {
-                        if (condition.kind != CSSConditionKind.CLASS_CONDITION)
-                        {
-                            return true;
-                        }
+                        return true;
                     }
                 }
             }
@@ -424,30 +432,17 @@
      *  Determines whether this style declaration applies to the given component
      *  based on a match of the selector chain.
      *
-     *  @return true if this style declaration applies to the component, or
-     *  false if not.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function isMatch(object:IAdvancedStyleClient):Boolean
-    {
-        return selector.isMatch(object);
-    }
-
-    /**
-     *  @private
-     *  Determines whether the selector chain for this style declaration makes
-     *  use of a pseudo selector.
-     */
-    public function getPseudoSelector():String
-    {
-        if (selector != null)
-            return selector.getPseudoSelector();
-
-        return null;
+     *  @return true if this style declaration applies to the component,
+     *  otherwise false.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function matchesStyleClient(object:IAdvancedStyleClient):Boolean
+    {
+        return (selector != null) ? selector.matchesStyleClient(object) : false;
     }

     /**
@@ -627,7 +622,7 @@
         if (value is String)
         {
             if (!styleManager)
-                styleManager = Singleton.getInstance("mx.styles::IStyleManager3") as IStyleManager3;
+                styleManager = Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2;
             var colorNumber:Number = styleManager.getColorName(value);
             if (colorNumber != NOT_A_COLOR)
                 value = colorNumber;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19942
Author:   rfrishbe@adobe.com
Date:     2011-01-25T22:49:40.674586Z

Log Message:
-----------
Cleaning up some FIXMEs assigned to me in various locations.

Also exposing some private variables as mx_internal: messageText, labelText, and oldUnscaledWidth.

QE notes: -
Doc notes:
Bugs: SDK-29226
Reviewer: Eric
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as
@@ -157,13 +157,6 @@
         measuredHeight = scroller.getPreferredBoundsHeight();
     }

-
-    /**
-     *  FIXME (mcho)
-     *  Need to override ValidateEstimatedSizesOfChild
-     */
-
-
     /**
      *  @private
      */


starting to fix docs for RectangleAlignment. need to do more

--- src/ktu/utils/align/RectangleAlignment.as
+++ src/ktu/utils/align/RectangleAlignment.as
@@ -33,7 +33,7 @@

 	/**
 	 *
-	 * The VizAlignment class represents how you would like to align targets.

+	 * The RectangleAlignment class is a smaller interface for aligning Rectangle only.

 	 *

 	 * Each alignment needs two (2) things:

 	 *  how you wish to align the targets.


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

--- frameworks/projects/charts/src/mx/styles/metadata/BorderStyles.as
+++ frameworks/projects/charts/src/mx/styles/metadata/BorderStyles.as
@@ -1,26 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  Background color of the component when it is disabled.
- *  The global default value is undefined.
- *  The default value for List controls is 0xDDDDDD (light gray).
- *  If a container is disabled, the background is dimmed, and the degree of
- *  dimming is controlled by the disabledOverlayAlpha style.
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Flex 3
- */
+
 [Style(name="backgroundDisabledColor", type="uint", format="Color", inherit="yes", theme="halo")]

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 4840
Author:   egeorgie@adobe.com
Date:     2009-02-04T21:20:07.890221Z

Log Message:
-----------
Fix bug SDK-18904 Redudant APIs on UICompoennt and GraphicElement, SDK-17508 Applying a translation to a Rect causes shape to be scaled

Fix: remove layoutMatrix, layoutMatrix3D properties, add a parameter to the setLayoutMatrix, setLayoutMatrix3D methods to designate whether to trigger a layout pass after the transformation is applied.

QE Notes: None
Doc Notes: None
Bugs: SDK-18434
Reviewer: Jason
tests: checkintests, mustella flash component kit

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.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/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
+++ frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
@@ -588,13 +588,13 @@
         if(_layoutFeatures == null)
         {
             super.x  = value;
-            //invalidateProperties();
         }
         else
         {
             _layoutFeatures.layoutX = value;
             invalidateTransform();
         }
+        //invalidateProperties();
     }

     //----------------------------------
@@ -633,7 +633,6 @@

         if(_layoutFeatures == null)
         {
-            //invalidateProperties();
             super.y  = value;
         }
         else
@@ -641,6 +640,7 @@
             _layoutFeatures.layoutY = value;
             invalidateTransform();
         }
+        //invalidateProperties();
     }

     [Bindable("zChanged")]
@@ -659,9 +659,11 @@
     {
         if (z == value)
             return;
-        if(_layoutFeatures == null) initAdvancedLayoutFeatures();
+        if (_layoutFeatures == null)
+            initAdvancedLayoutFeatures();
         _layoutFeatures.layoutZ = value;
         invalidateTransform();
+        //invalidateProperties();
     }

     [Inspectable]
@@ -712,7 +714,7 @@
         if (value != _baseline)
         {
             _baseline = value;
-            notifySizeChanged();
+            invalidateParentSizeAndDisplayList();
         }
     }

@@ -746,7 +748,7 @@
         if (value != _bottom)
         {
             _bottom = value;
-            notifySizeChanged();
+            invalidateParentSizeAndDisplayList();
         }
     }

@@ -780,7 +782,7 @@
         if (value != _horizontalCenter)
         {
             _horizontalCenter = value;
-            notifySizeChanged();
+            invalidateParentSizeAndDisplayList();
         }
     }

@@ -814,7 +816,7 @@
         if (value != _left)
         {
             _left = value;
-            notifySizeChanged();
+            invalidateParentSizeAndDisplayList();
         }
     }

@@ -848,7 +850,7 @@
         if (value != _right)
         {
             _right = value;
-            notifySizeChanged();
+            invalidateParentSizeAndDisplayList();
         }
     }

@@ -882,7 +884,7 @@
         if (value != _top)
         {
             _top = value;
-            notifySizeChanged();
+            invalidateParentSizeAndDisplayList();
         }
     }

@@ -916,7 +918,7 @@
         if (value != _verticalCenter)
         {
             _verticalCenter = value;
-            notifySizeChanged();
+            invalidateParentSizeAndDisplayList();
         }
     }

@@ -1171,7 +1173,7 @@
     {
         _explicitHeight = value;
         explicitSizeChanged = true;
-        notifySizeChanged();
+        invalidateParentSizeAndDisplayList();
     }

     //----------------------------------
@@ -1194,7 +1196,7 @@
     public function set explicitMaxHeight(value:Number):void
     {
         _explicitMaxHeight = value;
-        notifySizeChanged();
+        invalidateParentSizeAndDisplayList();
     }

     //----------------------------------
@@ -1241,7 +1243,7 @@
     public function set explicitMinHeight(value:Number):void
     {
         _explicitMinHeight = value;
-        notifySizeChanged();
+        invalidateParentSizeAndDisplayList();
     }

     //----------------------------------
@@ -1264,7 +1266,7 @@
     public function set explicitMinWidth(value:Number):void
     {
         _explicitMinWidth = value;
-        notifySizeChanged();
+        invalidateParentSizeAndDisplayList();
     }

     //----------------------------------
@@ -1289,7 +1291,7 @@
     {
         _explicitWidth = value;
         explicitSizeChanged = true;
-        notifySizeChanged();
+        invalidateParentSizeAndDisplayList();
     }

     //----------------------------------
@@ -1552,7 +1554,7 @@
     public function set percentHeight(value:Number):void
     {
         _percentHeight = value;
-        notifySizeChanged();
+        invalidateParentSizeAndDisplayList();
     }

     //----------------------------------
@@ -1574,7 +1576,7 @@
     public function set percentWidth(value:Number):void
     {
         _percentWidth = value;
-        notifySizeChanged();
+        invalidateParentSizeAndDisplayList();
     }

     //----------------------------------
@@ -1829,6 +1831,7 @@

         _layoutFeatures.layoutScaleX = value;
         invalidateTransform();
+        //invalidateProperties();

         // If we're not compatible with Flex3 (measuredWidth is pre-scale always)
         // and scaleX is changing we need to invalidate parent size and display list
@@ -1894,6 +1897,7 @@

         _layoutFeatures.layoutScaleY = value;
         invalidateTransform();
+        //invalidateProperties();

         // If we're not compatible with Flex3 (measuredWidth is pre-scale always)
         // and scaleY is changing we need to invalidate parent size and display list
@@ -1948,6 +1952,7 @@
         if(_layoutFeatures == null) initAdvancedLayoutFeatures();
         _layoutFeatures.layoutScaleZ = value;
         invalidateTransform();
+        //invalidateProperties();
     }

     //--------------------------------------------------------------------------
@@ -2120,6 +2125,7 @@
         if(_layoutFeatures == null) initAdvancedLayoutFeatures();
         _layoutFeatures.transformX = value;
         invalidateTransform();
+        //invalidateProperties();
         invalidateParentSizeAndDisplayList();
     }

@@ -2140,6 +2146,7 @@
         if(_layoutFeatures == null) initAdvancedLayoutFeatures();
         _layoutFeatures.transformY = value;
         invalidateTransform();
+        //invalidateProperties();
         invalidateParentSizeAndDisplayList();
     }

@@ -2160,6 +2167,7 @@
         if(_layoutFeatures == null) initAdvancedLayoutFeatures();
         _layoutFeatures.transformZ = value;
         invalidateTransform();
+        //invalidateProperties();
         invalidateParentSizeAndDisplayList();
     }

@@ -2205,6 +2213,7 @@
         }

         invalidateTransform();
+        //invalidateProperties();
         invalidateParentSizeAndDisplayList();
     }

@@ -2247,6 +2256,7 @@
         if(_layoutFeatures == null) initAdvancedLayoutFeatures();
         _layoutFeatures.layoutRotationX = value;
         invalidateTransform();
+        //invalidateProperties();
         invalidateParentSizeAndDisplayList();
     }

@@ -2274,6 +2284,7 @@
         if(_layoutFeatures == null) initAdvancedLayoutFeatures();
         _layoutFeatures.layoutRotationY = value;
         invalidateTransform();
+        //invalidateProperties();
         invalidateParentSizeAndDisplayList();
     }

@@ -2339,14 +2350,10 @@
         var m:Matrix = _transform.matrix;
         var m3:Matrix3D =  _transform.matrix3D;
         if(m != null)
-            layoutMatrix = m.clone();
+            setLayoutMatrix(m.clone(), true /*triggerLayout*/);
         else if(m3 != null)
-            layoutMatrix3D = m3.clone();
-
-        // invalidateSize();
-        notifySizeChanged();
-    }
-
+            setLayoutMatrix3D(m3.clone(), true /*triggerLayout*/);
+    }

     private function transformPropertyChangeHandler(event:PropertyChangeEvent):void
     {
@@ -2397,12 +2404,9 @@
     }

     /**
-     *  The transform matrix that is used to calculate the component's layout relative to its siblings. This matrix
-     *  is defined by the component's 2D properties such as x, y, rotation,
-     *  scaleX, scaleY, transformX, and transformY.
-     *
This matrix is modified by the values of the offset property to determine its final, computed matrix.

-     */
-    public function get layoutMatrix():Matrix
+     *  @inheritDoc
+     */
+    public function getLayoutMatrix():Matrix
     {
         if(_layoutFeatures != null)
         {
@@ -2420,17 +2424,15 @@
     }

     /**
-     * @private
-     */
-    public function set layoutMatrix(value:Matrix):void
+     *  @inheritDoc
+     */
+    public function setLayoutMatrix(value:Matrix, triggerLayout:Boolean):void
     {
         hasDeltaIdentityTransform = false;
-        if(_layoutFeatures == null)
+        if (_layoutFeatures == null)
         {
             // flash will make a copy of this on assignment.
             super.transform.matrix = value;
-            //invalidateSize();
-            notifySizeChanged();
         }
         else
         {
@@ -2438,35 +2440,32 @@
             // holding onto a reference to it.
             _layoutFeatures.layoutMatrix = value;
             invalidateTransform();
+        }
+
+        //invalidateProperties();
+
+        if (triggerLayout)
             invalidateParentSizeAndDisplayList();
-        }
-    }
-
-    /**
-     *  Similarly to the layoutMatrix property, sets the layout Matrix, but
-     *  doesn't trigger a layout pass.
-     */
-    public function setLayoutMatrix(value:Matrix):void
-    {
-        hasDeltaIdentityTransform = false;
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getLayoutMatrix3D():Matrix3D
+    {
         if (_layoutFeatures == null)
-        {
-            super.transform.matrix = value;
-        }
-        else
-        {
-            // layout features will internally make a copy of this matrix rather than
-            // holding onto a reference to it.
-            _layoutFeatures.layoutMatrix = value;
-            invalidateTransform();
-        }
-    }
-
-    /**
-     *  Similarly to the layoutMatrix3D property, sets the layout Matrix3D, but
-     *  doesn't trigger a layout pass.
-     */
-    public function setLayoutMatrix3D(value:Matrix3D):void
+            initAdvancedLayoutFeatures();
+        // esg: _layoutFeatures keeps a single internal copy of the layoutMatrix.
+        // since this is an internal class, we don't need to worry about developers
+        // accidentally messing with this matrix, _unless_ we hand it out. Instead,
+        // we hand out a clone.
+        return _layoutFeatures.layoutMatrix3D.clone();
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function setLayoutMatrix3D(value:Matrix3D, triggerLayout:Boolean):void
     {
         if (_layoutFeatures == null)
             initAdvancedLayoutFeatures();
@@ -2474,41 +2473,11 @@
         // holding onto a reference to it.
         _layoutFeatures.layoutMatrix3D = value;
         invalidateTransform();
-    }
-
-    /**
-     *  The transform matrix that is used to calculate a component's layout relative to its siblings. This matrix is defined by
-     *  the component's 3D properties (which include the 2D properties such as x, y, rotation,
-     *  scaleX, scaleY, transformX, and transformY, as well as rotationX,
-     *  rotationY, scaleZ, z, and transformZ.
-     *
-     *
Most components do not have any 3D transform properties set on them.

-     *
-     *
This matrix is modified by the values of the offset property to determine its final, computed matrix.

-     */
-    public function set layoutMatrix3D(value:Matrix3D):void
-    {
-        if(_layoutFeatures == null) initAdvancedLayoutFeatures();
-
-        // layout features will internally make a copy of this matrix rather than
-        // holding onto a reference to it.
-        _layoutFeatures.layoutMatrix3D = value;
-        invalidateTransform();
-        invalidateParentSizeAndDisplayList();
-    }
-
-    /**
-     * @private
-     */
-    public function get layoutMatrix3D():Matrix3D
-    {
-        if(_layoutFeatures == null) initAdvancedLayoutFeatures();
-
-        // esg: _layoutFeatures keeps a single internal copy of the layoutMatrix.
-        // since this is an internal class, we don't need to worry about developers
-        // accidentally messing with this matrix, _unless_ we hand it out. Instead,
-        // we hand out a clone.
-        return _layoutFeatures.layoutMatrix3D.clone();
+
+        //invalidateProperties();
+
+        if (triggerLayout)
+            invalidateParentSizeAndDisplayList();
     }

     private function setTransform(value:flash.geom.Transform):void
@@ -2638,7 +2607,6 @@
         {
             _layoutFeatures.updatePending = true;
             applyComputedMatrix();
-            notifySizeChanged();
         }
     }

@@ -2783,22 +2751,6 @@
         LayoutElementUIComponentUtils.setLayoutBoundsSize(this,width,height,postTransform? nonDeltaLayoutMatrix():null);
     }

-    /**
-     *  @inheritDoc
-     */
-    public function getLayoutMatrix():Matrix
-    {
-        return layoutMatrix;
-    }
-
-    /**
-     *  @inheritDoc
-     */
-    public function getLayoutMatrix3D():Matrix3D
-    {
-        return layoutMatrix3D;
-    }
-
     protected function nonDeltaLayoutMatrix():Matrix
     {
         if(hasDeltaIdentityTransform)
@@ -3348,11 +3300,7 @@
      */
     protected function notifySizeChanged():void
     {
-        if (parent && parent is IInvalidating)
-        {
-            IInvalidating(parent).invalidateSize();
-            IInvalidating(parent).invalidateDisplayList();
-        }
+        invalidateParentSizeAndDisplayList();
     }

     /**


FLEX-34774 Some folks programatically remove modal windows

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -1279,7 +1279,19 @@
                 }

                 if (blurOwners[sm] == o.owner)
+                {
                     blurOwners[sm] = null;
+                    // FLEX-34774 Assign new blurOwner if stack of modals
+                    // is programmatically manipulated and owner goes away
+                    // before others
+                    for (var j:int = 0; j < n; j++)
+                    {
+                        var p:PopUpData               = popupInfo[j];
+                        if (p != o && p.systemManager == sm && p.modalWindow != null)
+                            blurOwners[sm] = p.owner;
+                    }
+
+                }
                 popupInfo.splice(i, 1);
                 break;
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5770
Author:   gruehle@adobe.com
Date:     2009-03-30T20:58:54.529722Z

Log Message:
-----------
Add [Alternative] metadata to the Halo components that have a Gumbo replacement.

Bugs: SDK-20190
QA notes: none
Doc notes: Additional ASDoc comments added for many of the classes. These should all be reviewed.
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TileList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Zoom.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToggleButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/HBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Cubic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/RemoveChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/TweenEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeRight.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/VBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Glow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quartic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Box.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeLeft.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quintic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Tile.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quadratic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/AddChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeDown.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/SetPropertyAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Canvas.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Resize.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/Blur.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Move.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/controls/HorizontalList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeUp.as</path>

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

--- frameworks/projects/mx/src/mx/containers/ApplicationControlBar.as
+++ frameworks/projects/mx/src/mx/containers/ApplicationControlBar.as
@@ -74,6 +74,12 @@
 //--------------------------------------

 [IconFile("ApplicationControlBar.png")]
+
+/**
+ *  As of Flex 4, the ApplicationControlBar is no longer recommended. You can achieve
+ *  the same effect by compositing groups and graphics tags in your Application.
+ */
+[Alternative(replacement="none", since="4.0")]

 /**
  *  The ApplicationControlBar container holds components


Transferred from the Adobe Open Source Subversion Repository

Revision: 12164
Author:   smgilson@adobe.com
Date:     2009-11-24T16:39:27.857519Z

Log Message:
-----------
add note about square corners to Rect.as and BorderContainer.as for SDK-23964

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/BorderContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Rect.as</path>

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

--- frameworks/projects/spark/src/spark/components/BorderContainer.as
+++ frameworks/projects/spark/src/spark/components/BorderContainer.as
@@ -160,6 +160,10 @@
  *  the appearance of the BorderContainer, you typically do not create a custom skin for it.
  *  If you do create a custom skin, your skin class should apply any styles to control the
  *  appearance of the container.

+ *
+ *
By default, the stroke of the border is rounded.
+ *  If you do not want rounded corners, set the joints property of
+ *  the stroke to JointStyle.MITER.

  *
  *
The BorderContainer control has the following default characteristics:

  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 9724
Author:   jszeto@adobe.com
Date:     2009-08-27T22:59:23.259654Z

Log Message:
-----------
Border checkin

The Border class provides a container class that can be styled with a border and a background fill or image. It has many of the same styles as HaloBorder and is used in a similar way to the Halo container classes such as Box and Canvas. Examples of styles that are supported are borderWeight, borderColor, backgroundColor, backgroundImage, cornerRadius and dropShadowVisible. The class also supports directly setting a fill or stroke instance.

Border consists of a component class and a skin class called BorderSkin. Border declares the available styles and the backgroundFill and borderStroke properties. It serves as a proxy for the styles and properties in BorderSkin. BorderSkin draws the border and background using these styles and properties. The Border class is not meant to be skinned by a different skin class. All of the style drawing logic is held in the BorderSkin class.

QE notes: None
Doc notes: ASDoc comments need review
Bugs: N/A
Reviewer: Glenn
Tests run: Added Border to checkintests
Is noteworthy for integration: Yes. Border is a new container.

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/views/BorderTests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Border.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/BorderSkin.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/BorderTestScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests-config.xml</path>

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

--- frameworks/projects/spark/src/spark/components/BorderContainer.as
+++ frameworks/projects/spark/src/spark/components/BorderContainer.as
@@ -0,0 +1,258 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.components
+{
+import mx.graphics.IFill;
+import mx.graphics.IStroke;
+
+import spark.components.SkinnableContainer;
+
+/**
+ *  Alpha level of the color defined by the backgroundColor
+ *  property, or the image file defined by the backgroundImage
+ *  style.
+ *  Valid values range from 0.0 to 1.0.
+ *
+ *  @default 1.0
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="backgroundAlpha", type="Number", inherit="no")]
+
+/**
+ *  Background color of the container.
+ *
+ *  The default value is undefined, which means it is not set.
+ *  If both this style and the backgroundImage style
+ *  are undefined, the component has a transparent background.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="backgroundColor", type="uint", format="Color", inherit="no")]
+
+/**
+ *  Background image of a container.  This can be an absolute or relative
+ *  URL or class.  You can either have both a backgroundColor and a
+ *  backgroundImage set at the same time. The background image is displayed
+ *  on top of the background color.
+ *  The default value is undefined, meaning "not set".
+ *  If this style and the backgroundColor style are undefined,
+ *  the component has a transparent background.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="backgroundImage", type="Object", format="File", inherit="no")]
+
+/**
+ *  The resizeMode determines how the background image fills in the dimensions. If you set the value
+ *  of this property in a tag, use the string (such as "repeat"). If you set the value of
+ *  this property in ActionScript, use the constant (such as BitmapResizeMode.NOSCALE).
+ *
+ *  When set to BitmapResizeMode.NOSCALE ("noScale"), the image
+ *  ends at the edge of the region.
+ *
+ *  When set to BitmapResizeMode.REPEAT ("repeat"), the image
+ *  repeats to fill the region.
+ *
+ *  When set to BitmapResizeMode.SCALE ("scale"), the image
+ *  stretches to fill the region.
+ *
+ *  @default BitmapResizeMode.SCALE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="backgroundImageResizeMode", type="String", enumeration="scale, noScale, repeat", inherit="no")]
+
+/**
+ *  Alpha level of the color defined by the borderColor style.
+ *
+ *  Valid values range from 0.0 to 1.0.
+ *
+ *  @default 1.0
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="borderAlpha", type="Number", inherit="no")]
+
+/**
+ *  Color of the border.
+ *  The default value depends on the component class;
+ *  if not overridden for the class, the default value is 0xB7BABC.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="borderColor", type="uint", format="Color", inherit="no")]
+
+/**
+ *  Bounding box style.
+ *  The possible values are "solid" and "inset".
+ *
+ *  @default solid
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="borderStyle", type="String", enumeration="inset,solid", inherit="no")]
+
+/**
+ *  Determines if the border is visible or not. If true, then no border will be visible,
+ *  except a border set via the borderStroke property.
+ *
+ *  @default true
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="borderVisible", type="Boolean", inherit="no")]
+
+/**
+ *  The stroke weight for the border.
+ *
+ *  @default 1
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="borderWeight", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Radius of the curved corners of the border
+ *  if not overriden for the class, the default value is 0.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="cornerRadius", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Boolean property that specifies whether the container has a visible
+ *  drop shadow.
+ *
+ *  @default false
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="dropShadowVisible", type="Boolean", inherit="no")]
+
+/**
+ *  The Border class is a convenience class that provides a set of common styles that control
+ *  the appearance of the border and background of a container.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class Border extends SkinnableContainer
+{
+    /**
+     *  Constructor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+	public function Border()
+	{
+	    super();
+	}
+
+    private var _backgroundFill:IFill;
+
+    /**
+     *  The backgroundFill is used to draw the background of the Border.
+     *  Setting this property will override the backgroundAlpha,
+     *  backgroundColor, backgroundImage and backgroundImageResizeMode styles.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get backgroundFill():IFill
+    {
+        return _backgroundFill;
+    }
+
+    public function set backgroundFill(value:IFill):void
+    {
+        if (value == _backgroundFill)
+           return;
+
+        _backgroundFill = value;
+
+        if (skin)
+            skin.invalidateDisplayList();
+    }
+
+    private var _borderStroke:IStroke;
+
+    /**
+     *  The borderStroke draws the border of the Border. Setting this property will override
+     *  the borderAlpha, borderColor, borderStyle, borderVisible and borderWeight styles.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get borderStroke():IStroke
+    {
+        return _borderStroke;
+    }
+
+    public function set borderStroke(value:IStroke):void
+    {
+        if (value == _borderStroke)
+           return;
+
+        _borderStroke = value;
+
+        if (skin)
+            skin.invalidateDisplayList();
+    }
+}
+}


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

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

 package spark.components
 {


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

--- frameworks/projects/mx/src/mx/controls/NavBar.as
+++ frameworks/projects/mx/src/mx/controls/NavBar.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 13756
Author:   hmuller@adobe.com
Date:     2010-01-25T19:42:14.082913Z

Log Message:
-----------
Mirroring changes, fixes.

- Removed ILayout interface, added mirroring API to IVisualElement.
- Moved layoutDirection="ltr" initialization from TextBase to defaults.css.   Removed similar initialization from DefaultItemRenderer (it wasn't needed).
- The 'get layoutDirection()' method for UIMovieClip, GraphicElement, and SpriteVisualElement now queries the parent if the local value is "inherit".
- Use @inheritDoc instead of explicitly @copying interface methods' ASDoc.   Don't call invalidateLayoutDirection() if FlexVersion.compatibilityVersion is < 4.0.
- Don't call invalidateLayout() for a child unless either its layoutDirection has changed, or its parent's layoutDirection has changed.

QE notes: These changes were cycloned.
Doc notes:
Bugs: sdk-25204, sdk-25209
Reviewer: Evtim
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutDirection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as
+++ frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as
@@ -768,7 +768,7 @@
             return _computedMatrix3D;

-        if (!postLayoutTransformOffsets && stretchX == 1 && stretchY == 1)
+        if (!postLayoutTransformOffsets && !mirror && stretchX == 1 && stretchY == 1)
         {
             return layout.matrix3D;
         }


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

--- frameworks/projects/framework/src/mx/managers/HistoryManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/HistoryManagerImpl.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 3351
Author:   jimurphy@adobe.com
Date:     2008-09-25T15:17:51.460890Z

Log Message:
-----------
Merged 3.0.x revisions 3318,3320,3322,3324,3329,3336,3349 -> trunk
-includes AIK 20080923ap

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/ZipCodeValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/asc/src/java/macromedia/abc/BytecodeBuffer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/IModuleInfo.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/ZipCodeValidatorDomainType.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PostLink.java</path>

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

--- frameworks/projects/framework/src/mx/validators/ZipCodeValidator.as
+++ frameworks/projects/framework/src/mx/validators/ZipCodeValidator.as
@@ -12,8 +12,6 @@
 package mx.validators
 {

-import mx.managers.ISystemManager;
-import mx.managers.SystemManager;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;

@@ -33,9 +31,9 @@
  *

  *  <mx:ZipCodeValidator
  *    allowedFormatChars=" -"
- *    domain="US Only | US or Canada"
+ *    domain="US Only | US or Canada | Canada Only"
  *    invalidCharError="The ZIP code contains invalid characters."
- *    invalidDomainError="The domain parameter is invalid. It must be either 'US Only' or 'US or Canada'."
+ *    invalidDomainError="The domain parameter is invalid. It must be either 'US Only', 'Canada Only', or 'US or Canada'."
  *    wrongCAFormatError="The Canadian postal code must be formatted 'A1B 2C3'."
  *    wrongLengthError="The ZIP code must be 5 digits or 5+4 digits."
  *    wrongUSFormatError="The ZIP+4 code must be formatted '12345-6789'."
@@ -48,120 +46,128 @@
  */
 public class ZipCodeValidator extends Validator
 {
-	include "../core/Version.as";
-
-	//--------------------------------------------------------------------------
-	//
-	//  Class constants
-	//
-	//--------------------------------------------------------------------------
-
-    /**
-	 *  @private
-	 */
-	private static const DOMAIN_US:uint = 1;
-
-    /**
-	 *  @private
-	 */
-	private static const DOMAIN_US_OR_CANADA:uint = 2;
-
-	//--------------------------------------------------------------------------
-	//
-	//  Class methods
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Convenience method for calling a validator.
-	 *  Each of the standard Flex validators has a similar convenience method.
-	 *
-	 *  @param validator The ZipCodeValidator instance.
-	 *
-	 *  @param value A field to validate.
-	 *
-	 *  @param baseField Text representation of the subfield
-	 *  specified in the value parameter.
-	 *  For example, if the value parameter specifies value.zipCode,
-	 *  the baseField value is "zipCode".
-     *
-	 *  @return An Array of ValidationResult objects, with one ValidationResult
-	 *  object for each field examined by the validator.
-	 *
-	 *  @see mx.validators.ValidationResult
-	 *
-	 */
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static const DOMAIN_US:uint = 1;
+
+    /**
+     *  @private
+     */
+    private static const DOMAIN_US_OR_CANADA:uint = 2;
+
+    /**
+     * @private
+     */
+     private static const DOMAIN_CANADA:uint = 3;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Convenience method for calling a validator.
+     *  Each of the standard Flex validators has a similar convenience method.
+     *
+     *  @param validator The ZipCodeValidator instance.
+     *
+     *  @param value A field to validate.
+     *
+     *  @param baseField Text representation of the subfield
+     *  specified in the value parameter.
+     *  For example, if the value parameter specifies value.zipCode,
+     *  the baseField value is "zipCode".
+     *
+     *  @return An Array of ValidationResult objects, with one ValidationResult
+     *  object for each field examined by the validator.
+     *
+     *  @see mx.validators.ValidationResult
+     *
+     */
     public static function validateZipCode(validator:ZipCodeValidator,
-										   value:Object,
-										   baseField:String):Array
-    {
-		var results:Array = [];
-
-		// Resource-backed properties of the validator.
-		var allowedFormatChars:String = validator.allowedFormatChars;
-		var domain:String = validator.domain;
-
-		var resourceManager:IResourceManager = ResourceManager.getInstance();
+                                           value:Object,
+                                           baseField:String):Array
+    {
+        var results:Array = [];
+
+        // Resource-backed properties of the validator.
+        var allowedFormatChars:String = validator.allowedFormatChars;
+        var domain:String = validator.domain;
+
+        var resourceManager:IResourceManager = ResourceManager.getInstance();

         var zip:String = String(value);
         var len:int = zip.length;

-		var domainType:uint = DOMAIN_US;
-        if (domain == ZipCodeValidatorDomainType.US_OR_CANADA)
-		{
-            domainType = DOMAIN_US_OR_CANADA;
-        }
-        else if (domain == ZipCodeValidatorDomainType.US_ONLY)
-		{
-            domainType = DOMAIN_US;
-        }
-        else
-        {
-			results.push(new ValidationResult(
-				true, baseField, "invalidDomain",
-				validator.invalidDomainError));
-            return results;
-        }
-
-		var n:int;
-		var i:int;
-		var c:String;
-
+        var domainType:uint = DOMAIN_US;
+        switch (domain)
+        {
+            case ZipCodeValidatorDomainType.US_OR_CANADA:
+            {
+                domainType = DOMAIN_US_OR_CANADA;
+                break;
+            }
+
+            case ZipCodeValidatorDomainType.US_ONLY:
+            {
+                domainType = DOMAIN_US;
+                break;
+            }
+
+            case ZipCodeValidatorDomainType.CANADA_ONLY:
+            {
+                domainType = DOMAIN_CANADA;
+                break;
+            }
+
+            default:
+            {
+                results.push(new ValidationResult(
+                    true, baseField, "invalidDomain",
+                    validator.invalidDomainError));
+                return results;
+            }
+
+        }
+
+        var n:int;
+        var i:int;
+        var c:String;
+
         // Make sure localAllowedFormatChars contains no numbers or letters.
         n = allowedFormatChars.length;
-		for (i = 0; i < n; i++)
+        for (i = 0; i < n; i++)
         {
             c = allowedFormatChars.charAt(i);
             if (DECIMAL_DIGITS.indexOf(c) != -1 ||
                 ROMAN_LETTERS.indexOf(c) != -1)
             {
-				var message:String = resourceManager.getString(
-					"validators", "invalidFormatCharsZCV");
-				throw new Error(message);
+                var message:String = resourceManager.getString(
+                    "validators", "invalidFormatCharsZCV");
+                throw new Error(message);
             }
         }

         // Now start checking the ZIP code.
         // At present, only US and Canadian ZIP codes are supported.
-		// As a result, the easiest thing to check first
-		// to determine the domain is the length.
-		// A length of 5 or 10 means a US ZIP code
-		// and a length of 6 or 7 means a Canadian ZIP.
+        // As a result, the easiest thing to check first
+        // to determine the domain is the length.
+        // A length of 5 or 10 means a US ZIP code
+        // and a length of 6 or 7 means a Canadian ZIP.
         // If more countries are supported in the future, it may make sense
-		// to check other conditions first depending on the domain specified
-		// and all the possible ZIP code formats for that domain.
-		// For now, this approach makes the most sense.
-
-        // Find out if the ZIP code contains any letters.
-        var containsLetters:Boolean = false;
-        for (i = 0; i < len; i++)
-        {
-            if (ROMAN_LETTERS.indexOf(zip.charAt(i)) != -1)
-            {
-                containsLetters = true;
-                break;
-            }
-        }
+        // to check other conditions first depending on the domain specified
+        // and all the possible ZIP code formats for that domain.
+        // For now, this approach makes the most sense.

         // Make sure there are no invalid characters in the ZIP.
         for (i = 0; i < len; i++)
@@ -172,482 +178,576 @@
                 DECIMAL_DIGITS.indexOf(c) == -1 &&
                 allowedFormatChars.indexOf(c) == -1)
             {
-				results.push(new ValidationResult(
-					true, baseField, "invalidChar",
-					validator.invalidCharError));
+                results.push(new ValidationResult(
+                    true, baseField, "invalidChar",
+                    validator.invalidCharError));
                 return results;
             }
         }
-
-        if (len == 5 || len == 9 || len == 10) // US ZIP code
-        {
-            // Make sure the first 5 characters are all digits.
-            for (i = 0; i < 5; i++)
+
+        // do an initial check on the length
+        if ((len < 5 || len > 10) || (len == 8))
+        {
+            // it's the wrong length for either a US or Canadian zip
+            results.push(new ValidationResult(
+                true, baseField, "wrongLength",
+                validator.wrongLengthError));
+            return results;
+        }
+
+        // if we got this far, we're doing good so far
+        switch (domainType)
+        {
+            case DOMAIN_US:
+            {
+                if (validator.validateUSCode(zip) == false)
+                {
+                    results.push(new ValidationResult(
+                            true, baseField, "wrongUSFormat",
+                            validator.wrongUSFormatError));
+                    return results;
+                }
+                break;
+            }
+
+            case DOMAIN_CANADA:
+            {
+                if (validator.validateCACode(zip) == false)
+                {
+                    results.push(new ValidationResult(
+                        true, baseField, "wrongCAFormat",
+                        validator.wrongCAFormatError));
+                    return results;
+                }
+                break;
+            }
+
+            case DOMAIN_US_OR_CANADA:
+            {
+
+                var usValid:Boolean = true;
+                var caValid:Boolean = true;
+
+                var validationResult:ValidationResult;
+
+                if (validator.validateUSCode(zip) == false)
+                {
+                     validationResult = new ValidationResult(
+                            true, baseField, "wrongUSFormat",
+                            validator.wrongUSFormatError);
+
+                    usValid = false;
+                }
+
+                if (validator.validateCACode(zip) == false)
+                {
+                    validationResult = new ValidationResult(
+                        true, baseField, "wrongCAFormat",
+                        validator.wrongCAFormatError);
+
+                    caValid = false;
+                }
+
+                // if these are both false, then we definitely have the wrong format
+                if (usValid == false && caValid == false)
+                {
+                    results.push(validationResult);
+                    return results;
+                }
+                break;
+            }
+        }
+
+        return results;
+    }
+
+    /**
+     *  @private
+     */
+    private function validateUSCode (zip:String):Boolean
+    {
+        var len:int = zip.length;
+
+        // Find out if the ZIP code contains any letters.
+        var containsLetters:Boolean = false;
+        for (i = 0; i < len; i++)
+        {
+            if (ROMAN_LETTERS.indexOf(zip.charAt(i)) != -1)
+            {
+                containsLetters = true;
+                break;
+            }
+        }
+
+        if (!(len == 5 || len == 9 || len == 10) || containsLetters) // checking the length
+        {
+            return false;
+        }
+
+        // Make sure the first 5 characters are all digits.
+        var i:uint;
+        for (i = 0; i < 5; i++)
+        {
+            if (DECIMAL_DIGITS.indexOf(zip.charAt(i)) == -1)
+            {
+                return false;
+            }
+        }
+
+        if (len == 9 || len == 10)
+        {
+            if (len == 10)
+            {
+                // Make sure the 6th character
+                // is an allowed formatting character.
+                if (allowedFormatChars.indexOf(zip.charAt(5)) == -1)
+                {
+                    return false;
+                }
+                i++;
+            }
+
+            // Make sure the remaining 4 characters are digits.
+            for (; i < len; i++)
             {
                 if (DECIMAL_DIGITS.indexOf(zip.charAt(i)) == -1)
                 {
-					results.push(new ValidationResult(
-						true, baseField, "wrongUSFormat",
-						validator.wrongUSFormatError));
-                    return results;
+                    return false;
                 }
             }
-
-            if (len == 9 || len == 10)
-            {
-                if (len == 10)
+        }
+
+        return true;
+    }
+
+    /**
+     *  @private
+     */
+    private function validateCACode (zip:String):Boolean
+    {
+        var len:int = zip.length;
+
+        // Find out if the ZIP code contains any letters.
+        var containsLetters:Boolean = false;
+        for (i = 0; i < len; i++)
+        {
+            if (ROMAN_LETTERS.indexOf(zip.charAt(i)) != -1)
+            {
+                containsLetters = true;
+                break;
+            }
+        }
+
+        // check the basics
+        if (!(containsLetters && (len == 6 || len == 7)))
+        {
+            return false;
+        }
+
+        var i:uint = 0;
+
+        // Make sure the zip is in the form 'ldlfdld'
+        // where l is a letter, d is a digit,
+        // and f is an allowed formatting character.
+        if (ROMAN_LETTERS.indexOf(zip.charAt(i++)) == -1 ||
+            DECIMAL_DIGITS.indexOf(zip.charAt(i++)) == -1 ||
+            ROMAN_LETTERS.indexOf(zip.charAt(i++)) == -1)
+        {
+            return false;
+        }
+
+        if (len == 7 &&
+            allowedFormatChars.indexOf(zip.charAt(i++)) == -1)
+        {
+            return false;
+        }
+
+        if (DECIMAL_DIGITS.indexOf(zip.charAt(i++)) == -1 ||
+            ROMAN_LETTERS.indexOf(zip.charAt(i++)) == -1 ||
+            DECIMAL_DIGITS.indexOf(zip.charAt(i++)) == -1)
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function ZipCodeValidator()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  allowedFormatChars
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _allowedFormatChars:String;
+
+    /**
+     *  @private
+     */
+    private var allowedFormatCharsOverride:String;
+
+    [Inspectable(category="General", defaultValue="null")]
+
+    /**
+     *  The set of formatting characters allowed in the ZIP code.
+     *  This can not have digits or alphabets [a-z A-Z].
+     *
+     *  @default " -".
+     */
+    public function get allowedFormatChars():String
+    {
+        return _allowedFormatChars;
+    }
+
+    /**
+     *  @private
+     */
+    public function set allowedFormatChars(value:String):void
+    {
+        if (value != null)
+        {
+            for (var i:int = 0; i < value.length; i++)
+            {
+                var c:String = value.charAt(i);
+                if (DECIMAL_DIGITS.indexOf(c) != -1 ||
+                    ROMAN_LETTERS.indexOf(c) != -1)
                 {
-                    // Make sure the 6th character
-					// is an allowed formatting character.
-                    if (allowedFormatChars.indexOf(zip.charAt(5)) == -1)
-                    {
-						results.push(new ValidationResult(
-							true, baseField, "wrongUSFormat",
-							validator.wrongUSFormatError));
-                        return results;
-                    }
-                    i++;
+                    var message:String = resourceManager.getString(
+                        "validators", "invalidFormatCharsZCV");
+                    throw new Error(message);
                 }
-
-                // Make sure the remaining 4 characters are digits.
-                for (; i < len; i++)
-                {
-                    if (DECIMAL_DIGITS.indexOf(zip.charAt(i)) == -1)
-                    {
-						results.push(new ValidationResult(
-							true, baseField, "wrongUSFormat",
-							validator.wrongUSFormatError));
-                        return results;
-                    }
-                }
-            }
-        }
-
-        else if (domainType == DOMAIN_US_OR_CANADA &&
-				 containsLetters &&
-				 (len == 6 || len == 7)) // Canadian zip code
-        {
-            i = 0;
-
-            // Make sure the zip is in the form 'ldlfdld'
-			// where l is a letter, d is a digit,
-			// and f is an allowed formatting character.
-            if (ROMAN_LETTERS.indexOf(zip.charAt(i++)) == -1 ||
-                DECIMAL_DIGITS.indexOf(zip.charAt(i++)) == -1 ||
-                ROMAN_LETTERS.indexOf(zip.charAt(i++)) == -1)
-            {
-				results.push(new ValidationResult(
-					true, baseField, "wrongCAFormat",
-					validator.wrongCAFormatError));
-                return results;
-            }
-
-            if (len == 7 &&
-				allowedFormatChars.indexOf(zip.charAt(i++)) == -1)
-            {
-				results.push(new ValidationResult(
-					true, baseField, "wrongCAFormat",
-					validator.wrongCAFormatError));
-                return results;
-            }
-
-            if (DECIMAL_DIGITS.indexOf(zip.charAt(i++)) == -1 ||
-                ROMAN_LETTERS.indexOf(zip.charAt(i++)) == -1 ||
-                DECIMAL_DIGITS.indexOf(zip.charAt(i++)) == -1)
-            {
-				results.push(new ValidationResult(
-					true, baseField, "wrongCAFormat",
-					validator.wrongCAFormatError));
-                return results;
-            }
-        }
-
-		else
-        {
-			results.push(new ValidationResult(
-				true, baseField, "wrongLength",
-				validator.wrongLengthError));
-            return results;
-        }
-
-        return results;
-    }
-
- 	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Constructor.
-	 */
-	public function ZipCodeValidator()
-	{
-		super();
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Properties
-	//
-	//--------------------------------------------------------------------------
-
-	//----------------------------------
-	//  allowedFormatChars
-	//----------------------------------
-
-	/**
-	 *  @private
-	 */
-	private var _allowedFormatChars:String;
-
-    /**
-	 *  @private
-	 */
-	private var allowedFormatCharsOverride:String;
-
-	[Inspectable(category="General", defaultValue="null")]
-
-	/**
-     *  The set of formatting characters allowed in the ZIP code.
-	 *  This can not have digits or alphabets [a-z A-Z].
-	 *
-	 *  @default " -".
-	 */
-	public function get allowedFormatChars():String
-	{
-		return _allowedFormatChars;
-	}
-
-    /**
-	 *  @private
-	 */
-	public function set allowedFormatChars(value:String):void
-	{
-		if (value != null)
-		{
-			for (var i:int = 0; i < value.length; i++)
-			{
-				var c:String = value.charAt(i);
-				if (DECIMAL_DIGITS.indexOf(c) != -1 ||
-					ROMAN_LETTERS.indexOf(c) != -1)
-				{
-					var message:String = resourceManager.getString(
-						"validators", "invalidFormatCharsZCV");
-					throw new Error(message);
-				}
-			}
-		}
-
-		allowedFormatCharsOverride = value;
-
-		_allowedFormatChars = value != null ?
-							  value :
-							  resourceManager.getString(
-								  "validators",
-								  "zipCodeValidatorAllowedFormatChars");
-	}
-
-	//----------------------------------
-	//  domain
-	//----------------------------------
-
-    /**
-	 *  @private
-	 *  Storage for the domain property.
-	 */
-	private var _domain:String;
-
-    /**
-	 *  @private
-	 */
-	private var domainOverride:String;
+            }
+        }
+
+        allowedFormatCharsOverride = value;
+
+        _allowedFormatChars = value != null ?
+                              value :
+                              resourceManager.getString(
+                                  "validators",
+                                  "zipCodeValidatorAllowedFormatChars");
+    }
+
+    //----------------------------------
+    //  domain
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the domain property.
+     */
+    private var _domain:String;
+
+    /**
+     *  @private
+     */
+    private var domainOverride:String;

     [Inspectable(category="General", defaultValue="null")]

     /**
      *  Type of ZIP code to check.
-     *  In MXML, valid values are "US or Canada"
-     *  and "US Only".
-	 *
-	 *
In ActionScript, you can use the following constants to set this property:
-	 *  ZipCodeValidatorDomainType.US_ONLY and
-	 *  ZipCodeValidatorDomainType.US_OR_CANADA.

-	 *
-	 *  @default ZipCodeValidatorDomainType.US_ONLY
-     */
-	public function get domain():String
-	{
-		return _domain;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set domain(value:String):void
-	{
-		domainOverride = value;
-
-		_domain = value != null ?
-				  value :
-				  resourceManager.getString(
-				      "validators", "zipCodeValidatorDomain");
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Properties: Errors
-	//
-	//--------------------------------------------------------------------------
-
-	//----------------------------------
-	//  invalidCharError
-	//----------------------------------
-
-    /**
-	 *  @private
-	 *  Storage for the invalidCharError property.
-	 */
-	private var _invalidCharError:String;
-
-    /**
-	 *  @private
-	 */
-	private var invalidCharErrorOverride:String;
+     *  In MXML, valid values are "US or Canada",
+     *  "US Only" and "Canada Only".
+     *
+     *
In ActionScript, you can use the following constants to set this property:
+     *  ZipCodeValidatorDomainType.US_ONLY,
+     *  ZipCodeValidatorDomainType.US_OR_CANADA, or
+     *  ZipCodeValidatorDomainType.CANADA_ONLY.

+     *
+     *  @default ZipCodeValidatorDomainType.US_ONLY
+     */
+    public function get domain():String
+    {
+        return _domain;
+    }
+
+    /**
+     *  @private
+     */
+    public function set domain(value:String):void
+    {
+        domainOverride = value;
+
+        _domain = value != null ?
+                  value :
+                  resourceManager.getString(
+                      "validators", "zipCodeValidatorDomain");
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties: Errors
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  invalidCharError
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the invalidCharError property.
+     */
+    private var _invalidCharError:String;
+
+    /**
+     *  @private
+     */
+    private var invalidCharErrorOverride:String;

     [Inspectable(category="Errors", defaultValue="null")]

     /**
      *  Error message when the ZIP code contains invalid characters.
-	 *
-	 *  @default "The ZIP code contains invalid characters."
-     */
-	public function get invalidCharError():String
-	{
-		return _invalidCharError;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set invalidCharError(value:String):void
-	{
-		invalidCharErrorOverride = value;
-
-		_invalidCharError = value != null ?
-							value :
-							resourceManager.getString(
-								"validators", "invalidCharErrorZCV");
-	}
-
-	//----------------------------------
-	//  invalidDomainError
-	//----------------------------------
-
-    /**
-	 *  @private
-	 *  Storage for the invalidDomainError property.
-	 */
-	private var _invalidDomainError:String;
-
-    /**
-	 *  @private
-	 */
-	private var invalidDomainErrorOverride:String;
+     *
+     *  @default "The ZIP code contains invalid characters."
+     */
+    public function get invalidCharError():String
+    {
+        return _invalidCharError;
+    }
+
+    /**
+     *  @private
+     */
+    public function set invalidCharError(value:String):void
+    {
+        invalidCharErrorOverride = value;
+
+        _invalidCharError = value != null ?
+                            value :
+                            resourceManager.getString(
+                                "validators", "invalidCharErrorZCV");
+    }
+
+    //----------------------------------
+    //  invalidDomainError
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the invalidDomainError property.
+     */
+    private var _invalidDomainError:String;
+
+    /**
+     *  @private
+     */
+    private var invalidDomainErrorOverride:String;

     [Inspectable(category="Errors", defaultValue="null")]

     /**
      *  Error message when the domain property contains an invalid value.
-	 *
-	 *  @default "The domain parameter is invalid. It must be either 'US Only' or 'US or Canada'."
-     */
-	public function get invalidDomainError():String
-	{
-		return _invalidDomainError;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set invalidDomainError(value:String):void
-	{
-		invalidDomainErrorOverride = value;
-
-		_invalidDomainError = value != null ?
-							  value :
-							  resourceManager.getString(
-							      "validators", "invalidDomainErrorZCV");
-	}
-
-	//----------------------------------
-	//  wrongCAFormatError
-	//----------------------------------
-
-    /**
-	 *  @private
-	 *  Storage for the wrongCAFormatError property.
-	 */
-	private var _wrongCAFormatError:String;
-
-    /**
-	 *  @private
-	 */
-	private var wrongCAFormatErrorOverride:String;
+     *
+     *  @default "The domain parameter is invalid. It must be either 'US Only' or 'US or Canada'."
+     */
+    public function get invalidDomainError():String
+    {
+        return _invalidDomainError;
+    }
+
+    /**
+     *  @private
+     */
+    public function set invalidDomainError(value:String):void
+    {
+        invalidDomainErrorOverride = value;
+
+        _invalidDomainError = value != null ?
+                              value :
+                              resourceManager.getString(
+                                  "validators", "invalidDomainErrorZCV");
+    }
+
+    //----------------------------------
+    //  wrongCAFormatError
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the wrongCAFormatError property.
+     */
+    private var _wrongCAFormatError:String;
+
+    /**
+     *  @private
+     */
+    private var wrongCAFormatErrorOverride:String;

     [Inspectable(category="Errors", defaultValue="null")]

     /**
      *  Error message for an invalid Canadian postal code.
-	 *
-	 *  @default "The Canadian postal code must be formatted 'A1B 2C3'."
-     */
-	public function get wrongCAFormatError():String
-	{
-		return _wrongCAFormatError;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set wrongCAFormatError(value:String):void
-	{
-		wrongCAFormatErrorOverride = value;
-
-		_wrongCAFormatError = value != null ?
-							  value :
-							  resourceManager.getString(
-							      "validators", "wrongCAFormatError");
-	}
-
-	//----------------------------------
-	//  wrongLengthError
-	//----------------------------------
-
-    /**
-	 *  @private
-	 *  Storage for the wrongLengthError property.
-	 */
-	private var _wrongLengthError:String;
-
-    /**
-	 *  @private
-	 */
-	private var wrongLengthErrorOverride:String;
+     *
+     *  @default "The Canadian postal code must be formatted 'A1B 2C3'."
+     */
+    public function get wrongCAFormatError():String
+    {
+        return _wrongCAFormatError;
+    }
+
+    /**
+     *  @private
+     */
+    public function set wrongCAFormatError(value:String):void
+    {
+        wrongCAFormatErrorOverride = value;
+
+        _wrongCAFormatError = value != null ?
+                              value :
+                              resourceManager.getString(
+                                  "validators", "wrongCAFormatError");
+    }
+
+    //----------------------------------
+    //  wrongLengthError
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the wrongLengthError property.
+     */
+    private var _wrongLengthError:String;
+
+    /**
+     *  @private
+     */
+    private var wrongLengthErrorOverride:String;

     [Inspectable(category="Errors", defaultValue="null")]

     /**
      *  Error message for an invalid US ZIP code.
-	 *
-	 *  @default "The ZIP code must be 5 digits or 5+4 digits."
-     */
-	public function get wrongLengthError():String
-	{
-		return _wrongLengthError;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set wrongLengthError(value:String):void
-	{
-		wrongLengthErrorOverride = value;
-
-		_wrongLengthError = value != null ?
-							value :
-							resourceManager.getString(
-								"validators", "wrongLengthErrorZCV");
-	}
-
- 	//----------------------------------
-	//  wrongUSFormatError
-	//----------------------------------
-
-    /**
-	 *  @private
-	 *  Storage for the wrongUSFormatError property.
-	 */
-	private var _wrongUSFormatError:String;
-
-    /**
-	 *  @private
-	 */
-	private var wrongUSFormatErrorOverride:String;
+     *
+     *  @default "The ZIP code must be 5 digits or 5+4 digits."
+     */
+    public function get wrongLengthError():String
+    {
+        return _wrongLengthError;
+    }
+
+    /**
+     *  @private
+     */
+    public function set wrongLengthError(value:String):void
+    {
+        wrongLengthErrorOverride = value;
+
+        _wrongLengthError = value != null ?
+                            value :
+                            resourceManager.getString(
+                                "validators", "wrongLengthErrorZCV");
+    }
+
+    //----------------------------------
+    //  wrongUSFormatError
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the wrongUSFormatError property.
+     */
+    private var _wrongUSFormatError:String;
+
+    /**
+     *  @private
+     */
+    private var wrongUSFormatErrorOverride:String;

     [Inspectable(category="Errors", defaultValue="null")]

-	/**
+    /**
      *  Error message for an incorrectly formatted ZIP code.
-	 *
-	 *  @default "The ZIP+4 code must be formatted '12345-6789'."
-     */
-	public function get wrongUSFormatError():String
-	{
-		return _wrongUSFormatError;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set wrongUSFormatError(value:String):void
-	{
-		wrongUSFormatErrorOverride = value;
-
-		_wrongUSFormatError = value != null ?
-							  value :
-							  resourceManager.getString(
-							    "validators", "wrongUSFormatError");
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Overridden methods
-	//
-	//--------------------------------------------------------------------------
+     *
+     *  @default "The ZIP+4 code must be formatted '12345-6789'."
+     */
+    public function get wrongUSFormatError():String
+    {
+        return _wrongUSFormatError;
+    }
+
+    /**
+     *  @private
+     */
+    public function set wrongUSFormatError(value:String):void
+    {
+        wrongUSFormatErrorOverride = value;
+
+        _wrongUSFormatError = value != null ?
+                              value :
+                              resourceManager.getString(
+                                "validators", "wrongUSFormatError");
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------

     /**
-	 *  @private
-     */
-	override protected function resourcesChanged():void
-	{
-		super.resourcesChanged();
-
-		allowedFormatChars = allowedFormatCharsOverride;
-		domain = domainOverride;
-
-		invalidDomainError = invalidDomainErrorOverride;
-		invalidCharError = invalidCharErrorOverride;
-		wrongCAFormatError = wrongCAFormatErrorOverride;
-		wrongLengthError = wrongLengthErrorOverride;
-		wrongUSFormatError = wrongUSFormatErrorOverride;
-	}
+     *  @private
+     */
+    override protected function resourcesChanged():void
+    {
+        super.resourcesChanged();
+
+        allowedFormatChars = allowedFormatCharsOverride;
+        domain = domainOverride;
+
+        invalidDomainError = invalidDomainErrorOverride;
+        invalidCharError = invalidCharErrorOverride;
+        wrongCAFormatError = wrongCAFormatErrorOverride;
+        wrongLengthError = wrongLengthErrorOverride;
+        wrongUSFormatError = wrongUSFormatErrorOverride;
+    }

     /**
      *  Override of the base class doValidation() method
      *  to validate a ZIP code.
      *
-	 *
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.

-	 *
+     *
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.
+     *  @return An Array of ValidationResult objects, with one ValidationResult
+     *  object for each field examined by the validator.
      */
     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 ZipCodeValidator.validateZipCode(this, value, null);
+        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 ZipCodeValidator.validateZipCode(this, value, null);
     }
 }


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

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

 package spark.accessibility
 {