Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -28,6 +28,7 @@
 import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
 import mx.managers.FocusManager;
+import mx.managers.IActiveWindowManager;
 import mx.managers.ILayoutManager;
 import mx.managers.ISystemManager;
 import mx.styles.CSSStyleDeclaration;
@@ -792,7 +793,12 @@
         if (sm.isTopLevel())
         {
             focusManager = new FocusManager(this);
-            sm.activate(this);
+			var awm:IActiveWindowManager =
+				IActiveWindowManager(sm.getImplementation("mx.managers::IActiveWindowManager"));
+			if (awm)
+           		awm.activate(this);
+            else
+                focusManager.activate();
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20642
Author:   smgilson@adobe.com
Date:     2011-03-07T17:53:01.854031Z

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

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/TraceSelectionRanges.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormHeading.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>

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

--- frameworks/projects/spark/src/spark/components/FormHeading.as
+++ frameworks/projects/spark/src/spark/components/FormHeading.as
@@ -150,6 +150,11 @@

     /**
      *   A reference to the visual element that displays this FormItem's label.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     [Bindable]
     [SkinPart(required="false")]
@@ -174,6 +179,11 @@
      *  Text to display in the FormHeading component.
      *
      *  @default ""
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get label():String
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18323
Author:   smgilson@adobe.com
Date:     2010-10-26T17:50:12.524532Z

Log Message:
-----------
Fix invalid HTML in ASDoc comments for the [DiscouragedForProfile] metadata tag

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TitleWindow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/BorderContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormHeading.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TabBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Form.as</path>

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

--- frameworks/projects/spark/src/spark/components/FormHeading.as
+++ frameworks/projects/spark/src/spark/components/FormHeading.as
@@ -51,7 +51,7 @@
  * Because this component does not define a skin for the mobile theme, Adobe
  * recommends that you not use it in a mobile application. Alternatively, you
  * can define your own mobile skin for the component. For more information,
- * see Spark Skinning.
+ * see Spark Skinning.
  */
 [DiscouragedForProfile("mobileDevice")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 7537
Author:   rfrishbe@adobe.com
Date:     2009-06-03T20:25:36.987268Z

Log Message:
-----------
VideoPlayer fixes, including focus fixes and some other fixes.

For Focus:

SkinnableComponent:
- Now check the drawFocusAnyway flag before checking for focusManager.getFocus() != this because in the case of the video player volume bar, we don’t actually have a focusManager

TrackBase:
- Override of focusIn/OutHandler wasn’t calling super.focusIn/OutHandler().

Slider:
- Now instead of overriding setFocus() and calling stage.focus = thumb, we just override drawFocus() and tell the thumb to drawFocus().  This means we keep the focus ourselves and handle the keyDown events on ourself rather than on the thumb.

FocusSkin:
- Change the exit-early logic so that we don’t exit if we have no focusManager...we only exit if we don’t have a focusObject (and we sometimes rely on the focusManager for this focusObject).  FocusObject actually gets slammed in via SkinnableComponent, so this should be fine.

VideoPlayerVolumeBar:
- On focus in, open the drop down, validate it, and draw the focus on thumb.

VideoPlayer:
- set tabChildren = true so we can tab into the components

Skins (VideoPlayerSkin.mxml only):
- Change the layer of focused components with: focusIn="event.target.layer=1" focusOut="event.target.layer=0"

Other Changes:

TrackBase:
- Add official CHANGING event.  Work still needs to be done on dispatching it in all cases correctly.
- Remove the check for (!enabled) in the thumb_mouseDownHandler...this shouldn’t be needed thanks to Jason’s change.  We do this in Scroller as well, and I’ve got a local change for that which will come later as part of the Change/Changing ARB issue fix.

PopUpAnchor:
- Needs to take into account the fullScreenRect to get the popup to display correctly in those cases.

FlexEvent:
- Adding CHANGING event.

VideoPlayerScrubBar:
- Changed bufferedValue to an Array to handle a Range.

VideoPlayerVolumeBar/VideoPlayerVolumeBarEvent:
- “rollOverOpenDelay“: Change the “behavior property” to a style per the ARB decision.  I intentionally left it as a private static const before to make this change easier.
- Advertise a new event, mutedChange to go along with a new property muted, rather than rely on mutedButtonClick.

VideoPlayer:
- Add symbolColor metadata (this was already working...just no metadata for it).  Do I add color here?
- Add fullScreenHideControlDelay as part of ARB behavioral property decision
- Changes around volume bar and muted property and muteButtonChanged event.
- Fiex the full screen case...need to make sure to use globalToLocal() and localToGlobal() when positioning the object since fulLScreenRect is in global coordinates.  Also need to call LayoutManager.getInstance().validateNow() rather than just validateNow() because I need everythignt o be validated since not including the compoennt in a layout may change the coordinates of the parent component.
- In scrubBar_changeHandler, if scrubbing to the end of a video, don’t do it when streaming and you’ve called play() because the source is a String...there’s a bug in the FLVPlayback that doesn’t look like it’ll get fixed :-)
- Fixed a few other bugs..nothing too big

Defaults.css:
Set the behavioral properties in here

Skins:
- Set the height explicitly on the ThumbSkin..this is the exact pattern we use for Hslider/Vslider now
- Fix up the baseColor so it gets cleared in the full screen case
- Fix up the text styles so we are explicitly setting them in the fullScreen case.  They can now be styled via CSS in the non-fullScreen case and the color style should work.

QE Notes: -
Doc Notes: -
Bugs: SDK-21505, SDK-21352, SDK-21504, SDK-21503, SDK-21486, SDK-21485
Reviewer: Alex, Glenn
tests: checkintests, mustella tests for Scroller, ScrollBar, Slider

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VideoPlayerScrubBarSkin.mxml</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/skins/default/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerVolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VideoPlayerSkin.mxml</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/skins/default/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/VideoPlayerVolumeBarEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/PopUpAnchor.as
+++ frameworks/projects/spark/src/spark/components/PopUpAnchor.as
@@ -11,8 +11,9 @@

 package spark.components
 {
-
+
 import flash.display.DisplayObject;
+import flash.display.StageDisplayState;
 import flash.events.Event;
 import flash.geom.Matrix;
 import flash.geom.Point;
@@ -46,527 +47,535 @@
  */
 public class PopUpAnchor extends UIComponent
 {
-
-	/**
-	 *  Constructor
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
- 	 *  @playerversion AIR 1.5
- 	 *  @productversion Flex 4
- 	 */
-	public function PopUpAnchor()
-	{
-		addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
-		addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler);
-	}
-
-	private var popUpWidth:Number = 0;
-	private var popUpHeight:Number = 0;
-
-	private var popUpIsDisplayed:Boolean = false;
-	private var addedToStage:Boolean = false;
-
-	// TODO (jszeto) Update to new vector syntax
-	private static var decomposition:Vector.<Number> = new Vector.<Number>();
-	decomposition.push(0);
-	decomposition.push(0);
-	decomposition.push(0);
-	decomposition.push(0);
-	decomposition.push(0);
-
-	//--------------------------------------------------------------------------
+
+    /**
+     *  Constructor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+      *  @playerversion AIR 1.5
+      *  @productversion Flex 4
+      */
+    public function PopUpAnchor()
+    {
+        addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
+        addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler);
+    }
+
+    private var popUpWidth:Number = 0;
+    private var popUpHeight:Number = 0;
+
+    private var popUpIsDisplayed:Boolean = false;
+    private var addedToStage:Boolean = false;
+
+    // TODO (jszeto) Update to new vector syntax
+    private static var decomposition:Vector.<Number> = new Vector.<Number>();
+    decomposition.push(0);
+    decomposition.push(0);
+    decomposition.push(0);
+    decomposition.push(0);
+    decomposition.push(0);
+
+    //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------
-
-	//----------------------------------
+
+    //----------------------------------
     //  autoSizePopUpHeight
     //----------------------------------
-
-	private var _autoSizePopUpHeight:Boolean = false;
-
-	/**
-	 *  If true, the popUp's height is set to the value of the PopUpAnchor's height.
-	 *
-	 *  @default false
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function set autoSizePopUpHeight(value:Boolean):void
-	{
-		if (_autoSizePopUpHeight == value)
-			return;
-
-		_autoSizePopUpHeight = value;
-
-		invalidateDisplayList();
-	}
-
-	/**
-	 *  @private
-	 */
-	public function get autoSizePopUpHeight():Boolean
-	{
-		return _autoSizePopUpHeight;
-	}
-
-	//----------------------------------
+
+    private var _autoSizePopUpHeight:Boolean = false;
+
+    /**
+     *  If true, the popUp's height is set to the value of the PopUpAnchor's height.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function set autoSizePopUpHeight(value:Boolean):void
+    {
+        if (_autoSizePopUpHeight == value)
+            return;
+
+        _autoSizePopUpHeight = value;
+
+        invalidateDisplayList();
+    }
+
+    /**
+     *  @private
+     */
+    public function get autoSizePopUpHeight():Boolean
+    {
+        return _autoSizePopUpHeight;
+    }
+
+    //----------------------------------
     //  autoSizePopUpWidth
     //----------------------------------
-
-	private var _autoSizePopUpWidth:Boolean = false;
-
-	/**
-	 *  If true, the popUp's width is set to the value of the PopUpAnchor's width.
-	 *
-	 *  @default false
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function set autoSizePopUpWidth(value:Boolean):void
-	{
-		if (_autoSizePopUpWidth == value)
-			return;
-
-		_autoSizePopUpWidth = value;
-
-		invalidateDisplayList();
-	}
-
-	/**
-	 *  @private
-	 */
-	public function get autoSizePopUpWidth():Boolean
-	{
-		return _autoSizePopUpWidth;
-	}
-
-	//----------------------------------
+
+    private var _autoSizePopUpWidth:Boolean = false;
+
+    /**
+     *  If true, the popUp's width is set to the value of the PopUpAnchor's width.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function set autoSizePopUpWidth(value:Boolean):void
+    {
+        if (_autoSizePopUpWidth == value)
+            return;
+
+        _autoSizePopUpWidth = value;
+
+        invalidateDisplayList();
+    }
+
+    /**
+     *  @private
+     */
+    public function get autoSizePopUpWidth():Boolean
+    {
+        return _autoSizePopUpWidth;
+    }
+
+    //----------------------------------
     //  displayPopUp
     //----------------------------------
-
-	private var _displayPopUp:Boolean = false;
-
-
-	/**
-	 *  If true, adds the popUp to the PopUpManager. If false, removes it.
-	 *
-	 *  @default false
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function set displayPopUp(value:Boolean):void
-	{
-		if (_displayPopUp == value)
-			return;
-
-		_displayPopUp = value;
-		updatePopUpState();
-	}
-
-	/**
-	 *  @private
-	 */
-	public function get displayPopUp():Boolean
-	{
-		return _displayPopUp;
-	}
-
-	/*[InstanceType("mx.core.UIComponent")]
-	private var _popUpFactory:ITransientDeferredInstance;
-
-	public function set popUpFactory(value:ITransientDeferredInstance):void
-	{
-		if (_popUpFactory == value)
-			return;
-
-		_popUpFactory = value;
-
-		updatePopUpState();
-	}
-
-	public function get popUpFactory():ITransientDeferredInstance
-	{
-		return _popUpFactory;
-	}*/
-
-	//----------------------------------
+
+    private var _displayPopUp:Boolean = false;
+
+
+    /**
+     *  If true, adds the popUp to the PopUpManager. If false, removes it.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function set displayPopUp(value:Boolean):void
+    {
+        if (_displayPopUp == value)
+            return;
+
+        _displayPopUp = value;
+        updatePopUpState();
+    }
+
+    /**
+     *  @private
+     */
+    public function get displayPopUp():Boolean
+    {
+        return _displayPopUp;
+    }
+
+    /*[InstanceType("mx.core.UIComponent")]
+    private var _popUpFactory:ITransientDeferredInstance;
+
+    public function set popUpFactory(value:ITransientDeferredInstance):void
+    {
+        if (_popUpFactory == value)
+            return;
+
+        _popUpFactory = value;
+
+        updatePopUpState();
+    }
+
+    public function get popUpFactory():ITransientDeferredInstance
+    {
+        return _popUpFactory;
+    }*/
+
+    //----------------------------------
     //  popUp
     //----------------------------------
-
-	private var _popUp:UIComponent;
-
-	[Bindable ("popUpChanged")]
-
-	/**
-	 *  UIComponent to add to the PopUpManager when the PopUpAnchor is opened.
-	 *  If the popUp implements IFocusManagerContainer, the popUp will have its
+
+    private var _popUp:UIComponent;
+
+    [Bindable ("popUpChanged")]
+
+    /**
+     *  UIComponent to add to the PopUpManager when the PopUpAnchor is opened.
+     *  If the popUp implements IFocusManagerContainer, the popUp will have its
      *  own FocusManager so that, if the user uses the Tab key to navigate between
      *  controls, only the controls in the popUp are accessed.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function set popUp(value:UIComponent):void
-	{
-		if (_popUp == value)
-			return;
-
-		_popUp = value;
-
-		if (_popUp)
-			_popUp.styleName = this;
-
-		dispatchEvent(new Event("popUpChanged"));
-	}
-
-	/**
-	 *  @private
-	 */
-	public function get popUp():UIComponent
-	{
-		return _popUp
-	}
-
-	//----------------------------------
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function set popUp(value:UIComponent):void
+    {
+        if (_popUp == value)
+            return;
+
+        _popUp = value;
+
+        if (_popUp)
+            _popUp.styleName = this;
+
+        dispatchEvent(new Event("popUpChanged"));
+    }
+
+    /**
+     *  @private
+     */
+    public function get popUp():UIComponent
+    {
+        return _popUp
+    }
+
+    //----------------------------------
     //  popUpPosition
     //----------------------------------
-
-	private var _popUpPosition:String = RelativePosition.EXACT;
-
-	/**
-	 *  Position of the popUp when it is opened.
-	 *  Possible values are "left", "right", "above", "below", "center", and "exact"
-	 *
-	 *
-	 *  @default RelativePosition.EXACT
-	 *
-	 *  @see spark.core.RelativePosition
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-
-	public function set popUpPosition(value:String):void
-	{
-		if (_popUpPosition == value)
-			return;
-
-		_popUpPosition = value;
-		invalidateDisplayList();
-	}
-
-	public function get popUpPosition():String
-	{
-		return _popUpPosition;
-	}
-
-	//--------------------------------------------------------------------------
+
+    private var _popUpPosition:String = RelativePosition.EXACT;
+
+    /**
+     *  Position of the popUp when it is opened.
+     *  Possible values are "left", "right", "above", "below", "center", and "exact"
+     *
+     *
+     *  @default RelativePosition.EXACT
+     *
+     *  @see spark.core.RelativePosition
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+
+    public function set popUpPosition(value:String):void
+    {
+        if (_popUpPosition == value)
+            return;
+
+        _popUpPosition = value;
+        invalidateDisplayList();
+    }
+
+    public function get popUpPosition():String
+    {
+        return _popUpPosition;
+    }
+
+    //--------------------------------------------------------------------------
     //
     //  Overridden methods
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 */
-	override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
-	{
-		super.updateDisplayList(unscaledWidth, unscaledHeight);
-		applyPopUpTransform(unscaledWidth, unscaledHeight);
-	}
-
-	//--------------------------------------------------------------------------
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+        applyPopUpTransform(unscaledWidth, unscaledHeight);
+    }
+
+    //--------------------------------------------------------------------------
     //
     //  Public Methods
     //
     //--------------------------------------------------------------------------
