incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ftho...@apache.org
Subject svn commit: r1417169 - in /incubator/flex/whiteboard/fthomas/developerToolSuite/trunk: org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/ org.apache.flex...
Date Tue, 04 Dec 2012 20:56:29 GMT
Author: fthomas
Date: Tue Dec  4 20:56:27 2012
New Revision: 1417169

URL: http://svn.apache.org/viewvc?rev=1417169&view=rev
Log:
- Changed the Settings Panel base component to a TitleWindow 
- Created a VisualBasic Frame like component to hold the settings values

Added:
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/
      - copied from r1416916, incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/component/
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/Frame.as
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/FrameSkin.mxml
    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
      - copied, changed from r1416916, incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsPanel.mxml
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/SettingsWindow.properties
      - copied unchanged from r1416916, incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/SettingsPanel.properties
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/fr_FR/SettingsWindow.properties
      - copied unchanged from r1416916, incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/fr_FR/SettingsPanel.properties
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.standard-theme/src/main/flex/org/apache/flex/utilities/developerToolSuite/graphic/component/
Removed:
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsPanel.mxml
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/component/
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/SettingsPanel.properties
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/fr_FR/SettingsPanel.properties
Modified:
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/menu/GeneralMenu.as
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/GeneralSettings.mxml
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.standard-theme/src/main/resources/default.css

Added: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/Frame.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/presentation/graphic/component/Frame.as?rev=1417169&view=auto
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/Frame.as
(added)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/Frame.as
Tue Dec  4 20:56:27 2012
@@ -0,0 +1,192 @@
+package org.apache.flex.utilities.developerToolSuite.presentation.graphic.component {
+    import flash.events.Event;
+
+    import mx.core.IVisualElement;
+
+    import spark.components.BorderContainer;
+    import spark.core.IDisplayText;
+
+    /**
+     *  Color applied to the button when the emphasized flag is true.
+     *
+     *  @default #0099FF
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [Style(name="accentColor", type="uint", format="Color", inherit="yes", theme="spark,
mobile")]
+
+    /**
+     *  Color of text shadows.
+     *
+     *  @default #FFFFFF
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [Style(name="textShadowColor", type="uint", format="Color", inherit="yes", theme="mobile")]
+
+    /**
+     *  Alpha of text shadows.
+     *
+     *  @default 0.55
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [Style(name="textShadowAlpha", type="Number", inherit="yes", minValue="0.0", maxValue="1.0",
theme="mobile")]
+
+    [Exclude(name="textAlign", kind="style")]
+
+    //-------------------------------------- //  Other metadata //--------------------------------------
+
+
+    public class Frame extends BorderContainer{
+        public function Frame() {
+            super();
+        }
+
+        [SkinPart(required="false")]
+
+        /**
+         *  A skin part that defines the label of the button.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */ public var labelDisplay:IDisplayText;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden methods
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  toolTip
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        private var _explicitToolTip:Boolean = false;
+
+        [Inspectable(category="General", defaultValue="null")]
+
+        /**
+         *  @private
+         */ override public function set toolTip(value:String):void {
+            super.toolTip = value;
+
+            _explicitToolTip = value != null;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Properties
+        //
+        //--------------------------------------------------------------------------
+
+        private var _label:String;
+
+        /**
+         *  Text to appear on the on the border's Frame control.
+         *
+         *  <p>If the label is wider than the Frame control,
+         *  the label is truncated and terminated by an ellipsis (...).
+         *  The full label displays as a tooltip
+         *  when the user moves the mouse over the control.
+         *  If you have also set a tooltip by using the <code>tooltip</code>
+         *  property, the tooltip is displayed rather than the label text.</p>
+         *
+         *  <p>This is the default Frame property.</p>
+         *
+         *  <p>This property is a <code>String</code> typed facade to the
+         *  <code>content</code> property.  This property is bindable and it
shares
+         *  dispatching the "contentChange" event with the <code>content</code>
+         *  property.</p>
+         *
+         *  @default ""
+         *  @see #content
+         *  @eventType contentChange
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function set label(value:String):void {
+            // Push to the optional labelDisplay skin part
+
+            _label = value;
+
+            if (labelDisplay)
+                labelDisplay.text = _label;
+
+            dispatchEvent(new Event("labelChange"));
+        }
+
+        /**
+         *  @private
+         */
+        public function get label():String {
+            return _label;
+        }
+
+        public var showLabel:Boolean = true;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden properties
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        override protected function partAdded(partName:String, instance:Object):void {
+            super.partAdded(partName, instance);
+
+            if (instance == labelDisplay) {
+                labelDisplay.addEventListener("isTruncatedChanged", labelDisplay_isTruncatedChangedHandler);
+
+                // Push down to the part only if the label was explicitly set
+                if (labelDisplay !== null)
+                    labelDisplay.text = label;
+            }
+        }
+
+        /**
+         *  @private
+         */
+        override protected function partRemoved(partName:String, instance:Object):void {
+            super.partRemoved(partName, instance);
+
+            if (instance == labelDisplay) {
+                labelDisplay.removeEventListener("isTruncatedChanged", labelDisplay_isTruncatedChangedHandler);
+            }
+        }
+
+        /**
+         *  @private
+         */
+        private function labelDisplay_isTruncatedChangedHandler(event:Event):void {
+
+            if (_explicitToolTip)
+                return;
+
+            var isTruncated:Boolean = labelDisplay.isTruncated;
+
+            // If the label is truncated, show the whole label string as a tooltip.
+            // We set super.toolTip to avoid setting our own _explicitToolTip.
+            super.toolTip = isTruncated ? labelDisplay.text : null;
+        }
+    }
+}

