Transferred from the Adobe Open Source Subversion Repository

Revision: 18476
Author:   rfrishbe@adobe.com
Date:     2010-11-05T19:24:22.345498Z

Log Message:
-----------
Adding a "down" state for item renderers when in touch interaction mode.  This means item renderers don't go in to the "selected" state when someone presses down on them.  They first go in to the "down" state.  If the user later starts scrolling or moving around, the item renderer returns to the "normal" state.  If they press down and release up on the same item, the item renderer will go from the "down" state to the "selected" state.  This distinction is necessary on touch devices to distinguish between "down" and "selected".  There's also a new "selectedAndDown" state.

Adding ItemRendererInterationStateDetector as a helper class for item renderer to help detect when they are indeed hovered or pressed down.

QE notes:
Doc notes:
Bugs: SDK-27674, SDK-28110
Reviewer: Eric Day
Tests run: checkintests, full mustella run, QA cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRendererInteractionStateDetector.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/defaults.css</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -13,6 +13,7 @@
 {

 import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
 import flash.events.Event;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
@@ -127,6 +128,18 @@
  *  @productversion Flex 4
  */
 [Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]
+
+/**
+ *  @copy spark.components.supportClasses.GroupBase#style:downColor
+ *
+ *  @default 0xA8C6EE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+[Style(name="downColor", type="uint", format="Color", inherit="yes", theme="mobile")]

 /**
  *  The class to create instance of for the drag indicator during drag
@@ -355,6 +368,7 @@
  *    borderColor="0#CCCCCC"
  *    borderVisible="true"
  *    contentBackgroundColor="0xFFFFFF"
+ *    downColor="0xA8C6EE"
  *    dragIndicator="ListItemDragProxy"
  *    dropIndicatorSkin="ListDropIndicator"
  *    rollOverColor="0xCEDBEF"
@@ -444,10 +458,11 @@

     /**
      *  @private
-     *  Timer for putting the item renderer in the selected state on a delay
-     *  timer because of touch input.
-     */
-    private var mouseDownSelectTimer:Timer;
+     *  The displayObject where the mouse down event was received.
+     *  In touch interactionMode, used to track whether this item is
+     *  the one that is moused up on so we can possibly select it.
+     */
+    mx_internal var mouseDownObject:DisplayObject;

     /**
      *  @private
@@ -1121,12 +1136,12 @@
     {
         // Clear the flag so that we don't commit the selection again.
         multipleSelectionChanged = false;
-
+
         var oldSelectedIndex:Number = _selectedIndex;
         var oldCaretIndex:Number = _caretIndex;

         _proposedSelectedIndices = _proposedSelectedIndices.filter(isValidIndex);
-
+
         // Ensure that multiple selection is allowed and that proposed
         // selected indices honors it. For example, in the single
         // selection case, proposedSelectedIndices should only be a
@@ -1140,7 +1155,7 @@
         }
         // Keep _proposedSelectedIndex in-sync with multiple selection properties.
         if (!isEmpty(_proposedSelectedIndices))
-           _proposedSelectedIndex = getFirstItemValue(_proposedSelectedIndices);
+            _proposedSelectedIndex = getFirstItemValue(_proposedSelectedIndices);

         // Let ListBase handle the validating and commiting of the single-selection
         // properties.
@@ -1305,23 +1320,7 @@
         if (allowMultipleSelection && (selectedIndices != null))
             return selectedIndices.indexOf(index) != -1;

-        return index == selectedIndex;
-    }
-
-    /**
-     *  @private
-     */
-    override mx_internal function shouldItemAppearSelected(index:int):Boolean
-    {
-        if (getStyle("interactionMode") == InteractionMode.TOUCH)
-        {
-            // if we could be selecting, only show selection for that one item...don't even show
-            // it for the actual selectedIndex
-            if (pendingSelectionOnMouseUp && mouseDownSelectTimer && !mouseDownSelectTimer.running)
-                return mouseDownIndex == index;
-        }
-
-        return isItemIndexSelected(index);
+        return super.isItemIndexSelected(index);
     }

     /**
@@ -1417,7 +1416,8 @@

         if (!shiftKey)
         {
-            if (ctrlKey)
+            // FIXME (rfrishbe): make this part a style, like "multipleSelectionRequiresModifierKey"
+            if (ctrlKey || getStyle("interactionMode") == InteractionMode.TOUCH)
             {
                 if (!isEmpty(selectedIndices))
                 {
@@ -1685,10 +1685,6 @@
             newIndex = IItemRenderer(event.currentTarget).itemIndex;
         else
             newIndex = dataGroup.getElementIndex(event.currentTarget as IVisualElement);
-
-        mouseDownCancelledFromScroll = false;
-
-        var oldMouseDownIndex:int;

         if (!allowMultipleSelection)
         {
@@ -1709,24 +1705,6 @@
                 pendingSelectionOnMouseUp = true;
                 pendingSelectionCtrlKey = event.ctrlKey;
                 pendingSelectionShiftKey = event.shiftKey;
-
-                if (getStyle("interactionMode") == InteractionMode.TOUCH)
-                {
-                    if (selectedIndex != newIndex)
-                    {
-                        // FIXME (rfrishbe): hack for now.  will fix this later when we revisit the
-                        // "down state" issue for an item renderer.  We need this to fix the case
-                        // where touchDelay == 0 and calling startSelectButtonAfterDelay() assumes
-                        // that mouseDownIndex is already set
-                        oldMouseDownIndex = mouseDownIndex;
-                        mouseDownIndex = newIndex;
-
-                        // visually select the item here
-                        startSelectButtonAfterDelayTimer();
-
-                        mouseDownIndex = oldMouseDownIndex;
-                    }
-                }
             }
             else
                 setSelectedIndex(newIndex, true);
@@ -1740,24 +1718,6 @@
                 pendingSelectionOnMouseUp = true;
                 pendingSelectionShiftKey = event.shiftKey;
                 pendingSelectionCtrlKey = event.ctrlKey;
-
-                if (getStyle("interactionMode") == InteractionMode.TOUCH)
-                {
-                    if (!isItemIndexSelected(newIndex))
-                    {
-                        // FIXME (rfrishbe): hack for now.  will fix this later when we revisit the
-                        // "down state" issue for an item renderer.  We need this to fix the case
-                        // where touchDelay == 0 and calling startSelectButtonAfterDelay() assumes
-                        // that mouseDownIndex is already set
-                        oldMouseDownIndex = mouseDownIndex;
-                        mouseDownIndex = newIndex;
-
-                        // visually select the item here
-                        startSelectButtonAfterDelayTimer();
-
-                        mouseDownIndex = oldMouseDownIndex;
-                    }
-                }
             }
             else
             {
@@ -1772,10 +1732,11 @@
         // listeners may prevent the item from being selected.
         if (!pendingSelectionOnMouseUp)
             validateProperties();
-
+
         mouseDownPoint = event.target.localToGlobal(new Point(event.localX, event.localY));
+        mouseDownObject = event.target as DisplayObject;
         mouseDownIndex = newIndex;
-
+
         var listenForDrag:Boolean = (dragEnabled && getStyle("interactionMode") == InteractionMode.MOUSE && selectedIndices && this.selectedIndices.indexOf(newIndex) != -1);
         // Handle any drag gestures that may have been started
         if (listenForDrag)
@@ -1786,44 +1747,11 @@
             // operation if they move out of the list.
             systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, false, 0, true);
         }
-
+
         if (pendingSelectionOnMouseUp || listenForDrag)
         {
             systemManager.getSandboxRoot().addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, mouseUpHandler, false, 0, true);
             systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, false, 0, true);
-        }
-    }
-
-    /**
-     *  @private
-     *  Starts timer to select the button
-     */
-    private function startSelectButtonAfterDelayTimer():void
-    {
-        // FIXME (rfrishbe): Should we use mouseDownedItemRenderer.getStyle("touchDelay") instead?
-        var touchDelay:int = getStyle("touchDelay");
-
-        if (touchDelay > 0)
-        {
-            mouseDownSelectTimer = new Timer(touchDelay, 1);
-            mouseDownSelectTimer.addEventListener(TimerEvent.TIMER_COMPLETE, mouseDownSelectTimer_timerCompleteHandler);
-            mouseDownSelectTimer.start();
-        }
-        else
-        {
-            mouseDownSelectTimer_timerCompleteHandler();
-        }
-    }
-
-    /**
-     *  @private
-     */
-    private function stopSelectButtonAfterDelayTimer():void
-    {
-        if (mouseDownSelectTimer)
-        {
-            mouseDownSelectTimer.stop();
-            mouseDownSelectTimer = null;
         }
     }

@@ -1871,29 +1799,61 @@
             dispatchEvent(dragEvent);

             // Finally, remove the mouse handlers
-            removeMouseHandlersForDragStart();
-        }
-    }
-
-    private var mouseDownCancelledFromScroll:Boolean = false;
-
-    private function removeMouseHandlersForDragStart():void
+            removeMouseHandlersForDragStart(event);
+        }
+    }
+
+    private function removeMouseHandlersForDragStart(event:Event):void
     {
         // If dragging failed, but we had a pending selection, commit it here
-        if (pendingSelectionOnMouseUp && !DragManager.isDragging && !mouseDownCancelledFromScroll)
-        {
-            if (allowMultipleSelection)
+        if (pendingSelectionOnMouseUp && !DragManager.isDragging)
+        {
+            if (getStyle("interactionMode") == InteractionMode.TOUCH)
             {
-                setSelectedIndices(calculateSelectedIndices(mouseDownIndex, pendingSelectionShiftKey, pendingSelectionCtrlKey), true);
-            }
-            else if (getStyle("interactionMode") == InteractionMode.TOUCH)
-            {
-                setSelectedIndex(mouseDownIndex, true);
+                // if in touch mode, and we didn't start scrolling, let's check to see
+                // whether we moused up on the same item we mouse downed on.
+                // we don't do this check for mouse mode because technically selection happens
+                // on mousedown there.
+
+                // this selectionChange check is basically a "click" check to make sure we moused downed on
+                // the same item that we moused up on.
+                // We could just put it in click handler, but this is a little easier in mouseup
+                // since we've combined some dragging logic and some touch interaction
+                // logic around pendingSelectionOnMouseUp.
+                var selectionChange:Boolean = (event.target == mouseDownObject ||
+                    (mouseDownObject is DisplayObjectContainer &&
+                        DisplayObjectContainer(mouseDownObject).contains(event.target as DisplayObject)));
+
+                // check to make sure they clciked on an item and selection should change
+                if (selectionChange)
+                {
+                    // now handle the cases where the item is being selected or de-selected
+                    // based on allowMultipleSelection
+                    if (allowMultipleSelection)
+                    {
+                        setSelectedIndices(calculateSelectedIndices(mouseDownIndex, pendingSelectionShiftKey, pendingSelectionCtrlKey), true);
+                    }
+                    else
+                    {
+                        setSelectedIndex(mouseDownIndex, true);
+                    }
+                }
             }
             else
             {
-                // Must be deselecting the current selected item.
-                setSelectedIndex(NO_SELECTION, true);
+                // if in mouse interactionMode, we must have finished an attempted drag, so let's
+                // select the item if in multi-select mode or de-select the item
+                // if in single select mode.  See item_mouseDownHandler for how this was setup
+                if (allowMultipleSelection)
+                {
+                    setSelectedIndices(calculateSelectedIndices(mouseDownIndex, pendingSelectionShiftKey, pendingSelectionCtrlKey), true);
+                }
+                else
+                {
+                    // Must be deselecting the current selected item since the only
+                    // reason we are here could be dragging
+                    setSelectedIndex(NO_SELECTION, true);
+                }
             }
         }

@@ -1901,6 +1861,7 @@
         pendingSelectionOnMouseUp = false;

         mouseDownPoint = null;
+        mouseDownObject = null;
         mouseDownIndex = -1;

         systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, false);
@@ -1924,7 +1885,7 @@
      */
     protected function mouseUpHandler(event:Event):void
     {
-        removeMouseHandlersForDragStart();
+        removeMouseHandlersForDragStart(event);
     }

     //--------------------------------------------------------------------------
@@ -2168,21 +2129,8 @@
     private function touchInteractionStartHandler(event:TouchInteractionEvent):void
     {
         // cancel actual selection
-        mouseDownCancelledFromScroll = true;
-
-        // remove visual selection indicator
-        stopSelectButtonAfterDelayTimer();
-
-        // unselect what we thought was selected
-        itemSelected(mouseDownIndex, false);
-
-        // reselect what actually is selected
-        if (selectedIndex != NO_SELECTION)
-        {
-            itemSelected(selectedIndex, true);
-        }
-
         mouseDownIndex = -1;
+        mouseDownObject = null;
         mouseDownPoint = null;
         pendingSelectionOnMouseUp = false;
     }
@@ -2815,24 +2763,6 @@
             (richEditableTextClass && focusObj is richEditableTextClass &&
              focusObj.editable == true))
     }
