incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1370009 [25/34] - in /incubator/flex/trunk/mustella/tests/apollo: ./ DragManager/ DragManager/SWFs/ DragManager/SWFs/assets/ DragManager/SWFs/comps/ DragManager/Spark/ DragManager/Spark/baselines/ FileComboBox/ FileComboBox/SWFs/ FileCombo...
Date Mon, 06 Aug 2012 20:51:43 GMT
Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_nocontrols.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_nocontrols.xml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_nocontrols.xml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_nocontrols.xml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+  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
+
+      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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/3.1">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0beta2
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+<versionNumber>1</versionNumber>
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>wa-generic-systemchrome-nocontrols</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>wa_generic_systemchrome_nocontrols</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>wa_generic_systemchrome_nocontrols</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>wa_generic_systemchrome_nocontrols.swf</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<systemChrome>standard</systemChrome>
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_noresizing.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_noresizing.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_noresizing.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_noresizing.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<s:WindowedApplication
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark" >
+
+<fx:Script>
+<![CDATA[
+
+    import flash.events.*;
+    import mx.core.FlexGlobals;
+    import mx.events.*;
+    import spark.components.*;
+    import spark.skins.spark.*;
+
+    /**
+    * Reset things.  We can't use ResetComponent for the WindowedApplication.  Here's
+    * what these next few methods do:
+    *    - Be sure we're not minimized or maximized.
+    *    - Be sure we're in state1.
+    *    - Set various properties.
+    *    - Dispatch resetComplete.
+    **/
+    public function doReset():void{
+        addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+
+        if(nativeWindow.displayState == "normal"){
+            handleResetDisplayStateChange(new NativeWindowDisplayStateEvent(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE));
+        }else{
+            restore();
+        }
+    }
+
+    private function handleResetDisplayStateChange(e:NativeWindowDisplayStateEvent):void{
+        removeEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+        dispatchEvent(new FlexEvent("resetComplete"));
+    }
+
+
+]]>
+</fx:Script>
+
+<fx:Style>
+@namespace s "library://ns.adobe.com/flex/spark";
+@namespace mx "library://ns.adobe.com/flex/mx";
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+        fontWeight: bold;
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+        fontStyle: italic;
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    s|WindowedApplication{
+        fontFamily: EmbeddedVera;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }
+
+</fx:Style>
+
+<s:Group id="group1" left="0" right="0" top="0" bottom="0">
+    <s:Button id="btn1" left="0" top="0" width="20" height="20" />
+    <s:Button id="btn2" right="0" top="0" width="20" height="20" />
+    <s:Button id="btn3" left="0" bottom="0" width="20" height="20" />
+    <s:Button id="btn4" right="0" bottom="0" width="20" height="20" />
+</s:Group>
+
+</s:WindowedApplication>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_noresizing.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_noresizing.xml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_noresizing.xml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_generic_systemchrome_noresizing.xml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+  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
+
+      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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/3.1">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0beta2
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+<versionNumber>1</versionNumber>
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>wa-generic-systemchrome-noresizing</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>wa_generic_systemchrome_noresizing</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>wa_generic_systemchrome_noresizing</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>wa_generic_systemchrome_noresizing.swf</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<systemChrome>standard</systemChrome>
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<minimizable>false</minimizable>
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<maximizable>false</maximizable>
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<resizable>false</resizable>
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_localization.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_localization.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_localization.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_localization.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<s:WindowedApplication
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark">
+
+<fx:Script>
+<![CDATA[
+
+
+]]>
+</fx:Script>
+
+<!-- Embed fonts for cross platform compatibility of bitmap compares. -->
+<fx:Style>
+    @namespace s "library://ns.adobe.com/flex/spark";
+    @namespace mx "library://ns.adobe.com/flex/mx";
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Regular.ttf");
+        fontFamily: EmbeddedMeiryo;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Bold.ttf");
+        fontWeight: bold;
+        fontFamily: EmbeddedMeiryo;
+        embedAsCFF: true;
+    }
+
+    s|WindowedApplication{
+        fontFamily: EmbeddedMeiryo;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }
+
+</fx:Style>
+
+</s:WindowedApplication>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_methods_getCurrentSkinState.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_methods_getCurrentSkinState.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_methods_getCurrentSkinState.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_methods_getCurrentSkinState.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<custom:TestWindowedApplication 
+    xmlns:fx="http://ns.adobe.com/mxml/2009" 
+    xmlns:mx="library://ns.adobe.com/flex/mx" 
+    xmlns:s="library://ns.adobe.com/flex/spark"
+    xmlns:custom="assets.*"
+    width="100%" height="100%"
+    skinClass="assets.SkinWithStates" >
+
+<fx:Script>
+<![CDATA[
+
+    public function changeMood(val:String):void{
+        status = val;
+        invalidateSkinState();
+    }
+
+]]>
+</fx:Script>
+
+</custom:TestWindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_methods_getCurrentSkinState.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_methods_getCurrentSkinState.xml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_methods_getCurrentSkinState.xml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_methods_getCurrentSkinState.xml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+  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
+
+      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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/3.1">
+	<id>wa-methods-getCurrentSkinState</id>
+	<filename>wa_methods_getCurrentSkinState</filename>
+	<name>wa_methods_getCurrentSkinState</name>
+	<version>v1</version>
+	<initialWindow>
+        <content>wa_methods_getCurrentSkinState.swf</content>
+        <systemChrome>none</systemChrome>
+	</initialWindow>
+	<versionNumber>1</versionNumber>
+</application>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_mirroring.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_mirroring.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_mirroring.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_mirroring.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<s:WindowedApplication
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
+    xmlns:comps="comps.*"
+    width="800" height="600"
+	direction.state1="rtl"
+    direction.state2="ltr"
+	layoutDirection.state1="rtl"
+    layoutDirection.state2="ltr"
+	title="title"
+	status="status"
+	titleIcon="{smallSquare1}"
+    skinClass="spark.skins.spark.SparkChromeWindowedApplicationSkin">
+
+<fx:Script>
+<![CDATA[
+
+    import flash.events.*;
+    import mx.collections.*;
+    import mx.core.FlexGlobals;
+    import mx.events.*;
+    import spark.components.*;
+    import spark.skins.spark.*;
+	import spark.skins.spark.SparkChromeWindowedApplicationSkin;
+
+    [Embed(source="../../../../../../Assets/Images/smallgreenrect.jpg")]
+    [Bindable]
+    public var smallSquare1:Class;
+
+    /**
+    * Reset things.  We can't use ResetComponent for the WindowedApplication.
+    **/
+    public function doReset():void{
+		// Be sure we're in state1.
+        addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE, handleCurrentStateChange);
+        
+        if(currentState == "state1"){
+            handleCurrentStateChange();
+        }else{
+            addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE, handleCurrentStateChange);
+            currentState = "state1";   
+        }
+    }
+
+    private function handleCurrentStateChange(e:StateChangeEvent = null):void{
+        removeEventListener(StateChangeEvent.CURRENT_STATE_CHANGE, handleCurrentStateChange);
+        addEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+
+        if(height == 600 &&
+           width == 800 &&
+           getStyle("direction") == "rtl" &&
+		   getStyle("layoutDirection") == "rtl" &&
+		   title == "title" &&
+		   status == "status" ){
+           handleResetUpdateComplete();
+        }else{
+            setStyle("direction", "rtl");
+			setStyle("layoutDirection", "rtl");
+            height = 600;
+            width = 800;
+			title = "title";
+			status = "status";
+        }
+    }
+
+    private function handleResetUpdateComplete(e:FlexEvent = null):void{
+        removeEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+        dispatchEvent(new FlexEvent("resetComplete"));
+    }
+
+]]>
+</fx:Script>
+
+<!-- Embed fonts for cross platform compatibility of bitmap compares. -->
+<fx:Style>
+    @namespace s "library://ns.adobe.com/flex/spark";
+    @namespace mx "library://ns.adobe.com/flex/mx";
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+        fontWeight: bold;
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+        fontStyle: italic;
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    global{
+        fontFamily: EmbeddedVera;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }
+
+    s|Label{
+        fontFamily: EmbeddedVera;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }
+
+    s|WindowedApplication{
+        fontFamily: EmbeddedVera;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }
+
+</fx:Style>
+
+<fx:Declarations>
+</fx:Declarations>
+
+<s:states>
+    <s:State name="state1" />
+    <s:State name="state2" />
+</s:states>
+
+<s:layout>
+    <s:VerticalLayout />
+</s:layout>
+
+<s:Rect width="10" height="10" >
+	<s:stroke>
+		<s:SolidColorStroke weight="1" />
+	</s:stroke>
+	<s:fill>
+		<s:SolidColor alpha="1" color="0x008800" />
+	</s:fill>
+</s:Rect>
+
+<s:TextInput width="20" text="." />
+<s:Label width="20" text="." />
+<s:TextInput width="20" text="." />
+<s:Label width="20" text="." />
+
+<s:Group>
+	<s:BorderContainer width="200" height="100" borderStyle="solid" borderWeight="1">
+		<s:layout>
+			<s:TileLayout requestedColumnCount="2" requestedRowCount="2" />
+		</s:layout>
+		<s:TextInput width="20" text="." />
+		<s:Label width="20" text="." />
+		<s:TextInput width="20" text="." />
+		<s:Label width="20" text="." />
+	</s:BorderContainer>
+</s:Group>
+
+</s:WindowedApplication>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_modules.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_modules.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_modules.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_modules.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<s:WindowedApplication
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
+    xmlns:custom="assets.*"
+    width="800" height="600">
+
+<fx:Script>
+<![CDATA[
+
+]]>
+</fx:Script>
+
+<mx:SWFLoader id="sl1" />
+
+</s:WindowedApplication>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<s:WindowedApplication
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
+    xmlns:custom="assets.*"
+    width="800" height="600" minWidth="140" minHeight="34">
+
+<fx:Script>
+<![CDATA[
+
+    import flash.events.*;
+    import mx.core.FlexGlobals;
+    import mx.events.*;
+    import spark.components.*;
+    import spark.skins.spark.*;
+
+    public var heightResetVal:int = 600;
+    public var widthResetVal:int = 600;
+    public var screenHeightFudged:int = flash.system.Capabilities.screenResolutionY - 100;
+    public var screenWidthFudged:int = flash.system.Capabilities.screenResolutionX - 4;
+    
+    /**
+    *   compare the actual value with expected value based on os.  It returns an error string if comparison fails, otherwise an empty string.
+    *   actualVal: actual value used for comparison
+    *   expectedWinVal: expected value on window os.
+    *   expectedMacVal: expected value on mac os, for window comparision, you can ignore it as it will take default=null. For linux comparision, you need set to null.
+    *   expectedLinuxVal: expected value on linux os, for other os comparision, you can ignore it as it will take default=null. 
+    */
+    public function assertValueBasedOnOS(actualVal:*, expectedWinVal:*, expectedMacVal:*, expectedLinuxVal:*):String{
+        var result:String = "pass";
+        var current_os:String = Capabilities.os.toLowerCase();
+
+        if (current_os.indexOf("win") > -1){
+            if (actualVal != expectedWinVal)
+                result = "actual value = " + actualVal + "; expected value = " + expectedWinVal;
+        }else if (current_os.indexOf("mac") > -1){
+            if (actualVal != expectedMacVal)
+                result = "actual value = " + actualVal + "; expected value = " + expectedMacVal;
+        }else if (current_os.indexOf("linux") > -1){
+            if (actualVal != expectedLinuxVal)
+                result = "actual value = " + actualVal + "; expected value = " + expectedLinuxVal;
+        }else {
+            result = current_os + " isn't supported";
+        }
+
+        return result;
+    }
+    
+    
+    /**
+    * Reset things.  We can't use ResetComponent.
+    **/
+    public function doReset():void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+		trace("=========== now in doReset() ===========");
+		trace("width in doReset(): " + width);
+
+        app.addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+
+        // Save tests for a closed window for the end.  Once it's closed, it's closed for good.
+        if(app.nativeWindow.displayState == "normal"){
+            handleResetDisplayStateChange(new NativeWindowDisplayStateEvent("displayStateChange"));
+        }else{
+            app.restore();
+        }
+    }
+
+    private function handleResetDisplayStateChange(e:NativeWindowDisplayStateEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        app.maxWidth = 1000;
+        app.maxHeight = 1000;
+        app.minWidth = 140;
+        app.minHeight = 34;
+        
+        trace("width in handleResetDisplayStateChange(): " + width);
+        
+        if(app.nativeWindow.displayState != "normal"){
+            app.restore();
+        }else{        
+            app.removeEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+            app.addEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+    
+            if(app.height == heightResetVal &&
+               app.width == widthResetVal &&
+               app.getStyle('skinClass').type == WindowedApplicationSkin){
+                handleResetUpdateComplete(new FlexEvent("updateComplete"));
+            }else{
+                app.setStyle('skinClass', WindowedApplicationSkin);
+                app.height = heightResetVal;
+                app.width = widthResetVal;
+            }
+        }
+    }
+  
+    private function handleResetUpdateComplete(e:FlexEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+		trace("width in handleResetUpdateComplete(): " + width);
+
+        app.removeEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+        dispatchEvent(new FlexEvent("resetComplete"));
+    }
+
+
+]]>
+</fx:Script>
+<fx:Style>
+@namespace s "library://ns.adobe.com/flex/spark";
+@namespace mx "library://ns.adobe.com/flex/mx";
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+        fontWeight: bold;
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+        fontStyle: italic;
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    s|WindowedApplication{
+        fontFamily: EmbeddedVera;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }
+
+    s|TitleBar{
+        fontFamily: EmbeddedVera;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }
+
+</fx:Style>
+
+<fx:Declarations>    
+    <fx:Object id="bindingTarget"
+        theHeight="{height}" 
+        theWidth="{width}"/>
+</fx:Declarations>
+
+<s:Group id="group1" left="0" right="0" top="0" bottom="0">
+    <s:Button id="btn1" left="0" top="0" width="20" height="20" />
+    <s:Button id="btn2" right="0" top="0" width="20" height="20" />
+    <s:Button id="btn3" left="0" bottom="0" width="20" height="20" />
+    <s:Button id="btn4" right="0" bottom="0" width="20" height="20" />
+</s:Group>
+
+</s:WindowedApplication>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth.xml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth.xml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth.xml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+  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
+
+      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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/3.1">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0beta2
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+<versionNumber>1</versionNumber>
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>wa-properties-heightwidth</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>wa_properties_heightwidth</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>wa_properties_heightwidth</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>wa_properties_heightwidth.swf</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<systemChrome>none</systemChrome>
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<s:WindowedApplication
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
+    xmlns:custom="assets.*"
+    width="800" height="600" minWidth="140">
+
+<fx:Script>
+<![CDATA[
+
+    import flash.events.*;
+    import mx.core.FlexGlobals;
+    import mx.events.*;
+    import spark.components.*;
+    import spark.skins.spark.*;
+
+    public var heightResetVal:int = 600;
+    public var widthResetVal:int = 600;
+
+    /**
+    * Reset things.  We can't use ResetComponent.
+    **/
+    public function doReset():void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        app.addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+
+        // Save tests for a closed window for the end.  Once it's closed, it's closed for good.
+        if(app.nativeWindow.displayState == "normal"){
+            handleResetDisplayStateChange(new NativeWindowDisplayStateEvent("displayStateChange"));
+        }else{
+            app.restore();
+        }
+    }
+
+    private function handleResetDisplayStateChange(e:NativeWindowDisplayStateEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        app.removeEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+        app.addEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+
+        if(app.height == heightResetVal &&
+           app.width == widthResetVal &&
+           app.getStyle('skinClass').type == WindowedApplicationSkin){
+            handleResetUpdateComplete(new FlexEvent("updateComplete"));
+        }else{
+            app.setStyle('skinClass', WindowedApplicationSkin);
+            app.height = heightResetVal;
+            app.width = widthResetVal;
+        }
+    }
+  
+    private function handleResetUpdateComplete(e:FlexEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+        
+        app.removeEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+        dispatchEvent(new FlexEvent("resetComplete"));
+    }
+
+
+]]>
+</fx:Script>
+
+<fx:Declarations>    
+    <fx:Object id="bindingTarget" theHeight="{height}" />
+</fx:Declarations>
+
+<s:Group id="group1" left="0" right="0" top="0" bottom="0">
+    <s:Button id="btn1" left="0" top="0" width="20" height="20" />
+    <s:Button id="btn2" right="0" top="0" width="20" height="20" />
+    <s:Button id="btn3" left="0" bottom="0" width="20" height="20" />
+    <s:Button id="btn4" right="0" bottom="0" width="20" height="20" />
+</s:Group>
+
+</s:WindowedApplication>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize.xml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize.xml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize.xml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+  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
+
+      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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/3.1">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0beta2
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+<versionNumber>1</versionNumber>
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>wa-properties-height</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>wa_properties_height</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>wa_properties_height</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>wa_properties_heightwidth_minmaxsize.swf</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<systemChrome>none</systemChrome>
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<minSize>130 130</minSize>
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<maxSize>750 650</maxSize>
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize_systemchrome.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize_systemchrome.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize_systemchrome.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize_systemchrome.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<s:WindowedApplication
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
+    width="800" height="600">
+
+<!--
+Things to NOT change for this app:
+    - maximizable (true)
+    - minimizable (true)
+    - systemChrome (none)
+-->
+
+<fx:Script>
+<![CDATA[
+
+    import flash.events.*;
+    import mx.core.FlexGlobals;
+    import mx.events.*;
+    import spark.components.*;
+    import spark.skins.spark.*;
+
+    public var heightResetVal:int = 600;
+    public var widthResetVal:int = 600;
+
+    /**
+    * Reset things.  We can't use ResetComponent.
+    **/
+    public function doReset():void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        app.addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+
+        // Save tests for a closed window for the end.  Once it's closed, it's closed for good.
+        if(app.nativeWindow.displayState == "normal"){
+            handleResetDisplayStateChange(new NativeWindowDisplayStateEvent("displayStateChange"));
+        }else{
+            app.restore();
+        }
+    }
+
+    private function handleResetDisplayStateChange(e:NativeWindowDisplayStateEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        app.removeEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+        app.addEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+
+        if(app.height == heightResetVal &&
+           app.width == widthResetVal){
+            handleResetUpdateComplete(new FlexEvent("updateComplete"));
+        }else{
+            app.height = heightResetVal;
+            app.width = widthResetVal;
+        }
+    }
+  
+    private function handleResetUpdateComplete(e:FlexEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+        
+        app.removeEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+        dispatchEvent(new FlexEvent("resetComplete"));
+    }
+
+
+]]>
+</fx:Script>
+
+<fx:Declarations>    
+    <fx:Object id="bindingTarget" theHeight="{height}" />
+</fx:Declarations>
+
+<s:Group id="group1" left="0" right="0" top="0" bottom="0">
+    <s:Button id="btn1" left="0" top="0" width="20" height="20" />
+    <s:Button id="btn2" right="0" top="0" width="20" height="20" />
+    <s:Button id="btn3" left="0" bottom="0" width="20" height="20" />
+    <s:Button id="btn4" right="0" bottom="0" width="20" height="20" />
+</s:Group>
+
+</s:WindowedApplication>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize_systemchrome.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize_systemchrome.xml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize_systemchrome.xml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_minmaxsize_systemchrome.xml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+  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
+
+      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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/3.1">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0beta2
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+<versionNumber>1</versionNumber>
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>wa-properties-height-minmaxsize-systemchrome</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>wa_properties_height_minmaxsize_systemchrome</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>wa_properties_height_minmaxsize_systemchrome</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>wa_properties_heightwidth_minmaxsize_systemchrome.swf</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<systemChrome>standard</systemChrome>
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<minSize>130 130</minSize>
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<maxSize>750 650</maxSize>
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_systemchrome.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_systemchrome.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_systemchrome.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_systemchrome.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<s:WindowedApplication
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
+    xmlns:custom="assets.*"
+    width="800" height="600">
+
+<fx:Script>
+<![CDATA[
+
+    import flash.events.*;
+    import mx.core.FlexGlobals;
+    import mx.events.*;
+    import spark.components.*;
+    import spark.skins.spark.*;
+
+    public var heightResetVal:int = 600;
+    public var widthResetVal:int = 600;
+
+    /**
+    * Reset things.  We can't use ResetComponent.
+    **/
+    public function doReset():void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        app.addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+
+        // Save tests for a closed window for the end.  Once it's closed, it's closed for good.
+        if(app.nativeWindow.displayState == "normal"){
+            handleResetDisplayStateChange(new NativeWindowDisplayStateEvent("displayStateChange"));
+        }else{
+            app.restore();
+        }
+    }
+
+    private function handleResetDisplayStateChange(e:NativeWindowDisplayStateEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        app.removeEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+        app.addEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+
+        if(app.height == heightResetVal &&
+           app.width == widthResetVal){
+            handleResetUpdateComplete(new FlexEvent("updateComplete"));
+        }else{
+            app.height = heightResetVal;
+            app.width = widthResetVal;
+        }
+    }
+  
+    private function handleResetUpdateComplete(e:FlexEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        // Techinically we shouldn't do this I suppose, but the alternative is one MXML file
+        // per test case, which is not appropriate.
+        app.maxWidth = 1000;
+        app.maxHeight = 1000;
+        app.minWidth = 0;
+        app.minHeight = 0;
+        
+        app.removeEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+        dispatchEvent(new FlexEvent("resetComplete"));
+    }
+
+
+]]>
+</fx:Script>
+
+<fx:Style>
+@namespace s "library://ns.adobe.com/flex/spark";
+@namespace mx "library://ns.adobe.com/flex/mx";
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+        fontWeight: bold;
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+        fontStyle: italic;
+        fontFamily: EmbeddedVera;
+        embedAsCFF: true;
+    }
+
+    s|WindowedApplication{
+        fontFamily: EmbeddedVera;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }
+
+    s|TitleBar{
+        fontFamily: EmbeddedVera;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }
+
+</fx:Style>
+
+<fx:Declarations>    
+    <fx:Object id="bindingTarget" theHeight="{height}" />
+</fx:Declarations>
+
+<s:Group id="group1" left="0" right="0" top="0" bottom="0">
+    <s:Button id="btn1" left="0" top="0" width="20" height="20" />
+    <s:Button id="btn2" right="0" top="0" width="20" height="20" />
+    <s:Button id="btn3" left="0" bottom="0" width="20" height="20" />
+    <s:Button id="btn4" right="0" bottom="0" width="20" height="20" />
+</s:Group>
+
+</s:WindowedApplication>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_systemchrome.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_systemchrome.xml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_systemchrome.xml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_heightwidth_systemchrome.xml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+  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
+
+      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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/3.1">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0beta2
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+<versionNumber>1</versionNumber>
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>wa-properties-height-systemchrome</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>wa_properties_height_systemchrome</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>wa_properties_height_systemchrome</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>wa_properties_heightwidth_systemchrome.swf</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<systemChrome>standard</systemChrome>
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_minmaxheightwidth.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_minmaxheightwidth.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_minmaxheightwidth.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/SWFs/wa_properties_minmaxheightwidth.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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
+
+      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.
+
+-->
+<s:WindowedApplication
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark">
+
+<fx:Script>
+<![CDATA[
+
+    import flash.events.*;
+    import mx.core.FlexGlobals;
+    import mx.events.*;
+    import spark.components.*;
+    import spark.skins.spark.*;
+
+    public var heightResetVal:int = 100;
+    public var widthResetVal:int = 150;
+    public var maxHeightResetVal:int = 200;
+    public var maxWidthResetVal:int = 200;
+    public var minHeightResetVal:int = 34;
+    public var minWidthResetVal:int = 123;
+        
+    /**
+    * Reset things.  We can't use ResetComponent.
+    **/
+    public function doReset():void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        app.addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+
+        if(app.nativeWindow.displayState == "normal"){
+            handleResetDisplayStateChange(new NativeWindowDisplayStateEvent("displayStateChange"));
+        }else{
+            app.restore();
+        }
+    }
+
+    private function handleResetDisplayStateChange(e:NativeWindowDisplayStateEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+
+        app.removeEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE, handleResetDisplayStateChange);
+        app.addEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+
+        app.maxHeight = maxHeightResetVal;
+        app.maxWidth = maxWidthResetVal;
+        app.minHeight = minHeightResetVal;
+        app.minWidth = minWidthResetVal;
+
+        if(app.height == heightResetVal &&
+           app.width == widthResetVal &&
+           getStyle('skinClass').type == spark.skins.spark.WindowedApplicationSkin){
+           handleResetUpdateComplete(new FlexEvent("updateComplete"));
+        }else{
+           app.height = heightResetVal;
+           app.width = widthResetVal;
+           setStyle('skinClass', WindowedApplicationSkin);
+        }
+    }
+  
+    private function handleResetUpdateComplete(e:FlexEvent):void{
+        var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
+        
+        app.removeEventListener(FlexEvent.UPDATE_COMPLETE, handleResetUpdateComplete);
+        dispatchEvent(new FlexEvent("resetComplete"));
+    }
+    
+    /**
+    *   compare the actual value with expected value based on os.  It returns an error string if comparison fails, otherwise an empty string.
+    *   actualVal: actual value used for comparison
+    *   expectedWinVal: expected value on window os.
+    *   expectedMacVal: expected value on mac os, for window comparision, you can ignore it as it will take default=null. For linux comparision, you need set to null.
+    *   expectedLinuxVal: expected value on linux os, for other os comparision, you can ignore it as it will take default=null. 
+    */
+    public function assertValueBasedOnOS(actualVal:*, expectedWinVal:*, expectedMacVal:*, expectedLinuxVal:*):String{
+        var result:String = "pass";
+        var current_os:String = Capabilities.os.toLowerCase();
+
+        if (current_os.indexOf("win") > -1){
+            if (actualVal != expectedWinVal)
+                result = "actual value = " + actualVal + "; expected value = " + expectedWinVal;
+        }else if (current_os.indexOf("mac") > -1){
+            if (actualVal != expectedMacVal)
+                result = "actual value = " + actualVal + "; expected value = " + expectedMacVal;
+        }else if (current_os.indexOf("linux") > -1){
+            if (actualVal != expectedLinuxVal)
+                result = "actual value = " + actualVal + "; expected value = " + expectedLinuxVal;
+        }else {
+            result = current_os + " isn't supported";
+        }
+
+        return result;
+    }
+
+]]>
+</fx:Script>
+
+<fx:Declarations>    
+    <fx:Object id="bindingTarget" 
+        theMaxHeight="{maxHeight}"
+        theMinHeight="{minHeight}"
+        theMaxWidth="{maxWidth}"
+        theMinWidth="{minWidth}" />
+</fx:Declarations>
+
+</s:WindowedApplication>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



Mime
View raw message