Transferred from the Adobe Open Source Subversion Repository

Revision: 7087
Author:   rfrishbe@adobe.com
Date:     2009-05-19T20:44:50.609964Z

Log Message:
-----------
VideoPlayer bug fixes:

- Forgot to dispatch the ready event

- The properties on videoplayer that are proxied from videoelement now take into account the correct defaults

- We deal with null or empty string sources better by clearing the video and closing the connection to the net stream.  It looks like play() won’t take in any arguments—at that point, I’ll clean up this code around dealign with startTime and duration as well as refactoring some of this “close” the connection code.

- PopUpAnchor pushes the concatenated color matrix, similar to the concatenated transform matrix.  This will need to undergo any changes based on Chet’s findings.

- Adding enabling/disabling support.  This change is dependent on Jason’s SKinnableComponent change around enabling/disabling.

- Skin changes in VideoPlayerSkin and volume bar/volumebarmutebutton.

QE Notes: -
Doc Notes: -
Bugs: SDK-21185, SDK-21187, SDK-21015, SDK-20971, SDK-20969, SDK-20928, SDK-21098, SDK-20986, SDK-20947, SDK-20939, SDK-20934, SDK-21014
Reviewer: Deepa
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarMuteButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -19,13 +19,17 @@
 import fl.video.VideoPlayer;
 import fl.video.VideoScaleMode;
 import fl.video.VideoState;
+import fl.video.flvplayback_internal;

 import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.display.Sprite;
 import flash.events.Event;
 import flash.events.ProgressEvent;
 import flash.geom.Matrix;
 import flash.media.Video;

+import mx.core.AdvancedLayoutFeatures;
 import mx.core.mx_internal;

 import spark.components.supportClasses.StreamItem;
@@ -33,6 +37,8 @@
 import spark.core.IGraphicElement;
 import spark.events.VideoEvent;
 import spark.primitives.supportClasses.GraphicElement;
+
+use namespace mx_internal;

 //--------------------------------------
 //  Events
@@ -174,18 +180,19 @@
         var flvPlayer:VideoPlayer = new VideoPlayer();
         mx_internal::videoPlayer = flvPlayer;

-        flvPlayer.align = VideoAlign.CENTER;
-        // unfortunately, there's a bug in the video player that
-        // won't easily let align center if we set x and y directly
-        // on the video player.  So to work-around this, we always
-        // create a transform and set x/y that way
-        allocateLayoutFeatures();
+        // we wrap the VideoPlayer inside of another container because
+        // the video player doesn't handle setting x/y correctly. we could allocate
+        // layout features and subclass it so that layoutX always sets registrationX on the
+        // videoPlayer, but this seemed more straight forward
+        videoPlayerContainer = new Sprite();
+        videoPlayerContainer.addChild(flvPlayer);

         flvPlayer.addEventListener(fl.video.VideoEvent.CLOSE, videoPlayer_closeHandler);
         flvPlayer.addEventListener(fl.video.VideoEvent.COMPLETE, videoPlayer_completeHandler);
         flvPlayer.addEventListener(fl.video.MetadataEvent.METADATA_RECEIVED, videoPlayer_metaDataReceivedHandler);
         flvPlayer.addEventListener(fl.video.VideoEvent.PLAYHEAD_UPDATE, videoPlayer_playHeadUpdateHandler);
         flvPlayer.addEventListener(ProgressEvent.PROGRESS, dispatchEvent);
+        flvPlayer.addEventListener(fl.video.VideoEvent.READY, videoPlayer_readyHandler);
         flvPlayer.addEventListener(fl.video.VideoEvent.STATE_CHANGE, videoPlayer_stateChangeHandler);
     }

@@ -202,6 +209,15 @@
      */
     mx_internal var videoPlayer:VideoPlayer;

+    /**
+     *  @private
+     *  We wrap the VideoPlayer inside of another container because
+     *  the video player doesn't handle setting x/y correctly. we could allocate
+     *  layout features and subclass it so that layoutX always sets registrationX on the
+     *  videoPlayer, but this seemed more straight forward
+     */
+    private var videoPlayerContainer:DisplayObjectContainer;
+
     //--------------------------------------------------------------------------
     //
     //  Overridden properties
@@ -214,7 +230,7 @@
     override public function get displayObject():DisplayObject
     {
         // The VideoElement always has its own DisplayObject
-        return mx_internal::videoPlayer;
+        return videoPlayerContainer;
     }

     /**
@@ -320,6 +336,60 @@
     public function set autoRewind(value:Boolean):void
     {
         mx_internal::videoPlayer.autoRewind = value;
+    }
+
+    //----------------------------------
+    //  enabled
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _enabled:Boolean = true;
+
+    [Inspectable(category="General", enumeration="true,false", defaultValue="true")]
+    [Bindable("enabledChanged")]
+
+    /**
+     *  @copy mx.core.IUIComponent#enabled
+     *
+     *
Setting enabled to false
+     *  pauses the video if it was currently playing.  Re-enabling the component
+     *  does not cause the video to continue playing again; you must
+     *  explicitly call play().

+     *
+     *
Even though the component is initially paused while disabled,
+     *  if you would like to play the video or perform some other action
+     *  while disabled, you may still do so through method calls, like
+     *  play().

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get enabled():Boolean
+    {
+        return _enabled;
+    }
+
+    /**
+     *  @private
+     */
+    public function set enabled(value:Boolean):void
+    {
+        if (value == _enabled)
+            return;
+
+        _enabled = value;
+
+        if (!value)
+        {
+            if (playing)
+                pause();
+        }
+
+        dispatchEvent(new Event("enabledChanged"));
     }

     //----------------------------------
@@ -667,7 +737,7 @@
         if (sourceChanged)
         {
             sourceChanged = false;
-            if (autoPlay)
+            if (autoPlay && enabled)
             {
                 play();
             }
@@ -779,6 +849,12 @@
             }
             else
             {
+                if (sourceLastPlayed != null)
+                {
+                    videoPlayer.close();
+                    videoPlayer.clear();
+                }
+
                 flvSource =  new DynamicStreamItem();
                 sourceLastPlayed = source;

@@ -797,15 +873,28 @@
             // so the UI is more responsive
             setPlaying(true);

-            // we don't do anything with the duration or startTime in
+            // TODO: we don't do anything with the duration or startTime in
             // the play2() case, as the underlying FLVPlayback VideoPlayer
             // doesn't handle it right now.

-            // TODO (rfrishbe): Could we just call play2() and then call seek()
-            // like we do in the progressive case?  Is it worth it?  Need to talk
-            // to Strobe team about this.
-
-            mx_internal::videoPlayer.play2(flvSource);
+            // if it's null, we just call the play() method
+            if (flvSource == null)
+            {
+                if (isNaN(duration))
+                    mx_internal::videoPlayer.play(null, NaN, streamingSource.live);
+                else
+                    mx_internal::videoPlayer.play(null, duration, streamingSource.live);
+
+                if (!isNaN(startTime))
+                    seek(startTime);
+            }
+            else
+            {
+                mx_internal::videoPlayer.play2(flvSource);
+
+                if (!isNaN(startTime))
+                    seek(startTime);
+            }
         }
         else if (source is String && String(source).length != 0)
         {
@@ -821,6 +910,12 @@
             }
             else
             {
+                if (sourceLastPlayed != null)
+                {
+                    videoPlayer.close();
+                    videoPlayer.clear();
+                }
+
                 sourceString = String(this.source);
                 sourceLastPlayed = sourceString;
             }