-
-	/**
-	 *  Call this function to update the popUp's transform matrix. Typically,
-	 *  this function is called while performing an effect on the PopUpAnchor.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function updatePopUpTransform():void
-	{
-		applyPopUpTransform(width, height);
-	}
-
-	/**
-	 *  Called when the popUp is positioned, when it is displayed,
-	 *  or when updatePopUpTransform() is called. Override this function to
-	 *  alter the position of the popUp.
-	 *
-	 *  @return The absolute position of the popUp in the global coordinate system
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	protected function positionPopUp():Point
-	{
-		// This implementation doesn't handle rotation
-		var matrix:Matrix = $transform.concatenatedMatrix;
-		var regPoint:Point = new Point();
-
-		var popUpBounds:Rectangle = new Rectangle();
-		determinePosition(popUpPosition, popUp.width, popUp.height,
-						  matrix, regPoint, popUpBounds);
-
-		var adjustedPosition:String;
-
-		// Position the popUp in the opposite direction if it
-		// does not fit on the screen.
-		if (screen)
-		{
-			switch(popUpPosition)
-			{
-				case RelativePosition.BELOW :
-					if (popUpBounds.bottom > screen.bottom)
-						adjustedPosition = RelativePosition.ABOVE;
-					break;
-				case RelativePosition.ABOVE :
-					if (popUpBounds.top < screen.top)
-						adjustedPosition = RelativePosition.BELOW;
-					break;
-				case RelativePosition.LEFT :
-					if (popUpBounds.left < screen.left)
-						adjustedPosition = RelativePosition.RIGHT;
-					break;
-				case RelativePosition.RIGHT :
-					if (popUpBounds.right > screen.right)
-						adjustedPosition = RelativePosition.LEFT;
-					break;
-			}
-		}
-
-		// Get the new registration point based on the adjusted position
-		if(adjustedPosition != null)
-		{
-			var adjustedRegPoint:Point = new Point();
-			var adjustedBounds:Rectangle = new Rectangle();
-			determinePosition(adjustedPosition, popUp.width, popUp.height,
-							  matrix, adjustedRegPoint, adjustedBounds);
-
-			if (screen)
-			{
-				// If we adjusted the position but the popUp still doesn't fit,
-				// then revert to the original position.
-				switch(adjustedPosition)
-				{
-					case RelativePosition.BELOW :
-						if (adjustedBounds.bottom > screen.bottom)
-							adjustedPosition = null;
-						break;
-					case RelativePosition.ABOVE :
-						if (adjustedBounds.top < screen.top)
-							adjustedPosition = null;
-						break;
-					case RelativePosition.LEFT :
-						if (adjustedBounds.left < screen.left)
-							adjustedPosition = null;
-						break;
-					case RelativePosition.RIGHT :
-						if (adjustedBounds.right > screen.right)
-							adjustedPosition = null;
-						break;
-				}
-			}
-
-			if (adjustedPosition != null)
-			{
-				regPoint = adjustedRegPoint;
-				popUpBounds = adjustedBounds;
-			}
-		}
-
-		MatrixUtil.decomposeMatrix(decomposition, matrix, 0, 0);
-		var concatScaleX:Number = decomposition[3];
-		var concatScaleY:Number = decomposition[4];
-
-		// If the popUp still doesn't fit, then nudge it
-		// so it is completely on the screen. Make sure to include scale.
-
-		if (popUpBounds.top < screen.top)
-			regPoint.y += (screen.top - popUpBounds.top) / concatScaleY;
-		else if (popUpBounds.bottom > screen.bottom)
-			regPoint.y -= (popUpBounds.bottom - screen.bottom) / concatScaleY;
-
-		if (popUpBounds.left < screen.left)
-			regPoint.x += (screen.left - popUpBounds.left) / concatScaleX;
-		else if (popUpBounds.right > screen.right)
-			regPoint.x -= (popUpBounds.right - screen.right) / concatScaleX;
-
-		return matrix.transformPoint(regPoint);
-	}
-
-	//--------------------------------------------------------------------------
+
+    /**
+     *  Call this function to update the popUp's transform matrix. Typically,
+     *  this function is called while performing an effect on the PopUpAnchor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function updatePopUpTransform():void
+    {
+        applyPopUpTransform(width, height);
+    }
+
+    /**
+     *  Called when the popUp is positioned, when it is displayed,
+     *  or when updatePopUpTransform() is called. Override this function to
+     *  alter the position of the popUp.
+     *
+     *  @return The absolute position of the popUp in the global coordinate system
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function positionPopUp():Point
+    {
+        // This implementation doesn't handle rotation
+        var matrix:Matrix = $transform.concatenatedMatrix;
+        var regPoint:Point = new Point();
+
+        var popUpBounds:Rectangle = new Rectangle();
+        determinePosition(popUpPosition, popUp.width, popUp.height,
+                          matrix, regPoint, popUpBounds);
+
+        var adjustedPosition:String;
+
+        // Position the popUp in the opposite direction if it
+        // does not fit on the screen.
+        if (screen)
+        {
+            switch(popUpPosition)
+            {
+                case RelativePosition.BELOW :
+                    if (popUpBounds.bottom > screen.bottom)
+                        adjustedPosition = RelativePosition.ABOVE;
+                    break;
+                case RelativePosition.ABOVE :
+                    if (popUpBounds.top < screen.top)
+                        adjustedPosition = RelativePosition.BELOW;
+                    break;
+                case RelativePosition.LEFT :
+                    if (popUpBounds.left < screen.left)
+                        adjustedPosition = RelativePosition.RIGHT;
+                    break;
+                case RelativePosition.RIGHT :
+                    if (popUpBounds.right > screen.right)
+                        adjustedPosition = RelativePosition.LEFT;
+                    break;
+            }
+        }
+
+        // Get the new registration point based on the adjusted position
+        if(adjustedPosition != null)
+        {
+            var adjustedRegPoint:Point = new Point();
+            var adjustedBounds:Rectangle = new Rectangle();
+            determinePosition(adjustedPosition, popUp.width, popUp.height,
+                              matrix, adjustedRegPoint, adjustedBounds);
+
+            if (screen)
+            {
+                // If we adjusted the position but the popUp still doesn't fit,
+                // then revert to the original position.
+                switch(adjustedPosition)
+                {
+                   case RelativePosition.BELOW :
+                        if (adjustedBounds.bottom > screen.bottom)
+                            adjustedPosition = null;
+                        break;
+                    case RelativePosition.ABOVE :
+                        if (adjustedBounds.top < screen.top)
+                            adjustedPosition = null;
+                        break;
+                    case RelativePosition.LEFT :
+                        if (adjustedBounds.left < screen.left)
+                            adjustedPosition = null;
+                        break;
+                    case RelativePosition.RIGHT :
+                        if (adjustedBounds.right > screen.right)
+                            adjustedPosition = null;
+                        break;
+                }
+            }
+
+            if (adjustedPosition != null)
+            {
+                regPoint = adjustedRegPoint;
+                popUpBounds = adjustedBounds;
+            }
+        }
+
+        MatrixUtil.decomposeMatrix(decomposition, matrix, 0, 0);
+        var concatScaleX:Number = decomposition[3];
+        var concatScaleY:Number = decomposition[4];
+
+        // If the popUp still doesn't fit, then nudge it
+        // so it is completely on the screen. Make sure to include scale.
+
+        if (popUpBounds.top < screen.top)
+            regPoint.y += (screen.top - popUpBounds.top) / concatScaleY;
+        else if (popUpBounds.bottom > screen.bottom)
+            regPoint.y -= (popUpBounds.bottom - screen.bottom) / concatScaleY;
+
+        if (popUpBounds.left < screen.left)
+            regPoint.x += (screen.left - popUpBounds.left) / concatScaleX;
+        else if (popUpBounds.right > screen.right)
+            regPoint.x -= (popUpBounds.right - screen.right) / concatScaleX;
+
+        return matrix.transformPoint(regPoint);
+    }
+
+    //--------------------------------------------------------------------------
     //
     //  Private Methods
     //
     //--------------------------------------------------------------------------
-
-	// TODO (jszeto) Rename to not use 'state'
-	/**
-	 *  @private
-	 */
-	private function updatePopUpState():void
-	{
-		if (!addedToStage)
-			return;
-
-		/*if (popUpFactory && popUp == null && displayPopUp)
-		{
-			_popUp = UIComponent(popUpFactory.getInstance());
-			_popUp.styleName = this
-		}*/
-
-		if(popUp == null)
-			return;
-
-		if(popUp.parent == null && displayPopUp)
-		{
-			PopUpManager.addPopUp(popUp,this,false);
-			popUpIsDisplayed = true;
-			popUpWidth = popUp.explicitWidth;
-			popUpHeight = popUp.explicitHeight;
-			applyPopUpTransform(width, height);
-		}
-		else if (popUp.parent != null && displayPopUp == false)
-		{
-			PopUpManager.removePopUp(popUp);
-			popUpIsDisplayed = false;
-			popUp.explicitWidth = popUpWidth;
-			popUp.explicitHeight = popUpHeight;
-
-			/*if (popUpFactory)
-			{
-				_popUp.styleName = null;
-				_popUp = null;
-				popUpFactory.reset();
-			}*/
-		}
-	}
-
-	/**
-	 *  @private
-	 */
-	mx_internal function determinePosition(placement:String, popUpWidth:Number, popUpHeight:Number,
-										   matrix:Matrix, registrationPoint:Point, bounds:Rectangle):void
-	{
-		switch(placement)
-		{
-			case RelativePosition.BELOW:
-				registrationPoint.x = 0;
-				registrationPoint.y = unscaledHeight;
-				break;
-			case RelativePosition.ABOVE:
-				registrationPoint.x = 0;
-				registrationPoint.y = -popUpHeight;
-				break;
-			case RelativePosition.LEFT:
-				registrationPoint.x = -popUpWidth;
-				registrationPoint.y = 0;
-				break;
-			case RelativePosition.RIGHT:
-				registrationPoint.x = unscaledWidth;
-				registrationPoint.y = 0;
-				break;
-			case RelativePosition.CENTER:
-				registrationPoint.x = (unscaledWidth - popUpWidth) / 2;
-				registrationPoint.y = (unscaledHeight - popUpHeight) / 2;
-				break;
-			case RelativePosition.EXACT:
-				// already 0,0
-				break;
-		}
-
-		var globalTL:Point = matrix.transformPoint(registrationPoint);
-		registrationPoint.y += popUp.height;
-		var globalBL:Point = matrix.transformPoint(registrationPoint);
-		registrationPoint.x += popUp.width;
-		var globalBR:Point = matrix.transformPoint(registrationPoint);
-		registrationPoint.y -= popUp.height;
-		var globalTR:Point = matrix.transformPoint(registrationPoint);
-		registrationPoint.x -= popUp.width;
-
-		bounds.left = Math.min(globalTL.x, globalBL.x, globalBR.x, globalTR.x);
-		bounds.right = Math.max(globalTL.x, globalBL.x, globalBR.x, globalTR.x);
-		bounds.top = Math.min(globalTL.y, globalBL.y, globalBR.y, globalTR.y);
-		bounds.bottom = Math.max(globalTL.y, globalBL.y, globalBR.y, globalTR.y);
-	}
-
-	/**
-	 *  @private
-	 */
-	private function applyPopUpTransform(unscaledWidth:Number, unscaledHeight:Number):void
-	{
-		if (!popUpIsDisplayed)
-			return;
-
-		var m:Matrix = $transform.concatenatedMatrix;
-
-		// Set the dimensions explicitly because UIComponents always set themselves to their
-		// measured / explicit dimensions if they are parented by the SystemManager.
-		if (autoSizePopUpWidth)
-			popUp.width = unscaledWidth;
-		if (autoSizePopUpHeight)
-			popUp.height = unscaledHeight;
-
-		var popUpPoint:Point = positionPopUp();
-
-		// Position the popUp.
-		m.tx = popUpPoint.x;
-		m.ty = popUpPoint.y;
-		popUp.setLayoutMatrix(m,false);
-
-		// apply the color transformation
-		popUp.transform.colorTransform = $transform.concatenatedColorTransform
-	}
-
-	//--------------------------------------------------------------------------
+
+    // TODO (jszeto) Rename to not use 'state'
+    /**
+     *  @private
+     */
+    private function updatePopUpState():void
+    {
+        if (!addedToStage)
+            return;
+
+        /*if (popUpFactory && popUp == null && displayPopUp)
+        {
+            _popUp = UIComponent(popUpFactory.getInstance());
+            _popUp.styleName = this
+        }*/
+
+        if(popUp == null)
+            return;
+
+        if(popUp.parent == null && displayPopUp)
+        {
+            PopUpManager.addPopUp(popUp,this,false);
+            popUpIsDisplayed = true;
+            popUpWidth = popUp.explicitWidth;
+            popUpHeight = popUp.explicitHeight;
+            applyPopUpTransform(width, height);
+        }
+        else if (popUp.parent != null && displayPopUp == false)
+        {
+            PopUpManager.removePopUp(popUp);
+            popUpIsDisplayed = false;
+            popUp.explicitWidth = popUpWidth;
+            popUp.explicitHeight = popUpHeight;
+
+            /*if (popUpFactory)
+            {
+                _popUp.styleName = null;
+                _popUp = null;
+                popUpFactory.reset();
+            }*/
+        }
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function determinePosition(placement:String, popUpWidth:Number, popUpHeight:Number,
+                                           matrix:Matrix, registrationPoint:Point, bounds:Rectangle):void
+    {
+        switch(placement)
+        {
+            case RelativePosition.BELOW:
+                registrationPoint.x = 0;
+                registrationPoint.y = unscaledHeight;
+                break;
+            case RelativePosition.ABOVE:
+                registrationPoint.x = 0;
+                registrationPoint.y = -popUpHeight;
+                break;
+            case RelativePosition.LEFT:
+                registrationPoint.x = -popUpWidth;
+                registrationPoint.y = 0;
+                break;
+            case RelativePosition.RIGHT:
+                registrationPoint.x = unscaledWidth;
+                registrationPoint.y = 0;
+                break;
+            case RelativePosition.CENTER:
+                registrationPoint.x = (unscaledWidth - popUpWidth) / 2;
+                registrationPoint.y = (unscaledHeight - popUpHeight) / 2;
+                break;
+            case RelativePosition.EXACT:
+                // already 0,0
+                break;
+        }
+
+        var globalTL:Point = matrix.transformPoint(registrationPoint);
+        registrationPoint.y += popUp.height;
+        var globalBL:Point = matrix.transformPoint(registrationPoint);
+        registrationPoint.x += popUp.width;
+        var globalBR:Point = matrix.transformPoint(registrationPoint);
+        registrationPoint.y -= popUp.height;
+        var globalTR:Point = matrix.transformPoint(registrationPoint);
+        registrationPoint.x -= popUp.width;
+
+        bounds.left = Math.min(globalTL.x, globalBL.x, globalBR.x, globalTR.x);
+        bounds.right = Math.max(globalTL.x, globalBL.x, globalBR.x, globalTR.x);
+        bounds.top = Math.min(globalTL.y, globalBL.y, globalBR.y, globalTR.y);
+        bounds.bottom = Math.max(globalTL.y, globalBL.y, globalBR.y, globalTR.y);
+    }
+
+    /**
+     *  @private
+     */
+    private function applyPopUpTransform(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        if (!popUpIsDisplayed)
+            return;
+
+        var m:Matrix = $transform.concatenatedMatrix;
+
+        // Set the dimensions explicitly because UIComponents always set themselves to their
+        // measured / explicit dimensions if they are parented by the SystemManager.
+        if (autoSizePopUpWidth)
+            popUp.width = unscaledWidth;
+        if (autoSizePopUpHeight)
+            popUp.height = unscaledHeight;
+
+        var popUpPoint:Point = positionPopUp();
+
+        // the transformation doesn't take the fullScreenRect in to account
+        // if we are in fulLScreen mode
+        if (stage.displayState != StageDisplayState.NORMAL && stage.fullScreenSourceRect)
+        {
+            popUpPoint.x += stage.fullScreenSourceRect.x;
+            popUpPoint.y += stage.fullScreenSourceRect.y;
+        }
+
+        // Position the popUp.
+        m.tx = popUpPoint.x;
+        m.ty = popUpPoint.y;
+        popUp.setLayoutMatrix(m,false);
+
+        // apply the color transformation
+        popUp.transform.colorTransform = $transform.concatenatedColorTransform
+    }
+
+    //--------------------------------------------------------------------------
     //
     //  Event Handlers
     //
     //--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
-	private function addedToStageHandler(event:Event):void
-	{
-		addedToStage = true;
-		updatePopUpState();
-	}
-
-	/**
-	 *  @private
-	 */
-	private function removedFromStageHandler(event:Event):void
-	{
-		addedToStage = false;
-		// TODO (jszeto) Remove popup from PopUpManager
-	}
-
+
+    /**
+     *  @private
+     */
+    private function addedToStageHandler(event:Event):void
+    {
+        addedToStage = true;
+        updatePopUpState();
+    }
+
+    /**
+     *  @private
+     */
+    private function removedFromStageHandler(event:Event):void
+    {
+        addedToStage = false;
+        // TODO (jszeto) Remove popup from PopUpManager
+    }
+
 }
