You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/12/04 20:48:33 UTC

[royale-asjs] 01/02: closebutton in title window. still needs CSS

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 3aa45c12e7237a1b41fb052fbba3183000332c92
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Dec 3 23:49:45 2019 -0800

    closebutton in title window.  still needs CSS
---
 .../SparkRoyale/src/main/resources/defaults.css    |  5 ++
 .../src/main/royale/SparkRoyaleClasses.as          |  1 +
 .../spark/components/beads/TitleWindowView.as      | 66 ++++++++++++++++++++++
 3 files changed, 72 insertions(+)

diff --git a/frameworks/projects/SparkRoyale/src/main/resources/defaults.css b/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
index 837bfa5..98e2622 100644
--- a/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
+++ b/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
@@ -197,6 +197,11 @@ TextArea
 	background-color: #FFFFFF;
 }
 
+TitleWindow
+{
+	IBeadView: ClassReference("spark.components.beads.TitleWindowView");
+}
+
 /* -------------------------------------------------------
 * SWF specific styles
 * -------------------------------------------------------
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as b/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
index 641e7fd..82ec840 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
@@ -78,6 +78,7 @@ internal class SparkRoyaleClasses
     import spark.components.beads.GroupView; GroupView;
     import spark.components.beads.SkinnableContainerView; SkinnableContainerView;
     import spark.components.beads.DropDownListView; DropDownListView;
+    import spark.components.beads.TitleWindowView; TitleWindowView;
     import spark.components.beads.controllers.DropDownListController; DropDownListController;
     import spark.components.beads.controllers.TabBarController; TabBarController;
     import spark.controls.advancedDataGridClasses.MXAdvancedDataGridItemRenderer; MXAdvancedDataGridItemRenderer;
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/TitleWindowView.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/TitleWindowView.as
new file mode 100644
index 0000000..5b5b2a9
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/TitleWindowView.as
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.components.beads
+{
+
+import spark.components.SkinnableContainer;
+import mx.containers.beads.models.PanelModel;
+
+import org.apache.royale.core.IBead;
+import org.apache.royale.core.ILayoutChild;
+import org.apache.royale.core.IStrand;
+
+/**
+ *  @private
+ *  The PanelView for emulation.
+ */
+public class TitleWindowView extends PanelView
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public function TitleWindowView()
+	{
+		super();
+	}
+
+    /**
+     */
+    override public function set strand(value:IStrand):void
+    {
+        super.strand = value;
+        var host:SkinnableContainer = _strand as SkinnableContainer;
+        var model:PanelModel = host.model as PanelModel;
+        model.showCloseButton = true;    
+    }
+}
+}
+