@@ -847,7 +942,7 @@
                 if (isNaN(duration))
                     mx_internal::videoPlayer.play(null);
                 else
-                    mx_internal::videoPlayer.play(null, false, duration);
+                    mx_internal::videoPlayer.play(null, duration, false);
             }
             else
             {
@@ -860,11 +955,16 @@
                 if (isNaN(duration))
                     mx_internal::videoPlayer.play(sourceString);
                 else
-                    mx_internal::videoPlayer.play(sourceString, false, duration);
+                    mx_internal::videoPlayer.play(sourceString, duration, false);
             }
         }
         else
         {
+            if (sourceLastPlayed != null)
+            {
+                videoPlayer.close();
+                videoPlayer.clear();
+            }
             setPlaying(false);
         }
     }
@@ -881,9 +981,16 @@
         // check for 2 cases: streaming video or progressive download
         if (source is StreamingVideoSource)
         {
-            // can't load in the streaming video case
+            if (source != null && sourceLastPlayed != null)
+            {
+                videoPlayer.close();
+                videoPlayer.clear();
+            }
+            //videoPlayer.volume = 0;
+            // can't load in the streaming video case, so just call play(), then pause()
             play();
             pause();
+            seek(0);
         }
         else if (source is String && String(source).length != 0)
         {
@@ -901,10 +1008,24 @@
             {
                 sourceString = String(this.source);
                 sourceLastPlayed = sourceString;
+
+                if (sourceLastPlayed != null)
+                {
+                    videoPlayer.close();
+                    videoPlayer.clear();
+                }
             }

             // load the video up
             mx_internal::videoPlayer.load(sourceString);
+        }
+        else
+        {
+            if (sourceLastPlayed != null)
+            {
+                videoPlayer.close();
+                videoPlayer.clear();
+            }
         }

         setPlaying(false);
@@ -1021,13 +1142,20 @@
     /**
      *  @private
      */
