Transferred from the Adobe Open Source Subversion Repository

Revision: 10951
Author:   klin@adobe.com
Date:     2009-10-09T17:15:44.211985Z

Log Message:
-----------
TitleWindow initial checkin. This is the spark equivalent of the mx:TitleWindow. One major difference is that we support a new skinstate called active. In this state, the titlebar of the window that is in focus or if one of that window's children is in focus.

-Added TitleWindow component to spark framework.
-Added new TitleWindowBoundsEvent to define events when you drag a TitleWindow.
-Added TitleWindow default skin and wireframe skin.
-Included TitleWindow to manifests and stylesheets.
-Added TitleWindow checkin test.
-Modified Panel's controlBarGroupProperties and related constants to be mx_internal in order for titlewindow to have the correct state when the controlBar is present and visible.
-Added ASDoc example for TW.
-Added icon for FB integration.
-Changed mx:TitleWindow's Alternative metadata to point to the spark TitleWindow.

SDK-23648 - small cosmetic fix on TitleWindow skin for titleDisplay overlapping with the closeButton

QE notes: TitleWindow ready for testing.
Doc notes: Yes
Bugs: SDK-23648
Reviewer: Ryan
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TitleWindow.png</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TitleWindowSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/WireframeClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/TitleWindowSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults-3.0.0.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/SimpleTitleWindowExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/TitleWindowBoundsEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TitleWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TitleWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TitleWindowCloseButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/TitleWindowApp.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/TitleWindowCloseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/TitleWindowTestScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/PanelSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/views/TitleWindowTests.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/TitleWindow.as
+++ frameworks/projects/spark/src/spark/components/TitleWindow.as
@@ -0,0 +1,551 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.components
+{
+
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.display.InteractiveObject;
+import flash.events.Event;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import mx.core.mx_internal;
+import mx.events.CloseEvent;
+import mx.events.FlexEvent;
+import mx.events.SandboxMouseEvent;
+import mx.utils.BitFlagUtil;
+
+import spark.events.TitleWindowBoundsEvent;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the user selects the close button.
+ *
+ *  @eventType mx.events.CloseEvent.CLOSE
+ *  @helpid 3985
+ *  @tiptext close event
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="close", type="mx.events.CloseEvent")]
+
+/**
+ *  Dispatched when the user presses the moveArea.
+ *
+ *  @eventType spark.events.TitleWindowBoundsEvent.WINDOW_MOVE_START
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="windowMoveStart", type="spark.events.TitleWindowBoundsEvent")]
+
+/**
+ *  Dispatched when the user tries to drag the window.
+ *
+ *  @eventType spark.events.TitleWindowBoundsEvent.WINDOW_MOVING
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="windowMoving", type="spark.events.TitleWindowBoundsEvent")]
+
+/**
+ *  Dispatched when the user moves the window successfully.
+ *
+ *  @eventType spark.events.TitleWindowBoundsEvent.WINDOW_MOVE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="windowMove", type="spark.events.TitleWindowBoundsEvent")]
+
+/**
+ *  Dispatched when the user releases the moveArea.
+ *
+ *  @eventType spark.events.TitleWindowBoundsEvent.WINDOW_MOVE_END
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="windowMoveEnd", type="spark.events.TitleWindowBoundsEvent")]
+
+//--------------------------------------
+//  SkinStates
+//--------------------------------------
+
+/**
+ *  Active State which is used when the TitleWindow
+ *  or any of its children are focused.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("active")]
+
+/**
+ *  Active State with control bar present.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("activeWithControlBar")]
+
+[IconFile("TitleWindow.png")]
+
+/**
+ *  The TitleWindow Class extends Panel to include
+ *  a close button and drag area. TitleWindow is
+ *  designed as a floating or pop-up window.
+ *
+ *  @mxml
+ *
+ *
The <s:TitleWindow> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <s:TitleWindow>
+ *    Events
+ *    close="No default"
+ *    windowMoveStart="No default"
+ *    windowMoving="No default"
+ *    windowMove="No default"
+ *    windowMoveEnd="No default"
+ *  </s:TitleWindow>
+ *

+ *
+ *  @includeExample examples/SimpleTitleWindowExample.mxml -noswf
+ *  @includeExample examples/TitleWindowApp.mxml
+ *
+ *  @see Panel
+ *  @see spark.skins.spark.TitleWindowSkin
+ *  @see mx.managers.PopUpManager
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class TitleWindow extends Panel
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+	 */
+    public function TitleWindow()
+    {
+        super();
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	private var addedHandlers:Boolean = false;
+	private var active:Boolean = false;
+
+	/**
+	 *  @private
+	 *  Horizontal location where the user pressed the mouse button
+	 *  on the moveArea to start dragging, relative to the original
+	 *  horizontal location of the TitleWindow.
+	 */
+	private var offsetX:Number;
+
+	/**
+	 *  @private
+	 *  Vertical location where the user pressed the mouse button
+	 *  on the moveArea to start dragging, relative to the original
+	 *  vertical location of the TitleWindow.
+	 */
+	private var offsetY:Number;
+
+	/**
+	 *  @private
+	 *  The starting bounds of the TitleWindow before a user
+	 *  moves or resizes it.
+	 */
+	private var startBounds:Rectangle;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  closeButton
+	//----------------------------------
+
+	[SkinPart(required="false")]
+
+	/**
+	 *  The Button that when clicked dispatches a "close" event.
+	 *  Focus is disabled for this button.
+	 */
+	public var closeButton:Button;
+
+	//----------------------------------
+	//  moveArea
+	//----------------------------------
+
+	[SkinPart(required="false")]
+
+	/**
+	 *  The area where the user may click and drag to move the window.
+	 */
+	public var moveArea:InteractiveObject;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: UIComponent, SkinnableComponent
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function parentChanged(p:DisplayObjectContainer):void
+	{
+		if (focusManager)
+		{
+			focusManager.removeEventListener(FlexEvent.FLEX_WINDOW_ACTIVATE,
+											 activateHandler);
+			focusManager.removeEventListener(FlexEvent.FLEX_WINDOW_DEACTIVATE,
+											 deactivateHandler);
+		}
+
+		super.parentChanged(p);
+
+		if (focusManager)
+		{
+			addActivateHandlers();
+		}
+		else
+		{
+			// if no focusmanager yet, add capture phase to detect when it
+			// gets added
+			if (systemManager)
+			{
+				systemManager.getSandboxRoot().addEventListener(
+					FlexEvent.ADD_FOCUS_MANAGER, addFocusManagerHandler, true, 0, true);
+			}
+			else
+			{
+				// no systemManager yet?  Check again when added to stage
+				addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
+			}
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+    override protected function partAdded(partName:String, instance:Object) : void
+    {
+        super.partAdded(partName, instance);
+
+        if (instance == moveArea)
+		{
+			moveArea.addEventListener(MouseEvent.MOUSE_DOWN, moveArea_mouseDownHandler);
+		}
+		else if (instance == closeButton)
+		{
+			closeButton.focusEnabled = false;
+			closeButton.addEventListener(MouseEvent.CLICK, closeButton_clickHandler);
+		}
+    }
+
+	/**
+	 *  @private
+	 */
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
+		super.partRemoved(partName, instance);
+
+        if (instance == moveArea)
+			moveArea.removeEventListener(MouseEvent.MOUSE_DOWN, moveArea_mouseDownHandler);
+		else if (instance == closeButton)
+            closeButton.removeEventListener(MouseEvent.CLICK, closeButton_clickHandler);
+    }
+
+	/**
+	 *  @inheritDoc
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
+	 */
+	override protected function getCurrentSkinState():String
+	{
+		// In focus window is the active window.
+		if (enabled && isPopUp && active)
+		{
+			var state:String = "active";
+
+			if (controlBarGroup)
+			{
+				if (BitFlagUtil.isSet(controlBarGroupProperties as uint, CONTROLBAR_PROPERTY_FLAG) &&
+					BitFlagUtil.isSet(controlBarGroupProperties as uint, VISIBLE_PROPERTY_FLAG))
+					state += "WithControlBar";
+			}
+			else
+			{
+				if (controlBarGroupProperties.controlBarContent &&
+					controlBarGroupProperties.visible)
+					state += "WithControlBar";
+			}
+
+			return state;
+		}
+
+		return super.getCurrentSkinState();
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function move(x:Number, y:Number) : void
+	{
+		var beforeBounds:Rectangle = new Rectangle(this.x, this.y, width, height);
+
+		super.move(x, y);
+
+		// Dispatch "windowMove" event when TitleWindow is moved.
+		var afterBounds:Rectangle = new Rectangle(this.x, this.y, width, height);
+		var e2:TitleWindowBoundsEvent =
+			new TitleWindowBoundsEvent(TitleWindowBoundsEvent.WINDOW_MOVE,
+									   false, false, beforeBounds, afterBounds);
+
+		dispatchEvent(e2);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	// Event Handlers
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  moveArea Handlers
+	//----------------------------------
+
+    /**
+     *  @private
+	 *  Handle mouseDown events on the moveArea
+     */
+    protected function moveArea_mouseDownHandler(event:MouseEvent):void
+    {
+		// Only allow dragging of pop-upped windows
+        if (enabled && isPopUp)
+		{
+			// Dispatch cancelable "windowMoveStart" event
+			startBounds = new Rectangle(x, y, width, height);
+			var startEvent:TitleWindowBoundsEvent =
+				new TitleWindowBoundsEvent(TitleWindowBoundsEvent.WINDOW_MOVE_START,
+										   false, true, startBounds, null);
+			dispatchEvent(startEvent);
+
+			// Start dragging if the move isn't canceled
+			if(!(startEvent.isDefaultPrevented()))
+			{
+				// Calculate the mouse's offset in the window
+				// TODO (klin): Investigate globalToLocal method
+				offsetX = event.stageX - x;
+				offsetY = event.stageY - y;
+
+				var sbRoot:DisplayObject = systemManager.getSandboxRoot();
+
+				sbRoot.addEventListener(
+					MouseEvent.MOUSE_MOVE, moveArea_mouseMoveHandler, true);
+				sbRoot.addEventListener(
+					MouseEvent.MOUSE_UP, moveArea_mouseUpHandler, true);
+				sbRoot.addEventListener(
+					SandboxMouseEvent.MOUSE_UP_SOMEWHERE, moveArea_mouseUpHandler);
+
+				// add the mouse shield so we can drag over untrusted applications.
+				systemManager.deployMouseShields(true);
+			}
+			else
+			{
+				startBounds = null;
+			}
+		}
+    }
+
+	/**
+	 *  @private
+	 */
+	protected function moveArea_mouseMoveHandler(event:MouseEvent):void
+	{
+		// Dispatch cancelable "windowMoving" event with before and after bounds.
+		var beforeBounds:Rectangle = new Rectangle(x, y, width, height);
+		var afterBounds:Rectangle =
+			new Rectangle(Math.round(event.stageX - offsetX),
+						  Math.round(event.stageY - offsetY),
+						  width, height);
+
+		var e1:TitleWindowBoundsEvent =
+			new TitleWindowBoundsEvent(TitleWindowBoundsEvent.WINDOW_MOVING,
+									   false, true, beforeBounds, afterBounds);
+		dispatchEvent(e1);
+
+		// Move only if not canceled.
+		if (!(e1.isDefaultPrevented()))
+			move(afterBounds.x, afterBounds.y);
+
+		event.updateAfterEvent();
+	}
+
+	/**
+	 *  @private
+	 */
+	protected function moveArea_mouseUpHandler(event:Event):void
+	{
+		var sbRoot:DisplayObject = systemManager.getSandboxRoot();
+
+		sbRoot.removeEventListener(
+			MouseEvent.MOUSE_MOVE, moveArea_mouseMoveHandler, true);
+		sbRoot.removeEventListener(
+			MouseEvent.MOUSE_UP, moveArea_mouseUpHandler, true);
+		sbRoot.removeEventListener(
+			SandboxMouseEvent.MOUSE_UP_SOMEWHERE, moveArea_mouseUpHandler);
+
+		systemManager.deployMouseShields(false);
+
+		// Dispatch "windowMoveEnd" event with the starting bounds and current bounds.
+		var endEvent:TitleWindowBoundsEvent =
+			new TitleWindowBoundsEvent(TitleWindowBoundsEvent.WINDOW_MOVE_END,
+									   false, false, startBounds,
+									   new Rectangle(x, y, width, height));
+		dispatchEvent(endEvent);
+
+		offsetX = NaN;
+		offsetY = NaN;
+		startBounds = null;
+	}
+
+	//----------------------------------
+	//  closeButton Handler
+	//----------------------------------
+
+    /**
+     *  @private
+	 *  Dispatches the "close" event when the closeButton
+	 *  is clicked.
+     */
+    protected function closeButton_clickHandler(event:MouseEvent):void
+    {
+        dispatchEvent(new CloseEvent(CloseEvent.CLOSE));
+    }
+
+	//----------------------------------
+	//  Active Window Handlers and helper methods
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+    private function activateHandler(event:Event):void
+    {
+        active = true;
+        invalidateSkinState();
+    }
+
+	/**
+	 *  @private
+	 */
+    private function deactivateHandler(event:Event):void
+    {
+        active = false;
+        invalidateSkinState();
+    }
+
+	/**
+	 *  @private
+	 *  add listeners to focusManager
+	 */
+	private function addActivateHandlers():void
+	{
+		focusManager.addEventListener(FlexEvent.FLEX_WINDOW_ACTIVATE,
+			activateHandler, false, 0, true);
+		focusManager.addEventListener(FlexEvent.FLEX_WINDOW_DEACTIVATE,
+			deactivateHandler, false, 0, true);
+	}
+
+	/**
+	 *  @private
+	 *  find the right time to listen to the focusmanager
+	 */
+	private function addedToStageHandler(event:Event):void
+	{
+		if (event.target == this)
+		{
+			removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
+			callLater(addActivateHandlers);
+		}
+	}
+
+	/**
+	 *  @private
+	 *  Called when a FocusManager is added to an IFocusManagerContainer.
+	 *  We need to check that it belongs to us before listening to it.
+	 *  Because we listen to sandboxroot, you cannot assume the type of
+	 *  the event.
+	 */
+	private function addFocusManagerHandler(event:Event):void
+	{
+		if (focusManager == event.target["focusManager"])
+		{
+			systemManager.getSandboxRoot().removeEventListener(FlexEvent.ADD_FOCUS_MANAGER,
+				addFocusManagerHandler, true);
+			addActivateHandlers();
+		}
+	}
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/MenuBarAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/MenuBarAutomationImpl.as
@@ -0,0 +1,313 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.automation.delegates.controls
+{
+
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import flash.events.MouseEvent;
+
+	import mx.automation.Automation;
+	import mx.automation.AutomationIDPart;
+	import mx.automation.IAutomationManager;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationObjectHelper;
+	import mx.automation.tabularData.MenuBarTabularData;
+	import mx.automation.delegates.core.UIComponentAutomationImpl;
+	import mx.controls.Menu;
+	import mx.controls.MenuBar;
+	import mx.controls.menuClasses.MenuBarItem;
+	import mx.core.mx_internal;
+	import mx.events.MenuEvent;
+	import mx.automation.events.MenuShowEvent;
+	import mx.controls.menuClasses.IMenuBarItemRenderer;
+	import mx.core.EventPriority;
+	import mx.core.UIComponent;
+
+	use namespace mx_internal;
+
+	[Mixin]
+
+	/**
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  MenuBar control.
+	 *
+	 *  @see mx.controls.MenuBar
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class MenuBarAutomationImpl extends UIComponentAutomationImpl
+	{
+		include "../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(MenuBar, MenuBarAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 *
+		 *  @param obj MenuBar object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function MenuBarAutomationImpl(obj:MenuBar)
+		{
+			super(obj);
+
+			obj.addEventListener(MenuEvent.MENU_SHOW, menuShowHandler,
+				false, 0, true);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Properties
+		//
+		//--------------------------------------------------------------------------
+
+		//----------------------------------
+		//  menuBar
+		//----------------------------------
+
+		/**
+		 *  @private
+		 *  storage for the owner component
+		 */
+		protected function get menuBar():MenuBar
+		{
+			return uiComponent as MenuBar;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function createAutomationIDPart(
+			child:IAutomationObject):Object
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help ? help.helpCreateIDPart(uiAutomationObject, child) : null;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help ? help.helpCreateIDPartWithRequiredProperties(uiAutomationObject, child,properties) : null;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function resolveAutomationIDPart(part:Object):Array
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help ? help.helpResolveIDPart(uiAutomationObject, part) : null;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function get numAutomationChildren():int
+		{
+			var itemCount:int = menuBar.menuBarItems.length;
+
+			// add menus present
+			var menuCount:int = 0;
+			var n:int = menuBar.menus.length;
+			for (var i:int = 0; i < n; ++i)
+			{
+				if (menuBar.menus[i])
+					++menuCount;
+			}
+
+			return itemCount + menuCount;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function getAutomationChildAt(index:int):IAutomationObject
+		{
+			if (index < menuBar.menuBarItems.length)
+				return menuBar.menuBarItems[index] as IAutomationObject;
+
+			var menuIndex:int = index - menuBar.menuBarItems.length;
+
+			// count the menus present and match it with the index
+			var menuCount:int = 0;
+			var i:int;
+			var n:int = menuBar.menus.length;
+			for (i = 0; i < n; ++i)
+			{   if (menuBar.menus[i])
+			{
+				if (menuCount == menuIndex)
+					break;
+				++menuCount;
+			}
+			}
+
+			return menuBar.menus[i] as IAutomationObject;
+		}
+
+
+		/**
+		 * @private
+		 */
+		override public function getAutomationChildren():Array
+		{
+			// get menuBarItems
+			var childList:Array = new Array();
+			var tempArray1:Array = menuBar.menuBarItems;
+			var n:int = 0;
+			var i:int = 0;
+			if (tempArray1)
+			{
+				n = tempArray1.length;
+				for(i = 0; i< n ; i++)
+				{
+					childList.push(tempArray1[i]);
+				}
+			}
+
+
+			// get  menuBar.menus
+			var tempArr:Array =  menuBar.menus;
+			if(tempArr)
+			{
+				n  = tempArr.length;
+				for (i= 0; i < n ; i++)
+				{
+					childList.push(tempArr[i] as  IAutomationObject);
+				}
+			}
+
+			return childList;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function get automationTabularData():Object
+		{
+			return new MenuBarTabularData(uiAutomationObject);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Event handlers
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		private function menuShowHandler(event:MenuEvent):void
+		{
+			// if menu is having a parent menu showing is recorded
+			// by the parent.
+			if (event.menu.parentMenu)
+				return;
+
+			if (event.target == uiComponent)
+			{
+				var itemRenderer:IMenuBarItemRenderer;
+				var menus:Array = menuBar.menus;
+
+				var n:int = menus.length;
+				for (var i:int = 0; i < n; ++i)
+				{
+					if (menus[i] == event.menu)
+					{
+						itemRenderer = menus[i].sourceMenuBarItem;
+						break;
+					}
+				}
+
+				if (itemRenderer)
+				{
+					var msEvent:MenuShowEvent = new MenuShowEvent(MenuShowEvent.MENU_SHOW, itemRenderer);
+					recordAutomatableEvent(msEvent);
+				}
+			}
+		}
+
+		/**
+		 *  @private
+		 *  Replays the event specified by the parameter if possible.
+		 *
+		 *  @param interaction The event to replay.
+		 *
+		 *  @return Whether or not a replay was successful.
+		 */
+		override public function replayAutomatableEvent(interaction:Event):Boolean
+		{
+			if (interaction is MenuShowEvent)
+			{
+				var me:MenuShowEvent = MenuShowEvent(interaction);
+				switch (interaction.type)
+				{
+					case MenuShowEvent.MENU_SHOW:
+					{
+						var menuBarItem:UIComponent = me.itemRenderer as UIComponent;
+						menuBarItem.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
+						if (menuBar.selectedIndex == -1)
+						{
+							menuBarItem.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_DOWN));
+						}
+						return true;
+					}
+				}
+			}
+
+			return super.replayAutomatableEvent(interaction);
+		}
+
+	}
+
+}


use SamplerFiltering.NEAREST for shadow map sampling

--- src/aerys/minko/render/shader/part/phong/attenuation/MatrixShadowMapAttenuationShaderPart.as
+++ src/aerys/minko/render/shader/part/phong/attenuation/MatrixShadowMapAttenuationShaderPart.as
@@ -40,7 +40,7 @@
 			var depthMap	: SFloat = getLightTextureParameter(
 				lightId,
 				'shadowMap',
-				SamplerFiltering.LINEAR,
+				SamplerFiltering.NEAREST,
 				SamplerMipMapping.DISABLE,
 				SamplerWrapping.CLAMP
 			);


showBorder API for IsoView - http://code.google.com/p/as3isolib/issues/detail?id=12

jwopitz

--- fp9/src/as3isolib/display/IsoView.as
+++ fp9/src/as3isolib/display/IsoView.as
@@ -38,6 +38,7 @@
 	import as3isolib.geom.Pt;

 	import flash.display.DisplayObject;
+	import flash.display.Graphics;
 	import flash.display.Shape;
 	import flash.display.Sprite;
 	import flash.geom.Point;
@@ -634,9 +635,7 @@
 				_mask.graphics.endFill();
 			} */

-			borderShape.graphics.clear();
-			borderShape.graphics.lineStyle(0);
-			borderShape.graphics.drawRect(0, 0, _w, _h);
+			drawBorder();

 			//for testing only - adds crosshairs to view border
 			/* _border.graphics.moveTo(0, 0);
@@ -787,6 +786,48 @@
 		private var maskShape:Shape;
 		private var borderShape:Shape;

+		/////////////////////////////////////////////////////////////////
+		//	SHOW BORDER
+		/////////////////////////////////////////////////////////////////
+
+		private var _showBorder:Boolean = true;
+
+		/**
+		 * @private
+		 */
+		[Bindable("showBorderChanged")]
+		public function get showBorder ():Boolean
+		{
+			return _showBorder;
+		}
+
+		/**
+		 * Flag indicating if the view's border is visible.
+		 */
+		public function set showBorder (value:Boolean):void
+		{
+			if (_showBorder != value)
+			{
+				_showBorder = value;
+				drawBorder();
+			}
+		}
+
+		/**
+		 * @private
+		 */
+		protected function drawBorder ():void
+		{
+			var g:Graphics = borderShape.graphics;
+			g.clear();
+
+			if (showBorder)
+			{
+				g.lineStyle(0);
+				g.drawRect(0, 0, _w, _h);
+			}
+		}
+
 		///////////////////////////////////////////////////////////////////////////////
 		//	CONSTRUCTOR
 		///////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 18132
Author:   chiedozi@adobe.com
Date:     2010-10-11T22:53:35.893132Z

Log Message:
-----------
View's navigator property is now a read-only getter
ViewNavigator's transitionsEnabled and useDefaultTransitions public vars are now public getters and setters

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewDescriptor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as
@@ -78,9 +78,7 @@

     /**
      *  Flag indicating whether the navigator is active.  The parent navigator
-     *  will automatically set this flag to true or false as its state changes.
-     *  This getter will dispatch FlexEvent.NAVIGATOR_ACTIVATE and
-     *  FlexEvent.NAVIGATOR_DEACTIVATE as the value changes.
+     *  will automatically set this flag to true or false as its state changes.
      *
      *  @default true
      *
@@ -410,6 +408,8 @@
     //  transitionsEnabled
     //----------------------------------

+    private var _transitionsEnabled:Boolean = true;
+
     /**
      *  Flag indicating whether transitions are played by the
      *  navigator when a view changes or when the actionBar or tab bar
@@ -422,15 +422,32 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public var transitionsEnabled:Boolean = true;
+    public function get transitionsEnabled():Boolean
+    {
+        return _transitionsEnabled;
+    }
+
+    /**
+     *  @private
+     */
+    public function set transitionsEnabled(value:Boolean):void
+    {
+        _transitionsEnabled = value;
+    }

     //----------------------------------
     //  useDefaultTransitions
     //----------------------------------

-    // TODO (chiedozi): PARB name, Getters/Setters
-    /**
-     *
+    private var _useDefaultTransitions:Boolean = true;
+
+    /**
+     *  This flag indicates whether the navigator should play its
+     *  built-in default animations for its navigation operations.
+     *  If set to false, animations will not be played when a view
+     *  is changed unless passed as the transition parameter
+     *  for one of the navigation operations.
+     *
      *  @default true
      *
      *  @langversion 3.0
@@ -438,7 +455,18 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public var useDefaultTransitions:Boolean = true;
+    public function get useDefaultTransitions():Boolean
+    {
+        return _useDefaultTransitions;
+    }
+
+    /**
+     *  @private
+     */
+    public function set useDefaultTransitions(value:Boolean):void
+    {
+        _useDefaultTransitions = value;
+    }

     //--------------------------------------------------------------------------
     //


updated documentation

updated documentation

--- frameworks/projects/framework/src/mx/formatters/DateFormatter.as
+++ frameworks/projects/framework/src/mx/formatters/DateFormatter.as
@@ -62,7 +62,7 @@
  *
  *  <pre>
  *  <mx:DateFormatter
- *    formatString="Y|M|D|A|E|H|J|K|L|N|S|Q"
+ *    formatString="Y|M|D|A|E|H|J|K|L|N|S|Q|O|Z"
  *   />
  *  </pre>
  *


Updated FragmentFilter2D class.

Updated FragmentFilter2D class.

--- src/engine/tetragon/view/render2d/filters/FragmentFilter2D.as
+++ src/engine/tetragon/view/render2d/filters/FragmentFilter2D.as
@@ -39,7 +39,6 @@
 	import tetragon.view.render2d.events.Event2D;
 	import tetragon.view.render2d.textures.Texture2D;

-	import com.hexagonstar.exception.AbstractClassException;
 	import com.hexagonstar.exception.MissingContext3DException;
 	import com.hexagonstar.util.geom.MatrixUtil;
 	import com.hexagonstar.util.geom.RectangleUtil;
@@ -54,8 +53,6 @@
 	import flash.errors.IllegalOperationError;
 	import flash.geom.Matrix;
 	import flash.geom.Rectangle;
-	import flash.system.Capabilities;
-	import flash.utils.getQualifiedClassName;

 	/** The FragmentFilter class is the base class for all filter effects in Render2D.
@@ -85,183 +82,407 @@
 	 */
 	public class FragmentFilter2D
 	{
+		//-----------------------------------------------------------------------------------------
+		// Constants
+		//-----------------------------------------------------------------------------------------
+
 		/** All filter processing is expected to be done with premultiplied alpha. */
 		protected const PMA:Boolean = true;
-		/** The standard vertex shader code. It will be used automatically if you don't create
-		 *  a custom vertex shader yourself. */
-		protected const STD_VERTEX_SHADER:String = "m44 op, va0, vc0 \n" + // 4x4 matrix transform to output space
-		"mov v0, va1      \n";
-		// pass texture coordinates to fragment program
-		/** The standard fragment shader code. It just forwards the texture color to the output. */
-		protected const STD_FRAGMENT_SHADER:String = "tex oc, v0, fs0 <2d, clamp, linear, mipnone>";
-		// just forward texture color
-		private var mVertexPosAtID:int = 0;
-		private var mTexCoordsAtID:int = 1;
-		private var mBaseTextureID:int = 0;
-		private var mMvpConstantID:int = 0;
-		private var mNumPasses:int;
-		private var mPassTextures:Vector.<Texture2D>;
-		private var mMode:String;
-		private var mResolution:Number;
-		private var mMarginX:Number;
-		private var mMarginY:Number;
-		private var mOffsetX:Number;
-		private var mOffsetY:Number;
-		private var mVertexData:VertexData2D;
-		private var mVertexBuffer:VertexBuffer3D;
-		private var mIndexData:Vector.<uint>;
-		private var mIndexBuffer:IndexBuffer3D;
-		private var mCacheRequested:Boolean;
-		private var mCache:QuadBatch2D;
+
+		/**
+		 * The standard vertex shader code. It will be used automatically if you don't create
+		 * a custom vertex shader yourself.
+		 */
+		protected const STD_VERTEX_SHADER:String =
+			"m44 op, va0, vc0 \n" +	// 4x4 matrix transform to output space
+			"mov v0, va1      \n";	// pass texture coordinates to fragment program
+
+		/**
+		 * The standard fragment shader code. It just forwards the texture color to the output.
+		 */
+		protected const STD_FRAGMENT_SHADER:String =
+			"tex oc, v0, fs0 <2d, clamp, linear, mipnone>";	// just forward texture color
+
+
+		//-----------------------------------------------------------------------------------------
+		// Properties
+		//-----------------------------------------------------------------------------------------
+
+		private var _vertexPosAtID:int = 0;
+		private var _texCoordsAtID:int = 1;
+		private var _baseTextureID:int = 0;
+		private var _mvpConstantID:int = 0;
+		private var _numPasses:int;
+		private var _passTextures:Vector.<Texture2D>;
+		private var _mode:String;
+		private var _resolution:Number;
+		private var _marginX:Number;
+		private var _marginY:Number;
+		private var _offsetX:Number;
+		private var _offsetY:Number;
+		private var _vertexData:VertexData2D;
+		private var _vertexBuffer:VertexBuffer3D;
+		private var _indexData:Vector.<uint>;
+		private var _indexBuffer:IndexBuffer3D;
+		private var _cacheRequested:Boolean;
+		private var _cache:QuadBatch2D;
+
 		/** helper objects. */
-		private var mProjMatrix:Matrix = new Matrix();
-		private static var sBounds:Rectangle = new Rectangle();
-		private static var sStageBounds:Rectangle = new Rectangle();
-		private static var sTransformationMatrix:Matrix = new Matrix();
-
-
-		/** Creates a new Fragment filter with the specified number of passes and resolution.
-		 *  This constructor may only be called by the constructor of a subclass. */
+		private var _projMatrix:Matrix = new Matrix();
+		private static var _bounds:Rectangle = new Rectangle();
+		private static var _stageBounds:Rectangle = new Rectangle();
+		private static var _transformationMatrix:Matrix = new Matrix();
+
+
+		//-----------------------------------------------------------------------------------------
+		// Constructor
+		//-----------------------------------------------------------------------------------------
+
+		/**
+		 * Creates a new Fragment filter with the specified number of passes and resolution.
+		 * This constructor may only be called by the constructor of a subclass.
+		 *
+		 * @param numPasses
+		 * @param resolution
+		 */
 		public function FragmentFilter2D(numPasses:int = 1, resolution:Number = 1.0)
 		{
-			if (Capabilities.isDebugger && getQualifiedClassName(this) == "Render2D.filters::FragmentFilter")
-			{
-				throw new AbstractClassException(this);
-			}
-
 			if (numPasses < 1) throw new ArgumentError("At least one pass is required.");
-
-			mNumPasses = numPasses;
-			mMarginX = mMarginY = 0.0;
-			mOffsetX = mOffsetY = 0;
-			mResolution = resolution;
-			mMode = FragmentFilterMode2D.REPLACE;
-
-			mVertexData = new VertexData2D(4);
-			mVertexData.setTexCoords(0, 0, 0);
-			mVertexData.setTexCoords(1, 1, 0);
-			mVertexData.setTexCoords(2, 0, 1);
-			mVertexData.setTexCoords(3, 1, 1);
-
-			mIndexData = new <uint>[0, 1, 2, 1, 3, 2];
-			mIndexData.fixed = true;
-
+
+			_numPasses = numPasses;
+			_resolution = resolution;
+
+			_marginX = _marginY = 0.0;
+			_offsetX = _offsetY = 0.0;
+			_mode = FragmentFilterMode2D.REPLACE;
+
+			_vertexData = new VertexData2D(4);
+			_vertexData.setTexCoords(0, 0, 0);
+			_vertexData.setTexCoords(1, 1, 0);
+			_vertexData.setTexCoords(2, 0, 1);
+			_vertexData.setTexCoords(3, 1, 1);
+
+			_indexData = new <uint>[0, 1, 2, 1, 3, 2];
+			_indexData.fixed = true;
+
 			createPrograms();
-
+
 			// Handle lost context. By using the conventional event, we can make it weak; this
 			// avoids memory leaks when people forget to call "dispose" on the filter.
-			Render2D.current.stage3D.addEventListener(Event2D.CONTEXT3D_CREATE, onContextCreated, false, 0, true);
-		}
-
-
+			Render2D.current.stage3D.addEventListener(Event2D.CONTEXT3D_CREATE,
+				onContextCreated, false, 0, true);
+		}
+
+
+		//-----------------------------------------------------------------------------------------
+		// Public Methods
+		//-----------------------------------------------------------------------------------------
+
 		/** Disposes the filter (programs, buffers, textures). */
 		public function dispose():void
 		{
 			Render2D.current.stage3D.removeEventListener(Event2D.CONTEXT3D_CREATE, onContextCreated);
-			if (mVertexBuffer) mVertexBuffer.dispose();
-			if (mIndexBuffer) mIndexBuffer.dispose();
+			if (_vertexBuffer) _vertexBuffer.dispose();
+			if (_indexBuffer) _indexBuffer.dispose();
 			disposePassTextures();
 			disposeCache();
 		}
-
-
-		private function onContextCreated(event:Object):void
-		{
-			mVertexBuffer = null;
-			mIndexBuffer = null;
-			mPassTextures = null;
-
-			createPrograms();
-		}
-
-
+
+
 		/** Applies the filter on a certain display object, rendering the output into the current
 		 *  render target. This method is called automatically by Render2D's rendering system
 		 *  for the object the filter is attached to. */
-		public function render(object:DisplayObject2D, support:RenderSupport2D, parentAlpha:Number):void
+		public function render(object:DisplayObject2D, support:RenderSupport2D,
+			parentAlpha:Number):void
 		{
 			// bottom layer
-
 			if (mode == FragmentFilterMode2D.ABOVE)
+			{
 				object.render(support, parentAlpha);
-
+			}
 			// center layer
-
-			if (mCacheRequested)
-			{
-				mCacheRequested = false;
-				mCache = renderPasses(object, support, 1.0, true);
+			if (_cacheRequested)
+			{
+				_cacheRequested = false;
+				_cache = renderPasses(object, support, 1.0, true);
 				disposePassTextures();
 			}
-
-			if (mCache)
-				mCache.render(support, parentAlpha);
+
+			if (_cache) _cache.render(support, parentAlpha);
+			else renderPasses(object, support, parentAlpha, false);
+
+			// top layer
+			if (mode == FragmentFilterMode2D.BELOW)
+			{
+				object.render(support, parentAlpha);
+			}
+		}
+
+
+		/** Caches the filter output into a texture. An uncached filter is rendered in every frame;
+		 *  a cached filter only once. However, if the filtered object or the filter settings
+		 *  change, it has to be updated manually; to do that, call "cache" again. */
+		public function cache():void
+		{
+			_cacheRequested = true;
+			disposeCache();
+		}
+
+
+		/** Clears the cached output of the filter. After calling this method, the filter will
+		 *  be executed once per frame again. */
+		public function clearCache():void
+		{
+			_cacheRequested = false;
+			disposeCache();
+		}
+
+
+		/** @private */
+		public function compile(object:DisplayObject2D):QuadBatch2D
+		{
+			if (_cache) return _cache;
 			else
-				renderPasses(object, support, parentAlpha, false);
-
-			// top layer
-
-			if (mode == FragmentFilterMode2D.BELOW)
-				object.render(support, parentAlpha);
-		}
-
-
-		private function renderPasses(object:DisplayObject2D, support:RenderSupport2D, parentAlpha:Number, intoCache:Boolean = false):QuadBatch2D
+			{
+				var renderSupport:RenderSupport2D;
+				var stage:Stage2D = object.stage;
+
+				if (stage == null)
+					throw new Error("Filtered object must be on the stage.");
+
+				renderSupport = new RenderSupport2D();
+				object.getTransformationMatrix(stage, renderSupport.modelViewMatrix);
+				return renderPasses(object, renderSupport, 1.0, true);
+			}
+		}
+
+
+		//-----------------------------------------------------------------------------------------
+		// Accessors
+		//-----------------------------------------------------------------------------------------
+
+		/** Indicates if the filter is cached (via the "cache" method). */
+		public function get isCached():Boolean
+		{
+			return (_cache != null) || _cacheRequested;
+		}
+
+
+		/** The resolution of the filter texture. "1" means stage resolution, "0.5" half the
+		 *  stage resolution. A lower resolution saves memory and execution time (depending on
+		 *  the GPU), but results in a lower output quality. Values greater than 1 are allowed;
+		 *  such values might make sense for a cached filter when it is scaled up. @default 1 */
+		public function get resolution():Number
+		{
+			return _resolution;
+		}
+		public function set resolution(v:Number):void
+		{
+			if (v <= 0) throw new ArgumentError("Resolution must be > 0");
+			else _resolution = v;
+		}
+
+
+		/** The filter mode, which is one of the constants defined in the "FragmentFilterMode"
+		 *  class. @default "replace" */
+		public function get mode():String
+		{
+			return _mode;
+		}
+		public function set mode(v:String):void
+		{
+			_mode = v;
+		}
+
+
+		/** Use the x-offset to move the filter output to the right or left. */
+		public function get offsetX():Number
+		{
+			return _offsetX;
+		}
+		public function set offsetX(v:Number):void
+		{
+			_offsetX = v;
+		}
+
+
+		/** Use the y-offset to move the filter output to the top or bottom. */
+		public function get offsetY():Number
+		{
+			return _offsetY;
+		}
+		public function set offsetY(v:Number):void
+		{
+			_offsetY = v;
+		}
+
+
+		/** The x-margin will extend the size of the filter texture along the x-axis.
+		 *  Useful when the filter will "grow" the rendered object. */
+		protected function get marginX():Number
+		{
+			return _marginX;
+		}
+		protected function set marginX(v:Number):void
+		{
+			_marginX = v;
+		}
+
+
+		/** The y-margin will extend the size of the filter texture along the y-axis.
+		 *  Useful when the filter will "grow" the rendered object. */
+		protected function get marginY():Number
+		{
+			return _marginY;
+		}
+		protected function set marginY(v:Number):void
+		{
+			_marginY = v;
+		}
+
+
+		/** The number of passes the filter is applied. The "activate" and "deactivate" methods
+		 *  will be called that often. */
+		protected function set numPasses(v:int):void
+		{
+			_numPasses = v;
+		}
+		protected function get numPasses():int
+		{
+			return _numPasses;
+		}
+
+
+		/** The ID of the vertex buffer attribute that stores the vertex position. */
+		protected final function get vertexPosAtID():int
+		{
+			return _vertexPosAtID;
+		}
+		protected final function set vertexPosAtID(v:int):void
+		{
+			_vertexPosAtID = v;
+		}
+
+
+		/** The ID of the vertex buffer attribute that stores the texture coordinates. */
+		protected final function get texCoordsAtID():int
+		{
+			return _texCoordsAtID;
+		}
+		protected final function set texCoordsAtID(v:int):void
+		{
+			_texCoordsAtID = v;
+		}
+
+
+		/** The ID (sampler) of the input texture (containing the output of the previous pass). */
+		protected final function get baseTextureID():int
+		{
+			return _baseTextureID;
+		}
+		protected final function set baseTextureID(v:int):void
+		{
+			_baseTextureID = v;
+		}
+
+
+		/** The ID of the first register of the modelview-projection constant (a 4x4 matrix). */
+		protected final function get mvpConstantID():int
+		{
+			return _mvpConstantID;
+		}
+		protected final function set mvpConstantID(v:int):void
+		{
+			_mvpConstantID = v;
+		}
+
+
+		//-----------------------------------------------------------------------------------------
+		// Callback Handlers
+		//-----------------------------------------------------------------------------------------
+
+		/**
+		 * @private
+		 */
+		private function onContextCreated(event:Object):void
+		{
+			_vertexBuffer = null;
+			_indexBuffer = null;
+			_passTextures = null;
+			createPrograms();
+		}
+
+
+		//-----------------------------------------------------------------------------------------
+		// Private Methods
+		//-----------------------------------------------------------------------------------------
+
+		/**
+		 * @private
+		 */
+		private function renderPasses(object:DisplayObject2D, support:RenderSupport2D,
+			parentAlpha:Number, intoCache:Boolean = false):QuadBatch2D
 		{
 			var cacheTexture:Texture2D = null;
 			var stage:Stage2D = object.stage;
 			var context:Context3D = Render2D.context;
 			var scale:Number = Render2D.current.contentScaleFactor;
-
-			if (stage == null) throw new Error("Filtered object must be on the stage.");
-			if (context == null) throw new MissingContext3DException();
-
+
+			if (!stage) throw new Error("Filtered object must be on the stage.");
+			if (!context) throw new MissingContext3DException();
+
 			// the bounds of the object in stage coordinates
-			calculateBounds(object, stage, !intoCache, sBounds);
-
-			if (sBounds.isEmpty())
+			calculateBounds(object, stage, !intoCache, _bounds);
+
+			if (_bounds.isEmpty())
 			{
 				disposePassTextures();
 				return intoCache ? new QuadBatch2D() : null;
 			}

-			updateBuffers(context, sBounds);
-			updatePassTextures(sBounds.width, sBounds.height, mResolution * scale);
+			updateBuffers(context, _bounds);
+			updatePassTextures(_bounds.width, _bounds.height, _resolution * scale);

 			support.finishQuadBatch();
-			support.raiseDrawCount(mNumPasses);
+			support.raiseDrawCount(_numPasses);
 			support.pushMatrix();

 			// save original projection matrix and render target
-			mProjMatrix.copyFrom(support.projectionMatrix);
+			_projMatrix.copyFrom(support.projectionMatrix);
 			var previousRenderTarget:Texture2D = support.renderTarget;

 			if (previousRenderTarget)
-				throw new IllegalOperationError("It's currently not possible to stack filters! " + "This limitation will be removed in a future Stage3D version.");
+			{
+				throw new IllegalOperationError("It's currently not possible to stack filters! "
+					+ "This limitation will be removed in a future Stage3D version.");
+			}

 			if (intoCache)
-				cacheTexture = Texture2D.empty(sBounds.width, sBounds.height, PMA, true, mResolution * scale);
+			{
+				cacheTexture = Texture2D.empty(_bounds.width, _bounds.height, PMA, true,
+					_resolution * scale);
+			}

 			// draw the original object into a texture
-			support.renderTarget = mPassTextures[0];
+			support.renderTarget = _passTextures[0];
 			support.clear();
 			support.blendMode = BlendMode2D.NORMAL;
-			support.setOrthographicProjection(sBounds.x, sBounds.y, sBounds.width, sBounds.height);
+			support.setOrthographicProjection(_bounds.x, _bounds.y, _bounds.width, _bounds.height);
 			object.render(support, parentAlpha);
 			support.finishQuadBatch();

 			// prepare drawing of actual filter passes
 			RenderSupport2D.setBlendFactors(PMA);
 			support.loadIdentity();
+
 			// now we'll draw in stage coordinates!
-
-			context.setVertexBufferAt(mVertexPosAtID, mVertexBuffer, VertexData2D.POSITION_OFFSET, Context3DVertexBufferFormat.FLOAT_2);
-			context.setVertexBufferAt(mTexCoordsAtID, mVertexBuffer, VertexData2D.TEXCOORD_OFFSET, Context3DVertexBufferFormat.FLOAT_2);
+			context.setVertexBufferAt(_vertexPosAtID, _vertexBuffer, VertexData2D.POSITION_OFFSET, Context3DVertexBufferFormat.FLOAT_2);
+			context.setVertexBufferAt(_texCoordsAtID, _vertexBuffer, VertexData2D.TEXCOORD_OFFSET, Context3DVertexBufferFormat.FLOAT_2);

 			// draw all passes
-			for (var i:int = 0; i < mNumPasses; ++i)
-			{
-				if (i < mNumPasses - 1) // intermediate pass
+			for (var i:int = 0; i < _numPasses; ++i)
+			{
+				if (i < _numPasses - 1) // intermediate pass
 				{
 					// draw into pass texture
 					support.renderTarget = getPassTexture(i + 1);
@@ -279,9 +500,9 @@
 					{
 						// draw into back buffer, at original (stage) coordinates
 						support.renderTarget = previousRenderTarget;
-						support.projectionMatrix.copyFrom(mProjMatrix);
+						support.projectionMatrix.copyFrom(_projMatrix);
 						// restore projection matrix
-						support.translateMatrix(mOffsetX, mOffsetY);
+						support.translateMatrix(_offsetX, _offsetY);
 						support.blendMode = object.blendMode;
 						support.applyBlendMode(PMA);
 					}
@@ -289,18 +510,18 @@

 				var passTexture:Texture2D = getPassTexture(i);

-				context.setProgramConstantsFromMatrix(Context3DProgramType.VERTEX, mMvpConstantID, support.mvpMatrix3D, true);
-				context.setTextureAt(mBaseTextureID, passTexture.base);
+				context.setProgramConstantsFromMatrix(Context3DProgramType.VERTEX, _mvpConstantID, support.mvpMatrix3D, true);
+				context.setTextureAt(_baseTextureID, passTexture.base);

 				activate(i, context, passTexture);
-				context.drawTriangles(mIndexBuffer, 0, 2);
+				context.drawTriangles(_indexBuffer, 0, 2);
 				deactivate(i, context, passTexture);
 			}

 			// reset shader attributes
-			context.setVertexBufferAt(mVertexPosAtID, null);
-			context.setVertexBufferAt(mTexCoordsAtID, null);
-			context.setTextureAt(mBaseTextureID, null);
+			context.setVertexBufferAt(_vertexPosAtID, null);
+			context.setVertexBufferAt(_texCoordsAtID, null);
+			context.setTextureAt(_baseTextureID, null);

 			support.popMatrix();

@@ -308,7 +529,7 @@
 			{
 				// restore support settings
 				support.renderTarget = previousRenderTarget;
-				support.projectionMatrix.copyFrom(mProjMatrix);
+				support.projectionMatrix.copyFrom(_projMatrix);

 				// Create an image containing the cache. To have a display object that contains
 				// the filter output in object coordinates, we wrap it in a QuadBatch: that way,
@@ -317,9 +538,9 @@
 				var quadBatch:QuadBatch2D = new QuadBatch2D();
 				var image:Image2D = new Image2D(cacheTexture);

-				stage.getTransformationMatrix(object, sTransformationMatrix);
-				MatrixUtil.prependTranslation(sTransformationMatrix, sBounds.x + mOffsetX, sBounds.y + mOffsetY);
-				quadBatch.addImage(image, 1.0, sTransformationMatrix);
+				stage.getTransformationMatrix(object, _transformationMatrix);
+				MatrixUtil.prependTranslation(_transformationMatrix, _bounds.x + _offsetX, _bounds.y + _offsetY);
+				quadBatch.addImage(image, 1.0, _transformationMatrix);

 				return quadBatch;
 			}
@@ -330,51 +551,51 @@
 		// helper methods
 		private function updateBuffers(context:Context3D, bounds:Rectangle):void
 		{
-			mVertexData.setPosition(0, bounds.x, bounds.y);
-			mVertexData.setPosition(1, bounds.right, bounds.y);
-			mVertexData.setPosition(2, bounds.x, bounds.bottom);
-			mVertexData.setPosition(3, bounds.right, bounds.bottom);
-
-			if (mVertexBuffer == null)
-			{
-				mVertexBuffer = context.createVertexBuffer(4, VertexData2D.ELEMENTS_PER_VERTEX);
-				mIndexBuffer = context.createIndexBuffer(6);
-				mIndexBuffer.uploadFromVector(mIndexData, 0, 6);
-			}
-
-			mVertexBuffer.uploadFromVector(mVertexData.rawData, 0, 4);
+			_vertexData.setPosition(0, bounds.x, bounds.y);
+			_vertexData.setPosition(1, bounds.right, bounds.y);
+			_vertexData.setPosition(2, bounds.x, bounds.bottom);
+			_vertexData.setPosition(3, bounds.right, bounds.bottom);
+
+			if (_vertexBuffer == null)
+			{
+				_vertexBuffer = context.createVertexBuffer(4, VertexData2D.ELEMENTS_PER_VERTEX);
+				_indexBuffer = context.createIndexBuffer(6);
+				_indexBuffer.uploadFromVector(_indexData, 0, 6);
+			}
+
+			_vertexBuffer.uploadFromVector(_vertexData.rawData, 0, 4);
 		}

 		private function updatePassTextures(width:int, height:int, scale:Number):void
 		{
-			var numPassTextures:int = mNumPasses > 1 ? 2 : 1;
-
-			var needsUpdate:Boolean = mPassTextures == null || mPassTextures.length != numPassTextures || mPassTextures[0].width != width || mPassTextures[0].height != height;
+			var numPassTextures:int = _numPasses > 1 ? 2 : 1;
+
+			var needsUpdate:Boolean = _passTextures == null || _passTextures.length != numPassTextures || _passTextures[0].width != width || _passTextures[0].height != height;

 			if (needsUpdate)
 			{
-				if (mPassTextures)
+				if (_passTextures)
 				{
-					for each (var texture:Texture2D in mPassTextures)
+					for each (var texture:Texture2D in _passTextures)
 						texture.dispose();

-					mPassTextures.length = numPassTextures;
+					_passTextures.length = numPassTextures;
 				}
 				else
 				{
-					mPassTextures = new Vector.<Texture2D>(numPassTextures);
+					_passTextures = new Vector.<Texture2D>(numPassTextures);
 				}

 				for (var i:int = 0; i < numPassTextures; ++i)
-					mPassTextures[i] = Texture2D.empty(width, height, PMA, true, scale);
+					_passTextures[i] = Texture2D.empty(width, height, PMA, true, scale);
 			}
 		}

 		private function getPassTexture(pass:int):Texture2D
 		{
-			return mPassTextures[pass % 2];
+			return _passTextures[pass % 2];
 		}

@@ -390,8 +611,8 @@

 			if (intersectWithStage)
 			{
-				sStageBounds.setTo(0, 0, stage.stageWidth, stage.stageHeight);
-				RectangleUtil.intersect(resultRect, sStageBounds, resultRect);
+				_stageBounds.setTo(0, 0, stage.stageWidth, stage.stageHeight);
+				RectangleUtil.intersect(resultRect, _stageBounds, resultRect);
 			}

 			if (!resultRect.isEmpty())
@@ -399,34 +620,34 @@
 				// the bounds are a rectangle around the object, in stage coordinates,
 				// and with an optional margin. To fit into a POT-texture, it will grow towards
 				// the right and bottom.
-				var deltaMargin:Number = mResolution == 1.0 ? 0.0 : 1.0 / mResolution;
+				var deltaMargin:Number = _resolution == 1.0 ? 0.0 : 1.0 / _resolution;
 				// avoid hard edges
-				resultRect.x -= mMarginX + deltaMargin;
-				resultRect.y -= mMarginY + deltaMargin;
-				resultRect.width += 2 * (mMarginX + deltaMargin);
-				resultRect.height += 2 * (mMarginY + deltaMargin);
-				resultRect.width = nextPowerOfTwo(resultRect.width * mResolution) / mResolution;
-				resultRect.height = nextPowerOfTwo(resultRect.height * mResolution) / mResolution;
+				resultRect.x -= _marginX + deltaMargin;
+				resultRect.y -= _marginY + deltaMargin;
+				resultRect.width += 2 * (_marginX + deltaMargin);
+				resultRect.height += 2 * (_marginY + deltaMargin);
+				resultRect.width = nextPowerOfTwo(resultRect.width * _resolution) / _resolution;
+				resultRect.height = nextPowerOfTwo(resultRect.height * _resolution) / _resolution;
 			}
 		}

 		private function disposePassTextures():void
 		{
-			for each (var texture:Texture2D in mPassTextures)
+			for each (var texture:Texture2D in _passTextures)
 				texture.dispose();

-			mPassTextures = null;
+			_passTextures = null;
 		}

 		private function disposeCache():void
 		{
-			if (mCache)
-			{
-				if (mCache.texture) mCache.texture.dispose();
-				mCache.dispose();
-				mCache = null;
+			if (_cache)
+			{
+				if (_cache.texture) _cache.texture.dispose();
+				_cache.dispose();
+				_cache = null;
 			}
 		}

@@ -471,214 +692,21 @@
 		}

-		/** Assembles fragment- and vertex-shaders, passed as Strings, to a Program3D.
-		 *  If any argument is  null, it is replaced by the class constants STD_FRAGMENT_SHADER or
-		 *  STD_VERTEX_SHADER, respectively. */
-		protected function assembleAgal(fragmentShader:String = null, vertexShader:String = null):Program3D
-		{
-			if (fragmentShader == null) fragmentShader = STD_FRAGMENT_SHADER;
-			if (vertexShader == null) vertexShader = STD_VERTEX_SHADER;
-
+		/**
+		 * Assembles fragment- and vertex-shaders, passed as Strings, to a Program3D.
+		 * If any argument is  null, it is replaced by the class constants STD_FRAGMENT_SHADER or
+		 * STD_VERTEX_SHADER, respectively.
+		 *
+		 * @param fragmentShader
+		 * @param vertexShader
+		 * @return Program3D
+		 */
+		protected function assembleAgal(fragmentShader:String = null,
+			vertexShader:String = null):Program3D
+		{
+			if (!fragmentShader) fragmentShader = STD_FRAGMENT_SHADER;
+			if (!vertexShader) vertexShader = STD_VERTEX_SHADER;
 			return RenderSupport2D.assembleAgal(vertexShader, fragmentShader);
 		}
-
-
-		// cache
-		/** Caches the filter output into a texture. An uncached filter is rendered in every frame;
-		 *  a cached filter only once. However, if the filtered object or the filter settings
-		 *  change, it has to be updated manually; to do that, call "cache" again. */
-		public function cache():void
-		{
-			mCacheRequested = true;
-			disposeCache();
-		}
-
-
-		/** Clears the cached output of the filter. After calling this method, the filter will
-		 *  be executed once per frame again. */
-		public function clearCache():void
-		{
-			mCacheRequested = false;
-			disposeCache();
-		}
-
-
-		// flattening
-		/** @private */
-		public function compile(object:DisplayObject2D):QuadBatch2D
-		{
-			if (mCache) return mCache;
-			else
-			{
-				var renderSupport:RenderSupport2D;
-				var stage:Stage2D = object.stage;
-
-				if (stage == null)
-					throw new Error("Filtered object must be on the stage.");
-
-				renderSupport = new RenderSupport2D();
-				object.getTransformationMatrix(stage, renderSupport.modelViewMatrix);
-				return renderPasses(object, renderSupport, 1.0, true);
-			}
-		}
-
-
-		// properties
-		/** Indicates if the filter is cached (via the "cache" method). */
-		public function get isCached():Boolean
-		{
-			return (mCache != null) || mCacheRequested;
-		}
-
-
-		/** The resolution of the filter texture. "1" means stage resolution, "0.5" half the
-		 *  stage resolution. A lower resolution saves memory and execution time (depending on
-		 *  the GPU), but results in a lower output quality. Values greater than 1 are allowed;
-		 *  such values might make sense for a cached filter when it is scaled up. @default 1 */
-		public function get resolution():Number
-		{
-			return mResolution;
-		}
-
-
-		public function set resolution(value:Number):void
-		{
-			if (value <= 0) throw new ArgumentError("Resolution must be > 0");
-			else mResolution = value;
-		}
-
-
-		/** The filter mode, which is one of the constants defined in the "FragmentFilterMode"
-		 *  class. @default "replace" */
-		public function get mode():String
-		{
-			return mMode;
-		}
-
-
-		public function set mode(value:String):void
-		{
-			mMode = value;
-		}
-
-
-		/** Use the x-offset to move the filter output to the right or left. */
-		public function get offsetX():Number
-		{
-			return mOffsetX;
-		}
-
-
-		public function set offsetX(value:Number):void
-		{
-			mOffsetX = value;
-		}
-
-
-		/** Use the y-offset to move the filter output to the top or bottom. */
-		public function get offsetY():Number
-		{
-			return mOffsetY;
-		}
-
-
-		public function set offsetY(value:Number):void
-		{
-			mOffsetY = value;
-		}
-
-
-		/** The x-margin will extend the size of the filter texture along the x-axis.
-		 *  Useful when the filter will "grow" the rendered object. */
-		protected function get marginX():Number
-		{
-			return mMarginX;
-		}
-
-
-		protected function set marginX(value:Number):void
-		{
-			mMarginX = value;
-		}
-
-
-		/** The y-margin will extend the size of the filter texture along the y-axis.
-		 *  Useful when the filter will "grow" the rendered object. */
-		protected function get marginY():Number
-		{
-			return mMarginY;
-		}
-
-
-		protected function set marginY(value:Number):void
-		{
-			mMarginY = value;
-		}
-
-
-		/** The number of passes the filter is applied. The "activate" and "deactivate" methods
-		 *  will be called that often. */
-		protected function set numPasses(value:int):void
-		{
-			mNumPasses = value;
-		}
-
-
-		protected function get numPasses():int
-		{
-			return mNumPasses;
-		}
-
-
-		/** The ID of the vertex buffer attribute that stores the vertex position. */
-		protected final function get vertexPosAtID():int
-		{
-			return mVertexPosAtID;
-		}
-
-
-		protected final function set vertexPosAtID(value:int):void
-		{
-			mVertexPosAtID = value;
-		}
-
-
-		/** The ID of the vertex buffer attribute that stores the texture coordinates. */
-		protected final function get texCoordsAtID():int
-		{
-			return mTexCoordsAtID;
-		}
-
-
-		protected final function set texCoordsAtID(value:int):void
-		{
-			mTexCoordsAtID = value;
-		}
-
-
-		/** The ID (sampler) of the input texture (containing the output of the previous pass). */
-		protected final function get baseTextureID():int
-		{
-			return mBaseTextureID;
-		}
-
-
-		protected final function set baseTextureID(value:int):void
-		{
-			mBaseTextureID = value;
-		}
-
-
-		/** The ID of the first register of the modelview-projection constant (a 4x4 matrix). */
-		protected final function get mvpConstantID():int
-		{
-			return mMvpConstantID;
-		}
-
-
-		protected final function set mvpConstantID(value:int):void
-		{
-			mMvpConstantID = value;
-		}
 	}
-}+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 22592
Author:   chiedozi@adobe.com
Date:     2011-09-16T00:02:18.133707Z

Log Message:
-----------
StyleableStageText manually calculates the global position of the StageText viewport instead of using localToGlobal to workaround issues in the runtime with transform.concatenatedMatrix.

QE notes:
Doc notes:
Bugs: SDK-31538
Reviewer: Adam Altman
Tests run: checkintests-mobile, mustella-mobile
Is noteworthy for integration: No

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
@@ -21,6 +21,7 @@
 import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
 import flash.events.SoftKeyboardEvent;
+import flash.geom.Matrix;
 import flash.geom.Point;
 import flash.geom.Rectangle;
 import flash.system.Capabilities;
@@ -51,6 +52,7 @@
 import mx.managers.FocusManager;
 import mx.managers.SystemManager;
 import mx.managers.systemClasses.ActiveWindowManager;
+import mx.utils.MatrixUtil;

 import spark.components.Application;
 import spark.core.IEditableText;
@@ -1791,12 +1793,16 @@
         {
             if (stageText.stage)
             {
-                var globalTopLeft:Point = parent.localToGlobal(localViewPort.topLeft);
+                // We calculate the parent's concatenated matrix to deal with
+                // issues in the runtime where the concatenated matrix of the
+                // parent is out of sync.  See SDK-31538.
+                var m:Matrix = MatrixUtil.getConcatenatedMatrix(parent, stage);
+                var globalTopLeft:Point = m.transformPoint(localViewPort.topLeft);

                 // Transform the bottom-right corner of the local rect
                 // instead of setting width/height to account for any
                 // transformations applied to ancestor objects.
-                var globalBottomRight:Point = parent.localToGlobal(localViewPort.bottomRight);
+                var globalBottomRight:Point = m.transformPoint(localViewPort.bottomRight);
                 var globalRect:Rectangle = new Rectangle();

                 // StageText can't deal with upside-down or mirrored rectangles


Transferred from the Adobe Open Source Subversion Repository

Revision: 20644
Author:   mhorn@adobe.com
Date:     2011-03-07T18:49:20.181589Z

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarFirstTabSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarLastTabSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonBarButtonClassFactory.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarLastTabSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarLastTabSkin.as
@@ -30,6 +30,14 @@
  */
 public class TabbedViewNavigatorTabBarLastTabSkin extends TabbedViewNavigatorTabBarTabSkinBase
 {
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     public function TabbedViewNavigatorTabBarLastTabSkin()
     {
         super();


Transferred from the Adobe Open Source Subversion Repository

Revision: 5076
Author:   shodgson@adobe.com
Date:     2009-02-25T22:29:16.937401Z

Log Message:
-----------
Merge revision 5072 from 3.x branch to trunk.

Bug: LCDS-636 - None of the responder get called from the createItem
QA: Yes (LCDS QA)
Doc: No
Checkintests Pass: Yes

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as

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

--- frameworks/projects/rpc/src/mx/messaging/ChannelSet.as
+++ frameworks/projects/rpc/src/mx/messaging/ChannelSet.as
@@ -33,6 +33,7 @@
 import mx.messaging.messages.IMessage;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
+import mx.rpc.AsyncDispatcher;
 import mx.rpc.AsyncToken;
 import mx.rpc.events.AbstractEvent;
 import mx.rpc.events.FaultEvent;
@@ -1153,7 +1154,7 @@
                 var ack:AcknowledgeMessage = new AcknowledgeMessage();
                 ack.clientId = agent.clientId;
                 ack.correlationId = message.messageId;
-                agent.acknowledge(ack, message);
+                new AsyncDispatcher(agent.acknowledge, [ack, message], 1);
                 return;
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4245
Author:   shodgson@adobe.com
Date:     2008-12-05T22:00:27.962223Z

Log Message:
-----------
Bugs: Assorted LCDS reliable messaging bugs
QA: Yes
Doc: No
Checkintests Pass: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/ChannelSet.as
+++ frameworks/projects/rpc/src/mx/messaging/ChannelSet.as
@@ -1143,7 +1143,7 @@
      */
     public function send(agent:MessageAgent, message:IMessage):void
     {
-        if (connected)
+        if (_currentChannel != null && _currentChannel.connected)
         {
             // Filter out any commands to trigger connection establishment, and ack them locally.
             if ((message is CommandMessage) && (CommandMessage(message).operation == CommandMessage.TRIGGER_CONNECT_OPERATION))
@@ -1383,13 +1383,10 @@
      */
     private function connectChannel():void
     {
-        if (!connected && !_connecting)
-        {
-            _connecting = true;
-            _currentChannel.connect(this);
-            // Listen for any server pushed messages on the Channel.
-            _currentChannel.addEventListener(MessageEvent.MESSAGE, messageHandler);
-        }
+        _connecting = true;
+        _currentChannel.connect(this);
+        // Listen for any server pushed messages on the Channel.
+        _currentChannel.addEventListener(MessageEvent.MESSAGE, messageHandler);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 12279
Author:   jimurphy@adobe.com
Date:     2009-11-30T17:39:03.660875Z

Log Message:
-----------
Merged 3.x revisions 12013,12019,12119,12195,12271,12273 -> trunk

........
  r12013 | aharui@adobe.com | 2009-11-19 17:12:58 -0500 (Thu, 19 Nov 2009) | 11 lines

  Fix clipping in Tree.

  Bugs: SDK-15055

........
  r12019 | pfarland@adobe.com | 2009-11-19 18:17:00 -0500 (Thu, 19 Nov 2009) | 10 lines

  Further fixes for SDK-23140. Filtering out internal namespace prefixed attributes from generic deserialization. We exclude the SOAP encoding namespace, SOAP envelope namespace, XML Schema namespace and the XML Schema Instance namespace.

  Bugs: SDK-23140
........
  r12119 | aharui@adobe.com | 2009-11-23 16:08:32 -0500 (Mon, 23 Nov 2009) | 10 lines

  Fix edit sessions in TextInputs yet again.

  Bugs: SDK-23397

........
  r12195 | pfarland@adobe.com | 2009-11-24 22:33:48 -0500 (Tue, 24 Nov 2009) | 11 lines

  Submitting Anshul's fix for SDK-24123 that resolves relative URLs to full URLs before calling a serialization filter (which may need the full context to decide if it needs to make any changes before allowing the request to proceed).

  Bugs:
  SDK-24123
........
  r12271 | preilly@adobe.com | 2009-11-30 10:53:27 -0500 (Mon, 30 Nov 2009) | 5 lines

  * Back ported revision 6756 to 3.x branch.

........
  r12273 | jimurphy@adobe.com | 2009-11-30 11:09:16 -0500 (Mon, 30 Nov 2009) | 6 lines

  merge 3.5.0 revs 12160,12161 -> 3.x

  Closing version.properties input stream.
  bug: SDK-23801

........

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/VersionInfo.java</path>

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

--- frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.as
@@ -29,6 +29,7 @@
 import mx.rpc.xml.TypeIterator;
 import mx.rpc.xml.XMLDecoder;
 import mx.utils.StringUtil;
+import mx.utils.URLUtil;
 import mx.utils.XMLUtil;
 import mx.utils.object_proxy;

@@ -860,7 +861,26 @@
         _referencesResolved = false;
         _elementsWithId = null;
     }
-
+
+    /**
+     * Determines whether a name is in an internal (SOAP or XSD specific)
+     * namespace (as opposed to a user's namespace).
+     * @private
+     */
+    override protected function isInternalNamespace(name:QName):Boolean
+    {
+        var uri:String = (name != null) ? name.uri : null;
+        if (uri)
+        {
+            if (URLUtil.urisEqual(uri, soapConstants.encodingURI) ||
+                URLUtil.urisEqual(uri, soapConstants.envelopeURI))
+            {
+                return true;
+            }
+        }
+
+        return super.isInternalNamespace(name);
+    }

     /**
      * Overrides XMLDecoder.parseValue to allow us to detect a legacy case
@@ -886,7 +906,6 @@

         return super.parseValue(name, value);
     }
-

     /**
      * Overrides XMLDecoder.preProcessXML to allow us to handle multi-ref SOAP


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

--- frameworks/projects/charts/src/mx/charts/chartClasses/ChartState.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/ChartState.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: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/RenderData.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/RenderData.as
@@ -0,0 +1,225 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts.chartClasses
+{
+
+import flash.geom.Rectangle;
+
+/**
+ *  RenderData structures are used by chart elements to store
+ *  all of the relevant values and data needed to fully render the chart.
+ *  Storing these values in a separate structure lets chart elements
+ *  decouple their rendering from their assigned properties
+ *  and data as necessary.
+ *  This ability is used by the chart effects: effects such as
+ *  SeriesInterpolate substitute temporary values calculated from
+ *  previous and future renderData structures. Effects such as SeriesSlide
+ *  and SeriesZoom substitute temporary RenderData structures
+ *  with values calculated to render the effect correctly.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class RenderData
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param cache The list of ChartItems representing the items
+     *  in the series's dataProvider.
+     *
+     *  @param filteredCache The list of ChartItems representing the items
+     *  in the series's dataProvider that remain after filtering.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function RenderData(cache:Array /* of ChartItem */ = null, filteredCache:Array /* of ChartItem */ = null)
+    {
+        super();
+
+        this.cache = cache;
+        this.filteredCache = filteredCache;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  bounds
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The bounds of all of the items a series displays on screen,
+     *  relative to the series's coordinate system.
+     *  This value is used by the various effects during rendering.
+     *  A series fills in this value when the effect
+     *  calls the getElementBounds() method.
+     *  A series does not need to fill in this field
+     *  unless specifically requested.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var bounds:Rectangle;
+
+    //----------------------------------
+    //  cache
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The list of ChartItems representing the items
+     *  in the series's dataProvider.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var cache:Array /* of ChartItem */;
+
+    //----------------------------------
+    //  elementBounds
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  An Array of rectangles describing the bounds of the series's
+     *  ChartItems, relative to the series's coordinate system.
+     *  Effects use this Array
+     *  to generate the effect rendering.
+     *  An effect calls the getElementBounds() method, which
+     *  causes the series to fill in this value.
+     *  A series does not need to fill in this field
+     *  unless specifically requested.
+     *  Effects modify this Array to relect current positions
+     *  of the items during the effect duration.
+     *  If this value is filled in on the series's renderData,
+     *  the series renders itself based on these rectangles
+     *  rather than from the series's data.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var elementBounds:Array /* of Rectangle */;
+
+    //----------------------------------
+    //  filteredCache
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The list of ChartItems representing the items
+     *  in the series's dataProvider that remain after filtering.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var filteredCache:Array /* of ChartItem */;
+
+    //----------------------------------
+    //  length
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The number of items represented in this render data.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get length():uint
+    {
+        return cache ? cache.length : 0;
+    }
+
+    //----------------------------------
+    //  visibleRegion
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The rectangle describing the possible coordinate range
+     *  that a series can display on screen.
+     *  This value is used by the various effects during rendering.
+     *  An effect calls the getElementBounds() method
+     *  to fill in this value.
+     *  A series does not need to fill in this field
+     *  unless specifically requested.
+     *  If left null, effects assume the visible region of an element
+     *  is the bounding box of the element itself (0, 0, width, height),
+     *  expressed relative to the element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var visibleRegion:Rectangle;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Creates a copy of the render data. In the new copy, properties that point to other objects continue to
+     *  point to the same objects as the original.
+     *
+     *
If you subclass this class, you must override this method.

+     *
+     *  @return The new copy of the RenderData object.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function clone():RenderData
+    {
+        return null;
+    }
+}
+
+}


Apache license 2.0 added.

Apache license 2.0 added.

--- tui_flashdevelop4_2_1__tuioAS3_0_8__AIR2_6/lib/touchAll/demos/googleMapsDemo/GoogleMapsDemo.as
+++ tui_flashdevelop4_2_1__tuioAS3_0_8__AIR2_6/lib/touchAll/demos/googleMapsDemo/GoogleMapsDemo.as
@@ -1,3 +1,20 @@
+/*
+ * Tangible User Interfacer (former TouchAll) demo.
+ *
+ * Copyright 2016 Gonçalo Amador <g.n.p.amador@gmail.com>
+ *
+ * Licensed 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
+ *
+ *     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.
+ */
 package touchAll.demos.googleMapsDemo
 {
 	import flash.ui.*;
@@ -41,4 +58,4 @@
 			tAll.tuioLoader();
 		}
 	}
-}+}


Update default Portal URL with trailing forward slash.

--- src/com/esri/builder/model/PortalModel.as
+++ src/com/esri/builder/model/PortalModel.as
@@ -32,7 +32,7 @@
     //
     //--------------------------------------------------------------------------

-    public static const DEFAULT_PORTAL_URL:String = "https://www.arcgis.com";
+    public static const DEFAULT_PORTAL_URL:String = "https://www.arcgis.com/";

     private static var instance:PortalModel;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19742
Author:   chiedozi@adobe.com
Date:     2011-01-13T19:33:44.958417Z

Log Message:
-----------
ViewNavigatorApplications now properly update the orientation of a View after a suspended application is relaunched in a different orientaiton.
Fixed a bug where Views weren't being reactivated after an application was relaunched after being suspended.

QE notes:
Doc notes:
Bugs: SDK-29099, SDK-29095
Reviewer: Evtim
Tests run:
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigatorApplication.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/View.as
+++ frameworks/projects/mobilecomponents/src/spark/components/View.as
@@ -242,6 +242,14 @@
         {
             _active = value;

+            // Switch orientation states if needed
+            if (_active)
+            {
+                var viewState:String = getCurrentViewState();
+                if (currentState != viewState)
+                    setCurrentState(viewState, false);
+            }
+
             var eventName:String = _active ?
                 ViewNavigatorEvent.VIEW_ACTIVATE :
                 ViewNavigatorEvent.VIEW_DEACTIVATE;


Transferred from the Adobe Open Source Subversion Repository

Revision: 6165
Author:   dloverin@adobe.com
Date:     2009-04-20T17:49:56.777247Z

Log Message:
-----------
Fix Halo Application backgroundColor style. Also change Halo Application backgroundColor style behavior in Flex 4.

In Flex 4 the backgroundColor style of a Halo Application will be a solid color. To get a gradient color compile the application with -compatibility-version=3 or use the backgroundGradientColors style.

QE Notes: None.
Doc Notes: Please document change in behavior.
Bugs: SDK-20657
Reviewer: Glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ApplicationBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>

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

--- frameworks/projects/mx/src/mx/skins/halo/ApplicationBackground.as
+++ frameworks/projects/mx/src/mx/skins/halo/ApplicationBackground.as
@@ -13,6 +13,8 @@
 {

 import flash.display.Graphics;
+
+import mx.core.FlexVersion;
 import mx.skins.ProgrammaticSkin;
 import mx.utils.ColorUtil;

@@ -102,8 +104,19 @@
 				bgColor = 0xFFFFFF;

 			fillColors = [];
-			fillColors[0] = ColorUtil.adjustBrightness(bgColor, 15);
-			fillColors[1] = ColorUtil.adjustBrightness(bgColor, -25);
+
+            // Starting in Flex 4, the background color is a solid instead of
+            // a gradient.
+            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
+            {
+                fillColors[0] = bgColor;
+                fillColors[1] = bgColor;
+            }
+            else
+            {
+                fillColors[0] = ColorUtil.adjustBrightness(bgColor, 15);
+                fillColors[1] = ColorUtil.adjustBrightness(bgColor, -25);
+            }
 		}

 		if (!fillAlphas)


Transferred from the Adobe Open Source Subversion Repository

Revision: 22039
Author:   ksimm@adobe.com
Date:     2011-08-16T23:49:42.938596Z

Log Message:
-----------
Fix for SDK-31203, SDK-31202, SDK-31086.
- check whether minStepSize is positive, and 60 is divisible by minStepSize
- compare date using minDate.date instead of minDate.time when disabling invalid date
- add doc about the minDate's year range that is from 1601 to 9999 (range that can be formatted using DateTimeFormatter)

QE notes: none
Doc notes: none
Bugs: SDK-31203, SDK-31202, SDK-31086
Reviewer: Tom Kraikit
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as
+++ frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as
@@ -35,8 +35,9 @@
     // number of milliseconds in a day
     private static const MS_IN_DAY:Number = 1000 * 60 * 60 * 24;

-    // default date range if min/max are not specified
-    private static const DEFAULT_RANGE_SIZE:int = 730;
+    // default min/max date
+    private static const MIN_DATE_DEFAULT:Date = new Date(1601, 0, 1);
+    private static const MAX_DATE_DEFAULT:Date = new Date(9999, 11, 31, 23, 59, 59, 999);

     //--------------------------------------------------------------------------
     //
@@ -56,16 +57,10 @@
                                         today:Date = null, todayAccentColor:uint = 0)
     {
         if (start == null)
-        {
-            start = new Date();
-            start.date -= DEFAULT_RANGE_SIZE / 2;
-        }
+            start = MIN_DATE_DEFAULT;

         if (end == null)
-        {
-            end = new Date();
-            end.date += DEFAULT_RANGE_SIZE / 2;
-        }
+            end = MAX_DATE_DEFAULT;

         // we only count days; reset clocks so there are no rounding errors
         startDate = new Date(start.time);