Transferred from the Adobe Open Source Subversion Repository

Revision: 12457
Author:   smgilson@adobe.com
Date:     2009-12-03T18:13:50.586970Z

Log Message:
-----------
asdoc updates for localization

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/AnchorStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.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/spark/src/spark/effects/AnimateTransform.as</path>

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

--- frameworks/projects/spark/src/spark/effects/AnimateTransform.as
+++ frameworks/projects/spark/src/spark/effects/AnimateTransform.as
@@ -52,8 +52,8 @@
  *  in parallel to avoid any conflict when modifying overlapping property values.
  *  This effect works by combining all current transform effects
  *  on a target into one single effect instance for that target. That is, multiple
- *  transform effects within the same Parallel effect will be combined (transform
- *  effects within a Sequence will run separately).
+ *  transform effects within the same Parallel effect are combined (transform
+ *  effects within a Sequence run separately).
  *
  *  <p>While this combination of multiple transform effects happens
  *  internally,
@@ -202,9 +202,9 @@
     /**
      * The sharedObjectDepot holds shared transform effect instances on a
      * per-toplevel-Parallel basis. That is, transform effects running in
-     * parallel will share a common effect instance with other effects
+     * parallel shares a common effect instance with other effects
      * grouped in the same Parallel tree. Effects running individually, or
-     * running inside a Sequence, will not share instances. We manage this
+     * running inside a Sequence, does not share instances. We manage this
      * by having a map-of-maps inside our sharedObjectDepot. The top-level
      * map manages the per-toplevel-Parallel maps (maps keyd from particular
      * Parallel effects), whose entries are maps that are keyed off of
@@ -245,7 +245,7 @@

     [Inspectable(category="General", enumeration="true,false")]
     /**
-     *  This flag is used by the subclasses of AnimateTransform to specify
+     *  Subclasses of AnimateTransform use this flag to specify
      *  whether the effect changes transform values used by the layout
      *  manager, or whether it changes values used after layout is run.
      *
@@ -406,7 +406,7 @@
      *  autonomously, this effect uses only a single effect instance per target.
      *  So all objects of type AnimateTransform, or its subclasses, share this
      *  one global instance. If there is already an instance created for the effect,
-     *  the values from the new effect will be inserted as animation values into
+     *  the values from the new effect is inserted as animation values into
      *  the existing instance.
      *
      *  @param target The Object to animate with this effect.


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

--- frameworks/projects/airframework/src/mx/controls/FileSystemTree.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemTree.as
@@ -0,0 +1,875 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.FileListEvent;
+import flash.events.KeyboardEvent;
+import flash.filesystem.File;
+import flash.ui.Keyboard;
+import mx.collections.ArrayCollection;
+import mx.collections.Sort;
+import mx.controls.fileSystemClasses.FileSystemControlHelper;
+import mx.controls.fileSystemClasses.FileSystemTreeDataDescriptor;
+import mx.controls.Tree;
+import mx.core.mx_internal;
+import mx.core.ScrollPolicy;
+import mx.events.FileEvent;
+import mx.events.ListEvent;
+import mx.events.TreeEvent;
+import mx.styles.StyleManager;
+import mx.styles.CSSStyleDeclaration;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched whenever the directory property changes
+ *  for any reason.
+ *
+ *  @eventType mx.events.FileEvent.DIRECTORY_CHANGE
+ */
+[Event(name="directoryChange", type="mx.events.FileEvent")]
+
+/**
+ *  Dispatched when the user closes an open directory node
+ *  using the mouse of keyboard.
+ *
+ *  @eventType mx.events.FileEvent.DIRECTORY_CLOSING
+ */
+[Event(name="directoryClosing", type="mx.events.FileEvent")]
+
+/**
+ *  Dispatched when the user opens a directory node
+ *  using the mouse or keyboard.
+ *
+ *
This is a cancelable event.
+ *  If you call event.preventDefault(),
+ *  this control will continue to display the current directory
+ *  rather than changing to display the subdirectory which was
+ *  double-clicked.

+ *
+ *  @eventType mx.events.FileEvent.DIRECTORY_OPENING
+ */
+[Event(name="directoryOpening", 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")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[IconFile("FileSystemTree.png")]
+
+[ResourceBundle("aircontrols")]
+
+/**
+ *  The FileSystemTree control displays the contents of a
+ *  file system directory as a tree.
+ *
+ *
You specify the directory whose content is displayed by setting
+ *  the directory property to an instance
+ *  of the flash.filesystem.File class.
+ *  (File instances can represent directories as well as files.)
+ *  Whenever this property changes for any reason, the control
+ *  dispatches a directoryChange event.

+ *
+ *
You can set the enumerationMode property to specify
+ *  whether to show this directory's files, its subdirectories, or both.
+ *  There are three ways to show both files and subdirectories within
+ *  each tree node: directories first, files first, or intermixed.

+ *
+ *
You can set the extensions property to filter the list
+ *  so that only files with the specified extensions are displayed.
+ *  (Extensions on directories are ignored.)
+ *  You can also specify an additional filtering function of your own
+ *  by setting the filterFunction property.

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

+ *
+ *
You can do custom-sorting within each tree node by setting
+ *  the nameCompareFunction property to a function
+ *  that compares two file or directory names.

+ *
+ *
If the user double-clicks a closed directory node,
+ *  or clicks its disclosure icon,
+ *  this control dispatches a directoryOpening event.
+ *  If the user double-clicks an open directory node,
+ *  or clicks its disclosure icon,
+ *  this control dispatches a directoryClosing event.
+ *  A handler can cancel either event by calling
+ *  event.preventDefault() in which case the node will not open.

+ *
+ *
If the user double-clicks a file node,
+ *  this control dispatches a select event.

+ */
+public class FileSystemTree extends Tree
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy mx.controls.FileSystemList#COMPUTER
+     */
+    public static const COMPUTER:File = FileSystemControlHelper.COMPUTER;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function FileSystemTree()
+    {
+        super();
+
+        helper = new FileSystemControlHelper(this, true);
+
+        dataDescriptor = new FileSystemTreeDataDescriptor();
+        doubleClickEnabled = true;
+        horizontalScrollPolicy = ScrollPolicy.AUTO;
+        iconFunction = helper.fileIconFunction;
+        labelFunction = helper.fileLabelFunction;
+
+        addEventListener(TreeEvent.ITEM_OPENING, itemOpeningHandler);
+        addEventListener(ListEvent.ITEM_DOUBLE_CLICK, itemDoubleClickHandler);
+
+        // Set the initial dataProvider by enumerating the root directories.
+        directory = COMPUTER;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    mx_internal var helper:FileSystemControlHelper;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  directory
+    //----------------------------------
+
+    [Bindable("directoryChanged")]
+
+    /**
+     *  The directory whose contents this control displays.
+     *
+     *
If you set this property to a File object representing
+     *  an existing directory, the dataProvider
+     *  immediately becomes null.
+     *  Later, when this control is revalidated by the LayoutManager,
+     *  it performs a synchronous enumeration of that directory's
+     *  contents and populates the dataProvider property
+     *  with an ArrayCollection of the resulting File objects
+     *  for the directory's files and subdirectories.

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

+     *
+     *  @default COMPUTER
+     */
+    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;
+    }
+
+    //----------------------------------
+    //  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;
+    }
+
+    //----------------------------------
+    //  openPaths
+    //----------------------------------
+
+    /**
+     *  An Array of nativePath Strings for the File items
+     *  representing the open subdirectories.
+     *  This Array is empty if no subdirectories are open.
+     *
+     *  @default []
+     */
+    public function get openPaths():Array /* of String */
+    {
+        return helper.openPaths;
+    }
+
+    /**
+     *  @private
+     */
+    public function set openPaths(value:Array /* of String */):void
+    {
+        helper.openPaths = 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;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        helper.commitProperties();
+
+        super.commitProperties();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+       var text:String = resourceManager.getString(
+        	"aircontrols", "fileSystemTree_measuredText");
+        measuredWidth = measureText(text).width;
+    }
+
+    /**
+     *  @private
+     *  The FileSystemControlHelper calls getStyle("directoryIcon")
+     *  and getStyle("fileIcon") because these are the style names
+     *  that FileSystemList and FileSystemDataGrid declare for their icons.
+     *  But FileSystemTree extends Tree and Tree already declares
+     *  the styles "folderClosedIcon" and "defaultLeafIcon"
+     *  for these icons, so it doesn't declare "directoryIcon"
+     *  and fileIcon.
+     *  Therefore, we map the names here.
+     */
+    override public function getStyle(styleProp:String):*
+    {
+        if (styleProp == "directoryIcon")
+            styleProp = "folderClosedIcon";
+        else if (styleProp == "fileIcon")
+            styleProp = "defaultLeafIcon";
+
+        return super.getStyle(styleProp);
+    }
+
+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+
+        helper.styleChanged(styleProp);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function itemToUID(data:Object):String
+    {
+    	return helper.itemToUID(data);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  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);
+    }
+
+    /**
+     *  Re-enumerates the current directory being displayed by this control.
+     *
+     *
When this method returns, the directory property
+     *  will contain the File instance for the same directory as before.
+     *  The dataProvider property will be temporarily
+     *  null until the directory is re-enumerated.
+     *  After the enumeration, the dataProvider property
+     *  will contain an ArrayCollection of File instances
+     *  for the directory's contents.

+     */
+    public function refresh():void
+    {
+		helper.refresh();
+    }
+
+    /**
+     *  Clears the list.
+     *
+     *
This method sets the dataProvider to null
+     *  but leaves the directory property unchanged.
+     *  You can call refresh to populate the list again.

+     */
+    public function clear():void
+    {
+        helper.clear();
+    }
+
+    /**
+     *  Opens a subdirectory specified by a native file system path.
+     *
+     *
This method automatically opens all intervening directories
+     *  required to reach the specified directory.

+     *
+     *
If the nativePath doesn't specify
+     *  an existing file system directory, or if that
+     *  directory isn't within the directory that this control
+     *  is displaying, then this method does nothing.

+	 *
+	 *  @param file A String specifying the nativePath
+     *  of a File item.
+     */
+    public function openSubdirectory(nativePath:String):void
+    {
+    	var item:File = new File(nativePath);
+    	if (!item.exists || !item.isDirectory)
+    		return;
+
+		// Don't animate the opens, since we're doing
+		// multiple ones synchronously.
+		var savedOpenDuration:Number = getStyle("openDuration");
+		setStyle("openDuration", 0);
+
+    	var parentPaths:Array = getParentPaths(item);
+    	var n:int = parentPaths.length;
+    	for (var i:int = 0; i < n; i++)
+    	{
+    		item = findItem(parentPaths[i]);
+    		if (item)
+    			openItem(item, false);
+    	}
+
+		setStyle("openDuration", savedOpenDuration);
+
+    	invalidateList();
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function openItem(item:File, async:Boolean = true):void
+    {
+        if (isItemOpen(item))
+        	return;
+
+        var children:ArrayCollection =
+        	ArrayCollection(dataDescriptor.getChildren(item));
+
+        if (!children || modificationDateHasChanged(item))
+        {
+            if (async)
+      		{
+	      		item.addEventListener(FileListEvent.DIRECTORY_LISTING,
+	                                  directoryListingHandler);
+	            item.getDirectoryListingAsync();
+      		}
+      		else
+      		{
+	        	insertChildItems(item, item.getDirectoryListing());
+			}
+        }
+        else
+        {
+            expandItem(item, true, true);
+        	helper.itemsChanged();
+        }
+
+     	invalidateList();
+     }
+
+    /**
+     *  Closes a subdirectory specified by a native file system path.
+     *
+     *
If the nativePath doesn't specify
+     *  a directory being displayed within this control,
+     *  then this method does nothing.

+	 *
+     *  @param file A String specifying the nativePath
+     *  of a File item.
+     */
+    public function closeSubdirectory(nativePath:String):void
+    {
+    	var item:File = findItem(nativePath);
+    	if (item && item.isDirectory)
+    		closeItem(item);
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function closeItem(item:File):void
+    {
+        expandItem(item, false, true);
+
+        fixSelectionAfterClose(item);
+
+		helper.itemsChanged();
+    }
+
+    /**
+     *  @private
+     *
+     *  If any selected items are inside the closing item,
+     *  deselect them and select the closing item in their place.
+     */
+    mx_internal function fixSelectionAfterClose(item:File):void
+    {
+    	var closingPath:String = item.nativePath;
+
+    	var newSelectedItems:Array = []
+
+    	var n:int = selectedItems.length;
+    	for (var i:int = 0; i < n; i++)
+    	{
+    		var selectedPath:String = selectedItems[i].nativePath;
+    		if (selectedPath.indexOf(closingPath) == 0)
+    			newSelectedItems.push(item);
+    		else
+    			newSelectedItems.push(selectedItems[i]);
+    	}
+
+    	selectedItems = newSelectedItems;
+    }
+
+    /**
+     *  @private
+     */
+    private function getParentPaths(file:File):Array /* of String */
+    {
+        var a:Array = [];
+
+        for (var f:File = file; f != null; f = f.parent)
+        {
+        	if (f.nativePath == directory.nativePath)
+        		break;
+
+            a.unshift(f.nativePath);
+        }
+
+         return a;
+    }
+
+    /**
+     *  @private
+     */
+    private function modificationDateHasChanged(item:File):Boolean
+    {
+        var item2:File = new File(item.nativePath);
+        return item.modificationDate != item2.modificationDate;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function insertChildItems(subdirectory:File, childItems:Array):void
+    {
+    	var childCollection:ArrayCollection = new ArrayCollection(childItems);
+
+        childCollection.filterFunction =
+        	helper.directoryEnumeration.fileFilterFunction;
+        childCollection.sort = new Sort();
+        childCollection.sort.compareFunction =
+        	helper.directoryEnumeration.fileCompareFunction;
+        childCollection.refresh();
+
+        FileSystemTreeDataDescriptor(dataDescriptor).setChildren(
+        	subdirectory, childCollection);
+
+        expandItem(subdirectory, true, true);
+
+        helper.itemsChanged();
+    }
+
+    /**
+	 *  @private
+	 *
+	 *  Opens the selected node if it is a directory.
+     *  This method does nothing if no node is selected,
+     *  or if a file node is selected.
+     */
+    private function openSelectedSubdirectory():void
+    {
+        var item:File = File(selectedItem);
+        if (item && item.exists && item.isDirectory)
+            openItem(item, true);
+    }
+
+    /**
+	 *  @private
+	 *
+     *  Closes the selected node if it is a directory.
+     *  This method does nothing if no node is selected,
+     *  or if a file node is selected.
+     */
+    private function closeSelectedSubdirectory():void
+    {
+        var item:File = File(selectedItem);
+        if (item && item.exists && item.isDirectory)
+            closeItem(item);
+    }
+
+	/**
+	 *  @private
+	 *  Dispatches a cancelable "directoryOpening" event
+	 *  and returns true if it wasn't canceled.
+	 */
+    private function dispatchDirectoryOpeningEvent(directory:File):Boolean
+    {
+        var event:FileEvent =
+            new FileEvent(FileEvent.DIRECTORY_OPENING, false, true);
+        event.file = directory;
+        dispatchEvent(event);
+
+        return !event.isDefaultPrevented();
+    }
+
+	/**
+	 *  @private
+	 *  Dispatches a cancelable "directoryClosing" event
+	 *  and returns true if it wasn't canceled.
+	 */
+    private function dispatchDirectoryClosingEvent(directory:File):Boolean
+    {
+        var event:FileEvent =
+            new FileEvent(FileEvent.DIRECTORY_CLOSING, false, true);
+        event.file = directory;
+        dispatchEvent(event);
+
+        return !event.isDefaultPrevented();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function keyDownHandler(event:KeyboardEvent):void
+    {
+		if (event.keyCode == Keyboard.ENTER)
+		{
+			var selectedFile:File = File(selectedItem);
+			if (selectedFile && !selectedFile.isDirectory)
+				helper.dispatchFileChooseEvent(selectedFile);
+			return;
+		}
+
+        super.keyDownHandler(event);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function itemOpeningHandler(event:TreeEvent):void
+    {
+        event.preventDefault();
+
+        var item:File = File(event.item);
+
+        if (event.opening)
+        {
+            if (dispatchDirectoryOpeningEvent(item))
+                openItem(item, true);
+        }
+        else
+        {
+            if (dispatchDirectoryClosingEvent(item))
+                closeItem(item);
+        }
+    }
+
+    /**
+     *  @private
+     *  Completes an async openItem() call.
+     */
+    private function directoryListingHandler(event:FileListEvent):void
+    {
+    	insertChildItems(File(event.target), event.files);
+    }
+
+    /**
+     *  @private
+     */
+    private function itemDoubleClickHandler(event:ListEvent):void
+    {
+        var item:File = File(selectedItem);
+
+        if (item.isDirectory)
+        {
+            if (!isItemOpen(item))
+            {
+                // Dispatch a cancelable "directoryOpening" event.
+                // If the event wasn't canceled,
+                // then open that node and display its children.
+                if (dispatchDirectoryOpeningEvent(item))
+                    openSelectedSubdirectory();
+            }
+            else
+            {
+                // Dispatch a cancelable "directoryClosing" event.
+                // If the event wasn't canceled,
+                // then close that node.
+				if (dispatchDirectoryClosingEvent(item))
+                    closeSelectedSubdirectory();
+            }
+        }
+        else
+        {
+            helper.dispatchFileChooseEvent(item);
+        }
+    }
+}
+
+}


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

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

 package mx.collections
 {


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5389
Author:   mhorn@adobe.com
Date:     2009-03-18T16:09:24.692896Z

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

Modified Paths:
--------------
<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/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/CollectionEventKind.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/graphics/GradientBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -1089,8 +1089,12 @@

     /**
      *  Documentation is not currently available.
+     *
+     *  Possible values are ALWAYS, WHEN_FOCUSED, and WHEN_ACTIVE.
+     *
+     *  @see mx.components.TextSelectionVisibility
      *
-     *  @default null
+     *  @default TextSelectionVisibility.WHEN_FOCUSED
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 17305
Author:   gruehle@adobe.com
Date:     2010-08-12T21:18:50.910120Z

Log Message:
-----------
This revision includes the following changes:
* Text skin parts for Spark components changed from TextBase and RichEditableText to IDisplayText and IEditableText
* TextBase implements IDisplayText
* RichEditableText implements IEditableText
* New mobile skins for TextInput and TextArea (TextArea appearance is placeholder for now)
* Add a TOUCH_SCROLL_STARTING handler to SkinnableTextBase. This handler prevents the touch scroll from happening if the text is selectable or editable.
* Change global contentBackgroundColor to #3F3F3F and mobile application backgroundColor to #484848

Now that text skin parts are interfaces they need to be cast to concrete types in a bunch of places. There are two general approaches taken here:
* For required functionality, cast to a known type like InteractiveObject
* For optional functionality, cast to the desired type using “as” and wrap the code with a null check.

QE notes: Mobile TextInput is ready for testing. TextArea has some issues with resizing, so testing should wait for now.
Doc notes: -
Bugs: -
Reviewer: Jason Szeto, Corey L.
Tests run: full mustella pass (thank you cyclone server!), checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInput_border.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkComboBoxAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/accessibility/VideoPlayerAccImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormHeading.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DefaultColumnHeaderRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableTextBaseAutomationImpl.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -76,6 +76,7 @@
     import mx.resources.ResourceManager;
     import mx.utils.StringUtil;

+    import spark.core.IEditableText;
     import spark.components.supportClasses.RichEditableTextContainerManager;
     import spark.core.CSSTextLayoutFormat;
     import spark.core.IViewport;
@@ -417,7 +418,8 @@
      *  @see flashx.textLayout.container.TextContainerManager
      */
     public class RichEditableText extends UIComponent
-        implements IFocusManagerComponent, IIMESupport, ISystemCursorClient, IViewport
+        implements IFocusManagerComponent, IIMESupport, ISystemCursorClient,
+                   IViewport, IEditableText
     {
         include "../core/Version.as";

@@ -862,6 +864,19 @@
             invalidateDisplayList();
         }

+        //----------------------------------
+        // isTruncated
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        public function get isTruncated():Boolean
+        {
+            // This class does not support truncation
+            return false;
+        }
+
         //----------------------------------
         // percentHeight
         //----------------------------------