-}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 2905
Author:   clucier@adobe.com
Date:     2008-08-19T20:45:59.993275Z

Log Message:
-----------
Changes to allow UIComponent to take advantage of the new bindable filters (bindable wrappers around DropShadowFilter, GlowFilter, etc. that will force the filter stack to be re-evaluated when one or more of the filter parameters change). Checkin-tests: PASS
Reviewer: Jason
Bugs: SDK-16311
QA: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Parser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/ConvolutionFilter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BaseDimensionFilter.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BaseDimensionFilter.as" copyfrom-rev="2873" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/IBitmapFilter.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/IBitmapFilter.as" copyfrom-rev="2873" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/GradientFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BaseFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BaseFilter.as" copyfrom-rev="2873" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseFilter.as</path>

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

--- frameworks/projects/spark/src/spark/filters/GradientFilter.as
+++ frameworks/projects/spark/src/spark/filters/GradientFilter.as
@@ -9,6 +9,7 @@

 import mx.core.mx_internal;
 import mx.events.PropertyChangeEvent;
+import mx.filters.BaseDimensionFilter;
 import mx.graphics.GradientEntry;

 use namespace mx_internal;


Transferred from the Adobe Open Source Subversion Repository

Revision: 4170
Author:   egeorgie@adobe.com
Date:     2008-11-23T21:12:27.092823Z