-
-    /**
-     *  @private
-     */
-    private function mouseDownSelectTimer_timerCompleteHandler(event:TimerEvent = null):void
-    {
-        if (mouseDownIndex != -1)
-        {
-            // select item visually now
-            itemSelected(mouseDownIndex, true);
-
-            // deselect old selected item
-            if (selectedIndex != NO_SELECTION)
-            {
-                itemSelected(selectedIndex, false);
-            }
-        }
-    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8131
Author:   chaase@adobe.com
Date:     2009-06-23T23:08:25.193334Z

Log Message:
-----------
Fix for 2 gumbo_priority bugs. One was a miscalculation of a Parallel effect's duration when it had zero-duration child effects, causing a problem when seeking into that parallel effect. The other was a fix to the easing model for transform effects. Now a transform effect will handle easing through its internal keyframes, preserving the behavior specified by the caller (or by the default easing behavior).

QE Notes: None. Behavior for AnimateTransform should be as before, although the way easing is applied to the subclasses has changed (and is now correct)
Doc Notes: None
Bugs: sdk-21477, sdk-21422
Reviewer: Jason
Tests: checkintests, Mustella spark/effects

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Scale3D.as
+++ frameworks/projects/spark/src/spark/effects/Scale3D.as
@@ -86,6 +86,7 @@
         super(target);
         applyLocalProjection = true;
         applyChangesPostLayout = true;
+        transformEffectSubclass = true;
     }

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


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