Added: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/FrameSkin.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/component/FrameSkin.mxml?rev=1417169&view=auto
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/FrameSkin.mxml
(added)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/component/FrameSkin.mxml
Tue Dec  4 20:56:27 2012
@@ -0,0 +1,217 @@
+<?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.
+
+-->
+<spark:BorderContainerSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
+                            xmlns:s="library://ns.adobe.com/flex/spark"
+                            xmlns:spark="spark.skins.spark.*"
+                            implements="mx.core.IRectangularBorder"
+                            minWidth="120" minHeight="40"
+                            alpha.disabled="0.5">
+
+    <fx:Metadata>
+        [HostComponent("org.apache.flex.utilities.developerToolSuite.presentation.graphic.component.Frame")]
+    </fx:Metadata>
+
+    <fx:Declarations>
+        <s:State name="normal"/>
+        <s:State name="disabled"/>
+    </fx:Declarations>
+
+    <fx:Script>
+        <![CDATA[
+        import mx.core.EdgeMetrics;
+        import mx.core.IVisualElement;
+
+        import org.apache.flex.utilities.developerToolSuite.presentation.graphic.component.Frame;
+
+        import spark.components.BorderContainer;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Variables
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         * @private
+         * Saves our label's previous textAlign value.
+         */
+        private var prevTextAlign:String;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Properties
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  hostComponent
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        private var _hostComponent:BorderContainer;
+
+        /**
+         *  @private
+         */
+        override public function set hostComponent(value:BorderContainer):void {
+            if (_hostComponent) {
+                _hostComponent.removeEventListener("labelChange", labelChangeChangeHandler);
+            }
+
+            _hostComponent = value;
+
+            if (value) {
+                _hostComponent.addEventListener("contentChange", labelChangeChangeHandler);
+            }
+        }
+
+        /**
+         *  @private
+         */
+        override public function get hostComponent():BorderContainer {
+            return _hostComponent;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Event Handlers
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        protected function labelChangeChangeHandler(event:Event):void {
+            // Ensure empty label is not included in layout else
+            // a gap between icon and label would be applied.
+            if (labelDisplay) {
+                IVisualElement(labelDisplay).includeInLayout = labelDisplay.text != null
&& labelDisplay.text.length;
+            }
+        }
+
+        /* Define the skin elements that should not be colorized. */
+        static private const exclusions:Array = ["background", "labelDisplay"];
+
+        /**
+         * @private
+         */
+        public function get colorizeExclusions():Array {
+            return exclusions;
+        }
+
+        static private const metrics:EdgeMetrics = new EdgeMetrics(1, 1, 1, 1);
+
+        /**
+         * @private
+         */
+        public function get borderMetrics():EdgeMetrics {
+            if (getStyle("borderVisible") == false || getStyle("borderStyle") == "none")
{
+                return EdgeMetrics.EMPTY;
+            }
+
+            return metrics;
+        }
+
+        /**
+         * @private
+         */
+        public function get backgroundImageBounds():Rectangle {
+            return null;
+        }
+
+        /**
+         * @private
+         */
+        public function set backgroundImageBounds(value:Rectangle):void {
+
+        }
+
+        /**
+         * @private
+         */
+        public function get hasBackgroundImage():Boolean {
+            return false;
+        }
+
+        /**
+         * @private
+         */
+        public function layoutBackgroundImage():void {
+
+        }
+
+        override protected function commitProperties():void {
+            super.commitProperties();
+            labelBackground.visible = labelDisplay.visible = Frame(hostComponent).showLabel;
+        }
+
+        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
+            super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+            if (labelDisplay && labelDisplay.visible) {
+                labelDisplay.y = 0;
+                labelDisplay.x = (hostComponent.width - labelDisplay.width) / 2;
+
+                labelBackground.x = labelDisplay.x - 2;
+                labelBackground.width = labelDisplay.width + 4;
+                labelBackground.height = labelDisplay.height;
+            }
+        }
+        ]]>
+    </fx:Script>
+
+    <!-- fill -->
+    <!--- @private -->
+    <s:Rect id="background" left="0" right="0" top="0" bottom="0" radiusX="0">
+        <s:fill>
+            <!--- @private -->
+            <s:SolidColor id="bgFill" color="0xFFFFFF"/>
+        </s:fill>
+    </s:Rect>
+
+    <!-- border -->
+    <!--- @private -->
+    <s:Rect left="4" right="4" top="4" bottom="4" radiusX="0" id="border">
+        <s:stroke>
+            <!--- @private -->
+            <s:SolidColorStroke id="borderStroke"/>
+        </s:stroke>
+    </s:Rect>
+
+
+    <!-- fill -->
+    <!--- @private -->
+    <s:Rect id="labelBackground" radiusX="0">
+        <s:fill>
+            <!--- @private -->
+            <s:SolidColor color="{bgFill.color}"/>
+        </s:fill>
+    </s:Rect>
+
+    <!-- labelDisplay -->
+    <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay  -->
+    <s:Label id="labelDisplay"
+             textAlign="center"
+             maxDisplayedLines="1" maxWidth="{border.width - 4}"
+             horizontalCenter="0" verticalCenter="1" verticalAlign="top">
+    </s:Label>
+</spark:BorderContainerSkin>

Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/menu/GeneralMenu.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/presentation/graphic/menu/GeneralMenu.as?rev=1417169&r1=1417168&r2=1417169&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/menu/GeneralMenu.as
(original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/menu/GeneralMenu.as
Tue Dec  4 20:56:27 2012
@@ -21,7 +21,7 @@ package org.apache.flex.utilities.develo
     import mx.managers.PopUpManager;
     import mx.resources.ResourceManager;
 
-    import org.apache.flex.utilities.developerToolSuite.presentation.graphic.settings.SettingsPanel;
+    import org.apache.flex.utilities.developerToolSuite.presentation.graphic.settings.SettingsWindow;
     import org.spicefactory.parsley.core.context.Context;
 
     public class GeneralMenu {
@@ -49,10 +49,7 @@ package org.apache.flex.utilities.develo
         }
 
         public function openSettings(item:Object):void {
-            var settingsWindow:SettingsPanel = new SettingsPanel();
-            context.viewManager.addViewRoot(settingsWindow);
-            PopUpManager.addPopUp(settingsWindow, FlexGlobals.topLevelApplication as DisplayObject,
true);
-            PopUpManager.centerPopUp(settingsWindow);
+            SettingsWindow.show(context);
         }
     }
 }

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/GeneralSettings.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/GeneralSettings.mxml?rev=1417169&r1=1417168&r2=1417169&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/GeneralSettings.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/GeneralSettings.mxml
Tue Dec  4 20:56:27 2012
@@ -19,6 +19,7 @@ limitations under the License.
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/mx"
          xmlns:parsley="http://www.spicefactory.org/parsley"