Log Message:
-----------
1.	mx.layout.ILayoutItem gets renamed to mx.layout.ILayoutElement
2.	get actualPosition() -> getLayoutPositionX(postTransform:Boolean=true):Number, getLayoutPositionY(postTransform:Boolean=true):Number
3.	get actualSize() -> getLayoutWidth(postTransform:Boolean=true):Number, getLayoutHeight(postTransform:Boolean=true):Number
4.	get preferredSize() -> getPreferredWidth(postTransform:Boolean=true):Number, getPreferredHeight(postTransform:Boolean=true):Number
5.	get minSize() -> getMinWidth(postTransform:Boolean=true):Number, getMinHeight(postTransform:Boolean=true):Number
6.	get maxSize() -> getMaxWidth(postTransform:Boolean=true):Number, getMaxHeight(postTransform:Boolean=true):Number
7.	setActualSize() -> setlayoutSize(width:Number=NaN, height:Number=NaN, postTransform:Boolean=true):void
8.	setActualPosition() -> setLayoutPosition(width:Number=NaN, height:Number=NaN, postTransform:Boolean=true):void
10.     Add support for custom 3D layouts by exposing access to transform matrices through the ILayoutElement interface.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Hans
tests: checkintests, mustella (gumbo/components)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout_tester.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemHelper.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutItem.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/graphics/GraphicTags_checkintests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFactory.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFactory.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFDO.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/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemHelper.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementUIC.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -37,15 +37,15 @@
     //
     //--------------------------------------------------------------------------