--- frameworks/projects/spark/src/spark/primitives/Rect.as
+++ frameworks/projects/spark/src/spark/primitives/Rect.as
@@ -30,6 +30,11 @@
  *
  *  @includeExamples examples/RectExample.mxml
  *
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class Rect extends FilledElement
 {
@@ -43,6 +48,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function Rect()
     {
@@ -65,6 +75,11 @@

     /**
      *  The corner radius to use along the x axis.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get radiusX():Number
     {
@@ -93,6 +108,11 @@

     /**
      *  The corner radius to use along the y axis.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get radiusY():Number
     {
@@ -119,6 +139,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function drawElement(g:Graphics):void
     {


rename DiffuseShaderPart.getDiffuse() to DiffuseShaderPart.getDiffuseColor() for consistency

--- src/aerys/minko/render/shader/part/DiffuseShaderPart.as
+++ src/aerys/minko/render/shader/part/DiffuseShaderPart.as
@@ -20,7 +20,7 @@
 			super(main);
 		}

-		public function getDiffuse() : SFloat
+		public function getDiffuseColor() : SFloat
 		{
 			var diffuseColor : SFloat	= null;


Remove whitespace

Remove whitespace


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

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

 package mx.collections
 {


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

--- frameworks/projects/spark/src/spark/components/VSlider.as
+++ frameworks/projects/spark/src/spark/components/VSlider.as
@@ -11,6 +11,11 @@

 package flex.component
 {
+
+import flash.geom.Point;
+
+import flex.intf.ILayoutItem;
+import flex.layout.LayoutItemFactory;

 /**
  *  VSlider
@@ -40,14 +45,29 @@
     //--------------------------------------------------------------------------

     /**
-     * The size of the track on an VSlider equals the height of the track.
+     *  The size of the track on an VSlider equals the height
+     *  of the track.
      */
     override protected function get trackSize():Number
-    {
+        {
         if (track)
-            return track.height;
+        {
+            var trackLItem:ILayoutItem =
+                LayoutItemFactory.getLayoutItemFor(track);
+            return trackLItem.actualSize.y;
+        }
         else
            return 0;
+    }
+
+    /**
+     *  The size of the thumb is equal to the height of the thumb.
+     */
+    override protected function calculateThumbSize():Number
+    {
+        var thumbLItem:ILayoutItem =
+            LayoutItemFactory.getLayoutItemFor(thumb);
+        return thumbLItem.actualSize.y;
     }

     //--------------------------------------------------------------------------
@@ -57,35 +77,76 @@
     //--------------------------------------------------------------------------

     /**
-     *  Position the thumb button according to the given thumbPos parameter,
-     *  relative to the current y location of the track in the VSlider control.
+     *  Position the thumb button according to the given thumbPos
+     *  parameter, relative to the current y location of the track
+     *  in the VSlider control.
      *
-     *  @param thumbPos A number representing the new position of the thumb
-     *  button in the control.
+     *  @param thumbPos A number representing the new position of
+     *  the thumb button in the control.
      */
     override protected function positionThumb(thumbPos:Number):void
     {
         if (thumb)
         {
-            var trackPos:Number = track ? track.y : 0;
-            thumb.y = trackPos + track.height - thumbPos;
+            var thumbLItem:ILayoutItem =
+                LayoutItemFactory.getLayoutItemFor(thumb);
+
+            var trackPos:Number = 0;
+            var trackLen:Number = 0;
+
+            if (track)
+            {
+                var trackLItem:ILayoutItem =
+                    LayoutItemFactory.getLayoutItemFor(track);
+
+                trackLen = trackLItem.actualSize.y;
+                trackPos = trackLItem.actualPosition.y;
+            }
+
+            thumbLItem.setActualPosition(thumbLItem.actualPosition.x,
+                                         trackPos + trackLen - thumbPos
+                                         - thumbLItem.actualSize.y);
         }
     }

     /**
-     *  The position of the thumb on an HSlider is equal to the track
-     *  height minus the difference between localY and the track
-     *  position. This is because we want the thumb to start
-     *  at the bottom by default.
+     *  The position of the thumb on a VSlider is equal to the
+     *  track height subtracted by the y position of the thumb
+     *  (relative to the track) and the height of the thumb.
+     *  This is because we want the thumb to start at the
+     *  bottom by default.
      *
-     *  @param localX The x position relative to the HSlider control
-     *  @param localY The y position relative to the HSlider control
+     *  @param localX The x position relative to the track
+     *  @param localY The y position relative to the track
      */
     override protected function pointToPosition(localX:Number,
                                                 localY:Number):Number
     {
-        return track.height - (localY - track.y);
+        var trackLItem:ILayoutItem =
+            LayoutItemFactory.getLayoutItemFor(track);
+        var trackLen:Number = trackLItem.actualSize.y;
+
+        var thumbLItem:ILayoutItem =
+            LayoutItemFactory.getLayoutItemFor(thumb);
+        var thumbH:Number = thumbLItem.actualSize.y;
+
+        return trackLen - localY - thumbH;
     }
+
+    /**
+     *  We adjust the position to center the thumb when clicking
+     *  on the track.
+     */
+    override protected function pointClickToPosition(localX:Number,
+                                                     localY:Number):Number
+    {
+        var thumbLItem:ILayoutItem =
+            LayoutItemFactory.getLayoutItemFor(thumb);
+        var thumbH:Number = thumbLItem.actualSize.y;
+
+        return pointToPosition(localX, localY) + (thumbH / 2);
+    }
+
 }

-}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3576
Author:   mhorn@adobe.com
Date:     2008-10-10T20:28:57.093323Z

Log Message:
-----------
more asdoc updates

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Graphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/PathSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/QuadraticBezierSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapResizeMode.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/Graphic.as
+++ frameworks/projects/spark/src/spark/primitives/Graphic.as
@@ -45,12 +45,20 @@
 /**
  *  The Graphic control displays a set of graphic drawing commands.
  *
- *
The Graphic class is the root tag for all graphic elements. You add a series of
- *  element tags such as <mx:Rect>, <mx:Path>, and <mx:Ellipse> to the Graphic's
+ *
The Graphic class is the root tag for all graphic elements.
+ *  This tag is the root for any FXG document. It cannot appear anywhere else in an FXG
+ *  document.

+ *
+ *
You add a series of
+ *  element tags such as <Rect>, <Path>, and <Ellipse> to the Graphic's
  *  elements Array to define the contents of the graphic.

  *
  *
Graphic controls do not have backgrounds or borders
  *  and cannot take focus.

+ *
+ *
The Graphic element can optionally contain a <Group> element.

+ *
+ *  @see mx.graphics.Group
  *
  *  @mxml
  *
@@ -104,44 +112,56 @@
     //
     //--------------------------------------------------------------------------

- 	//----------------------------------
-	//  viewHeight
-	//----------------------------------
-	private var _viewHeight:Number;
-
-	public function get viewHeight():Number
-	{
-		return _viewHeight;
-	}
-
-	public function set viewHeight(value:Number):void
-	{
-		if (value != _viewHeight)
-		{
-			_viewHeight = value;
-			invalidateSize();
-		}
-	}
-
-	//----------------------------------
-	//  viewWidth
-	//----------------------------------
-	private var _viewWidth:Number;
-
-	public function get viewWidth():Number
-	{
-		return _viewWidth;
-	}
-
-	public function set viewWidth(value:Number):void
-	{
-		if (value != _viewWidth)
-		{
-			_viewWidth = value;
-			invalidateSize();
-		}
-
-	}
+    //----------------------------------
+    //  viewHeight
+    //----------------------------------
+    private var _viewHeight:Number;
+
+    /**
+     *
+     */
+    public function get viewHeight():Number
+    {
+        return _viewHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set viewHeight(value:Number):void
+    {
+        if (value != _viewHeight)
+        {
+            _viewHeight = value;
+            invalidateSize();
+        }
+    }
+
+    //----------------------------------
+    //  viewWidth
+    //----------------------------------
+    private var _viewWidth:Number;
+
+    /**
+     *
+     */
+    public function get viewWidth():Number
+    {
+        return _viewWidth;
+    }
+
+    /**
+     *  @private
+     */
+    public function set viewWidth(value:Number):void
+    {
+        if (value != _viewWidth)
+        {
+            _viewWidth = value;
+            invalidateSize();
+        }
+
+    }

     //--------------------------------------------------------------------------
     //
@@ -149,17 +169,17 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @inheritDoc
-	 */
-	override protected function measure():void
-	{
-		super.measure();
-
-		if (!isNaN(viewWidth))
-			measuredMinWidth = measuredWidth = viewWidth;
-		if (!isNaN(viewHeight))
-			measuredMinHeight = measuredHeight = viewHeight;
-	}
+    /**
+     *  @inheritDoc
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        if (!isNaN(viewWidth))
+            measuredMinWidth = measuredWidth = viewWidth;
+        if (!isNaN(viewHeight))
+            measuredMinHeight = measuredHeight = viewHeight;
+    }
 }
 }


Fixed parsing of SWC catalog: duplicated dependencies, missing external definitions.

--- src/com/epolyakov/linkreportanalyzer/data/LinkReport.as
+++ src/com/epolyakov/linkreportanalyzer/data/LinkReport.as
@@ -59,40 +59,41 @@
 			var tempPrerequisites:Object = {};

 			// Fill definitions and temp dependencies
+			var defId:String;
 			var ns:Namespace = _source.namespace("");
-
-			// http://code.google.com/p/redtamarin/wiki/SWC
-
 			var scriptName:Object = ns ? new QName(ns, "script") : "script";
 			var defName:Object = ns ? new QName(ns, "def") : "def";
 			var depName:Object = ns ? new QName(ns, "dep") : "dep";
 			var preName:Object = ns ? new QName(ns, "pre") : "pre";
+			var extName:Object = ns ? new QName(ns, "ext") : "ext";
+			var extDefName:Object = ns ? new QName(ns, "external-defs") : "external-defs";

 			for each (var scriptXML:XML in _source.descendants(scriptName))
 			{
 				var defXML:XML = scriptXML[defName][0];
 				if (defXML)
 				{
-					var definition:Definition = new Definition();
-					definition.id = defXML.@id;
-					definition.script = scriptXML.@name;
-					definition.modified = scriptXML.@mod;
-					definition.size = scriptXML.@size;
-					definition.optimizedSize = scriptXML.@optimizedsize;
-					definition.name = definition.id.slice(definition.id.lastIndexOf(":") + 1);
-
+					var definition:Definition = newCompiledDefinition(defXML, scriptXML);
 					var v:Vector.<String>;

 					v = tempDependencies[definition.id] = new <String>[];
 					for each (var depXML:XML in scriptXML[depName])
 					{
-						v.push(depXML.@id);
+						var depId:String = depXML.@id;
+						if (v.indexOf(depId) < 0)
+						{
+							v.push(depId);
+						}
 					}

 					v = tempPrerequisites[definition.id] = new <String>[];
 					for each (var preXML:XML in scriptXML[preName])
 					{
-						v.push(preXML.@id);
+						var preId:String = preXML.@id;
+						if (v.indexOf(preId) < 0)
+						{
+							v.push(preId);
+						}
 					}

 					_lookup[definition.id] = definition;
@@ -100,34 +101,55 @@
 			}

 			// Create external definitions
-			for each (var extXML:XML in _source["external-defs"]["ext"])
-			{
-				definition = _lookup[extXML.@id];
+			for each (var extXML:XML in _source[extDefName][extName])
+			{
+				definition = _lookup[String(extXML.@id)];
 				if (definition == null)
 				{
-					definition = new Definition();
-					definition.id = extXML.@id;
-					definition.name = definition.id.slice(definition.id.lastIndexOf(":") + 1);
+					definition = newExternalDefinition(extXML.@id);
 					_lookup[definition.id] = definition;
 				}
 				definition.isExternal = true;
+			}
+
+			// Create externals for missing definitions
+			var missingDefinitions:Vector.<Definition> = new <Definition>[];
+			for each (definition in _lookup)
+			{
+				for each (defId in tempDependencies[definition.id])
+				{
+					if (!_lookup[defId])
+					{
+						missingDefinitions.push(newExternalDefinition(defId));
+					}
+				}
+				for each (defId in tempPrerequisites[definition.id])
+				{
+					if (!_lookup[defId])
+					{
+						missingDefinitions.push(newExternalDefinition(defId));
+					}
+				}
+			}
+			for each (definition in missingDefinitions)
+			{
+				_lookup[definition.id] = definition;
 			}

 			// Fill dependencies and prerequisites
 			for each (definition in _lookup)
 			{
-				var id:String;
-				for each (id in tempDependencies[definition.id])
-				{
-					var dependency:Definition = _lookup[id];
+				for each (defId in tempDependencies[definition.id])
+				{
+					var dependency:Definition = _lookup[defId];
 					if (dependency)
 					{
 						definition.dependencies.push(dependency);
 					}
 				}
-				for each (id in tempPrerequisites[definition.id])
-				{
-					var prerequisite:Definition = _lookup[id];
+				for each (defId in tempPrerequisites[definition.id])
+				{
+					var prerequisite:Definition = _lookup[defId];
 					if (prerequisite)
 					{
 						definition.prerequisites.push(prerequisite);
@@ -283,5 +305,26 @@
 				_maxLevel = definition.level;
 			}
 		}
+
+		private function newCompiledDefinition(defXML:XML, scriptXML:XML):Definition
+		{
+			var d:Definition = new Definition();
+			d.id = defXML.@id;
+			d.script = scriptXML.@name;
+			d.modified = scriptXML.@mod;
+			d.size = scriptXML.@size;
+			d.optimizedSize = scriptXML.@optimizedsize;
+			d.name = d.id.slice(d.id.lastIndexOf(":") + 1);
+			return d;
+		}
+
+		private function newExternalDefinition(id:String):Definition
+		{
+			var d:Definition = new Definition();
+			d.id = id;
+			d.name = d.id.slice(d.id.lastIndexOf(":") + 1);
+			d.isExternal = true;
+			return d;
+		}
 	}
 }


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

--- frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
+++ frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.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.collections
 {


Fence enable/disable autoUpdate on collections

--- as3/xobjas3/src/com/rpath/xobj/XObjXMLDecoder.as
+++ as3/xobjas3/src/com/rpath/xobj/XObjXMLDecoder.as
@@ -397,7 +397,13 @@
         {
             isCollection = true;
             assign = assignToArray;
-            (result as ArrayCollection).disableAutoUpdate();
+            try
+            {
+                result.disableAutoUpdate();
+            }
+            catch (e:ReferenceError)
+            {
+            }
         }
         else
             assign = assignToProperty;
@@ -585,7 +591,13 @@
         // and turn on change events again once we're done
         if (isCollection)
         {
-            (result as ArrayCollection).enableAutoUpdate();
+            try
+            {
+                result.enableAutoUpdate();
+            }
+            catch (e:ReferenceError)
+            {
+            }
         }

         // Cycle through the attributes


Transferred from the Adobe Open Source Subversion Repository

Revision: 14450
Author:   deeptika@adobe.com
Date:     2010-02-26T13:09:00.839649Z

Log Message:
-----------
Merging mirroring changes from revision 14446 in 4.x branch

QE notes: Please do some sanity testing around axis labels
Doc notes:
Bugs:
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/charts/AxisRenderer.as</path>

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

--- frameworks/projects/charts/src/mx/charts/AxisRenderer.as
+++ frameworks/projects/charts/src/mx/charts/AxisRenderer.as
@@ -32,12 +32,15 @@
 import mx.charts.chartClasses.IAxisRenderer;
 import mx.charts.chartClasses.InstanceCache;
 import mx.charts.styles.HaloDefaults;
+import mx.controls.Label;
 import mx.core.ContextualClassFactory;
 import mx.core.IDataRenderer;
 import mx.core.IFactory;
 import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModuleFactory;
 import mx.core.IUIComponent;
 import mx.core.IUITextField;
+import mx.core.IVisualElement;
 import mx.core.UIComponent;
 import mx.core.UITextField;
 import mx.core.UITextFormat;
@@ -50,7 +53,6 @@
 import mx.resources.ResourceManager;
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.ISimpleStyleClient;
-import mx.core.IFlexModuleFactory;

 use namespace mx_internal;

@@ -422,9 +424,9 @@
     {
         super();

-        textFieldFactory =  new ContextualClassFactory(UITextField, moduleFactory);
-
-        _labelCache = new InstanceCache(UITextField, this);
+        textFieldFactory =  new ContextualClassFactory(Label, moduleFactory);
+
+        _labelCache = new InstanceCache(Label, this);

        	_labelCache.discard = true;
         _labelCache.remove = true;
@@ -1238,17 +1240,17 @@
     {
         super.commitProperties();

-        if (!labelRenderer)
-	  {
-		var textFieldClass:Class = getStyle('textFieldClass');
-
-		if(textFieldClass != null)
-			textFieldFactory = new ContextualClassFactory(textFieldClass, moduleFactory);
-		else
-			textFieldFactory = new ContextualClassFactory(UITextField, moduleFactory);
-
-		_labelCache.factory = textFieldFactory;
-	  }
+		if (!labelRenderer)
+		{
+			/*var textFieldClass:Class = getStyle('textFieldClass');
+
+			if(textFieldClass != null)
+				textFieldFactory = new ContextualClassFactory(textFieldClass, moduleFactory);
+			else
+				*/textFieldFactory = new ContextualClassFactory(Label, moduleFactory);
+
+			_labelCache.factory = textFieldFactory;
+		}

         setupMouseDispatching();
     }