+         xmlns:component="org.apache.flex.utilities.developerToolSuite.presentation.graphic.component.*"
          width="100%" height="100%">
 
 
@@ -28,20 +29,20 @@ limitations under the License.
 
     <mx:GridRow width="100%" horizontalAlign="center">
         <mx:GridItem>
-            <s:BorderContainer>
-                <s:layout>
-                    <s:HorizontalLayout verticalAlign="middle" paddingLeft="8" paddingRight="8"
paddingTop="8" paddingBottom="8" gap="16"/>
-                </s:layout>
-                <s:Label id="languageLabel" text="{resourceManager.getString('SettingsPanel',
'LANGUAGE')}"/>
+            <component:Frame label="{resourceManager.getString('SettingsWindow', 'LANGUAGE')}"
skinClass="{FrameSkin}" width="240" height="80">
+                <component:layout>
+                    <s:HorizontalLayout horizontalAlign="center" verticalAlign="middle"
paddingLeft="8" paddingRight="8" paddingTop="8" paddingBottom="8" gap="16"/>
+                </component:layout>
                 <s:DropDownList id="languageComboBox"
-                                change="localeComboBox_changeHandler(event)"/>
-            </s:BorderContainer>
+                                change="localeComboBox_changeHandler(event)" width="180"/>
+            </component:Frame>
         </mx:GridItem>
     </mx:GridRow>
 
     <fx:Script><![CDATA[
         import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ChangeLanguageMessage;
         import org.apache.flex.utilities.developerToolSuite.presentation.behavior.settingsPanel.IGeneralSettingsPM;
+        import org.apache.flex.utilities.developerToolSuite.presentation.graphic.component.FrameSkin;
 
         import spark.events.IndexChangeEvent;
 

Copied: 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
(from r1416916, incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsPanel.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?p2=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&p1=incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsPanel.mxml&r1=1416916&r2=1417169&rev=1417169&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/SettingsPanel.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
Tue Dec  4 20:56:27 2012
@@ -15,15 +15,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY 
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
+<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/mx"
          xmlns:parsley="http://www.spicefactory.org/parsley"
          xmlns:settings="org.apache.flex.utilities.developerToolSuite.presentation.graphic.settings.*"
          title="{resourceManager.getString('Application', 'SETTINGS')}"
-         width="640" height="480"
+         width="800" height="480"
          addedToStage="addedToStageHandler(event)"
-         removedFromStage="removedFromStageHandler(event)">
+         removedFromStage="removedFromStageHandler(event)"
+         close="PopUpManager.removePopUp(this)">
 
     <s:layout>
         <s:VerticalLayout/>
@@ -32,7 +33,7 @@ limitations under the License.
     <s:TabBar dataProvider="{settingsViewStack}"/>
 
     <mx:ViewStack id="settingsViewStack" height="100%" width="100%">
-        <s:NavigatorContent id="generalSettingsContent" label="{resourceManager.getString('SettingsPanel',
'GENERAL')}">
+        <s:NavigatorContent id="generalSettingsContent" label="{resourceManager.getString('SettingsWindow',
'GENERAL')}">
             <settings:GeneralSettings />
         </s:NavigatorContent>
     </mx:ViewStack>
