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

--- frameworks/projects/advancedgrids/src/mx/olap/OLAPDimension.as
+++ frameworks/projects/advancedgrids/src/mx/olap/OLAPDimension.as
@@ -0,0 +1,495 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.olap
+{
+
+import flash.utils.Dictionary;
+
+import mx.collections.ArrayCollection;
+import mx.collections.ICollectionView;
+import mx.collections.IList;
+import mx.collections.IViewCursor;
+import mx.core.mx_internal;
+import mx.resources.ResourceManager;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="dimension", kind="property")]
+
+//--------------------------------------
+//  metadata
+//--------------------------------------
+
+[DefaultProperty("elements")]
+
+/**
+ *  The OLAPDimension class represents a dimension of an OLAP cube.
+ *
+ *  @mxml
+ *

+ *  The <mx:OLAPDimension> tag inherits all of the tag attributes
+ *  of its superclass, and adds the following tag attributes:
+ *

+ *

+ *  <mx:OLAPDimension
+ *    Properties
+ *    attributes=""
+ *    elements=""
+ *    hierarchies=""
+  *  />
+ *
+ *  @see mx.olap.IOLAPDimension
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class OLAPDimension extends OLAPElement implements IOLAPDimension
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor
+     *
+     *  @param name The name of the OLAP dimension that includes the OLAP schema hierarchy of the element.
+     *
+     *  @param displayName The name of the OLAP dimension, as a String, which can be used for display.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function OLAPDimension(name:String=null, displayName:String=null)
+    {
+        OLAPTrace.traceMsg("Creating dimension: " + name, OLAPTrace.TRACE_LEVEL_3);
+        super(name, displayName);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    //map of attributes using name as the key
+    private var attributeMap:Dictionary = new Dictionary(true);
+
+    //map of hierarchies using name as the key
+    private var _hierarchiesMap:Dictionary = new Dictionary(true);
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // attributes
+    //----------------------------------
+
+    private var _attributes:IList = new ArrayCollection;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get attributes():IList
+    {
+        return _attributes;
+    }
+
+    /**
+     *  @private
+     */
+    public function set attributes(value:IList):void
+    {
+        _attributes = value;
+        var n:int = value.length;
+        for (var attrIndex:int = 0; attrIndex < n; ++attrIndex)
+        {
+            var attr:OLAPAttribute = value.getItemAt(attrIndex) as OLAPAttribute;
+            attr.dimension = this;
+            attributeMap[attr.name] = attr;
+        }
+    }
+
+    //----------------------------------
+    // cube
+    //----------------------------------
+
+    private var _cube:IOLAPCube;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get cube():IOLAPCube
+    {
+        return _cube;
+    }
+
+    /**
+     *  @private
+     */
+    public function set cube(value:IOLAPCube):void
+    {
+        _cube = value;
+    }
+
+    //----------------------------------
+    // dataProvider
+    //----------------------------------
+
+    mx_internal function get dataProvider():ICollectionView
+    {
+        return OLAPCube(cube).dataProvider;
+    }
+
+    //----------------------------------
+    // defaultMember
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get defaultMember():IOLAPMember
+    {
+        // get the default hierarchy here
+        if ((hierarchies.length + attributes.length) > 1)
+        {
+            var message:String = ResourceManager.getInstance().getString(
+                        "olap", "multipleHierarchies");
+            throw Error(message);
+        }
+
+        return hierarchies[0].defaultMember;
+    }
+
+    //----------------------------------
+    // elements
+    //----------------------------------
+
+    /**
+     *  Processes the input Array and initializes the attributes
+     *  and hierarchies properties based on the elements of the Array.
+     *  Attributes are represented in the Array by instances of the OLAPAttribute class,
+     *  and hierarchies are represented by instances of the OLAPHierarchy class.
+     *
+     *
Use this property to define the attributes and hierarchies of a cube in a single Array.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set elements(value:Array):void
+    {
+        var attrs:ArrayCollection = new ArrayCollection();
+        var userHierarchies:ArrayCollection = new ArrayCollection();
+        for each (var element:Object in value)
+        {
+            if (element is OLAPAttribute)
+                attrs.addItem(element);
+            else if (element is OLAPHierarchy)
+                userHierarchies.addItem(element);
+            else
+                OLAPTrace.traceMsg("Invalid element specified for dimension elements");
+        }
+
+        attributes = attrs;
+        hierarchies = userHierarchies;
+    }
+
+    //----------------------------------
+    // hierarchies
+    //----------------------------------
+
+    private var _hierarchies:IList = new ArrayCollection;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get hierarchies():IList
+    {
+        return _hierarchies;
+    }
+
+    /**
+     *  @private
+     */
+    public function set hierarchies(value:IList):void
+    {
+        //limitation till we support multiple hierarchies.
+        if (value.length > 1)
+        {
+            var message:String = ResourceManager.getInstance().getString(
+                        "olap", "multipleHierarchiesNotSupported", [name]);
+            throw Error(message);
+        }
+
+        _hierarchies = value;
+        for (var i:int = 0; i < value.length; ++i)
+        {
+            var h:OLAPHierarchy = value.getItemAt(i) as OLAPHierarchy;
+            h.dimension = this;
+            _hierarchiesMap[h.name] = h;
+        }
+    }
+
+    //----------------------------------
+    // isMeasure
+    //----------------------------------
+
+    private var _isMeasureDimension:Boolean = false;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get isMeasure():Boolean
+    {
+        return _isMeasureDimension;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function setAsMeasure(value:Boolean):void
+    {
+        _isMeasureDimension = value;
+    }
+
+    //----------------------------------
+    // members
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get members():IList
+    {
+        var temp:Array = [];
+
+        for (var i:int = 0; i < hierarchies.length; ++i)
+            temp = temp.concat(hierarchies.getItemAt(i).members.toArray());
+
+        return new ArrayCollection(temp);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+     public function findHierarchy(name:String):IOLAPHierarchy
+    {
+        return _hierarchiesMap[name];
+    }
+
+    /**
+    *  @inheritDoc
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public function findAttribute(name:String):IOLAPAttribute
+    {
+        return attributeMap[name];
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function findMember(name:String):IOLAPMember
+    {
+        var member:IOLAPMember;
+        var i:int = 0;
+        var h:OLAPHierarchy;
+
+        for (i = 0; i < attributes.length; ++i)
+        {
+            h = attributes.getItemAt(i) as OLAPHierarchy;
+            member = h.findMember(name);
+            if (member)
+                break;
+        }
+
+        if (!member)
+        {
+            for (i = 0; i < hierarchies.length; ++i)
+            {
+                h = hierarchies.getItemAt(i) as OLAPHierarchy;
+                member = h.findMember(name);
+                if (member)
+                    break;
+            }
+        }
+
+        return member;
+    }
+
+    /**
+     *  @private
+     *  Creates a hierarchy of the dimension.
+     *
+     *  @param name The name of the hierarchy.
+     *
+     *  @return An OLAPHierarchy instance that represents the new hierarchy.
+     */
+    mx_internal function createHierarchy(name:String):OLAPHierarchy
+    {
+        var h:OLAPHierarchy = new OLAPHierarchy(name);
+        h.dimension = this;
+        _hierarchies.addItem(h);
+        _hierarchiesMap[h.name] = h;
+        return h;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function refresh():void
+    {
+        //if dimension is of measure type we have nothing to do.
+        if (isMeasure)
+            return;
+        var temp:Object;
+        var dataHandlers:Array  =[];
+
+        var i:int = 0;
+        var n:int = attributes.length;
+        for (i = 0; i < n; ++i)
+        {
+            temp = attributes.getItemAt(i);
+            dataHandlers.push(temp);
+        }
+
+        n = hierarchies.length;
+        for (i = 0; i < n; ++i)
+        {
+            temp = hierarchies.getItemAt(i);
+            temp.refresh();
+            dataHandlers.push(temp);
+        }
+
+        for (i = 0; i < n; ++i)
+        {
+            var h:OLAPHierarchy = hierarchies.getItemAt(i) as OLAPHierarchy;
+            var levels:IList = h.levels;
+            var m:int = levels.length;
+            for (var j:int = 0; j < m; ++j)
+            {
+                var level:OLAPLevel = levels[j];
+                //levels doesn't include allLevel
+                //if (level == h.allLevel)
+                //    continue;
+                var a:OLAPAttribute = findAttribute(level.name) as OLAPAttribute;
+                a.userHierarchy = level.hierarchy;
+                a.userHierarchyLevel = level;
+            }
+        }
+
+        // we need to refresh attributes here because we need the userHierarchy
+        // userLevels to be set before refresh can happen.
+        n = attributes.length;
+        for (i = 0; i < n; ++i)
+        {
+            temp = attributes.getItemAt(i);
+            temp.refresh();
+        }
+
+        var iterator:IViewCursor = dataProvider.createCursor();
+
+        while (!iterator.afterLast)
+        {
+            var currentData:Object = iterator.current;
+            for each (temp in dataHandlers)
+                temp.processData(currentData);
+            iterator.moveNext();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function addAttribute(name:String, dataField:String):IOLAPAttribute
+    {
+        var attrHierarchy:OLAPAttribute = attributeMap[name];
+        if (!attrHierarchy)
+        {
+            attrHierarchy = new OLAPAttribute(name);
+            attrHierarchy.dataField = dataField;
+            attrHierarchy.dimension = this;
+            attributeMap[name] = attrHierarchy;
+            _attributes.addItem(attrHierarchy);
+        }
+        return attrHierarchy;
+    }
+
+}
+
+}


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 11909
Author:   rfrishbe@adobe.com
Date:     2009-11-17T21:38:09.638135Z

Log Message:
-----------
Updating OSMF to new flex4 branch.  We will eventually take a pre-built SWC from them as well, but for now we will continue building it.

With this update, some events that we dispatch change. This update also fixes several bugs for us.

I also got rid of a FIXME in VolumeBar around commitData in closeDropDown().

QE notes: -
Doc notes: -
Bugs: SDK-24192, SDK-24194, SDK-24289
Reviewer: Jason for the VolumeBar changes, Kevin for the rest
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
222 paths were modified

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

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

 import flash.events.Event;
-import flash.events.ProgressEvent;
 import flash.geom.Point;
 import flash.media.Video;

@@ -25,39 +24,26 @@

 import org.osmf.display.MediaPlayerSprite;
 import org.osmf.display.ScaleMode;
-import org.osmf.events.BufferTimeChangeEvent;
-import org.osmf.events.BytesDownloadedChangeEvent;
-import org.osmf.events.DimensionChangeEvent;
-import org.osmf.events.DurationChangeEvent;
-import org.osmf.events.LoadableStateChangeEvent;
+import org.osmf.display.ScaleModeUtils;
+import org.osmf.events.AudioEvent;
+import org.osmf.events.DimensionEvent;
+import org.osmf.events.LoadEvent;
 import org.osmf.events.MediaPlayerStateChangeEvent;
-import org.osmf.events.MutedChangeEvent;
-import org.osmf.events.PlayheadChangeEvent;
 import org.osmf.events.PlayingChangeEvent;
-import org.osmf.events.SeekingChangeEvent;
-import org.osmf.events.TraitEvent;
-import org.osmf.events.VolumeChangeEvent;
-import org.osmf.media.IMediaResource;
-import org.osmf.media.MediaFactory;
+import org.osmf.events.TimeEvent;
 import org.osmf.media.MediaPlayer;
 import org.osmf.media.MediaPlayerState;
 import org.osmf.media.URLResource;
 import org.osmf.net.NetLoader;
-import org.osmf.net.NetStreamCodes;
 import org.osmf.net.dynamicstreaming.DynamicStreamingItem;
 import org.osmf.net.dynamicstreaming.DynamicStreamingNetLoader;
 import org.osmf.net.dynamicstreaming.DynamicStreamingResource;
-import org.osmf.traits.ILoadable;
-import org.osmf.traits.LoadState;
-import org.osmf.traits.MediaTraitType;
 import org.osmf.utils.FMSURL;
-import org.osmf.utils.MediaFrameworkStrings;
 import org.osmf.utils.URL;
 import org.osmf.video.VideoElement;

 import spark.components.mediaClasses.DynamicStreamingVideoItem;
 import spark.components.mediaClasses.DynamicStreamingVideoSource;
-import spark.events.VideoEvent;
 import spark.primitives.BitmapImage;

 use namespace mx_internal;
@@ -67,34 +53,54 @@
 //--------------------------------------

 /**
- * Dispatched when the data is received as a download operation progresses.
+ *  Dispatched when the data is received as a download operation progresses.
  *
- * @eventType flash.events.ProgressEvent
+ *  @eventType org.osmf.events.LoadEvent.BYTES_LOADED_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.0
+ *  @productversion OSMF 1.0
  */
-[Event(name="bytesDownloadedChange",type="org.osmf.events.BytesDownloadedChangeEvent")]
+[Event(name="bytesLoadedChange",type="org.osmf.events.LoadEvent")]

 /**
- * Dispatched when the MediaPlayer's state has changed.
+ *  Dispatched when the currentTime property of the MediaPlayer has changed.
+ *  This value is updated at the interval set by
+ *  the MediaPlayer's currentTimeUpdateInterval property.
+ *
+ *  @eventType org.osmf.events.TimeEvent.CURRENT_TIME_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.0
+ *  @productversion OSMF 1.0
+ **/
+[Event(name="currentTimeChange",type="org.osmf.events.TimeEvent")]
+
+/**
+ *  Dispatched when the duration property of the media has changed.
  *
- * @eventType org.osmf.events.PlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE
+ *  @eventType org.osmf.events.TimeEvent.DURATION_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.0
+ *  @productversion OSMF 1.0
+ */
+[Event(name="durationChange", type="org.osmf.events.TimeEvent")]
+
+/**
+ *  Dispatched when the MediaPlayer's state has changed.
+ *
+ *  @eventType org.osmf.events.MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.0
+ *  @productversion OSMF 1.0
  */
 [Event(name="mediaPlayerStateChange", type="org.osmf.events.MediaPlayerStateChangeEvent")]
-
-/**
- * Dispatched when the playhead property of the MediaPlayer has changed.
- * This value is updated at the interval set by
- * the MediaPlayer's playheadUpdateInterval property.
- *
- * @eventType org.osmf.events.PlayheadChangeEvent.PLAYHEAD_CHANGE
- **/
-[Event(name="playheadChange",type="org.osmf.events.PlayheadChangeEvent")]
-
-/**
- * Dispatched when the duration property of the media has changed.
- *
- * @eventType org.osmf.events.DurationChangeEvent.DURATION_CHANGE
- */
-[Event(name="durationChange", type="org.osmf.events.DurationChangeEvent")]

 //--------------------------------------
 //  Other metadata
@@ -322,8 +328,10 @@
      */
     public function get bytesLoaded():Number
     {
-        return videoPlayer.bytesDownloaded;
-    }
+        return videoPlayer.bytesLoaded;
+    }
+
+    // FIXME (rfrishbe): Need to add mediaPlayerState property?

     //----------------------------------
     //  bytesTotal
@@ -671,24 +679,20 @@
             var streamingSource:DynamicStreamingVideoSource = source as DynamicStreamingVideoSource;
             var dsr:DynamicStreamingResource;

-            dsr =  new DynamicStreamingResource(new FMSURL(streamingSource.serverURI));
-
-            // if dealing with a live streaming video, set start = -1
-            // otherwise we don't worry about the start parameter
-            if (streamingSource.streamType == "live")
-                dsr.start = DynamicStreamingResource.START_LIVE;
-            else if (streamingSource.streamType == "recorded")
-                dsr.start = DynamicStreamingResource.START_VOD;
+            dsr =  new DynamicStreamingResource(new FMSURL(streamingSource.serverURI), streamingSource.streamType);

             var n:int = streamingSource.streamItems.length;
             var item:DynamicStreamingVideoItem;
             var dsi:DynamicStreamingItem;
+            var streamItems:Vector.<DynamicStreamingItem> = new Vector.<DynamicStreamingItem>(n);
+
             for (var i:int = 0; i < n; i++)
             {
-                item = DynamicStreamingVideoItem(streamingSource.streamItems[i]);
+                item = streamingSource.streamItems[i];
                 dsi = new DynamicStreamingItem(item.streamName, item.bitrate);
-                dsr.addItem(dsi);
+                streamItems[i] = dsi;
             }
+            dsr.streamItems = streamItems;

             dsr.initialIndex = streamingSource.initialIndex;

@@ -961,7 +965,7 @@
         if (thumbnailSource && thumbnailGroup)
         {
             // get what the size of our image should be
-            var newSize:Point = videoSprite.scaleMode.getScaledSize(unscaledWidth, unscaledHeight,
+            var newSize:Point = ScaleModeUtils.getScaledSize(scaleMode, unscaledWidth, unscaledHeight,
                 thumbnailGroup.getPreferredBoundsWidth(), thumbnailGroup.getPreferredBoundsHeight());

             thumbnailGroup.setLayoutBoundsSize(newSize.x, newSize.y);
@@ -1136,13 +1140,16 @@
         videoPlayer = new MediaPlayer();
         videoSprite = new MediaPlayerSprite(videoPlayer);

-        videoPlayer.addEventListener(DimensionChangeEvent.DIMENSION_CHANGE, videoPlayer_dimensionChangeHandler);
-        videoPlayer.addEventListener(VolumeChangeEvent.VOLUME_CHANGE, videoPlayer_volumeChangeHandler);
-        videoPlayer.addEventListener(MutedChangeEvent.MUTED_CHANGE, videoPlayer_mutedChangeHandler);
+        // internal events
+        videoPlayer.addEventListener(DimensionEvent.DIMENSION_CHANGE, videoPlayer_dimensionChangeHandler);
+        videoPlayer.addEventListener(AudioEvent.VOLUME_CHANGE, videoPlayer_volumeChangeHandler);
+        videoPlayer.addEventListener(AudioEvent.MUTED_CHANGE, videoPlayer_mutedChangeHandler);
+
+        // public events
         videoPlayer.addEventListener(MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE, dispatchEvent);
-        videoPlayer.addEventListener(PlayheadChangeEvent.PLAYHEAD_CHANGE, dispatchEvent);
-        videoPlayer.addEventListener(BytesDownloadedChangeEvent.BYTES_DOWNLOADED_CHANGE, dispatchEvent);
-        videoPlayer.addEventListener(DurationChangeEvent.DURATION_CHANGE, dispatchEvent);
+        videoPlayer.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, dispatchEvent);
+        videoPlayer.addEventListener(LoadEvent.BYTES_LOADED_CHANGE, dispatchEvent);
+        videoPlayer.addEventListener(TimeEvent.DURATION_CHANGE, dispatchEvent);

         addChild(videoSprite);
     }
@@ -1245,7 +1252,7 @@
             // 3) loading
             // Here we are checking if we are playing or loading
             // and going to play soon (autoPlay = true)
-            if (causePause && (playing || (videoPlayer.state == MediaPlayerState.INITIALIZING && autoPlay)))
+            if (causePause && (playing || (videoPlayer.state == MediaPlayerState.LOADING && autoPlay)))
                 playTheVideoOnVisible = true;

             // always set autoPlay to false here and
@@ -1422,7 +1429,7 @@
     /**
      *  @private
      */
-    private function videoPlayer_dimensionChangeHandler(event:DimensionChangeEvent):void
+    private function videoPlayer_dimensionChangeHandler(event:DimensionEvent):void
     {
         invalidateSize();
     }
@@ -1430,7 +1437,7 @@
     /**
      *  @private
      */
-    private function videoPlayer_volumeChangeHandler(event:VolumeChangeEvent):void
+    private function videoPlayer_volumeChangeHandler(event:AudioEvent):void
     {
         dispatchEvent(new Event("volumeChanged"));
     }
@@ -1438,7 +1445,7 @@
     /**
      *  @private
      */
-    private function videoPlayer_mutedChangeHandler(event:MutedChangeEvent):void
+    private function videoPlayer_mutedChangeHandler(event:AudioEvent):void
     {
         dispatchEvent(new Event("volumeChanged"));
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4646
Author:   pfarland@adobe.com
Date:     2009-01-23T18:45:23.310008Z

Log Message:
-----------
As part of the Advanced CSS work, adding support for pseudo-selectors that match component states. There are two scenarios for matching states.

1. For skinnable Spark subclasses of FxComponents, such as FxButton. The pseudo-selector will be matched against the current skin state.

2. For other UIComponents, the pseudo-selector is matched against the currentState. Note that since states are declared at the document level, pseudo-selectors are written to match the component representing the document only (rather than an arbitrary child component of that document). Note that as with styles in general, it is not advised to make changes to inheriting styles at the Application root as this impacts all child components in the display list.

Note that further optimization will be investigated to limit the number of components that are redrawn where a change in state is accompanied by a matching pseudo-selector.

QE: Yes
Doc: Yes, see the Advanced CSS specification for Gumbo.
Checkintests: Pass
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager3.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as
+++ frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as
@@ -387,9 +387,12 @@
      *  Determines whether the selector chain for this style declaration makes
      *  use of a pseudo selector.
      */
-    public function isPseudoSelector():Boolean
-    {
-        return selector != null && selector.isPseudoSelector();
+    public function getPseudoSelector():String
+    {
+        if (selector != null)
+            return selector.getPseudoSelector();
+
+        return null;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 4242
Author:   gpburch@adobe.com
Date:     2008-12-05T20:13:00.217232Z

Log Message:
-----------
FxRadioButtonGroup had an uneeded dependency on Application. Modified it to reference ApplicationGlobals.application instead.

QE: No
Doc: No
Checkintests: Pass
Reviewer: Ryan F. Darrell, Corey L.
Bugs: None

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButtonGroup.as

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

--- frameworks/projects/spark/src/spark/components/RadioButtonGroup.as
+++ frameworks/projects/spark/src/spark/components/RadioButtonGroup.as
@@ -16,7 +16,7 @@
 import flash.display.DisplayObjectContainer;
 import flash.events.Event;
 import flash.events.EventDispatcher;
-import mx.core.Application;
+import mx.core.ApplicationGlobals;
 import mx.core.IFlexDisplayObject;
 import mx.core.IMXMLObject;
 import mx.core.IRawChildrenContainer;
@@ -323,7 +323,7 @@
     {
         this.document = document ?
                         IFlexDisplayObject(document) :
-                        IFlexDisplayObject(Application.application);
+                        IFlexDisplayObject(ApplicationGlobals.application);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 4009
Author:   jimurphy@adobe.com
Date:     2008-11-04T15:10:34.970681Z

Log Message:
-----------
Merged alpha_gumbo revisions 3929,3936-3937,3945,3956,3971,3986,3994,4002,4006 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.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/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon_small.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.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/framework/src/mx/effects/effectClasses/TweenEffectInstance.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon_small.png</path>

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

--- frameworks/projects/spark/src/spark/effects/animation/Animation.as
+++ frameworks/projects/spark/src/spark/effects/animation/Animation.as
@@ -701,7 +701,7 @@
      */
     public function end():void
     {
-        if (id >= 0)
+        if (id >= 0 || duration == 0)
         {
             // TODO (chaase): Check whether we already send out a final
             // UPDATE event with the end value; if so, this dup should be
@@ -763,27 +763,78 @@
      *  @param playheadTime The position, in milliseconds, between 0
      *  and the value of the duration property.
      */
-    public function seek(playheadTime:Number):void
+    public function seek(playheadTime:Number, includeStartDelay:Boolean = false):void
     {
         // Set value between 0 and duration
         //playheadTime = Math.min(Math.max(playheadTime, 0), duration);

-        var clockTime:Number = intervalTime;
-
         // Reset the start time
-        startTime = clockTime - playheadTime;
-
-        _doSeek = true;
+        // TODO (chaase): Redundant for cases that set this again below
+        // Should only do this for playing animation, as the stopped animations
+        // do it for themselves
+        startTime = _intervalTime - playheadTime;

         if (!_isPlaying)
         {
+            _doSeek = true;
+            _intervalTime = Timeline.currentTime;
+            // TODO: comments...
+            if (includeStartDelay && startDelay > 0)
+            {
+                if (delayedStartTimes[this])
+                {
+                    // TODO (chaase): refactor removal/addition into utility functions
+                    // Still sleeping - reduce the delay time by the seek time
+                    var animPendingTime:int = delayedStartTimes[this];
+                    for (var i:int = 0; i < delayedStartAnims.length; ++i)
+                    {
+                        if (delayedStartAnims[i] == this)
+                        {
+                            delayedStartAnims.splice(i, 1);
+                            break;
+                        }
+                    }
+                    delete delayedStartTimes[this];
+                    var postDelaySeekTime:Number = playheadTime - startDelay;
+                    if (postDelaySeekTime < 0)
+                    {
+                        animPendingTime -= playheadTime;
+                        // add it back into the array in the proper order
+                        var insertIndex:int = -1;
+                        for (i = 0; i < delayedStartAnims.length; ++i)
+                        {
+                            if (animPendingTime < delayedStartTimes[delayedStartAnims[i]])
+                            {
+                                insertIndex = i;
+                                break;
+                            }
+                        }
+                        if (insertIndex >= 0)
+                            delayedStartAnims.splice(insertIndex, 0, this);
+                        else
+                            delayedStartAnims.push(this);
+                        delayedStartTimes[this] = animPendingTime;
+                        return;
+                    }
+                    else
+                    {
+                        // reduce seek time by startTime; we will go ahead and
+                        // seek into the now-playing animation by that much
+                        playheadTime -= startDelay;
+                        _doSeek = false;
+                        start();
+                        startTime = _intervalTime - playheadTime;
+                        doInterval();
+                        return;
+                    }
+                }
+            }
             // start/end values only valid after animation starts
             sendAnimationEvent(AnimationEvent.ANIMATION_START, startValue);
             setupInterpolation();
-            _intervalTime = Timeline.currentTime;
             startTime = _intervalTime - playheadTime;
-            doInterval();
-        }
+        }
+        doInterval();
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 21363
Author:   deeptika@adobe.com
Date:     2011-06-09T06:57:13.190023Z

Log Message:
-----------
Submitting patch from Sameer
Fix is to fetch the itemrenderer once to avoid it from getting purged unnecessarily
QE notes:
Doc notes:
Bugs: FLEXDMV-2577 (AdvancedDataGrid crash with rowHeight is set and editable=true)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as

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

--- frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
+++ frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
@@ -6319,6 +6319,11 @@
                 else
                     setRowHeight(20);
             }
+			else
+			{
+				// fetch the itemRenderer so that it gets initialized
+				var obj:Object = itemRenderer;
+			}
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

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:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListBaseSelectionData.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListBaseSelectionData.as
@@ -21,6 +21,11 @@
  *  Each selected item is represented by an instance of this class.
  *
  *  @see mx.controls.listClasses.ListBase#selectedData
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ListBaseSelectionData
 {
@@ -40,6 +45,11 @@
 	 *  @param index The index in the data provider of the selected item. (may be approximate)
 	 *
 	 *  @param approximate If true, then the index property is an approximate value and not the exact value.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function ListBaseSelectionData(data:Object, index:int,
 										  approximate:Boolean)
@@ -89,6 +99,11 @@

 	/**
 	 *  If true, then the index property is an approximate value and not the exact value.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var approximate:Boolean;

@@ -98,6 +113,11 @@

 	/**
 	 *  The data Object that is selected (selectedItem)
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var data:Object;

@@ -107,6 +127,11 @@

 	/**
 	 *  The index in the data provider of the selected item. (may be approximate)
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var index:int;
 }


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

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

 package mx.controls.treeClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18567
Author:   klin@adobe.com
Date:     2010-11-13T00:28:51.781896Z

Log Message:
-----------
Fix for Bindable metadata being in the wrong place in DataGrid, Grid and GridColumn. Made GridColumn.editable Bindable. variableRowHeight and resizableColumns were also not dispatching a change event. I also took the liberty of performing some code clean up and fixing some docs.

QE notes: Check properties to make sure they're Bindable
Doc notes: No
Bugs: SDK-28464
Reviewer: Hans
Tests run: DataGrid, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridRowList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRendererOwner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/UITextFieldGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellRegion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridRowNode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelectionMode.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
@@ -13,18 +13,17 @@
 {
 import flash.geom.Rectangle;

+import mx.collections.ICollectionView;
 import mx.collections.IList;
 import mx.core.mx_internal;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
-import mx.collections.ICollectionView;

 import spark.components.Grid;
 import spark.components.gridClasses.CellPosition;

 use namespace mx_internal;

-
 /**
  *  <p>Track a Grid's selectionMode and its set of selected rows, columns, or cells.
  *  The selected elements are defined by integer indices, where row indices are
@@ -113,7 +112,12 @@
     //--------------------------------------------------------------------------

     /**
-     *  @private
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function GridSelection()
     {
@@ -133,7 +137,15 @@
     private var _grid:Grid;

     /**
-     *  @private
+     *  This value is created by DataGrid/partAdded() and then set here.
+     *  This property should only be set once.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function get grid():Grid
     {
@@ -141,15 +153,7 @@
     }

     /**
-     *  This value is created by DataGrid/partAdded() and then set here.
-     *  It is should only be set once.
-     *
-     *  @default null
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
+     *  @private
      */
     public function set grid(value:Grid):void
     {
@@ -249,7 +253,6 @@
     //  selectionLength
     //----------------------------------

-    //
     /**
      *  @private
      *  Cache the selectionLength.  Only recalculate if selectionLength is -1.
@@ -1673,7 +1676,6 @@

 import flash.geom.Rectangle;

-
 /**
  * @private
  * A CellRect is a rectangle with one additional, isAdd property.
@@ -1701,4 +1703,4 @@
     {
         return contains(cellColumnIndex, cellRowIndex);
     }
-}
+}


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 22729
Author:   chiedozi@adobe.com
Date:     2011-09-24T01:03:12.911219Z

Log Message:
-----------
Changed how a card FlipViewTransition animates along the z axis to ensure that it stays within the bounds of the view while running

QE notes:
Doc notes:
Bugs: SDK-31618
Reviewer: Max
Tests run: checkintests-mobile, mustella-mobile
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
@@ -17,6 +17,7 @@
 import flash.geom.Matrix3D;
 import flash.geom.PerspectiveProjection;
 import flash.geom.Point;
+import flash.geom.Vector3D;

 import mx.core.FlexGlobals;
 import mx.core.ILayoutElement;
@@ -27,6 +28,7 @@
 import mx.effects.Parallel;
 import mx.events.EffectEvent;
 import mx.events.FlexEvent;
+import mx.geom.TransformOffsets;
 import mx.managers.SystemManager;

 import spark.components.Application;
@@ -416,30 +418,6 @@
         var vector:Vector.<MotionPath> = new Vector.<MotionPath>();
         vector.push(new SimpleMotionPath(animatedProperty, 0, directionModifier * 180));

-        // Creation motion path for the target's z property.
-        var mp:MotionPath = new MotionPath("z");
-        vector.push(mp);
-
-        // Generate key frames for the z animation
-        var keyframes:Vector.<Keyframe> = new Vector.<Keyframe>();
-
-        var keyFrame:Keyframe = new Keyframe();
-        keyFrame.time = 0;
-        keyFrame.value = 0;
-        keyframes.push(keyFrame);
-
-        keyFrame = new Keyframe();
-        keyFrame.time = duration / 2;
-        keyFrame.value = width / 2;
-        keyframes.push(keyFrame);
-
-        keyFrame = new Keyframe();
-        keyFrame.time = duration;
-        keyFrame.value = 0;
-        keyframes.push(keyFrame);
-
-        mp.keyframes = keyframes;
-
         // Configure the remainder of our animation parameters and install
         // an update listener so that we can hide the old view once it's out
         // of view.
@@ -477,6 +455,39 @@

                 cachedNavigator.displayObject.visible = false;
             }
+        }
+
+        if (mode == FlipViewTransitionMode.CARD)
+        {
+            var topRight:Vector3D = new Vector3D(viewWidth, 0, 0);
+            var bottomLeft:Vector3D = new Vector3D(0, viewHeight, 0);
+
+            var matrix:Matrix3D = new Matrix3D();
+            matrix.identity();
+
+            if (vertical)
+            {
+            	// Flipping around X axis
+                matrix.appendTranslation(0, -viewHeight/2, 0);
+                matrix.appendRotation(transitionGroup.rotationX, new Vector3D(1, 0, 0));
+                matrix.appendTranslation(0, viewHeight/2, 0);
+
+            }
+            else
+            {
+            	// Flipping around Y axis
+                matrix.appendTranslation(-viewWidth/2, 0, 0);
+                matrix.appendRotation(transitionGroup.rotationY, new Vector3D(0, 1, 0));
+                matrix.appendTranslation(viewWidth/2, 0, 0);
+            }
+
+            var newTopRight:Vector3D = matrix.transformVector(topRight);
+            var newBottomLeft:Vector3D = matrix.transformVector(bottomLeft);
+
+            if (!transitionGroup.postLayoutTransformOffsets)
+                transitionGroup.postLayoutTransformOffsets = new TransformOffsets();
+
+            transitionGroup.postLayoutTransformOffsets.z = -Math.min(newTopRight.z, newBottomLeft.z);
         }

         // Ensure transform matrix is updated even when layout is disabled.


Commit Issue 1038 for Bas

Commit Issue 1038 for Bas

git-svn-id: d565a5fbffec933846bf643895bf9c245569575b@2067 59b500cc-1b3d-0410-9834-0bbf25fbcc57

--- actionscript/core/src/com/google/zxing/qrcode/encoder/MaskUtil.as
+++ actionscript/core/src/com/google/zxing/qrcode/encoder/MaskUtil.as
@@ -124,7 +124,7 @@
             }
             var numTotalCells:int = matrix.height() * matrix.width();
             var darkRatio:Number = numDarkCells / numTotalCells;
-            return Math.abs(Math.round(darkRatio * 100 - 50)) / 5 * 10;
+            return int(Math.abs(int(darkRatio * 100 - 50)) / 5) * 10;
         }

         // Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask
@@ -146,7 +146,7 @@
                 case 3:
                     return ((y + x) % 3 == 0) ? 1 : 0;
                 case 4:
-                    return (((y / 2) + (x / 3)) % 2 == 0) ? 1 : 0;
+                    return ((int(y / 2) + int(x / 3)) % 2 == 0) ? 1 : 0;
                 case 5:
                     return (((y * x) % 2) + ((y * x) % 3) == 0) ? 1 : 0;
                 case 6:


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

--- frameworks/projects/automation_spark/src/spark/automation/tabularData/SparkListBaseTabularData.as
+++ frameworks/projects/automation_spark/src/spark/automation/tabularData/SparkListBaseTabularData.as
@@ -0,0 +1,250 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.automation.tabularData
+{
+
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationTabularData;
+	import mx.core.mx_internal;
+
+	import spark.components.IItemRenderer;
+	import spark.components.supportClasses.ListBase;
+	import spark.layouts.HorizontalLayout;
+	import spark.layouts.VerticalLayout;
+	import mx.events.DragEvent;
+
+	use namespace mx_internal;
+
+	/**
+	 *  @private
+	 */
+	public class SparkListBaseTabularData
+		implements IAutomationTabularData
+	{
+
+		private var sparkList:spark.components.supportClasses.ListBase;
+
+		/**
+		 *  Constructor
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function SparkListBaseTabularData(l:spark.components.supportClasses.ListBase)
+		{
+			super();
+
+			sparkList = l;
+		}
+
+		/**
+		 * private
+		 */
+		private function getVisibleRows():Array
+		{
+			var visibleRows:Array = new Array();
+
+			var count:int = sparkList.dataGroup.numElements;
+			for (var i:int = 0; i<count ; i++)
+			{
+				var currentObj:Object = sparkList.dataGroup.getElementAt(i);
+				if( currentObj is IItemRenderer)
+					visibleRows.push(currentObj);
+			}
+			return visibleRows;
+		}
+
+
+
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function get firstVisibleRow():int
+		{
+			if(sparkList.layout is VerticalLayout)
+				return (sparkList.layout as VerticalLayout).firstIndexInView;
+			else if(sparkList.layout is HorizontalLayout)
+				return (sparkList.layout as HorizontalLayout).firstIndexInView;
+			return 0;
+
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function get lastVisibleRow():int
+		{
+			if(sparkList.layout is VerticalLayout)
+				return (sparkList.layout as VerticalLayout).lastIndexInView ;
+			else if(sparkList.layout is HorizontalLayout)
+				return (sparkList.layout as HorizontalLayout).lastIndexInView ;
+
+
+			// this is index based data. so we need to subtract one from the number of rows.
+			//http://bugs.adobe.com/jira/browse/FLEXENT-1100
+			return numRows-1;
+
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function get numRows():int
+		{
+			return (sparkList.dataGroup ? sparkList.dataGroup.numElements:0);
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function get numColumns():int
+		{
+			return 1;
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function get columnNames():Array
+		{
+			return [ "" ];
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function getValues(start:uint = 0, end:uint = 0):Array
+		{
+			// note: getElementAt(i) is based on total elements and it returns
+			// null for the item rendereres if they are not visible
+			// if the useVirtualLayout is true. so we dont need
+			// special handing of the index
+
+			var values:Array = [ ];
+			if (sparkList.dataGroup)
+			{
+				var alreadyProcessedCount:int  = 0;
+
+				if(sparkList.useVirtualLayout == true)
+				{
+					var stopIndex:int  = firstVisibleRow;
+					for( var x:int=start;  x < stopIndex ; x++ )
+					{
+						var currentObj1:Object = sparkList.dataGroup.createItemRendererFor(x);
+						// this is only of one column list.  Ohter components need to override this metod
+						// to handle appropritely
+						if( currentObj1 is IAutomationObject)
+						{
+							values.push([(currentObj1 as IAutomationObject).automationName]);
+							alreadyProcessedCount++;
+						}
+					}
+				}
+				for (var i:int = start+alreadyProcessedCount; i<=end ; i++)
+				{
+					var currentObj:Object = sparkList.dataGroup.getElementAt(i);
+					// this is only of one column list.  Ohter components need to override this metod
+					// to handle appropritely
+					if( currentObj is IAutomationObject)
+						values.push([(currentObj as IAutomationObject).automationName]);
+				}
+
+				if(sparkList.useVirtualLayout == true)
+				{
+
+					for( var x1:int=lastVisibleRow+1;  x1 <= end ; x1++ )
+					{
+						var currentObj2:Object = sparkList.dataGroup.createItemRendererFor(x1);
+						// this is only of one column list.  Ohter components need to override this metod
+						// to handle appropritely
+						if( currentObj2 is IAutomationObject)
+							values.push([(currentObj2 as IAutomationObject).automationName]);
+					}
+				}
+
+			}
+
+
+
+			return values;
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function getAutomationValueForData(data:Object):Array
+		{
+			// convert the data (which is the data corresponding to the selected Item)
+			var itemIndex:int = sparkList.dataProvider.getItemIndex(data)
+			if(sparkList.dataGroup)
+			{
+				var delegate:IAutomationObject = sparkList.dataGroup.getElementAt(itemIndex) as IAutomationObject;
+				if(delegate)
+				{
+					var automationValueArray:Array = delegate.automationValue;
+					if(automationValueArray)
+						return [ automationValueArray.join(" | ") ];
+				}
+			}
+			else
+			{
+				// we may need to get the renderer deails for the dropdown list in a
+				// different way as no renderers are available (and hence no datagroup)
+				// itslef not present when the dropDown list is not visible.
+				trace("To be handled in SparkListBaseTabularData and it is happening in DropDownList - while getting selected item");
+			}
+
+			return [];
+		}
+
+
+
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8452
Author:   cframpto@adobe.com
Date:     2009-07-08T15:38:32.261224Z

Log Message:
-----------
- Fix flicker problem with constraint bound text that is being autoSized.  If the remeasure is done in a 2nd pass you will see a flicker as all the objects are moved to accommodate the reflowed text.
- Fix data binding issue with text setter.
- Rework measure() to accommodate implicit autoSize.

If explicitWidth or widthInChars specified and explicitHeight or heightInLines specified, or for now, blockProgression != "tb", the text has fixed dimensions and is not auto-sized.

If no text and width specified, but no height, start at specified width and one line high and grow taller.
If no text and height specified, start at 1 char wide with the specified height and grow wider.
If neither width nor height specified, and toFit lineBreaks, start at explicitMaxWidth, or default maxWidth of 160, and grow taller.
If neither width nor height specified, and explicit lineBreaks width is unlimited and can grow taller.

These are further constrained by min/max Width and Height except in the case that explicitWidth or explicitHeight are specified.

- Change default maxWidth for RichText and SimpleText to 160 to match RET.  Previously it was 10000.  This is used for
text with toFit lineBreaks if a width isn't specified.

QA Notes: 12 or so TextGraphic tests fail because of the new default maxWidth.
Doc Notes:SDK-22014, SDK-21837
Reviewers: Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/RichEditableTextEditManager.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as
@@ -21,6 +21,7 @@

 import flashx.textLayout.container.TextContainerManager;
 import flashx.textLayout.edit.EditingMode;
+import flashx.textLayout.edit.IEditManager;
 import flashx.textLayout.edit.ISelectionManager;
 import flashx.textLayout.edit.SelectionFormat;
 import flashx.textLayout.elements.IConfiguration;
@@ -101,14 +102,12 @@

         var contentBounds:Rectangle = getContentBounds();

-        // If autoSize, use the content values rather than the composition
-        // values. The composition values allow room for growth
-        // (width=maxWidth, height=NaN).
-        if (textDisplay.autoSize)
-        {
+        // If autoSize, one dimension may be NaN to allow room for growth.
+        // If so, use the content value rather than the composition value.
+        if (isNaN(width))
             width = contentBounds.width;
+        if (isNaN(height))
             height = contentBounds.height;
-        }

         if (scrollX == 0 &&
             scrollY == 0 &&
@@ -231,6 +230,9 @@
             inactiveSelectionColor, 0.0);
     }

+    /**
+     *  @private
+     */
     override public function setText(text:String):void
     {
         textDisplay.ignoreDamageEvent = true;
@@ -239,7 +241,16 @@

         textDisplay.ignoreDamageEvent = false;
     }
-
+
+    /**
+     *  @private
+     */
+    override protected function createEditManager(
+                        undoManager:flashx.undo.IUndoManager):IEditManager
+    {
+        return new RichEditableTextEditManager(undoManager);
+    }
+
     /**
      *  @private
      */
@@ -282,4 +293,4 @@

 }

-}+}


FLEX-33231
Fix made as per the task description to line 799.

git-svn-id: 4b4e2596707ef7e0312603b789aa270d64561f39@1405000 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -796,7 +796,7 @@

         if (visibleFlag)
             showModalWindow(o, sm, false);
-        else
+        else if (popup)
             popup.visible = visibleFlag;

         if (hasEventListener("createdModalWindow"))


Transferred from the Adobe Open Source Subversion Repository

Revision: 9947
Author:   clucier@adobe.com
Date:     2009-09-03T01:05:01.971910Z

Log Message:
-----------
Syntax fix for Border's backgroundImageResizeMode Style metadata enumeration.

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

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

--- frameworks/projects/spark/src/spark/components/BorderContainer.as
+++ frameworks/projects/spark/src/spark/components/BorderContainer.as
@@ -82,7 +82,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="backgroundImageResizeMode", type="String", enumeration="scale, noScale, repeat", inherit="no")]
+[Style(name="backgroundImageResizeMode", type="String", enumeration="scale,noScale,repeat", inherit="no")]

 /**
  *  Alpha level of the color defined by the borderColor style.
@@ -255,4 +255,4 @@
             skin.invalidateDisplayList();
     }
 }
-}+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

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:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/collections/XMLListAdapter.as
+++ frameworks/projects/framework/src/mx/collections/XMLListAdapter.as
@@ -34,6 +34,11 @@
  *  Dispatched when the IList has been updated in some way.
  *
  *  @eventType mx.events.CollectionEvent.COLLECTION_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="collectionChange", type="mx.events.CollectionEvent")]

@@ -63,6 +68,11 @@
     /**
      *  Construct a new XMLListAdapter using the specified XMLList as its source.
      *  If no source is specified an empty XMLList will be used.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function XMLListAdapter(source:XMLList = null)
     {
@@ -100,6 +110,11 @@
      *  The number of items in this list.
      *
      *  @return -1 if the length is unknown while 0 means no items
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get length():int
     {
@@ -121,6 +136,11 @@
      *  Changes made directly to the underlying XMLList (e.g., calling
      *  delete theList[someIndex] will not cause CollectionEvents
      *  to be dispatched.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get source():XMLList
     {
@@ -173,6 +193,11 @@
      *  Add the specified item to the end of the list.
      *  Equivalent to addItemAt(item, length);
      *  @param item the item to add
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function addItem(item:Object):void
     {
@@ -187,6 +212,11 @@
      *  @param item the item to place at the index
      *  @param index the index at which to place the item
      *  @throws RangeError if index is less than 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function addItemAt(item:Object, index:int):void
     {
@@ -243,6 +273,11 @@
      *  @throws ItemPendingError if the data for that index needs to be
      *                          loaded from a remote location
      *  @throws RangeError if the index < 0 or index >= length
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getItemAt(index:int, prefetch:int = 0):Object
     {
@@ -264,6 +299,11 @@
      *
      *  @param item the item to find
      *  @return the index of the item, -1 if the item is not in the list.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getItemIndex(item:Object):int
     {
@@ -304,6 +344,11 @@
      *  @see mx.events.CollectionEvent
      *  @see mx.core.IPropertyChangeNotifier
      *  @see mx.events.PropertyChangeEvent
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function itemUpdated(item:Object, property:Object = null,
                                 oldValue:Object = null,
@@ -323,6 +368,11 @@

     /**
      * Remove all items from the list.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function removeAll():void
     {
@@ -351,6 +401,11 @@
      *  @param index the index from which to remove the item
      *  @return the item that was removed
      *  @throws RangeError is index is less than 0 or greater than length
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function removeItemAt(index:int):Object
     {
@@ -391,6 +446,11 @@
      *  @param index the index at which to place the item
      *  @return the item that was replaced, null if none
      *  @throws RangeError if index is less than 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function setItemAt(item:Object, index:int):Object
     {
@@ -430,6 +490,11 @@
      *
      *  @throws ItemPendingError if the data is not yet completely loaded
      *  from a remote location
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function toArray():Array
     {
@@ -445,6 +510,11 @@

 	/**
      *  Pretty prints the contents of this XMLListAdapter to a string and returns it.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	override public function toString():String
 	{
@@ -456,6 +526,11 @@

 	/**
      *  True if we're processing a addItem or removeItem call
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	public function busy():Boolean
 	{
@@ -470,6 +545,11 @@

 	/**
 	 *  Enables event dispatch for this list.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	protected function enableEvents():void
 	{
@@ -482,6 +562,11 @@
 	 *  Disables event dispatch for this list.
 	 *  To re-enable events call enableEvents(), enableEvents() must be called
 	 *  a matching number of times as disableEvents().
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	protected function disableEvents():void
 	{
@@ -490,6 +575,11 @@

 	/**
 	 *  clears busy flag
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	private function clearBusy():void
 	{
@@ -501,6 +591,11 @@
 	/**
 	 *  Sets busy flag.  Tree DP's check it so they
 	 *  know whether to fake events for it or not.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	private function setBusy():void
 	{
@@ -511,6 +606,11 @@
      *  Called whenever any of the contained items in the list fire an
      *  ObjectChange event.
      *  Wraps it in a CollectionEventKind.UPDATE.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected function itemUpdateHandler(event:PropertyChangeEvent):void
     {
@@ -529,6 +629,11 @@
      * in some way.  The initial implementation stab is very lenient,
      * any changeType will cause an update no matter how much further down
      * in a hierarchy.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function xmlNotification(currentTarget:Object,
                                         type:String,
@@ -623,6 +728,11 @@
     /**
      *  This is called by addItemAt and when the source is initially
      *  assigned.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected function startTrackUpdates(item:Object, uid:String):void
     {
@@ -632,6 +742,11 @@
     /**
      *  This is called by removeItemAt, removeAll, and before a new
      *  source is assigned.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected function stopTrackUpdates(item:Object):void
     {
@@ -648,11 +763,21 @@
 	 *  indicates if events should be dispatched.
 	 *  calls to enableEvents() and disableEvents() effect the value when == 0
 	 *  events should be dispatched.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	private var _dispatchEvents:int = 0;

 	/**
 	 *  non-zero if we're processing an addItem or removeItem
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	private var _busy:int = 0;


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

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

 package mx.events
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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

 package mx.controls.treeClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4792
Author:   cframpto@adobe.com
Date:     2009-02-02T19:18:40.965487Z

Log Message:
-----------
FxRadioButton/FxRadioButtonGroup bugs.

QE Notes:
Doc Notes:
Bugs: SDK-18437, SDK-18468, SDK-18261, SDK-18460, SDK-18438
Reviewers: Darrell

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/bundles/en_US/components.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButton.as</path>

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

--- frameworks/projects/spark/src/spark/components/RadioButtonGroup.as
+++ frameworks/projects/spark/src/spark/components/RadioButtonGroup.as
@@ -25,8 +25,6 @@
 import mx.events.FlexEvent;
 import mx.events.ItemClickEvent;

-use namespace mx_internal;
-
 //--------------------------------------
 //  Events
 //--------------------------------------
@@ -177,11 +175,8 @@
         // For each radio button, if the group is enabled then the button
         // enable property determines if the button is enabled and if the
         // group is disabled all the buttons are disabled.
-        var n:int = numRadioButtons;
-        for (var i:int = 0; i < n; i++)
-        {
-            getRadioButtonAt(i).setEnabled();
-        }
+        for (var i:int = 0; i < numRadioButtons; i++)
+            getRadioButtonAt(i).mx_internal::invalidateRadioButtonState();

         dispatchEvent(new Event("enabledChanged"));
     }
@@ -299,7 +294,7 @@
     public function set selection(value:FxRadioButton):void
     {
         // Going through the selection setter should never fire a change event.
-        setSelection(value, false);
+        mx_internal::setSelection(value, false);
     }

     //--------------------------------------------------------------------------
@@ -341,33 +336,42 @@

     /**
      *  @private
-     *  Add a radio button to the group.
+     *  Add a radio button to the group.  This can be called by
+     *  FxRadioButton or via the addedHandler when applying a state.
      */
     mx_internal function addInstance(instance:FxRadioButton):void
     {
+        // During a state transition, called when rb is removed from
+        // display list.
         instance.addEventListener(Event.REMOVED, radioButton_removedHandler);
+
         radioButtons.push(instance);

         // Apply group indices in "breadth-first" order.
         radioButtons.sort(breadthOrderCompare);
         for (var i:int = 0; i < radioButtons.length; i++)
-            radioButtons[i].indexNumber = i;
-
-        if (_selectedValue != null)
-            selectedValue = _selectedValue;
-
+            radioButtons[i].mx_internal::indexNumber = i;
+
+        // If this radio button is selected, then it becomes the selection
+        // for the group.
+        if (instance.selected == true)
+            selection = instance;
+
+        instance.mx_internal::radioButtonGroup = this;
+        instance.mx_internal::invalidateRadioButtonState();
+
 		dispatchEvent(new Event("numRadioButtonsChanged"));
     }

     /**
      *  @private
-     *  Remove a radio button from the group.
-     */
-    mx_internal function removeInstance(instance:FxRadioButton):void
+     *  Remove a radio button from the group.  This can be called by
+     *  FxRadioButton or via the removedHandler when removing a state.
+     */
+    private function removeInstance(instance:FxRadioButton):void
     {
         if (instance)
         {
-
             var foundInstance:Boolean = false;
             for (var i:int = 0; i < numRadioButtons; i++)
             {
@@ -376,19 +380,32 @@
                 if (foundInstance)
                 {
                     // Decrement the indexNumber for each button after the removed button.
-                    rb.indexNumber--;
+                    rb.mx_internal::indexNumber = rb.mx_internal::indexNumber - 1;
                 }
                 else if (rb == instance)
                 {
-                	rb.group = null;
-
+                    // During a state transition, called when rb is added back
+                    // to display list.
+                    instance.addEventListener(Event.ADDED, radioButton_addedHandler);
+
+                    // Don't set the group to null.  If this is being removed
+                    // because the state changed, the group will be needed
+                    // if the radio button is readded later because of another
+                    // state transition.
+                	//rb.group = null;
+
+                    // If the rb is selected, leave the button itself selected
+                    // but clear the selection for the group.
                     if (instance == _selection)
-                    {
                         _selection = null;
-                    }
+
+                    instance.mx_internal::radioButtonGroup = null;
+                    instance.mx_internal::invalidateRadioButtonState();
+
                     // Remove the radio button from the internal array.
                     radioButtons.splice(i,1);
                     foundInstance = true;
+
                     // redo the same index because we removed the previous item at this index
                     i--;
                 }
@@ -402,7 +419,7 @@
     /**
      *  @private
      */
-    mx_internal function getEnabled():Boolean
+    protected function getEnabled():Boolean
     {
         return _enabled;
     }
@@ -518,13 +535,28 @@
      /**
      *  @private
      */
-    private function radioButton_removedHandler(event:Event):void
+    private function radioButton_addedHandler(event:Event):void
     {
         var rb:FxRadioButton = event.target as FxRadioButton;
         if (rb)
         {
+            //trace("radioButton_addedHandler", rb.id);
+            rb.removeEventListener(Event.ADDED, radioButton_addedHandler);
+            mx_internal::addInstance(rb);
+        }
+    }
+
+     /**
+     *  @private
+     */
+    private function radioButton_removedHandler(event:Event):void
+    {
+        var rb:FxRadioButton = event.target as FxRadioButton;
+        if (rb)
+        {
+            //trace("radioButton_removedHandler", rb.id);
         	rb.removeEventListener(Event.REMOVED, radioButton_removedHandler);
-            removeInstance(FxRadioButton(event.target));
+            removeInstance(rb);
         }
     }
 }