@@ -2894,7 +2896,7 @@
             if (!_labelRenderer)
             {
                 _labelCache.properties =
-                    { embedFonts: embedFonts, selectable: false, styleName: this, autoSize: "left" };
+                    { selectable: false, styleName: this};
             }
             else
             {
@@ -3058,6 +3060,7 @@

                         ldi.instance.y = labelY +
                                          ldi.height * alignOffset * scale * c;
+
                     }

                     labelBottom = labelY - _maxRotatedLabelHeight;
@@ -3069,23 +3072,22 @@
                 s = Math.sin(Math.abs(_labelPlacement.rotation));

                 r = -_labelPlacement.rotation / Math.PI * 180;
-
                 labelY = baseline + labelGap;

                 for (i = 0; i < n; i++)
                 {
                     ldi = _labels[i];
-
-                    ldi.instance.rotation = r;
-
+
+					ldi.instance.rotation = r;
+
                     ldi.instance.x = _gutters.left +
                                      axisWidth * ldi.position -
                                      ldi.width * scale * c -
                                      ldi.height * alignOffset * scale * s;
-
-                    ldi.instance.y = labelY +
-                                     ldi.width * scale * s -
-                                     ldi.height * alignOffset * scale * c;
+
+					ldi.instance.y = labelY +
+									 ldi.width * scale * s -
+									 ldi.height * alignOffset * scale * c;
                 }

                 labelBottom = labelY + _maxRotatedLabelHeight;