@@ -42,15 +43,27 @@ limitations under the License.
         <s:layout>
             <s:HorizontalLayout horizontalAlign="center" paddingBottom="16"/>
         </s:layout>
-        <s:Button label="{resourceManager.getString('SettingsPanel', 'CLOSE')}"
+        <s:Button label="{resourceManager.getString('SettingsWindow', 'CLOSE')}"
                   click="PopUpManager.removePopUp(this)"/>
     </s:Group>
 
     <fx:Script><![CDATA[
         import mx.core.FlexGlobals;
+        import mx.core.IFlexDisplayObject;
         import mx.events.ResizeEvent;
         import mx.managers.PopUpManager;
 
+        import org.spicefactory.parsley.core.context.Context;
+
+        public static function show(context:Context,modal:Boolean = true):SettingsWindow
{
+            var window:SettingsWindow = new SettingsWindow();
+
+            context.viewManager.addViewRoot(window);
+            PopUpManager.addPopUp(window, FlexGlobals.topLevelApplication as DisplayObject,
modal);
+            PopUpManager.centerPopUp(window);
+            return window;
+        }
+
         private function addedToStageHandler(event:Event):void {
             FlexGlobals.topLevelApplication.addEventListener(ResizeEvent.RESIZE, resizeHandler);
         }
@@ -63,4 +76,4 @@ limitations under the License.
             PopUpManager.centerPopUp(this);
         }
         ]]></fx:Script>
-</s:Panel>
+</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=1417169&r1=1417168&r2=1417169&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
Tue Dec  4 20:56:27 2012
@@ -34,7 +34,7 @@ limitations under the License.
 
     <fx:Metadata>
         [ResourceBundle("Application")]
-        [ResourceBundle("SettingsPanel")]
+        [ResourceBundle("SettingsWindow")]
     </fx:Metadata>
 
     <s:layout>

Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.standard-theme/src/main/resources/default.css
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.standard-theme/src/main/resources/default.css?rev=1417169&r1=1417168&r2=1417169&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.standard-theme/src/main/resources/default.css
(original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.standard-theme/src/main/resources/default.css
Tue Dec  4 20:56:27 2012
@@ -23,6 +23,6 @@ asf|MainApplication {
     skinClass: ClassReference("org.apache.flex.utilities.developerToolSuite.ApplicationSkin");
 }
 
-s|Panel {
+s|TitleWindow {
     contentBackgroundColor: #DDDDDD;
 }



Mime
View raw message