Transferred from the Adobe Open Source Subversion Repository

Revision: 5097
Author:   gauravj@adobe.com
Date:     2009-02-27T02:06:23.424936Z

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:
--------------
<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/airframework/src/mx/controls/fileSystemClasses/FileSystemTreeDataDescriptor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/AIREvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FileEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/WindowExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemControlHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemRawChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/IWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemSizeDisplayMode.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/airframework/src/mx/events/FlexNativeWindowBoundsEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/airframework/src/mx/controls/FileSystemList.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemList.as
@@ -33,6 +33,10 @@
  *  has changed for any reason.
  *
  *  @eventType mx.events.FileEvent.DIRECTORY_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="directoryChange", type="mx.events.FileEvent")]

@@ -60,6 +64,10 @@
  *  the directoryChange event is dispatched.

  *
  *  @eventType mx.events.FileEvent.DIRECTORY_OPENING
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="directoryChanging", type="mx.events.FileEvent")]

@@ -68,6 +76,10 @@
  *  or by selecting it and pressing Enter.
  *
  *  @eventType mx.events.FileEvent.FILE_CHOOSE
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="fileChoose", type="mx.events.FileEvent")]

@@ -82,6 +94,10 @@
  *  directoryIcon="@Embed(source='directoryIcon.jpg');"
  *
  *  @default TreeNodeIcon
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="directoryIcon", type="Class", format="EmbeddedFile", inherit="no")]

@@ -92,6 +108,10 @@
  *  fileIcon="@Embed(source='fileIcon.jpg');"
  *
  *  @default TreeNodeIcon
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="fileIcon", type="Class", format="EmbeddedFile", inherit="no")]