@@ -3227,14 +3229,12 @@
             var n:int = _labels.length;
             if (!_labelRenderer)
             {
-                _labelCache.format = determineTextFormatFromStyles();
                 for (i = 0; i < n; i++)
                 {
                     labelData = _labels[i];
                     labelData.instance = _labelCache.instances[visCount++];
-
-                    (labelData.instance as IUITextField).htmlText =
-                        labelData.text;
+					var label:Label = labelData.instance as Label;
+                    label.text = labelData.text;

                     labelData.instance.width = labelData.width;
                     labelData.instance.height = labelData.height;
@@ -3650,7 +3650,7 @@
                 {
                     measuringField.htmlText = labelValues[i];

-                    labelData.width = measuringField.width;
+                    labelData.width = measuringField.width + 5;
                     labelData.height = measuringField.height;
                 }
                 else
@@ -3660,7 +3660,7 @@
                     if (ilcMeasuringLabel)
                         ilcMeasuringLabel.validateSize(true);

-                    labelData.width = measuringLabel.measuredWidth;
+                    labelData.width = measuringLabel.measuredWidth + 5;
                     labelData.height = measuringLabel.measuredHeight;
                 }

@@ -3690,7 +3690,7 @@
                 {
                     measuringField.htmlText = labelValues[i];

-                    labelData.width = measuringField.width;
+                    labelData.width = measuringField.width + 5;
                     labelData.height = measuringField.height;
                 }
                 else
@@ -3700,7 +3700,7 @@
                     if (ilcMeasuringLabel)
                         ilcMeasuringLabel.validateSize(true);

-                    labelData.width = measuringLabel.measuredWidth;
+                    labelData.width = measuringLabel.measuredWidth + 5;
                     labelData.height = measuringLabel.measuredHeight;
                 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5340
Author:   gosmith@adobe.com
Date:     2009-03-17T01:56:28.362863Z

Log Message:
-----------
Measurement is now consistent with rendering for Halo components using TLF.

If a Halo component is using a UITLFTextField to render its text (because its textFieldClass style is the class mx.core.UITLFTextField), it now measures itself using an offscreen TLFTextField. Previously it was rendering with a UITLFTextField but measuring with a TextField, which was inconsistent.

This required adding a new useTLF:Boolean property to UITextFormat so that the format knows whether it is for a TextField or a TLFTextField.

There is one offscreen TLFTextField per module factory, managed by TextFieldFactory, just like for offscreen TextFields. I've added a new method, createTLFTextField(), to ITextFieldFactory. Its return type is Object rather than TLFTextField to avoid linking in TLFTextField, and therefore much of TLF, into Halo apps unless it is being used by setting textFieldClass.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Deepa

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

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -9752,6 +9752,9 @@
             textFormat.gridFitType = _inheritingStyles.fontGridFitType;
             textFormat.sharpness = _inheritingStyles.fontSharpness;
             textFormat.thickness = _inheritingStyles.fontThickness;
+
+            textFormat.useTLF =
+				getTextFieldClassName() == "mx.core::UITLFTextField";

             cachedTextFormat = textFormat;
         }
