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

--- frameworks/projects/framework/src/mx/effects/Effect.as
+++ frameworks/projects/framework/src/mx/effects/Effect.as
@@ -0,0 +1,1334 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.effects
+{
+
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.utils.getQualifiedClassName;
+import mx.core.IFlexDisplayObject;
+import mx.core.mx_internal;
+import mx.effects.effectClasses.AddRemoveEffectTargetFilter;
+import mx.effects.effectClasses.HideShowEffectTargetFilter;
+import mx.effects.effectClasses.PropertyChanges;
+import mx.events.EffectEvent;
+import mx.managers.LayoutManager;
+
+use namespace mx_internal;
+
+/**
+ *  Dispatched when the effect finishes playing,
+ *  either when the effect finishes playing or when the effect has
+ *  been interrupted by a call to the end() method.
+ *
+ *  @eventType mx.events.EffectEvent.EFFECT_END
+ */
+[Event(name="effectEnd", type="mx.events.EffectEvent")]
+
+/**
+ *  Dispatched when the effect starts playing.
+ *
+ *  @eventType mx.events.EffectEvent.EFFECT_START
+ */
+[Event(name="effectStart", type="mx.events.EffectEvent")]
+
+/**
+ *  The Effect class is an abstract base class that defines the basic
+ *  functionality of all Flex effects.
+ *  The Effect class defines the base factory class for all effects.
+ *  The EffectInstance class defines the base class for all effect
+ *  instance subclasses.
+ *
+ *
You do not create an instance of the Effect class itself
+ *  in an application.
+ *  Instead, you create an instance of one of the subclasses,
+ *  such as Fade or WipeLeft.

+ *
+ *  @mxml
+ *
+ *
The Effect class defines the following properties,
+ *  which all of its subclasses inherit:

+ *
+ *

+ *  <mx:tagname
+ *    Properties
+ *    customFilter=""
+ *    duration="500"
+ *    filter=""
+ *    hideFocusRing="false"
+ *    perElementOffset="0"
+ *    repeatCount="1"
+ *    repeatDelay="0"
+ *    startDelay="0"
+ *    suspendBackgroundProcessing="false|true"
+ *    target="effect target"
+ *    targets="array of effect targets"
+ *
+ *    Events
+ *    effectEnd="No default"
+ *    efectStart="No default"
+ *  />
+ *

+ *
+ *  @see mx.effects.EffectInstance
+ *
+ *  @includeExample examples/SimpleEffectExample.mxml
+ */
+public class Effect extends EventDispatcher implements IEffect
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static function mergeArrays(a1:Array, a2:Array):Array
+    {
+        if (a2)
+        {
+            for (var i2:int = 0; i2 < a2.length; i2++)
+            {
+                var addIt:Boolean = true;
+
+                for (var i1:int = 0; i1 < a1.length; i1++)
+                {
+                    if (a1[i1] == a2[i2])
+                    {
+                        addIt = false;
+                        break;
+                    }
+                }
+
+                if (addIt)
+                    a1.push(a2[i2]);
+            }
+        }
+
+        return a1;
+    }
+
+    /**
+     *  @private
+     */
+    private static function stripUnchangedValues(propChanges:Array):Array
+    {
+        // Go through and remove any before/after values that are the same.
+        for (var i:int = 0; i < propChanges.length; i++)
+        {
+            for (var prop:Object in propChanges[i].start)
+            {
+                if ((propChanges[i].start[prop] ==
+                     propChanges[i].end[prop]) ||
+                    (typeof(propChanges[i].start[prop]) == "number" &&
+                     typeof(propChanges[i].end[prop])== "number" &&
+                     isNaN(propChanges[i].start[prop]) &&
+                     isNaN(propChanges[i].end[prop])))
+                {
+                    delete propChanges[i].start[prop];
+                    delete propChanges[i].end[prop];
+                }
+            }
+        }
+
+        return propChanges;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *
Starting an effect is usually a three-step process:

+     *
+     *

+     *
Create an instance of the effect object
+     *    with the new operator.

+     *
Set properties on the effect object,
+     *    such as duration.

+     *
Call the play() method
+     *    or assign the effect to a trigger.

+     *

+     *
+     *  @param target The Object to animate with this effect.
+     */
+    public function Effect(target:Object = null)
+    {
+        super();
+
+        this.target = target;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var _instances:Array /* of EffectInstance */ = [];
+
+    /**
+     *  @private
+     */
+    private var _callValidateNow:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var isPaused:Boolean = false;
+
+    /**
+     *  @private
+     */
+    mx_internal var filterObject:EffectTargetFilter;
+
+    /**
+     *  @private
+	 *  Used in applyValueToTarget()
+     */
+    mx_internal var applyActualDimensions:Boolean = true;
+
+    /**
+     *  @private
+     *  Holds the init object passed in by the Transition.
+     */
+    mx_internal var propertyChangesArray:Array;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  className
+    //----------------------------------
+
+    /**
+     *  @copy mx.effects.IEffect#className
+     */
+    public function get className():String
+    {
+        var name:String = getQualifiedClassName(this);
+
+        // If there is a package name, strip it off.
+        var index:int = name.indexOf("::");
+        if (index != -1)
+            name = name.substr(index + 2);
+
+        return name;
+    }
+
+    //----------------------------------
+    //  customFilter
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the customFilter property.
+     */
+    private var _customFilter:EffectTargetFilter;
+
+    /**
+     *  @copy mx.effects.IEffect#customFilter
+     */
+    public function get customFilter():EffectTargetFilter
+    {
+        return _customFilter;
+    }
+
+    /**
+     *  @private
+     */
+    public function set customFilter(value:EffectTargetFilter):void
+    {
+        _customFilter = value;
+        mx_internal::filterObject = value;
+    }
+
+    //----------------------------------
+    //  duration
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the duration property.
+     */
+    private var _duration:Number = 500;
+
+    /**
+	 *  @private
+	 */
+	mx_internal var durationExplicitlySet:Boolean = false;
+
+    [Inspectable(category="General", defaultValue="500")]
+
+    /**
+     *  @copy mx.effects.IEffect#duration
+     */
+    public function get duration():Number
+    {
+        return _duration;
+    }
+
+    /**
+     *  @private
+     */
+    public function set duration(value:Number):void
+    {
+        mx_internal::durationExplicitlySet = true;
+        _duration = value;
+    }
+
+    //----------------------------------
+    //  effectTargetHost
+    //----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the effectTargetHost property.
+	 */
+	private var _effectTargetHost:IEffectTargetHost;
+
+    /**
+     *  @copy mx.effects.IEffect#effectTargetHost
+     */
+    public function get effectTargetHost():IEffectTargetHost
+    {
+        return _effectTargetHost;
+    }
+
+    /**
+     *  @private
+     */
+    public function set effectTargetHost(value:IEffectTargetHost):void
+    {
+        _effectTargetHost = value;
+    }
+
+    //----------------------------------
+    //  endValuesCaptured
+    //----------------------------------
+
+    /**
+     *  A flag containing true if the end values
+	 *  of an effect have already been determined,
+     *  or false if they should be acquired from the
+	 *  current properties of the effect targets when the effect runs.
+     *  This property is required by data effects because the sequence
+	 *  of setting up the data effects, such as DefaultListEffect
+	 *  and DefaultTileListEffect, is more complicated than for
+	 *  normal effects.
+     *
+     *  @default false
+     */
+    protected var endValuesCaptured:Boolean = false;
+
+    //----------------------------------
+    //  filter
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the filter property.
+     */
+    private var _filter:String;
+
+    [Inspectable(category="General", enumeration="add,remove,show,hide,move,resize,addItem,removeItem,replacedItem,replacementItem,none", defaultValue="none")]
+
+    /**
+     *  @copy mx.effects.IEffect#filter
+     */
+    public function get filter():String
+    {
+        return _filter;
+    }
+
+    /**
+     *  @private
+     */
+    public function set filter(value:String):void
+    {
+        if (!customFilter)
+        {
+            _filter = value;
+
+            switch (value)
+            {
+                case "add":
+                case "remove":
+                {
+                    mx_internal::filterObject =
+                        new AddRemoveEffectTargetFilter();
+                    AddRemoveEffectTargetFilter(mx_internal::filterObject).add =
+                        (value == "add");
+                    break;
+                }
+
+                case "hide":
+                case "show":
+                {
+                    mx_internal::filterObject =
+                        new HideShowEffectTargetFilter();
+                    HideShowEffectTargetFilter(mx_internal::filterObject).show =
+                        (value == "show");
+                    break;
+                }
+
+                case "move":
+                {
+                    mx_internal::filterObject =
+                        new EffectTargetFilter();
+                    mx_internal::filterObject.filterProperties =
+                        [ "x", "y" ];
+                    break;
+                }
+
+                case "resize":
+                {
+                    mx_internal::filterObject =
+                        new EffectTargetFilter();
+                    mx_internal::filterObject.filterProperties =
+                        [ "width", "height" ];
+                    break;
+                }
+
+                case "addItem":
+                {
+                    mx_internal::filterObject = new EffectTargetFilter();
+                    mx_internal::filterObject.requiredSemantics = {added:true};
+                    break;
+                }
+
+                case "removeItem":
+                {
+                    mx_internal::filterObject = new EffectTargetFilter();
+                    mx_internal::filterObject.requiredSemantics = {removed:true};
+                    break;
+                }
+
+                case "replacedItem":
+                {
+                    mx_internal::filterObject = new EffectTargetFilter();
+                    mx_internal::filterObject.requiredSemantics = {replaced:true};
+                    break;
+                }
+
+                case "replacementItem":
+                {
+                    mx_internal::filterObject = new EffectTargetFilter();
+                    mx_internal::filterObject.requiredSemantics = {replacement:true};
+                    break;
+                }
+
+                default:
+                {
+                    mx_internal::filterObject = null;
+                    break;
+                }
+            }
+        }
+    }
+
+    //----------------------------------
+    //  hideFocusRing
+    //----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the hideFocusRing property.
+	 */
+	private var _hideFocusRing:Boolean = false;
+
+    /**
+     *  @copy mx.effects.IEffect#hideFocusRing
+     */
+    public function get hideFocusRing():Boolean
+    {
+        return _hideFocusRing;
+    }
+
+    /**
+     *  @private
+     */
+    public function set hideFocusRing(value:Boolean):void
+    {
+        _hideFocusRing = value;
+    }
+
+    //----------------------------------
+    //  instanceClass
+    //----------------------------------
+
+    /**
+     *  An object of type Class that specifies the effect
+     *  instance class class for this effect class.
+     *
+     *
All subclasses of the Effect class must set this property
+     *  in their constructor.

+     */
+	public var instanceClass:Class = IEffectInstance;
+
+
+    //----------------------------------
+    //  isPlaying
+    //----------------------------------
+
+    /**
+     *  @copy mx.effects.IEffect#isPlaying
+     */
+    public function get isPlaying():Boolean
+    {
+        return _instances && _instances.length > 0;
+    }
+
+    //----------------------------------
+    //  perElementOffset
+    //----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the perElementOffset property.
+	 */
+	private var _perElementOffset:Number = 0;
+
+    [Inspectable(defaultValue="0", category="General", verbose="0")]
+
+    /**
+     *  @copy mx.effects.IEffect#perElementOffset
+     */
+    public function get perElementOffset():Number
+	{
+		return _perElementOffset;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set perElementOffset(value:Number):void
+	{
+		_perElementOffset = value;
+	}
+
+    //----------------------------------
+    //  relevantProperties
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the relevantProperties property.
+     */
+    private var _relevantProperties:Array /* of String */;
+
+    /**
+     *  @copy mx.effects.IEffect#relevantProperties
+     */
+    public function get relevantProperties():Array /* of String */
+    {
+        if (_relevantProperties)
+            return _relevantProperties;
+        else
+            return getAffectedProperties();
+    }
+
+    /**
+     *  @private
+     */
+    public function set relevantProperties(value:Array /* of String */):void
+    {
+        _relevantProperties = value;
+    }
+
+    //----------------------------------
+    //  relevantStyles
+    //----------------------------------
+
+    /**
+     *  @private
+	 *  Storage for the relevantStyles property.
+     */
+    private var _relevantStyles:Array /* of String */ = [];
+
+    /**
+     *  @copy mx.effects.IEffect#relevantStyles
+     */
+    public function get relevantStyles():Array /* of String */
+    {
+        return _relevantStyles;
+    }
+
+    /**
+     *  @private
+     */
+    public function set relevantStyles(value:Array /* of String */):void
+    {
+        _relevantStyles = value;
+    }
+
+    //----------------------------------
+    //  repeatCount
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="1")]
+
+    /**
+     *  Number of times to repeat the effect.
+     *  Possible values are any integer greater than or equal to 0.
+     *  A value of 1 means to play the effect once.
+     *  A value of 0 means to play the effect indefinitely
+     *  until stopped by a call to the end() method.
+     *
+     *  @default 1
+     */
+    public var repeatCount:int = 1;
+
+
+    //----------------------------------
+    //  repeatDelay
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  Amount of time, in milliseconds, to wait before repeating the effect.
+     *  Possible values are any integer greater than or equal to 0.
+     *
+     *  @default 0
+     */
+    public var repeatDelay:int = 0;
+
+
+    //----------------------------------
+    //  startDelay
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  Amount of time, in milliseconds, to wait before starting the effect.
+     *  Possible values are any int greater than or equal to 0.
+     *  If the effect is repeated by using the repeatCount
+     *  property, the startDelay is only applied
+     *  to the first time the effect is played.
+     *
+     *  @default 0
+     */
+    public var startDelay:int = 0;
+
+    //----------------------------------
+    //  suspendBackgroundProcessing
+    //----------------------------------
+
+    /**
+     *  If true, blocks all background processing
+     *  while the effect is playing.
+     *  Background processing includes measurement, layout, and
+     *  processing responses that have arrived from the server.
+     *  The default value is false.
+     *
+     *
You are encouraged to set this property to
+     *  true in most cases, because it improves
+     *  the performance of the application.
+     *  However, the property should be set to false
+     *  if either of the following is true:

+     *

+     *
User input may arrive while the effect is playing,
+     *    and the application must respond to the user input
+     *    before the effect finishes playing.

+     *
A response may arrive from the server while the effect
+     *    is playing, and the application must process the response
+     *    while the effect is still playing.

+     *

+     *
+     *  @default false
+     */
+    public var suspendBackgroundProcessing:Boolean = false;
+
+
+    //----------------------------------
+    //  target
+    //----------------------------------
+
+    /**
+     *  @copy mx.effects.IEffect#target
+     */
+    public function get target():Object
+    {
+        if (_targets.length > 0)
+            return _targets[0];
+        else
+            return null;
+    }
+
+    /**
+     *  @private
+     */
+    public function set target(value:Object):void
+    {
+        _targets.splice(0);
+
+        if (value)
+            _targets[0] = value;
+    }
+
+    //----------------------------------
+    //  targets
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the targets property.
+     */
+    private var _targets:Array = [];
+
+    /**
+     *  @copy mx.effects.IEffect#targets
+     */
+    public function get targets():Array
+    {
+        return _targets;
+    }
+
+    /**
+     *  @private
+     */
+    public function set targets(value:Array):void
+    {
+        // Strip out null values.
+        // Binding will trigger again when the null targets are created.
+        var n:int = value.length;
+        for (var i:int = n - 1; i > 0; i--)
+        {
+            if (value[i] == null)
+                value.splice(i,1);
+        }
+
+        _targets = value;
+    }
+
+    //----------------------------------
+    //  triggerEvent
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the triggerEvent property.
+     */
+    private var _triggerEvent:Event;
+
+    /**
+     *  @copy mx.effects.IEffect#triggerEvent
+     */
+    public function get triggerEvent():Event
+	{
+		return _triggerEvent;
+	}
+
+    /**
+     *  @private
+     */
+    public function set triggerEvent(value:Event):void
+    {
+        _triggerEvent = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy mx.effects.IEffect#getAffectedProperties()
+     */
+    public function getAffectedProperties():Array /* of String */
+    {
+        // Every subclass should override this method.
+        return [];
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#createInstances()
+     */
+    public function createInstances(targets:Array = null):Array /* of EffectInstance */
+    {
+        if (!targets)
+            targets = this.targets;
+
+        var newInstances:Array = [];
+
+        // Multiple target support
+        var n:int = targets.length;
+        var offsetDelay:Number = 0;
+
+        for (var i:int = 0; i < n; i++)
+        {
+            var newInstance:IEffectInstance = createInstance(targets[i]);
+
+            if (newInstance)
+            {
+                newInstance.startDelay += offsetDelay;
+                offsetDelay += perElementOffset;
+                newInstances.push(newInstance);
+            }
+        }
+
+        triggerEvent = null;
+
+        return newInstances;
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#createInstance()
+     */
+    public function createInstance(target:Object = null):IEffectInstance
+    {
+        if (!target)
+            target = this.target;
+
+        var newInstance:IEffectInstance = null;
+        var props:PropertyChanges = null;
+        var create:Boolean = true;
+        var setPropsArray:Boolean = false;
+
+        if (mx_internal::propertyChangesArray)
+        {
+            setPropsArray = true;
+            create = filterInstance(mx_internal::propertyChangesArray,
+                                    target);
+        }
+
+        if (create)
+        {
+            newInstance = IEffectInstance(new instanceClass(target))
+
+            initInstance(newInstance);
+
+            if (setPropsArray)
+            {
+                var n:int = mx_internal::propertyChangesArray.length;
+                for (var i:int = 0; i < n; i++)
+                {
+                    if (mx_internal::propertyChangesArray[i].target == target)
+                    {
+                        newInstance.propertyChanges =
+                            mx_internal::propertyChangesArray[i];
+                    }
+                }
+            }
+
+            EventDispatcher(newInstance).addEventListener(EffectEvent.EFFECT_START, effectStartHandler);
+            EventDispatcher(newInstance).addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
+
+            _instances.push(newInstance);
+
+            if (triggerEvent)
+                newInstance.initEffect(triggerEvent);
+        }
+
+        return newInstance;
+    }
+
+    /**
+     *  Copies properties of the effect to the effect instance.
+     *
+     *
Flex calls this method from the Effect.createInstance()
+     *  method; you do not have to call it yourself.

+     *
+     *
When you create a custom effect, override this method to
+     *  copy properties from the Effect class to the effect instance class.
+     *  In your override, you must call super.initInstance().

+     *
+     *  @param EffectInstance The effect instance to initialize.
+     */
+    protected function initInstance(instance:IEffectInstance):void
+    {
+        instance.duration = duration;
+        Object(instance).durationExplicitlySet = durationExplicitlySet;
+        instance.effect = this;
+		instance.effectTargetHost = effectTargetHost;
+		instance.hideFocusRing = hideFocusRing;
+        instance.repeatCount = repeatCount;
+        instance.repeatDelay = repeatDelay;
+        instance.startDelay = startDelay;
+        instance.suspendBackgroundProcessing = suspendBackgroundProcessing;
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#deleteInstance()
+     */
+    public function deleteInstance(instance:IEffectInstance):void
+    {
+        EventDispatcher(instance).removeEventListener(
+			EffectEvent.EFFECT_START, effectStartHandler);
+        EventDispatcher(instance).removeEventListener(
+			EffectEvent.EFFECT_END, effectEndHandler);
+
+        var n:int = _instances.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            if (_instances[i] === instance)
+                _instances.splice(i, 1);
+        }
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#play()
+     */
+    public function play(targets:Array = null,
+                         playReversedFromEnd:Boolean = false):
+                         Array /* of EffectInstance */
+    {
+        // If we have a propertyChangesArray, capture the current values
+        // if they haven't been captured already, strip out any unchanged
+        // values, then apply the start values.
+        if (targets == null && mx_internal::propertyChangesArray != null)
+        {
+            if (_callValidateNow)
+                LayoutManager.getInstance().validateNow();
+
+            if (!endValuesCaptured)
+                mx_internal::propertyChangesArray =
+                    captureValues(mx_internal::propertyChangesArray, false);
+
+            mx_internal::propertyChangesArray =
+                stripUnchangedValues(mx_internal::propertyChangesArray);
+
+            applyStartValues(mx_internal::propertyChangesArray,
+                             this.targets);
+        }
+
+        var newInstances:Array = createInstances(targets);
+
+        var n:int = newInstances.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var newInstance:IEffectInstance = IEffectInstance(newInstances[i]);
+
+            Object(newInstance).playReversed = playReversedFromEnd;
+
+            newInstance.startEffect();
+        }
+
+        return newInstances;
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#pause()
+     */
+    public function pause():void
+    {
+        if (isPlaying && !isPaused)
+        {
+            isPaused = true;
+
+            var n:int = _instances.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                IEffectInstance(_instances[i]).pause();
+            }
+        }
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#stop()
+     */
+    public function stop():void
+    {
+        var n:int = _instances.length;
+        for (var i:int = n; i >= 0; i--)
+        {
+            var instance:IEffectInstance = IEffectInstance(_instances[i]);
+            if (instance)
+                instance.stop();
+        }
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#resume()
+     */
+    public function resume():void
+    {
+        if (isPlaying && isPaused)
+        {
+            isPaused = false;
+            var n:int = _instances.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                IEffectInstance(_instances[i]).resume();
+            }
+        }
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#reverse()
+     */
+    public function reverse():void
+    {
+        if (isPlaying)
+        {
+            var n:int = _instances.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                IEffectInstance(_instances[i]).reverse();
+            }
+        }
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#end()
+     */
+    public function end(effectInstance:IEffectInstance = null):void
+    {
+        if (effectInstance)
+        {
+            effectInstance.end();
+        }
+        else
+        {
+            var n:int = _instances.length;
+            for (var i:int = n; i >= 0; i--)
+            {
+                var instance:IEffectInstance = IEffectInstance(_instances[i]);
+                if (instance)
+                    instance.end();
+            }
+        }
+    }
+
+    /**
+     *  Determines the logic for filtering out an effect instance.
+     *  The CompositeEffect class overrides this method.
+     *
+     *  @param propChanges The properties modified by the effect.
+     *
+     *  @param targ The effect target.
+     *
+     *  @return Returns true if the effect instance should play.
+     */
+    protected function filterInstance(propChanges:Array, target:Object):Boolean
+    {
+        if (mx_internal::filterObject)
+            return mx_internal::filterObject.filterInstance(propChanges, effectTargetHost, target);
+
+        return true;
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#captureStartValues()
+     */
+    public function captureStartValues():void
+    {
+        if (targets.length > 0)
+        {
+            // Reset the PropertyChanges array.
+            mx_internal::propertyChangesArray = [];
+            _callValidateNow = true;
+
+            // Create a new PropertyChanges object for the sum of all targets.
+            var n:int = targets.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                mx_internal::propertyChangesArray.push(
+                    new PropertyChanges(targets[i]));
+            }
+
+            mx_internal::propertyChangesArray =
+                captureValues(mx_internal::propertyChangesArray,true);
+        }
+        endValuesCaptured = false;
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#captureMoreStartValues()
+     */
+    public function captureMoreStartValues(targets:Array):void
+    {
+        if (targets.length > 0)
+        {
+            // make temporary PropertyChangesArray
+            var additionalPropertyChangesArray:Array = [];
+
+            // Create a new PropertyChanges object for the sum of all targets.
+            for (var i:int = 0; i < targets.length; i++)
+                additionalPropertyChangesArray.push(new PropertyChanges(targets[i]));
+
+            additionalPropertyChangesArray = captureValues(additionalPropertyChangesArray,true);
+
+            mx_internal::propertyChangesArray =
+                mx_internal::propertyChangesArray.concat(additionalPropertyChangesArray);
+        }
+    }
+
+    /**
+     *  @copy mx.effects.IEffect#captureEndValues()
+     */
+    public function captureEndValues():void
+    {
+        mx_internal::propertyChangesArray =
+            captureValues(mx_internal::propertyChangesArray,false);
+        endValuesCaptured = true;
+    }
+
+    /**
+     *  @private
+     *  Used internally to grab the values of the relevant properties
+     */
+    mx_internal function captureValues(propChanges:Array,
+									   setStartValues:Boolean):Array
+    {
+        // Merge Effect.filterProperties and filterObject.filterProperties
+        var effectProps:Array = !mx_internal::filterObject ?
+                                relevantProperties :
+                                mergeArrays(relevantProperties,
+                                mx_internal::filterObject.filterProperties);
+
+        var valueMap:Object;
+        var target:Object;
+        var n:int;
+        var i:int;
+        var m:int;
+        var j:int;
+
+        // For each target, grab the property's value
+        // and put it into the propChanges Array.
+        // Walk the targets.
+        if (effectProps && effectProps.length > 0)
+        {
+            n = propChanges.length;
+            for (i = 0; i < n; i++)
+            {
+                target = propChanges[i].target;
+                valueMap = setStartValues ? propChanges[i].start : propChanges[i].end;
+
+                // Walk the properties in the target
+                m = effectProps.length;
+                for (j = 0; j < m; j++)
+                {
+                    valueMap[effectProps[j]] = getValueFromTarget(target,effectProps[j]);
+                }
+            }
+        }
+
+        var styles:Array = !mx_internal::filterObject ?
+                           relevantStyles :
+                           mergeArrays(relevantStyles,
+                           mx_internal::filterObject.filterStyles);
+
+        if (styles && styles.length > 0)
+        {
+            n = propChanges.length;
+            for (i = 0; i < n; i++)
+            {
+                target = propChanges[i].target;
+                valueMap = setStartValues ? propChanges[i].start : propChanges[i].end;
+
+                // Walk the properties in the target.
+                m = styles.length;
+                for (j = 0; j < m; j++)
+                {
+                    valueMap[styles[j]] = target.getStyle(styles[j]);
+                }
+            }
+        }
+
+        return propChanges;
+    }
+
+    /**
+     *  Called by the captureStartValues() method to get the value
+     *  of a property from the target.
+     *  This function should only be called internally
+     *  by the effects framework.
+     *  The default behavior is to simply return target[property].
+     *  Effect developers can override this function
+     *  if you need a different behavior.
+     *
+     *  @param target The effect target.
+     *
+     *  @param property The target property.
+     *
+     *  @return The value of the target property.
+     */
+    protected function getValueFromTarget(target:Object, property:String):*
+    {
+        if (property in target)
+            return target[property];
+
+        return undefined;
+    }
+
+    /**
+     *  @private
+     *  Applies the start values found in the array of PropertyChanges
+     *  to the relevant targets.
+     */
+    mx_internal function applyStartValues(propChanges:Array,
+                                     targets:Array):void
+    {
+        var effectProps:Array = relevantProperties;
+
+        var n:int = propChanges.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var m:int;
+            var j:int;
+
+            var target:Object = propChanges[i].target;
+            var apply:Boolean = false;
+
+            m = targets.length;
+            for (j = 0; j < m; j++)
+            {
+                if (targets[j] == target)
+                {
+                    apply = filterInstance(propChanges, target);
+                    break;
+                }
+            }
+
+            if (apply)
+            {
+                // Walk the properties in the target
+                m = effectProps.length;
+                for (j = 0; j < m; j++)
+                {
+                    if (effectProps[j] in propChanges[i].start &&
+                        effectProps[j] in target)
+                    {
+                        applyValueToTarget(target, effectProps[j],
+                                propChanges[i].start[effectProps[j]],
+                                propChanges[i].start);
+                    }
+                }
+
+                // Walk the styles in the target
+                m = relevantStyles.length;
+                for (j = 0; j < m; j++)
+                {
+                    if (relevantStyles[j] in propChanges[i].start)
+                        target.setStyle(relevantStyles[j], propChanges[i].start[relevantStyles[j]]);
+                }
+            }
+        }
+    }
+
+    /**
+     *  Used internally by the Effect infrastructure.
+     *  If captureStartValues() has been called,
+     *  then when Flex calls the play() method, it uses this function
+     *  to set the targets back to the starting state.
+     *  The default behavior is to take the value captured
+     *  using the getValueFromTarget() method
+     *  and set it directly on the target's property. For example:

+     *
+     *  target[property] = value;

+     *
+     *
Only override this method if you need to apply
+     *  the captured values in a different way.
+     *  Note that style properties of a target are set
+     *  using a different mechanism.
+     *  Use the relevantStyles property to specify
+     *  which style properties to capture and apply.

+     *
+     *  @param target The effect target.
+     *
+     *  @param property The target property.
+     *
+     *  @param value The value of the property.
+     *
+     *  @param props Array of Objects, where each Array element contains a
+     *  start and end Object
+     *  for the properties that the effect is monitoring.
+     */
+    protected function applyValueToTarget(target:Object, property:String,
+                                          value:*, props:Object):void
+    {
+        if (property in target)
+        {
+            // The "property in target" test only tells if the property exists
+            // in the target, but does not distinguish between read-only and
+            // read-write properties. Put a try/catch around the setter and
+            // ignore any errors.
+            try
+            {
+
+                if (applyActualDimensions &&
+                    target is IFlexDisplayObject &&
+                    property == "height")
+                {
+                    target.setActualSize(target.width,value);
+                }
+                else if (applyActualDimensions &&
+                         target is IFlexDisplayObject &&
+                         property == "width")
+                {
+                    target.setActualSize(value,target.height);
+                }
+                else
+                {
+                    target[property] = value;
+                }
+            }
+            catch(e:Error)
+            {
+                // Ignore errors
+            }
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  This method is called when the effect instance starts playing.
+     *  If you override this method, ensure that you call the super method.
+     *
+     *  @param event An event object of type EffectEvent.
+     */
+    protected function effectStartHandler(event:EffectEvent):void
+    {
+        dispatchEvent(event);
+    }
+
+    /**
+     *  Called when an effect instance has finished playing.
+     *  If you override this method, ensure that you call the super method.
+     *
+     *  @param event An event object of type EffectEvent.
+     */
+    protected function effectEndHandler(event:EffectEvent):void
+    {
+        var instance:IEffectInstance = IEffectInstance(event.effectInstance);
+
+        deleteInstance(instance);
+
+        dispatchEvent(event);
+    }
+
+}
+
+}


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

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

 package mx.messaging
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3031
Author:   chaase@adobe.com
Date:     2008-08-28T21:17:21.801208Z

Log Message:
-----------
Fixed SDK-16615, SDK-16576, SDK-16631, SDK-16635, TH-1507, SDK-16622. This is another round of Animation/effect changes. Some are API improvements (such as adding proper event dispatching to Animate), most are fixes for various SDK and Thermo bugs that have been filed. Here's an explanation of the changes per file:

Animate.as: (sdk-16622)
All of the changes here are to add AnimationEvent dispatching to this class, similar to what we had in TweenEffect for TweenEvent. Note that we have a new event now, ANIMATION_REPEAT, and that ANIMATION_END only gets sent out once for each animation (instead of after each repetition, which is what the Flex3 effects did)

Animation.as: (sdk-16635)
We were noop'ing 0-duration animations. We now handle this correctly by sending out a START event, then send out UPDATE/END events with the final value

AnimateInstance.as:
These changes relate to two problems/fixes:
- Dispatching events correctly (sdk-16622)
- Handling styles correctly before effects are completely set up (sdk-16615)

MoveInstance.as: (sdk-16631)
We didn't handle the situation where the user supplied only one of left/right or one of bottom/top.

TintInstance.as: (sdk-16615)
We weren't correctly detecting that colors were not being set by the user, which messed up assumptions for transition from/to values

ColorInterpolator.as (sdk-16576)
Removed redundant line of code

Tint.as: (sdk-16615)
Fixes to support property coloring during transitions

Effect.as:
Removed trace() statements that crept in there in an earlier checkin

Reviewed by Glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/TintInstance.as</path>
<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/flex4/src/flex/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Tint.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/ColorInterpolator.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Animate.as
+++ frameworks/projects/spark/src/spark/effects/Animate.as
@@ -13,6 +13,7 @@

 import flex.effects.easing.IEaser;
 import flex.effects.effectClasses.AnimateInstance;
+import flex.events.AnimationEvent;

 import mx.core.mx_internal;
 import mx.effects.Effect;
@@ -23,6 +24,55 @@
 use namespace mx_internal;

 [DefaultProperty("propertyValuesList")]
+
+/**
+ * Dispatched when the effect starts, which corresponds to a
+ * call to the AnimateInstance.startHandler() method.
+ * Flex also dispatches the first animationUpdate event
+ * for the effect at the same time.
+ *
+ *
The Effect.effectStart event is dispatched
+ * before the animationStart event.

+ *
+ * @eventType flex.events.AnimationEvent.ANIMATION_START
+ */
+[Event(name="animationStart", type="flex.events.AnimationEvent")]
+
+/**
+ * Dispatched every time the effect updates the target.
+ * This event corresponds to a call to
+ * the AnimateInstance.updateHandler() method.
+ *
+ * @eventType flex.events.AnimationEvent.ANIMATION_UPDATE
+ */
+[Event(name="animationUpdate", type="mx.events.AnimationEvent")]
+
+/**
+ * Dispatched when the effect begins a new repetition, for
+ * any effect that is repeated more than once.
+ * This event corresponds to a call to
+ * the AnimateInstance.repeatHandler() method.
+ * Flex also dispatches the first animationUpdate event
+ * for the effect at the same time.
+ *
+ * @eventType flex.events.AnimationEvent.ANIMATION_END
+ */
+[Event(name="animationRepeat", type="flex.events.AnimationEvent")]
+
+/**
+ * Dispatched when the effect ends.
+ * This event corresponds to a call to
+ * the AnimateInstance.endHandler() method.
+ * Flex also dispatches the first animationUpdate event
+ * for the effect at the same time.
+ *
+ *
This event occurs just before an effectEnd event.
+ * A repeating effect dispatches this event only after the
+ * final repetition.

+ *
+ * @eventType flex.events.AnimationEvent.ANIMATION_END
+ */
+[Event(name="animationEnd", type="flex.events.AnimationEvent")]

 /**
  * This effect animates an arbitrary set of properties between values, as specified
@@ -50,7 +100,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  Constructor.
+     * Constructor.
      */
     public function Animate(target:Object = null)
     {
@@ -124,13 +174,18 @@
     }

     /**
-     *  @private
+     * @private
      */
     override protected function initInstance(instance:IEffectInstance):void
     {
         super.initInstance(instance);

         var animateInstance:AnimateInstance = AnimateInstance(instance);
+
+        animateInstance.addEventListener(AnimationEvent.ANIMATION_START, animationEventHandler);
+        animateInstance.addEventListener(AnimationEvent.ANIMATION_UPDATE, animationEventHandler);
+        animateInstance.addEventListener(AnimationEvent.ANIMATION_REPEAT, animationEventHandler);
+        animateInstance.addEventListener(AnimationEvent.ANIMATION_END, animationEventHandler);

         if (easer)
             animateInstance.easer = easer;
@@ -186,5 +241,16 @@
             }
         }
     }
+
+    /**
+     * Called when the Animate dispatches an AnimationEvent.
+     * If you override this method, ensure that you call the super method.
+     *
+     * @param event An event object of type AnimationEvent.
+     */
+    protected function animationEventHandler(event:AnimationEvent):void
+    {
+        dispatchEvent(event);
+    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6442
Author:   dsubrama@adobe.com
Date:     2009-04-30T22:37:48.504610Z

Log Message:
-----------
SDK-20745, SDK-20856

Strict check when determining toString() representation of data items.

Reviewer: Hans
Checkintests: PASS

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/LabelUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/utils/LabelUtil.as
+++ frameworks/projects/spark/src/spark/utils/LabelUtil.as
@@ -34,11 +34,19 @@
     /**
      *  A function typically used by renderer-aware controls to determine
      *  the correct text a renderer should display for a particular data item,
-     *  given the item, a labelField and a labelFunction.
+     *  given the item, a labelField and a labelFunction. If no labelField
+     *  or labelFunction is set, the toString() representation of the data
+     *  item is returned. Null items return the empty string.
      *
-     *  @param item
-     *  @param labelField
-     *  @param labelFunction
+     *  @param item The data item
+     *
+     *  @param labelField The field in the data item to return
+     *
+     *  @param labelFunction A function that takes the data item
+     *  as a single parameter and returns a string.
+     *
+     *  @return A String representation for the data item
+     *
      */
     public static function itemToLabel(item:Object, labelField:String=null,
     	labelFunction:Function=null):String
@@ -77,7 +85,8 @@

         try
         {
-            return item.toString();
+            if (item !== null)
+                return item.toString();
         }
         catch(e:Error)
         {


shortened short time, lengthend long time

git-svn-id: 9278a788294a4258aac04586390fc35fb4a5f335@9039 a9308255-753e-0410-a2e9-80b3fbc4fff6

--- FlexUnit4Turnkey/src/flexUnitTests/flexUnit4/suites/frameworkSuite/cases/TestAsynchronous.as
+++ FlexUnit4Turnkey/src/flexUnitTests/flexUnit4/suites/frameworkSuite/cases/TestAsynchronous.as
@@ -48,8 +48,8 @@
      */
 	public class TestAsynchronous {
 		protected var timer:Timer;
-		protected static var SHORT_TIME:int = 100;
-		protected static var LONG_TIME:int = 250;
+		protected static var SHORT_TIME:int = 30;
+		protected static var LONG_TIME:int = 500;

 		[Before]
 		public function setUp():void {


No longer showing menu items with no label, and added option to provide a 'shown' function to control menu item visibility.

--- WeaveUI/src/weave/ui/SubMenu.as
+++ WeaveUI/src/weave/ui/SubMenu.as
@@ -94,14 +94,16 @@
 		 * @param label The Label string (or function that returns a string) to show when the menu is open.
 		 * @param listener The function to call when the item is clicked.
 		 * @param params An Array of parameters to pass to the listener function.
+		 * @param shown A function that returns a boolean that determines whether the menu item should be shown.
 		 * @return An object containing the three parameters (label, listener, params) which can be modified later.
 		 */
-		public function addSubMenuItem(label:Object, listener:Function, params:Array = null):Object
+		public function addSubMenuItem(label:Object, listener:Function, params:Array = null, shown:Function = null):Object
 		{
 			var menuItem:SubMenuItem = new SubMenuItem();
 			menuItem.label = label;
 			menuItem.listener = listener;
 			menuItem.params = params;
+			menuItem.shown = shown;
 			subMenuDataProvider.push(menuItem);
 			return menuItem;
 		}
@@ -109,6 +111,7 @@
 		public static const LABEL:String = 'label';
 		public static const LISTENER:String = 'listener';
 		public static const PARAMS:String = 'params';
+		public static const SHOWN:String = 'shown';

 		/**
 		 * Removes all menu items
@@ -162,7 +165,7 @@
 			var yMax:Number = tempBounds.getYNumericMax();

 			setStyle("openDuration",0);
-			popUpMenu(this, _uiParent, subMenuDataProvider);
+			popUpMenu(this, _uiParent, subMenuDataProvider.filter(isItemEnabled));
 			show(menuLocation.x, menuLocation.y);

 			if (menuLocation.x < xMin)
@@ -178,6 +181,11 @@
 			move(menuLocation.x, menuLocation.y);
 		}

+		private function isItemEnabled(item:SubMenuItem, ..._):Boolean
+		{
+			return getLabel(item) && (item.shown == null || item.shown());
+		}
+
 		private const tempBounds:Bounds2D = new Bounds2D();
 	}
 }
@@ -187,4 +195,5 @@
 	public var label:Object;
 	public var listener:Function;
 	public var params:Array;
+	public var shown:Function;
 }


Added try/catch around dispose before external reload

Change-Id: I555a93655e8a8f939c02fc5f7c9da398c4a97f0c

--- WeaveUISpark/src/weave/Weave.as
+++ WeaveUISpark/src/weave/Weave.as
@@ -490,7 +490,14 @@
 				obj.close();

 				// before reloading, dispose everything in case any JavaScript cleanup needs to happen.
-				disposeObject(WeaveAPI.globalHashMap);
+				try
+				{
+					disposeObject(WeaveAPI.globalHashMap);
+				}
+				catch (e:Error)
+				{
+					trace(e.getStackTrace());
+				}

 				// reload the application
 				if (ExternalInterface.objectID)


reorganize imports in VertexBuffer3DResource

--- src/aerys/minko/render/resource/VertexBuffer3DResource.as
+++ src/aerys/minko/render/resource/VertexBuffer3DResource.as
@@ -1,13 +1,14 @@
 package aerys.minko.render.resource
 {
 	import aerys.minko.ns.minko_stream;
-	import aerys.minko.type.Signal;
 	import aerys.minko.render.geometry.stream.IVertexStream;
 	import aerys.minko.render.geometry.stream.StreamUsage;
 	import aerys.minko.render.geometry.stream.VertexStream;
+	import aerys.minko.type.Signal;

 	import flash.display3D.Context3D;
 	import flash.display3D.VertexBuffer3D;
+	import flash.utils.ByteArray;

 	/**
 	 * VertexBuffer3DResource objects handle vertex buffers allocation


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

--- frameworks/projects/automation/src/mx/automation/delegates/containers/PanelAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/containers/PanelAutomationImpl.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Added Graphic update in Entity's update and toString() function for logging purposes.

--- net/flashpunk/Entity.as
+++ net/flashpunk/Entity.as
@@ -85,6 +85,16 @@
 		}

 		/**
+		 * Updates the Entity's graphic. If you override this for
+		 * update logic, remember to call super.update() if you're
+		 * using a Graphic type that animates (eg. Spritemap).
+		 */
+		override public function update():void
+		{
+			if (_graphic && _graphic.active) _graphic.update();
+		}
+
+		/**
 		 * Renders the Entity. If you override this for special behaviour,
 		 * remember to call super.render() to render the Entity's graphic.
 		 */
@@ -228,7 +238,6 @@
 		 */
 		public function collideRect(x:Number, y:Number, rX:Number, rY:Number, rWidth:Number, rHeight:Number):Boolean
 		{
-			if (!collidable) return false;
 			if (x - originX + width >= rX && y - originY + height >= rY
 			&& x - originX <= rX + rWidth && y - originY <= rY + rHeight)
 			{
@@ -260,7 +269,6 @@
 		 */
 		public function collidePoint(x:Number, y:Number, pX:Number, pY:Number):Boolean
 		{
-			if (!collidable) return false;
 			if (pX >= x - originX && pY >= y - originY
 			&& pX < x - originX + width && pY < y - originY + height)
 			{
@@ -456,6 +464,16 @@
 		public function distanceToRect(rx:Number, ry:Number, rwidth:Number, rheight:Number):Number
 		{
 			return FP.distanceRects(rx, ry, rwidth, rheight, x - originX, y - originY, width, height);
+		}
+
+		/**
+		 * Gets the class name as a string.
+		 * @return	A string representing the class name.
+		 */
+		public function toString():String
+		{
+			var s:String = String(_class);
+			return s.substring(7, s.length - 1);
 		}

 		// Entity information.


Actually, this makes no sense; the bitmask values to use for flag construction are not available to the caller. If we want to support the new DescribeType's more detailed features, we'll figure out how later.

--- tamarin-central/thane/as3src/flash/utils/typeFunctions.as
+++ tamarin-central/thane/as3src/flash/utils/typeFunctions.as
@@ -33,11 +33,6 @@
     return avmplus.describeType(c, FLASH10_FLAGS);
 }

-public function describeTypeWithFlags (value :*, flags :uint) :XML
-{
-    return avmplus.describeType(value, flags);
-}
-
 public function getDefinitionByName (name :String) :Class
 {
     return avmplus.Domain.currentDomain.getClass(name.replace("::", "."));


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

--- frameworks/projects/charts/src/mx/charts/series/ColumnSet.as
+++ frameworks/projects/charts/src/mx/charts/series/ColumnSet.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.series
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 2805
Author:   chaase@adobe.com
Date:     2008-08-11T20:37:18.700675Z

Log Message:
-----------
First checkin for the "Arbitrary Type Interpolation" feature. This feature has a rewritten Tween class (now named flex.effects.Animation). This class supports the old Tween capabilities, but adds functionality such as the ability to supply alternate interpolation objects (to allow animation of non-Number types), a new Easing API, and new 'repeat behavior' that will allow terser looping or reversing animations. The existing new effects were slightly changed to use the new Animation class (instead of Tween), and the superclass of the new effects, AnimateProperties (renamed 'Animate'), is now a subclass of Effect (not TweenEffect).

Added various new interpolation and easing classes, along with the new packages flex.effects.interpolation and flex.effects.easing. Also added new color-interpolation effect, 'Tint'.

Expect slight tweaks to the API during i7, but the bulk of the functionality and API changes are being checked in now.

Reviewed by Jason S.
Testing: checkintests & mustella tests/Effects (passed)

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animation.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/.actionScriptProperties</path>
<path kind="file" action="A">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/EffectsProperties.mxml</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimatePropertiesInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/AnimateProperties.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/components/AnimationPropertiesForm.mxml</path>
<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/flex4/src/flex/effects/effectClasses/FadeInstance.as</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/effects/Fade.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/Constant.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/Power.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/ColorInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimateInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/TintInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/IEaser.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Tint.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animate.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/NumberArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/IInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Resize.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Move.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/events/AnimationEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/ArrayInterpolator.as</path>

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

--- frameworks/projects/spark/src/spark/effects/easing/IEaser.as
+++ frameworks/projects/spark/src/spark/effects/easing/IEaser.as
@@ -0,0 +1,41 @@
+package flex.effects.easing
+{
+/**
+ * IEaser is an interface implemented by classes that provide time-easing
+ * functionality for Animation. Implementors are responsible for the single
+ * function, ease(), which takes and returns a fraction according
+ * to the easing behavior desired. As a simple example, LinearEase simply
+ * returns the same input fraction, since there is no easing performed by
+ * that easer. As another example, a reversing easer could be written which
+ * returned the inverse fraction, (1 - fraction).
+ *
+ *
By easing the fractional values of the time elapsed in an animation,
+ * these classes are easing the resulting values of the animation, but they
+ * only have to deal with the fractional value of time instead of any
+ * specific object types.

+ *
+ * @see flex.effects.Animation
+ */
+public interface IEaser
+{
+    /**
+     * This function takes the fraction elapsed of a current tween
+     * (a value from 0 to 1) and returns a new elapsed value. This
+     * value will be used to calculate animated property values. By
+     * changing the value of the elapsed fraction, we effectively change
+     * the animation of the property.
+     *
+     * @param fraction The elapsed fraction of an animation, from 0 to 1.
+     * @return The eased value for the elapsed time. Typically, this value
+     * should be constrained to lie between 0 and 1, although it is possible
+     * to return values outside of this range. Note that the results of
+     * returning such values are undefined, and depend on what kind of
+     * effects are using this eased value. For example, an object moving
+     * in a linear fashion can have positions calculated outside of its start
+     * and end point without a problem, but other value types (such as color)
+     * may not result in desired effects if they use time values that cause
+     * them to surpass their endpoint values.
+     */
+    function ease(fraction:Number):Number;
+}
+}


changed width of text

changed width of text

--- src/com/socialstalkr/components/TwitterMarker.as
+++ src/com/socialstalkr/components/TwitterMarker.as
@@ -23,7 +23,7 @@
       _shape = new Shape();
       _shape.graphics.lineStyle(1,0x666666);
       _shape.graphics.beginFill(0xFFFFFF,1);
-      _shape.graphics.drawRoundRect(5, 5, 150, 51, 0, 0);
+      _shape.graphics.drawRoundRect(5, 5, 250, 51, 0, 0);
       _shape.graphics.endFill();
       addChild(_shape);

@@ -39,6 +39,8 @@
       _textField.defaultTextFormat =
         new TextFormat("Arial", 11, 0x000000, true);
       _textField.wordWrap = true;
+      _textField.width = 200;
+      _textField.height = 50;
       addChild(_textField);
     }


The lights out game begins inactive so that we can't interact with it until has been properly presented to the player.


By default, use "data" as the key in selectedItem to pass to the command. This can also
be specified. If it's null, shoot the entire selectedItem as the argument.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@738 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flex/CommandComboBox.as
+++ src/as/com/threerings/flex/CommandComboBox.as
@@ -36,16 +36,18 @@
 public class CommandComboBox extends ComboBox
 {
     /**
-     * Create a command combobox. The 'data' attribute of the selectedItem object is used as
-     * an argument of the command or function.
+     * Create a command combobox.
      *
      * @param cmdOrFn either a String, which will be the CommandEvent command to dispatch,
      *        or a function, which will be called when changed.
+     * @param argName The attribute of the selectedItem object that used as the argument to the
+     *        command or function. If null, the entire selectedItem is passed as the argument.
      */
-    public function CommandComboBox (cmdOrFn :* = null)
+    public function CommandComboBox (cmdOrFn :* = null, argName :String = "data")
     {
         CommandButton.validateCmd(cmdOrFn);
         _cmdOrFn = cmdOrFn;
+        _argName = argName;

         addEventListener(ListEvent.CHANGE, handleChange);
     }
@@ -68,11 +70,16 @@

     protected function handleChange (event :ListEvent) :void
     {
-        CommandEvent.dispatch(this, _cmdOrFn, this.selectedItem.data);
+        if (this.selectedItem != null) {
+            CommandEvent.dispatch(this, _cmdOrFn,
+                (_argName != null) ? this.selectedItem[_argName] : this.selectedItem);
+        }
     }

     /** The command (String) to submit, or the function (Function) to call
      * when changed,  */
     protected var _cmdOrFn :Object;
+
+    protected var _argName :String;
 }
 }


Fixed bug with moving to next history after history was reset.  Removed canvas size limits.

--- src/com/nocircleno/graffiti/GraffitiCanvas.as
+++ src/com/nocircleno/graffiti/GraffitiCanvas.as
@@ -78,7 +78,7 @@
 	* Once you've created an instance of the GraffitiCanvas Class you can assign
 	* different tools to the canvas.
 	*
-	*
2.5 Features:
+	*
Features:
 	*

 	*
Create a drawing area up to 4095x4095 pixels.

 	*
Brush Tool providing 7 different Brush shapes with transparency and blur.

@@ -101,9 +101,6 @@

 		public static const HISTORY_LENGTH_CHANGE:String = "historyLengthChange";

-		private const MAX_WIDTH:uint = 4095;
-		private const MAX_HEIGHT:uint = 4095;
-		private const MAX_BITMAP_DIM:uint = 5500;
 		private const OBJECT_NUDGE_AMOUNT:uint = 1;
 		private const OBJECT_SHIFT_NUDGE_AMOUNT:uint = 5;

@@ -592,7 +589,7 @@

 			if(_history != null) {

-				if(_historyPosition != _history.length - 1) {
+				if(_historyPosition < _history.length - 1) {
 					_historyPosition++;

 					restoreFromHistory();
@@ -1152,13 +1149,9 @@
 					  zoom level are within the bounds.
 		***************************************************************************/
 		private function checkPropertyLimits():void {
-
-			// check bounds of canvas width and height
-			_canvasWidth = _canvasWidth <= MAX_WIDTH ? _canvasWidth : MAX_WIDTH;
-			_canvasHeight = _canvasHeight <= MAX_HEIGHT ? _canvasHeight : MAX_HEIGHT;
-
+
 			// calculate max zoom to avoid bitmap display problems
-			_maxZoom = Math.floor(MAX_BITMAP_DIM/Math.max(_canvasWidth, _canvasHeight));
+			_maxZoom = Math.floor(Math.max(_canvasWidth, _canvasHeight));

 			// check zoom to make sure if not greater then max zoom
 			if(_zoom > _maxZoom) {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20690
Author:   mhorn@adobe.com
Date:     2011-03-08T20:26:51.755036Z

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/Legend.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/PieChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/PlotChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/series/items/LineSeriesSegment.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/CandlestickChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/HLOCChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/InstanceCache.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/series/BarSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/Series.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/LineChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/BubbleChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/effects/SeriesZoom.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/ColumnChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/DateTimeAxis.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/BarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/AreaChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/ChartElement.as</path>

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


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

--- frameworks/projects/rpc/src/mx/rpc/soap/Operation.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/Operation.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.rpc.soap
 {


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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -155,50 +155,15 @@
     //  Methods
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Certain styles require the text to be recomposed when the height
-     *  changes.
-     */
-    override protected function composeOnHeightChange():Boolean
-    {
-        if (super.composeOnHeightChange())
-            return true;
-
-        var verticalAlign:String = getStyle("verticalAlign");
-        var topAligned:Boolean = (verticalAlign == "top");
-
-        return !topAligned;
-    }
-
-    /**
-     *  @private
-     *  Certain styles require the text to be recomposed when the width
-     *  changes.
-     */
-    override protected function composeOnWidthChange():Boolean
-    {
-        if (super.composeOnWidthChange())
-            return true;
-
-        var direction:String = getStyle("direction");
-        var textAlign:String = getStyle("textAlign");
-
-        var leftAligned:Boolean =
-            textAlign == "left" ||
-            textAlign == "start" && direction == "ltr" ||
-            textAlign == "end" && direction == "rtl";
-
-        return !leftAligned;
-    }
-
+
     /**
      *  @private
      */
     override protected function composeTextLines(width:Number = NaN,
 												 height:Number = NaN):void
     {
+        super.composeTextLines(width, height);
+
         var elementFormat:ElementFormat = createElementFormat();

 		// Set the composition bounds to be used by createTextLines().
@@ -220,7 +185,6 @@
             mx_internal::textLines.length = 0;

 		var createdAllLines:Boolean = createTextLines(elementFormat);
-        var toFitLineBreak:Boolean = getStyle("lineBreak") == "toFit";

         // Need truncation if all the following are true
         // - truncation options exist (0=no trunc, -1=fill up bounds then trunc,
@@ -228,7 +192,7 @@
         // - compose width is specified
         // - explicit line breaking is not used
         // - content doesn't fit
-        if (truncation && toFitLineBreak &&
+        if (truncation && getStyle("lineBreak") == "toFit" &&
             !doesComposedTextFit(height, createdAllLines, truncation))
         {
             truncateText(width, height);
@@ -240,8 +204,11 @@
         // If toFit and explicit width, adjust the bounds to match.
         // This will save a recompose and/or clip in updateDisplayList() if
         // the bounds width matches the unscaled width.
-        if (toFitLineBreak && !isNaN(width) && mx_internal::bounds.width < width)
+        if (getStyle("lineBreak") == "toFit" &&
+            !isNaN(width) && mx_internal::bounds.width < width)
+        {
             mx_internal::bounds.width = width;
+        }

         // Add the new text lines to the container.
         mx_internal::addTextLines(DisplayObjectContainer(drawnDisplayObject));


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

--- frameworks/projects/framework/src/mx/binding/Binding.as
+++ frameworks/projects/framework/src/mx/binding/Binding.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.binding
 {


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

--- frameworks/projects/framework/src/mx/modules/IModule.as
+++ frameworks/projects/framework/src/mx/modules/IModule.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.modules
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 15081
Author:   cframpto@adobe.com
Date:     2010-03-26T21:57:05.712585Z

Log Message:
-----------
Merge changes LayoutDirection.as 15075 and UIFTETextField.as 15080 from 4.x to trunk.  SDK-26016.

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutDirection.as</path>

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

--- frameworks/projects/spark/src/mx/core/UIFTETextField.as
+++ frameworks/projects/spark/src/mx/core/UIFTETextField.as
@@ -18,6 +18,7 @@
 import flash.events.Event;
 import flash.geom.Matrix;
 import flash.text.TextField;
+import flash.text.TextFieldAutoSize;
 import flash.text.TextFieldType;
 import flash.text.TextFormat;
 import flash.text.TextFormatAlign;
@@ -728,17 +729,30 @@
         if (!parent)
             return NaN;

+        // Ensure a textLine gets created.  Either a width and height must
+        // be set or autoSize.
+        var oldAutoSize:String;
+        if (autoSize == TextFieldAutoSize.NONE && (width == 0 || height == 0))
+        {
+            oldAutoSize = autoSize;
+            autoSize = TextFieldAutoSize.LEFT;
+        }
+
         // getLineMetrics() returns strange numbers for an empty string,
         // so instead we get the metrics for a non-empty string.
         var isEmpty:Boolean = text == "";
         if (isEmpty)
             super.text = "Wj";

-        tlm = getLineMetrics(0);
-
-        if (isEmpty)
+       tlm = getLineMetrics(0);
+
+       // Restore values.
+       if (isEmpty)
             super.text = "";

+        if (oldAutoSize != null)
+            autoSize = oldAutoSize;
+
         // TextFields have 2 pixels of padding all around.
         return 2 + tlm.ascent;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5269
Author:   egeorgie@adobe.com
Date:     2009-03-12T18:35:42.425116Z

Log Message:
-----------
Remove style metadata for the non-inheriting verticalAlign, paddingLeft, paddingTop, paddingRight, paddingBottom styles.

QE Notes: None
Doc Notes:
Bugs: None
Reviewer: None
tests: checkintests, mustella

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextBox.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/NonInheritingTextLayoutFormatStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/BasicTextLayoutFormatStyles.as</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -38,6 +38,7 @@
 //--------------------------------------

 include "../styles/metadata/BasicTextLayoutFormatStyles.as"
+include "../styles/metadata/NonInheritingTextLayoutFormatStyles.as"

 [IconFile("TextBox.png")]


fixed bug where CSVDataSource wasn't updating metadata of columns

--- WeaveData/src/weave/data/DataSources/CSVDataSource.as
+++ WeaveData/src/weave/data/DataSources/CSVDataSource.as
@@ -508,9 +508,7 @@
 				return;
 			}

-			if (!metadata[ColumnMetadata.TITLE])
-				metadata[ColumnMetadata.TITLE] = colName;
-
+			metadata = generateMetadataForColumnId(columnId);
 			proxyColumn.setMetadata(metadata);

 			var strings:Vector.<String> = getColumnValues(parsedRows, colIndex, new Vector.<String>());


Modify KrewState

Modify KrewState

--- krew-framework/krewfw/builtin_actor/system/KrewState.as
+++ krew-framework/krewfw/builtin_actor/system/KrewState.as
@@ -3,6 +3,7 @@
     import krewfw.core.KrewActor;
     import krewfw.core_internal.KrewSharedObjects;
     import krewfw.utils.krew;
+    import krewfw.utils.swiss_knife.KrewTopUtil;

     /**
      * State Object for KrewStateMachine.
@@ -232,6 +233,10 @@
             return _stateMachine.sharedObj;
         }

+        public function get krew():KrewTopUtil {
+            return krewfw.utils.krew;
+        }
+
         //------------------------------------------------------------
         // called by KrewStateMachine
         //------------------------------------------------------------


fixed compile error

fixed compile error

Change-Id: Iddf5af7c910af8bca1d69fd0fc3965566d6cfa8f

--- WeaveUISpark/src/weave/visualization/layers/PlotManager.as
+++ WeaveUISpark/src/weave/visualization/layers/PlotManager.as
@@ -397,7 +397,8 @@
 					if ( geometry is GeneralizedGeometry )
 					{
 						var geometryAsSimpleGeometries:Array = (geometry as GeneralizedGeometry).getSimpleGeometries();
-						queriedKeys = spatialIndex.getKeysGeometryOverlapGeometries(geometryAsSimpleGeometries);
+						throw new Error("missing spatialIndex.getKeysGeometryOverlapGeometries()");
+						//queriedKeys = spatialIndex.getKeysGeometryOverlapGeometries(geometryAsSimpleGeometries);
 					}
 					else if (simpleGeometry)
 					{


Fixed indentation

Fixed indentation

--- src/Player.as
+++ src/Player.as
@@ -30,8 +30,8 @@

   public class Player extends Sprite {
     private var config:Object = {
-      'buffer' : 1,
-      'scaleUp' : false
+      'buffer': 1,
+      'scaleUp': false
     };
     private var video:Video;
     private var audioTransmit:AxisTransmit = new AxisTransmit();
@@ -98,7 +98,7 @@
     public function fullscreen(event:MouseEvent):void {
       if (this.fullscreenAllowed)
         this.stage.displayState = (StageDisplayState.NORMAL === stage.displayState) ?
-        StageDisplayState.FULL_SCREEN : StageDisplayState.NORMAL;
+          StageDisplayState.FULL_SCREEN : StageDisplayState.NORMAL;
     }

     public function videoResize():void {
@@ -202,18 +202,18 @@

     public function speakerVolume(volume:Number):void {
       this.savedSpeakerVolume = volume;
-	    var transform:SoundTransform = new SoundTransform(volume);
-	    flash.media.SoundMixer.soundTransform = transform;
+      var transform:SoundTransform = new SoundTransform(volume);
+      flash.media.SoundMixer.soundTransform = transform;
     }

     public function muteSpeaker():void {
-		  var transform:SoundTransform = new SoundTransform(0);
-		  flash.media.SoundMixer.soundTransform = transform;
+      var transform:SoundTransform = new SoundTransform(0);
+      flash.media.SoundMixer.soundTransform = transform;
     }

     public function unmuteSpeaker():void {
-		  var transform:SoundTransform = new SoundTransform(this.savedSpeakerVolume);
-		  flash.media.SoundMixer.soundTransform = transform;
+      var transform:SoundTransform = new SoundTransform(this.savedSpeakerVolume);
+      flash.media.SoundMixer.soundTransform = transform;
     }

     public function microphoneVolume(volume:Number):void {