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

--- frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as
@@ -0,0 +1,1806 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.DataGrid;
+import mx.controls.dataGridClasses.DataGridColumn;
+import mx.controls.fileSystemClasses.FileSystemControlHelper;
+import mx.core.ClassFactory;
+import mx.core.mx_internal;
+import mx.core.ScrollPolicy;
+import mx.events.ListEvent;
+import mx.formatters.DateFormatter;
+import mx.styles.CSSStyleDeclaration;
+import mx.styles.StyleManager;
+import mx.utils.DirectoryEnumeration;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the selected directory displayed by this control
+ *  changes 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("FileSystemDataGrid.png")]
+
+[ResourceBundle("aircontrols")]
+
+/**
+ *  The FileSystemDataGrid control lets you display the contents of a
+ *  single file system directory in a data grid format.
+ *
+ *
The information displayed for each item consists of its name
+ *  (with optional generic icon), type, size, creation date,
+ *  and modification date.
+ *  To do this, FileSystemDataGrid automatically creates five instances
+ *  of DataGridColumn -- nameColumn, typeColumn,
+ *  sizeColumn, creationDateColumn,
+ *  and modificationDateColumn -- and sets
+ *  the columns property to an array of these five instances.
+ *  Each column instance is automatically configured to have an
+ *  appropriate labelFunction,
+ *  sortCompareFunction, etc.
+ *  If you don't want all five columns, or if you want to change the
+ *  order, reset the columns property.
+ *  If you want to customize a column, such as by changing its
+ *  labelFunction, simply reassign that property
+ *  on the appropriate column object.

+ *
+ *
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:FileSystemDataGrid 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 property 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 FileSystemDataGrid, even though they are
+ *  accessible in AIR via the icon property of a File.

+ */
+public class FileSystemDataGrid extends DataGrid
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#COMPUTER
+     */
+    public static const COMPUTER:File = FileSystemControlHelper.COMPUTER;
+
+   //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function FileSystemDataGrid()
+    {
+        super();
+
+        helper = new FileSystemControlHelper(this, false);
+
+        doubleClickEnabled = true;
+        horizontalScrollPolicy = ScrollPolicy.AUTO;
+        iconFunction = helper.fileIconFunction;
+
+        addEventListener(ListEvent.ITEM_DOUBLE_CLICK, itemDoubleClickHandler);
+
+        dateFormatter.formatString = dateFormatString;
+
+        // 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;
+
+    /**
+     *  The DateFormatter object used to format the dates
+     *  in the Created and Modified columns.
+     */
+    mx_internal var dateFormatter:DateFormatter = new DateFormatter();
+
+    //--------------------------------------------------------------------------
+    //
+    //  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:FileSystemDataGrid 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:FileSystemDataGrid 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:FileSystemDataGrid 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:FileSystemDataGrid 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:FileSystemDataGrid 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;
+    }
+
+    //----------------------------------
+    //  creationDateColumn
+    //----------------------------------
+
+    /**
+     *  The DataGridColumn representing the Created column.
+     *  The FileSystemDataGrid control automatically creates this column.
+     *
+     *
You can set properties such as
+     *  creationDateColumn.width to customize this column.
+     *  To remove this column entirely, or to change the column order,
+     *  set the columns property to an array such as
+     *  [ nameColumn, modificationDateColumn, sizeColumn ].

+     */
+    public var creationDateColumn:DataGridColumn;
+
+    //----------------------------------
+    //  dateFormatString
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dateFormatString property.
+     */
+    private var _dateFormatString:String;
+
+    /**
+	 *  @private
+	 */
+	private var dateFormatStringOverride:String;
+
+    /**
+     *  A String that determines how dates in the Created and Modified
+     *  columns are formatted.
+     *  Setting this property sets the formatString
+     *  of an internal DateFormatter that this control creates.
+     *
+     *  @see mx.formatters.DateFormatter#formatString
+     */
+    public function get dateFormatString():String
+    {
+        return _dateFormatString;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dateFormatString(value:String):void
+    {
+		dateFormatStringOverride = value;
+
+		_dateFormatString = value != null ?
+					   		value :
+					   		resourceManager.getString(
+								"aircontrols",
+								"fileSystemDataGrid_dateFormatString");
+
+        dateFormatter.formatString = _dateFormatString != null ?
+        							 _dateFormatString :
+        							 "";
+
+        invalidateList();
+    }
+
+    //----------------------------------
+    //  directory
+    //----------------------------------
+
+    [Bindable("directoryChanged")]
+
+    /**
+     *  @copy mx.controls.FileSystemList#directory
+     */
+    public function get directory():File
+    {
+        return helper.directory;
+    }
+
+    /**
+     *  @private
+     */
+    public function set directory(value:File):void
+    {
+        helper.directory = value;
+    }
+
+    //----------------------------------
+    //  enumerationMode
+    //----------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#enumerationMode
+     */
+    public function get enumerationMode():String
+    {
+        return helper.enumerationMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set enumerationMode(value:String):void
+    {
+        helper.enumerationMode = value;
+    }
+
+    //----------------------------------
+    //  extensions
+    //----------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#extensions
+     */
+    public function get extensions():Array /* of String */
+    {
+        return helper.extensions;
+    }
+
+    /**
+     *  @private
+     */
+    public function set extensions(value:Array /* of String */):void
+    {
+        helper.extensions = value;
+    }
+
+    //----------------------------------
+    //  filterFunction
+    //----------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#filterFunction
+     */
+    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 a null item, 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:FileSystemDataGrid 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;
+    }
+
+    //----------------------------------
+    //  modificationDateColumn
+    //----------------------------------
+
+    /**
+     *  The DataGridColumn representing the Modified column.
+     *  The FileSystemDataGrid control automatically creates this column.
+     *
+     *
You can set properties such as
+     *  modificationDateColumn.width to customize this column.
+     *  To remove this column entirely, or to change the column order,
+     *  set the columns property to an array such as
+     *  [ nameColumn, modificationDateColumn, sizeColumn ].

+     */
+    public var modificationDateColumn:DataGridColumn;
+
+    //----------------------------------
+    //  nameColumn
+    //----------------------------------
+
+    /**
+     *  The DataGridColumn representing the Name column.
+     *  The FileSystemDataGrid control automatically creates this column.
+     *
+     *
You can set properties such as nameColumn.width
+     *  to customize this column.
+     *  To remove this column entirely, or to change the column order,
+     *  set the columns property to an array such as
+     *  [ nameColumn, modificationDateColumn, sizeColumn ].

+     */
+    public var nameColumn:DataGridColumn;
+
+    //----------------------------------
+    //  nameCompareFunction
+    //----------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#nameCompareFunction
+     */
+    public function get nameCompareFunction():Function
+    {
+        return helper.nameCompareFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set nameCompareFunction(value:Function):void
+    {
+        helper.nameCompareFunction = value;
+    }
+
+    //----------------------------------
+    //  selectedPath
+    //----------------------------------
+
+    [Bindable("change")]
+    [Bindable("directoryChanged")]
+
+    /**
+     *  @copy mx.controls.FileSystemList#selectedPath
+     */
+    public function get selectedPath():String
+    {
+        return helper.selectedPath;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedPath(value:String):void
+    {
+        helper.selectedPath = value;
+    }
+
+    //----------------------------------
+    //  selectedPaths
+    //----------------------------------
+
+    [Bindable("change")]
+    [Bindable("directoryChanged")]
+
+    /**
+     *  @copy mx.controls.FileSystemList#selectedPaths
+     */
+    public function get selectedPaths():Array /* of String */
+    {
+        return helper.selectedPaths;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedPaths(value:Array /* of String */):void
+    {
+        helper.selectedPaths = value;
+    }
+
+    //----------------------------------
+    //  showExtensions
+    //----------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#showExtensions
+     */
+    public function get showExtensions():Boolean
+    {
+        return helper.showExtensions;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showExtensions(value:Boolean):void
+    {
+        helper.showExtensions = value;
+    }
+
+    //----------------------------------
+    //  showHidden
+    //----------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#showHidden
+     */
+    public function get showHidden():Boolean
+    {
+        return helper.showHidden;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showHidden(value:Boolean):void
+    {
+        helper.showHidden = value;
+    }
+
+    //----------------------------------
+    //  showIcons
+    //----------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#showIcons
+     */
+    public function get showIcons():Boolean
+    {
+        return helper.showIcons;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showIcons(value:Boolean):void
+    {
+        helper.showIcons = value;
+    }
+
+    //----------------------------------
+    //  sizeColumn
+    //----------------------------------
+
+    /**
+     *  The DataGridColumn representing the Size column.
+     *  The FileSystemDataGrid control automatically creates this column.
+     *
+     *
You can set properties such as sizeColumn.width
+     *  to customize this column.
+     *  To remove this column entirely, or to change the column order,
+     *  set the columns property to an array such as
+     *  [ nameColumn, modificationDateColumn, sizeColumn ].

+     */
+    public var sizeColumn:DataGridColumn;
+
+    //----------------------------------
+    //  sizeDisplayMode
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the sizeDisplayMode property.
+     */
+    private var _sizeDisplayMode:String = FileSystemSizeDisplayMode.KILOBYTES;
+
+    /**
+     *  A String specifying whether the Size column displays file sizes
+     *  in bytes or rounded up to the nearest kilobyte,
+     *  where a kilobyte is 1024 bytes.
+     *  The possible values are specified
+     *  by the FileSystemSizeDisplayMode class.
+     *
+     *  @see mx.controls.FileSystemSizeDisplayMode
+     */
+    public function get sizeDisplayMode():String
+    {
+        return _sizeDisplayMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set sizeDisplayMode(value:String):void
+    {
+        _sizeDisplayMode = value;
+
+        invalidateList();
+    }
+
+    //----------------------------------
+    //  typeColumn
+    //----------------------------------
+
+    /**
+     *  The DataGridColumn representing the Type column.
+     *  The FileSystemDataGrid control automatically creates this column.
+     *
+     *
You can set properties such as typeColumn.width
+     *  to customize this column.
+     *  To remove this column entirely, or to change the column order,
+     *  set the columns property to an array such as
+     *  [ nameColumn, modificationDateColumn, sizeColumn ].

+     */
+    public var typeColumn:DataGridColumn;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function childrenCreated():void
+    {
+        super.childrenCreated();
+
+        var measuredText:String;
+
+        nameColumn = new CustomDataGridColumn();
+        nameColumn.headerText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_nameColumnHeader");
+        nameColumn.itemRenderer = new ClassFactory(NameColumnRenderer);
+        nameColumn.labelFunction = helper.fileLabelFunction;
+        nameColumn.sortCompareFunction = nameSortCompareFunction;
+        measuredText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_nameColumnMeasuredText");
+        nameColumn.width = determineWidthToDisplay(measuredText);
+
+        typeColumn = new CustomDataGridColumn();
+        typeColumn.headerText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_typeColumnHeader");
+        typeColumn.labelFunction = typeLabelFunction;
+        typeColumn.sortCompareFunction = typeSortCompareFunction;
+        measuredText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_typeColumnMeasuredText");
+        typeColumn.width = determineWidthToDisplay(measuredText);
+
+        sizeColumn = new CustomDataGridColumn();
+        sizeColumn.headerText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_sizeColumnHeader");
+        sizeColumn.labelFunction = sizeLabelFunction;
+        sizeColumn.public::setStyle("textAlign", "right");
+        sizeColumn.sortCompareFunction = sizeSortCompareFunction;
+        measuredText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_sizeColumnMeasuredText");
+        sizeColumn.width = determineWidthToDisplay(measuredText);
+
+        creationDateColumn = new CustomDataGridColumn();
+        creationDateColumn.headerText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_creationDateColumnHeader");
+        creationDateColumn.labelFunction = creationDateLabelFunction;
+        measuredText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_creationDateColumnMeasuredText");
+        creationDateColumn.width = determineWidthToDisplay(measuredText);
+
+        modificationDateColumn = new CustomDataGridColumn();
+        modificationDateColumn.headerText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_modificationDateColumnHeader");
+        modificationDateColumn.labelFunction = modificationDateLabelFunction;
+        measuredText = resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_modificationDateColumnMeasuredText");
+        modificationDateColumn.width = determineWidthToDisplay(measuredText);
+
+        // If DataGridColumns haven't already been defined,
+        // use the five ones we just created.
+        if (!columns || columns.length == 0)
+        {
+            columns = [ nameColumn, typeColumn, sizeColumn,
+                        creationDateColumn, modificationDateColumn ];
+        }
+    }
+
+    /**
+     *  @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();
+
+        measuredWidth += 16;
+    }
+
+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+
+        helper.styleChanged(styleProp);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function resourcesChanged():void
+    {
+        super.resourcesChanged();
+
+        var measuredText:String;
+
+        if (nameColumn)
+        {
+ 	        nameColumn.headerText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_nameColumnHeader");
+	        measuredText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_nameColumnMeasuredText");
+	        nameColumn.width = determineWidthToDisplay(measuredText);
+        }
+
+        if (typeColumn)
+        {
+	        typeColumn.headerText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_typeColumnHeader");
+	        measuredText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_typeColumnMeasuredText");
+	        typeColumn.width = determineWidthToDisplay(measuredText);
+        }
+
+        if (sizeColumn)
+        {
+	        sizeColumn.headerText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_sizeColumnHeader");
+	        measuredText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_sizeColumnMeasuredText");
+	        sizeColumn.width = determineWidthToDisplay(measuredText);
+        }
+
+        if (creationDateColumn)
+        {
+	        creationDateColumn.headerText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_creationDateColumnHeader");
+	        measuredText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_creationDateColumnMeasuredText");
+	        creationDateColumn.width = determineWidthToDisplay(measuredText);
+        }
+
+        if (modificationDateColumn)
+        {
+	        modificationDateColumn.headerText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_modificationDateColumnHeader");
+	        measuredText = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_modificationDateColumnMeasuredText");
+	        modificationDateColumn.width = determineWidthToDisplay(measuredText);
+        }
+
+		dateFormatString = dateFormatStringOverride;
+
+		invalidateList();
+		invalidateSize();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function itemToUID(data:Object):String
+    {
+    	return helper.itemToUID(data);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#findIndex()
+     */
+    public function findIndex(nativePath:String):int
+    {
+        return helper.findIndex(nativePath);
+    }
+
+    /**
+     *  @copy mx.controls.FileSystemList#findItem()
+     */
+    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:FileSystemDataGrid 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:FileSystemDataGrid 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:FileSystemDataGrid 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:FileSystemDataGrid 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);
+    }
+
+    /**
+     *  @copy mx.controls.FileSystemList#navigateTo()
+     */
+    public function navigateTo(directory:File):void
+    {
+        helper.navigateTo(directory);
+    }
+
+    /**
+     *  @copy mx.controls.FileSystemList#refresh()
+     */
+    public function refresh():void
+    {
+        helper.refresh();
+    }
+
+    /**
+     *  @copy mx.controls.FileSystemList#clear()
+     */
+    public function clear():void
+    {
+        helper.clear();
+    }
+
+    /**
+     *  @private
+     */
+    public function resetHistory(dir:File):void
+    {
+        helper.resetHistory(dir);
+    }
+
+    /**
+     *  @private
+     */
+    private function nameSortCompareFunction(item1:File, item2:File):int
+    {
+         return helper.directoryEnumeration.fileCompareFunction(item1, item2);
+    }
+
+    /**
+     *  @private
+     */
+    private function typeLabelFunction(item:File,
+                                       column:DataGridColumn = null):String
+    {
+        // If item is a directory, return "Folder".
+        if (item.isDirectory)
+        {
+            return resourceManager.getString(
+            	"aircontrols", "fileSystemDataGrid_typeFolder");
+        }
+
+        // If item is a file without an extension, return "File".
+        var extension:String = item.extension;
+        if (!extension || extension == "")
+        {
+            return resourceManager.getString(
+            	"aircontrols", "fileSystemDataGrid_typeFileWithoutExtension");
+        }
+
+        // If item is a file with an extension, return a String like "TXT File".
+        return resourceManager.getString(
+        	"aircontrols", "fileSystemDataGrid_typeFileWithExtension",
+        	[ extension.toUpperCase() ]);
+    }
+
+    /**
+     *  @private
+     */
+    private function typeSortCompareFunction(item1:File, item2:File):int
+    {
+        var typeLabel1:String = typeLabelFunction(item1, null).toUpperCase();
+        var typeLabel2:String = typeLabelFunction(item2, null).toUpperCase();
+
+        if (typeLabel1 < typeLabel2)
+            return -1;
+        if (typeLabel1 > typeLabel2)
+            return 1;
+        return 0;
+    }
+
+    /**
+     *  @private
+     */
+    private function sizeLabelFunction(item:File,
+                                       column:DataGridColumn = null):String
+    {
+        var label:String;
+
+        if (!item.exists) // item may have been deleted
+            return "";
+
+        try
+        {
+	        if (item.isDirectory)
+	        {
+	            label = resourceManager.getString(
+	            	"aircontrols", "fileSystemDataGrid_sizeFolder");
+	        }
+	        else if (sizeDisplayMode == FileSystemSizeDisplayMode.KILOBYTES)
+	        {
+	            var kb:int = Math.ceil(item.size / 1024);
+	            label = resourceManager.getString(
+	            	"aircontrols", "fileSystemDataGrid_sizeKilobytes",
+					[ kb ]);
+	        }
+	        else if (sizeDisplayMode == FileSystemSizeDisplayMode.BYTES)
+	        {
+	            label = resourceManager.getString(
+	            	"aircontrols", "fileSystemDataGrid_sizeBytes",
+					[ item.size ]);
+	        }
+        }
+        catch(e:Error)
+        {
+        	// item.size throws a File I/O Error for some files,
+        	// such as /etc/master.passwd and /etc/sudoers on a Mac
+
+	        label = resourceManager.getString(
+	        	"aircontrols", "fileSystemDataGrid_sizeFolder");
+        }
+
+        return label;
+    }
+
+    /**
+     *  @private
+     */
+    private function sizeSortCompareFunction(item1:File, item2:File):int
+    {
+        var size1:Number;
+        try
+        {
+        	size1 = item1.isDirectory ? 0 : item1.size;
+        }
+        catch(e1:Error)
+        {
+        	// item.size throws a File I/O Error for some files,
+        	// such as /etc/master.passwd and /etc/sudoers on a Mac
+
+        	size1 = 0;
+        }
+
+        var size2:Number;
+        try
+        {
+        	size2 = item2.isDirectory ? 0 : item2.size;
+        }
+        catch(e2:Error)
+        {
+        	size2 = 0;
+        }
+
+        if (size1 < size2)
+            return -1;
+        if (size1 > size2)
+            return 1;
+        return 0;
+    }
+
+    /**
+     *  @private
+     */
+    private function creationDateLabelFunction(
+                                item:File, column:DataGridColumn = null):String
+    {
+        if (!item.exists) // item may have been deleted
+            return "";
+
+        return dateFormatter.format(item.creationDate);
+    }
+
+    /**
+     *  @private
+     */
+    private function modificationDateLabelFunction(
+                                item:File, column:DataGridColumn = null):String
+    {
+        if (!item.exists) // item may have been deleted
+            return "";
+
+        return dateFormatter.format(item.modificationDate);
+    }
+
+    /**
+     *  @private
+     */
+    private function determineWidthToDisplay(s:String):Number
+    {
+        return measureText(s).width + 13;
+    }
+
+   //--------------------------------------------------------------------------
+    //
+    //  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);
+    }
+}
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Helper classes
+//
+////////////////////////////////////////////////////////////////////////////////
+
+import flash.display.DisplayObject;
+import flash.filesystem.File;
+import mx.controls.dataGridClasses.DataGridColumn;
+import mx.controls.dataGridClasses.DataGridListData;
+import mx.controls.listClasses.BaseListData;
+import mx.controls.FileSystemDataGrid;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.controls.listClasses.ListBase;
+import mx.core.IDataRenderer;
+import mx.core.IFlexDisplayObject;
+import mx.core.mx_internal;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.events.FlexEvent;
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Helper class: CustomDataGridColumn
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  @private
+ */
+class CustomDataGridColumn extends DataGridColumn
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function CustomDataGridColumn(columnName:String = null)
+    {
+        super(columnName);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function itemToDataTip(data:Object):String
+    {
+        return labelFunction(data);
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Helper class: NameColumnRenderer
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  @private
+ *  This helper class implements the renderer for the Name column,
+ *  which displays an icon and a name for a File.
+ *  We need a custom renderer because DataGridItemRenderer
+ *  doesn't support an icon.
+ */
+class NameColumnRenderer extends UIComponent
+    implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function NameColumnRenderer()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var listOwner:ListBase;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+	 *  The baselinePosition of a NameColumnRenderer is calculated
+	 *  for its label.
+     */
+    override public function get baselinePosition():Number
+    {
+		if (!mx_internal::validateBaselinePosition())
+			return NaN;
+
+        return label.y + label.baselinePosition;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the data property.
+     */
+    private var _data:Object;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the data property
+     *  as defined by the IDataRenderer interface.
+     *  When set, it stores the value and invalidates the component
+     *  to trigger a relayout of the component.
+     *
+     *  @see mx.core.IDataRenderer
+     */
+    public function get data():Object
+    {
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+        _data = value;
+
+        invalidateProperties();
+
+        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+    }
+
+    //----------------------------------
+    //  icon
+    //----------------------------------
+
+    /**
+     *  The internal IFlexDisplayObject that displays the icon in this renderer.
+     */
+    protected var icon:IFlexDisplayObject;
+
+    //----------------------------------
+    //  label
+    //----------------------------------
+
+    /**
+     *  The internal UITextField that displays the text in this renderer.
+     */
+    protected var label:UITextField;
+
+    //----------------------------------
+    //  listData
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the listData property.
+     */
+    private var _listData:DataGridListData;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the listData property
+     *  as defined by the IDropInListItemRenderer interface.
+     *
+     *  @see mx.controls.listClasses.IDropInListItemRenderer
+     */
+    public function get listData():BaseListData
+    {
+        return _listData;
+    }
+
+    /**
+     *  @private
+     */
+    public function set listData(value:BaseListData):void
+    {
+        _listData = DataGridListData(value);
+
+        invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        if (!label)
+        {
+            label = UITextField(createInFontContext(UITextField));
+            label.styleName = this;
+            addChild(label);
+        }
+    }
+
+    /**
+     *  @private
+     *  Apply the data and listData.
+     *  Create an instance of the icon if specified,
+     *  and set the text into the text field.
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (icon)
+        {
+            removeChild(DisplayObject(icon));
+            icon = null;
+        }
+
+        if (_data != null)
+        {
+            listOwner = ListBase(_listData.owner);
+
+            if (FileSystemDataGrid(listOwner).showIcons)
+            {
+                var iconClass:Class =
+                    listOwner.getStyle(File(_data).isDirectory ?
+                                       "directoryIcon" :
+                                       "fileIcon");
+                icon = new iconClass();
+                addChild(DisplayObject(icon));
+            }
+
+            label.text = _listData.label ? _listData.label : " ";
+            label.multiline = listOwner.variableRowHeight;
+            label.wordWrap = listOwner.wordWrap;
+
+            if (listOwner.showDataTips)
+            {
+                if (label.textWidth > label.width ||
+                    listOwner.dataTipFunction != null)
+                {
+                    toolTip = listOwner.itemToDataTip(_data);
+                }
+                else
+                {
+                    toolTip = null;
+                }
+            }
+            else
+            {
+                toolTip = null;
+            }
+        }
+        else
+        {
+            label.text = " ";
+            toolTip = null;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var w:Number = 0;
+
+        if (icon)
+            w = icon.measuredWidth;
+
+        // Guarantee that label width isn't zero
+        // because it messes up ability to measure.
+        if (label.width < 4 || label.height < 4)
+        {
+            label.width = 4;
+            label.height = 16;
+        }
+
+        if (isNaN(explicitWidth))
+        {
+            w += label.getExplicitOrMeasuredWidth();
+            measuredWidth = w;
+            measuredHeight = label.getExplicitOrMeasuredHeight();
+        }
+        else
+        {
+            measuredWidth = explicitWidth;
+            label.setActualSize(Math.max(explicitWidth - w, 4), label.height);
+            measuredHeight = label.getExplicitOrMeasuredHeight();
+            if (icon && icon.measuredHeight > measuredHeight)
+                measuredHeight = icon.measuredHeight;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var startX:Number = 0;
+
+        if (icon)
+        {
+            icon.x = startX;
+            startX = icon.x + icon.measuredWidth;
+            icon.setActualSize(icon.measuredWidth, icon.measuredHeight);
+        }
+
+        label.x = startX;
+        label.setActualSize(unscaledWidth - startX, measuredHeight);
+
+        var verticalAlign:String = getStyle("verticalAlign");
+        if (verticalAlign == "top")
+        {
+            label.y = 0;
+            if (icon)
+                icon.y = 0;
+        }
+        else if (verticalAlign == "bottom")
+        {
+            label.y = unscaledHeight - label.height + 2; // 2 for gutter
+            if (icon)
+                icon.y = unscaledHeight - icon.height;
+        }
+        else
+        {
+            label.y = (unscaledHeight - label.height) / 2;
+            if (icon)
+                icon.y = (unscaledHeight - icon.height) / 2;
+        }
+
+        var labelColor:Number;
+
+        if (data && parent)
+        {
+            if (!enabled)
+                labelColor = getStyle("disabledColor");
+            else if (listOwner.isItemHighlighted(listData.uid))
+                labelColor = getStyle("textRollOverColor");
+            else if (listOwner.isItemSelected(listData.uid))
+                labelColor = getStyle("textSelectedColor");
+            else
+                labelColor = getStyle("color");
+
+            label.setColor(labelColor);
+        }
+    }
+}


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

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

 package mx.events
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

 package spark.accessibility
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17385
Author:   clucier@adobe.com
Date:     2010-08-19T16:09:47.511750Z

Log Message:
-----------
Our snapshotting methods no longer RTE when a target has no visual bounds.

QE notes: None
Doc notes: None
Bugs: SDK-26308
Reviewer: Darrell
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/graphics/ImageSnapshot.as</path>

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

--- frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
+++ frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
@@ -286,7 +286,7 @@
                 bmData = GraphicElement(target).captureBitmapData(true, 0, false);
                 // The GraphicElement version does not calculate the visual bounds,
                 // so just create dummy bounds with the correct width/height
-                bounds = new Rectangle(0, 0, bmData.width, bmData.height);
+                bounds = new Rectangle(0, 0, bmData ? bmData.width : 0, bmData ? bmData.height : 0);
             }
             else
             {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/DateField.as
+++ frameworks/projects/mx/src/mx/controls/DateField.as
@@ -2394,19 +2394,7 @@
             // B. Bottom Right Placement
             // C. Top Right Placement
             var sm:ISystemManager = systemManager.topLevelSystemManager;
-            var sbRoot:DisplayObject = sm.getSandboxRoot();
-            var screen:Rectangle;
-
-            if (sm != sbRoot)
-            {
-                var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST,
-                                        false, false,
-                                        "getVisibleApplicationRect");
-                sbRoot.dispatchEvent(request);
-                screen = Rectangle(request.value);
-            }
-            else
-                screen = sm.getVisibleApplicationRect();
+            var screen:Rectangle = sm.getVisibleApplicationRect();

             if (screen.right > dd.getExplicitOrMeasuredWidth() + point.x &&
                 screen.bottom < dd.getExplicitOrMeasuredHeight() + point.y)


Relentless simplification ;)

Relentless simplification ;)

git-svn-id: c197267f952b24206666de142881703007ca05d5@9580 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/jivesoftware/xiff/data/im/RosterItemVO.as
+++ src/org/jivesoftware/xiff/data/im/RosterItemVO.as
@@ -52,12 +52,7 @@
 		}

 		public function isPending():Boolean {
-			if (askType == RosterExtension.ASK_TYPE_SUBSCRIBE && (subscribeType == RosterExtension.SUBSCRIBE_TYPE_NONE || subscribeType == RosterExtension.SUBSCRIBE_TYPE_FROM)) {
-				return true;
-			}
-			else {
-				return false;
-			}
+			return askType == RosterExtension.ASK_TYPE_SUBSCRIBE && (subscribeType == RosterExtension.SUBSCRIBE_TYPE_NONE || subscribeType == RosterExtension.SUBSCRIBE_TYPE_FROM);
 		}
 	}
 }


Remove deprecated EventBus functions.

Remove deprecated EventBus functions.

--- src/com/esri/builder/eventbus/EventBus.as
+++ src/com/esri/builder/eventbus/EventBus.as
@@ -16,7 +16,6 @@
 package com.esri.builder.eventbus
 {

-import flash.events.Event;
 import flash.events.EventDispatcher;

 /**
@@ -37,25 +36,5 @@
     public function EventBus()
     {
     }
-
-    /**
-     * The factory method is used to create a instance of the EventBus. It returns
-     * the only instance of EventBus and makes sure no another instance is created.
-     */
-    [Deprecated(replacement="instance")]
-    public static function getInstance():EventBus
-    {
-        return instance;
-    }
-
-    /**
-     * Basic dispatch function, dispatches simple named events.
-     */
-    [Deprecated(replacement="AppEvent.dispatch")]
-    public function dispatch(type:String):Boolean
-    {
-        return dispatchEvent(new Event(type));
-    }
 }
-
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19779
Author:   smgilson@adobe.com
Date:     2011-01-17T18:39:56.149561Z

Log Message:
-----------
ASDoc updates for BusyIndicator.as

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as
@@ -48,7 +48,7 @@
  *  @default 50
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
+ *  @playerversion Flash 10
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  *
@@ -56,13 +56,12 @@
 [Style(name="rotationInterval", type="Number", format="Time", inherit="no")]

 /**
- *  Color of any symbol of a component.
- *  This is used by the BusyIndicator to color the spokes of the spinner.
+ *  Color of the spokes of the spinner.
  *
  *  @default 0x000000
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
+ *  @playerversion Flash 10
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -70,17 +69,14 @@

 /**
  *  The BusyIndicator defines a component to display when a long-running
- *  operation is in progress. This component is a spinner with twelve spokes.
- *  The color of the spokes is controled by the value of the symbolColor style.
- *  The transparency of this component can be modified using the alpha property
+ *  operation is in progress. This component creates a spinner with twelve spokes.
+ *  The color of the spokes is controlled by the value of the symbolColor style.
+ *  The transparency of this component can be modified using the alpha property,
  *  but the alpha value of each spoke cannot be modified.
  *
- *

- *  The speed at which this component spins is controled by the rotationInterval
- *  style. The rotationInterval style is the delay in milliseconds between
- *  rotates. Decrease the rotationInterval to increase the speed of the spin
- *  and increase the rotationInterval to slow the spin.
- *

+ *
The speed at which this component spins is controlled by the rotationInterval
+ *  style. The rotationInterval style sets the delay, in milliseconds, between
+ *  rotations. Decrease the rotationInterval value to increase the speed of the spin.

  *
  *
The BusyIndicator has the following default characteristics:

  *

@@ -92,30 +88,32 @@
  *
Maximum size	No limit

  *

  *
- *  The diameter of the BusyIndicator's spinner is the minimum of the width and
- *  height of the component. The diameter must be an even number so will be
- *  reduced by one if it is odd.
+ *
The diameter of the BusyIndicator's spinner is the minimum of the width and
+ *  height of the component. The diameter must be an even number, and is
+ *  reduced by one if it is set to an odd number.

  *
  *  @mxml
  *
- *
The <s:BusyCursor> tag inherits the symbolColor style
- *  and adds the rotationInterval style.

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

  *
  *

  *  <s:BusyIndicator
  *
- *    Styles
+ *    Common Styles
  *    rotationInterval=50
  *
  *    Spark Styles
  *    symbolColor="0x000000"
  *
+ *    Mobile Styles
+ *    symbolColor="0x000000"
  *  >
  *

  *
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
+ *  @playerversion Flash 10
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -153,7 +151,7 @@
      *  Constructor.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
+     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 17996
Author:   chiedozi@adobe.com
Date:     2010-10-01T23:14:36.728374Z

Log Message:
-----------
Added a replaceView() api to ViewNavigator

QE notes:
Doc notes:
Bugs:
Reviewer: Ryan
Tests run:
Is noteworthy for integration:

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -597,11 +597,11 @@

     /**
      *  Holds the return object returned by the last view that was popped
-     *  off the navigation stack.  This object is only available when the
-     *  navigator is in the process of switching views in response to a
-     *  pop navigation operation.
-     *
-     *
This object is guarenteed to be valid when the a view receives
+     *  off the navigation stack or replaced by another view.  This object
+     *  is only available when the navigator is in the process of switching
+     *  views in response to a pop or replace navigation operation.
+     *
+     *
This object is guarenteed to be valid when the new view receives
      *  the FlexEvent.ADD event, and is destroyed after
      *  the view receives a FlexEvent.VIEW_ACTIVATE event.

      *
@@ -951,10 +951,10 @@
      *
      *  @param factory The class used to create the view
      *  @param data The data object to pass to the view
-     *  @param transition The view transition to play
      *  @param context An arbitrary string that can be used to describe the context
      *         of the push.  When the new view is created, it will be able to reference
      *         this property.
+     *  @param transition The view transition to play
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -972,6 +972,32 @@
         scheduleAction(ViewNavigatorAction.PUSH, factory, data, context, transition);
     }

+    /**
+     *  Replaces the top view of the navigation stack with a View.
+     *
+     *  @param factory The class used to create the view
+     *  @param data The data object to pass to the view
+     *  @param context An arbitrary string that can be used to describe the context
+     *         of the push.  When the new view is created, it will be able to reference
+     *         this property.
+     *  @param transition The view transition to play
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function replaceView(factory:Class,
+                                data:Object = null,
+                                context:String = null,
+                                transition:ViewTransition = null):void
+    {
+        if (factory == null || !canRemoveCurrentView())
+            return;
+
+        scheduleAction(ViewNavigatorAction.REPLACE_VIEW, factory, data, context, transition);
+    }
+
     /**
      *  Shows the action bar.
      *
@@ -1256,6 +1282,13 @@
         {
             lastAction = ViewNavigatorAction.PUSH;
             defaultTransition = defaultPushTransition;
+            navigationStack.push(factory, data, context);
+        }
+        else if (action == ViewNavigatorAction.REPLACE_VIEW)
+        {
+        	lastAction = ViewNavigatorAction.REPLACE_VIEW;
+            defaultTransition = defaultPushTransition;
+            navigationStack.pop();
             navigationStack.push(factory, data, context);
         }
         else
@@ -1698,8 +1731,11 @@
         if (actionBarVisibilityEffect)
             actionBarVisibilityEffect.end();

-        if (lastAction == ViewNavigatorAction.POP && activeView)
+        if (activeView && (lastAction == ViewNavigatorAction.POP ||
+                           lastAction == ViewNavigatorAction.REPLACE_VIEW))
+        {
             _returnedObject = createViewReturnObject(currentViewProxy);
+        }

         beginViewChange();

@@ -1849,8 +1885,12 @@
             viewProxy.persistedData = currentView.serializeData();
         }

-        // Check if we can delete the reference for the view instance
+        // Check if we can delete the reference for the view instance.  If the current
+        // view is being replaced or popped of the stack, we know we can delete it.
+        // Otherwise a push is happening and we need to check the destructionPolicy
+        // of the view.
         if (lastAction == ViewNavigatorAction.POP ||
+            lastAction == ViewNavigatorAction.REPLACE_VIEW ||
             currentView.destructionPolicy != ContainerDestructionPolicy.NEVER)
         {
             currentView.navigator = null;


Transferred from the Adobe Open Source Subversion Repository

Revision: 11247
Author:   klin@adobe.com
Date:     2009-10-28T21:59:11.963883Z

Log Message:
-----------
Fix for https://bugs.adobe.com/jira/browse/SDK-23184.

Updated a bunch of Style metadata ASDocs to describe different defaults between the Halo and Spark themes. Also, fixed a few typos along the way.

defaults.css - rearranged a few styles to be in alphabetical order
Button.as - removed extra emphasizedSkin style metadata
Panel.as - added spark theme to borderAlpha metadata

QE notes: None
Doc notes: None
Bugs: SDK-23184
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/fl/video/NCManagerNative.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/TextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PopUpMenuIcon.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/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/PaddingStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/GapStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/fl/video/NCManagerDynamicStream.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/FocusStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as</path>

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

--- frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as
@@ -52,7 +52,9 @@

 /**
  *  Text color of a component label.
- *  @default 0x0B333C
+ *
+ *  The default value for the Halo theme is 0x0B333C.
+ *  The default value for the Spark theme is 0x000000.
  *
  *  @langversion 3.0
  *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 17483
Author:   hmuller@adobe.com
Date:     2010-08-25T21:02:17.986081Z

Log Message:
-----------
Support for DataGrid column styling.

QE notes: One reported failure in gumbo/components/DataGrid/Methods/DataGrid_Methods_basic
Doc notes:
Bugs: SDK-27436
Reviewer: Kevin, Darrel
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
@@ -19,6 +19,33 @@
 import spark.components.supportClasses.GridColumn;

 use namespace mx_internal;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  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")]
+
+
+include "../../styles/metadata/BasicNonInheritingTextStyles.as"
+include "../../styles/metadata/BasicInheritingTextStyles.as"

 //--------------------------------------
 //  Events
@@ -37,7 +64,26 @@
 [Event(name="dataChange", type="mx.events.FlexEvent")]

 /**
- *  TBD
+ *   A simple and efficent IGridItemRenderer that displays a single text label.  This
+ *   class is the default value for the s:DataGrid itemRenderer property.
+ *
+ *
Label text wrapping can be controlled with the lineBreak style.  For example
+ *   a DataGrid configured like this:
+ *   lineBreak="explicit" variableRowHeight="false" yields fixed height
+ *   DataGrid cells whose labels do not wrap.

+ *
+ *
The value of the label property is displayed with a either a UIFTETextField
+ *   or a UITEextField depending on the value of the textFieldClass style.  The default
+ *   is UIFTETextField because it balances Spark compatability and cross-platform
+ *   performance well.  In some cases specifying
+ *   textFieldClass="mx.core.UITextField" (MXML) for the DataGrid will yield
+ *   improved scrolling performance for very large DataGrids.

+ *
+ *
DefaultGridItemRenderer is not intended to be subclassed or copied, it is
+ *   effectively final.  Custom item renderers can be created in MXML with the
+ *   GridItemRenderer component.

+ *
+ *   @see spark.components.supportClasses.GridItemRenderer
  */
 public class DefaultGridItemRenderer extends UIComponent implements IGridItemRenderer
 {
@@ -461,11 +507,11 @@
     /**
      *  @private
      */
-    override public function styleChanged(styleName:String):void
-    {
-        super.styleChanged(styleName);
-
-        if (!styleName || (styleName == "styleName") || (styleName = "lineBreak"))
+    override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+
+        if (!styleProp || (styleProp == "styleName") || (styleProp = "lineBreak"))
         {
             lineBreakStyleChanged = true;
             invalidateProperties();


Use the Maps builder method.
Assign the DEFAULT_MAP if we unstream an empty map, too.
Comment DEFAULT_MAP.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@6107 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/util/StreamableHashMap.as
+++ src/as/com/threerings/util/StreamableHashMap.as
@@ -27,8 +27,6 @@

 import com.threerings.util.Maps;
 import com.threerings.util.maps.ForwardingMap;
-import com.threerings.util.maps.HashMap;
-import com.threerings.util.maps.ImmutableMap;

 /**
  * A Map that can be sent over the wire, bearing in mind that all keys and values must
@@ -78,10 +76,12 @@
             }

         } else {
-            _source = Maps.newMapOf(String); // hope for the best
+            _source = DEFAULT_MAP;
         }
     }

-    protected static const DEFAULT_MAP :Map = new ImmutableMap(new HashMap());
+    /** Used when we don't know the key class. Typically if a map is unstreamed it is
+     * read-only anyway, so this will work for empty maps that are unstreamed. */
+    protected static const DEFAULT_MAP :Map = Maps.newBuilder(Object).makeImmutable().build();
 }
 }


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

--- frameworks/projects/mx/src/mx/containers/Form.as
+++ frameworks/projects/mx/src/mx/containers/Form.as
@@ -30,12 +30,22 @@
 /**
  *  Number of pixels between the label and child components.
  *  The default value is 14.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="indicatorGap", type="Number", format="Length", inherit="yes")]

 /**
  *  Width of the form labels.
  *  The default is the length of the longest label in the form.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="labelWidth", type="Number", format="Length", inherit="yes")]

@@ -43,6 +53,11 @@
  *  Number of pixels between the container's bottom border
  *  and the bottom  edge of its content area.
  *  The default value is 16.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="paddingBottom", type="Number", format="Length", inherit="no")]

@@ -50,6 +65,11 @@
  *  Number of pixels between the container's top border
  *  and the top edge of its content area.
  *  The default value is 16.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="paddingTop", type="Number", format="Length", inherit="no")]

@@ -133,6 +153,11 @@
  *
  *  @see mx.containers.FormHeading
  *  @see mx.containers.FormItem
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class Form extends Container
 {
@@ -180,6 +205,11 @@

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

     /**
      *  The maximum width, in pixels, of the labels of the FormItems containers in this Form.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get maxLabelWidth():Number
     {
@@ -327,6 +362,11 @@
      *
      *
The measuredMinHeight property is set to the same value
      *  as that of the measuredHeight property.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override protected function measure():void
     {
@@ -366,6 +406,11 @@
      *  @param unscaledHeight Specifies the height of the component, in pixels,
      *  in the component's coordinates, regardless of the value of the
      *  scaleY property of the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override protected function updateDisplayList(unscaledWidth:Number,
                                                   unscaledHeight:Number):void


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

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