flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ftho...@apache.org
Subject svn commit: r1418348 - in /incubator/flex/whiteboard/fthomas/developerToolSuite/trunk: org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/ org.apache.flex.utilities...
Date Fri, 07 Dec 2012 15:06:50 GMT
Author: fthomas
Date: Fri Dec  7 15:06:48 2012
New Revision: 1418348

URL: http://svn.apache.org/viewvc?rev=1418348&view=rev
Log:
- Hide/show the WindowedApplication menu on open/close popup

Added:
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/ModalWindowEvent.as
Modified:
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsWindow.mxml
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml

Added: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/ModalWindowEvent.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/ModalWindowEvent.as?rev=1418348&view=auto
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/ModalWindowEvent.as
(added)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/ModalWindowEvent.as
Fri Dec  7 15:06:48 2012
@@ -0,0 +1,13 @@
+package org.apache.flex.utilities.developerToolSuite.infrastructure.event {
+    import flash.events.Event;
+
+    public class ModalWindowEvent extends Event{
+
+        public static const OPENED:String = "opened";
+        public static const CLOSED:String = "closed";
+
+        public function ModalWindowEvent(type:String) {
+            super (type);
+        }
+    }
+}

Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsWindow.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsWindow.mxml?rev=1418348&r1=1418347&r2=1418348&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsWindow.mxml
(original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsWindow.mxml
Fri Dec  7 15:06:48 2012
@@ -24,7 +24,17 @@ limitations under the License.
                width="100%" height="480"
                addedToStage="addedToStageHandler(event)"
                removedFromStage="removedFromStageHandler(event)"
-               close="PopUpManager.removePopUp(this)">
+               close="closeWindow()">
+
+    <fx:Declarations>
+        <parsley:Configure/>
+    </fx:Declarations>
+
+    <fx:Metadata>
+        [Event(name="opened", type="org.apache.flex.utilities.developerToolSuite.infrastructure.event.ModalWindowEvent")]
+        [Event(name="closed", type="org.apache.flex.utilities.developerToolSuite.infrastructure.event.ModalWindowEvent")]
+        [ManagedEvents("opened,closed")]
+    </fx:Metadata>
 
     <s:layout>
         <s:VerticalLayout/>
@@ -44,7 +54,7 @@ limitations under the License.
             <s:HorizontalLayout horizontalAlign="center" paddingBottom="16"/>
         </s:layout>
         <s:Button label="{resourceManager.getString('SettingsWindow', 'CLOSE')}"
-                  click="PopUpManager.removePopUp(this)"/>
+                  click="closeWindow()"/>
     </s:Group>
 
     <fx:Script><![CDATA[
@@ -52,6 +62,8 @@ limitations under the License.
         import mx.events.ResizeEvent;
         import mx.managers.PopUpManager;
 
+        import org.apache.flex.utilities.developerToolSuite.infrastructure.event.ModalWindowEvent;
+
         import org.spicefactory.parsley.core.context.Context;
 
         public static function show(context:Context, modal:Boolean = true):SettingsWindow
{
@@ -63,6 +75,11 @@ limitations under the License.
             return window;
         }
 
+        [Init]
+        public function init():void {
+            dispatchEvent(new ModalWindowEvent(ModalWindowEvent.OPENED));
+        }
+
         private function addedToStageHandler(event:Event):void {
             FlexGlobals.topLevelApplication.addEventListener(ResizeEvent.RESIZE, resizeHandler);
         }
@@ -74,5 +91,10 @@ limitations under the License.
         private function resizeHandler(event:ResizeEvent):void {
             PopUpManager.centerPopUp(this);
         }
+
+        private function closeWindow():void{
+            PopUpManager.removePopUp(this);
+            dispatchEvent(new ModalWindowEvent(ModalWindowEvent.CLOSED));
+        }
         ]]></fx:Script>
 </s:TitleWindow>

Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml?rev=1418348&r1=1418347&r2=1418348&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml
(original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml
Fri Dec  7 15:06:48 2012
@@ -55,6 +55,7 @@ limitations under the License.
         import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.InitApplicationMessage;
         import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.SaveSettingMessage;
         import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.util.LogUtil;
+        import org.apache.flex.utilities.developerToolSuite.infrastructure.event.ModalWindowEvent;
         import org.apache.flex.utilities.developerToolSuite.presentation.config.SettingsContext;
         import org.apache.flex.utilities.developerToolSuite.presentation.graphic.menu.ApplicationMenu;
 
@@ -106,7 +107,7 @@ limitations under the License.
         private function addLog():void {
             var parsleyLogger:TraceTarget = new TraceTarget();
             parsleyLogger.filters = ["org.spicefactory.*", "mx.*"];
-            parsleyLogger.level = LogEventLevel.WARN;
+            parsleyLogger.level = LogEventLevel.ALL;
             parsleyLogger.includeCategory = true;
             parsleyLogger.includeLevel = true;
             parsleyLogger.fieldSeparator = " -> ";
@@ -121,6 +122,16 @@ limitations under the License.
             Log.addTarget(devLogger);
         }
 
+        [MessageHandler(selector='opened')]
+        public function modalWindowOpenedHandler(event:ModalWindowEvent):void {
+            menu = null;
+        }
+
+        [MessageHandler(selector='closed')]
+        public function modalWindowClosedHandler(event:ModalWindowEvent):void {
+            menu = applicationMenu;
+        }
+
         private function closingHandler(event:Event):void {
             dispatch(new SaveSettingMessage("appBounds", nativeWindow.x + "," + nativeWindow.y
+ "," + nativeWindow.width + "," + nativeWindow.height));
             dispatch(new SaveSettingMessage("appDisplayState", nativeWindow.displayState));



Mime
View raw message