@@ -10935,29 +10938,52 @@
     protected function createInFontContext(classObj:Class):Object
     {
         hasFontContextBeenSaved = true;
-
-        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
-            classObj = getStyle("textFieldClass");
-
+
         var fontName:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
         var fontWeight:String = getStyle("fontWeight");
         var fontStyle:String = getStyle("fontStyle");
         var bold:Boolean = (fontWeight == "bold");
         var italic:Boolean = (fontStyle == "italic");

-        // save for hasFontContextChanged()
+        // Save for hasFontContextChanged().
         oldEmbeddedFontContext = getFontContext(fontName, bold, italic);
-
-        // not in font registry so create in this font context.
-        var obj:Object = createInModuleContext(oldEmbeddedFontContext ?
-                                               oldEmbeddedFontContext : moduleFactory,
-                                               getQualifiedClassName(classObj));
+
+        var moduleContext:IFlexModuleFactory = oldEmbeddedFontContext ?
+                                               oldEmbeddedFontContext :
+                                               moduleFactory;
+
+		var className:String = getQualifiedClassName(classObj);
+
+		// If the caller requests a UITextField,
+		// we may actually return a UITLFTextField,
+		// depending on the version number
+		// and the value of the textFieldClass style.
+		if (className == "mx.core::UITextField")
+			className = getTextFieldClassName();
+
+        // Not in font registry, so create in this font context.
+        var obj:Object = createInModuleContext(moduleContext, className);
+
         if (obj == null)
             obj = new classObj;

         return obj;
     }