@@ -239,6 +259,10 @@
  *
  *  @see flash.filesystem.File
  *
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class FileSystemList extends List
 {
@@ -255,6 +279,10 @@
      *  representing a pseudo-top level directory named "Computer". This pseudo-directory
      *  contains the root directories
      *  (such as C:\ and D:\ on Windows or / on Macintosh).
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const COMPUTER:File = FileSystemControlHelper.COMPUTER;

@@ -266,6 +294,10 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function FileSystemList()
     {
@@ -340,6 +372,10 @@
      *  @see #canNavigateBack
      *  @see #navigateBack()
      *  @see mx.controls.FileSystemHistoryButton
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get backHistory():Array
     {
@@ -372,6 +408,10 @@
      *
      *  @see #backHistory
      *  @see #navigateBack()
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get canNavigateBack():Boolean
     {
@@ -403,6 +443,10 @@
      *  @default false
      *
      *  @see #navigateDown()
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get canNavigateDown():Boolean
     {
@@ -435,6 +479,10 @@
      *
      *  @see #forwardHistory
      *  @see #navigateForward()
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get canNavigateForward():Boolean
     {
@@ -468,6 +516,10 @@
      *  @default false
      *
      *  @see #navigateUp()
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get canNavigateUp():Boolean
     {
@@ -502,6 +554,10 @@
      *  to the upper-left corner.

      *
      *  @default COMPUTER
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get directory():File
     {
@@ -546,6 +602,10 @@
      *  @default FileSystemEnumerationMode.DIRECTORIES_FIRST
      *
      *  @see mx.controls.FileSystemEnumerationMode
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get enumerationMode():String
     {
@@ -607,6 +667,10 @@
      *  to the upper-left corner.

      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get extensions():Array /* of String */
     {
@@ -660,6 +724,10 @@
      *  to the upper-left corner.

      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get filterFunction():Function
     {
@@ -710,6 +778,10 @@
      *  @see #canNavigateForward
      *  @see #navigateForward()
      *  @see mx.controls.FileSystemHistoryButton
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get forwardHistory():Array
     {
@@ -759,6 +831,10 @@
      *  to the upper-left corner.

      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get nameCompareFunction():Function
     {
@@ -797,6 +873,10 @@
      *
      *  @see mx.controls.listClasses.ListBase#selectedIndex
      *  @see mx.controls.listClasses.ListBase#selectedItem
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get selectedPath():String
     {
@@ -832,6 +912,10 @@
      *
      *  @see mx.controls.listClasses.ListBase#selectedIndex
      *  @see mx.controls.listClasses.ListBase#selectedItem
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get selectedPaths():Array /* of String */
     {
@@ -862,6 +946,10 @@
      *  or the scroll position.

      *
      *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get showExtensions():Boolean
     {
@@ -891,6 +979,10 @@
      *  to the upper-left corner.

      *
      *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get showHidden():Boolean
     {
@@ -926,6 +1018,10 @@
      *  or the scroll position.

      *
      *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get showIcons():Boolean
     {
@@ -1016,6 +1112,10 @@
      *  if no File was found with the specified path.
      *
      *  @see flash.filesystem.File#nativePath
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function findIndex(nativePath:String):int
     {
@@ -1034,6 +1134,10 @@
      *
      *  @return A File instance if one was found with the specified
      *  nativePath, or null if none was found.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function findItem(nativePath:String):File
     {
@@ -1064,6 +1168,10 @@
      *      click="fileSystemViewer.navigateDown();"/>

      *
      *  @see #canNavigateDown
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function navigateDown():void
     {
@@ -1095,6 +1203,10 @@
      *      click="fileSystemViewer.navigateUp();"/>

      *
      *  @see #canNavigateUp
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function navigateUp():void
     {
@@ -1138,6 +1250,10 @@
      *
      *  @see #backHistory
      *  @see #canNavigateBack
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function navigateBack(index:int = 0):void
     {
@@ -1181,6 +1297,10 @@
      *
      *  @see #canNavigateForward
      *  @see #forwardHistory
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function navigateForward(index:int = 0):void
     {
@@ -1192,6 +1312,10 @@
      *  directory.
      *
      *  @param file A file object representing a file or directory.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function navigateTo(directory:File):void
     {
@@ -1214,6 +1338,10 @@
      *
      *
This method preserves any selected items (if they still exist)
      *  and the scroll position (if the first visible item still exists).

+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function refresh():void
     {
@@ -1226,6 +1354,10 @@
      *
This method sets the dataProvider to null
      *  but leaves the directory property unchanged.
      *  You can call refresh to populate this control again.

+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function clear():void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8382
Author:   cframpto@adobe.com
Date:     2009-07-06T19:22:02.205896Z

Log Message:
-----------
TLF Build 461.  Update to RET.appendText() so it continues to pass mustella TextArea appendText() tests with new library.

QA Notes:
Doc Notes:
Reviewers: Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swf</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/tlf.properties</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -2560,10 +2560,11 @@
          if (!editManager.hasSelection())
             editManager.selectRange(int.MAX_VALUE, int.MAX_VALUE);

-        // Our damage handler should be active.  Inserting the text invokes
-        // our damage handler to invalidate the text, maybe the size, and
-        // the display list.
+        // Force the insertion to happen right away rather than on the next
+        // frame.  We need the selection to change and our damage handler to
+        // be invoked to invalidate the text and update the display list.
         editManager.insertText(text);
+        editManager.flushPendingOperations();

         // All done with edit manager.
         releaseEditManager();
@@ -2593,10 +2594,11 @@
         // An append is an insert with the selection set to the end.
         editManager.selectRange(int.MAX_VALUE, int.MAX_VALUE);

-        // Our damage handler should be active.  Inserting the text invokes
-        // our damage handler to invalidate the text, maybe the size, and
-        // the display list.
+        // Force the insertion to happen right away rather than on the next
+        // frame.  We need the selection to change and our damage handler to
+        // be invoked to invalidate the text and update the display list.
         editManager.insertText(text);
+        editManager.flushPendingOperations();

         // All done with edit manager.
         releaseEditManager();


Work in progress...

Work in progress...

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

--- src/org/igniterealtime/xiff/si/FileTransferManager.as
+++ src/org/igniterealtime/xiff/si/FileTransferManager.as
@@ -26,10 +26,16 @@
 package org.igniterealtime.xiff.si
 {
 	import flash.events.EventDispatcher;
-
+	import flash.utils.ByteArray;
+
 	import org.igniterealtime.xiff.core.*;
+	import org.igniterealtime.xiff.data.*;
+	import org.igniterealtime.xiff.data.feature.FeatureNegotiationExtension;
 	import org.igniterealtime.xiff.data.forms.*;
+	import org.igniterealtime.xiff.data.forms.enum.*;
 	import org.igniterealtime.xiff.data.si.*;
+	import org.igniterealtime.xiff.data.stream.*;
+	import org.igniterealtime.xiff.data.message.*;
 	import org.igniterealtime.xiff.events.*;

 	/**
@@ -37,8 +43,15 @@
 	 * @eventType org.igniterealtime.xiff.events.FileTransferEvent.TRANSFER_INIT
 	 */
 	[Event(name="transferInit", type="org.igniterealtime.xiff.events.FileTransferEvent")]
+	/**
+	 *
+	 * @eventType org.igniterealtime.xiff.events.FileTransferEvent.FEATURE_NEGOTIATED
+	 */
+	[Event(name="featureNegotiated", type="org.igniterealtime.xiff.events.FileTransferEvent")]

 	/**
+	 * INCOMPLETE
+	 *
 	 * Manages Stream Initiation (XEP-0095) based File Transfer (XEP-0096)
 	 *
 	 * @see http://xmpp.org/extensions/xep-0095.html
@@ -48,8 +61,14 @@
 	{

 		private var _connection:IXMPPConnection;
-
-		/**
+		private var _outGoingData:ByteArray;
+		private var _sequence:uint = 0;
+		private var _chunkSize:uint = 4096;
+
+		/**
+		 * Set the out going data first.
+		 * Then beginNegotiation with all the relevant information
+		 * Once FEATURE_NEGOTIATED occurs, call initiateSession.
 		 *
 		 * @param	aConnection A reference to an XMPPConnection class instance
 		 */
@@ -59,7 +78,215 @@
 			{
 				connection = aConnection;
 			}
-        }
+		}
+
+		/**
+		 * Negotiate a suitable transfer protocol.
+		 * Feature negotiation is done with a FormExtension.
+		 *
+		 *
It can for example contain a list of possible stream methods.
+		 * It seems that SOCKS5 Bytestreams (XEP-0065) will always be
+		 * preferable, but it not implemented in XIFF.

+		 *
+		 * @see http://xmpp.org/extensions/xep-0065.html
+		 * @see http://xmpp.org/extensions/xep-0066.html
+		 * @see http://xmpp.org/extensions/xep-0047.html
+		 */
+		public function beginNegotiation(to:EscapedJID, fileName:String, fileSize:uint, mimeType:String):void
+		{
+			/*
+			<iq type='set' id='offer1' to='receiver@jabber.org/resource'>
+			  <si xmlns='http://jabber.org/protocol/si'
+				  id='a0'
+				  mime-type='text/plain'
+				  profile='http://jabber.org/protocol/si/profile/file-transfer'>
+				<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
+					  name='test.txt'
+					  size='1022'/>
+				<feature xmlns='http://jabber.org/protocol/feature-neg'>
+				  <x xmlns='jabber:x:data' type='form'>
+					<field var='stream-method' type='list-single'>
+					  <option><value>http://jabber.org/protocol/bytestreams</value></option>
+					  <option><value>http://jabber.org/protocol/ibb</value></option>
+					</field>
+				  </x>
+				</feature>
+			  </si>
+			</iq>
+			*/
+			var options:Array = [
+				{ label: "XEP-0066: Out of Band Data", value: OutOfBoundDataExtension.NS },
+				{ label: "XEP-0047: In-Band Bytestreams", value: IBBExtension.NS }
+			];
+			var field:FormField = new FormField(
+				FormFieldType.LIST_SINGLE,
+				"stream-method",
+				null,
+				options
+			);
+			var formExt:FormExtension = new FormExtension();
+			formExt.type = FormType.FORM;
+			formExt.fields = [field];
+
+			var featExt:FeatureNegotiationExtension = new FeatureNegotiationExtension();
+			featExt.addExtension(formExt);
+
+			var fileExt:FileTransferExtension = new FileTransferExtension();
+			fileExt.name = fileName;
+			fileExt.size = fileSize;
+			fileExt.addExtension(featExt);
+
+			var siExt:StreamInitiationExtension = new StreamInitiationExtension();
+			siExt.id = "letsdoit";
+			siExt.profile = FileTransferExtension.NS;
+			siExt.mimeType = mimeType;
+			siExt.addExtension(featExt);
+
+			var iq:IQ = new IQ(to, IQ.TYPE_SET, null, beginNegotiation_callback, beginNegotiation_errorCallback);
+			iq.addExtension(siExt);
+			_connection.send(iq);
+		}
+
+		/**
+		 * Called once the IQ stanza with the proper id is coming back
+		 */
+		private function beginNegotiation_callback(iq:IQ):void
+		{
+			var event:FileTransferEvent = new FileTransferEvent(FileTransferEvent.FEATURE_NEGOTIATED);
+			dispatchEvent(event);
+			/*
+			<iq type='result' to='sender@jabber.org/resource' id='offer1'>
+			  <si xmlns='http://jabber.org/protocol/si'>
+				<feature xmlns='http://jabber.org/protocol/feature-neg'>
+				  <x xmlns='jabber:x:data' type='submit'>
+					<field var='stream-method'>
+					  <value>http://jabber.org/protocol/bytestreams</value>
+					</field>
+				  </x>
+				</feature>
+			  </si>
+			</iq>
+			*/
+			var siExt:StreamInitiationExtension = iq.getAllExtensionsByNS(StreamInitiationExtension.NS)[0] as StreamInitiationExtension;
+
+			var featExt:FeatureNegotiationExtension = siExt.getAllExtensionsByNS(FeatureNegotiationExtension.NS)[0] as FeatureNegotiationExtension;
+
+			var formExt:FormExtension = featExt.getAllExtensionsByNS(FormExtension.NS)[0] as FormExtension;
+
+			var field:FormField = formExt.getFormField("stream-method");
+			trace("beginNegotiation_callback. field.value: " + field.value);
+		}
+
+		private function beginNegotiation_errorCallback(iq:IQ):void
+		{
+			// fail....
+		}
+
+		/**
+		 * Once the stream method has been negotiated, initiate the session.
+		 */
+		public function initiateSession(to:EscapedJID):void
+		{
+			/*
+			<iq from='romeo@montague.net/orchard'
+				id='jn3h8g65'
+				to='juliet@capulet.com/balcony'
+				type='set'>
+			  <open xmlns='http://jabber.org/protocol/ibb'
+					block-size='4096'
+					sid='i781hf64'
+					stanza='iq'/>
+			</iq>
+			*/
+			var openExt:IBBOpenExtension = new IBBOpenExtension();
+			openExt.sid = "letsdoit";
+			openExt.blockSize = _chunkSize;
+
+			var iq:IQ = new IQ(to, IQ.TYPE_SET, null, initiateSession_callback, initiateSession_errorCallback);
+			iq.addExtension(openExt);
+			_connection.send(iq);
+		}
+
+		/**
+		 * Called once the IQ stanza with the proper id is coming back
+		 */
+		private function initiateSession_callback(iq:IQ):void
+		{
+			var event:FileTransferEvent = new FileTransferEvent(FileTransferEvent.TRANSFER_INIT);
+			dispatchEvent(event);
+			/*
+			<iq from='juliet@capulet.com/balcony'
+				id='jn3h8g65'
+				to='romeo@montague.net/orchard'
+				type='result'/>
+			*/
+			sendChunk(iq.from);
+		}
+
+		private function initiateSession_errorCallback(iq:IQ):void
+		{
+			// fail....
+		}
+
+		private function sendChunk(to:EscapedJID):void
+		{
+			/*
+			<iq from='romeo@montague.net/orchard'
+				id='kr91n475'
+				to='juliet@capulet.com/balcony'
+				type='set'>
+			  <data xmlns='http://jabber.org/protocol/ibb' seq='0' sid='i781hf64'>
+				qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
+				WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
+				IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
+				AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
+				kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
+			  </data>
+			</iq>
+			*/
+			var iq:IQ = new IQ(to, IQ.TYPE_SET, null, sendChunk_callback, sendChunk_errorCallback);
+			var len:uint = Math.min(_outGoingData.bytesAvailable, _chunkSize);
+			if (len > 0)
+			{
+				var dataExt:IBBDataExtension = new IBBDataExtension();
+				dataExt.sid = "letsdoit";
+				dataExt.seq = _sequence;
+				dataExt.data = _outGoingData.readUTFBytes(len);
+				iq.addExtension(dataExt);
+				++_sequence;
+			}
+			else
+			{
+				iq.addExtension(new IBBCloseExtension());
+			}
+
+			_connection.send(iq);
+		}
+
+		private function sendChunk_callback(iq:IQ):void
+		{
+			if (_outGoingData.bytesAvailable > 0)
+			{
+				sendChunk(iq.from);
+			}
+		}
+
+		private function sendChunk_errorCallback(iq:IQ):void
+		{
+			// fail....
+		}
+
+		/**
+		 * Base64 encoded data that is sent to the recipient.
+		 */
+		public function get outGoingData():ByteArray
+		{
+			return _outGoingData;
+		}
+		public function set outGoingData( value:ByteArray ):void
+		{
+			_outGoingData = value;
+		}

 		/**
 		 * The connection used for sending and receiving data.
@@ -73,7 +300,7 @@
 			if ( _connection != null )
 			{
 			}
-
+
 			_connection = value;
 			_connection.enableExtensions( FileTransferExtension, FormExtension, StreamInitiationExtension );
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4330
Author:   preilly@adobe.com
Date:     2008-12-16T21:45:10.745617Z

Log Message:
-----------
* Reduced code generation for Bindable, added weak reference support
  to BindingUtils and added support for binding to private Statics.

tests Passed: checkintests, mxunit databinding (with and without AST generation)

Needs QA: YES

Needs DOC: NO

Bug fixes: SDK-14891

API Change: Yes, see BindingUtils and IWatcherSetupUtil2.

Reviewer: Corey

Code-level description of changes:

  frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as

    Added useWeakReference arg to watch().

    Added useWeakReference variable.

    Modified reset() to use useWeakReference.

  frameworks/projects/framework/src/mx/binding/utils/BindingUtils.as

    Added useWeakReference arg to bindProperty() and bindSetter().

  frameworks/projects/framework/src/mx/binding/BindingManager.as

    Added set() function.

  frameworks/projects/framework/src/mx/binding/IWatcherSetupUtil2.as

    Initial checkin.

  modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeSecondPassEvaluator.java

    Renamed ensureNonPublic() to ensurePublic() and reversed the logic.

    Renamed makeAttrListPrivate() to makeAttrListPublic() and modified
    to use ensurePublic().

  modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java

    Updated AST generation to mirror changes to WatcherSetupUtil.vm.

  modules/compiler/src/java/flex2/compiler/as3/binding/BindableProperty.vm

    Modified setter code generation to use BindingManager.set() to
    reduce code size.

  modules/compiler/src/java/flex2/compiler/as3/binding/WatcherSetupUtil.vm

    Added support for staticPropertyGetter.

  modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java

    Updated WatcherSetupUtil imports.

  modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm

    Added static property getter arg to WatcherSetupUtil setup() call.

    Updated template to use IWatcherSetupUtil2.

  modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java

    Updated AST generation to mirror changes to ClassDefLib.vm.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/SignatureEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/PropertyWatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/WatcherSetupUtil.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/BindingManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeSecondPassEvaluator.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/IWatcherSetupUtil2.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/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/NameFormatter.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/StaticPropertyWatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/BindingUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableProperty.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

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

--- frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as
+++ frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as
@@ -100,6 +100,11 @@
      *  Typically these tags are used to indicate fine-grained value changes,
      *  such as modifications in a text field prior to confirmation.
      *
+     *  @param useWeakReference (default = false) Determines whether
+     *  the reference to the host is strong or weak. A strong
+     *  reference (the default) prevents the host from being
+     *  garbage-collected. A weak reference does not.
+     *
      *  @return The ChangeWatcher instance, if at least one property name has
      *  been specified to the chain argument; null otherwise.
      *  Note that the returned watcher is not guaranteed to have successfully
@@ -112,7 +117,8 @@
      */
     public static function watch(host:Object, chain:Object,
                                  handler:Function,
-                                 commitOnly:Boolean = false):ChangeWatcher
+                                 commitOnly:Boolean = false,
+                                 useWeakReference:Boolean = false):ChangeWatcher
     {
         if (!(chain is Array))
             chain = [ chain ];
@@ -122,6 +128,7 @@
             var w:ChangeWatcher =
                 new ChangeWatcher(chain[0], handler, commitOnly,
                     watch(null, chain.slice(1), handler, commitOnly));
+            w.useWeakReference = useWeakReference;
             w.reset(host);
             return w;
         }
@@ -244,6 +251,7 @@
         this.commitOnly = commitOnly;
         this.next = next;
         events = {};
+        useWeakReference = false;
     }

     //--------------------------------------------------------------------------
@@ -295,6 +303,24 @@
      *  Volatile; varies with host.
      */
     private var events:Object;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  useWeakReference
+    //----------------------------------
+
+    /**
+     *  (default = false) Determines whether the reference to the host
+     *  is strong or weak. A strong reference (the default) prevents
+     *  the host from being garbage-collected. A weak reference does
+     *  not.
+     */
+    public var useWeakReference:Boolean;

     //--------------------------------------------------------------------------
     //
@@ -388,7 +414,8 @@
             events = getEvents(host, name, commitOnly);
             for (p in events)
             {
-                host.addEventListener(p, wrapHandler, false, EventPriority.BINDING, false);
+                host.addEventListener(p, wrapHandler, false,
+                    EventPriority.BINDING, useWeakReference);
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8458
Author:   smgilson@adobe.com
Date:     2009-07-08T18:35:15.696955Z

Log Message:
-----------
- Hide AdvancedLayoutFeatures.as from ASDoc
- ASDoc updates for IVisualElementContainer.as, UIComponent.as, IUIComponet
- Delete old ASDoc example and add a new one for RichEditableText.as

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElementContainer.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/TextViewExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.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/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as
+++ frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as
@@ -10,29 +10,30 @@
 ////////////////////////////////////////////////////////////////////////////////
 package mx.core
 {
-	import flash.events.Event;
-	import flash.geom.Matrix;
-	import flash.geom.Matrix3D;
-	import flash.geom.Point;
-	import flash.geom.Vector3D;
-	import flash.system.Capabilities;
-
-	import mx.geom.CompoundTransform;
-	import mx.geom.TransformOffsets;
-
-	use namespace mx_internal;
-
-	/**
-	 *  Transform Offsets can be assigned to any Component or GraphicElement to modify the transform
-	 *  of the object beyond where its parent layout places it.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public class AdvancedLayoutFeatures
-	{
+    import flash.events.Event;
+    import flash.geom.Matrix;
+    import flash.geom.Matrix3D;
+    import flash.geom.Point;
+    import flash.geom.Vector3D;
+    import flash.system.Capabilities;
+
+    import mx.geom.CompoundTransform;
+    import mx.geom.TransformOffsets;
+
+    use namespace mx_internal;
+
+    /**
+     *  @private
+     *  Transform Offsets can be assigned to any Component or GraphicElement to modify the transform
+     *  of the object beyond where its parent layout places it.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public class AdvancedLayoutFeatures
+    {
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -46,20 +47,20 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-		public function AdvancedLayoutFeatures()
-		{
-			layout = new CompoundTransform();
-		}
-
-
+        public function AdvancedLayoutFeatures()
+        {
+            layout = new CompoundTransform();
+        }
+
+

     /**
      * @private
      * a flag for use by the owning object indicating whether the owning object has a pending update
      * to the computed matrix.  it is the owner's responsibility to set this flag.
      */
-	public var updatePending:Boolean = false;
-
+    public var updatePending:Boolean = false;
+
     /**
      * storage for the depth value. Layering is considered 'advanced' layout behavior, and not something
      * that gets used by the majority of the components out there.  So if a component has a non-zero depth,
@@ -70,72 +71,72 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public var depth:Number = 0;
-
-
-
+    public var depth:Number = 0;
+
+
+
     /**
      * @private
      * slots for the various 2D and 3D matrices for layout, offset, and computed transforms.  Note that
      * these are only allocated and computed on demand -- many component instances will never use a 3D
      * matrix, for example.
      */
-	protected var _computedMatrix:Matrix;
-	protected var _computedMatrix3D:Matrix3D;
-
-	/**
-	 * @private
-	 * the layout visible transform as defined by the user and parent layout.
-	 */
-	protected var layout:CompoundTransform;
-
-	/**
-	 * @private
-	 * offset values applied by the user
-	 */
-	private var _postLayoutTransformOffsets:TransformOffsets;
-
+    protected var _computedMatrix:Matrix;
+    protected var _computedMatrix3D:Matrix3D;
+
+    /**
+     * @private
+     * the layout visible transform as defined by the user and parent layout.
+     */
+    protected var layout:CompoundTransform;
+
+    /**
+     * @private
+     * offset values applied by the user
+     */
+    private var _postLayoutTransformOffsets:TransformOffsets;
+
     /**
      * @private
      * bit field flags for indicating which transforms are valid -- the layout properties, the matrices,
      * and the 3D matrices.  Since developers can set any of the three programmatically, the last one set
      * will always be valid, and the others will be invalid until validated on demand.
      */
-	private static const COMPUTED_MATRIX_VALID:uint 	= 0x1;
-	private static const COMPUTED_MATRIX3D_VALID:uint 	= 0x2;
-
+    private static const COMPUTED_MATRIX_VALID:uint     = 0x1;
+    private static const COMPUTED_MATRIX3D_VALID:uint   = 0x2;
+
     /**
      * @private
      * general storage for all of our flags.
      */
-	private var _flags:uint = 0;
-
-	/**
-	 * @private
-	 * static data used by utility methods below
-	 */
-	private static var reVT:Vector3D = new Vector3D(0,0,0);
-	private static var reVR:Vector3D = new Vector3D(0,0,0);
-	private static var reVS:Vector3D = new Vector3D(1,1,1);
-
-	private static var reV:Vector.<Vector3D> = new Vector.<Vector3D>();
-	reV.push(reVT);
-	reV.push(reVR);
-	reV.push(reVS);
-
-
-	private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
-
-	private static const ZERO_REPLACEMENT_IN_3D:Number = .00000000000001;
-
-	private static var tempTransformCenter:Vector3D;
-
+    private var _flags:uint = 0;
+
+    /**
+     * @private
+     * static data used by utility methods below
+     */
+    private static var reVT:Vector3D = new Vector3D(0,0,0);
+    private static var reVR:Vector3D = new Vector3D(0,0,0);
+    private static var reVS:Vector3D = new Vector3D(1,1,1);
+
+    private static var reV:Vector.<Vector3D> = new Vector.<Vector3D>();
+    reV.push(reVT);
+    reV.push(reVR);
+    reV.push(reVS);
+
+
+    private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
+
+    private static const ZERO_REPLACEMENT_IN_3D:Number = .00000000000001;
+
+    private static var tempTransformCenter:Vector3D;
+
     /**
      * @private
      * a pointer to the function we use to transform vectors, to work around a bug
      * in early versions of the flash player.
      */
-	private static var transformVector:Function = initTransformVectorFunction;
+    private static var transformVector:Function = initTransformVectorFunction;

     /**
      * @private
@@ -144,12 +145,12 @@
      */
     private static function pre10_0_22_87_transformVector(m:Matrix3D,v:Vector3D):Vector3D
     {
-    	var r:Vector.<Number> = m.rawData;
-    	return new Vector3D(
-    		r[0] * v.x + r[4] * v.y + r[8] * v.z + r[12],
-    		r[1] * v.x + r[5] * v.y + r[9] * v.z + r[13],
-    		r[2] * v.x + r[6] * v.y + r[10] * v.z + r[14],
-    		1);
+        var r:Vector.<Number> = m.rawData;
+        return new Vector3D(
+            r[0] * v.x + r[4] * v.y + r[8] * v.z + r[12],
+            r[1] * v.x + r[5] * v.y + r[9] * v.z + r[13],
+            r[2] * v.x + r[6] * v.y + r[10] * v.z + r[14],
+            1);
     }

     /**
@@ -157,39 +158,39 @@
      * a  function to transform vectors using the built in player API, if we're in a late enough player version
      * that we won't run into bugs.s
      */
-	private static function nativeTransformVector(m:Matrix3D,v:Vector3D):Vector3D
-	{
-		return m.transformVector(v);
-	}
-
+    private static function nativeTransformVector(m:Matrix3D,v:Vector3D):Vector3D
+    {
+        return m.transformVector(v);
+    }
+
     /**
      * @private
      * the first time someone calls transformVector, they'll get this function.  It checks the player version,
      * and if decides which implementation to use based on whether a bug is present or not.
      */
-	private static function initTransformVectorFunction(m:Matrix3D,v:Vector3D):Vector3D
-	{
-		var canUseNative:Boolean = false;
-		var version:Array = Capabilities.version.split(' ')[1].split(',');
-		if(parseFloat(version[0]) > 10)
-			canUseNative  = true;
-		else if (parseFloat(version[1]) > 0)
-			canUseNative  = true;
-		else if (parseFloat(version[2]) > 22)
-			canUseNative  = true;
-		else if (parseFloat(version[3]) >= 87)
-			canUseNative  = true;
-		if(canUseNative)
-			transformVector = nativeTransformVector;
-		else
-			transformVector = pre10_0_22_87_transformVector;
-
-		return transformVector(m,v);
-	}
-
-
-	//------------------------------------------------------------------------------
-
+    private static function initTransformVectorFunction(m:Matrix3D,v:Vector3D):Vector3D
+    {
+        var canUseNative:Boolean = false;
+        var version:Array = Capabilities.version.split(' ')[1].split(',');
+        if(parseFloat(version[0]) > 10)
+            canUseNative  = true;
+        else if (parseFloat(version[1]) > 0)
+            canUseNative  = true;
+        else if (parseFloat(version[2]) > 22)
+            canUseNative  = true;
+        else if (parseFloat(version[3]) >= 87)
+            canUseNative  = true;
+        if(canUseNative)
+            transformVector = nativeTransformVector;
+        else
+            transformVector = pre10_0_22_87_transformVector;
+
+        return transformVector(m,v);
+    }
+
+
+    //------------------------------------------------------------------------------
+
     /**
      * layout transform convenience property.  Represents the x value of the layout matrix used in layout and in
      * the computed transform.
@@ -199,19 +200,19 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function set layoutX(value:Number):void
-	{
-		layout.x = value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutX():Number
-	{
-		return layout.x;
-	}
+    public function set layoutX(value:Number):void
+    {
+        layout.x = value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutX():Number
+    {
+        return layout.x;
+    }
     /**
      * layout transform convenience property.  Represents the y value of the layout matrix used in layout and in
      * the computed transform.
@@ -221,20 +222,20 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function set layoutY(value:Number):void
-	{
-		layout.y = value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutY():Number
-	{
-		return layout.y;
-	}
-
+    public function set layoutY(value:Number):void
+    {
+        layout.y = value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutY():Number
+    {
+        return layout.y;
+    }
+
     /**
      * layout transform convenience property.  Represents the z value of the layout matrix used in layout and in
      * the computed transform.
@@ -244,78 +245,78 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function set layoutZ(value:Number):void
-	{
-		layout.z = value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutZ():Number
-	{
-		return layout.z;
-	}
-
-	//------------------------------------------------------------------------------
-
+    public function set layoutZ(value:Number):void
+    {
+        layout.z = value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutZ():Number
+    {
+        return layout.z;
+    }
+
+    //------------------------------------------------------------------------------
+
     /**
      * @private
      * the x value of the point around which any rotation and scale is performed in both the layout and computed matrix.
      */
-	public function set transformX(value:Number):void
-	{
-		layout.transformX = value;
-		invalidate();
-	}
-    /**
-     * @private
-     */
-	public function get transformX():Number
-	{
-		return layout.transformX;
-	}
-
+    public function set transformX(value:Number):void
+    {
+        layout.transformX = value;
+        invalidate();
+    }
+    /**
+     * @private
+     */
+    public function get transformX():Number
+    {
+        return layout.transformX;
+    }
+
     /**
      * @private
      * the y value of the point around which any rotation and scale is performed in both the layout and computed matrix.
      */
-	public function set transformY(value:Number):void
-	{
-		layout.transformY = value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get transformY():Number
-	{
-		return layout.transformY;
-	}
-
+    public function set transformY(value:Number):void
+    {
+        layout.transformY = value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get transformY():Number
+    {
+        return layout.transformY;
+    }
+
     /**
      * @private
      * the z value of the point around which any rotation and scale is performed in both the layout and computed matrix.
      */
-	public function set transformZ(value:Number):void
-	{
-		layout.transformZ = value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get transformZ():Number
-	{
-		return layout.transformZ;
-	}
+    public function set transformZ(value:Number):void
+    {
+        layout.transformZ = value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get transformZ():Number
+    {
+        return layout.transformZ;
+    }

 //------------------------------------------------------------------------------
-
-
+
+
     /**
      * layout transform convenience property.  Represents the rotation around the X axis of the layout matrix used in layout and in
      * the computed transform.
@@ -325,20 +326,20 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function set layoutRotationX(value:Number):void
-	{
-		layout.rotationX= value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutRotationX():Number
-	{
-		return layout.rotationX;
-	}
-
+    public function set layoutRotationX(value:Number):void
+    {
+        layout.rotationX= value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutRotationX():Number
+    {
+        return layout.rotationX;
+    }
+
     /**
      * layout transform convenience property.  Represents the rotation around the Y axis of the layout matrix used in layout and in
      * the computed transform.
@@ -348,20 +349,20 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function set layoutRotationY(value:Number):void
-	{
-		layout.rotationY= value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutRotationY():Number
-	{
-		return layout.rotationY;
-	}
-
+    public function set layoutRotationY(value:Number):void
+    {
+        layout.rotationY= value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutRotationY():Number
+    {
+        return layout.rotationY;
+    }
+
     /**
      * layout transform convenience property.  Represents the rotation around the Z axis of the layout matrix used in layout and in
      * the computed transform.
@@ -371,23 +372,23 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function set layoutRotationZ(value:Number):void
-	{
-		layout.rotationZ= value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutRotationZ():Number
-	{
-		return layout.rotationZ;
-	}
-
-	//------------------------------------------------------------------------------
-
-
+    public function set layoutRotationZ(value:Number):void
+    {
+        layout.rotationZ= value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutRotationZ():Number
+    {
+        return layout.rotationZ;
+    }
+
+    //------------------------------------------------------------------------------
+
+
     /**
      * layout transform convenience property.  Represents the scale along the X axis of the layout matrix used in layout and in
      * the computed transform.
@@ -397,20 +398,20 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function set layoutScaleX(value:Number):void
-	{
-		layout.scaleX = value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutScaleX():Number
-	{
-		return layout.scaleX;
-	}
-
+    public function set layoutScaleX(value:Number):void
+    {
+        layout.scaleX = value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutScaleX():Number
+    {
+        return layout.scaleX;
+    }
+
     /**
      * layout transform convenience property.  Represents the scale along the Y axis of the layout matrix used in layout and in
      * the computed transform.
@@ -420,21 +421,21 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function set layoutScaleY(value:Number):void
-	{
-		layout.scaleY= value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutScaleY():Number
-	{
-		return layout.scaleY;
-	}
-
-
+    public function set layoutScaleY(value:Number):void
+    {
+        layout.scaleY= value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutScaleY():Number
+    {
+        return layout.scaleY;
+    }
+
+
     /**
      * layout transform convenience property.  Represents the scale along the Z axis of the layout matrix used in layout and in
      * the computed transform.
@@ -444,19 +445,19 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function set layoutScaleZ(value:Number):void
-	{
-		layout.scaleZ= value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutScaleZ():Number
-	{
-		return layout.scaleZ;
-	}
+    public function set layoutScaleZ(value:Number):void
+    {
+        layout.scaleZ= value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutScaleZ():Number
+    {
+        return layout.scaleZ;
+    }

     /**
      * @private
@@ -466,22 +467,22 @@
      * This matrix is used in the calculation of the computed transform if possible. Under certain circumstances, such as when
      * offsets are provided, the decomposed layout properties will be used instead.
      */
-	public function set layoutMatrix(value:Matrix):void
-	{
-		layout.matrix = value;
-		invalidate();
-	}
-
-
-    /**
-     * @private
-     */
-	public function get layoutMatrix():Matrix
-	{
-		return layout.matrix;
-
-	}
-
+    public function set layoutMatrix(value:Matrix):void
+    {
+        layout.matrix = value;
+        invalidate();
+    }
+
+
+    /**
+     * @private
+     */
+    public function get layoutMatrix():Matrix
+    {
+        return layout.matrix;
+
+    }
+

     /**
      * @private
@@ -492,82 +493,82 @@
      * This matrix is used in the calculation of the computed transform if possible. Under certain circumstances, such as when
      * offsets are provided, the decomposed layout properties will be used instead.
      */
-	public function set layoutMatrix3D(value:Matrix3D):void
-	{
-		layout.matrix3D = value;
-		invalidate();
-	}
-
-    /**
-     * @private
-     */
-	public function get layoutMatrix3D():Matrix3D
-	{
-		return layout.matrix3D;
-	}
-
-	/**
-	 * true if the computed transform has 3D values.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function get is3D():Boolean
-	{
-		return (layout.is3D || (postLayoutTransformOffsets != null && postLayoutTransformOffsets.is3D));
-	}
-
-	/**
-	 * true if the layout transform has 3D values.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function get layoutIs3D():Boolean
-	{
-		return layout.is3D;
-	}
-
-	//------------------------------------------------------------------------------
-
-	/** offsets to the transform convenience properties that are applied when a component is rendered. If this
-	 * property is set, its values will be added to the layout transform properties to determine the true matrix used to render
-	 * the component
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set postLayoutTransformOffsets(value:TransformOffsets):void
-	{
-		if(_postLayoutTransformOffsets != null)
-		{
-			_postLayoutTransformOffsets.removeEventListener(Event.CHANGE,postLayoutTransformOffsetsChangedHandler);
-			_postLayoutTransformOffsets.owner = null;
-		}
-		_postLayoutTransformOffsets = value;
-		if(_postLayoutTransformOffsets != null)
-		{
-			_postLayoutTransformOffsets.addEventListener(Event.CHANGE,postLayoutTransformOffsetsChangedHandler);
-			_postLayoutTransformOffsets.owner = this;
-		}
-		invalidate();
-	}
-
-	public function get postLayoutTransformOffsets():TransformOffsets
-	{
-		return _postLayoutTransformOffsets;
-	}
-
-	private function postLayoutTransformOffsetsChangedHandler(e:Event):void
-	{
-		invalidate();
-	}
+    public function set layoutMatrix3D(value:Matrix3D):void
+    {
+        layout.matrix3D = value;
+        invalidate();
+    }
+
+    /**
+     * @private
+     */
+    public function get layoutMatrix3D():Matrix3D
+    {
+        return layout.matrix3D;
+    }
+
+    /**
+     * true if the computed transform has 3D values.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get is3D():Boolean
+    {
+        return (layout.is3D || (postLayoutTransformOffsets != null && postLayoutTransformOffsets.is3D));
+    }
+
+    /**
+     * true if the layout transform has 3D values.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get layoutIs3D():Boolean
+    {
+        return layout.is3D;
+    }
+
+    //------------------------------------------------------------------------------
+
+    /** offsets to the transform convenience properties that are applied when a component is rendered. If this
+     * property is set, its values will be added to the layout transform properties to determine the true matrix used to render
+     * the component
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set postLayoutTransformOffsets(value:TransformOffsets):void
+    {
+        if(_postLayoutTransformOffsets != null)
+        {
+            _postLayoutTransformOffsets.removeEventListener(Event.CHANGE,postLayoutTransformOffsetsChangedHandler);
+            _postLayoutTransformOffsets.owner = null;
+        }
+        _postLayoutTransformOffsets = value;
+        if(_postLayoutTransformOffsets != null)
+        {
+            _postLayoutTransformOffsets.addEventListener(Event.CHANGE,postLayoutTransformOffsetsChangedHandler);
+            _postLayoutTransformOffsets.owner = this;
+        }
+        invalidate();
+    }
+
+    public function get postLayoutTransformOffsets():TransformOffsets
+    {
+        return _postLayoutTransformOffsets;
+    }
+
+    private function postLayoutTransformOffsetsChangedHandler(e:Event):void
+    {
+        invalidate();
+    }

     //----------------------------------
     //  stretchX
@@ -623,48 +624,48 @@
         invalidate();
     }

-	//------------------------------------------------------------------------------
-
-	/**
-	 * @private
-	 * invalidates our various cached values.  Any change to the AdvancedLayoutFeatures object that affects
-	 * the various transforms should call this function.
+    //------------------------------------------------------------------------------
+
+    /**
+     * @private
+     * invalidates our various cached values.  Any change to the AdvancedLayoutFeatures object that affects
+     * the various transforms should call this function.
      * @param reason - the code indicating what changes to cause the invalidation.
      * @param affects3D - a flag indicating whether the change affects the 2D/3D nature of the various transforms.
      * @param dispatchChangeEvent - if true, the AdvancedLayoutFeatures will dispatch a change indicating that its underlying transforms
      * have been modified.
-  	 */
-	private function invalidate():void
-	{
-		_flags &= ~COMPUTED_MATRIX_VALID;
-		_flags &= ~COMPUTED_MATRIX3D_VALID;
-	}
-
-
-	/**
-	 * the computed matrix, calculated by combining the layout matrix and  and any offsets provided..
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function get computedMatrix():Matrix
-	{
-		if(_flags & COMPUTED_MATRIX_VALID)
-			return _computedMatrix;
-
-		if(!postLayoutTransformOffsets && stretchX == 1 && stretchY == 1)
-		{
-			return layout.matrix;
-		}
-
-		var m:Matrix = _computedMatrix;
-		if(m == null)
-			m = _computedMatrix = new Matrix();
-		else
-			m.identity();
-
+     */
+    private function invalidate():void
+    {
+        _flags &= ~COMPUTED_MATRIX_VALID;
+        _flags &= ~COMPUTED_MATRIX3D_VALID;
+    }
+
+
+    /**
+     * the computed matrix, calculated by combining the layout matrix and  and any offsets provided..
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get computedMatrix():Matrix
+    {
+        if(_flags & COMPUTED_MATRIX_VALID)
+            return _computedMatrix;
+
+        if(!postLayoutTransformOffsets && stretchX == 1 && stretchY == 1)
+        {
+            return layout.matrix;
+        }
+
+        var m:Matrix = _computedMatrix;
+        if(m == null)
+            m = _computedMatrix = new Matrix();
+        else
+            m.identity();
+
         var tx:Number = layout.transformX;
         var ty:Number = layout.transformY;
         var sx:Number = layout.scaleX;
@@ -686,35 +687,35 @@
             m.scale(stretchX, stretchY);
         build2DMatrix(m, tx, ty, sx, sy, rz, x, y);

-		_flags |= COMPUTED_MATRIX_VALID;
-		return m;
-	}
-
-	/**
-	 * the computed 3D matrix, calculated by combining the 3D layout matrix and  and any offsets provided..
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function get computedMatrix3D():Matrix3D
-	{
-		if(_flags & COMPUTED_MATRIX3D_VALID)
-			return _computedMatrix3D;
-
-
-		if(!postLayoutTransformOffsets && stretchX == 1 && stretchY == 1)
-		{
-			return layout.matrix3D;
-		}
-
-		var m:Matrix3D = _computedMatrix3D;
-		if(m == null)
-			m = _computedMatrix3D = new Matrix3D();
-		else
-			m.identity();
-
+        _flags |= COMPUTED_MATRIX_VALID;
+        return m;
+    }
+
+    /**
+     * the computed 3D matrix, calculated by combining the 3D layout matrix and  and any offsets provided..
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get computedMatrix3D():Matrix3D
+    {
+        if(_flags & COMPUTED_MATRIX3D_VALID)
+            return _computedMatrix3D;
+
+
+        if(!postLayoutTransformOffsets && stretchX == 1 && stretchY == 1)
+        {
+            return layout.matrix3D;
+        }
+
+        var m:Matrix3D = _computedMatrix3D;
+        if(m == null)
+            m = _computedMatrix3D = new Matrix3D();
+        else
+            m.identity();
+
         var tx:Number = layout.transformX;
         var ty:Number = layout.transformY;
         var tz:Number = layout.transformZ;
@@ -740,71 +741,71 @@
             y += postLayoutTransformOffsets.y;
             z += postLayoutTransformOffsets.z;
         }
-
-		build3DMatrix(m, tx, ty, tz, sx, sy, sz, rx, ry, rz, x, y, z);
-		// Always prepend last
+
+        build3DMatrix(m, tx, ty, tz, sx, sy, sz, rx, ry, rz, x, y, z);
+        // Always prepend last
         if (stretchX != 1 || stretchY != 1)
             m.prependScale(stretchX, stretchY, 1);

-		_flags |= COMPUTED_MATRIX3D_VALID;
-		return m;
-	}
-
-
-	/**
-	 * @private
-	 * convenience function for building a 2D matrix from the convenience properties
-	 */
-	public static function build2DMatrix(m:Matrix,
-									tx:Number,ty:Number,
-									sx:Number,sy:Number,
-									rz:Number,
-									x:Number,y:Number):void
-	{
-		m.translate(-tx,-ty);
-		m.scale(sx,sy);
-		m.rotate(rz* RADIANS_PER_DEGREES);
-		m.translate(x+tx,y+ty);
-	}
-
-
-	/**
-	 * @private
-	 * convenience function for building a 3D matrix from the convenience properties
-	 */
-	public static function build3DMatrix(m:Matrix3D,
-										tx:Number,ty:Number,tz:Number,
-										sx:Number,sy:Number,sz:Number,
-										rx:Number,ry:Number,rz:Number,
-										x:Number,y:Number,z:Number):void
-	{
-		reVR.x = rx * RADIANS_PER_DEGREES;
-		reVR.y = ry * RADIANS_PER_DEGREES;
-		reVR.z = rz * RADIANS_PER_DEGREES;
-		m.recompose(reV);
-		if(sx == 0)
-			sx = ZERO_REPLACEMENT_IN_3D;
-		if(sy == 0)
-			sy = ZERO_REPLACEMENT_IN_3D;
-		if(sz == 0)
-			sz = ZERO_REPLACEMENT_IN_3D;
-		m.prependScale(sx,sy,sz);
-		m.prependTranslation(-tx,-ty,-tz);
-		m.appendTranslation(tx+x,ty+y,tz+z);
-	}
-
-
-	/**
-	 * A utility method to update the rotation and scale of the transform
-	 * while keeping a particular point, specified in the component's
-	 * own coordinate space, fixed in the parent's coordinate space.
-	 * This function will assign the rotation and scale values provided,
-	 * then update the x/y/z properties as necessary to keep tx/ty/tz fixed.
-	 * @param rx,ry,rz the new values for the rotation of the transform
-	 * @param sx,sy,sz the new values for the scale of the transform
-	 * @param tx,ty,tz the point, in the component's own coordinates,
-	 * to keep fixed relative to its parent.
-	 */
+        _flags |= COMPUTED_MATRIX3D_VALID;
+        return m;
+    }
+
+
+    /**
+     * @private
+     * convenience function for building a 2D matrix from the convenience properties
+     */
+    public static function build2DMatrix(m:Matrix,
+                                    tx:Number,ty:Number,
+                                    sx:Number,sy:Number,
+                                    rz:Number,
+                                    x:Number,y:Number):void
+    {
+        m.translate(-tx,-ty);
+        m.scale(sx,sy);
+        m.rotate(rz* RADIANS_PER_DEGREES);
+        m.translate(x+tx,y+ty);
+    }
+
+
+    /**
+     * @private
+     * convenience function for building a 3D matrix from the convenience properties
+     */
+    public static function build3DMatrix(m:Matrix3D,
+                                        tx:Number,ty:Number,tz:Number,
+                                        sx:Number,sy:Number,sz:Number,
+                                        rx:Number,ry:Number,rz:Number,
+                                        x:Number,y:Number,z:Number):void
+    {
+        reVR.x = rx * RADIANS_PER_DEGREES;
+        reVR.y = ry * RADIANS_PER_DEGREES;
+        reVR.z = rz * RADIANS_PER_DEGREES;
+        m.recompose(reV);
+        if(sx == 0)
+            sx = ZERO_REPLACEMENT_IN_3D;
+        if(sy == 0)
+            sy = ZERO_REPLACEMENT_IN_3D;
+        if(sz == 0)
+            sz = ZERO_REPLACEMENT_IN_3D;
+        m.prependScale(sx,sy,sz);
+        m.prependTranslation(-tx,-ty,-tz);
+        m.appendTranslation(tx+x,ty+y,tz+z);
+    }
+
+
+    /**
+     * A utility method to update the rotation and scale of the transform
+     * while keeping a particular point, specified in the component's
+     * own coordinate space, fixed in the parent's coordinate space.
+     * This function will assign the rotation and scale values provided,
+     * then update the x/y/z properties as necessary to keep tx/ty/tz fixed.
+     * @param rx,ry,rz the new values for the rotation of the transform
+     * @param sx,sy,sz the new values for the scale of the transform
+     * @param tx,ty,tz the point, in the component's own coordinates,
+     * to keep fixed relative to its parent.
+     */
     public function transformPointToParent(propertyIs3D:Boolean,
         transformCenter:Vector3D, currentPosition:Vector3D,
         currentPostLayoutPosition:Vector3D):void
@@ -959,8 +960,8 @@
         if(needOffsets)
             _postLayoutTransformOffsets = new TransformOffsets();

-		// now if they gave us a non-trivial transform center, and didn't tell us where they want it,
-		// we need to calculate where it is so that we can make sure we keep it there.
+        // now if they gave us a non-trivial transform center, and didn't tell us where they want it,
+        // we need to calculate where it is so that we can make sure we keep it there.
         if (transformCenter != null &&
             (transformCenterPosition == null || postLayoutTransformCenterPosition == null))
         {
@@ -980,7 +981,7 @@
         var targetPosition:Vector3D = (transformCenterPosition == null)? staticTranslation:transformCenterPosition;
         var postLayoutTargetPosition:Vector3D = (postLayoutTransformCenterPosition == null)? staticOffsetTranslation:postLayoutTransformCenterPosition;

-		// now update our transform values.
+        // now update our transform values.
         if (rotation != null)
         {
             if (!isNaN(rotation.x))
@@ -1012,11 +1013,11 @@
             _postLayoutTransformOffsets.scaleY = postLayoutScale.y;
             _postLayoutTransformOffsets.scaleZ = postLayoutScale.z;
         }
-
-		// if they didn't pass us a transform center,
-		// then we assume it's the origin. In that case, it's trivially easy
-		// to make sure the origin is at a particular point...we simply set
-		// the transformCenterPosition portion of our transforms to that point.
+
+        // if they didn't pass us a transform center,
+        // then we assume it's the origin. In that case, it's trivially easy
+        // to make sure the origin is at a particular point...we simply set
+        // the transformCenterPosition portion of our transforms to that point.
         if (transformCenter == null)
         {
             if (transformCenterPosition != null)


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

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


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

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


Checking the value of a Loader's contentLoaderInfo.childAllowsParent
itself issues a security warning. This is the value to check to SEE if
a security exception would be thrown. So things worked, but now that I'm
testing security locally I cannot tolerate 10,000 warnings about security
filling my trace log, obliterating any other debug logging.

Hack it: just remember if we're loading an image and check that value later.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@275 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/MediaContainer.as
+++ src/as/com/threerings/flash/MediaContainer.as
@@ -171,6 +171,7 @@
     protected function willShowNewMedia () :void
     {
         _initialized = false;
+        _isImage = false;
     }

     /**
@@ -382,11 +383,12 @@
         // if we're holding a bitmap, do something smarter than the
         // flash built-in and actually check for *GASP* transparent pixels!
         try {
-            if (shapeFlag && _media is Loader &&
-                    // the childAllowsParent check here causes a security
-                    // violation if it doesn't. WHAT THE FLYING FUCK.
-                    Loader(_media).contentLoaderInfo.childAllowsParent &&
-                    (Loader(_media).content is Bitmap)) {
+            // We should be able to test if the media is a Loader (we can),
+            // then test if childAllowsParent, but even CHECKING that value causes a security
+            // exception. WTF?!? That's supposed to be the value to check to AVOID getting a
+            // security exception. So instead, we track whether or not we've
+            // loaded an image and use that value.
+            if (shapeFlag && _isImage) {
                 var b :Bitmap = Bitmap(Loader(_media).content);
                 var p :Point = b.globalToLocal(new Point(x, y));
                 // check that it's within the content bounds, and then check the bitmap directly
@@ -426,6 +428,7 @@
     protected function getContext (url :String) :LoaderContext
     {
         if (isImage(url)) {
+            _isImage = true;
             // load images into our domain so that we can view their pixels
             return new LoaderContext(true,
                 new ApplicationDomain(ApplicationDomain.currentDomain),
@@ -657,5 +660,8 @@

     /** If we're using a Loader, true once the INIT event has been dispatched. */
     protected var _initialized :Boolean;
+
+    /** Are we displaying an image? */
+    protected var _isImage :Boolean;
 }
 }


DigestMD5 updated. Works with ejabberd.

DigestMD5 updated. Works with ejabberd.

--- src/org/igniterealtime/xiff/auth/DigestMD5.as
+++ src/org/igniterealtime/xiff/auth/DigestMD5.as
@@ -135,7 +135,7 @@
 				challengeMap[ keyValue[ 0 ] ] = keyValue[ 1 ];
 			}

-			var resp:XML = response;
+			var resp:XML = new XML( response );
 			resp.setNamespace( DigestMD5.NS );

 			if( !challengeMap.rspauth )


add robustness in _resize() related to https://github.com/bemtv/flashls/commit/4635e3b1a667d34923b6377037ac8a8d2a686dc5

--- src/org/mangui/chromeless/ChromelessPlayer.as
+++ src/org/mangui/chromeless/ChromelessPlayer.as
@@ -441,7 +441,7 @@
                 _video.height = rect.height;
                 _video.x = rect.x;
                 _video.y = rect.y;
-            } else if (_stageVideo) {
+            } else if (_stageVideo && rect.width > 0) {
                 _stageVideo.viewPort = rect;
             }
         }


Remove frame count when only one frame. Fixes #5.

The frame count suffix is only added when there's more than one frame in the swf.

--- src/swf2png.as
+++ src/swf2png.as
@@ -140,7 +140,11 @@
 			var bitmapData:BitmapData = new BitmapData(outputWidth, outputHeight, true, 0x0);
 			bitmapData.draw(loader.content, offsetMatrix);
 			var bytearr:ByteArray = PNGEncoder.encode(bitmapData);
-			var outfileName:String = outputDirPath + File.separator + prefix + separator + counter + ".png"
+			var increment:String = '';
+			if(totalFrames > 1) {
+				increment = separator + counter;
+			}
+			var outfileName:String = outputDirPath + File.separator + prefix + increment + ".png"
 			var file:File = new File(outfileName);

 			log("Writing: " + outfileName);


Fixed Parameterized Testing using TestNG style to keep order of original array elements by using decimal percision

--- FlexUnit4/src/org/flexunit/runners/Parameterized.as
+++ FlexUnit4/src/org/flexunit/runners/Parameterized.as
@@ -47,7 +47,7 @@
 	import org.flexunit.runner.notification.StoppedByUserException;
 	import org.flexunit.runners.model.FrameworkMethod;
 	import org.flexunit.runners.model.IRunnerBuilder;
-	import org.flexunit.token.AsyncTestToken;
+	import org.flexunit.token.AsyncTestToken;

 	public class Parameterized extends ParentRunner implements IExternalDependencyRunner {
 		private var runners:Array;
@@ -195,7 +195,7 @@
 import org.flexunit.runners.BlockFlexUnit4ClassRunner;
 import org.flexunit.runners.model.FrameworkMethod;
 import org.flexunit.runners.model.ParameterizedMethod;
-import org.flexunit.token.AsyncTestToken;
+import org.flexunit.token.AsyncTestToken;

 class TestClassRunnerForParameters extends BlockFlexUnit4ClassRunner {
 	private var klassInfo:Klass;
@@ -232,7 +232,8 @@
 				}

 				for ( var j:int=0; j<results.length; j++ ) {
-					paramMethod = new ParameterizedMethod( fwMethod.method, results[ j ] );
+					var method:Method = applyOrderToParameterizedTestMethod( fwMethod.method, j, results.length );
+					paramMethod = new ParameterizedMethod( method, results[ j ] );
 					finalArray.push( paramMethod );
 				}
 			} else {
@@ -241,6 +242,29 @@
 		}

 		return finalArray;
+	}
+
+	protected function applyOrderToParameterizedTestMethod( method : Method, dataSetIndex : int, totalMethods : int ) : Method
+	{
+		var xmlCopy:XML = method.methodXML.copy();
+
+		var a:MetaDataAnnotation = method.getMetaData( AnnotationConstants.TEST );
+		var arg:MetaDataArgument;
+
+		if ( a )
+			arg = a.getArgument( AnnotationArgumentConstants.ORDER );
+		else	// CJP: If the method doesn't contain a "TEST" metadata tag, we probably shouldn't be in  here anyway... throw Error?
+			return method;
+
+		if ( !arg )
+			xmlCopy.metadata.(@name=="Test").appendChild( <arg key="order" value="0"/> );
+
+		var orderValueDec : Number = (dataSetIndex + 1) / ( Math.pow( 10, totalMethods ) );
+		var newOrderValue : Number = xmlCopy.metadata.(@name=="Test").arg.( @key == "order" ).attribute( "value" ) + orderValueDec;
+
+		xmlCopy.metadata.(@name=="Test").arg.( @key == "order" ).( @value = newOrderValue );
+		var newMethod:Method = new Method( xmlCopy );
+		return newMethod;
 	}

 	override protected function computeTestMethods():Array {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12074
Author:   gruehle@adobe.com
Date:     2009-11-21T01:02:03.186839Z

Log Message:
-----------
Change baseColor to chromeColor.

QE notes: Tests need to be updated.
Doc notes: ASDoc has been updated. Other docs need updating.
Bugs: SDK-24298
Reviewer: Ely
Tests run: checkintests, qe cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
112 paths were modified

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

--- frameworks/projects/mx/src/mx/controls/TextInput.as
+++ frameworks/projects/mx/src/mx/controls/TextInput.as
@@ -213,7 +213,7 @@

 [Exclude(name="selectionActivePosition", kind="method")]
 [Exclude(name="selectionAnchorPosition", kind="method")]
-[Exclude(name="baseColor", kind="style")]
+[Exclude(name="chromeColor", kind="style")]

 /**
  *  The TextInput control is a single-line text field


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

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

 package mx.collections
 {


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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////
 package spark.skins.mobile
 {
 import flash.display.GradientType;


Transferred from the Adobe Open Source Subversion Repository

Revision: 11170
Author:   rfrishbe@adobe.com
Date:     2009-10-26T23:15:30.879444Z

Log Message:
-----------
ItemRenderer changes.  Fixing some bugs with the autoDrawBackground flag.  Also making some PARB changes:

1.  IItemRenderer.index -> itemIndex (affects DefaultItemRenderer, ItemRenderer, and ButtonBarButton).
2.  GroupBase.renderBackgroundFill() (protected method) -> drawBackground() (mx_internal method)
3.  ItemRenderer.handleBackgroundFill -> autoDrawBackground
4.  Removed contentBackgroundColor from ItemRenderer

Also, DefaultItemRenderer is now no longer an MXML file, but it is an AS-only class that extends UIComponent.

QE notes: -
Doc notes: Yes - Can you please look at the ASDocs for DefaultItemRenderer.as and the autoDrawBackground flag on ItemRenderer
Bugs: -
Reviewer: Deepa
Tests run: checkintests, Mustella List, DataGroup, DropDownList
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.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/spark/src/spark/components/Group.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.mxml" copyfrom-rev="11100" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/IItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultComplexItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.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/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -721,13 +721,14 @@
     }

     /**
+     *  @private
      *  Renders a background for the container, if necessary.  It is used to fill in
      *  a transparent background fill as necessary to support the mouseOpaque flag.  It
      *  is also used in ItemRenderers when handleBackgroundColor is set to true.
      *  We assume for now that we are the first layer to be rendered into the graphics
      *  context.
      */
-    protected function renderBackgroundFill():void
+    mx_internal function drawBackground():void
     {
         if (!_mouseEnabledWhereTransparent || !_hasMouseListeners)
             return;


Oop, clear complex entries when we clear.

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

--- src/as/com/threerings/util/HashMap.as
+++ src/as/com/threerings/util/HashMap.as
@@ -17,6 +17,7 @@
     public function clear () :void
     {
         _simpleData = null;
+        _entries = null;
         _size = 0;
     }


Put Upload New button at top of media picker list

--- flexEditor/src/org/arisgames/editor/components/ItemEditorMediaPickerView.as
+++ flexEditor/src/org/arisgames/editor/components/ItemEditorMediaPickerView.as
@@ -172,6 +172,15 @@
 		var numIconDefaults:Number = 0;
 		for (var k:Number = 0; k <= 1; k++) //Iterates over list twice; once for uploaded items, again for default
 		{
+			//Add "Upload new" in between uploaded and default pictures
+			if(k==0 && (!this.isIconPicker && !this.isNPC)){
+				xmlData.node.(@label == AppConstants.MEDIATYPE_IMAGE).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '" icon="'+ AppConstants.MEDIATREEICON_UPLOAD +'"/>');
+				xmlData.node.(@label == AppConstants.MEDIATYPE_AUDIO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '" icon="'+ AppConstants.MEDIATREEICON_UPLOAD +'"/>');
+				xmlData.node.(@label == AppConstants.MEDIATYPE_VIDEO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '" icon="'+ AppConstants.MEDIATREEICON_UPLOAD +'"/>');
+			}
+			else if(k == 0){
+				xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '" icon="'+ AppConstants.MEDIATREEICON_UPLOAD +'"/>');
+			}
 			for (var j:Number = 0; j < media.length; j++)
 			{
 				var o:Object = media[j];
@@ -237,16 +246,6 @@
 					}
 				}
 			}
-
-			//Add "Upload new" in between uploaded and default pictures
-			if(k==0 && (!this.isIconPicker && !this.isNPC)){
-				xmlData.node.(@label == AppConstants.MEDIATYPE_IMAGE).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '" icon="'+ AppConstants.MEDIATREEICON_UPLOAD +'"/>');
-				xmlData.node.(@label == AppConstants.MEDIATYPE_AUDIO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '" icon="'+ AppConstants.MEDIATREEICON_UPLOAD +'"/>');
-				xmlData.node.(@label == AppConstants.MEDIATYPE_VIDEO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '" icon="'+ AppConstants.MEDIATREEICON_UPLOAD +'"/>');
-			}
-			else if(k == 0){
-				xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '" icon="'+ AppConstants.MEDIATREEICON_UPLOAD +'"/>');
-			}
 		}
         trace("ItemEditorMediaPickerView: handleLoadingOfMediaIntoXML: Just finished loading Media Objects into XML.  Here's what the new XML looks like:");
         this.printXMLData();


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

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

 package mx.charts.chartClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18734
Author:   rfrishbe@adobe.com
Date:     2010-11-19T19:15:54.182511Z

Log Message:
-----------
Adding estimatedSize to mobile skins for containers.  This is needed so estimatedSize calculations get pushed down to children.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as
@@ -115,6 +115,15 @@
             invalidateDisplayList();
         }
     }
+
+	/**
+	 *  @private
+	 */
+	override public function validateEstimatedSizesOfChildren():void
+	{
+		actionBar.setEstimatedSize(estimatedWidth, NaN);
+		contentGroup.setEstimatedSize(estimatedWidth, NaN);
+	}

     /**
      *  @private


Transferred from the Adobe Open Source Subversion Repository

Revision: 18761
Author:   smgilson@adobe.com
Date:     2010-11-20T15:31:45.004051Z

Log Message:
-----------
Fix invalid HTML in ASDoc comment

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

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
@@ -258,7 +258,7 @@
      *  the number of selected cells.

      *
      *
If the selectionMode is GridSelectionMode.NONE,
-     *  contains 0.

+     *  contains 0.

      *
      *  @default 0
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 12394
Author:   gosmith@adobe.com
Date:     2009-12-02T23:30:32.897486Z

Log Message:
-----------
Renamed spark.accessibility.ButtonAccImpl to ButtonBaseAccImpl because it is associated via [AccessibilityImplementation] metadata with the ButtonBase class, not with the Button class.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ToggleButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonAccImpl.as" copyfrom-rev="12392" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonAccImpl.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
@@ -166,7 +166,7 @@
 //  Other metadata
 //--------------------------------------

-[AccessibilityClass(implementation="spark.accessibility.ButtonAccImpl")]
+[AccessibilityClass(implementation="spark.accessibility.ButtonBaseAccImpl")]

 [DefaultTriggerEvent("click")]


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

--- frameworks/projects/rpc/src/mx/messaging/messages/AsyncMessageExt.as
+++ frameworks/projects/rpc/src/mx/messaging/messages/AsyncMessageExt.as
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.messaging.messages
+{
+
+import flash.utils.IDataOutput;
+import flash.utils.IExternalizable;
+
+[RemoteClass(alias="DSA")]
+
+/**
+ * A special serialization wrapper for AsyncMessages. This wrapper is used to
+ * enable the externalizable form of an AsyncMessage for serialization. The
+ * wrapper must be applied just before the message is serialized as it does not
+ * proxy any information to the wrapped message.
+ *
+ * @private
+ */
+public class AsyncMessageExt extends AsyncMessage implements IExternalizable
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public function AsyncMessageExt(message:AsyncMessage=null)
+    {
+        super();
+        _message = message;
+    }
+
+    override public function writeExternal(output:IDataOutput):void
+    {
+        if (_message != null)
+            _message.writeExternal(output);
+        else
+            super.writeExternal(output);
+    }
+
+    /**
+     *  The unique id for the message.
+     */
+    override public function get messageId():String
+    {
+        /* If we are wrapping another message, use its messageId */
+        if (_message != null)
+            return _message.messageId;
+
+        return super.messageId;
+    }
+
+    private var _message:AsyncMessage;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 7376
Author:   hmuller@adobe.com
Date:     2009-05-28T18:25:57.415529Z

Log Message:
-----------
Bug fixes for DropDownList, virtualized TileLayout.  Refactoring of the "cooperative layout"
code in TrackBase.

QE Notes:
Doc Notes:
Bugs: sdk-21459, sdk-21250, sdk-20864
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerScrubBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableContainer.as
@@ -1021,6 +1021,7 @@
             }

             contentGroup.mxmlContent = null;
+            contentGroup.layout = null;
         }
     }


added alignRight option

added alignRight option

--- WeaveUI/src/weave/ui/SubMenu.as
+++ WeaveUI/src/weave/ui/SubMenu.as
@@ -157,10 +157,11 @@
 		}

 		public var matchParentWidth:Boolean = false;
+		public var alignRight:Boolean = false;

 		public function showSubMenu():void
 		{
-			if (!dataProvider)
+			if (!dataProvider || !_uiParent.enabled)
 				return;

 			var stage:Stage = WeaveAPI.StageUtils.stage;
@@ -171,23 +172,22 @@

 			var parentGlobal:Point = _uiParent.localToGlobal(new Point(0, 0));
 			var parentHeight:Number = _uiParent.height;
+			var parentWidth:Number = _uiParent.width;

 			setStyle("openDuration", 0);
+			width = matchParentWidth ? parentWidth : NaN;
 			popUpMenu(this, _uiParent, rootItem || dataProvider);

 			// first show menu below parent so the width and height get calculated
 			show(parentGlobal.x, parentGlobal.y + parentHeight);

+			if (alignRight)
+				x = x + parentWidth - width;
+
 			var global:Point = this.parent.localToGlobal(new Point(x, y));
-			if (matchParentWidth)
-			{
-				width = this._uiParent.width;
-			}
-			else
-			{
-				// make sure we are on stage in x coordinates
-				global.x = StandardLib.constrain(global.x, xMin, xMax - measuredWidth);
-			}
+			// make sure we are on stage in x coordinates
+			global.x = StandardLib.constrain(global.x, xMin, xMax - measuredWidth);
+
 			// if we extend below the stage and there is more room above, move above the parent
 			var moreRoomAbove:Boolean = parentGlobal.y - yMin > yMax - (parentGlobal.y + parentHeight);
 			var extendsBelowStage:Boolean = global.y + measuredHeight > yMax;