-    private static function calculatePercentWidth( layoutItem:ILayoutItem, width:Number ):Number
-    {
-    	var percentWidth:Number = LayoutItemHelper.pinBetween( layoutItem.percentWidth * 0.01 * width,
-    	                                                       layoutItem.minSize.x,
-    	                                                       layoutItem.maxSize.x );
+    private static function calculatePercentWidth(layoutElement:ILayoutElement, width:Number):Number
+    {
+    	var percentWidth:Number = LayoutElementHelper.pinBetween(layoutElement.percentWidth * 0.01 * width,
+    	                                                         layoutElement.getMinWidth(),
+    	                                                         layoutElement.getMaxWidth() );
     	return percentWidth < width ? percentWidth : width;
     }

-    private static function sizeLayoutItem(layoutItem:ILayoutItem, width:Number,
+    private static function sizeLayoutElement(layoutElement:ILayoutElement, width:Number,
                                            horizontalAlign:String, restrictedWidth:Number,
                                            height:Number, variableRowHeight:Boolean,
                                            rowHeight:Number):void
@@ -62,14 +62,14 @@
         }
         else
         {
-            if (hasPercentWidth(layoutItem))
-               newWidth = calculatePercentWidth(layoutItem, width);
+            if (hasPercentWidth(layoutElement))
+               newWidth = calculatePercentWidth(layoutElement, width);
         }

         if (variableRowHeight)
-            layoutItem.setActualSize(newWidth, height);
+            layoutElement.setLayoutSize(newWidth, height);
         else
-            layoutItem.setActualSize(newWidth, rowHeight);
+            layoutElement.setLayoutSize(newWidth, rowHeight);
     }

     //--------------------------------------------------------------------------
@@ -132,7 +132,7 @@
     [Inspectable(category="General")]

     /**
-     *  Returns the current number of visible items.
+     *  Returns the current number of visible elements.
      *
      *  @default -1
      */
@@ -206,9 +206,9 @@
     [Inspectable(category="General")]

     /**
-     *  Specifies the number of items to display.
-     *
-     *  If requestedRowCount is -1, then all of the items are displayed.
+     *  Specifies the number of elements to display.
+     *
+     *  If requestedRowCount is -1, then all of the elements are displayed.
      *
      *  This property implies the layout's measuredHeight.
      *
@@ -247,16 +247,16 @@
      *  is false.
      *
      *  If this property isn't explicitly set, then the measured height
-     *  of the first item is returned.
+     *  of the first element is returned.
      */
     public function get rowHeight():Number
     {
         if (!isNaN(_rowHeight))
             return _rowHeight;
-        else if (!target || (target.numLayoutItems <= 0))
+        else if (!target || (target.numLayoutElements <= 0))
             return 0;
         else
-            return target.getLayoutItemAt(0).preferredSize.y;
+            return target.getLayoutElementAt(0).getPreferredHeight();
     }

     /**
@@ -284,13 +284,13 @@

     /**
      *  If false, i.e. "fixed row height" is specified, the height of
-     *  each item is set to the value of rowHeight.
+     *  each element is set to the value of rowHeight.
      *
      *  If the rowHeight property wasn't explicitly set,
      *  then it's initialized with the measuredHeight of
-     *  the first item.
-     *
-     *  The items' includeInLayout,
+     *  the first element.
+     *
+     *  The elements' includeInLayout,
      *  measuredHeight, minHeight,
      *  and percentHeight properties are ignored when
      *  variableRowHeight is false.
@@ -400,7 +400,7 @@
     //--------------------------------------------------------------------------

 	/**
-	 *  An index is "in view" if the corresponding non-null layout item is
+	 *  An index is "in view" if the corresponding non-null layout element is
 	 *  within the vertical limits of the layout target's scrollRect
 	 *  and included in the layout.
 	 *
@@ -410,12 +410,12 @@
 	 *
 	 *  If the specified index is partially within the view, the
 	 *  returned value is the percentage of the corresponding layout
-	 *  item that's visible.
+	 *  element that's visible.
 	 *
 	 *  Returns 0.0 if the specified index is invalid or if it corresponds to
-	 *  null item, or a ILayoutItem for which includeInLayout is false.
+	 *  null element, or a ILayoutElement for which includeInLayout is false.
 	 *
-	 *  @return the percentage of the specified item that's in view.
+	 *  @return the percentage of the specified element that's in view.
 	 *  @see firstIndexInView
 	 *  @see lastIndexInView
 	 */
@@ -425,10 +425,10 @@
 	    if (!g)
 	        return 0.0;

-	    if ((index < 0) || (index >= g.numLayoutItems))
+	    if ((index < 0) || (index >= g.numLayoutElements))
 	       return 0.0;

