Transferred from the Adobe Open Source Subversion Repository

Revision: 6725
Author:   jimurphy@adobe.com
Date:     2009-05-07T20:18:13.398180Z

Log Message:
-----------
Merged beta1 revisions 6693,6702,6706-6707,6716,6720-6721 -> trunk

Modified Paths:
--------------
<path kind="file" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/swf/AbstractFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/FXGParser.java</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/fxg/FXGTranscoder.java" copyfrom-rev="6707" action="A">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/FXGTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/build.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/fills/LinearGradientFillNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/DelegateNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexTextGraphicNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/util/FileResolver.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexSpanNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/strokes/RadialGradientStrokeNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/LibraryNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/filters/GradientGlowFilterNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/AbstractFXGNode.java</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/fxg/dom/FXGNode.java" copyfrom-rev="6707" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/dom/FXGNode.java</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/fxg/swf/FXG2SWFTranscoder.java" copyfrom-rev="6707" action="A">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/swf/FXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/FXGTranscoder.java</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/FXGDOMTraverser.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/fxg/util/FXGResourceResolverFactory.java" copyfrom-rev="6707" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/util/FXGResourceResolverFactory.java</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/FXGLogger.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/AbstractShapeNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/FilterNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/DefinitionNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/filters/GradientBevelFilterNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/fills/RadialGradientFillNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/fills/BitmapFillNode.java</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/fxg/util" copyfrom-rev="6707" action="A">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/util</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexResourceResolver.java</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/ResourceResolverFactory.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/MaskPropertyNode.java</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/ResourceResolver.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/text/AbstractCharacterTextNode.java</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/FXGLoggerFactory.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/TransformNode.java</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/TextGraphicNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/sax/FXGSAXParser.java</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/FXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/FillNode.java</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/fxg/util/FXGLoggerFactory.java" copyfrom-rev="6707" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/util/FXGLoggerFactory.java</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/FXGNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/MaskingNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/text/ParagraphNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/GroupNode.java</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/fxg/dom" copyfrom-rev="6707" action="A">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/dom</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/fxg/util/FXGLogger.java" copyfrom-rev="6707" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/util/FXGLogger.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexParagraphNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/GroupDefinitionNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/StrokeNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/GraphicContentNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/strokes/LinearGradientStrokeNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/util/SystemLogger.java</path>
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/GraphicNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/MaskableNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/sax/FXGSAXScanner.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/TextNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FXGCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/text/SpanNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/fxg/util/FXGResourceResolver.java" copyfrom-rev="6707" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/util/FXGResourceResolver.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/util/AbstractLogger.java</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -25,6 +25,16 @@
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
 import spark.utils.LabelUtil;