+    private function videoPlayer_readyHandler(event:fl.video.VideoEvent):void
+    {
+        var sparkVideoEvent:spark.events.VideoEvent =
+            new spark.events.VideoEvent(event.type, event.bubbles, event.cancelable, event.playheadTime);
+        dispatchEvent(sparkVideoEvent);
+    }
+
+    /**
+     *  @private
+     */
     private function videoPlayer_stateChangeHandler(event:fl.video.VideoEvent):void
     {
         switch (event.state)
         {
-            case VideoState.PLAYING:
-                setPlaying(true);
-                break;
             case VideoState.STOPPED:
             case VideoState.DISCONNECTED:
             case VideoState.CONNECTION_ERROR:


Transferred from the Adobe Open Source Subversion Repository

Revision: 8422
Author:   smgilson@adobe.com
Date:     2009-07-07T14:41:50.996290Z

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

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/LabelUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/IndexChangeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/TextOperationEvent.as</path>

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

--- frameworks/projects/spark/src/spark/events/IndexChangeEvent.as
+++ frameworks/projects/spark/src/spark/events/IndexChangeEvent.as
@@ -38,7 +38,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  The IndexChangeEvent.CHANGE constant defines the value of the
+     *  The IndexChangeEvent.CHANGE constant defines the value of the
      *  type property of the event object for a change event,
      *  which indicates that an index has changed, such as when a List-based control
      *  changes its selection.
@@ -75,7 +75,7 @@
     public static const CHANGE:String = "change";

     /**
-     *  The IndexChangeEvent.CHANGING constant defines the value of the
+     *  The IndexChangeEvent.CHANGING constant defines the value of the
      *  type property of the event object for a changing event,
      *  which indicates that the current selection is about to change.
      *
@@ -111,7 +111,7 @@
     public static const CHANGING:String = "changing";

     /**
-     *  The IndexChangeEvent.CARET_CHANGE constant defines the value of the
+     *  The IndexChangeEvent.CARET_CHANGE constant defines the value of the
      *  type property of the event object for a caretChange event,
      *  which indicates that the current item in focus is about to change.
      *
@@ -154,7 +154,6 @@

     /**
      *  Constructor.
-     *  Normally called by a Flex control and not used in application code.
      *
      *  @param type The event type; indicates the action that caused the event.
      *


Be sure to dispatch the right event when updating the display name

--- src/org/jivesoftware/xiff/data/im/RosterItemVO.as
+++ src/org/jivesoftware/xiff/data/im/RosterItemVO.as
@@ -122,6 +122,7 @@
 			var olddisplayname:String = displayName;
 			_displayName = name;
 			PropertyChangeEvent.createUpdateEvent(this, "displayName", olddisplayname, displayName);
+			dispatchEvent(new Event("changeDisplayName"));
 		}

 		[Bindable(event=changeDisplayName)]


Transferred from the Adobe Open Source Subversion Repository

Revision: 10210
Author:   gosmith@adobe.com
Date:     2009-09-13T00:42:05.305545Z

Log Message:
-----------
Fixed problems found by using of UITLFTextField in <mx:Panel>.

The getUITextFormat() method of UITLFTextField needs to set the useTLF flag to true.

And the measure() method of UITextFormat should not set the antiAliasType, gridFitType, sharpness, or thickness of the measurementTextField if we're using TLF. These properties don't have any meaning in FTE so the displaying TLFTextField returns null or NaN values for them.

QE notes: None
Doc notes: None
Bugs: SDK-22627, SDK-23077, SDK-23097
Reviewer: Alex
Tests run: ant checkintests
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/mx/core/UIFTETextField.as
+++ frameworks/projects/spark/src/mx/core/UIFTETextField.as
@@ -1882,6 +1882,8 @@
         textFormat.gridFitType = gridFitType;
         textFormat.sharpness = sharpness;
         textFormat.thickness = thickness;
+
+        textFormat.useTLF = true;

         return textFormat;
     }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/components/Image.as
+++ frameworks/projects/spark/src/spark/components/Image.as
@@ -0,0 +1,912 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.components
+{
+
+import flash.events.Event;
+import flash.events.IOErrorEvent;
+import flash.events.ProgressEvent;
+import flash.events.HTTPStatusEvent;
+import flash.events.SecurityErrorEvent;
+
+import mx.core.mx_internal;
+import mx.graphics.BitmapScaleMode;
+import mx.utils.BitFlagUtil;
+
+import spark.components.supportClasses.Range;
+import spark.components.supportClasses.SkinnableComponent;
+import spark.core.contentLoader.IContentLoader;
+import spark.primitives.BitmapImage;
+
+use namespace mx_internal;
+
+// Support basic text styles for any optional preloader label(s).
+include "../styles/metadata/BasicInheritingTextStyles.as"
+
+//--------------------------------------
+//  SkinStates
+//--------------------------------------
+
+/**
+ *  Uninitialized state of the Image.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4.5
+ */
+[SkinState("uninitialized")]
+
+/**
+ *  Preloading state of the Image. enablePreload must
+ *  be set to true to enable this component state.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4.5
+ */
+[SkinState("loading")]
+
+/**
+ *  Ready state of the Image.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4.5
+ */
+[SkinState("ready")]
+
+/**
+ *  Invalid state of the Image, e.g. image could not be
+ *  successfully loaded.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4.5
+ */
+[SkinState("invalid")]
+
+/**
+ *  Disabled state.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4.5
+ */
+[SkinState("disabled")]
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when content loading is complete.
+ *
+ *  @eventType flash.events.Event.COMPLETE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="complete", type="flash.events.Event")]
+
+/**
+ *  Dispatched when a network request is made over HTTP
+ *  and Flash Player or AIR can detect the HTTP status code.
+ *
+ *  @eventType flash.events.HTTPStatusEvent.HTTP_STATUS
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="httpStatus", type="flash.events.HTTPStatusEvent")]
+
+/**
+ *  Dispatched when an input/output error occurs.
+ *  @see flash.events.IOErrorEvent
+ *
+ *  @eventType flash.events.IOErrorEvent.IO_ERROR
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="ioError", type="flash.events.IOErrorEvent")]
+
+/**
+ *  Dispatched when content is loading.
+ *
+ *
Note:
+ *  The progress event is not guaranteed to be dispatched.
+ *  The complete event may be received, without any
+ *  progress events being dispatched.
+ *  This can happen when the loaded content is a local file.

+ *
+ *  @eventType flash.events.ProgressEvent.PROGRESS
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="progress", type="flash.events.ProgressEvent")]
+
+/**
+ *  Dispatched when a security error occurs.
+ *  @see flash.events.SecurityErrorEvent
+ *
+ *  @eventType flash.events.SecurityErrorEvent.SECURITY_ERROR
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="securityError", type="flash.events.SecurityErrorEvent")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[IconFile("Image.png")]
+
+/**
+ *  The Image control is a skinnable component that provides a customizable
+ *  loading state, chrome, and error state.
+ *
+ *
The default skin provides a chromeless image skin with a generic progress
+ *  bar based preloader and broken image icon to reflect invalid content.

+ *
+ *
The Image control has the following default characteristics:

+ *

+ *

+ *           Characteristic
+ *           Description
+ *

+ *

+ *           Default size
+ *           Wide enough to hold the associated source content
+ *

+ *

+ *           Minimum size
+ *           0 pixels wide by 0 pixels high
+ *

+ *

+ *           Maximum size
+ *           10000 pixels wide and 10000 pixels high
+ *

+ *

+ *           Default skin class
+ *           spark.skins.spark.ImageSkin
+ *

+ *

+ *
+ *  @see spark.skins.spark.ImageSkin
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4.5
+ */
+public class Image extends SkinnableComponent
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+    mx_internal static const CONTENT_LOADER_PROPERTY_FLAG:uint = 1 << 0;
+    mx_internal static const FILL_MODE_PROPERTY_FLAG:uint = 1 << 1;
+    mx_internal static const PRELIMINARY_WIDTH_PROPERTY_FLAG:uint = 1 << 2;
+    mx_internal static const PRELIMINARY_HEIGHT_PROPERTY_FLAG:uint = 1 << 3;
+    mx_internal static const HORIZONTAL_ALIGN_PROPERTY_FLAG:uint = 1 << 4;
+    mx_internal static const SCALE_MODE_PROPERTY_FLAG:uint = 1 << 5;
+    mx_internal static const SMOOTH_PROPERTY_FLAG:uint = 1 << 6;
+    mx_internal static const SMOOTHING_QUALITY_PROPERTY_FLAG:uint = 1 << 7;
+    mx_internal static const SOURCE_PROPERTY_FLAG:uint = 1 << 8;
+    mx_internal static const VERTICAL_ALIGN_PROPERTY_FLAG:uint = 1 << 9;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function Image()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    protected var _loading:Boolean = false;
+
+    /**
+     *  @private
+     */
+    protected var _invalid:Boolean = false;
+
+    /**
+     *  @private
+     */
+    mx_internal var imageDisplayProperties:Object = {visible: true, scaleMode: BitmapScaleMode.LETTERBOX};
+
+    //--------------------------------------------------------------------------
+    //
+    //  Skin parts
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  imageDisplay
+    //----------------------------------
+
+    [SkinPart(required="false")]
+
+    /**
+     *  A skin part that defines image content.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public var imageDisplay:BitmapImage;
+
+    //----------------------------------
+    //  progressIndicator
+    //----------------------------------
+
+    [SkinPart(required="false")]
+
+    /**
+     *  An optional skin part that displays the current loading progress.
+     *  As a convenience the progressIndicator value is automatically updated
+     *  with the percentage complete while loading.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public var progressIndicator:Range;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  bytesLoaded
+    //----------------------------------
+
+    /**
+     *  @copy mx.primitives.BitmapImage#bytesLoaded
+     *
+     *  @default NaN
+     */
+    public function get bytesLoaded():Number
+    {
+        return imageDisplay ? imageDisplay.bytesLoaded : NaN;
+    }
+
+    //----------------------------------
+    //  bytesTotal
+    //----------------------------------
+
+    /**
+     *  @copy mx.primitives.BitmapImage#bytesTotal
+     *
+     *  @default NaN
+     */
+    public function get bytesTotal():Number
+    {
+        return imageDisplay ? imageDisplay.bytesTotal : NaN;
+    }
+
+    //----------------------------------
+    //  contentLoader
+    //----------------------------------
+
+    /**
+     *  @copy mx.primitives.BitmapImage#contentLoader
+     *
+     *  @default null
+     */
+    public function get contentLoader():IContentLoader
+    {
+        if (imageDisplay)
+            return imageDisplay.contentLoader;
+        else
+            return imageDisplayProperties.contentLoader;
+    }
+
+    /**
+     *  @private
+     */
+    public function set contentLoader(value:IContentLoader):void
+    {
+        if (imageDisplay)
+        {
+            imageDisplay.contentLoader = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                CONTENT_LOADER_PROPERTY_FLAG, true);
+        }
+        else
+            imageDisplayProperties.contentLoader = value;
+    }
+
+    //----------------------------------
+    //  enablePreload
+    //----------------------------------
+    private var _enablePreload:Boolean = false;
+
+    /**
+     *  When true, enables the 'loading' skin state.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function set enablePreload(value:Boolean):void
+    {
+        _enablePreload = value;
+        invalidateSkinState();
+    }
+
+    /**
+     *  @private
+     */
+    public function get enablePreload():Boolean
+    {
+        return _enablePreload;
+    }
+
+    //----------------------------------
+    //  fillMode
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="clip,repeat,scale", defaultValue="scale")]
+
+    /**
+     *  @copy mx.primitives.BitmapImage#fillMode
+     *
+     *  @default BitmapFillMode.SCALE
+     */
+    public function get fillMode():String
+    {
+        if (imageDisplay)
+            return imageDisplay.fillMode;
+        else
+            return imageDisplayProperties.fillMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set fillMode(value:String):void
+    {
+        if (imageDisplay)
+        {
+            imageDisplay.fillMode = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                FILL_MODE_PROPERTY_FLAG, true);
+        }
+        else
+            imageDisplayProperties.fillMode = value;
+    }
+
+	//----------------------------------
+	//  horizontalAlign
+	//----------------------------------
+
+	[Inspectable(category="General", enumeration="left,right,center", defaultValue="center")]
+
+	/**
+	 *  @copy mx.primitives.BitmapImage#horizontalAlign
+	 *
+	 *  @default HorizontalAlign.CENTER
+	 */
+	public function get horizontalAlign():String
+	{
+		if (imageDisplay)
+			return imageDisplay.horizontalAlign;
+		else
+			return imageDisplayProperties.horizontalAlign;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set horizontalAlign(value:String):void
+	{
+		if (imageDisplay)
+		{
+			imageDisplay.horizontalAlign = value;
+			imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+				HORIZONTAL_ALIGN_PROPERTY_FLAG, value != null);
+		}
+		else
+			imageDisplayProperties.horizontalAlign = value;
+	}
+
+    //----------------------------------
+    //  preliminaryHeight
+    //----------------------------------
+
+    /**
+     *  @copy mx.primitives.BitmapImage#preliminaryHeight
+     *
+     *  @default NaN
+     */
+    public function get preliminaryHeight():Number
+    {
+        if (imageDisplay)
+            return imageDisplay.preliminaryHeight;
+        else
+            return imageDisplayProperties.preliminaryHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set preliminaryHeight(value:Number):void
+    {
+        if (imageDisplay)
+        {
+            imageDisplay.preliminaryHeight = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                PRELIMINARY_HEIGHT_PROPERTY_FLAG, true);
+        }
+        else
+            imageDisplayProperties.preliminaryHeight = value;
+    }
+
+    //----------------------------------
+    //  preliminaryWidth
+    //----------------------------------
+
+    /**
+     *  @copy mx.primitives.BitmapImage#preliminaryWidth
+     *
+     *  @default NaN
+     */
+    public function get preliminaryWidth():Number
+    {
+        if (imageDisplay)
+            return imageDisplay.preliminaryWidth;
+        else
+            return imageDisplayProperties.preliminaryWidth;
+    }
+
+    /**
+     *  @private
+     */
+    public function set preliminaryWidth(value:Number):void
+    {
+        if (imageDisplay)
+        {
+            imageDisplay.preliminaryWidth = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                PRELIMINARY_WIDTH_PROPERTY_FLAG, true);
+        }
+        else
+            imageDisplayProperties.preliminaryWidth = value;
+    }
+
+    //----------------------------------
+    //  scaleMode
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="stretch,letterbox", defaultValue="letterbox")]
+
+    /**
+     *  @copy mx.primitives.BitmapImage#scaleMode
+     *
+     *  @default BitmapScaleMode.LETTERBOX
+     */
+    public function get scaleMode():String
+    {
+        if (imageDisplay)
+            return imageDisplay.scaleMode;
+        else
+            return imageDisplayProperties.scaleMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set scaleMode(value:String):void
+    {
+        if (imageDisplay)
+        {
+            imageDisplay.scaleMode = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                SCALE_MODE_PROPERTY_FLAG, true);
+        }
+        else
+            imageDisplayProperties.scaleMode = value;
+    }
+
+    //----------------------------------
+    //  source
+    //----------------------------------
+
+    /**
+     *  @copy mx.primitives.BitmapImage#source
+     */
+    public function set source(value:Object):void
+    {
+        _invalid = false;
+
+        if (imageDisplay)
+        {
+            imageDisplay.source = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                SOURCE_PROPERTY_FLAG, value != null);
+        }
+        else
+            imageDisplayProperties.source = value;
+
+		invalidateSkinState();
+    }
+
+    /**
+     *  @private
+     */
+    public function get source():Object
+    {
+        if (imageDisplay)
+            return imageDisplay.source;
+        else
+            return imageDisplayProperties.source;
+    }
+
+    //----------------------------------
+    //  smooth
+    //----------------------------------
+
+    /**
+     *  @copy mx.primitives.BitmapImage#smooth
+     */
+    public function set smooth(value:Boolean):void
+    {
+        if (imageDisplay)
+        {
+            imageDisplay.smooth = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                SMOOTH_PROPERTY_FLAG, true);
+        }
+        else
+            imageDisplayProperties.smooth = value;
+    }
+
+    /**
+     *  @private
+     */
+    public function get smooth():Boolean
+    {
+        if (imageDisplay)
+            return imageDisplay.smooth;
+        else
+            return imageDisplayProperties.smooth;
+    }
+
+    //----------------------------------
+    //  smoothingQuality
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="default,high", defaultValue="default")]
+
+    /**
+     *  @copy mx.primitives.BitmapImage#smoothingQuality
+     */
+    public function get smoothingQuality():String
+    {
+        if (imageDisplay)
+            return imageDisplay.smoothingQuality;
+        else
+            return imageDisplayProperties.smoothingQuality;
+    }
+
+    /**
+     *  @private
+     */
+    public function set smoothingQuality(value:String):void
+    {
+        if (imageDisplay)
+        {
+            imageDisplay.smoothingQuality = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                SMOOTHING_QUALITY_PROPERTY_FLAG, value != null);
+        }
+        else
+            imageDisplayProperties.smoothingQuality = value;
+    }
+
+    //----------------------------------
+    //  verticalAlign
+    //----------------------------------
+
+    /**
+     *  @copy mx.primitives.BitmapImage#verticalAlign
+     *
+     *  @default HorizontalAlign.MIDDLE
+     */
+    public function get verticalAlign():String
+    {
+        if (imageDisplay)
+            return imageDisplay.verticalAlign;
+        else
+            return imageDisplayProperties.verticalAlign;
+    }
+
+    /**
+     *  @private
+     */
+    public function set verticalAlign(value:String):void
+    {
+        if (imageDisplay)
+        {
+            imageDisplay.verticalAlign = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                VERTICAL_ALIGN_PROPERTY_FLAG, value != null);
+        }
+        else
+            imageDisplayProperties.verticalAlign = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+
+        if (instance == imageDisplay)
+        {
+            imageDisplay.addEventListener(IOErrorEvent.IO_ERROR, imageDisplay_ioErrorHandler, false, 0, true);
+            imageDisplay.addEventListener(ProgressEvent.PROGRESS, imageDisplay_progressHandler, false, 0, true);
+            imageDisplay.addEventListener(Event.COMPLETE, imageDisplay_completeHandler, false, 0, true);
+            imageDisplay.addEventListener(SecurityErrorEvent.SECURITY_ERROR, dispatchEvent, false, 0, true);
+            imageDisplay.addEventListener(HTTPStatusEvent.HTTP_STATUS, dispatchEvent, false, 0, true);
+
+            var newImageDisplayProperties:uint = 0;
+
+            if (imageDisplayProperties.contentLoader !== undefined)
+            {
+                imageDisplay.contentLoader = imageDisplayProperties.contentLoader;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    CONTENT_LOADER_PROPERTY_FLAG, true);
+            }
+
+            if (imageDisplayProperties.fillMode !== undefined)
+            {
+                imageDisplay.fillMode = imageDisplayProperties.fillMode;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    FILL_MODE_PROPERTY_FLAG, true);
+            }
+
+            if (imageDisplayProperties.preliminaryHeight !== undefined)
+            {
+                imageDisplay.preliminaryHeight = imageDisplayProperties.preliminaryHeight;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    PRELIMINARY_HEIGHT_PROPERTY_FLAG, true);
+            }
+
+            if (imageDisplayProperties.preliminaryWidth !== undefined)
+            {
+                imageDisplay.preliminaryWidth = imageDisplayProperties.preliminaryWidth;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    PRELIMINARY_WIDTH_PROPERTY_FLAG, true);
+            }
+
+            if (imageDisplayProperties.smooth !== undefined)
+            {
+                imageDisplay.smooth = imageDisplayProperties.smooth;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    SMOOTH_PROPERTY_FLAG, true);
+            }
+
+            if (imageDisplayProperties.source !== undefined)
+            {
+                imageDisplay.source = imageDisplayProperties.source;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    SOURCE_PROPERTY_FLAG, true);
+            }
+
+            if (imageDisplayProperties.smoothQuality !== undefined)
+            {
+                imageDisplay.smoothingQuality = imageDisplayProperties.smoothingQuality;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    SMOOTHING_QUALITY_PROPERTY_FLAG, true);
+            }
+
+            if (imageDisplayProperties.scaleMode !== undefined)
+            {
+                imageDisplay.scaleMode = imageDisplayProperties.scaleMode;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    SCALE_MODE_PROPERTY_FLAG, true);
+            }
+
+            if (imageDisplayProperties.verticalAlign !== undefined)
+            {
+                imageDisplay.verticalAlign = imageDisplayProperties.verticalAlign;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    VERTICAL_ALIGN_PROPERTY_FLAG, true);
+            }
+
+            if (imageDisplayProperties.horizontalAlign !== undefined)
+            {
+                imageDisplay.horizontalAlign = imageDisplayProperties.horizontalAlign;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    HORIZONTAL_ALIGN_PROPERTY_FLAG, true);
+            }
+
+            imageDisplayProperties = newImageDisplayProperties;
+        }
+		else if (instance == progressIndicator)
+		{
+			if (_loading && progressIndicator)
+			    progressIndicator.value =
+					Math.ceil((imageDisplay.bytesLoaded / imageDisplay.bytesTotal) * 100.0);
+		}
+    }
+
+    /**
+     *  @private
+     */
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
+        super.partRemoved(partName, instance);
+
+        if (instance == imageDisplay)
+        {
+            imageDisplay.removeEventListener(IOErrorEvent.IO_ERROR, imageDisplay_ioErrorHandler);
+            imageDisplay.removeEventListener(ProgressEvent.PROGRESS, imageDisplay_progressHandler);
+            imageDisplay.removeEventListener(Event.COMPLETE, imageDisplay_completeHandler);
+            imageDisplay.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, dispatchEvent);
+            imageDisplay.removeEventListener(HTTPStatusEvent.HTTP_STATUS, dispatchEvent);
+
+            var newImageDisplayProperties:Object = {};
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, CONTENT_LOADER_PROPERTY_FLAG))
+                newImageDisplayProperties.contentLoader = imageDisplay.contentLoader;
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, FILL_MODE_PROPERTY_FLAG))
+                newImageDisplayProperties.fillMode = imageDisplay.fillMode;
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, PRELIMINARY_HEIGHT_PROPERTY_FLAG))
+                newImageDisplayProperties.preliminaryHeight = imageDisplay.preliminaryHeight;
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, PRELIMINARY_WIDTH_PROPERTY_FLAG))
+                newImageDisplayProperties.preliminaryWidth = imageDisplay.preliminaryWidth;
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, SOURCE_PROPERTY_FLAG))
+                newImageDisplayProperties.source = imageDisplay.source;
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, SMOOTH_PROPERTY_FLAG))
+                newImageDisplayProperties.smooth = imageDisplay.smooth;
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, SMOOTHING_QUALITY_PROPERTY_FLAG))
+                newImageDisplayProperties.smoothQuality = imageDisplay.smoothingQuality;
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, SCALE_MODE_PROPERTY_FLAG))
+                newImageDisplayProperties.scaleMode = imageDisplay.scaleMode;
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, VERTICAL_ALIGN_PROPERTY_FLAG))
+                newImageDisplayProperties.verticalAlign = imageDisplay.verticalAlign;
+
+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, HORIZONTAL_ALIGN_PROPERTY_FLAG))
+                newImageDisplayProperties.horizontalAlign = imageDisplay.horizontalAlign;
+
+            imageDisplayProperties = newImageDisplayProperties;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function getCurrentSkinState():String
+    {
+		if (_invalid)
+            return "invalid";
+		else if (!enabled)
+			return "disabled";
+        else if (_loading && _enablePreload)
+            return "loading";
+        else if (imageDisplay && imageDisplay.source)
+            return "ready";
+		else
+			return "uninitialized";
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function imageDisplay_ioErrorHandler(error:IOErrorEvent):void
+    {
+        _invalid = true;
+        _loading = false;
+        invalidateSkinState();
+
+        if (hasEventListener(error.type))
+            dispatchEvent(error);
+    }
+
+    /**
+     *  @private
+     */
+    private function imageDisplay_progressHandler(event:ProgressEvent):void
+    {
+        if (!_loading)
+            invalidateSkinState();
+
+        if (progressIndicator)
+            progressIndicator.value = Math.ceil((event.bytesLoaded / event.bytesTotal) * 100.0);
+
+        _loading = true;
+
+        dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     */
+    private function imageDisplay_completeHandler(event:Event):void
+    {
+        invalidateSkinState();
+        _loading = false;
+        dispatchEvent(event);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 7163
Author:   aharui@adobe.com
Date:     2009-05-21T02:19:55.813792Z

Log Message:
-----------
Initial checkin of frame 1 cleanup.  In an RSL linkage, more classes will now come from the RSL because they are no longer needed in frame 1, and the size of the application SWF will be smaller.

QE Notes: None
Doc Notes: Maybe.  All new classes should be undocumented, but it might be worth checking that and any changes to interfaces
Bugs:
Reviewer: darrell
tests: checkintests mustella/MarshallPlan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ActiveWindowManager.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/MarshalPopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.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/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFont.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ResourceModuleRSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IMarshalSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/ToolTipManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/MustellaResultsParser.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallPlan.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SWFBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/DragManagerMarshalMixin.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/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.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/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IActiveWindowManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/PopUpManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/messaging/config/LoaderConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/DownloadProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManagerChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/CursorManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -110,8 +110,6 @@

 		staticEastAsianJustifier = new EastAsianJustifier();

-		staticEmbeddedFont = new EmbeddedFont("", false, false);
-
 		staticTextFormat = new TextFormat();

 		if ("recreateTextLine" in staticTextBlock)
@@ -149,12 +147,6 @@
      */
     private static var staticEastAsianJustifier:EastAsianJustifier;

-    /**
-     *  @private
-     *  Used in getEmbeddedFontContext().
-     */
-    private static var staticEmbeddedFont:EmbeddedFont;
-
     /**
      *  @private
      *  Used in getEmbeddedFontContext().
@@ -517,10 +509,9 @@
 			var bold:Boolean = getStyle("fontWeight") == "bold";
 			var italic:Boolean = getStyle("fontStyle") == "italic";

-			staticEmbeddedFont.initialize(font, bold, italic);
-
             moduleFactory = embeddedFontRegistry.getAssociatedModuleFactory(
-            	staticEmbeddedFont, fontContext);
+            	font, bold, italic,
+                this, fontContext);

             // If we found the font, then it is embedded.
             // But some fonts are not listed in info()


Transferred from the Adobe Open Source Subversion Repository

Revision: 3148
Author:   gosmith@adobe.com
Date:     2008-09-08T22:01:15.712225Z

Log Message:
-----------
You can now use CSS styles to set the default text format for TextView. It no longer has any formatting properties. It supports the entire set of Gumbo text format styles.

SkinnableComponent and Group now also support all these styles. However, skins such as ButtonSkin, TextInputSkin, and TextAreaSkin continue for now to specify instance styles on their TextBox, TextGraphic, and TextView, in order to give them a Gumbo look rather than a Halo look. So if you try setting, for example, the fontSize on the Application, it doesn't yet affect the text format of a Button, TextInput, TextArea, etc. unless you remove the instance style in the skin.

Reviewer: Glenn
Bugs: -
QA: Lots of new stuff to test!
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicElement.as</path>

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

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

 import flash.display.DisplayObjectContainer;
-import flash.display.Graphics;
 import flash.geom.Rectangle;
 import flash.text.engine.ElementFormat;
 import flash.text.engine.FontDescription;


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

--- frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.as
+++ frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.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.messaging.messages
 {


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

--- frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as
+++ frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as
@@ -1,11 +1,19 @@
-		////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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.
 //
 ////////////////////////////////////////////////////////////////////////////////
 package spark.effects.easing


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

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

 package mx.charts.series.items
 {


FLEX-11930 Fixed condition around columns and rows and cleaned up comments.

--- frameworks/projects/mx/src/mx/containers/utilityClasses/CanvasLayout.as
+++ frameworks/projects/mx/src/mx/containers/utilityClasses/CanvasLayout.as
@@ -454,7 +454,7 @@
         if (!constraintChild)
             return;
         var childInfo:ChildConstraintInfo = parseConstraints(child);
-        //Variables to track the offsets
+        // Variables to track the offsets
         var left:Number = childInfo.left;
         var right:Number = childInfo.right;
         var horizontalCenter:Number = childInfo.hc;
@@ -463,9 +463,9 @@
         var verticalCenter:Number = childInfo.vc;
         var baseline:Number = childInfo.baseline;

-        //Variables to track the boundaries from which
-        //the offsets are calculated from. If null, the
-        //boundary is the parent container edge.
+        // Variables to track the boundaries from which
+        // the offsets are calculated from. If null, the
+        // boundary is the parent container edge.
         var leftBoundary:String = childInfo.leftBoundary;
         var rightBoundary:String = childInfo.rightBoundary;
         var hcBoundary:String = childInfo.hcBoundary;
@@ -484,13 +484,13 @@
         var checkWidth:Boolean = false;
         var checkHeight:Boolean = false;

-        //If we are to evaluate the left, right, and horizontalCenter
-        //styles relative to the parent boundaries, parentBoundariesLR will
-        //be true
+        // If we are to evaluate the left, right, and horizontalCenter
+        // styles relative to the parent boundaries, parentBoundariesLR will
+        // be true
         var parentBoundariesLR:Boolean = (!hcBoundary && !leftBoundary && !rightBoundary);
-        //If we are to evaluate the top, bottom, verticalCenter and baseline
-        //styles relative to the parent boundaries, parentBoundariesTB will
-        //be true
+        // If we are to evaluate the top, bottom, verticalCenter and baseline
+        // styles relative to the parent boundaries, parentBoundariesTB will
+        // be true
         var parentBoundariesTB:Boolean = (!vcBoundary && !topBoundary && !bottomBoundary && !baselineBoundary);

         var leftHolder:Number = 0;
@@ -502,17 +502,20 @@
         var vcY:Number;
         var hcX:Number;
         var baselineY:Number;
-        //If we are not evaluating left, right, and horizontalCenter
-        //relative to the parent container edges, we need to match
-        //the column specified in the constraint expression with the
-        //actual ConstraintColumn instance so later we can determine how
-        //much space the control has to live in.
-        if (!parentBoundariesLR)
+        // If we are not evaluating left, right, and horizontalCenter
+        // relative to the parent container edges, we need to match
+        // the column specified in the constraint expression with the
+        // actual ConstraintColumn instance so later we can determine how
+        // much space the control has to live in.
+		var length:int = IConstraintLayout(target).constraintColumns.length;
+
+		if (!parentBoundariesLR && length > 0)
         {
             var matchLeft:Boolean = leftBoundary ? true : false;
             var matchRight:Boolean = rightBoundary ? true : false;
             var matchHC:Boolean = hcBoundary ? true : false;
-            for (i = 0; i < IConstraintLayout(target).constraintColumns.length; i++)
+
+            for (i = 0; i < length; i++)
             {
                 var col:ConstraintColumn = ConstraintColumn(IConstraintLayout(target).constraintColumns[i]);
                 if (matchLeft)
@@ -541,8 +544,8 @@
                     }
                 }
             }
-            //Erorr throwing - we could not match one of the boundaries to the
-            //declared constraintColumns
+            // Error throwing - we could not match one of the boundaries to the
+            // declared constraintColumns
             if (matchLeft)
             {
                 message = resourceManager.getString(
@@ -562,17 +565,17 @@
                 throw new ConstraintError(message);
             }
         }
-        else if (!parentBoundariesLR)
-        {
-            //The left, right or horizontalCenter style has been set to
-            //a non-parent region, but no columns were declared
+		else if (!parentBoundariesLR && length == 0)
+		{
+            // The left, right or horizontalCenter style has been set to
+            // a non-parent region, but no columns were declared
             message = resourceManager.getString(
                 "containers", "noColumnsFound");
             throw new ConstraintError(message);
         }

-        //The width of the region which
-        //the control will live in.
+        // The width of the region which
+        // the control will live in.
         availableWidth = Math.round(rightHolder - leftHolder);

         // If a percentage size is specified for a child,
@@ -598,19 +601,20 @@
             w = child.getExplicitOrMeasuredWidth();
         }

-        //If we are not evaluating top, bottom, and verticalCenter
-        //relative to the parent container edges, we need to match
-        //the row specified in the constraint expression with the
-        //actual ConstraintRow instance so later we can determine how
-        //much space the control has to live in.
-        if (!parentBoundariesTB && IConstraintLayout(target).constraintRows.length > 0)
+        // If we are not evaluating top, bottom, and verticalCenter
+        // relative to the parent container edges, we need to match
+        // the row specified in the constraint expression with the
+        // actual ConstraintRow instance so later we can determine how
+        // much space the control has to live in.
+		length = IConstraintLayout(target).constraintRows.length;
+        if (!parentBoundariesTB && length > 0)
         {
             var matchTop:Boolean = topBoundary ? true : false;
             var matchBottom:Boolean = bottomBoundary ? true : false;
             var matchVC:Boolean = vcBoundary ? true : false;
             var matchBaseline:Boolean = baselineBoundary ? true : false;
-
-            for (i = 0; i < IConstraintLayout(target).constraintRows.length; i++)
+            length = IConstraintLayout(target).constraintRows.length;
+            for (i = 0; i < length; i++)
             {
                 var row:ConstraintRow = ConstraintRow(IConstraintLayout(target).constraintRows[i]);
                 if (matchTop)
@@ -647,8 +651,8 @@
                     }
                 }
             }
-            //Erorr throwing - we could not match one of the boundaries to the
-            //declared constraintRows
+            // Error throwing - we could not match one of the boundaries to the
+            // declared constraintRows
             if (matchTop)
             {
                 message = resourceManager.getString(
@@ -674,17 +678,17 @@
                 throw new ConstraintError(message);
             }
         }
-        else if (!parentBoundariesTB && !(IConstraintLayout(target).constraintRows.length > 0))
-        {
-            //The top, bottom or verticalCenter style has been set to
-            //a non-parent region, but no rows were declared
+        else if (!parentBoundariesTB && length == 0)
+        {
+            // The top, bottom or verticalCenter style has been set to
+            // a non-parent region, but no rows were declared
             message = resourceManager.getString(
                 "containers", "noRowsFound");
             throw new ConstraintError(message);
         }

-        //The height of the region which
-        //the control will live in.
+        // The height of the region which
+        // the control will live in.
         availableHeight = Math.round(bottomHolder - topHolder);
         if (!isNaN(top) && !isNaN(bottom))
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18543
Author:   rfrishbe@adobe.com
Date:     2010-11-11T21:39:53.401769Z

Log Message:
-----------
Making some PARB changes around down state support and InteractionStateDetector.  ItemRendererInteractionStateDetector has been renamed to InteractionStateDetector.  down state is now applicable in mouse interactionMode.  downColor defaults to undefined, and is only set in the mobiletheme--this way it won't break the mouse interaction case.

Fixing up ItemRenderer transitions.  Added a new method, invalidateRendererState().  We now don't transition immediately to the state when the selected, hovered, etc.. properties get set, but we wait until validation.

QE notes:
Doc notes:
Bugs: SDK-28482
Reviewer: Eric Day, Glenn
Tests run: checkintests, mustella DataGroup, List, ListDND
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
@@ -26,7 +26,8 @@

 import spark.components.IItemRenderer;
 import spark.components.Label;
-import spark.components.supportClasses.ItemRendererInteractionStateDetector;
+import spark.components.supportClasses.InteractionState;
+import spark.components.supportClasses.InteractionStateDetector;
 import spark.components.supportClasses.TextBase;

 use namespace mx_internal;
@@ -75,11 +76,16 @@
 [Style(name="alternatingItemColors", type="Array", arrayType="uint", format="Color", inherit="yes", theme="spark, mobile")]

 /**
- *  Color of the background of an item renderer when it is pressed down
+ *  Color of the background of an item renderer when it is being pressed down
+ *
+ *
If downColor is set to undefined,
+ *  downColor is not used.

  *
- *
This style is only applicable in touch interactionMode.

- *
- *  @default 0xA8C6EE
+ *
The default value in the
+ *  spark theme is undefined.  The default value in the
+ *  mobile theme is 0xB2B2B2.

+ *
+ *  @default undefined
  *
  *  @langversion 3.0
  *  @playerversion Flash 10.1
@@ -175,8 +181,8 @@
     {
         super();

-        itemRendererInteractionStateDetector = new ItemRendererInteractionStateDetector(this);
-        itemRendererInteractionStateDetector.addEventListener(Event.CHANGE, itemRendererInteractionStateDetector_changeHandler);
+        interactionStateDetector = new InteractionStateDetector(this);
+        interactionStateDetector.addEventListener(Event.CHANGE, interactionStateDetector_changeHandler);
     }

     //--------------------------------------------------------------------------
@@ -195,7 +201,7 @@
      *  @private
      *  Helper class to help determine when we are in the hovered or down state
      */
-    private var itemRendererInteractionStateDetector:ItemRendererInteractionStateDetector;
+    private var interactionStateDetector:InteractionStateDetector;

     //--------------------------------------------------------------------------
     //
@@ -491,11 +497,13 @@

         var backgroundColor:uint;
         var drawBackground:Boolean = true;
-        if (itemRendererInteractionStateDetector.down)
-            backgroundColor = getStyle("downColor");
+        var downColor:* = getStyle("downColor");
+
+        if (interactionStateDetector.state == InteractionState.DOWN && downColor !== undefined)
+            backgroundColor = downColor;
         else if (selected)
             backgroundColor = getStyle("selectionColor");
-        else if (itemRendererInteractionStateDetector.hovered)
+        else if (interactionStateDetector.state == InteractionState.OVER)
             backgroundColor = getStyle("rollOverColor");
         else
         {
@@ -552,7 +560,7 @@
     /**
      *  @private
      */
-    private function itemRendererInteractionStateDetector_changeHandler(event:Event):void
+    private function interactionStateDetector_changeHandler(event:Event):void
     {
         invalidateDisplayList();
     }


Close #360: Center ButtonScrollingCanvas buttons

--- library/src/flexlib/containers/ButtonScrollingCanvas.as
+++ library/src/flexlib/containers/ButtonScrollingCanvas.as
@@ -358,10 +358,10 @@
 			var buttonHeight:Number = _explicitButtonHeight ? _explicitButtonHeight : unscaledHeight;

-			leftButton.move(0, 0);
+			leftButton.move(0, (unscaledHeight - buttonHeight) / 2);
 			leftButton.setActualSize(buttonWidth, buttonHeight);

-			rightButton.move(unscaledWidth - buttonWidth, 0);
+			rightButton.move(unscaledWidth - buttonWidth, (unscaledHeight - buttonHeight) / 2);
 			rightButton.setActualSize(buttonWidth, buttonHeight);

 			upButton.move(buttonWidth, 0);


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

--- frameworks/projects/advancedgrids/src/mx/printing/PrintOLAPDataGrid.as
+++ frameworks/projects/advancedgrids/src/mx/printing/PrintOLAPDataGrid.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: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

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

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

--- frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as
@@ -15,6 +15,12 @@
 /**
  *  The SecureHTTPChannel class is identical to the HTTPChannel class except that it uses a
  *  secure protocol, HTTPS, to send messages to an HTTP endpoint.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 public class SecureHTTPChannel extends HTTPChannel
 {
@@ -30,6 +36,12 @@
 	 *  @param id The id of this Channel.
 	 *
 	 *  @param uri The uri for this Channel.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function SecureHTTPChannel(id:String = null, uri:String = null)
     {
@@ -44,6 +56,12 @@

     /**
      *  Returns the protocol for this channel (https).
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     override public function get protocol():String
     {


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

--- frameworks/projects/framework/src/mx/events/ItemClickEvent.as
+++ frameworks/projects/framework/src/mx/events/ItemClickEvent.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 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: 972
Author:   mhorn@adobe.com
Date:     2008-03-27T20:24:16.905716Z

Log Message:
-----------
Minor ASDoc fixes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/logging/AbstractTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as
@@ -205,7 +205,7 @@

     /**
      * Specifies the port within the WSDL document that this WebService should
-     * use
+     * use.
      */
     public function get port():String
     {
@@ -354,6 +354,7 @@
      * The header can be provided in a pre-encoded form as an XML instance, or
      * as a SOAPHeader instance which leaves the encoding up to the internal
      * SOAP encoder.
+     *
      * @param header The SOAP header to add to all operations.
      */
     public function addHeader(header:Object):void
@@ -363,10 +364,11 @@

     /**
      * Add a header that will be applied to all operations of this WebService.
-     * @param qnameLocal the localname for the header QName
-     * @param qnameNamespace the namespace for header QName
-     * @param headerName the name of the header
-     * @param headerValue the value of the header
+     *
+     * @param qnameLocal The localname for the header QName.
+     * @param qnameNamespace The namespace for the header QName.
+     * @param headerName The name of the header.
+     * @param headerValue The value of the header.
      */
     public function addSimpleHeader(qnameLocal:String, qnameNamespace:String, headerName:String, headerValue:String):void
     {
@@ -385,8 +387,9 @@

     /**
      * Returns a header if a match is found based on QName, localName, and URI.
+     *
      * @param qname QName of the SOAPHeader.
-     * @param headerName Name of a header in the SOAPHeader content (Optional)
+     * @param headerName (Optional) Name of a header in the SOAPHeader content.
      *
      * @return A header if a match is found based on QName, localName, and URI.
      */
@@ -417,8 +420,9 @@

     /**
      * Removes the header with the given QName from all operations.
+     *
      * @param qname QName of the SOAPHeader.
-     * @param headerName Name of a header in the SOAPHeader content (Optional)
+     * @param headerName (Optional) Name of a header in the SOAPHeader content.
      */
     public function removeHeader(qname:QName, headerName:String = null):void
     {
@@ -451,8 +455,8 @@
      * header from the proxy to the endpoint. If useProxy is false this property
      * will be ignored.
      *
-     * @param remoteUsername the username to pass to the remote endpoint
-     * @param remotePassword the password to pass to the remote endpoint
+     * @param remoteUsername The username to pass to the remote endpoint.
+     * @param remotePassword The password to pass to the remote endpoint.
      * @param charset The character set encoding to use while encoding the
      * remote credentials. The default is null, which implies the legacy charset
      * of ISO-Latin-1. The only other supported charset is "UTF-8".


Transferred from the Adobe Open Source Subversion Repository

Revision: 17445
Author:   jszeto@adobe.com
Date:     2010-08-23T18:47:40.166311Z

Log Message:
-----------
Button icon support changes

Changed the icon support in Button. Icon is now a property instead of a style. I've added an optional skin part called iconDisplay:BitmapImage.

ButtonSkinBase does not use this skin part because BitmapImage can not be added as a child of a UIComponent. I renamed ButtonSkinBase.iconDisplay to iconInstance to avoid any confusion with the skin part name.

ButtonSkinBase listens for the "iconChange" event from the ButtonBase instead of relying on ButtonBase to push the icon to the iconDisplay.

QE notes: Need to update tests
Doc notes: none
Bugs: none
Reviewer: Corey
Tests run: checkintests
Is noteworthy for integration: yes, icon is a property now instead of a style

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/RadioButton.as
+++ frameworks/projects/spark/src/spark/components/RadioButton.as
@@ -47,6 +47,7 @@
 //--------------------------------------

 [Exclude(name="cornerRadius", kind="style")]
+[Exclude(name="icon", kind="property")]

 //--------------------------------------
 //  Other metadata


Transferred from the Adobe Open Source Subversion Repository

Revision: 8196
Author:   srahim@adobe.com
Date:     2009-06-24T19:54:37.843024Z

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

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

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

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

--- frameworks/projects/spark/src/spark/components/RadioButton.as
+++ frameworks/projects/spark/src/spark/components/RadioButton.as
@@ -59,11 +59,15 @@
  *  within a set of mutually exclusive choices.
  *  A RadioButton group is composed of two or more RadioButton controls
  *  with the same groupName property.
- *  The RadioButton group can refer to a group created by the
- *  <mx:RadioButtonGroup> tag.
+ *  While grouping RadioButton instances in a RadioButtonGroup is optional,
+ *  a group lets you do things like set a single event handler on a group of buttons,
+ *  rather than on each individual button.
+ *
+ *
The RadioButton group can refer to a group created by the
+ *  <s:RadioButtonGroup> tag.
  *  The user selects only one member of the group at a time.
  *  Selecting an unselected group member deselects the currently selected
- *  RadioButton control within that group.
+ *  RadioButton control within that group.

  *
  *
The RadioButton control has the following default characteristics:

  *

@@ -77,28 +81,32 @@
  *

  *

  *           Minimum size
- *           0 pixels
+ *           18 pixels wide and 18 pixels high
  *

  *

  *           Maximum size
- *           Undefined
+ *           10000 pixels wide and 10000 pixels high
  *

  *

  *
  *  @mxml
  *
- *
The <mx:RadioButton> tag inherits all of the tag
+ *
The <s:RadioButton> tag inherits all of the tag
  *  attributes of its superclass, and adds the following tag attributes:

  *
  *

- *  <mx:RadioButton
+ *  <s:RadioButton
  *    Properties
- *    groupName="radioGroup"
+ *    group=""
+ *    groupName="RadioButtonGroup_n"
+ *    selected=""
+ *    value="null"
  *  />
  *

  *
- *  @see mx.components.RadioButtonGroup
- *
+ *  @see spark.components.RadioButtonGroup
+ *  @see spark.components.RadioButtonGroup
+ *  @see spark.skins.spark.RadioButtonSkin
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5
@@ -181,8 +189,10 @@
     /**
      *  The RadioButtonGroup object to which this RadioButton belongs.
      *  When creating radio buttons to put in a RadioButtonGroup, it is
-     *  advisable to use group for all of the buttons or groupName for all of
-     *  the buttons. The groupName will be set to the generated name of the
+     *  advisable to use either the group property
+     *  or the groupName property for all of
+     *  the buttons.  The groupName property will be set
+     *  to the generated name of the
      *  RadioButtonGroup object.
      *
      *  @default the default RadioButtonGroup
@@ -288,13 +298,14 @@
      *  Specifies the name of the group to which this RadioButton control belongs, or
      *  specifies the value of the id property of a RadioButtonGroup control
      *  if this RadioButton is part of a group defined by a RadioButtonGroup control.
-     *  All radio buttons with the same groupName will be in the same tab group
-     *  even if they belong to different radio button groups.  When creating
+     *  All radio buttons with the same groupName property will be in the same tab group,
+     *  even if they belong to different radio button groups. When creating
      *  radio buttons to put in a RadioButtonGroup, it is advisable to
-     *  use group for all of the buttons or groupName for all of the buttons.
+     *  use either the group property
+     *  or the groupName property for all of the buttons.
      *
-     *  @default "RadioButtonGroup_number" where number is an integer greater
-     *  than or equal to 0.
+     *  @default "RadioButtonGroup_n", where n is an integer greater
+     *  than or equal to 0
      *  @see #group
      *
      *  @langversion 3.0