-        var li:ILayoutItem = g.getLayoutItemAt(index);
+        var li:ILayoutElement = g.getLayoutElementAt(index);
         if ((li == null) || !li.includeInLayout)
             return 0.0;

@@ -449,9 +449,9 @@
         // index is first (r0) or last (r1) visible row
         var y0:Number = g.verticalScrollPosition;
         var y1:Number = y0 + g.height;
-        var iy0:Number = li.actualPosition.y;
-        var iy1:Number = iy0 + li.actualSize.y;
-        if (iy0 >= iy1)  // item has 0 or negative height
+        var iy0:Number = li.getLayoutPositionY();
+        var iy1:Number = iy0 + li.getLayoutHeight();
+        if (iy0 >= iy1)  // element has 0 or negative height
             return 1.0;
         if ((iy0 >= y0) && (iy1 <= y1))
             return 1.0;
@@ -459,50 +459,50 @@
 	}

 	/**
-	 *  Binary search for the first layout item that contains y.
+	 *  Binary search for the first layout element that contains y.
 	 *
-	 *  This function considers both the item's actual bounds and
-	 *  the gap that follows it to be part of the item.  The search
+	 *  This function considers both the element's actual bounds and
+	 *  the gap that follows it to be part of the element.  The search
 	 *  covers index i0 through i1 (inclusive).
 	 *
-	 *  This function is intended for variable height items.
+	 *  This function is intended for variable height elements.
 	 *
-	 *  Returns the index of the item that contains y, or -1.
+	 *  Returns the index of the element that contains y, or -1.
 	 *
 	 * @private
 	 */
 	private static function findIndexAt(y:Number, gap:int, g:GroupBase, i0:int, i1:int):int
 	{
 	    var index:int = (i0 + i1) / 2;
-        var item:ILayoutItem = g.getLayoutItemAt(index);
-	    var p:Point = item.actualPosition;
-        var s:Point = item.actualSize;
-        // TBD: deal with null item, includeInLayout false.
-        if ((y >= p.y) && (y
= elementY) && (y < elementY + elementHeight + gap))
             return index;
         else if (i0 == i1)
             return -1;
-        else if (y < p.y)
+        else if (y < elementY)
             return findIndexAt(y, gap, g, i0, Math.max(i0, index-1));
         else
             return findIndexAt(y, gap, g, Math.min(index+1, i1), i1);
 	}

    /**
-    *  Returns the index of the first non-null includeInLayout item,
-    *  beginning with the item at index i.
+    *  Returns the index of the first non-null includeInLayout element,
+    *  beginning with the element at index i.
     *
-    *  Returns -1 if no such item can be found.
+    *  Returns -1 if no such element can be found.
     *
     *  @private
     */
