Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/airframework/src/mx/controls/FileSystemList.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemList.as
@@ -0,0 +1,1214 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls
+{
+
+import flash.events.KeyboardEvent;
+import flash.filesystem.File;
+import mx.controls.fileSystemClasses.FileSystemControlHelper;
+import mx.controls.List;
+import mx.core.mx_internal;
+import mx.core.ScrollPolicy;
+import mx.events.ListEvent;
+import mx.styles.CSSStyleDeclaration;
+import mx.styles.StyleManager;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the directory displayed by this control
+ *  has changed for any reason.
+ *
+ *  @eventType mx.events.FileEvent.DIRECTORY_CHANGE
+ */
+[Event(name="directoryChange", type="mx.events.FileEvent")]
+
+/**
+ *  Dispatched when the user tries to change
+ *  the directory displayed by this control.
+ *
+ *
The user can try to change the directory
+ *  by double-clicking a subdirectory,
+ *  by pressing Enter or Ctrl-Down when a subdirectory is selected,
+ *  by pressing Ctrl-Up when the control isn't displaying
+ *  the COMPUTER directory,
+ *  by pressing Ctrl-Left when there is a previous directory
+ *  in the history list to navigate back to,
+ *  or by pressing Ctrl-Right when there is a next directory
+ *  in the history list to navigate forward to.

+ *
+ *
This event is cancelable.
+ *  If you call event.preventDefault(),
+ *  the directory will not be changed.

+ *
+ *
After the directory property has changed
+ *  and the dataProvider contains File instances
+ *  for the items in the new directory,
+ *  the directoryChange event is dispatched.

+ *
+ *  @eventType mx.events.FileEvent.DIRECTORY_OPENING
+ */
+[Event(name="directoryChanging", type="mx.events.FileEvent")]
+
+/**
+ *  Dispatched when the user chooses a file by double-clicking it
+ *  or by selecting it and pressing Enter.
+ *
+ *  @eventType mx.events.FileEvent.FILE_CHOOSE
+ */
+[Event(name="fileChoose", type="mx.events.FileEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Specifies the icon that indicates a directory.
+ *  The default icon is located in the Assets.swf file.
+ *  In MXML, you can use the following syntax to set this property:
+ *  directoryIcon="@Embed(source='directoryIcon.jpg');"
+ *
+ *  @default TreeNodeIcon
+ */
+[Style(name="directoryIcon", type="Class", format="EmbeddedFile", inherit="no")]
+
+/**
+ *  Specifies the icon that indicates a file.
+ *  The default icon is located in the Assets.swf file.
+ *  In MXML, you can use the following syntax to set this property:
+ *  fileIcon="@Embed(source='fileIcon.jpg');"
+ *
+ *  @default TreeNodeIcon
+ */
+[Style(name="fileIcon", type="Class", format="EmbeddedFile", inherit="no")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[IconFile("FileSystemList.png")]
+
+[ResourceBundle("aircontrols")]
+
+/**
+ *  The FileSystemList control lets you display the contents of a
+ *  single file system directory, in a list format.
+ *
+ *
To change the displayed data, rather than using the dataProvider property,
+ *  you set the directory property.
+ *  The control then automatically populates the dataProvider
+ *  property by enumerating the contents of that directory.
+ *  You should not set the dataProvider yourself.

+ *
+ *
You set the directory property to a File instance,
+ *  as the following example shows:

+ *

+ *    <mx:FileSystemList directory="{File.desktopDirectory}"/>

+ *
+ *
You can set the enumerationMode property to specify
+ *  whether to show files, subdirectories, or both.
+ *  There are three ways to show both: directories first,
+ *  files first, or intermixed.

+ *
+ *
You can set the extensions property
+ *  to filter the displayed items so that only files
+ *  with the specified extensions appear.
+ *  The showHidden determines whether the control
+ *  displays files and subdirectories that the operating system
+ *  normally hides.
+ *  You can specify an additional filterFunction
+ *  to perform custom filtering, and a nameCompareFunction
+ *  to perform custom sorting.

+ *
+ *
Because AIR does not support file system notifications,
+ *  this control does not automatically refresh if a file or
+ *  subdirectory is created, deleted, moved, or renamed;
+ *  in other words, it can display an out-of-date view of the file system.
+ *  However, you can call refresh() to re-enumerate
+ *  the current directory.
+ *  You could, for example, choose to do this when you have
+ *  performed a file operation that you know causes the control's
+ *  view to become out-of-date, or when the user deactivates
+ *  and reactivates your application.

+ *
+ *
You can use the showIcons property
+ *  to show or hide icons, and the showExtensions
+ *  property to show or hide file extensions.

+ *
+ *
The control provides two methods, findItem()
+ *  and findIndex(), which you can use to search the
+ *  displayed files and subdirectories to find the one
+ *  with a specified nativePath.

+ *
+ *
Two properties, selectedPath
+ *  and selectedPaths, work similarly
+ *  to selectedItem and selectedItems
+ *  or selectedIndex and selectedIndices,
+ *  but let you specify the selection via nativePath
+ *  strings.
+ *  These are very useful if you need to display a directory
+ *  with particular items preselected, since in this case
+ *  you don't yet have the File items that the control will create
+ *  when it enumerates the directory, and you don't know what
+ *  their indices will be.

+ *
+ *
The control allows the user to navigate to other directories
+ *  using the mouse or keyboard.
+ *  The user can try to change the directory
+ *  by double-clicking a subdirectory,
+ *  by pressing Enter or Ctrl-Down when a subdirectory is selected,
+ *  by pressing Ctrl-Up when the control isn't displaying
+ *  the COMPUTER directory, by pressing Ctrl-Left when there is
+ *  a "previous" directory to navigate back to, or by pressing Ctrl-Right
+ *  when there is a "next" directory to navigate forward to.
+ *  If the user attempts to change the directory being displayed,
+ *  the control dispatches a cancelable directoryChanging event.
+ *  If you don't cancel this event by calling
+ *  event.preventDefault(), the control will display the
+ *  contents of the new directory and the directory
+ *  property will change.
+ *  Whenever the directory property changes, for any reason,
+ *  the controls dispatches a directoryChange event
+ *  to let you know.

+ *
+ *
In order to support "Up" and "Down" controls, the FileSystemList
+ *  has canNavigateUp and canNavigateDown
+ *  properties and navigateUp() and navigateDown()
+ *  methods. There is also a navigateTo() for navigating
+ *  to an arbitrary directory.

+ *
+ *
The control keeps track of the directories to which the user
+ *  has navigated, in order to make it easy for you to support
+ *  "Back" and "Forward" controls.
+ *  For more information, see the backHistory,
+ *  forwardHistory, canNavigateBack,
+ *  and canNavigateForward properties, and the
+ *  navigateBack() and navigateForward() methods.

+ *
+ *
Note: The icons displayed for each item are generic file and directory
+ *  icons which you can set using the fileIcon
+ *  and directoryIcon styles.
+ *  Flex's list-based controls currently support displaying
+ *  only embedded icons, not icons read at runtime.
+ *  Therefore the actual file system icons displayed in the operating system
+ *  are not displayed in a FileSystemList, even though they are
+ *  accessible in AIR via the icon property of a File.

+ */
+public class FileSystemList extends List
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * A constant that can be used as a value for the directory property,
+	 * representing a pseudo-top level directory named "Computer". This pseudo-directory
+     * contains the root directories
+     * (such as C:\ and D:\ on Windows or / on Macintosh).
+     */
+    public static const COMPUTER:File = FileSystemControlHelper.COMPUTER;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function FileSystemList()
+    {
+        super();
+
+        helper = new FileSystemControlHelper(this, false);
+
+        doubleClickEnabled = true;
+        horizontalScrollPolicy = ScrollPolicy.AUTO;
+        iconFunction = helper.fileIconFunction;
+        labelFunction = helper.fileLabelFunction;
+        showDataTips = true;
+
+        addEventListener(ListEvent.ITEM_DOUBLE_CLICK, itemDoubleClickHandler);
+
+        // Set the initial dataProvider by enumerating the root directories.
+        directory = COMPUTER;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  An undocumented class that implements functionality
+     *  shared by various file system components.
+     */
+    mx_internal var helper:FileSystemControlHelper;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  backHistory
+    //----------------------------------
+
+    [Bindable("historyChanged")]
+
+    /**
+     *  An Array of File objects representing directories
+     *  to which the user can navigate backward.
+     *
+     *
The first item in this Array is the next directory backward
+     *  in the history list.
+     *  The last item is the directory furthest backward
+     *  in the history list.

+     *
+     *
This Array may contain a null item, which represents
+     *  the non-existent directory whose contents are root directories
+     *  such as C:\ and D:\ on Microsoft Windows.

+     *
+     *
The following example shows how to use this property
+     *  along with the FileSystemHistoryButton control
+     *  to implement a back button:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:FileSystemHistoryButton label="Back"
+     *      enabled="{fileSystemViewer.canNavigateBack}"
+     *      dataProvider="{fileSystemViewer.backHistory}"
+     *      click="fileSystemViewer.navigateBack();"
+     *      itemClick="fileSystemViewer.navigateBack(event.index);"/>

+     *
+     *  @default []
+     */
+    public function get backHistory():Array
+    {
+        return helper.backHistory;
+    }
+
+    //----------------------------------
+    //  canNavigateBack
+    //----------------------------------
+
+    [Bindable("historyChanged")]
+
+    /**
+     *  A flag which is true if there is at least one directory
+     *  in the history list to which the user can navigate backward.
+     *
+     *
The following example shows how to use this property
+     *  along with the FileSystemHistoryButton control
+     *  to implement a back button:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:FileSystemHistoryButton label="Back"
+     *      enabled="{fileSystemViewer.canNavigateBack}"
+     *      dataProvider="{fileSystemViewer.backHistory}"
+     *      click="fileSystemViewer.navigateBack();"
+     *      itemClick="fileSystemViewer.navigateBack(event.index);"/>

+     *
+     *  @default false
+     */
+    public function get canNavigateBack():Boolean
+    {
+        return helper.canNavigateBack;
+    }
+
+    //----------------------------------
+    //  canNavigateDown
+    //----------------------------------
+
+    [Bindable("change")]
+    [Bindable("directoryChanged")]
+
+    /**
+     *  A flag which is true if the user can navigate down
+     *  into a selected directory.
+     *  This flag is false when there is no selected item
+     *  or when the selected item is a file rather than a directory.
+     *
+     *
The following example shows how to use this property
+     *  along with the Button control:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:Button label="Open"
+     *      enabled="{fileSystemViewer.canNavigateDown}"
+     *      click="fileSystemViewer.navigateDown();"/>

+     *
+     *  @default false
+     */
+    public function get canNavigateDown():Boolean
+    {
+        return helper.canNavigateDown;
+    }
+
+    //----------------------------------
+    //  canNavigateForward
+    //----------------------------------
+
+    [Bindable("historyChanged")]
+
+    /**
+     *  A flag which is true if there is at least one directory
+     *  in the history list to which the user can navigate forward.
+     *
+     *
The following example shows how to use this property
+     *  along with the FileSystemHistoryButton control
+     *  to implement a forward button:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:FileSystemHistoryButton label="Forward"
+     *      enabled="{fileSystemViewer.canNavigateForward}"
+     *      dataProvider="{fileSystemViewer.forwardHistory}"
+     *      click="fileSystemViewer.navigateForward();"
+     *      itemClick="fileSystemViewer.navigateForward(event.index);"/>

+     *
+     *  @default false
+     */
+    public function get canNavigateForward():Boolean
+    {
+        return helper.canNavigateForward;
+    }
+
+    //----------------------------------
+    //  canNavigateUp
+    //----------------------------------
+
+    [Bindable("directoryChanged")]
+
+    /**
+     *  A flag which is true if the user can navigate up
+     *  to a parent directory.
+     *  This flag is only false when this control is
+     *  displaying the root directories
+     *  such as C:\ and D:\ on Microsoft Windows.
+     *  (This is the case in which the directory
+     *  property is COMPUTER.)
+     *
+     *
The following example shows how to use this property
+     *  along with the Button control:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:Button label="Up"
+     *      enabled="{fileSystemViewer.canNavigateUp}"
+     *      click="fileSystemViewer.navigateUp();"/>

+     *
+     *  @default false
+     */
+    public function get canNavigateUp():Boolean
+    {
+        return helper.canNavigateUp;
+    }
+
+    //----------------------------------
+    //  directory
+    //----------------------------------
+
+    [Bindable("directoryChanged")]
+
+    /**
+     *  The directory whose contents this control displays.
+     *
+     *
If you set this property to a File object representing
+     *  an existing directory, the dataProvider
+     *  immediately becomes null.
+     *  Later, when this control is revalidated by the LayoutManager,
+     *  it enumerates that directory's contents
+     *  and populates the dataProvider property
+     *  with an ArrayCollection of the resulting File objects
+     *  for the directory's files and subdirectories.

+     *
+     *
Setting this to a File which does not represent
+     *  an existing directory is an error.
+     *  Setting this to COMPUTER synchronously displays
+     *  the root directories, such as C: and D: on Windows.

+     *
+     *
Setting this property deselects any previously selected items
+     *  and causes the control to reset its scroll position
+     *  to the upper-left corner.

+     *
+     *  @default COMPUTER
+     */
+    public function get directory():File
+    {
+        return helper.directory;
+    }
+
+    /**
+     *  @private
+     */
+    public function set directory(value:File):void
+    {
+        helper.directory = value;
+    }
+
+    //----------------------------------
+    //  enumerationMode
+    //----------------------------------
+
+    /**
+     *  A String specifying whether this control displays
+     *  only files, only subdirectories, or both.
+     *  In the case that both are displayed,
+     *  it also specifies whether the subdirectories are displayed
+     *  before, after, or mixed in with the files.
+     *  The possible values are specified
+     *  by the FileSystemEnumerationMode class.
+     *
+     *
This property affects which subdirectories
+     *  and files are displayed in the control,
+     *  and the order in which they appear.
+     *  However, it does not affect which File instances
+     *  are in the dataProvider property; it works
+     *  by changing the behavior of the filter function
+     *  that is applied to the dataProvider.
+     *  Setting it does not cause the current directory
+     *  to be re-enumerated.

+     *
+     *
Setting this property deselects any selected items
+     *  and causes the control to reset its scroll position
+     *  to the upper-left corner.

+     *
+     *  @default FileSystemEnumerationMode.DIRECTORIES_FIRST
+     *
+     *  @see mx.controls.FileSystemEnumerationMode
+     */
+    public function get enumerationMode():String
+    {
+        return helper.enumerationMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set enumerationMode(value:String):void
+    {
+        helper.enumerationMode = value;
+    }
+
+    //----------------------------------
+    //  extensions
+    //----------------------------------
+
+    /**
+     *  An Array of extensions specifying which files
+     *  can be displayed in this control.
+     *  If this property is set, for example,
+     *  to [ ".htm", ".html" ],
+     *  then only files with these extensions can be displayed.
+     *
+     *
Extensions are considered case-insensitive
+     *  and the preceding dot is optional.
+     *  For example, specifying ".HTML"
+     *  is equivalent to specifying "html".

+     *
+     *
Directories are not subject to extension filtering,
+     *  even if they have names containing dots.

+     *
+     *
The enumerationMode and filterFunction
+     *  properties are also involved in determining which files
+     *  appear in the control.
+     *  For example, if this property is [ ".htm", ".html" ],
+     *  an .html file will not be displayed if the
+     *  enumerationMode property is
+     *  FileSystemEnumerationMode.DIRECTORIES_ONLY,
+     *  or if the filterFunction returns false
+     *  for the file.

+     *
+     *
If this property is null, no extension filtering
+     *  occurs, and all files are displayed.
+     *  If this property is an empty Array, all extensions are filtered out
+     *  and no files with extensions are displayed.

+     *
+     *
This property affects which files are displayed in the control.
+     *  However, it does not affect which File instances
+     *  are in the dataProvider property; it works
+     *  by changing the behavior of the filter function
+     *  that is applied to the dataProvider.
+     *  Setting it does not cause the current directory
+     *  to be re-enumerated.

+     *
+     *
Setting this property deselects any selected items
+     *  and causes the control to reset its scroll position
+     *  to the upper-left corner.

+     *
+     *  @default null
+     */
+    public function get extensions():Array /* of String */
+    {
+        return helper.extensions;
+    }
+
+    /**
+     *  @private
+     */
+    public function set extensions(value:Array /* of String */):void
+    {
+        helper.extensions = value;
+    }
+
+    //----------------------------------
+    //  filterFunction
+    //----------------------------------
+
+    /**
+     *  A callback Function that you can use to perform additional filtering,
+     *  after the enumerationMode and extensions
+     *  properties have been applied, to determine which files
+     *  and subdirectories are displayed and which are hidden.
+     *
+     *
This function must have the following signature:

+     *
+     *
function myFilterFunction(file:File):Boolean

+     *
+     *  This function should return true to show the specified
+     *  file or subdirectory and false to hide it.
+     *
+     *
To ensure that every enumerated file and subdirectory is passed
+     *  to this function, the enumerationMode property must
+     *  not be FileSystemEnumerationMode.FILES_ONLY or
+     *  FileSystemEnumerationMode.DIRECTORIES_ONLY,
+     *  and the extensions property must be null.
+     *  Otherwise, these properties will cause pre-filtering to occur
+     *  before this filter function is called.

+     *
+     *
This property affects which subdirectories
+     *  and files are displayed in the control.
+     *  However, it does not affect which File instances
+     *  are in the dataProvider property; it works
+     *  by changing the behavior of the filter function
+     *  that is applied to the dataProvider.
+     *  Setting it does not cause the current directory
+     *  to be re-enumerated.

+     *
+     *
Setting this property deselects any selected items
+     *  and causes the control to reset its scroll position
+     *  to the upper-left corner.

+     *
+     *  @default null
+     */
+    public function get filterFunction():Function
+    {
+        return helper.filterFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set filterFunction(value:Function):void
+    {
+        helper.filterFunction = value;
+    }
+
+   //----------------------------------
+    //  forwardHistory
+    //----------------------------------
+
+    [Bindable("historyChanged")]
+
+    /**
+     *  An Array of File objects representing directories
+     *  to which the user can navigate forward.
+     *
+     *
The first item in this Array is the next directory forward
+     *  in the history list.
+     *  The last item is the directory furthest forward
+     *  in the history list.

+     *
+     *
This Array may contain the special COMPUTER File object,
+     *  which represents the non-existent directory whose contents
+     *  are root directories such as C:\ and D:\ on Windows.

+     *
+     *
The following example shows how to use this property
+     *  along with the FileSystemHistoryButton control
+     *  to implement a forward button:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:FileSystemHistoryButton label="Forward"
+     *      enabled="{fileSystemViewer.canNavigateForward}"
+     *      dataProvider="{fileSystemViewer.forwardHistory}"
+     *      click="fileSystemViewer.navigateForward();"
+     *      itemClick="fileSystemViewer.navigateForward(event.index);"/>

+     *
+     *  @default []
+     */
+    public function get forwardHistory():Array
+    {
+        return helper.forwardHistory;
+    }
+
+    //----------------------------------
+    //  nameCompareFunction
+    //----------------------------------
+
+    /**
+     *  A callback Function that you can use to change how file and subdirectory
+     *  names are compared in order to produce the sort order.
+     *
+     *
This function must have the following signature:

+     *
+     *
function myNameCompareFunction(name1:String, name2:String):int

+     *
+     *
It returns -1 if name1 should sort before
+     *  name2, 1 if name1 should
+     *  sort after name2, and 0 if the names
+     *  are the same.

+     *
+     *
If you do not set this property, the control performs
+     *  a case-insensitive, locale-dependent comparison of the two names,
+     *  by first calling the String method toLocaleLowerCase()
+     *  on each name and then comparing them with the <
+     *  and > operators.

+     *
+     *
If you have set enumerationMode to either
+     *  FileSystemEnumerationMode.FILES_FIRST or
+     *  FileSystemEnumerationMode.DIRECTORIES_FIRST,
+     *  then this method will be used to compare names only within
+     *  the separate groups of files and directories.

+     *
+     *
This property affects the order in which
+     *  subdirectories and files are displayed in the control.
+     *  However, it does not affect which File instances
+     *  are in the dataProvider property; it works
+     *  by changing the behavior of the sort
+     *  that is applied to the dataProvider.
+     *  Setting it does not cause the current directory
+     *  to be re-enumerated.

+     *
+     *
Setting this property deselects any selected items
+     *  and causes the control to reset its scroll position
+     *  to the upper-left corner.

+     *
+     *  @default null
+     */
+    public function get nameCompareFunction():Function
+    {
+        return helper.nameCompareFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set nameCompareFunction(value:Function):void
+    {
+        helper.nameCompareFunction = value;
+    }
+
+    //----------------------------------
+    //  selectedPath
+    //----------------------------------
+
+    [Bindable("change")]
+    [Bindable("directoryChanged")]
+
+    /**
+     *  The nativePath of the File item
+     *  representing the selected subdirectory or file,
+     *  or null if no item is selected.
+     *
+     *
If multiple items are selected, getting this property
+     *  gives the first path in the selectedPaths array.

+     *
+     *
Setting this property affects the selectedPaths,
+     *  selectedItem, selectedItems,
+     *  selectedIndex, and selectedIndices
+     *  properties.

+     *
+     *  @default null
+     *
+     *  @see mx.controls.listClasses.ListBase#selectedIndex
+     *  @see mx.controls.listClasses.ListBase#selectedItem
+     */
+    public function get selectedPath():String
+    {
+        return helper.selectedPath;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedPath(value:String):void
+    {
+        helper.selectedPath = value;
+    }
+
+    //----------------------------------
+    //  selectedPaths
+    //----------------------------------
+
+    [Bindable("change")]
+    [Bindable("directoryChanged")]
+
+    /**
+     *  An Array of nativePath Strings for the File items
+     *  representing the selected subdirectories and files.
+     *  This Array is empty if no items are selected.
+     *
+     *
Setting this property affects the selectedPaths,
+     *  selectedItem, selectedItems,
+     *  selectedIndex, and selectedIndices
+     *  properties.

+     *
+     *  @default []
+     *
+     *  @see mx.controls.listClasses.ListBase#selectedIndex
+     *  @see mx.controls.listClasses.ListBase#selectedItem
+     */
+    public function get selectedPaths():Array /* of String */
+    {
+        return helper.selectedPaths;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedPaths(value:Array /* of String */):void
+    {
+        helper.selectedPaths = value;
+    }
+
+    //----------------------------------
+    //  showExtensions
+    //----------------------------------
+
+    /**
+     *  A flag that specifies whether extensions in file names are shown.
+     *  Set this property to true to show file extensions
+     *  and to false to hide them.
+     *  Extensions in directory names are always shown.
+     *
+     *
Setting this property does not affect which items
+     *  are displayed, or the order in which they appear.
+     *  It also does not affect which items are selected,
+     *  or the scroll position.

+     *
+     *  @default true
+     */
+    public function get showExtensions():Boolean
+    {
+        return helper.showExtensions;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showExtensions(value:Boolean):void
+    {
+        helper.showExtensions = value;
+    }
+
+    //----------------------------------
+    //  showHidden
+    //----------------------------------
+
+    /**
+     *  A flag that specifies whether files and directories
+     *  that the operating system considers hidden are displayed.
+     *  Set this property to true to show hidden files
+     *  and directories and to false to hide them.
+     *
+     *
Setting this property deselects any selected items
+     *  and causes the control to reset its scroll position
+     *  to the upper-left corner.

+     *
+     *  @default false
+     */
+    public function get showHidden():Boolean
+    {
+        return helper.showHidden;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showHidden(value:Boolean):void
+    {
+        helper.showHidden = value;
+    }
+
+    //----------------------------------
+    //  showIcons
+    //----------------------------------
+
+    /**
+     *  A flag that specifies that icons are displayed
+     *  before the file name.
+     *  Set this property to true to show icons
+     *  and to false to hide them.
+     *
+     *
You can set the directoryIcon
+     *  and fileIcon styles to change the default icons.
+     *  This control cannot display the actual icon that the operating system
+     *  displays for a file, because Apollo M2 does not support that feature.

+     *
+     *
Setting this property does not affect which items
+     *  are displayed, or the order in which they appear.
+     *  It also does not affect which items are selected,
+     *  or the scroll position.

+     *
+     *  @default true
+     */
+    public function get showIcons():Boolean
+    {
+        return helper.showIcons;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showIcons(value:Boolean):void
+    {
+        helper.showIcons = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        // Call this before the supermethod
+        // because it sets the dataProvider superproperty.
+        helper.commitProperties();
+
+        super.commitProperties();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var text:String = resourceManager.getString(
+            "aircontrols", "fileSystemList_measuredText");
+        measuredWidth = measureText(text).width;
+    }
+
+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+
+        helper.styleChanged(styleProp);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function itemToUID(data:Object):String
+    {
+        return helper.itemToUID(data);
+    }
+
+    /**
+     *  @private
+     */
+    override public function itemToDataTip(data:Object):String
+    {
+        return helper.fileLabelFunction(File(data));
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Returns the index of the File item with the specified
+     *  native file system path.
+     *
+     *
Items which are present in the control's collection
+     *  but not displayed because of filtering are not searched.

+     *
+     *  @param file A String specifying the nativePath
+     *  of a File item.
+     *
+     *  @return A zero-based index, or -1
+     *  if no File was found with the specified path.
+     *
+     *  @see flash.filesystem.File#nativePath
+     */
+    public function findIndex(nativePath:String):int
+    {
+        return helper.findIndex(nativePath);
+    }
+
+    /**
+     *  Searches the File instances currently displayed in this control
+     *  and returns the one with the specified nativePathproperty.
+     *
+     *
File instances which are present in the control's collection
+     *  but not displayed because of filtering are not searched.

+     *
+     *  @param file A String specifying the nativePath
+     *  of a File item.
+     *
+     *  @return A File instance if one was found with the specified
+     *  nativePath, or null if none was found.
+     */
+    public function findItem(nativePath:String):File
+    {
+        return helper.findItem(nativePath);
+    }
+
+    /**
+     *  Changes this control to display the contents
+     *  of the selected subdirectory.
+     *
+     *
If a subdirectory is not selected, this method does nothing.

+     *
+     *
When this method returns, the directory property
+     *  will contain the File instance for the new directory.
+     *  The dataProvider property will be temporarily
+     *  null until the new directory has been enumerated.
+     *  After the enumeration, the dataProvider property
+     *  will contain an ArrayCollection of File instances
+     *  for the new directory's contents.

+     *
+     *
The following example shows how to use this property
+     *  along with the Button control to create an open button:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:Button label="Open"
+     *      enabled="{fileSystemViewer.canNavigateDown}"
+     *      click="fileSystemViewer.navigateDown();"/>

+     */
+    public function navigateDown():void
+    {
+        helper.navigateDown();
+    }
+
+    /**
+     *  Changes this control to display the contents of the next directory
+     *  up in the hierarchy.
+     *
+     *
If this control is currently displaying root directories
+     *  (such as C: and D: on Microsoft Windows), this method does nothing.

+     *
+     *
When this method returns, the directory property
+     *  will contain the File instance for the new directory.
+     *  The dataProvider property will be temporarily
+     *  null until the new directory has been enumerated.
+     *  After the enumeration, the dataProvider property
+     *  will contain an ArrayCollection of File instances
+     *  for the new directory's contents.

+     *
+     *
The following example shows how to use this property
+     *  along with the Button control to create an up button:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:Button label="Up"
+     *      enabled="{fileSystemViewer.canNavigateUp}"
+     *      click="fileSystemViewer.navigateUp();"/>

+     */
+    public function navigateUp():void
+    {
+        helper.navigateUp();
+    }
+
+    /**
+     *  Changes this control to display the contents of a previously-visited
+     *  directory in the backHistory array.
+     *
+     *
If the backHistory array is empty, or if you specify
+     *  an index that is not in that array, then this method does nothing.

+     *
+     *
When this method returns, the directory property
+     *  will contain the File instance for the new directory.
+     *  The dataProvider property will be temporarily
+     *  null until the new directory has been enumerated.
+     *  After the enumeration, the dataProvider property
+     *  will contain an ArrayCollection of File instances
+     *  for the new directory's contents.

+     *
+     *
The history list is left unchanged. However, the current index
+     *  into it changes, which affects the backHistory
+     *  and forwardHistory properties.
+     *  They have new values as soon as this method returns.

+     *
+     *
The following example shows how to use this property
+     *  along with the FileSystemHistoryButton control to create a back button:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:FileSystemHistoryButton label="Back"
+     *      enabled="{fileSystemViewer.canNavigateBack}"
+     *      dataProvider="{fileSystemViewer.backHistory}"
+     *      click="fileSystemViewer.navigateBack();"
+     *      itemClick="fileSystemViewer.navigateBack(event.index);"/>

+     *
+     *  @param index The index in the backHistory array
+     *  to navigate to.
+     *  The default is 0, indicating the directory that is "closest back".
+     */
+    public function navigateBack(index:int = 0):void
+    {
+        helper.navigateBack(index);
+    }
+
+    /**
+     *  Changes this control to display the contents of a previously-visited
+     *  directory in the forwardHistory array.
+     *
+     *
If the forwardHistory array is empty, or if you specify
+     *  an index that is not in that array, then this method does nothing.

+     *
+     *
When this method returns, the directory property
+     *  will contain the File instance for the new directory.
+     *  The dataProvider property will be temporarily
+     *  null until the new directory has been enumerated.
+     *  After the enumeration, the dataProvider property
+     *  will contain an ArrayCollection of File instances
+     *  for the new directory's contents.

+     *
+     *
The history list is left unchanged. However, the current index
+     *  into it changes, which affects the backHistory
+     *  and forwardHistory properties.
+     *  They have new values as soon as this method returns.

+     *
+     *
The following example shows how to use this property
+     *  along with the FileSystemHistoryButton control to create a forward button:

+     *
+     *

+     *  <mx:FileSystemList id="fileSystemViewer" directory="{File.desktopDirectory}"/>
+     *  <mx:FileSystemHistoryButton label="Forward"
+     *      enabled="{fileSystemViewer.canNavigateForward}"
+     *      dataProvider="{fileSystemViewer.forwardHistory}"
+     *      click="fileSystemViewer.navigateForward();"
+     *      itemClick="fileSystemViewer.navigateForward(event.index);"/>

+     *
+     *  @param index The index in the forwardHistory array
+     *  to navigate to.
+     *  The default is 0, indicating the directory that is "closest forward".
+     */
+    public function navigateForward(index:int = 0):void
+    {
+        helper.navigateForward(index);
+    }
+
+    /**
+     *  Changes this control to display the contents of the specified
+     *  directory.
+     *
+     *  @param file A file object representing a file or directory.
+     */
+    public function navigateTo(directory:File):void
+    {
+        helper.navigateTo(directory);
+    }
+
+    /**
+     *  Re-enumerates the current directory being displayed by this control.
+     *
+     *
Because AIR does not support file system notifications,
+     *  this control does not automatically refresh if a file or
+     *  subdirectory is created, deleted, moved, or renamed;
+     *  in other words, it can display an out-of-date view of the file system.
+     *  However, you can call refresh() to re-enumerate
+     *  the current directory so that it is up-to-date.
+     *  You could, for example, choose to do this when you have
+     *  performed a file operation that you know causes the control's
+     *  view to become stale, or when the user deactivates
+     *  and reactivates your application.

+     *
+     *
This method preserves any selected items (if they still exist)
+     *  and the scroll position (if the first visible item still exists).

+     */
+    public function refresh():void
+    {
+        helper.refresh();
+    }
+
+    /**
+     *  Clears this control so that it displays no items.
+     *
+     *
This method sets the dataProvider to null
+     *  but leaves the directory property unchanged.
+     *  You can call refresh to populate this control again.

+     */
+    public function clear():void
+    {
+        helper.clear();
+    }
+
+    /**
+     *  @private
+     */
+    public function resetHistory(dir:File):void
+    {
+        helper.resetHistory(dir);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function keyDownHandler(event:KeyboardEvent):void
+    {
+        if (helper.handleKeyDown(event))
+            return;
+
+        super.keyDownHandler(event);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    protected function itemDoubleClickHandler(event:ListEvent):void
+    {
+        helper.itemDoubleClickHandler(event);
+    }
+}
+
+}


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

--- frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.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: 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@1263068 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/validators/CreditCardValidatorCardType.as
+++ frameworks/projects/framework/src/mx/validators/CreditCardValidatorCardType.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006 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: 17319
Author:   aharui@adobe.com
Date:     2010-08-13T21:43:17.937601Z

Log Message:
-----------
Update code so we don't set autosize=false accidentally

QE notes: none
Doc notes: none
Bugs: SDK-27386
Reviewer: Carol
Tests run: checkintests mustella/gumbo/RichEditableText
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -2717,8 +2717,10 @@
 			if (getStyle("lineBreak") == "explicit")
 				return;

-			// If we don't measure
-			if (canSkipMeasurement())
+			// If we don't measure.
+			// Call super so we don't call the override
+			// and set autoSize to false;
+			if (super.canSkipMeasurement())
 				return;

 			if (!isNaN(explicitHeight))


Transferred from the Adobe Open Source Subversion Repository

Revision: 20433
Author:   eday@adobe.com
Date:     2011-02-23T23:19:07.721133Z

Log Message:
-----------
Fix for SDK-29551.  Don't apply final values when animation with start delay plays in reverse.

QE notes:
Doc notes:
Bugs: SDK-29551
Reviewer: Corey
Tests run: checkintests, full cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/animation/Animation.as

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

--- frameworks/projects/spark/src/spark/effects/animation/Animation.as
+++ frameworks/projects/spark/src/spark/effects/animation/Animation.as
@@ -958,9 +958,14 @@
             sendAnimationEvent(EffectEvent.EFFECT_START);
         if (repeatCount > 1 && repeatBehavior == "reverse" && (repeatCount % 2 == 0))
             _invertValues = true;
-        calculateValue(duration);
-
-        sendUpdateEvent();
+
+        // We don't want to update to final values when playing in
+        // reverse with a start delay.
+        if (!(_doReverse && startDelay > 0))
+        {
+            calculateValue(duration);
+            sendUpdateEvent();
+        }

         sendAnimationEvent(EffectEvent.EFFECT_END);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/Series.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/Series.as
@@ -2331,8 +2331,12 @@
     }

     /**
-     *  This is used if user does not set any custom function as filterFunction for the series.
+     *  This is used if you do not set a custom function as the filterFunction for the series.
      *  Individual series should overwrite this.
+     *
+     *  @param cache An array of objects.
+     *
+     *  @return An array of objects.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 18240
Author:   deeptika@adobe.com
Date:     2010-10-20T09:18:06.060725Z

Log Message:
-----------
Legend code clean up - Readding a few API which were accidentally removed in previous checkin
Adding default styles to CSS files

QE notes: MXCharts.css is added for projects without spark.swc. That css should be added to -theme argument.
Doc notes: MXCharts.css is added for projects without spark.swc. That css should be added to -theme argument.
Bugs:
Reviewer:
Tests run: checkintests, cyclone server
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/Legend.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/styles/metadata/TextStyles.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/MXCharts.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/data_management.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/Legend.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/MXCharts.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/styles/metadata/TextStyles.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/charts.css</path>

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

--- frameworks/projects/charts/src/mx/styles/metadata/TextStyles.as
+++ frameworks/projects/charts/src/mx/styles/metadata/TextStyles.as
@@ -228,6 +228,25 @@
 [Style(name="letterSpacing", type="Number", inherit="yes")]

 /**
+ *  The locale of the text displayed by this component.
+ *
+ *
FTE and TLF use this locale to map Unicode characters
+ *  to font glyphs and to find fallback fonts.

+ *
+ *
Note: This style only applies when an MX component
+ *  specifies UIFTETextField as its textFieldClass.

+ *
+ *  @default "en"
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="locale", type="String", inherit="yes")]
+
+
+/**
  *  Alignment of text within a container.
  *  Possible values are "left", "right",
  *  or "center".
@@ -262,6 +281,25 @@
 [Style(name="textDecoration", type="String", enumeration="none,underline", inherit="yes")]

 /**
+ *  The class implementing IUITextField that is used by this component
+ *  to render text.
+ *
+ *
It can be set to either the mx.core.UITextField class
+ *  (to use the classic TextField class built into Flash Player)
+ *  or the mx.core.UIFTETextField class
+ *  (to use the Text Layout Framework to get improved text rendering,
+ *  including bidirectional layout).

+ *
+ *  @default mx.core.UITextField
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="textFieldClass", type="Class", inherit="no")]
+
+/**
  *  Offset of first line of text from the left side of the container, in pixels.
  *
  *  @default 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@1259500 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as
+++ frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 10828
Author:   jszeto@adobe.com
Date:     2009-10-02T17:41:48.523309Z

Log Message:
-----------
FXG stroke and fill translation fix

http://bugs.adobe.com/jira/browse/SDK-23257 - Gradient translation should occur from 0,0, not the upper left bounds

The current API only passes in the shape's bounds. I have added a new targetOrigin parameter to IFill.begin, IStroke.apply and IStroke.createGraphicsStroke of type Point. It is the origin (0,0) of the shape in the target graphic's coordinate space.

Changed the logic in the gradient stroke and fills. The x and y transform properties are now positioned relative to the origin instead of to the top left corner of the bounds. If no x and y are set, then the default behavior remains the same.

Removed the centering logic in LinearGradientStroke when scaleX was set.

This API change has been approved by PARB.

QE notes: Need to add tests that exercise this logic
Doc notes: Need to document additions to the API
Bugs: SDK-23257
Reviewer: Deepa
Tests run: spark/primitives, gumbo/components
Is noteworthy for integration: Yes, modifications to the API

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradient.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/LinearGradient.as
+++ frameworks/projects/framework/src/mx/graphics/LinearGradient.as
@@ -15,10 +15,11 @@
 import flash.display.GradientType;
 import flash.display.Graphics;
 import flash.geom.Matrix;
+import flash.geom.Point;
 import flash.geom.Rectangle;

 import mx.core.mx_internal;
-
+
 use namespace mx_internal;

 /**
@@ -135,6 +136,11 @@
 		super();
 	}

+    /**
+     *  @private
+     */
+    private static var commonMatrix:Matrix = new Matrix();
+
 	//--------------------------------------------------------------------------
 	//
 	//
@@ -197,16 +203,6 @@
 	//
 	//--------------------------------------------------------------------------

-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	private static var commonMatrix:Matrix = new Matrix();
-
 	/**
 	 *  @inheritDoc
 	 *
@@ -215,7 +211,7 @@
 	 *  @playerversion AIR 1.1
 	 *  @productversion Flex 3
 	 */
-	public function begin(target:Graphics, bounds:Rectangle):void
+	public function begin(target:Graphics, targetBounds:Rectangle, targetOrigin:Point):void
 	{
 		commonMatrix.identity();

@@ -243,18 +239,18 @@
 					if (normalizedAngle > 90)
 						normalizedAngle = 180 - normalizedAngle;

-					var side:Number = bounds.width;
+					var side:Number = targetBounds.width;
 					// Get the hypotenuse of the largest triangle that can fit in the bounds
-					var hypotenuse:Number = Math.sqrt(bounds.width * bounds.width + bounds.height * bounds.height);
+					var hypotenuse:Number = Math.sqrt(targetBounds.width * targetBounds.width + targetBounds.height * targetBounds.height);
 					// Get the angle of that largest triangle
-					var hypotenuseAngle:Number =  Math.acos(bounds.width / hypotenuse) * 180 / Math.PI;
+					var hypotenuseAngle:Number =  Math.acos(targetBounds.width / hypotenuse) * 180 / Math.PI;

 					// If the angle is larger than the hypotenuse angle, then use the height
 					// as the adjacent side of the triangle
 					if (normalizedAngle > hypotenuseAngle)
 					{
 						normalizedAngle = 90 - normalizedAngle;
-						side = bounds.height;
+						side = targetBounds.height;
 					}

 					// Solve for the hypotenuse given an adjacent side and an angle.
@@ -263,7 +259,7 @@
 				else
 				{
 					// Use either width or height based on the rotation
-					length = (rotation % 180) == 0 ? bounds.width : bounds.height;
+					length = (rotation % 180) == 0 ? targetBounds.width : targetBounds.height;
 				}
 	    	}

@@ -287,17 +283,21 @@

 		    commonMatrix.rotate (!isNaN(_angle) ? _angle : rotationInRadians);
 		    if (isNaN(tx))
-	    		tx = bounds.width / 2;
+	    		tx = targetBounds.left + targetBounds.width / 2;
+            else
+                tx += targetOrigin.x;
 		    if (isNaN(ty))
-	    		ty = bounds.height / 2;
-	    	commonMatrix.translate(tx + bounds.left, ty + bounds.top);
+	    		ty = targetBounds.top + targetBounds.height / 2;
+            else
+                ty += targetOrigin.y;
+	    	commonMatrix.translate(tx, ty);
 		}
 		else
 		{
             commonMatrix.translate(GRADIENT_DIMENSION / 2, GRADIENT_DIMENSION / 2);
             commonMatrix.scale(1 / GRADIENT_DIMENSION, 1 / GRADIENT_DIMENSION);
             commonMatrix.concat(compoundTransform.matrix);
-            commonMatrix.translate(bounds.left, bounds.top);
+            commonMatrix.translate(targetOrigin.x, targetOrigin.y);
 		}

 		target.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios,


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

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

 package mx.styles
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3594
Author:   pfarland@adobe.com
Date:     2008-10-13T18:00:52.025975Z

Log Message:
-----------
Initial check-in for Advanced CSS selector support. Note that since direct AST generation for advanced styles (i.e. equivalent code of StyleModule.vm, StyleDef.vm, ClassDefLib.vm) is not yet implemented and as such advanced selector support is only enabled when the compiler -keep=true is enabled at this time. Direct AST generation to follow.

This change adds support for descendant type selectors (e.g. Panel VBox Button), non-global class selectors (e.g. Button.special), id selectors (e.g. Button#button14), and combinations of these types of selectors (e.e. Panel.special VBox.box12 Button.cancel). Pseudo selector awareness is included but it is not yet wired up to the runtime states mechanism as an efficient method of reacting to state changes is still being developed. Combinator conditional global selectors will be supported soon (i.e. the scenario of combining both an id and class selector at the top level, e.g. .foo#foo12, this requires a more expensive search of global class selectors).

This change juggles both the introduction of advanced selector support while retaining legacy styles APIs. The major difference with advanced styles is that multiple styles need to be considered for a type. This requires new data structures to keep track of selectors by subject. Performance analysis will be conducted to ensure these new data structures do not add unacceptable overhead to the style subsystem.

For the compiler this change consolidates styles processing in the base StyleModule class and then MXML-specific overrides (i.e. inline <Styles> nodes and SWC defaults.css) are in the StylesContainer.java class, which now extends StyleModule. The existing structure for legacy simple style codegen was retained and advanced style codegen wedged in.

QA: Yes
Doc: Not yet
Checkintests: Pass 100%
mxunit styles tests: Pass 100% (note that styles modules include tests you need to manually compile the .css files to swf and they're currently cleaned out each time a build runs... QE please correct this).
mustella styles tests: QE's select list of components testsuites pass 100%. Any failures in the full suite will be addressed in the next-checkin.
Reviewers: Glenn (framework), Paul (compiler)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/CssCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager3.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleSelector.java</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleProperty.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleDeclaration.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelectorKind.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSConditionKind.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/FontFaceRule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleSheet.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleDocumentHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleProperty.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/Rule.java</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleCondition.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleParser.java</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
+++ frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
@@ -29,6 +29,7 @@
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
 import mx.styles.IStyleModule;
+import mx.utils.OrderedObject;

 use namespace mx_internal;

@@ -39,7 +40,7 @@
 /**
  *  @private
  */
-public class StyleManagerImpl implements IStyleManager2
+public class StyleManagerImpl implements IStyleManager3
 {
     include "../core/Version.as";

@@ -267,6 +268,14 @@

     /**
      *  @private
+     *  A map of CSS subjects that have pseudo selectors. If a subject does
+     *  have a pseudo selector, a state change requires styles to be
+     *  recalculated.
+     */
+    private var _pseudoSubjects:Object;
+
+    /**
+     *  @private
      *  A map of CSS selectors -- such as "global", "Button", and ".bigRed" --
      *  to CSSStyleDeclarations.
      *  This collection is accessed via getStyleDeclaration(),
@@ -278,6 +287,15 @@
      *  @private
      */
     private var styleModules:Object = {};
+
+    /**
+     *  @private
+     *  A map of selector "subjects" to an ordered map of selector Strings and
+     *  their associated CSSStyleDeclarations.
+     *  The subject is the right most simple type selector in a potential chain
+     *  of selectors.
+     */
+    private var _subjects:Object = {};

 	/**
 	 *  @private
@@ -352,15 +370,22 @@
     /**
      *  @private
      */
-    private var _typeSelectorCache:Object = {};
+    private var _typeSelectorCache:Object;

     /**
      *  @private
      */
     public function get typeSelectorCache():Object
     {
+        if (_typeSelectorCache == null)
+            _typeSelectorCache = {};
+
         return _typeSelectorCache;
     }
+
+    /**
+     * @private
+     */
     public function set typeSelectorCache(value:Object):void
     {
         _typeSelectorCache = value;
@@ -385,9 +410,14 @@
 			delete _inheritingStyles["textDecoration"];
 			delete _inheritingStyles["leading"];
 		}
-
+
 		if (!stylesRoot)
-			stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
+		{
+			if (_selectors["global"] != null)
+			{
+			    stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
+			}
+		}
     }

     /**
@@ -403,8 +433,92 @@
     	var theSelectors:Array = [];
     	for (var i:String in _selectors)
     		theSelectors.push(i);
-
+
     	return theSelectors;
+    }
+
+    /**
+     * @private
+     * Determines whether at least one pseudo-selector has been specified for
+     * the given subject.
+     */
+    public function hasPseudoSelector(subject:String):Boolean
+    {
+        return _pseudoSubjects != null && _pseudoSubjects[subject] != null;
+    }
+
+    /**
+     *  Adds this style declaration to a collection of declarations for the
+     *  associated subject.
+     *
+     *  @param styleDeclaration The style declaration to add.
+     *  @param update Set to true to force an immediate update of
+     *  the styles. Set to false to avoid an immediate update of
+     *  the styles in the application.
+     */
+    public function addStyleDeclaration(styleDeclaration:CSSStyleDeclaration,
+            update:Boolean=false):void
+    {
+
+        // We index by subject to help match advanced selectors
+        var subject:String = styleDeclaration.subject;
+        var selectorKey:String = styleDeclaration.selectorString;
+        if (subject != null)
+        {
+            var declarations:OrderedObject = _subjects[subject];
+            if (declarations == null)
+            {
+                declarations = new OrderedObject();
+                declarations[selectorKey] = styleDeclaration;
+                _subjects[subject] = declarations;
+            }
+            else
+            {
+                declarations[selectorKey] = styleDeclaration;
+            }
+        }
+
+        // Populate the legacy selectors Array for this style declaration
+        styleDeclaration.selectorRefCount++;
+        _selectors[selectorKey] = styleDeclaration;
+
+        // Also remember subjects that have pseudo-selectors to optimize
+        // styles during component state changes.
+        if (styleDeclaration.isPseudoSelector())
+        {
+            if (_pseudoSubjects == null)
+                _pseudoSubjects = {};
+
+            _pseudoSubjects[subject] = true;
+        }
+
+        // Flush cache and start over.
+        if (_typeSelectorCache)
+            _typeSelectorCache = {};
+
+        if (update)
+            styleDeclarationsChanged();
+    }
+
+    /**
+     *  Retrieve all style declarations applicable to this subject. The subject
+     *  is the right most simple type selector in a selector chain.
+     *
+     *  @param subject The subject of the style declarations.
+     */
+    public function getStyleDeclarations(subject:String):Object // Map of selector String, CSSStyleDeclaration
+    {
+        // If we were passed a subject with a package name,
+        // such as "mx.controls.Button", strip off the package name
+        // leaving just "Button" and look for that subject.
+        if (subject.charAt(0) != ".")
+        {
+            var index:int = subject.lastIndexOf(".");
+            if (index != -1)
+                subject = subject.substr(index + 1);
+        }
+
+        return _subjects[subject];
     }

     /**
@@ -432,8 +546,7 @@
      *
      *  @return The style declaration whose name matches the selector property.
      */
-    public function getStyleDeclaration(
-                                selector:String):CSSStyleDeclaration
+    public function getStyleDeclaration(selector:String):CSSStyleDeclaration
     {
         // If we were passed a type selector with a package name,
         // such as "mx.controls.Button", strip off the package name
@@ -481,15 +594,8 @@
                                 styleDeclaration:CSSStyleDeclaration,
                                 update:Boolean):void
     {
-        styleDeclaration.selectorRefCount++;
-
-        _selectors[selector] = styleDeclaration;
-
-        // Flush cache and start over.
-        typeSelectorCache = {};
-
-        if (update)
-            styleDeclarationsChanged();
+        styleDeclaration.selectorString = selector;
+        addStyleDeclaration(styleDeclaration, update);
     }

     /**
@@ -522,6 +628,27 @@
             styleDeclaration.selectorRefCount--;

         delete _selectors[selector];
+
+        // Clear out matching decls from our selectors by subject
+        var decls:Object;
+        if (styleDeclaration && styleDeclaration.subject)
+        {
+            decls = _subjects[styleDeclaration.subject];
+            if (decls)
+                delete decls[selector];
+        }
+        else
+        {
+            for each (decls in _subjects)
+            {
+                 styleDeclaration = decls[selector];
+                 if (styleDeclaration)
+                 {
+                     delete decls[selector];
+                     break;
+                 }
+            }
+        }

         if (update)
             styleDeclarationsChanged();


Transferred from the Adobe Open Source Subversion Repository

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

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

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

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/skins/halo/ButtonBarButtonSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/ButtonBarButtonSkin.as
@@ -24,6 +24,11 @@

 /**
  *  The skin for all the states of the ButtonBarButtons in a ButtonBar.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ButtonBarButtonSkin extends Border
 {
@@ -83,6 +88,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function ButtonBarButtonSkin()
 	{
@@ -386,6 +396,11 @@

 	/**
 	 *  We don't use 'is' to prevent dependency issues
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	private static var bbars:Object = {};


Transferred from the Adobe Open Source Subversion Repository

Revision: 5825
Author:   hmuller@adobe.com
Date:     2009-03-31T22:02:45.612486Z

Log Message:
-----------
Bug fixes: virtualization, scrolling, layers.  These bug fixes were gating the virtualization implementation sign-off.

QE Notes:
Doc Notes:
Bugs: sdk-20141, sdk-19347, sdk-19984
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -896,11 +896,27 @@
         var eltCount:uint = layoutTarget.numElements;
         var measuredEltCount:int = (requestedColumnCount != -1) ? requestedColumnCount : eltCount;

+        if (measuredEltCount <= 0)
+        {
+            layoutTarget.measuredWidth = layoutTarget.measuredHeight = 0;
+            layoutTarget.measuredMinWidth = layoutTarget.measuredMinHeight = 0;
+            return;
+        }
+
         updateLLV(layoutTarget);
         if (variableColumnWidth)
         {
-            var endIndex:int = Math.max(0, Math.min(measuredEltCount, eltCount) - 1);
-            layoutTarget.measuredWidth =  llv.end(measuredEltCount - 1);
+            // Special case: fewer elements than requestedColumnCount, so temporarily
+            // make llv.length == requestedColumnCount.
+            var oldLength:int = -1;
+            if (measuredEltCount > llv.length)
+            {
+                oldLength = llv.length;
+                llv.length = measuredEltCount;
+            }
+            layoutTarget.measuredWidth = llv.end(measuredEltCount - 1);
+            if (oldLength != -1)
+                llv.length = oldLength;
         }
         else
         {


Deployed dmem fix

Deployed dmem fix

--- src/U.as
+++ src/U.as
@@ -25,7 +25,7 @@
 	 * @author Nicholas "PleasingFungus" Feinberg
 	 */
 	public class U {
-		public static const VERSION:String = "0.877";
+		public static const VERSION:String = "0.878";
 		public static const SAVE_VERSION:int = 5;

 		public static const BINARY_SAVES:Boolean = true;


Added ctrl, shift and alt to keyboard event

I need it to handle key combinations in my project

--- src/flash/events/KeyboardEvent.as
+++ src/flash/events/KeyboardEvent.as
@@ -8,9 +8,11 @@
       public static const KEY_UP:String = "keyUp";

       private var m_keyLocation:uint;
-
       private var m_keyCode:uint;
-
+      private var m_ctrlKey:Boolean;
+      private var m_altKey:Boolean;
+      private var m_shiftKey:Boolean;
+
       public function KeyboardEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, charCodeValue:uint = 0, keyCodeValue:uint = 0, keyLocationValue:uint = 0, ctrlKeyValue:Boolean = false, altKeyValue:Boolean = false, shiftKeyValue:Boolean = false)
       {
          super(type,bubbles,cancelable);
@@ -56,17 +58,35 @@
          this.m_keyLocation = value;
       }

-     public function get ctrlKey() : Boolean{return false}
+     public function get ctrlKey() : Boolean
+     {
+         return m_ctrlKey;
+     }

-     public function set ctrlKey(param1:Boolean) : void{}
+     public function set ctrlKey(param1:Boolean) : void
+     {
+         m_ctrlKey = param1;
+     }

-     public function get altKey() : Boolean{return false}
+     public function get altKey() : Boolean
+     {
+         return m_altKey;
+     }

-     public function set altKey(param1:Boolean) : void{}
+     public function set altKey(param1:Boolean) : void
+     {
+         m_altKey = param1;
+     }

-     public function get shiftKey() : Boolean{return false}
+     public function get shiftKey() : Boolean
+     {
+         return m_shiftKey;
+     }

-     public function set shiftKey(param1:Boolean) : void{}
+     public function set shiftKey(param1:Boolean) : void
+     {
+         m_shiftKey = param1;
+     }

      public function updateAfterEvent() : void{}
    }


add limited media query check for -flex-flash.  More MQ processing needed eventually

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -19,12 +19,12 @@
 package org.apache.flex.core
 {
 	import flash.system.ApplicationDomain;
+	import flash.utils.getDefinitionByName;
 	import flash.utils.getQualifiedClassName;
 	import flash.utils.getQualifiedSuperclassName;
-	import flash.utils.getDefinitionByName;

+	import org.apache.flex.events.EventDispatcher;
 	import org.apache.flex.events.ValueChangeEvent;
-	import org.apache.flex.events.EventDispatcher;

 	public class SimpleCSSValuesImpl extends EventDispatcher implements IValuesImpl
 	{
@@ -113,6 +113,18 @@
                         }
                     }
                     */
+                    var mq:String = null;
+                    var o:Object;
+                    if (i < n - 2)
+                    {
+                        // peek ahead to see if there is a media query
+                        if (arr[i + 1] == CSSClass.CSSMediaQuery)
+                        {
+                            mq = arr[i + 2];
+                            i += 2;
+                            declarationName = mq + "_" + declarationName;
+                        }
+                    }
                     var finalName:String;
                     var valuesFunction:Function;
                     var valuesObject:Object;
@@ -120,15 +132,16 @@
                     {
                         valuesFunction = factoryFunctions[declarationName];
                         valuesObject = new valuesFunction();
-                        finalName = fixNames(declarationName);
-                        values[finalName] = valuesObject;
                     }
                     else
                     {
                         valuesFunction = factoryFunctions[declarationName];
                         valuesObject = new valuesFunction();
-                        var o:Object = values[declarationName];
-                        finalName = fixNames(declarationName);
+                    }
+                    if (isValidStaticMediaQuery(mq))
+                    {
+                        finalName = fixNames(declarationName, mq);
+                        o = values[finalName];
                         if (o == null)
                             values[finalName] = valuesObject;
                         else
@@ -143,8 +156,24 @@

         }

-        private function fixNames(s:String):String
-        {
+        private function isValidStaticMediaQuery(mq:String):Boolean
+        {
+            if (mq == null)
+                return true;
+
+            if (mq == "-flex-flash")
+                return true;
+
+            // TODO: (aharui) other media query
+
+            return false;
+        }
+
+        private function fixNames(s:String, mq:String):String
+        {
+            if (mq != null)
+                s = s.substr(mq.length + 1); // 1 more for the hyphen
+
 			if (s == "")
 				return "*";

@@ -285,6 +314,7 @@
     public static const CSSSelector:int = 0;
     public static const CSSCondition:int = 1;
     public static const CSSStyleDeclaration:int = 2;
+    public static const CSSMediaQuery:int = 3;
 }

 class CSSFactory


Added BulletPhysics mask vales

Added BulletPhysics mask vales

--- DroneAnarchy/Resources/Scripts/DroneAnarchy.as
+++ DroneAnarchy/Resources/Scripts/DroneAnarchy.as
@@ -1,4 +1,3 @@
-#include "GameObjects.as"
 #include "InputController.as"

 enum GameState
@@ -9,6 +8,12 @@
 }

+//Bullet Physics Mask
+const int BULLET_COLLISION_LAYER = 1;
+const int PLAYER_COLLISION_LAYER = 2;
+const int DRONE_COLLISION_LAYER = 3;
+const int FLOOR_COLLISION_LAYER = 5;
+const int SCORE_ADDITION_RATE = 1;

 const uint MAX_DRONE_COUNT = 15;


Transferred from the Adobe Open Source Subversion Repository

Revision: 22285
Author:   chiedozi@adobe.com
Date:     2011-08-30T18:52:45.387113Z

Log Message:
-----------
Added builder icons for SplitViewNavigator, TabbedViewNavigator and ViewNavigator

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.png</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.png</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.png</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
@@ -51,6 +51,12 @@
  *  @productversion Flex 4.5.2
  */
 [SkinState("landscape")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[IconFile("SplitViewNavigator.png")]

 /**
  *  SplitViewNavigator is a component responsible for displaying multiple
@@ -122,7 +128,9 @@
     [SkinPart(required="false")]
     /**
      *  The Callout used to display a navigator when
-     *  showFirstViewNavigatorInCallout() is called.
+     *  showFirstViewNavigatorInCallout() is called.  When creating
+     *  a custom MXML skin, this component should not be on the display list, but
+     *  instead declared inside a fx:Declarations tag.
      */
     public var viewNavigatorCallout:Callout;


Transferred from the Adobe Open Source Subversion Repository

Revision: 22615
Author:   chiedozi@adobe.com
Date:     2011-09-16T20:02:47.323682Z

Log Message:
-----------
SplitViewNavigator now prevents View.tabBarVisible from impacting TabbedViewNavigators higher on the display list

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
@@ -78,7 +78,8 @@
  *  There is no limit to the amount of child navigators this component can manage.

  *
  *
Note: Because of the screen space required to display multiple panes
- *  simultaneously, Adobe recommends that you only use the SplitViewNavigator on a tablet.

+ *  simultaneously, Adobe recommends that you only use the SplitViewNavigator on a tablet
+ *  device.

  *
  *
If the autoHideFirstViewNavigator property is set to
  *  true, the SplitViewNavigator automatically hides the
@@ -105,6 +106,10 @@
  *  This method always returns the correct navigator regardless of whether
  *  a navigator is in a popup or not.

  *
+ *
Note: When a SplitViewNavigator is used as a child of a
+ *  TabbedViewNavigator, changes to the tabBarVisible on the
+ *  active views will not be honored by the parent TabbedViewNavigator.

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

  *
@@ -601,6 +606,17 @@

     /**
      *  @private
+     */
+    override public function updateControlsForView(view:View):void
+    {
+        // This method is a no-op so that child views can't impact the
+        // display properties of navigators above it.  This essentially prevents
+        // View.tabBarVisible from interacting with TabbedViewNavigators that
+        // are parents of this SplitViewNavigator.
+    }
+
+    /**
+     *  @private
      *
      *  @langversion 3.0
      *  @playerversion AIR 3


Transferred from the Adobe Open Source Subversion Repository

Revision: 11112
Author:   hmuller@adobe.com
Date:     2009-10-23T19:35:31.222086Z

Log Message:
-----------
DatGroup and SkinnableDataContainer dispatch a "dataProviderChanged" event when the dataProvder changes.  Fixed a ScrollerLayout typo.

QE notes:
Doc notes: none
Bugs: sdk-23489
Reviewer: Ryan
Tests run: DataGroup
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
@@ -37,7 +37,7 @@
      *  @private
      *  SDT - Scrollbar Display Threshold.  If the content size exceeds the
      *  viewport's size by SDT, then we show a scrollbar.  For example, if the
-     *  contentWidth >= viewport width + SDT, show the vertical scrollbar.
+     *  contentWidth >= viewport width + SDT, show the horizontal scrollbar.
      */
     private static const SDT:Number = 1.0;

@@ -69,7 +69,7 @@
         // TODO(hmuller):prefer to do nothing if transform doesn't change size, see UIComponent/nonDeltaLayoutMatrix()
         var cw:Number = viewport.contentWidth;
         var ch:Number = viewport.contentHeight;
-        if ((cw == 0) && (ch == 0))
+        if (((cw == 0) && (ch == 0)) || (isNaN(cw) || isNaN(ch)))
             return new Point(0,0);
         return MatrixUtil.transformSize(new Point(cw, ch), viewport.getLayoutMatrix());
     }