+    /**
+	 *  @private
+	 *  Returns either "mx.core::UITextField" or "mx.core::UITLFTextField",
+	 *  based on the version number and the textFieldClass style.
+	 */
+	private function getTextFieldClassName():String
+    {
+    	var c:Class = getStyle("textFieldClass");
+
+		if (!c || FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0)
+    		return "mx.core::UITextField";
+
+    	return getQualifiedClassName(c);
+    }

     /**
      *  Creates the object using a given moduleFactory.


Transferred from the Adobe Open Source Subversion Repository

Revision: 15923
Author:   chaase@adobe.com
Date:     2010-05-06T18:05:24.751600Z

Log Message:
-----------
Initial checkin of "Transition Interruption" feature. Set Transition.interruptionBehavior="stop" to get the new behavior, where interrupting transitions start from where the previous transition is at, rather than end()'ing the previous transition first. The default behavior is the same as it always was; transitionBehavior="end" is the default property, and that uses the previous behavior of ending the previous Transition.
New API: Transition.interruptionBehavior, mx.states.InterruptionBehavior

QE notes: Check out the spec for the details on the new API
Doc notes: none
Bugs: none
Reviewer: Jason
Tests run: checkintests, Mustella (mx/effects, spark/effects)
Is noteworthy for integration: Yes - feature requested by downstream teams

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/Transition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/InterruptionBehavior.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -10068,6 +10068,10 @@
         return (this is IStateClient2 && (states.length > 0)) ? states[0].name : null;
     }

+    // Used by commitCurrentState() to avoid hard-linking against Effect
+    private static var effectType:Class;
+    private static var effectLoaded:Boolean = false;
+
     /**
      *  @private
      *  Commit a pending current state change.
@@ -10082,23 +10086,53 @@
         var event:StateChangeEvent;
         var oldState:String = _currentState ? _currentState : "";
         var destination:State = getState(requestedCurrentState);
+        var prevTransitionEffect:Object;
+        var tmpPropertyChanges:Array;
+
+        // First, make sure we've loaded the Effect class - some of the logic
+        // below requires it
+        if (nextTransition && !effectLoaded)
+        {
+            effectLoaded = true;
+            if (ApplicationDomain.currentDomain.hasDefinition("mx.effects.Effect"))
+                effectType = Class(ApplicationDomain.currentDomain.
+                    getDefinition("mx.effects.Effect"));
+        }

         // Stop any transition that may still be playing
         var prevTransitionFraction:Number;
         if (_currentTransition)
         {
-            if (_currentTransition.autoReverse &&
-                transitionFromState == requestedCurrentState &&
-                transitionToState == _currentState)
+            // 'stop' interruptions take precedence over autoReverse behavior
+            if (nextTransition && _currentTransition.interruptionBehavior == "stop")
             {
-                if (_currentTransition.effect.duration == 0)
-                    prevTransitionFraction = 0;
-                else
-                    prevTransitionFraction =
-                        _currentTransition.effect.playheadTime /
-                        getTotalDuration(_currentTransition.effect);
+                prevTransitionEffect = _currentTransition.effect;
+                prevTransitionEffect.transitionInterruption = true;
+                // This logic stops the effect from applying the end values
+                // so that we can capture the interrupted values correctly
+                // in captureStartValues() below. Save the values in the
+                // tmp variable because stop() clears out propertyChangesArray
+                // from the effect.
+                tmpPropertyChanges = prevTransitionEffect.propertyChangesArray;
+                prevTransitionEffect.applyEndValuesWhenDone = false;
+                prevTransitionEffect.stop();
+                prevTransitionEffect.applyEndValuesWhenDone = true;
             }
-            _currentTransition.effect.end();
+            else
+            {
+                if (_currentTransition.autoReverse &&
+                    transitionFromState == requestedCurrentState &&
+                    transitionToState == _currentState)
+                {
+                    if (_currentTransition.effect.duration == 0)
+                        prevTransitionFraction = 0;
+                    else
+                        prevTransitionFraction =
+                            _currentTransition.effect.playheadTime /
+                            getTotalDuration(_currentTransition.effect);
+                }
+                _currentTransition.effect.end();
+            }
         }

         // Initialize the state we are going to.
@@ -10107,7 +10141,15 @@
         // Capture transition start values
         if (nextTransition)
             nextTransition.effect.captureStartValues();
-
+
+        // Now that we've captured the start values, apply the end values of
+        // the effect as normal. This makes sure that objects unaffected by the
+        // next transition have their correct end values from the previous
+        // transition
+        if (tmpPropertyChanges)
+            prevTransitionEffect.applyEndValues(tmpPropertyChanges,
+                prevTransitionEffect.targets);
+
         // Dispatch currentStateChanging event
         if (hasEventListener(StateChangeEvent.CURRENT_STATE_CHANGING))
         {
@@ -10154,6 +10196,11 @@
             _currentTransition = nextTransition;
             transitionFromState = oldState;
             transitionToState = _currentState;
+            // Tell the effect whether it is running in interruption mode, in which
+            // case it should grab values from the states instead of from current
+            // property values
+            Object(nextTransition.effect).transitionInterruption =
+                (prevTransitionEffect != null);
             nextTransition.effect.addEventListener(EffectEvent.EFFECT_END,
                 transition_effectEndHandler);
             nextTransition.effect.play();


Transferred from the Adobe Open Source Subversion Repository

Revision: 12126
Author:   klin@adobe.com
Date:     2009-11-23T23:41:51.154822Z

Log Message:
-----------
Recommitting 12078. Fixed a bug in the check-in test that was breaking sometimes.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/ScrollBarTestScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>

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

--- frameworks/projects/framework/src/mx/events/FlexEvent.as
+++ frameworks/projects/framework/src/mx/events/FlexEvent.as
@@ -148,6 +148,62 @@
     public static const BUTTON_DOWN:String = "buttonDown";

     /**
+     *  The FlexEvent.CHANGE_END constant defines the value of the
+     *  type property of the event object for a changeEnd event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
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.

+     *
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.

+     *

+     *
+     *  @eventType changeEnd
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static const CHANGE_END:String = "changeEnd";
+
+    /**
+     *  The FlexEvent.CHANGE_START constant defines the value of the
+     *  type property of the event object for a changeStart event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
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.

+     *
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.

+     *

+     *
+     *  @eventType changeStart
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static const CHANGE_START:String = "changeStart";
+
+    /**
      *  The FlexEvent.CHANGING constant defines the value of the
      *  type property of the event object for a changing event.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 16334
Author:   clucier@adobe.com
Date:     2010-05-27T02:31:28.322720Z

Log Message:
-----------
Preliminary Spark Image and BitmapImage enhancement feature work.  Also included with this checkin is the ability for BitmapImage and s:Image instances to share an image cache.  Queueing is next up to be checked in.

QE notes: Proceed with testing, though PARB related renames are pending. Not considered code complete.
Doc notes: Should begin reviewing new classes in preparation for doc'ing.
Bugs: None
Reviewer: Ryan
Tests run: Checkin, cyclone server Mustella tests.
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/contentLoader/ContentRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/LinkedList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ImageLoadingSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/contentLoader/ContentCache.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/contentLoader</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ImageSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Image.png</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/LinkedListNode.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapSmoothingQuality.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/contentLoader/LoaderInvalidationEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/contentLoader/IContentLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mx-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>

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

--- frameworks/projects/spark/src/spark/core/ContentCache.as
+++ frameworks/projects/spark/src/spark/core/ContentCache.as
@@ -0,0 +1,455 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.core.contentLoader
+{
+
+import mx.core.mx_internal;
+import mx.utils.LinkedList;
+import mx.utils.LinkedListNode;
+
+import flash.display.Loader;
+import flash.display.LoaderInfo;
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.net.URLRequest;
+import flash.system.LoaderContext;
+import flash.utils.Dictionary;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when a cache entry is invalidated, generally this
+ *  occurs when the entry is determined to be untrusted while one or
+ *  more outstanding load requests are active for a given cache entry.
+ *  This mechanism allows any outstanding content requests to be reset
+ *  due to the fact that the cache entry has been deemed 'unshareable'.
+ *  Each content request notified then attempts instead re-requests the
+ *  asset.
+ *
+ *  @eventType spark.core.contentLoader.LoaderInvalidationEvent
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="invalidateLoader", type="spark.core.contentLoader.LoaderInvalidationEvent")]
+
+/**
+ *  Provides a caching and queuing image content loader suitable for using
+ *  a shared image cache for the BitmapImage and spark Image components.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4.5
+ */
+public class ContentCache extends EventDispatcher implements IContentLoader
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function ContentCache():void
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Value used to mark cached URLs that are detected as being from an
+     *  untrusted source (meaning they will no longer be shareable).
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4.5
+     */
+    protected static const UNTRUSTED:String = "untrusted";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Map of source to CacheEntryNode.
+     */
+    protected var cachedData:Dictionary = new Dictionary();
+
+    /**
+     *  @private
+     *  Ordered (MRU) list of CacheEntryNode instances.
+     */
+    protected var cacheEntries:LinkedList = new LinkedList();
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  enableQueuing
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _enableQueuing:Boolean;
+
+    /**
+     *  Enables queuing behavior and functionality.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function get enableQueuing():Boolean
+    {
+        return _enableQueuing;
+    }
+
+    /**
+     *  @private
+     */
+    public function set enableQueuing(value:Boolean):void
+    {
+        if (value != _enableQueuing)
+            _enableQueuing = value;
+    }
+
+    //----------------------------------
+    //  numEntries
+    //----------------------------------
+
+    /**
+     *  Count of active/in-use cache entries.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function get numEntries():Number
+    {
+        return cacheEntries.length;
+    }
+
+    //----------------------------------
+    //  maxActiveRequests
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _maxActiveRequests:Number = 2;
+
+    /**
+     *  Maximum simultaneous active requests when queuing is
+     *  enabled.
+     *
+     *  @default 2
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function get maxActiveRequests():Number
+    {
+        return _maxActiveRequests;
+    }
+
+    /**
+     *  @private
+     */
+    public function set maxActiveRequests(value:Number):void
+    {
+        if (value != _maxActiveRequests)
+            _maxActiveRequests = value;
+    }
+
+    //----------------------------------
+    //  maximumEntries
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _maxEntries:Number = 100;
+
+    /**
+     *  Maximum size of MRU based cache.  When numEntries exceeds
+     *  maxEntries the least recently used are pruned to fit.
+     *
+     *  @default 100
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function get maxEntries():Number
+    {
+        return _maxEntries;
+    }
+
+    /**
+     *  @private
+     */
+    public function set maxEntries(value:Number):void
+    {
+        if (value != _maxEntries)
+        {
+            _maxEntries = value;
+            enforceMaximumEntries();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy spark.core.contentLoader.IContentLoader#load
+     */
+    public function load(source:Object, contentGrouping:String=null):ContentRequest
+    {
+        var cacheEntry:CacheEntryNode = cachedData[source];
+        var contentRequest:ContentRequest;
+
+        if (!cacheEntry || cacheEntry.value == UNTRUSTED)
+        {
+            // No previously cached entry or the entry is marked as
+            // unshareable (untrusted).
+            var loader:Loader = new Loader();
+            var loaderContext:LoaderContext = new LoaderContext();
+            loaderContext.checkPolicyFile = true;
+
+			// Listen for completion so we can manage our cache entry upon
+			// failure or if the loaded data is deemed unshareable.
+			loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler,
+				false, 0, true);
+
+            loader.load(new URLRequest(source as String), loaderContext);
+            contentRequest = new ContentRequest(this, loader.contentLoaderInfo);
+
+            // Now cache our new loader info.
+            if (!cacheEntry)
+                addEntry(source, loader.contentLoaderInfo);
+        }
+        else
+        {
+            // Found a valid cache entry. Return a content request proxy and
+            // promote in our MRU list.
+            contentRequest = new ContentRequest(this, cacheEntry.value as LoaderInfo, true);
+            var node:LinkedListNode = cacheEntries.remove(cacheEntry);
+            cacheEntries.unshift(node);
+        }
+
+        return contentRequest;
+    }
+
+    /**
+     *  @private
+     *  Invalidation method to invalidate entire cache.
+     */
+    mx_internal function invalidateAll():void
+    {
+        removeAll();
+    }
+
+    /**
+     *  Invalidation method to invalidate single cache entry.
+     *  @private
+     */
+	mx_internal function invalidateEntry(source:Object):void
+    {
+        removeEntry(source);
+    }
+
+    /**
+     *  Obtain an entry for the given key if one exists.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function getEntry(source:Object):*
+    {
+        var cacheEntry:CacheEntryNode = cachedData[source];
+        return cacheEntry ? cacheEntry.value : null;
+    }
+
+    /**
+     *  Resets our cache content to initial empty state.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function removeAll():void
+    {
+        cachedData = new Dictionary();
+        cacheEntries = new LinkedList();
+    }
+
+    /**
+     *  Remove specific entry from cache.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function removeEntry(source:Object):void
+    {
+        var node:CacheEntryNode = cachedData[source];
+        if (node)
+        {
+            cacheEntries.remove(node);
+            delete cachedData[source];
+        }
+    }
+
+    /**
+     *  Adds new entry to cache (or replaces existing entry).
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function addEntry(source:Object, value:*):void
+    {
+        var node:CacheEntryNode = cachedData[source];
+
+        if (node)
+            cacheEntries.remove(node);
+
+        node = new CacheEntryNode(source, value);
+        cachedData[source] = node;
+        cacheEntries.unshift(node);
+        enforceMaximumEntries();
+    }
+
+    /**
+     *  Promotes a content grouping to the head of the loading queue.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function prioritizeContentGrouping(contentGrouping:String):void
+    {
+        // TODO (crl)
+    }
+
+    /**
+     *  If size of our cache exceeds our maximum, we release the least
+     *  recently used entries necessary to meet our limit.
+     *
+     *  @private
+     */
+    mx_internal function enforceMaximumEntries():void
+    {
+        if (_maxEntries <= 0 || cacheEntries.length <= _maxEntries)
+            return;
+
+        while (cacheEntries.length > _maxEntries)
+        {
+            var node:CacheEntryNode = cacheEntries.pop() as CacheEntryNode;
+            delete cachedData[node.source];
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Invoked when a request is complete.  We detect if our content is
+     *  considered "trusted" and if not, we mark our cache entry to that
+     *  effect so that future requests of the same source don't attempt to
+     *  use a cached value.
+     *
+     *  @private
+     */
+    private function loader_completeHandler(e:Event):void
+    {
+        var loaderInfo:LoaderInfo = e.target as LoaderInfo;
+        if (loaderInfo && !loaderInfo.childAllowsParent)
+        {
+            // Detected that our loader cannot be shared or cached. Mark
+            // as such and notify and possibly active content requests.
+            addEntry(loaderInfo.url, UNTRUSTED);
+            dispatchEvent(new LoaderInvalidationEvent(LoaderInvalidationEvent.INVALIDATE_LOADER, loaderInfo));
+        }
+        loaderInfo.removeEventListener(Event.COMPLETE, loader_completeHandler);
+    }
+}
+}
+
+import mx.utils.LinkedListNode;
+
+/**
+ *  Represents a single cache entry.
+ *  @private
+ */
+class CacheEntryNode extends LinkedListNode
+{
+    public function CacheEntryNode(source:Object, value:*):void
+    {
+        super(value);
+        this.source = source;
+    }
+
+    //----------------------------------
+    //  source
+    //----------------------------------
+
+    /**
+     *  Key into cachedData map for this cache entry.
+     *  @private
+     */
+    public var source:Object;
+}


Code clean

Code clean

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/client/DataClient.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/client/DataClient.as
@@ -134,13 +134,13 @@
 						//do not break, apply symbol to field
 					case UpdateRequestToken.TYPE_UPDATE_SYMBOL:
 						for each (field in token.updatedFields) {
-						field.symbol = token.symbol;
-					}
+							field.symbol = token.symbol;
+						}
 						break;
 					case UpdateRequestToken.TYPE_UPDATE_REMARKS:
 						for each (field in token.updatedFields) {
-						field.remarks = token.remarks;
-					}
+							field.remarks = token.remarks;
+						}
 						break;
 				}
 			}


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