-    private static function findLayoutItemIndex(g:GroupBase, i:int, dir:int):int
-    {
-        var n:int = g.numLayoutItems;
+    private static function findLayoutElementIndex(g:GroupBase, i:int, dir:int):int
+    {
+        var n:int = g.numLayoutElements;
         while((i >= 0) && (i < n))
         {
-           var item:ILayoutItem = g.getLayoutItemAt(i);
-           if (item && item.includeInLayout)
+           var element:ILayoutElement = g.getLayoutElementAt(i);
+           if (element && element.includeInLayout)
            {
                return i;
            }
@@ -525,7 +525,7 @@
         if (!g)
             return;

-        var n:int = g.numLayoutItems - 1;
+        var n:int = g.numLayoutElements - 1;
         if (n < 0)
         {
             setIndexInView(-1, -1);
@@ -540,7 +540,7 @@
         }

         // We're going to use findIndexAt to find the index of
-        // the items that overlap the top and bottom edges of the scrollRect.
+        // the elements that overlap the top and bottom edges of the scrollRect.
         // Values that are exactly equal to scrollRect.bottom aren't actually
         // rendered, since the top,bottom interval is only half open.
         // To account for that we back away from the bottom edge by a
@@ -559,30 +559,30 @@
         var i0:int = findIndexAt(y0 + gap, gap, g, 0, n);
         var i1:int = findIndexAt(y1, gap, g, 0, n);

-        // Special case: no item overlaps y0, is index 0 visible?
+        // Special case: no element overlaps y0, is index 0 visible?
         if (i0 == -1)
         {
-            var index0:int = findLayoutItemIndex(g, 0, +1);
+            var index0:int = findLayoutElementIndex(g, 0, +1);
             if (index0 != -1)
             {
-                var item0:ILayoutItem = g.getLayoutItemAt(index0);
-                var p0:Point = item0.actualPosition;
-                var s0:Point = item0.actualSize;
-                if ((p0.y < y1) && ((p0.y + s0.y) > y0))
+                var element0:ILayoutElement = g.getLayoutElementAt(index0);
+                var element0Y:Number = element0.getLayoutPositionY();
+                var elementHeight:Number = element0.getLayoutHeight();
+                if ((element0Y < y1) && ((element0Y + elementHeight) > y0))
                     i0 = index0;
             }
         }

-        // Special case: no item overlaps y1, is index n visible?
+        // Special case: no element overlaps y1, is index n visible?
         if (i1 == -1)
         {
-            var index1:int = findLayoutItemIndex(g, n, -1);
+            var index1:int = findLayoutElementIndex(g, n, -1);
             if (index1 != -1)
             {
-                var item1:ILayoutItem = g.getLayoutItemAt(index1);
-                var p1:Point = item1.actualPosition;
-                var s1:Point = item1.actualSize;
-                if ((p1.y < y1) && ((p1.y + s1.y) > y0))
+                var element1:ILayoutElement = g.getLayoutElementAt(index1);
+                var element1Y:Number = element1.getLayoutPositionY();
+                var element1Height:Number = element1.getLayoutHeight();
+                if ((element1Y < y1) && ((element1Y + element1Height) > y0))
                     i1 = index1;
             }
         }
@@ -591,54 +591,55 @@
     }

     /**
-     *  If the item at index i is non-null and includeInLayout,
+     *  If the element at index i is non-null and includeInLayout,
      *  then return it's actual bounds, otherwise return null.
      *
      *  @private
      */
-    private static function layoutItemBounds(g:GroupBase, i:int):Rectangle
-    {
-        var item:ILayoutItem = g.getLayoutItemAt(i);
-        if (item && item.includeInLayout)
-        {
-            var p:Point = item.actualPosition;
-            var s:Point = item.actualSize;
-            return new Rectangle(p.x, p.y, s.x, s.y);
+    private static function layoutElementBounds(g:GroupBase, i:int):Rectangle
+    {
+        var element:ILayoutElement = g.getLayoutElementAt(i);
+        if (element && element.includeInLayout)
+        {
+            return new Rectangle(element.getLayoutPositionX(),
+                                 element.getLayoutPositionY(),
+                                 element.getLayoutWidth(),
+                                 element.getLayoutHeight());
         }
         return null;
     }

     /**
      *  Returns the actual position/size Rectangle of the first partially
-     *  visible or not-visible, non-null includeInLayout item, beginning
-     *  with the item at index i, searching in direction dir (dir must
+     *  visible or not-visible, non-null includeInLayout element, beginning
+     *  with the element at index i, searching in direction dir (dir must
      *  be +1 or -1).   The last argument is the GroupBase scrollRect, it's
      *  guaranteed to be non-null.
      *
-     *  Returns null if no such item can be found.
+     *  Returns null if no such element can be found.
      *
      *  @private
      */
-    private function findLayoutItemBounds(g:GroupBase, i:int, dir:int, r:Rectangle):Rectangle
-    {
-        var n:int = g.numLayoutItems;
+    private function findLayoutElementBounds(g:GroupBase, i:int, dir:int, r:Rectangle):Rectangle
+    {
+        var n:int = g.numLayoutElements;

         if (inView(i) >= 1)
             i = Math.max(0, Math.min(n - 1, i + dir));

         while((i >= 0) && (i < n))
         {
-           var itemR:Rectangle = layoutItemBounds(g, i);
+           var elementR:Rectangle = layoutElementBounds(g, i);
            // Special case: if the scrollRect r _only_ contains
-           // itemR, then if we're searching up (dir == -1),
-           // and itemR's top edge is visible, then try again
+           // elementR, then if we're searching up (dir == -1),
+           // and elementR's top edge is visible, then try again
            // with i-1.   Likewise for dir == +1.
-           if (itemR)
+           if (elementR)
            {
-               var overlapsTop:Boolean = (dir == -1) && (itemR.top == r.top) && (itemR.bottom >= r.bottom);
-               var overlapsBottom:Boolean = (dir == +1) && (itemR.bottom == r.bottom) && (itemR.top <= r.top);
+               var overlapsTop:Boolean = (dir == -1) && (elementR.top == r.top) && (elementR.bottom >= r.bottom);
+               var overlapsBottom:Boolean = (dir == +1) && (elementR.bottom == r.bottom) && (elementR.top <= r.top);
                if (!(overlapsTop || overlapsBottom))
-                   return itemR;
+                   return elementR;
            }
            i += dir;
         }
@@ -653,26 +654,26 @@
      *
      *

      *  UP
-     *  If the firstIndexInView item is partially visible then top justify
-     *  it, otherwise top justify the item at the previous index.
+     *  If the firstIndexInView element is partially visible then top justify
+     *  it, otherwise top justify the element at the previous index.
      *

      *
      *

      *  DOWN
-     *  If the lastIndexInView item is partially visible, then bottom justify
-     *  it, otherwise bottom justify the item at the following index.
+     *  If the lastIndexInView element is partially visible, then bottom justify
+     *  it, otherwise bottom justify the element at the following index.
      *

      *
      *  PAGE_UP
      *

-     *  If the firstIndexInView item is partially visible, then bottom
-     *  justify it, otherwise bottom justify item at the previous index.
+     *  If the firstIndexInView element is partially visible, then bottom
+     *  justify it, otherwise bottom justify element at the previous index.
      *

      *
      *

      *  PAGE_DOWN
-     *  If the lastIndexInView item is partially visible, then top
-     *  justify it, otherwise top justify item at the following index.
+     *  If the lastIndexInView element is partially visible, then top
+     *  justify it, otherwise top justify element at the following index.
      *

      *
      *

@@ -687,7 +688,7 @@
         if (!g)
             return 0;

-        var maxIndex:int = g.numLayoutItems -1;
+        var maxIndex:int = g.numLayoutElements -1;
         if (maxIndex < 0)
             return 0;

@@ -695,49 +696,49 @@
         if (!scrollR)
             return 0;

-        var itemR:Rectangle = null;
+        var elementR:Rectangle = null;
         switch(unit)
         {
             case ScrollUnit.UP:
             case ScrollUnit.PAGE_UP:
-                itemR = findLayoutItemBounds(g, firstIndexInView, -1, scrollR);
+                elementR = findLayoutElementBounds(g, firstIndexInView, -1, scrollR);
                 break;

             case ScrollUnit.DOWN:
             case ScrollUnit.PAGE_DOWN:
-                itemR = findLayoutItemBounds(g, lastIndexInView, +1, scrollR);
+                elementR = findLayoutElementBounds(g, lastIndexInView, +1, scrollR);
                 break;

             default:
                 return super.getVerticalScrollPositionDelta(unit);
         }

-        if (!itemR)
+        if (!elementR)
             return 0;

         var delta:Number = 0;
         switch (unit)
         {
             case ScrollUnit.UP:
-                delta = Math.max(-scrollR.height, itemR.top - scrollR.top);
+                delta = Math.max(-scrollR.height, elementR.top - scrollR.top);
                 break;

             case ScrollUnit.DOWN:
-                delta = Math.min(scrollR.height, itemR.bottom - scrollR.bottom);
+                delta = Math.min(scrollR.height, elementR.bottom - scrollR.bottom);
                 break;

             case ScrollUnit.PAGE_UP:
-                if ((itemR.top < scrollR.top) && (itemR.bottom >= scrollR.bottom))
-                    delta = Math.max(-scrollR.height, itemR.top - scrollR.top);
+                if ((elementR.top < scrollR.top) && (elementR.bottom >= scrollR.bottom))
+                    delta = Math.max(-scrollR.height, elementR.top - scrollR.top);
                 else
-                    delta = itemR.bottom - scrollR.bottom;
+                    delta = elementR.bottom - scrollR.bottom;
                 break;

             case ScrollUnit.PAGE_DOWN:
-                if ((itemR.top <= scrollR.top) && (itemR.bottom > scrollR.bottom))
-                    delta = Math.min(scrollR.height, itemR.bottom - scrollR.bottom);
+                if ((elementR.top <= scrollR.top) && (elementR.bottom > scrollR.bottom))
+                    delta = Math.min(scrollR.height, elementR.bottom - scrollR.bottom);
                 else
-                    delta = itemR.top - scrollR.top;
+                    delta = elementR.top - scrollR.top;
                 break;
         }

@@ -756,26 +757,26 @@
         var visibleRows:uint = 0;
         var reqRows:int = requestedRowCount;

-        var count:uint = layoutTarget.numLayoutItems;
-        var totalCount:uint = count; // How many items will be laid out
+        var count:uint = layoutTarget.numLayoutElements;
+        var totalCount:uint = count; // How many elements will be laid out
         for (var i:int = 0; i < count; i++)
         {
-            var li:ILayoutItem = layoutTarget.getLayoutItemAt(i);
+            var li:ILayoutElement = layoutTarget.getLayoutElementAt(i);
             if (!li || !li.includeInLayout)
             {
             	totalCount--;
                 continue;
             }

-            preferredWidth = Math.max(preferredWidth, li.preferredSize.x);
-            preferredHeight += li.preferredSize.y;
+            preferredWidth = Math.max(preferredWidth, li.getPreferredWidth());
+            preferredHeight += li.getPreferredHeight();

             var vrr:Boolean = (reqRows != -1) && (visibleRows < reqRows);

             if (vrr || (reqRows == -1))
             {
-                var mw:Number =  hasPercentWidth(li) ? li.minSize.x : li.preferredSize.x;
-                var mh:Number = hasPercentHeight(li) ? li.minSize.y : li.preferredSize.y;
+                var mw:Number =  hasPercentWidth(li) ? li.getMinWidth() : li.getPreferredWidth();
+                var mh:Number = hasPercentHeight(li) ? li.getMinHeight() : li.getPreferredHeight();
                 minWidth = Math.max(mw, minWidth);
                 minHeight += mh;
             }
@@ -807,7 +808,7 @@

     private function fixedRowHeightMeasure(layoutTarget:GroupBase):void
     {
-    	var rows:uint = layoutTarget.numLayoutItems;
+    	var rows:uint = layoutTarget.numLayoutElements;
         var visibleRows:uint = (requestedRowCount == -1) ? rows : requestedRowCount;

         var rh:Number = rowHeight; // can be expensive to compute
@@ -819,15 +820,15 @@
         if (isNaN(columnWidth))
         {
 			minColumnWidth = columnWidth = 0;
-	        var count:uint = layoutTarget.numLayoutItems;
+	        var count:uint = layoutTarget.numLayoutElements;
 	        for (var i:int = 0; i < count; i++)
 	        {
-	            var layoutItem:ILayoutItem = layoutTarget.getLayoutItemAt(i);
-	            if (!layoutItem || !layoutItem.includeInLayout)
+	            var layoutElement:ILayoutElement = layoutTarget.getLayoutElementAt(i);
+	            if (!layoutElement || !layoutElement.includeInLayout)
 	               continue;
-	            columnWidth = Math.max(columnWidth, layoutItem.preferredSize.x);
-	            var itemMinWidth:Number = hasPercentWidth(layoutItem) ? layoutItem.minSize.x : layoutItem.preferredSize.x;
-	            minColumnWidth = Math.max(minColumnWidth, itemMinWidth);
+	            columnWidth = Math.max(columnWidth, layoutElement.getPreferredWidth());
+	            var elementMinWidth:Number = hasPercentWidth(layoutElement) ? layoutElement.getMinWidth() : layoutElement.getPreferredWidth();
+	            minColumnWidth = Math.max(minColumnWidth, elementMinWidth);
 	        }
         }

@@ -860,12 +861,12 @@
         if (!layoutTarget)
             return;

-        var layoutItem:ILayoutItem;
-        var count:uint = layoutTarget.numLayoutItems;
+        var layoutElement:ILayoutElement;
+        var count:uint = layoutTarget.numLayoutElements;

         // If horizontalAlign is left, we don't need to figure out the contentWidth
-        // Otherwise the contentWidth is used to position the item and even size
-        // the item if it's "contentJustify" or "justify".
+        // Otherwise the contentWidth is used to position the element and even size
+        // the element if it's "contentJustify" or "justify".
         var contentWidth:Number = unscaledWidth;

         // TODO: in the center or right case, we end up calculating percentWidth
@@ -875,22 +876,22 @@
         {
             for (var i:int = 0; i < count; i++)
             {
-                layoutItem = layoutTarget.getLayoutItemAt(i);
-                if (!layoutItem || !layoutItem.includeInLayout)
+                layoutElement = layoutTarget.getLayoutElementAt(i);
+                if (!layoutElement || !layoutElement.includeInLayout)
                     continue;

-                var layoutItemWidth:Number;
-                if (hasPercentWidth(layoutItem))
-                    layoutItemWidth = calculatePercentWidth(layoutItem, unscaledWidth);
+                var layoutElementWidth:Number;
+                if (hasPercentWidth(layoutElement))
+                    layoutElementWidth = calculatePercentWidth(layoutElement, unscaledWidth);
                 else
-                    layoutItemWidth = layoutItem.preferredSize.x;
+                    layoutElementWidth = layoutElement.getPreferredWidth();

-                contentWidth = Math.max(contentWidth, layoutItemWidth);
+                contentWidth = Math.max(contentWidth, layoutElementWidth);
             }
         }

-        // If we're justifying the items, then all widths should be set to
-        // unscaledWidth.  If we're content justifying the items, then
+        // If we're justifying the elements, then all widths should be set to
+        // unscaledWidth.  If we're content justifying the elements, then
         // all widths should be set to the contentWidth.
         // Otherwise restrictedWidth is ignored in distributedHeight.
         var restrictedWidth:Number;
@@ -908,15 +909,15 @@
         else if (horizontalAlign == HorizontalAlign.RIGHT)
             hAlign = 1;

-        // As the LayoutItems are positioned, we'll count how many rows
+        // As the layoutElements are positioned, we'll count how many rows
         // fall within the layoutTarget's scrollRect
         var visibleRows:uint = 0;
         var minVisibleY:Number = layoutTarget.verticalScrollPosition;
         var maxVisibleY:Number = minVisibleY + unscaledHeight;

-        // Finally, position the LayoutItems and find the first/last
+        // Finally, position the layoutElements and find the first/last
         // visible indices, the content size, and the number of
-        // visible items.
+        // visible elements.
         var y:Number = 0;
         var maxX:Number = 0;
         var maxY:Number = 0;
@@ -925,17 +926,17 @@

         for (var index:int = 0; index < count; index++)
         {
-            layoutItem = layoutTarget.getLayoutItemAt(index);
-            if (!layoutItem || !layoutItem.includeInLayout)
+            layoutElement = layoutTarget.getLayoutElementAt(index);
+            if (!layoutElement || !layoutElement.includeInLayout)
                 continue;

-            // Set the layout item's position
-            var x:Number = (contentWidth - layoutItem.actualSize.x) * hAlign;
-            layoutItem.setActualPosition(x, y);
+            // Set the layout element's position
+            var x:Number = (contentWidth - layoutElement.getLayoutWidth()) * hAlign;
+            layoutElement.setLayoutPosition(x, y);

             // Update maxX,Y, first,lastVisibleIndex, and y
-            var dx:Number = layoutItem.actualSize.x;
-            var dy:Number = layoutItem.actualSize.y;
+            var dx:Number = layoutElement.getLayoutWidth();
+            var dy:Number = layoutElement.getLayoutHeight();
             maxX = Math.max(maxX, x + dx);
             maxY = Math.max(maxY, y + dy);
             if (!clipContent ||
@@ -975,45 +976,45 @@
         var spaceToDistribute:Number = height;
         var totalPercentHeight:Number = 0;
         var childInfoArray:Array = [];
-        var childInfo:LayoutItemFlexChildInfo;
+        var childInfo:LayoutElementFlexChildInfo;
         var newWidth:Number;
-        var layoutItem:ILayoutItem;
+        var layoutElement:ILayoutElement;

         // rowHeight can be expensive to compute
         var rh:Number = (variableRowHeight) ? 0 : rowHeight;
-        var count:uint = target.numLayoutItems;
-        var totalCount:uint = count; // number of items to use in gap calculation
+        var count:uint = target.numLayoutElements;
+        var totalCount:uint = count; // number of elements to use in gap calculation

         // If the child is flexible, store information about it in the
         // childInfoArray. For non-flexible children, just set the child's
         // width and height immediately.
         for (var index:int = 0; index < count; index++)
         {
-            layoutItem = target.getLayoutItemAt(index);
-            if (!layoutItem || !layoutItem.includeInLayout)
+            layoutElement = target.getLayoutElementAt(index);
+            if (!layoutElement || !layoutElement.includeInLayout)
             {
                 totalCount--;
                 continue;
             }

-            if (hasPercentHeight(layoutItem) && variableRowHeight)
+            if (hasPercentHeight(layoutElement) && variableRowHeight)
             {
-                totalPercentHeight += layoutItem.percentHeight;
-
-                childInfo = new LayoutItemFlexChildInfo();
-                childInfo.layoutItem = layoutItem;
-                childInfo.percent    = layoutItem.percentHeight;
-                childInfo.min        = layoutItem.minSize.y;
-                childInfo.max        = layoutItem.maxSize.y;
+                totalPercentHeight += layoutElement.percentHeight;
+
+                childInfo = new LayoutElementFlexChildInfo();
+                childInfo.layoutElement = layoutElement;
+                childInfo.percent    = layoutElement.percentHeight;
+                childInfo.min        = layoutElement.getMinHeight();
+                childInfo.max        = layoutElement.getMaxHeight();

                 childInfoArray.push(childInfo);
             }
             else
             {
-                sizeLayoutItem(layoutItem, width, horizontalAlign,
+                sizeLayoutElement(layoutElement, width, horizontalAlign,
                                restrictedWidth, NaN, variableRowHeight, rh);

-                spaceToDistribute -= layoutItem.actualSize.y;
+                spaceToDistribute -= layoutElement.getLayoutHeight();
             }
         }

@@ -1030,7 +1031,7 @@

             for each (childInfo in childInfoArray)
             {
-                sizeLayoutItem(childInfo.layoutItem, width, horizontalAlign,
+                sizeLayoutElement(childInfo.layoutElement, width, horizontalAlign,
                                restrictedWidth, childInfo.size,
                                variableRowHeight, rh);
             }
@@ -1042,10 +1043,10 @@

 [ExcludeClass]

-import mx.layout.ILayoutItem;
+import mx.layout.ILayoutElement;
 import mx.containers.utilityClasses.FlexChildInfo;

-class LayoutItemFlexChildInfo extends FlexChildInfo
+class LayoutElementFlexChildInfo extends FlexChildInfo
 {
-    public var layoutItem:ILayoutItem;
+    public var layoutElement:ILayoutElement;
 }


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 22095
Author:   smgilson@adobe.com
Date:     2011-08-19T15:05:35.517487Z

Log Message:
-----------
ASDoc updates for new ZOOM attribute of BitmapScaleMode.as

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapFillMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/BitmapFillMode.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapFillMode.as
@@ -13,8 +13,11 @@
 {

 /**
- *  An enum of the resize modes that determine how a BitmapImage
- *  fills in the dimensions specified by the layout system.
+ *  The BitmapFillMode class defines an enumeration of the resize modes that
+ *  determine how a BitmapImage fills in the dimensions specified by the layout system.
+ *
+ *  @see spark.components.Image#fillMode
+ *  @see spark.primitives.BitmapImage#fillMode
  *
  *  @langversion 3.0
  *  @playerversion Flash 10