You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/09/25 18:03:58 UTC

[16/50] git commit: [flex-asjs] [refs/heads/develop] - move TitleBarView to FlexJSJX

move TitleBarView to FlexJSJX


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a99dfd4c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a99dfd4c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a99dfd4c

Branch: refs/heads/develop
Commit: a99dfd4cb387be0808b62dd4997c9da790c011f2
Parents: 5b023f2
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 16 23:21:40 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 23 14:49:47 2014 -0700

----------------------------------------------------------------------
 .../as/projects/FlexJSJX/compile-config.xml     |  15 +++
 .../as/projects/FlexJSJX/src/FlexJSJXClasses.as |   4 +
 .../flex/html/beads/TitleBarMeasurementBead.as  | 108 +++++++++++++++++++
 .../apache/flex/html/beads/TitleBarView.mxml    |  54 ++++++++++
 frameworks/as/projects/FlexJSUI/build.xml       |   4 -
 .../as/projects/FlexJSUI/compile-config.xml     |   8 ++
 .../as/projects/FlexJSUI/src/FlexJSUIClasses.as |   2 -
 .../flex/html/beads/TitleBarMeasurementBead.as  | 108 -------------------
 .../apache/flex/html/beads/TitleBarView.mxml    |  54 ----------
 9 files changed, 189 insertions(+), 168 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSJX/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/compile-config.xml b/frameworks/as/projects/FlexJSJX/compile-config.xml
index 2006657..31a8edd 100644
--- a/frameworks/as/projects/FlexJSJX/compile-config.xml
+++ b/frameworks/as/projects/FlexJSJX/compile-config.xml
@@ -25,6 +25,21 @@
             <path-element>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
             <path-element>../../libs/FlexJSUI.swc</path-element>
         </external-library-path>
+
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
         
         <locale/>
         

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
index 6526ced..8b993cc 100644
--- a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
+++ b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
@@ -67,6 +67,10 @@ internal class FlexJSJXClasses
 	import org.apache.flex.html.beads.controllers.DateFieldMouseController; DateFieldMouseController;
 	import org.apache.flex.html.supportClasses.DataGridColumn; DataGridColumn;
 	import org.apache.flex.html.supportClasses.DateChooserButton; DateChooserButton;
+    
+    import org.apache.flex.html.beads.TitleBarView; TitleBarView;
+    import org.apache.flex.html.beads.TitleBarMeasurementBead; TitleBarMeasurementBead;
+
 }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
