flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [04/51] [abbrv] git commit: [flex-asjs] [refs/heads/mavenfolders] - new folders for CreateJS
Date Wed, 03 Feb 2016 17:41:07 GMT
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f992c05d/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/ViewBase.as
b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/ViewBase.as
new file mode 100644
index 0000000..9fb19e8
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/ViewBase.as
@@ -0,0 +1,206 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.createjs.core
+{
+    COMPILE::AS3
+    {
+        import flash.display.DisplayObject;            
+        import org.apache.flex.core.ViewBase;
+    }
+	
+    import org.apache.flex.core.IApplicationView;
+    import org.apache.flex.core.IParent;
+    import org.apache.flex.core.IUIBase;
+    import org.apache.flex.events.Event;
+    import org.apache.flex.utils.MXMLDataInterpreter;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.IBead;
+        import org.apache.flex.core.IStatesImpl;
+        import org.apache.flex.core.ValuesManager;
+        import org.apache.flex.events.ValueChangeEvent;
+        import org.apache.flex.states.State;
+    }
+	
+    COMPILE::AS3
+    public class ViewBase extends org.apache.flex.core.ViewBase
+    {
+        
+    }
+    
+	[DefaultProperty("mxmlContent")]
+    COMPILE::JS
+	public class ViewBase extends UIBase implements IParent, IApplicationView
+	{
+		public function ViewBase()
+		{
+			super();
+		}
+		
+		override public function addedToParent():void
+		{
+            /* AJH needed?
+			MXMLDataInterpreter.generateMXMLProperties(this, MXMLProperties);
+            */
+			MXMLDataInterpreter.generateMXMLInstances(this, this, MXMLDescriptor);
+		}
+		
+		public function get MXMLDescriptor():Array
+		{
+			return null;
+		}
+		
+        /*
+		public function get MXMLProperties():Array
+		{
+			return null;
+		}
+		*/
+        
+		public var mxmlContent:Array;
+		
+		private var _applicationModel:Object;
+		
+		[Bindable("modelChanged")]
+		public function get applicationModel():Object
+		{
+			return _applicationModel;
+		}
+        
+        public function set applicationModel(value:Object):void
+        {
+            _applicationModel = value;
+            dispatchEvent(new Event("modelChanged"));
+        }
+
+        private var _states:Array;
+        
+        /**
+         *  The array of view states. These should
+         *  be instances of org.apache.flex.states.State.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get states():Array
+        {
+            return _states;
+        }
+        
+        /**
+         *  @private
+         *  @flexjsignorecoercion Class
+         *  @flexjsignorecoercion org.apache.flex.core.IBead
+         */
+        public function set states(value:Array):void
+        {
+            _states = value;
+            _currentState = _states[0].name;
+            
+            try{
+                if (getBeadByType(IStatesImpl) == null)
+                {
+                    var c:Class = ValuesManager.valuesImpl.getValue(this, "iStatesImpl")
as Class;
+                    var b:Object = new c();
+                    addBead(b as IBead);
+                }
+            }
+            //TODO:  Need to handle this case more gracefully
+            catch(e:Error)
+            {
+            }
+            
+        }
+        
+        /**
+         *  <code>true</code> if the array of states
+         *  contains a state with this name.
+         * 
+         *  @param state The state namem.
+         *  @return True if state in state array
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function hasState(state:String):Boolean
+        {
+            for each (var s:State in _states)
+            {
+                if (s.name == state)
+                    return true;
+            }
+            return false;
+        }
+        
+        private var _currentState:String;
+        
+        [Bindable("currentStateChange")]
+        /**
+         *  The name of the current state.
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get currentState():String
+        {
+            return _currentState;   
+        }
+        
+        /**
+         *  @private
+         */
+        public function set currentState(value:String):void
+        {
+            var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false,
false, _currentState, value)
+            _currentState = value;
+            dispatchEvent(event);
+        }
+        
+        private var _transitions:Array;
+        
+        /**
+         *  The array of transitions.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get transitions():Array
+        {
+            return _transitions;   
+        }
+        
+        /**
+         *  @private
+         */
+        public function set transitions(value:Array):void
+        {
+            _transitions = value;   
+        }
+        
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f992c05d/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml b/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..35c65b3
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,83 @@
+<!--
+
+  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.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+        </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/>
+        
+        <library-path>
+        </library-path>
+        
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/createjs</uri>
+                <manifest>createjs-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+        </source-path>
+        
+        <library-path>
+            <path-element>../../externs/Core.swc</path-element>
+            <path-element>../../externs/HTML.swc</path-element>
+        </library-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+    </include-file>
+
+    <include-sources>
+    </include-sources>
+    
+    <include-classes>
+        <class>CreateJSClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/createjs</uri>
+    </include-namespaces>
+    
+    <!--<target-player>${playerglobal.version}</target-player>-->
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f992c05d/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/resources/compile-config.xml b/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..3aecfb2
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
@@ -0,0 +1,83 @@
+<!--
+
+  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.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>../../libs/Core.swc</path-element>
+            <path-element>../../libs/HTML.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/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/createjs</uri>
+                <manifest>createjs-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>defaults.css</name>
+        <path>as/defaults.css</path>
+    </include-file>
+    <include-file>
+        <name>js/out/*</name>
+        <path>js/out/*</path>
+    </include-file>
+
+    <include-classes>
+        <class>CreateJSClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/createjs</uri>
+    </include-namespaces>  
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f992c05d/frameworks/projects/CreateJS/src/main/resources/createjs-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/resources/createjs-manifest.xml b/frameworks/projects/CreateJS/src/main/resources/createjs-manifest.xml
new file mode 100644
index 0000000..1c5a5ed
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/resources/createjs-manifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.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.
+
+-->
+
+
+<componentPackage>
+
+    <component id="Application" class="org.apache.flex.createjs.Application"/>
+    <component id="UIBase" class="org.apache.flex.createjs.core.UIBase"/>
+    <component id="ViewBase" class="org.apache.flex.createjs.core.ViewBase"/>
+    <component id="Label" class="org.apache.flex.createjs.Label"/>
+    <component id="TextButton" class="org.apache.flex.createjs.TextButton"/>
+    <component id="CheckBox" class="org.apache.flex.createjs.CheckBox"/>
+
+</componentPackage>


Mime
View raw message