--- frameworks/projects/automation/src/mx/automation/codec/AdvancedDataGridSelectedCellCodec.as
+++ frameworks/projects/automation/src/mx/automation/codec/AdvancedDataGridSelectedCellCodec.as
@@ -0,0 +1,100 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.codec
+{
+
+	import mx.automation.AutomationError;
+	import mx.automation.qtp.IQTPPropertyDescriptor;
+	import mx.automation.IAutomationManager;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationTabularData;
+	import mx.core.mx_internal;
+	import mx.controls.AdvancedDataGrid;
+	import mx.automation.delegates.advancedDataGrid.AdvancedDataGridAutomationImpl;
+
+	use namespace mx_internal;
+
+	[ResourceBundle("automation_agent")]
+
+	/**
+	 * Translates between internal Flex List item and automation-friendly version
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class AdvancedDataGridSelectedCellCodec extends DefaultPropertyCodec
+	{
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		public function AdvancedDataGridSelectedCellCodec()
+		{
+			super();
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function encode(automationManager:IAutomationManager,
+										obj:Object,
+										propertyDescriptor:IQTPPropertyDescriptor,
+										relativeParent:IAutomationObject):Object
+		{
+			var val:Object = getMemberFromObject(automationManager, obj, propertyDescriptor);
+
+			if (val != null)
+			{
+				//val = relativeParent.automationTabularData.getAutomationValueForFiedData(val).join(" | ");
+				var adg:AdvancedDataGrid = relativeParent as AdvancedDataGrid;
+				var objdel:AdvancedDataGridAutomationImpl = (adg.automationDelegate) as AdvancedDataGridAutomationImpl;
+				var ret:Array = [];
+
+				if((val.columnIndex == -1)&& (val.rowIndex != -1))
+					return objdel.getRowData(val.rowIndex,true);
+
+				if((val.rowIndex != -1) &&(val.columnIndex != -1))
+					ret.push(objdel.getCellData(val.rowIndex,val.columnIndex,true));
+
+				val= ret;
+
+			}
+
+			return val;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function decode(automationManager:IAutomationManager,
+										obj:Object,
+										value:Object,
+										propertyDescriptor:IQTPPropertyDescriptor,
+										relativeParent:IAutomationObject):void
+		{
+			var message:String = resourceManager.getString(
+				"automation_agent", "notSupported");
+			throw new AutomationError(message, AutomationError.ILLEGAL_OPERATION);
+		}
+	}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 1968
Author:   jimurphy@adobe.com
Date:     2008-06-05T15:31:56.961691Z

Log Message:
-----------
Merge 3.0.x revisions [1940,1954] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/AIREvent.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FileEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/IWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemSizeDisplayMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeWindowBoundsEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/airframework/src/mx/controls/FileSystemTree.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemTree.as
@@ -153,7 +153,7 @@
  *
  *  @see flash.filesystem.File
  *
- *  @productversion Apollo 1.0
+ *  @playerversion AIR 1.1
  */
 public class FileSystemTree extends Tree
 {


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

--- frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as
+++ frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.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.controls
 {