new file mode 100644
index 0000000..8195f70
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.html.beads
+{
+	import org.apache.flex.core.IMeasurementBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.html.TitleBar;
+	
+	/**
+	 *  The TitleBarMeasurementBead class measures the overall size of a 
+	 *  org.apache.flex.html.TitleBar.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class TitleBarMeasurementBead implements IMeasurementBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function TitleBarMeasurementBead()
+		{
+		}
+		
+		/**
+		 *  The overall width of the org.apache.flex.html.TitleBar.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get measuredWidth():Number
+		{
+			var mwidth:Number = 0;
+			var titleBar:TitleBar = _strand as TitleBar;
+			var titleView:TitleBarView = _strand.getBeadByType(TitleBarView) as TitleBarView;
+			var labelMeasure:IMeasurementBead = titleView.titleLabel.measurementBead;
+			mwidth = labelMeasure.measuredWidth;
+			if( titleBar.showCloseButton ) {
+				var buttonMeasure:IMeasurementBead = titleView.closeButton.measurementBead;
+				mwidth += buttonMeasure.measuredWidth;
+			}
+			return mwidth;
+		}
+		
+		/**
+		 *  The overall height of the org.apache.flex.html.TitleBar.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get measuredHeight():Number
+		{
+			var mheight:Number = 0;
+			var titleBar:TitleBar = _strand as TitleBar;
+			var titleView:TitleBarView = _strand.getBeadByType(TitleBarView) as TitleBarView;
+			var labelMeasure:IMeasurementBead = titleView.titleLabel.measurementBead;
+			mheight = labelMeasure.measuredHeight;
+			if( titleBar.showCloseButton ) {
+				var buttonMeasure:IMeasurementBead = titleView.closeButton.measurementBead;
+				mheight = Math.max(mheight,buttonMeasure.measuredHeight);
+			}
+			return mheight;
+		}
+		
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
new file mode 100644
index 0000000..6ed8ccf
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
@@ -0,0 +1,54 @@
+<?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.
+
+-->
+<basic:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+                  xmlns:basic="library://ns.apache.org/flexjs/basic" 
+                  xmlns:mx="library://ns.adobe.com/flex/mx"
+                  implements="org.apache.flex.core.ILayoutParent">
+    <fx:Script>
+        <![CDATA[
+            import org.apache.flex.html.TitleBar;
+            import org.apache.flex.core.ITitleBarModel;
+            import org.apache.flex.core.UIBase;
+            import org.apache.flex.events.Event;
+            
+            private function clickHandler():void
+            {
+                var newEvent:org.apache.flex.events.Event = new org.apache.flex.events.Event('close',true);
+                UIBase(_strand).dispatchEvent(newEvent)   
+            }
+        ]]>
+    </fx:Script>
+    <basic:beads>
+        <basic:MXMLBeadViewBaseDataBinding />
+        <basic:LayoutChangeNotifier watchedProperty="{ITitleBarModel(model).title}" />
+        <basic:SolidBackgroundBead />
+    </basic:beads>
+
+    <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" 
+                                 html="{ITitleBarModel(model).htmlTitle}" >
+        <basic:style>
+            <basic:SimpleCSSStyles fontWeight="inherit" />
+        </basic:style>
+    </basic:Label>
+    <basic:CloseButton id="closeButton" click="clickHandler()"
+                       visible="{ITitleBarModel(model).showCloseButton}";
+/>
+    
+</basic:MXMLBeadViewBase>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/build.xml b/frameworks/as/projects/FlexJSUI/build.xml
index 056ccd0..6a911c9 100644
--- a/frameworks/as/projects/FlexJSUI/build.xml
+++ b/frameworks/as/projects/FlexJSUI/build.xml
@@ -71,10 +71,6 @@
                output="${FLEXJS_HOME}/frameworks/as/libs/FlexJSUI.swc">
             <jvmarg line="${compc.jvm.args}"/>
             <load-config filename="compile-config.xml" />
-            <arg value="-compiler.mxml.children-as-data" />
-            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-type=valueChange" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
         </compc>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/compile-config.xml b/frameworks/as/projects/FlexJSUI/compile-config.xml
index 0825a35..7da5476 100644
--- a/frameworks/as/projects/FlexJSUI/compile-config.xml
+++ b/frameworks/as/projects/FlexJSUI/compile-config.xml
@@ -32,6 +32,14 @@
 		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
         <locale/>
         
         <library-path/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 85f1f5f..51b0839 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -79,8 +79,6 @@ internal class FlexJSUIClasses
     import org.apache.flex.html.beads.TextFieldView; TextFieldView;
     import org.apache.flex.html.beads.TextInputView; TextInputView;
     import org.apache.flex.html.beads.TextInputWithBorderView; TextInputWithBorderView;
-    import org.apache.flex.html.beads.TitleBarMeasurementBead; TitleBarMeasurementBead;
-	import org.apache.flex.html.beads.TitleBarView; TitleBarView;
     import org.apache.flex.html.beads.models.AlertModel; AlertModel;
     import org.apache.flex.html.beads.models.ArraySelectionModel; ArraySelectionModel;
     import org.apache.flex.html.beads.models.ComboBoxModel; ComboBoxModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
deleted file mode 100644
index 8195f70..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarMeasurementBead.as
+++ /dev/null
@@ -1,108 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 org.apache.flex.html.beads
-{
-	import org.apache.flex.core.IMeasurementBead;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.html.TitleBar;
-	
-	/**
-	 *  The TitleBarMeasurementBead class measures the overall size of a 
-	 *  org.apache.flex.html.TitleBar.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class TitleBarMeasurementBead implements IMeasurementBead
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function TitleBarMeasurementBead()
-		{
-		}
-		
-		/**
-		 *  The overall width of the org.apache.flex.html.TitleBar.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function get measuredWidth():Number
-		{
-			var mwidth:Number = 0;
-			var titleBar:TitleBar = _strand as TitleBar;
-			var titleView:TitleBarView = _strand.getBeadByType(TitleBarView) as TitleBarView;
-			var labelMeasure:IMeasurementBead = titleView.titleLabel.measurementBead;
-			mwidth = labelMeasure.measuredWidth;
-			if( titleBar.showCloseButton ) {
-				var buttonMeasure:IMeasurementBead = titleView.closeButton.measurementBead;
-				mwidth += buttonMeasure.measuredWidth;
-			}
-			return mwidth;
-		}
-		
-		/**
-		 *  The overall height of the org.apache.flex.html.TitleBar.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function get measuredHeight():Number
-		{
-			var mheight:Number = 0;
-			var titleBar:TitleBar = _strand as TitleBar;
-			var titleView:TitleBarView = _strand.getBeadByType(TitleBarView) as TitleBarView;
-			var labelMeasure:IMeasurementBead = titleView.titleLabel.measurementBead;
-			mheight = labelMeasure.measuredHeight;
-			if( titleBar.showCloseButton ) {
-				var buttonMeasure:IMeasurementBead = titleView.closeButton.measurementBead;
-				mheight = Math.max(mheight,buttonMeasure.measuredHeight);
-			}
-			return mheight;
-		}
-		
-		private var _strand:IStrand;
-		
-		/**
-		 *  @copy org.apache.flex.core.IBead#strand
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a99dfd4c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
deleted file mode 100644
index 6ed8ccf..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TitleBarView.mxml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?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.
-
--->
-<basic:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
-                  xmlns:basic="library://ns.apache.org/flexjs/basic" 
-                  xmlns:mx="library://ns.adobe.com/flex/mx"
-                  implements="org.apache.flex.core.ILayoutParent">
-    <fx:Script>
-        <![CDATA[
-            import org.apache.flex.html.TitleBar;
-            import org.apache.flex.core.ITitleBarModel;
-            import org.apache.flex.core.UIBase;
-            import org.apache.flex.events.Event;
-            
-            private function clickHandler():void
-            {
-                var newEvent:org.apache.flex.events.Event = new org.apache.flex.events.Event('close',true);
-                UIBase(_strand).dispatchEvent(newEvent)   
-            }
-        ]]>
-    </fx:Script>
-    <basic:beads>
-        <basic:MXMLBeadViewBaseDataBinding />
-        <basic:LayoutChangeNotifier watchedProperty="{ITitleBarModel(model).title}" />
-        <basic:SolidBackgroundBead />
-    </basic:beads>
-
-    <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" 
-                                 html="{ITitleBarModel(model).htmlTitle}" >
-        <basic:style>
-            <basic:SimpleCSSStyles fontWeight="inherit" />
-        </basic:style>
-    </basic:Label>
-    <basic:CloseButton id="closeButton" click="clickHandler()"
-                       visible="{ITitleBarModel(model).showCloseButton}";
-/>
-    
-</basic:MXMLBeadViewBase>