+
+/*
+ TODO (jszeto)
+ - Add caretIndex public getter
+ - Add setCaretIndex protected setter
+ 	- Should set currentCaretIndex
+ 	- Call itemInCaret
+
+
+*/

 /**
  *  Dispatched when the selection is going to change.
@@ -621,9 +631,12 @@
      */
     override public function updateRenderer(renderer:IVisualElement):void
     {
-        //First clean up any old, stale properties like selected and caret
-        if (renderer is IItemRenderer && IItemRenderer(renderer).selected)
-        {
+        //First clean up any old, stale properties like selected and caret
+        if (renderer is IItemRenderer)
+        {
+            // TODO (dsubrama) - Go through helper methods to do this.
+            // Make itemSelected()/itemInCaret() pass around the renderer
+            // instead of index.
             IItemRenderer(renderer).selected = false;
             IItemRenderer(renderer).caret = false;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11400
Author:   jon.avila@ssbbartgroup.com
Date:     2009-11-03T15:17:58.775353Z

Log Message:
-----------
Updated TextBase.as to include mixin metadata and functions for accessibility (if accessibility

is linked-in)
QE notes: none
Doc notes: none
Bugs: n/a
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -70,6 +70,11 @@
  */
 [Style(name="backgroundColor", type="uint", format="Color", inherit="no")]

+ //--------------------------------------------------------------------------
+ // Other metadata for accessibility API
+ //-------------------------------------------------------------------------
+[AccessibilityClass(implementation="spark.accessibility.TextBaseAccImpl")]
+
 /**
  *  The base class for Spark text controls such as Label and RichText
  *  which display text using CSS styles for the default format.
@@ -83,8 +88,10 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
+
 public class TextBase extends UIComponent
 {
+
     include "../../core/Version.as";

     //--------------------------------------------------------------------------
@@ -102,6 +109,23 @@
      *  and updates it when the locale changes.
      */
     mx_internal static var truncationIndicatorResource:String;
+
+    /**
+     *  @private
+     *  Mixins for accessibility
+     */
+    mx_internal static var createAccessibilityImplementation:Function;
+
+    /**
+     *  @private
+     *  Accessibility initialization function
+     */
+
+    override protected function initializeAccessibility():void
+    {
+      if (TextBase.createAccessibilityImplementation != null)
+        TextBase.createAccessibilityImplementation(this);
+    }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5990
Author:   cframpto@adobe.com
Date:     2009-04-07T17:40:50.821402Z

Log Message:
-----------
If textAlign not leftAligned then the text must be recomposed in update display list if the unscaledWidth is not the same as the width used to compose the text.  If the width isn't specified then the composeWidth is maxWidth which defaults to 10000 if not set.

Similarly if verticalAlign is not topAligned and the unscaledHeight is not the same as the compose height the text must be recomposed.

QE Notes:
Doc Notes:
Bugs: SDK-20481
Reviewers: will be Gordon

Modified Paths:
--------------
<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/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -93,7 +93,7 @@
         }

         // Register as a weak listener for "change" events from ResourceManager.
-        // If UITextFields registered as a strong listener,
+        // If TextGraphicElements registered as a strong listener,
         // they wouldn't get garbage collected.
         resourceManager.addEventListener(
             Event.CHANGE, resourceManager_changeHandler, false, 0, true);
@@ -138,6 +138,18 @@
      */
     mx_internal var invalidateCompose:Boolean = true;

+    /**
+     *  @private
+     *  The value of bounds.width, before the compose was done.
+     */
+    private var _composeWidth:Number;
+
+    /**
+     *  @private
+     *  The value of bounds.height, before the compose was done.
+     */
+    private var _composeHeight:Number;
+
     /**
      *  @private
      *  The offset applied to each textLine.x so that it is positioned
@@ -736,7 +748,8 @@

         // ToDo: optimize for right-to-left text so compose isn't always done
         // when height or width changes.
-        if (mx_internal::invalidateCompose)
+        if (mx_internal::invalidateCompose ||
+            composeRequired(unscaledWidth, unscaledHeight))
         {
             compose = true;
         }
@@ -1032,6 +1045,46 @@
      *  @private
      *  TODO This should be mx_internal, but that causes a compiler error.
      */
+    protected function composeRequired(unscaledWidth:Number,
+                                       unscaledHeight:Number):Boolean
+    {
+        // For textAlign, if the composeWidth isn't the same
+        // as the unscaledWidth, and the text isn't left aligned, we need to
+        // recompose.
+        //
+        if (isNaN(_composeWidth) || _composeWidth != unscaledWidth)
+        {
+            var direction:String = getStyle("direction");
+            var textAlign:String = getStyle("textAlign");
+
+            var leftAligned:Boolean =
+                textAlign == "left" ||
+                textAlign == "start" && direction == "ltr" ||
+                textAlign == "end" && direction == "rtl";
+
+            if (!leftAligned)
+                return true;
+        }
+
+        // For verticalAlign, if the composeHeight isn't the same as the
+        // unscaledHeight, and the text isn't top aligned, we need to
+        // recompose (or adjust the y values of all the text lines).
+        if (isNaN(_composeHeight) || _composeHeight != unscaledHeight)
+        {
+            var verticalAlign:String = getStyle("verticalAlign");
+            var topAligned:Boolean = (verticalAlign == "top");
+
+            if (!topAligned)
+                return true;
+        }
+
+        return false;
+    }
+
+    /**
+     *  @private
+     *  TODO This should be mx_internal, but that causes a compiler error.
+     */
     protected function composeOnHeightChange():Boolean
     {
         if (truncation != 0 && getStyle("lineBreak") == "toFit")
@@ -1059,6 +1112,8 @@
     protected function composeTextLines(width:Number = NaN,
 										height:Number = NaN):void
 	{
+	    _composeWidth = width;
+	    _composeHeight = height;
 	}

 	/**
@@ -1269,6 +1324,9 @@
         mx_internal::truncationIndicatorResource = resourceManager.getString(
             "core", "truncationIndicator");

+        if (truncation != 0)
+            mx_internal::invalidateCompose = true;
+
         invalidateSize();
         invalidateDisplayList();
     }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/spark/src/spark/effects/animation/SimpleMotionPath.as
+++ frameworks/projects/spark/src/spark/effects/animation/SimpleMotionPath.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.effects.animation
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/events/TreeEvent.as
+++ frameworks/projects/mx/src/mx/events/TreeEvent.as
@@ -0,0 +1,267 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.events
+{
+
+import flash.events.Event;
+import mx.controls.listClasses.IListItemRenderer;
+
+/**
+ *  The TreeEvent class represents the event object passed to the event
+ *  listener for events that are associated with activities
+ *  in tree, such as when a tree branch opens or closes.
+ *
+ *  @see mx.controls.Tree
+ */
+public class TreeEvent extends Event
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The TreeEvent.ITEM_CLOSE event type constant indicates that a tree
+     *  branch closed or collapsed.
+     *
+     *
The properties of the event object for this event type have the
+     *  following values.
+     *  Not all properties are meaningful for all kinds of events.
+     *  See the detailed property descriptions for more information.

+     *
+     *

+     *
Property	Value

+     *
itemRenderer
+     *         The ListItemRenderer for the node that closed

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
triggerEvent
+     *         If the node closed in response to a user action,
+     *             identifies it as a keyboard action or a mouse action.

+     *
item	the Tree item (node) that closed

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *
type	TreeEvent.ITEM_CLOSE

+     *

+     *
+     *  @eventType itemClose
+     */
+    public static const ITEM_CLOSE:String = "itemClose";
+
+    /**
+     *  The TreeEvent.ITEM_OPEN event type constant indicates that a tree
+     *  branch opened or expanded.
+     *
+     *
The properties of the event object for this event type have the
+     *  following values.
+     *  Not all properties are meaningful for all kinds of events.
+     *  See the detailed property descriptions for more information.

+     *
+     *

+     *
Property	Value

+     *
itemRenderer
+     *         The ListItemRenderer for the item (node) that opened

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
triggerEvent
+     *         If the item (node) opened in response to a user action,
+     *             identifies it as a keyboard action or a mouse action.

+     *
item	the Tree node that opened.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *
type	TreeEvent.ITEM_OPEN

+     *

+     *
+     *  @eventType itemOpen
+     */
+    public static const ITEM_OPEN:String = "itemOpen";
+
+    /**
+     *  The TreeEvent.ITEM_OPENING event type constant is dispatched immediately
+     *  before a tree opens or closes.
+     *
+     *
The properties of the event object for this event type have the
+     *  following values.
+     *  Not all properties are meaningful for all kinds of events.
+     *  See the detailed property descriptions for more information.

+     *
+     *

+     *
Property	Value

+     *
animate	Whether to animate the opening
+     *             or closing operation.

+     *
bubbles	false

+     *
cancelable	true

+     *
currentTarget	The Object that defines the
+     *              event listener that handles the event. For example, if you use
+     *              myButton.addEventListener() to register an event
+     *              listener, myButton is the value of the currentTarget.

+     *
dispatchEvent	Whether to dispatch an
+     *             ITEM_OPEN or ITEM_CLOSE event
+     *              after the open or close animation is complete. true

+     *
itemRenderer
+     *         The ListItemRenderer for the item (node) that opened

+     *
item	the Tree node that opened.

+     *
opening	true if the item is opening, false
+     *             if it is closing.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *
triggerEvent
+     *         If the item opened in response to a user action,
+     *             identifies it as a keyboard action or a mouse action.

+     *
type	TreeEvent.ITEM_OPENING

+     *

+     *
+     *  @eventType itemOpening
+     */
+    public static const ITEM_OPENING:String = "itemOpening";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  Normally called by the Flex Tree control; not used in application code.
+     *
+     *  @param type The event type; indicates the action that caused the event.
+     *
+     *  @param bubbles Specifies whether the event can bubble
+     *  up the display list hierarchy.
+     *
+     *  @param cancelable Specifies whether the behavior associated with the event
+     *  can be prevented.
+     *
+     *  @param item The Tree node (item) to which this event applies.
+     *
+     *  @param itemRenderer The item renderer object for the cell.
+     *
+     *  @param triggerEvent If the node opened or closed in response to a
+     *  user action, indicates the type of input action.
+     */
+    public function TreeEvent(type:String, bubbles:Boolean = false,
+                              cancelable:Boolean = false,
+                              item:Object = null,
+                              itemRenderer:IListItemRenderer = null,
+                              triggerEvent:Event = null)
+    {
+        super(type, bubbles, cancelable);
+
+        this.item = item;
+        this.itemRenderer = itemRenderer;
+        this.triggerEvent = triggerEvent;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  animate
+    //----------------------------------
+
+    /**
+     *  Whether to animate an opening or closing operation; used for
+     *  ITEM_OPENING type events only.
+     */
+    public var animate:Boolean;
+
+    //----------------------------------
+    //  dispatchEvent
+    //----------------------------------
+
+    /**
+     *  Whether to dispatch an event (ITEM_OPEN or
+     *  ITEM_CLOSE) after the open or close animation
+     *  is complete. Used for ITEM_OPENING type events only.
+     */
+    public var dispatchEvent:Boolean;
+
+    //----------------------------------
+    //  item
+    //----------------------------------
+
+    /**
+     *  Storage for the item property.
+     *  If you populate the Tree from XML data, access
+     *  the properties for the node as
+     *  event.item.&64;attribute_name.
+     */
+    public var item:Object;
+
+    //----------------------------------
+    //  itemRenderer
+    //----------------------------------
+
+    /**
+     *  The ListItemRenderer for the node that closed or opened.
+     */
+    public var itemRenderer:IListItemRenderer;
+
+    //----------------------------------
+    //  opening
+    //----------------------------------
+
+    /**
+     *  Used for an ITEM_OPENING type events only.
+     *  Indicates whether the item
+     *  is opening true, or closing false.
+     */
+    public var opening:Boolean;
+
+    //----------------------------------
+    //  triggerEvent
+    //----------------------------------
+
+    /**
+     *  The low level MouseEvent or KeyboardEvent that triggered this
+     *  event or null if this event was triggered programatically.
+     */
+    public var triggerEvent:Event;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function clone():Event
+    {
+        return new TreeEvent(type, bubbles, cancelable,
+                             item, itemRenderer, triggerEvent);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5098
Author:   gauravj@adobe.com
Date:     2009-02-27T02:21:27.489350Z

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

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

Modified Paths:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as
+++ frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as
@@ -41,6 +41,11 @@
 	 *  Use this property if the mode property is set to DisplacementMapFilterMode.COLOR.
 	 *
 	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get alpha():Number
 	{
@@ -68,6 +73,11 @@
 	 *  for color is 0. Use this property if the mode property is set to
 	 *  DisplacementMapFilterMode.COLOR.
 	 *  @default 0x000000
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get color():uint
 	{
@@ -96,6 +106,11 @@
      *  BitmapDataChannel.BLUE
      *  BitmapDataChannel.GREEN
      *  BitmapDataChannel.RED
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get componentX():uint
 	{
@@ -124,6 +139,11 @@
      *  BitmapDataChannel.BLUE
      *  BitmapDataChannel.GREEN
      *  BitmapDataChannel.RED
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get componentY():uint
 	{
@@ -147,6 +167,11 @@

 	/**
 	 *  A BitmapData object containing the displacement map data.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get mapBitmap():BitmapData
 	{
@@ -171,6 +196,11 @@
 	/**
 	 *  A value that contains the offset of the upper-left corner of the target display
 	 *  object from the upper-left corner of the map image.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get mapPoint():Point
 	{
@@ -204,6 +234,11 @@
      *    substitutes the values in the color and alpha properties.
      *
      *  @default DisplacementMapFilterMode.WRAP
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
 	public function get mode():String
 	{
@@ -229,6 +264,11 @@
 	 *  The multiplier to use to scale the x displacement result from the map calculation.
 	 *
 	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get scaleX():Number
 	{
@@ -254,6 +294,11 @@
 	 *  The multiplier to use to scale the y displacement result from the map calculation.
 	 *
 	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get scaleY():Number
 	{


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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/LinkBarAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/LinkBarAutomationImpl.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 mx.automation.delegates.controls
 {
 	import flash.display.DisplayObject;


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

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


Fixed 'delete action' for blocs that never were (unraveled instead)

--- src/Displays/DBloc.as
+++ src/Displays/DBloc.as
@@ -97,7 +97,7 @@

 					setSelect(false);
 				} else if (U.buttonManager.moused) {
-					new DelBlocAction(bloc).execute();
+					bloc.unravel();
 					setSelect(false);
 				}
 			}
@@ -107,7 +107,7 @@

 			if (ControlSet.DELETE_KEY.justPressed() ||
 				ControlSet.PASTE_KEY.justPressed() || ControlSet.CUT_KEY.justPressed()) {
-				new DelBlocAction(bloc).execute();
+				bloc.unravel();
 				setSelect(false);
 				if (ControlSet.DELETE_KEY.justPressed())
 					ControlSet.DELETE_KEY.enabled = false;


embedding fonts now works in Labels but is too blury

git-svn-id: 02605e11d3a461bc7e12f3f3880edf4b0c8dcfd0@4078 3e7533ad-8678-4d30-8e38-00a379d3f0d0

--- src/laml/display/Label.as
+++ src/laml/display/Label.as
@@ -1,7 +1,5 @@
 package laml.display{
 	import flash.display.BlendMode;
-	import flash.text.AntiAliasType;
-	import flash.text.GridFitType;
 	import flash.text.TextField;
 	import flash.text.TextFieldType;
 	import flash.text.TextFormat;
@@ -17,34 +15,34 @@
 			super.initialize();
 			model.validate_textFormat = validateTextFormat;
 			model.validate_selectable = validateSelectable;
+			model.validate_embedFonts = validateEmbedFonts;
 			text = "";
 		}

 		override protected function createChildren():void {
 			super.createChildren();
-			createTextView();
-			createTextFormat();
+			textView = createTextView();
+			textFormat = createTextFormat();
 		}

-		protected function createTextView():void {
+		protected function createTextView():TextField {
 			var tf:TextField = new TextField();
-			tf.antiAliasType = AntiAliasType.ADVANCED;
-			tf.gridFitType = GridFitType.PIXEL;
 			tf.type = TextFieldType.DYNAMIC;
 			tf.wordWrap = true;
-			tf.sharpness = 200;
 			tf.selectable = false;
 			tf.mouseEnabled = false;
 			tf.blendMode = BlendMode.LAYER;
-			textView = tf;
+
+			return tf;
 		}

-		protected function createTextFormat():void {
+		protected function createTextFormat():TextFormat {
 			var tf:TextFormat = getTextFormat();
 			if(!tf.align) {
-				tf.align = TextFormatAlign.CENTER;
+//				tf.align = TextFormatAlign.CENTER;
 			}
-			textFormat = tf;
+
+			return tf;
 		}

 		override protected function updateDisplayList(w:Number, h:Number):void {
@@ -90,6 +88,18 @@
 			textView.mouseEnabled = newValue;
 		}

+		public function set embedFonts(embedFonts:Boolean):void {
+			model.embedFonts = embedFonts;
+		}
+
+		public function get embedFonts():Boolean {
+			return model.embedFonts;
+		}
+
+		protected function validateEmbedFonts(newValue:*, oldValue:*):void {
+			textView.embedFonts = newValue;
+		}
+
 		public function set textView(textField:TextField):void {
 			if(_textView && view.contains(_textView)) {
 				view.removeChild(_textView);


fixed DefaultRenderer::present when there is no RendererState

--- src/aerys/minko/render/renderer/DefaultRenderer.as
+++ src/aerys/minko/render/renderer/DefaultRenderer.as
@@ -125,7 +125,8 @@
 		{
 			var time : int = getTimer();

-			_context.present();
+			if (_numStates != 0)
+				_context.present();

 			_drawingTime += getTimer() - time;
 			++_frame;


Increased tests 12 -> 100

Increased tests 12 -> 100

--- src/Testing/Goals/ShardGoal.as
+++ src/Testing/Goals/ShardGoal.as
@@ -8,7 +8,7 @@
 	public class ShardGoal extends GeneratedGoal {

 		public function ShardGoal(Description:String, Shard:LevelShard) {
-			super(Description, Test, Shard.expectedOps, 12, int(100 * Shard.timeFactor));
+			super(Description, Test, Shard.expectedOps, 100, int(100 * Shard.timeFactor));
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 20275
Author:   rfrishbe@adobe.com
Date:     2011-02-10T19:09:50.248259Z

Log Message:
-----------
Increasing the hitArea of TextInput to make it easier to drop the caret in the correct place.  We can increase the hitArea on the left by increasing marginLeft (same for marginRight on right), and we can increase the hitArea on the bottom by increasing the height of the TextField.  There's no way to increase the hitArea of the top, but I did file an AIR request to allow us to change the hitArea of a TextField.

QE notes: -
Doc notes:
Bugs: SDK-29405, SDK-29406
Reviewer: Glenn, Jason SJ
Tests run: checkintests, Mac ran TextInput/TextArea tests and some TextInput ones need to be updated
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/TextInputSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -1021,9 +1021,10 @@
             sharpness = getStyle("fontSharpness");
             thickness = getStyle("fontThickness");

-            // ignore padding in the text...most components deal with it themselves
-            //textFormat.leftMargin = getStyle("paddingLeft");
-            //textFormat.rightMargin = getStyle("paddingRight");
+            // most components ignore margin and just set x and y, but some (like TextInput)
+            // set the margin increase their hitArea
+            textFormat.leftMargin = leftMargin;
+            textFormat.rightMargin = rightMargin;

             // Check for embedded fonts
             embedFonts = isFontEmbedded(textFormat);
@@ -1146,6 +1147,10 @@
         var originalText:String = super.text;
         var oldIsTruncated:Boolean = _isTruncated;
         var w:Number = width;
+        if (leftMargin is Number)
+            w -= Number(leftMargin);
+        if (rightMargin is Number)
+            w -= Number(rightMargin);

         _isTruncated = false;

@@ -2071,6 +2076,11 @@
     // method is delegated to this function.
     mx_internal var scrollToRangeDelegate:Function;

+    // the left and right margin for this StyleableTextField.  By default
+    // it is null, which corresponds to 0.
+    mx_internal var leftMargin:Object;
+    mx_internal var rightMargin:Object;
+
     private static var supportedStyles:String = "textAlign fontFamily fontWeight fontStyle color fontSize textDecoration textIndent leading letterSpacing"

     private var invalidateStyleFlag:Boolean = true;


A bit of better wording for auth docs

A bit of better wording for auth docs

git-svn-id: c197267f952b24206666de142881703007ca05d5@13227 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/igniterealtime/xiff/core/XMPPConnection.as
+++ src/org/igniterealtime/xiff/core/XMPPConnection.as
@@ -126,7 +126,7 @@
 		public static const STREAM_TYPE_FLASH_TERMINATED:uint = 3;

 		/**
-		 * The types of SASL mechanisms available.
+		 * The types of SASL mechanisms available. Indexed by their MECHANISM constant.
 		 *
 		 *
By default, only Anonymous and DigestMD5 are enabled.

 		 * @see org.igniterealtime.xiff.auth.Anonymous
@@ -529,7 +529,11 @@
 		}

 		/**
-		 * @private
+		 * SASL Authentication should been set up, begin the authentication
+		 * process by sending the initial request.
+		 *
+		 *
Make sure that the username and password are set, or the connection is using
+		 * anonymous authentication before calling this method.

 		 */
 		protected function beginAuthentication():void
 		{
@@ -1207,7 +1211,10 @@
 				switch (localName)
 				{
 					case "starttls":
-						handleStreamTLS( feature ); // Checks for 'required'
+						if ( !loggedIn )
+						{
+							handleStreamTLS( feature ); // Checks for 'required'
+						}
 						break;
 					case "register":
 						// In-Band Registration, if enabled.... TODO
@@ -1216,7 +1223,10 @@
 						if ( !loggedIn )
 						{
 							configureAuthMechanisms( feature );
-							beginAuthentication();
+							if ( ( username != null && username.length > 0 ) || useAnonymousLogin )
+							{
+								beginAuthentication();
+							}
 						}
 						break;
 					case "compression":
@@ -1226,7 +1236,6 @@
 						}
 						break;
 					case "bind":
-						// compression needed, done? else auth done?
 						if ( ((_compress && compressionNegotiated) || !_compress) && loggedIn )
 						{
 							bindConnection();


fixed labels tip; it adjust itself according to stage width

git-svn-id: adbdea8fc1759bd16b0eaf24a244a7e5f870a654@26 fe3f0490-d73e-11de-a956-c71e7d3a9d2f

--- VectorEditorStandalone/src/org/jbei/components/common/LabelBox.as
+++ VectorEditorStandalone/src/org/jbei/components/common/LabelBox.as
@@ -102,9 +102,15 @@

 		private function onRollOver(event:MouseEvent):void
 		{
-			var localPoint:Point = localToGlobal(new Point(event.localX + 20, event.localY));
+			// Calculate tip position
+			var tipPoint:Point = localToGlobal(new Point(event.localX + 20, event.localY));

-		    tip = ToolTipManager.createToolTip(tipText(), localPoint.x, localPoint.y) as ToolTip;
+			tip = ToolTipManager.createToolTip(tipText(), tipPoint.x, tipPoint.y) as ToolTip;
+
+			if(tip.x + tip.width > stage.stageWidth) {
+				tip.x -= (tip.x + tip.width - stage.stageWidth);
+				tip.y += 20;
+			}
     	}

 		private function onRollOut(event:MouseEvent):void


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Another use for ValueEvent. Should be compatible with old listeners.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4608 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/util/MediaContainer.as
+++ src/as/com/threerings/util/MediaContainer.as
@@ -63,7 +63,8 @@
  */
 public class MediaContainer extends Sprite
 {
-    /** An event we dispatch when our size is known. */
+    /** A ValueEvent we dispatch when our size is known.
+     * Value: [ width, height ]. */
     public static const SIZE_KNOWN :String = "mediaSizeKnown";

     /** A log instance that can be shared by sprites. */
@@ -461,13 +462,9 @@
         if (_w != ww || _h != hh) {
             _w = ww;
             _h = hh;
-            // TODO: I think that I'll want to create a subclass of the
-            // basic media container which does things that are usefulish
-            // but separate from MsoySprite. SIZE_KNOWN is one of those
-            // things that should probably be moved. Maybe BaseMediaContainer
-            // and MediaContainer? FancyMediaContainer?
-            dispatchEvent(new Event(SIZE_KNOWN));
             contentDimensionsUpdated();
+            // dispatch an event to any listeners
+            dispatchEvent(new ValueEvent(SIZE_KNOWN, [ ww, hh ]));
         }
     }


check for NaN on size https://github.com/johndyer/mediaelement/pull/571

--- src/flash/FlashMediaElement.as
+++ src/flash/FlashMediaElement.as
@@ -792,7 +792,7 @@

 			if (_mediaElement is VideoElement) {

-				if (_nativeVideoWidth <= 0 || _nativeVideoHeight <= 0) {
+				if (isNaN(_nativeVideoWidth) || isNaN(_nativeVideoHeight) || _nativeVideoWidth <= 0 || _nativeVideoHeight <= 0) {
 					_output.appendText("ERR: I dont' have the native dimension\n");
 					return;
 				}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/PieSeriesAutomationImpl.as
+++ frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/PieSeriesAutomationImpl.as
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.automation.delegates.charts
+{
+	import flash.display.DisplayObject;
+	import flash.geom.Point;
+
+	import mx.automation.Automation;
+	import mx.charts.ChartItem;
+	import mx.charts.series.PieSeries;
+	import mx.charts.series.items.PieSeriesItem;
+	import mx.core.IFlexDisplayObject;
+	import mx.core.mx_internal;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines the methods and properties required to perform instrumentation for the
+	 *  LineSeries class.
+	 *
+	 *  @see mx.charts.series.LineSeries
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class PieSeriesAutomationImpl extends SeriesAutomationImpl
+	{
+		include "../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(PieSeries, PieSeriesAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 *  @param obj PieSeries object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function PieSeriesAutomationImpl(obj:PieSeries)
+		{
+			super(obj);
+
+			pieSeries = obj;
+		}
+
+		/**
+		 *  @private
+		 */
+		private var pieSeries:PieSeries;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		override protected function getChartItemLocation(item:ChartItem):Point
+		{
+			if (item is PieSeriesItem)
+			{
+				var aItem:PieSeriesItem = item as PieSeriesItem;
+
+				var startAngle:Number = aItem.startAngle - pieSeries.startAngle ;
+
+				var a:Number  =  startAngle + pieSeries.startAngle * Math.PI/180 + aItem.angle/2;
+				var inr:Number = pieSeries.getInnerRadiusInPixels();
+				var xpos:Number = aItem.origin.x + Math.cos(a)*(inr + (pieSeries.getRadiusInPixels()-inr)*.5);
+				var ypos:Number = aItem.origin.y - Math.sin(a)*(inr + (pieSeries.getRadiusInPixels()-inr)*.5);
+
+				var p:Point = new Point(xpos,ypos);
+				p = pieSeries.localToGlobal(p);
+				p = pieSeries.owner.globalToLocal(p);
+				return p;
+			}
+
+			return super.getChartItemLocation(item);
+		}
+
+	}
+
+}


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

--- frameworks/projects/charts/src/mx/charts/events/ChartItemEvent.as
+++ frameworks/projects/charts/src/mx/charts/events/ChartItemEvent.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 mx.charts.events
 {


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

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

 package mx.resources
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/menuClasses/MenuBarItem.as
+++ frameworks/projects/mx/src/mx/controls/menuClasses/MenuBarItem.as
@@ -0,0 +1,635 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.menuClasses
+{
+
+import flash.display.DisplayObject;
+import flash.text.TextLineMetrics;
+import mx.controls.MenuBar;
+import mx.core.FlexVersion;
+import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModuleFactory;
+import mx.core.IFontContextComponent;
+import mx.core.IProgrammaticSkin;
+import mx.core.IStateClient;
+import mx.core.IUITextField;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+import mx.styles.CSSStyleDeclaration;
+import mx.styles.ISimpleStyleClient;
+
+use namespace mx_internal;
+
+include "../../styles/metadata/LeadingStyle.as"
+include "../../styles/metadata/TextStyles.as"
+
+/**
+ *  The MenuBarItem class defines the default item
+ *  renderer for the top-level menu bar of a MenuBar control.
+ *  By default, the item renderer draws the text associated
+ *  with each item in the top-level menu bar, and an optional icon.
+ *
+ *
A MenuBarItem
+ *  instance passes mouse and keyboard interactions to the MenuBar so
+ *  that the MenuBar can correctly show and hide menus.

+ *
+ *
You can override the default MenuBar item renderer
+ *  by creating a custom item renderer that implements the
+ *  IMenuBarItemRenderer interface.

+ *
+ *
You can also define an item renderer for the pop-up submenus
+ *  of the MenuBar control.
+ *  Because each pop-up submenu is an instance of the Menu control,
+ *  you use the class MenuItemRenderer to define an item renderer
+ *  for the pop-up submenus.

+ *
+ *  @see mx.controls.MenuBar
+ *  @see mx.controls.Menu
+ *  @see mx.controls.menuClasses.IMenuBarItemRenderer
+ *  @see mx.controls.menuClasses.MenuItemRenderer
+ */
+
+public class MenuBarItem extends UIComponent implements IMenuBarItemRenderer, IFontContextComponent
+    {
+
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var leftMargin:int = 20;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function MenuBarItem()
+    {
+        super();
+        mouseChildren = false;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  currentSkin
+    //----------------------------------
+
+    /**
+     *  The skin defining the border and background for this MenuBarItem.
+     */
+    mx_internal var currentSkin:IFlexDisplayObject;
+
+    //----------------------------------
+    //  icon
+    //----------------------------------
+
+    /**
+     *  The IFlexDisplayObject that displays the icon in this MenuBarItem.
+     */
+    protected var icon:IFlexDisplayObject;
+
+    //----------------------------------
+    //  label
+    //----------------------------------
+
+    /**
+     *  The UITextField that displays the text in this MenuBarItem.
+     */
+    protected var label:IUITextField;
+
+    /**
+     *  The default skin's style name
+     */
+    mx_internal var skinName:String = "itemSkin";
+
+    /**
+     *  Flags used to save information about the skin and icon styles
+     */
+    private var defaultSkinUsesStates:Boolean = false;
+    private var checkedDefaultSkin:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The baselinePosition of a MenuBarItem is calculated
+     *  for its label.
+     */
+    override public function get baselinePosition():Number
+    {
+		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+			return super.baselinePosition;
+
+		if (!validateBaselinePosition())
+			return NaN;
+
+		return label.y + label.baselinePosition;
+    }
+
+    //----------------------------------
+    //  enabled
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var enabledChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    override public function set enabled(value:Boolean):void
+    {
+        if (super.enabled == value)
+            return;
+
+        super.enabled = value;
+        enabledChanged = true;
+
+        invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the data property.
+     */
+    private var _data:Object;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the data property
+     *  as defined by the IDataRenderer interface.
+     *  All item renderers must implement the IDataRenderer interface.
+     *
+     *  @see mx.core.IDataRenderer
+     */
+    public function get data():Object
+    {
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+        _data = value;
+        invalidateProperties();
+
+        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+    }
+
+    //----------------------------------
+    //  fontContext
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    public function get fontContext():IFlexModuleFactory
+    {
+        return moduleFactory;
+    }
+
+    /**
+     *  @private
+     */
+    public function set fontContext(moduleFactory:IFlexModuleFactory):void
+    {
+        this.moduleFactory = moduleFactory;
+    }
+
+    //----------------------------------
+    //  menuBar
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the menuBar property.
+     */
+    private var _menuBar:MenuBar;
+
+    /**
+     *  The implementation of the menuBar property
+     *  as defined by the IMenuBarItemRenderer interface.
+     *
+     *  @copy mx.controls.menuClasses.IMenuBarItemRenderer#menuBar
+     *
+     *  @see mx.controls.menuClasses.IMenuBarItemRenderer#menuBar
+     */
+    public function get menuBar():MenuBar
+    {
+        return _menuBar;
+    }
+
+    /**
+     *  @private
+     */
+    public function set menuBar(value:MenuBar):void
+    {
+        _menuBar = value;
+    }
+
+    //----------------------------------
+    //  menuBarItemIndex
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the menuBarItemIndex property.
+     */
+    private var _menuBarItemIndex:int = -1;
+
+     /**
+     *  The implementation of the menuBarItemIndex property
+     *  as defined by the IMenuBarItemRenderer interface.
+     *
+     *  @copy mx.controls.menuClasses.IMenuBarItemRenderer#menuBarItemIndex
+     *
+     *  @see mx.controls.menuClasses.IMenuBarItemRenderer#menuBarItemIndex
+     */
+    public function get menuBarItemIndex():int
+    {
+        return _menuBarItemIndex;
+    }
+
+    /**
+     *  @private
+     */
+    public function set menuBarItemIndex(value:int):void
+    {
+        _menuBarItemIndex = value;
+    }
+
+    //----------------------------------
+    //  menuBarItemState
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the menuBarItemState property.
+     */
+    private var _menuBarItemState:String;
+
+    /**
+     *  The implementation of the menuBarItemState property
+     *  as defined by the IMenuBarItemRenderer interface.
+     *
+     *  @copy mx.controls.menuClasses.IMenuBarItemRenderer#menuBarItemState
+     *
+     *  @see mx.controls.menuClasses.IMenuBarItemRenderer#menuBarItemState
+     */
+    public function get menuBarItemState():String
+    {
+        return _menuBarItemState;
+    }
+
+    /**
+     *  @private
+     */
+    public function set menuBarItemState(value:String):void
+    {
+        _menuBarItemState = value;
+        viewSkin(_menuBarItemState);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Deprecated Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  dataProvider
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for data provider
+	 */
+	private var _dataProvider:Object;
+
+	/**
+	 *  The object that provides the data for the Menu that is popped up
+	 *  when this MenuBarItem is selected.
+	 *
+	 *  @default "undefined"
+	 */
+	public function get dataProvider():Object
+	{
+		return _dataProvider
+	}
+
+	[Deprecated(replacement="MenuBarItem.data")]
+
+	/**
+	 *  @private
+	 */
+	public function set dataProvider(value:Object):void
+	{
+		_dataProvider = value;
+
+		invalidateProperties();
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        var styleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration();
+        styleDeclaration.factory = function():void
+        {
+            this.borderStyle = "none"
+        };
+
+       	createLabel(-1);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        // if the font changed and we already created the label, we will need to
+        // destory it so it can be re-created, possibly in a different swf context.
+        if (hasFontContextChanged() && label != null)
+        {
+        	var index:int = getChildIndex(DisplayObject(label));
+            removeLabel();
+ 			createLabel(index);
+        }
+
+        var iconClass:Class;
+
+        if (enabledChanged)
+        {
+            enabledChanged = false;
+            if (label)
+                label.enabled = enabled;
+
+            if (!enabled)
+                menuBarItemState = "itemUpSkin";
+        }
+
+        //Remove any existing icons.
+        //These will be recreated below if needed.
+        if (icon)
+        {
+            removeChild(DisplayObject(icon));
+            icon = null;
+        }
+
+        if (_data)
+        {
+            iconClass = menuBar.itemToIcon(data);
+            if (iconClass)
+            {
+                icon = new iconClass();
+                addChild(DisplayObject(icon));
+            }
+
+            label.visible = true;
+            var labelText:String;
+            if (menuBar.labelFunction != null)
+                labelText = menuBar.labelFunction(_data);
+            if (labelText == null)
+                labelText = menuBar.itemToLabel(_data);
+            label.text = labelText;
+            label.enabled = enabled;
+        }
+        else
+        {
+            label.text = " ";
+        }
+
+        // Invalidate layout here to ensure icons are positioned correctly.
+        invalidateDisplayList();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        if (icon && leftMargin < icon.measuredWidth)
+        {
+            leftMargin = icon.measuredWidth;
+        }
+        measuredWidth = label.getExplicitOrMeasuredWidth() + leftMargin;
+        measuredHeight = label.getExplicitOrMeasuredHeight();
+
+        if (icon && icon.measuredHeight > measuredHeight)
+            measuredHeight = icon.measuredHeight + 2;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        if (icon)
+        {
+            icon.x = (leftMargin - icon.measuredWidth) / 2;
+            icon.setActualSize(icon.measuredWidth, icon.measuredHeight);
+            label.x = leftMargin;
+        }
+        else
+            label.x = leftMargin / 2;
+
+        label.setActualSize(unscaledWidth - leftMargin,
+            label.getExplicitOrMeasuredHeight());
+
+        label.y = (unscaledHeight - label.height) / 2;
+
+        if (icon)
+            icon.y = (unscaledHeight - icon.height) / 2;
+
+        menuBarItemState = "itemUpSkin";
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Creates the label and adds it as a child of this component.
+     *
+     *  @param childIndex The index of where to add the child.
+	 *  If -1, the text field is appended to the end of the list.
+     */
+    mx_internal function createLabel(childIndex:int):void
+    {
+        if (!label)
+        {
+            label = IUITextField(createInFontContext(UITextField));
+
+			label.styleName = this;
+            label.selectable = false;
+
+            if (childIndex == -1)
+                addChild(DisplayObject(label));
+            else
+                addChildAt(DisplayObject(label), childIndex);
+        }
+    }
+
+    /**
+     *  @private
+     *  Removes the label from this component.
+     */
+    mx_internal function removeLabel():void
+    {
+        if (label)
+        {
+            removeChild(DisplayObject(label));
+            label = null;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function viewSkin(state:String):void
+    {
+    	var newSkinClass:Class = Class(getStyle(state));
+    	var newSkin:IFlexDisplayObject;
+    	var stateName:String = "";
+
+    	if (!newSkinClass)
+    	{
+    		// Try the default skin
+    		newSkinClass = Class(getStyle(skinName));
+
+    		if (state == "itemDownSkin")
+    			stateName = "down";
+    		else if (state == "itemOverSkin")
+    			stateName = "over";
+    		else if (state == "itemUpSkin")
+    			stateName = "up";
+
+    		// If we are using the default skin, then
+    		if (defaultSkinUsesStates)
+    			state = skinName;
+
+     		if (!checkedDefaultSkin && newSkinClass)
+    		{
+	    		newSkin = IFlexDisplayObject(new newSkinClass());
+	    		// Check if the skin class is a state client or a programmatic skin
+	    		if (!(newSkin is IProgrammaticSkin) && newSkin is IStateClient)
+	    		{
+	    			defaultSkinUsesStates = true;
+	    			state = skinName;
+	    		}
+
+	    		if (newSkin)
+	    		{
+		    		checkedDefaultSkin = true;
+		    	}
+    		}
+    	}
+
+      	newSkin = IFlexDisplayObject(getChildByName(state));
+
+        if (!newSkin)
+        {
+            if (newSkinClass)
+            {
+                newSkin = new newSkinClass();
+
+                DisplayObject(newSkin).name = state;
+
+                if (newSkin is ISimpleStyleClient)
+                    ISimpleStyleClient(newSkin).styleName = this;
+
+                addChildAt(DisplayObject(newSkin), 0);
+            }
+        }
+
+        newSkin.setActualSize(unscaledWidth, unscaledHeight);
+
+        if (currentSkin)
+            currentSkin.visible = false;
+
+        if (newSkin)
+            newSkin.visible = true;
+
+        currentSkin = newSkin;
+
+        // Update the state of the skin if it accepts states and it implements the IStateClient interface.
+		if (defaultSkinUsesStates && currentSkin is IStateClient)
+		{
+			IStateClient(currentSkin).currentState = stateName;
+		}
+    }
+
+    /**
+     *  @private
+     */
+	mx_internal function getLabel():IUITextField
+	{
+		return label;
+	}
+}
+
+}


Make StringUtil not extend StringTrimmer, and delegate relevant methods instead.

--- frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringUtil.as
+++ frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringUtil.as
@@ -31,7 +31,7 @@
 	 *  @productversion Flex 3
 	 *  @productversion FlexJS 0.0
 	 */
-	public class StringUtil extends StringTrimmer
+	public class StringUtil
 	{
 		public function StringUtil()
 		{
@@ -180,6 +180,86 @@
 			return String.fromCharCode.apply(null, charCodes);
 		}

+        /**
+         *  Removes all whitespace characters from the beginning and end
+         *  of the specified string.
+         *
+         *  @param str The String whose whitespace should be trimmed.
+         *
+         *  @return Updated String where whitespace was removed from the
+         *  beginning and end.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public static function trim(str:String):String
+        {
+            return StringTrimmer.trim(str);
+        }
+
+        /**
+         *  Removes all whitespace characters from the beginning and end
+         *  of each element in an Array, where the Array is stored as a String.
+         *
+         *  @param value The String whose whitespace should be trimmed.
+         *
+         *  @param separator The String that delimits each Array element in the string.
+         *
+         *  @return Array where whitespace was removed from the
+         *  beginning and end of each element.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public static function splitAndTrim(value:String, delimiter:String):Array
+        {
+            return StringTrimmer.splitAndTrim(value,delimiter);
+        }
+
+        /**
+         *  Removes all whitespace characters from the beginning and end
+         *  of each element in an Array, where the Array is stored as a String.
+         *
+         *  @param value The String whose whitespace should be trimmed.
+         *
+         *  @param separator The String that delimits each Array element in the string.
+         *
+         *  @return Updated String where whitespace was removed from the
+         *  beginning and end of each element.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public static function trimArrayElements(value:String, delimiter:String):String
+        {
+            return StringTrimmer.trimArrayElements(value,delimiter);
+        }
+
+        /**
+         *  Returns true if the specified string is
+         *  a single space, tab, carriage return, newline, or formfeed character.
+         *
+         *  @param str The String that is is being queried.
+         *
+         *  @return true if the specified string is
+         *  a single space, tab, carriage return, newline, or formfeed character.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public static function isWhitespace(character:String):Boolean
+        {
+            return StringTrimmer.isWhitespace(character);
+        }
+
 		/**
 		 *  @private
 		 *  Helper method used by restrict() to test each character


Transferred from the Adobe Open Source Subversion Repository

Revision: 19438
Author:   jszeto@adobe.com
Date:     2010-12-16T21:23:20.795622Z

Log Message:
-----------
Adding copyright header

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

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
 package spark.skins.mobile
 {
 import flash.display.GradientType;


Transferred from the Adobe Open Source Subversion Repository

Revision: 2668
Author:   kelin@adobe.com
Date:     2008-07-30T21:05:00.806335Z

Log Message:
-----------
Massive check-in:

Updated Range, TrackBase, Slider, Spinner to use valueInterval to constrain values. In Slider, snapInterval was removed in favor of just using stepSize (for simplicity). TrackBase also is able to handle a resizable thumb.

Refactored ScrollBar to subclass TrackBase instead of Range in order to share thumb dragging code. pageSize was also moved from Range into ScrollBar.

Added a basic version of NumericStepper that can handle simple operations like committing the value when the enter key is pressed.

Skins for each of the components were also updated/added as needed. I also updated flex4test/CircularScrollBar.

QE: Yes!
Reviewer: Chet, Gordon, Jason

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/skins/MyVScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/NumericStepper.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerDecrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/flex4test.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerIncrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/components/CircularScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/skins/CircularScrollBarSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
@@ -17,7 +17,7 @@
 import flash.geom.Point;

 /**
- *  Dispatched when the value of the Slider control changes
+ *  Dispatched when the value of the control changes
  *  as a result of user interaction.
  *
  *  @eventType mx.events.Event
@@ -27,9 +27,13 @@
 /**
  *  TrackBase is a base class for components with a track
  *  and one or more thumbs such as Slider and ScrollBar. It
- *  declares two required SkinParts, thumb and track. TrackBase
- *  also provides the code for thumb dragging which is shared
- *  by Slider and ScrollBar.
+ *  declares two required SkinParts, thumb and
+ *  track. TrackBase also provides the code for
+ *  thumb dragging which is shared by Slider and ScrollBar.
+ *
+ *  @see flex.component.Range
+ *  @see flex.component.Slider
+ *  @see flex.component.ScrollBar
  */
 public class TrackBase extends Range
 {
@@ -58,23 +62,33 @@
     [SkinPart]

     /**
-     *  thumb is a SkinPart that defines a button that can be
-     *  dragged along the track to increase or decrease the slider's
-     *  value property. Updates to the value
-     *  through other means will automatically update the position of the
-     *  thumb with respect to the track.
+     *  thumb is a SkinPart that defines a button
+     *  that can be dragged along the track to increase or
+     *  decrease the slider's value property.
+     *  Updates to the value through other means
+     *  will automatically update the position of the thumb
+     *  with respect to the track.
      */
     public var thumb:Button;

     [SkinPart]

     /**
-     *  track is a SkinPart that defines a button that, when
-     *  pressed, will set the value to the value corresponding
-     *  with that position.
+     *  track is a SkinPart that defines a button
+     *  that, when  pressed, will set the value
+     *  to the value corresponding with that position.
      */
     public var track:Button;
-
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    private var tempTrackSize:Number = NaN;
+
     //--------------------------------------------------------------------------
     //
     //  Overridden properties: UIComponent, Range
@@ -91,24 +105,24 @@
         enableSkinParts(value);
     }

+    override public function set maximum(value:Number):void
+    {
+        super.maximum = value;
+        invalidateDisplayList();
+    }
+
+    override public function set minimum(value:Number):void
+    {
+        super.minimum = value;
+        invalidateDisplayList();
+    }
+
     override public function set value(newValue:Number):void
     {
         super.value = newValue;
         invalidateDisplayList();
     }
-
-    override public function set maximum(value:Number):void
-    {
-        super.maximum = value;
-        invalidateDisplayList();
-    }
-
-    override public function set minimum(value:Number):void
-    {
-        super.minimum = value;
-        invalidateDisplayList();
-    }
-
+
     //--------------------------------------------------------------------------
     //
     // Properties
@@ -137,10 +151,11 @@
     //---------------------------------

     /**
-     *  This method returns the size of the scrollbar's logical track.
-     *  Subclasses need to override this method to return an appropriate
-     *  value. Note that this number can represent any system of units, but
-     *  those units must be consistent with the values returned by
+     *  This method returns the size of the logical track.
+     *  Subclasses need to override this method to return
+     *  an appropriate value. Note that this number can
+     *  represent any system of units, but those units must
+     *  be consistent with the values returned by
      *  pointToPosition, thumbSize, and valueToPosition.
      */
     protected function get trackSize():Number
@@ -155,9 +170,10 @@
     private var _thumbSize:Number = 0;

     /**
-     *  The size of the thumb on the logical track in the units of the
-     *  subclass, which must be consistent with trackSize, pointToPosition
-     *  and valueToPosition. The default thumbSize on the logical track is 0.
+     *  The size of the thumb on the logical track in the
+     *  units of the subclass, which must be consistent with
+     *  trackSize, pointToPosition and valueToPosition. The
+     *  default thumbSize on the logical track is 0.
      *
      *  @default 0
      */
@@ -168,39 +184,10 @@

     protected function set thumbSize(value:Number):void
     {
+        if (value == _thumbSize)
+            return;
+
         _thumbSize = value;
-
-        invalidateDisplayList();
-    }
-
-    //---------------------------------
-    // snapInterval
-    //---------------------------------
-
-    private var _snapInterval:Number = 0;
-
-    private var snapIntervalChanged:Boolean = false;
-
-    /**
-     *  The snapInterval restricts the allowed values to the minimum,
-     *  maximum, and multiples of the snapInterval starting from the
-     *  minimum.
-     */
-    public function get snapInterval():Number
-    {
-        return _snapInterval;
-    }
-
-    public function set snapInterval(value:Number):void
-    {
-        if (value == snapInterval)
-            return;
-
-        _snapInterval = value;
-        snapIntervalChanged = true;
-
-        invalidateProperties();
-        invalidateDisplayList();
     }

     //--------------------------------------------------------------------------
@@ -208,21 +195,6 @@
     // Methods
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override protected function commitProperties():void
-    {
-        super.commitProperties();
-
-        if (snapIntervalChanged)
-        {
-            setValue(nearestValidValue(value));
-
-            snapIntervalChanged = false;
-        }
-    }

     /**
      *  @private
@@ -231,17 +203,21 @@
                                                   unscaledHeight:Number):void
     {
         super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        thumbSize = calculateThumbSize();
+        sizeThumb(thumbSize);
+
         positionThumb(valueToPosition(value));
     }

     /**
-     *  Adds an eventListener for the updateComplete event so that the
-     *  Slider will correctly position the thumb.
+     *  Adds an eventListener for the updateComplete event so
+     *  that TrackBase will correctly position the thumb.
      */
     override protected function attachBehaviors():void
     {
         super.attachBehaviors();
-        skinObject.addEventListener("updateComplete", skin_updateCompleteHandler);
+        track.addEventListener("updateComplete", track_updateCompleteHandler);
     }

     /**
@@ -250,7 +226,7 @@
     override protected function removeBehaviors():void
     {
         super.removeBehaviors();
-        skinObject.removeEventListener("updateComplete", skin_updateCompleteHandler);
+        track.removeEventListener("updateComplete", track_updateCompleteHandler);
     }

     /**
@@ -260,12 +236,14 @@
     {
         if (instance == thumb)
         {
-            thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumb_mouseDownHandler);
+            thumb.addEventListener(MouseEvent.MOUSE_DOWN,
+                                   thumb_mouseDownHandler);
             thumb.stickyHighlighting = true;
         }
         else if (instance == track)
         {
-            track.addEventListener(MouseEvent.MOUSE_DOWN, track_mouseDownHandler);
+            track.addEventListener(MouseEvent.MOUSE_DOWN,
+                                   track_mouseDownHandler);
         }

         enableSkinParts(enabled);
@@ -287,47 +265,9 @@
                                       track_mouseDownHandler);
         }
     }
-
-    /**
-     *  Returns the nearest allowed value. The default allowed values
-     *  are the minimum, maximum, and multiples of the snapInterval
-     *  starting from the minimum. If the snapInterval is 0, then
-     *  nearestValidValue() just returns the value. A snapInterval less
-     *  than 0 is not supported.
-     */
-    override protected function nearestValidValue(value:Number):Number
-    {
-        // NaN returns 0
-        if (isNaN(value))
-            value = 0;
-
-        if (value > maximum)
-            return maximum;
-        else if (value < minimum)
-            return minimum;
-
-        if (snapInterval == 0)
-            return value;
-
-        var closest:Number = Math.round((value - minimum) / snapInterval)
-                             * snapInterval + minimum;
-
-        if (closest >= maximum)
-            return maximum;
-        else if (closest <= minimum)
-            return minimum;
-
-        var cdiff:Number = Math.abs(closest - value);
-        var maxdiff:Number = Math.abs(maximum - value);
-
-        if (maxdiff <= cdiff)
-            return maximum;
-        else
-            return closest;
-    }
-
-    /**
-     *  Make the skins reflect the enabled state of the trackBase
+
+    /**
+     *  Make the skins reflect the enabled state of TrackBase
      */
     protected function enableSkinParts(value:Boolean):void
     {
@@ -338,10 +278,10 @@
     }

     /**
-     *  Utility method which returns the range value for a given
-     *  position on the track. The range value is calculated by
+     *  Utility method which returns the Range value for a given
+     *  position on the track. The Range value is calculated by
      *  finding what fraction of the logical track the position
-     *  represents and then multiplying that by the range.
+     *  represents and then multiplying that by the Range.
      */
     protected function positionToValue(position:Number):Number
     {
@@ -351,8 +291,8 @@
             return minimum;

         var range:Number = maximum - minimum;
-        var val:Number = minimum + position * (range / posRange);
-        return val;
+        var value:Number = minimum + position * (range / posRange);
+        return value;
     }

     /**
@@ -378,7 +318,7 @@
      *  This function returns a position on the slider relative to its
      *  orientation and shape. The localX and localY
      *  values represent the location in the local coordinate system of the
-     *  slider. Subclasses must override this method and return the
+     *  track. Subclasses must override this method and return the
      *  appropriate value for their situation. Values should not be clamped to
      *  the ends of the track, as that clamping will happen later, prior
      *  to setting the thumb position.
@@ -394,6 +334,26 @@
      *  the thumb appropriately for their situation.
      */
     protected function positionThumb(thumbPos:Number):void {}
+
+    /**
+     *  This method sizes the thumb button correctly, given
+     *  the thumbSize. Subclasses should override this method to size
+     *  the thumb appropriately for their situation.
+     */
+    protected function sizeThumb(thumbSize:Number):void {}
+
+    /**
+     *  This utility method calculates an appropriate size for the thumb
+     *  button, given the current range, pageSize, and trackSize settings.
+     *  Subclasses should override this to calculate the correct size in
+     *  the units of position.
+     *
+     *  @default 0
+     */
+    protected function calculateThumbSize():Number
+    {
+        return 0;
+    }

     /**
      *  Given a MouseEvent that contains where the thumb was dragged to and
@@ -405,11 +365,11 @@
     protected function calculateNewValue(prevValue:Number, event:MouseEvent):Number
     {
         var pt:Point = new Point(event.stageX, event.stageY);
-        pt = globalToLocal(pt);
+        pt = track.globalToLocal(pt);
         var movePos:Number = pointToPosition(pt.x - _clickOffset.x,
                                              pt.y - _clickOffset.y);
         var newValue:Number = positionToValue(movePos);
-        var roundedValue:Number = nearestValidValue(newValue);
+        var roundedValue:Number = nearestValidValue(newValue, stepSize);
         return roundedValue;
     }

@@ -421,12 +381,20 @@

     /**
      *  @private
-     *  Force the Slider to set itself up correctly now that the
-     *  skins have completed loading.
-     */
-    private function skin_updateCompleteHandler(event:Event):void
-    {
-        invalidateDisplayList();
+     *  Force the component to set itself up correctly now that the
+     *  track is completely loaded.
+     */
+    protected function track_updateCompleteHandler(event:Event):void
+    {
+        //TODO: Consider the case where the track moves (like the move
+        //effect). Perhaps this handler should run every time...
+        if (trackSize != tempTrackSize)
+        {
+            thumbSize = calculateThumbSize();
+            sizeThumb(thumbSize);
+            positionThumb(valueToPosition(value));
+            tempTrackSize = trackSize;
+        }
     }

     //---------------------------------
@@ -434,8 +402,8 @@
     //---------------------------------

     /**
-     *  Handle mouse-down events on the scroll thumb. Records the difference
-     *  between positions.
+     *  Handle mouse-down events on the scroll thumb. Records
+     *  the mouse down point in clickOffset.
      */
     protected function thumb_mouseDownHandler(event:MouseEvent):void
     {
@@ -443,7 +411,7 @@
         // which would push this enabled check into the child/skin components
         if (!enabled)
             return;
-
+
         addSystemHandlers(MouseEvent.MOUSE_MOVE, system_mouseMoveHandler,
                 stage_mouseMoveHandler);
         addSystemHandlers(MouseEvent.MOUSE_UP, system_mouseUpHandler,
@@ -453,7 +421,7 @@
         // use this in later drag operations to determine how much to move the
         // thumb button
         var pt:Point = new Point(event.stageX, event.stageY);
-        var pt2:Point = globalToLocal(pt);
+        var pt2:Point = track.globalToLocal(pt);
         pt = thumb.globalToLocal(pt);
         _clickOffset = pt;
     }
@@ -483,10 +451,11 @@

         positionThumb(valueToPosition(newValue));

-        var oldValue:Number = value;
-        setValue(newValue);
-        if (newValue != oldValue)
-            dispatchEvent(new Event("change"));
+        if (newValue != value)
+        {
+            setValue(newValue);
+            dispatchEvent(new Event("change"));
+        }

         event.updateAfterEvent();
     }
@@ -519,9 +488,9 @@
     //---------------------------------

     /**
-     *  Handle mouse-down events for the scroll track. Subclasses should
-     *  override this method if they want the track to recognize
-     *  mouse clicks on the track.
+     *  Handle mouse-down events for the scroll track. Subclasses
+     *  should override this method if they want the track to
+     *  recognize mouse clicks on the track.
      */
     protected function track_mouseDownHandler(event:MouseEvent):void {}
 }