http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/FormExample/src/MyFormView.mxml ---------------------------------------------------------------------- diff --git a/examples/FormExample/src/MyFormView.mxml b/examples/FormExample/src/MyFormView.mxml deleted file mode 100644 index 894d7a2..0000000 --- a/examples/FormExample/src/MyFormView.mxml +++ /dev/null @@ -1,73 +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. - ---> -<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:js="library://ns.apache.org/flexjs/basic" - xmlns:local="*" - xmlns:models="models.*" - xmlns:acc="org.apache.flex.html.accessories.*"> - - <fx:Style> - .title { - font-size: 14pt; - font-weight: bold; - } - - </fx:Style> - - <fx:Script> - <![CDATA[ - import org.apache.flex.core.IPopUpHost; - import org.apache.flex.events.Event; - import org.apache.flex.utils.UIUtils; - - ]]> - </fx:Script> - - <js:Container width="600" height="700" x="50" y="50"> - <js:beads> - <js:VerticalLayout /> - </js:beads> - - <js:Label text="Loan Form" className="title" /> - - <js:Container width="500"> - <js:beads> - <js:VerticalColumnLayout numColumns="2" /> - </js:beads> - <js:Label text="Name:" /> - <js:TextInput id="nameField" /> - <js:Label text="Age:" /> - <js:TextInput id="ageField"> - <js:beads> - <js:NumericOnlyTextInputBead /> - </js:beads> - </js:TextInput> - <js:Label text="Phone Number:" /> - <js:TextInput id="phoneField" > - </js:TextInput> - <js:Label text="Date of Loan:" /> - <js:DateField id="dateOfLoan"/> - <js:Label text="Loan Amount:" /> - <js:TextInput id="loanAmount"> - </js:TextInput> - </js:Container> - </js:Container> - -</js:ViewBase>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/FormExample/src/README.txt ---------------------------------------------------------------------- diff --git a/examples/FormExample/src/README.txt b/examples/FormExample/src/README.txt deleted file mode 100644 index f38df7f..0000000 --- a/examples/FormExample/src/README.txt +++ /dev/null @@ -1,45 +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. -// -//////////////////////////////////////////////////////////////////////////////// - -DESCRIPTION - -The FormExample application demonstrates several FlexJS components and how they -can be aligned in a column, much like you would see in a form. - -This Flex application may be run as a Flash SWF or cross-compiled (using Falcon JX) -into JavaScript and HTML and run without Flash. - -The components are placed into a Container with a VerticalColumnLayout bead. This bead -examines each of the children in the Container and aligns them in two columns. - -COMPONENTS and BEADS - -- Container -- DateField -- Label -- TextInput - -- NonVirtualVerticalLayout -- NumericOnlyTextInputBead -- VerticalColumnLayout - -NOTES - -The cross-compilation to JavaScript often results in non-fatal warnings. Some of these warnings -should be addressed in future releases of the Falcon JX compiler. http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/FormatExample/build.xml ---------------------------------------------------------------------- diff --git a/examples/FormatExample/build.xml b/examples/FormatExample/build.xml deleted file mode 100644 index 00c6a9e..0000000 --- a/examples/FormatExample/build.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?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. - ---> - - -<project name="formatexample" default="main" basedir="."> - <property name="FLEXJS_HOME" location="../.."/> - <property name="example" value="FormatExample" /> - - <property file="${FLEXJS_HOME}/env.properties"/> - <property environment="env"/> - <property file="${FLEXJS_HOME}/build.properties"/> - <property name="FLEX_HOME" value="${FLEXJS_HOME}"/> - <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${env.FALCON_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk"/> - - <available file="${env.FALCONJX_HOME}/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${env.FALCONJX_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler.jx/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler.jx"/> - - <available file="${env.GOOG_HOME}/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${env.GOOG_HOME}"/> - - <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${FLEXJS_HOME}/js/lib/google/closure-library"/> - - <include file="${basedir}/../build_example.xml" /> - - <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}"> - </target> - <!-- Uncomment to reproduce cross-compilation error in compilejs step - <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}"> - </target> - --> - - <target name="clean"> - <delete dir="${basedir}/bin" failonerror="false" /> - <delete dir="${basedir}/bin-debug" failonerror="false" /> - <delete dir="${basedir}/bin-release" failonerror="false" /> - </target> - - - -</project> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/FormatExample/src/FormatExample.mxml ---------------------------------------------------------------------- diff --git a/examples/FormatExample/src/FormatExample.mxml b/examples/FormatExample/src/FormatExample.mxml deleted file mode 100644 index 4ea7b3b..0000000 --- a/examples/FormatExample/src/FormatExample.mxml +++ /dev/null @@ -1,33 +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. -// -//////////////////////////////////////////////////////////////////////////////// ---> -<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:local="*" - xmlns:models="models.*" - xmlns:js="library://ns.apache.org/flexjs/basic" - > - - <js:valuesImpl> - <js:SimpleCSSValuesImpl /> - </js:valuesImpl> - <js:initialView> - <local:MyFormView /> - </js:initialView> -</js:Application> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/FormatExample/src/MyFormView.mxml ---------------------------------------------------------------------- diff --git a/examples/FormatExample/src/MyFormView.mxml b/examples/FormatExample/src/MyFormView.mxml deleted file mode 100644 index d974bf5..0000000 --- a/examples/FormatExample/src/MyFormView.mxml +++ /dev/null @@ -1,133 +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. - ---> -<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:js="library://ns.apache.org/flexjs/basic" - xmlns:local="*" - xmlns:models="models.*" - xmlns:acc="org.apache.flex.html.accessories.*"> - - <fx:Style> - .title { - font-size: 14pt; - font-weight: bold; - } - - </fx:Style> - - <fx:Script> - <![CDATA[ - import dialogs.LoginDialog; - - import org.apache.flex.core.IPopUpHost; - import org.apache.flex.events.Event; - import org.apache.flex.utils.UIUtils; - - - private function showLogin():void - { - var dialog:LoginDialog = new LoginDialog(); - var host:IPopUpHost = UIUtils.findPopUpHost(this); - host.addElement(dialog); - UIUtils.center(dialog,this); - - dialog.addEventListener("close",closeDialog); - } - - private function closeDialog(event:org.apache.flex.events.Event):void - { - var dialog:LoginDialog = event.currentTarget as LoginDialog; - UIUtils.removePopUp(dialog); - } - ]]> - </fx:Script> - - <js:Container width="600" height="700" x="50" y="50"> - <js:beads> - <js:VerticalLayout /> - </js:beads> - - <js:Label text="Loan Form" className="title" /> - - <js:Container width="500"> - <js:beads> - <js:HorizontalLayout /> - </js:beads> - <js:Label text="Your Name:" /> - <js:TextInput id="nameField" /> - </js:Container> - - <js:Container width="500"> - <js:beads> - <js:HorizontalLayout /> - </js:beads> - <js:Label text="Your Age:" /> - <js:TextInput id="ageField"> - <js:beads> - <js:NumericOnlyTextInputBead /> - </js:beads> - </js:TextInput> - </js:Container> - - <js:Container width="500"> - <js:beads> - <js:HorizontalLayout /> - </js:beads> - <js:Label text="Phone Number:" /> - <js:TextInput id="phoneField" > - <js:beads> - <js:TextPromptBead prompt="9995551235" /> - <js:FormatableTextInputView /> - <acc:PhoneNumberFormatter propertyName="text" /> - </js:beads> - </js:TextInput> - </js:Container> - - <js:Container width="500"> - <js:beads> - <js:HorizontalLayout /> - </js:beads> - <js:Label text="Date of Loan:" /> - <js:DateField id="dateOfLoan"/> - </js:Container> - - <js:Container width="500"> - <js:beads> - <js:HorizontalLayout /> - </js:beads> - <js:Label text="Loan Amount:" /> - <js:TextInput id="loanAmount"> - <js:beads> - <js:TextPromptBead prompt="US dollars" /> - <js:FormatableTextInputView /> - <acc:NumberFormatter /> - </js:beads> - </js:TextInput> - </js:Container> - - <js:Container width="500"> - <js:beads> - <js:HorizontalLayout /> - </js:beads> - <js:TextButton text="Login" click="showLogin()" /> - </js:Container> - - </js:Container> - -</js:ViewBase> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/FormatExample/src/dialogs/DialogView.as ---------------------------------------------------------------------- diff --git a/examples/FormatExample/src/dialogs/DialogView.as b/examples/FormatExample/src/dialogs/DialogView.as deleted file mode 100644 index 0122c06..0000000 --- a/examples/FormatExample/src/dialogs/DialogView.as +++ /dev/null @@ -1,38 +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 dialogs -{ - import org.apache.flex.core.IStrand; - import org.apache.flex.html.beads.PanelView; - - public class DialogView extends PanelView - { - public function DialogView() - { - trace("This is DialogView"); - super(); - } - - override public function set strand(value:IStrand):void - { - trace("DialogView strand setter"); - super.strand = value; - } - } -} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/FormatExample/src/dialogs/LoginDialog.mxml ---------------------------------------------------------------------- diff --git a/examples/FormatExample/src/dialogs/LoginDialog.mxml b/examples/FormatExample/src/dialogs/LoginDialog.mxml deleted file mode 100644 index 527983c..0000000 --- a/examples/FormatExample/src/dialogs/LoginDialog.mxml +++ /dev/null @@ -1,70 +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. - ---> -<js:Panel xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:js="library://ns.apache.org/flexjs/basic" - xmlns:local="*" - className="LoginDialog" - width="280" height="90" title="Login"> - - <!-- fx:Metadata is not recognized by FalconJX --> - <!--<fx:Metadata> - [Event(name="close", type="org.apache.flex.events.Event")] - </fx:Metadata>--> - - <fx:Script> - <![CDATA[ - import org.apache.flex.events.Event; - - private function cancelLogin():void - { - dispatchEvent( new org.apache.flex.events.Event("close") ); - } - ]]> - </fx:Script> - - <js:beads> - <js:VerticalLayout /> - </js:beads> - - <js:Container width="200"> - <js:beads> - <js:HorizontalLayout /> - </js:beads> - <js:Label text="User Name:" /> - <js:TextInput /> - </js:Container> - - <js:Container width="200"> - <js:beads> - <js:HorizontalLayout /> - </js:beads> - <js:Label text="Password:" /> - <js:TextInput /> - </js:Container> - - <js:Container width="200"> - <js:beads> - <js:HorizontalLayout /> - </js:beads> - <js:TextButton text="Login" click="cancelLogin()" /> - <js:TextButton text="Cancel" click="cancelLogin()" /> - </js:Container> - -</js:Panel> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/FormatExample/src/org/apache/flex/html/staticControls/accessories/NumberFormatter.as ---------------------------------------------------------------------- diff --git a/examples/FormatExample/src/org/apache/flex/html/staticControls/accessories/NumberFormatter.as b/examples/FormatExample/src/org/apache/flex/html/staticControls/accessories/NumberFormatter.as deleted file mode 100644 index 0d1b613..0000000 --- a/examples/FormatExample/src/org/apache/flex/html/staticControls/accessories/NumberFormatter.as +++ /dev/null @@ -1,210 +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.accessories -{ - import org.apache.flex.core.IBeadModel; - import org.apache.flex.core.IFormatBead; - import org.apache.flex.core.IStrand; - import org.apache.flex.events.Event; - import org.apache.flex.events.EventDispatcher; - import org.apache.flex.events.IEventDispatcher; - - /** - * The NumberFormatter class formats a value in separated groups. The formatter listens - * to a property on a model and when the property changes, formats it and dispatches a - * formatChanged event. - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public class NumberFormatter extends EventDispatcher implements IFormatBead - { - /** - * constructor - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public function NumberFormatter() - { - super(); - } - - 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; - - // Listen for the beadsAdded event which signals when all of a strand's - // beads have been added. - IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded); - } - - /** - * @private - */ - private function handleBeadsAdded(event:Event):void - { - // Listen for the change in the model - var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel; - model.addEventListener(eventName,propertyChangeHandler); - model.addEventListener(propertyName+"Change",propertyChangeHandler); - - // format the current value of that property - propertyChangeHandler(null); - } - - private var _propertyName:String; - private var _eventName:String; - private var _formattedResult:String; - private var _groupSize:Number = 3; - private var _thousandsSeparator:String = ","; - - /** - * The name of the property on the model to format. - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public function get propertyName():String - { - if (_propertyName == null) { - return "text"; - } - return _propertyName; - } - public function set propertyName(value:String):void - { - _propertyName = value; - } - - /** - * The event dispatched by the model when the property changes. The - * default is propertyName+"Changed". - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public function get eventName():String - { - if (_eventName == null) { - return _propertyName+"Changed"; - } - return _eventName; - } - public function set eventName(value:String):void - { - _eventName = value; - } - - /** - * Character to use to separate thousands groups. The default is - * the comma (,). - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public function get thousandsSeparator():String - { - return _thousandsSeparator; - } - public function set thousandsSeparator(value:String):void - { - _thousandsSeparator = value; - } - - /** - * The formatted string. - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public function get formattedString():String - { - return _formattedResult; - } - - /** - * @private - */ - private function propertyChangeHandler(event:Event):void - { - // When the property changes, fetch it from the model and - // format it, storing the result in _formattedResult. - var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel; - var value:Object = model[propertyName]; - _formattedResult = format(value); - - // Dispatch the formatChanged event so any bead that's interested in - // the formatted string knows to use it. - var newEvent:Event = new Event("formatChanged"); - this.dispatchEvent(newEvent); - } - - /** - * @private - */ - private function format(value:Object):String - { - if (value == null) return ""; - - var num:Number = Number(value); - var source:String = String(value); - var parts:Array = source.split(thousandsSeparator); - source = parts.join(""); - - var l:int = source.length; - var result:String = ""; - var group:int = 0; - - for(var i:int=l-1; i >= 0; i--) - { - if (group == _groupSize && result.length > 0) { - result = thousandsSeparator + result; - group = 0; - } - result = source.charAt(i) + result; - group++; - } - - return result; - } - } -} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/FormatExample/src/org/apache/flex/html/staticControls/accessories/PhoneNumberFormatter.as ---------------------------------------------------------------------- diff --git a/examples/FormatExample/src/org/apache/flex/html/staticControls/accessories/PhoneNumberFormatter.as b/examples/FormatExample/src/org/apache/flex/html/staticControls/accessories/PhoneNumberFormatter.as deleted file mode 100644 index 7523c96..0000000 --- a/examples/FormatExample/src/org/apache/flex/html/staticControls/accessories/PhoneNumberFormatter.as +++ /dev/null @@ -1,195 +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.accessories -{ - import org.apache.flex.core.IBead; - import org.apache.flex.core.IBeadModel; - import org.apache.flex.core.IFormatBead; - import org.apache.flex.core.IStrand; - import org.apache.flex.events.Event; - import org.apache.flex.events.EventDispatcher; - import org.apache.flex.events.IEventDispatcher; - - /** - * The PhoneNumberFormatter class bead formats a numeric string into a - * US style phone number. The format bead listens for changes to a property - * in a model, formats the value, and dispatches a formatChanged event. - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public class PhoneNumberFormatter extends EventDispatcher implements IBead, IFormatBead - { - /** - * constructor - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public function PhoneNumberFormatter() - { - } - - 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; - - // Listen for the beadsAdded event which signals when all of a strand's - // beads have been added. - IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded); - } - - /** - * @private - */ - private function handleBeadsAdded(event:Event):void - { - // Listen for the change in the model. - var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel; - model.addEventListener(eventName,propertyChangeHandler); - model.addEventListener(propertyName+"Change",propertyChangeHandler); - - // format the current value of that property - propertyChangeHandler(null); - } - - private var _propertyName:String; - private var _eventName:String; - private var _formattedResult:String; - - /** - * The name of the property in the model holding the value to be - * formatted. The default is text. - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public function get propertyName():String - { - if (_propertyName == null) { - return "text"; - } - return _propertyName; - } - public function set propertyName(value:String):void - { - _propertyName = value; - } - - /** - * The name of the event dispatched when the property changes. The - * default is propertyName + "Changed". - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public function get eventName():String - { - if (_eventName == null) { - return _propertyName+"Changed"; - } - return _eventName; - } - public function set eventName(value:String):void - { - _eventName = value; - } - - /** - * The formatted string. - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 - */ - public function get formattedString():String - { - return _formattedResult; - } - - /** - * @private - */ - private function propertyChangeHandler(event:Event):void - { - // When the model's value changes, format it and store it in - // _formattedResult. - var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel; - var value:Object = model[propertyName]; - _formattedResult = format(value); - - // Dispatch the formatChanged event so other beads can use the newly - // formatted value. - var newEvent:Event = new Event("formatChanged"); - this.dispatchEvent(newEvent); - } - - /** - * @private - */ - private function format(value:Object):String - { - if (value == null) return ""; - - var source:String = String(value); - if (source.length != 10) return source; - - var areaCode:String = ""; - var exchange:String; - var num:String; - - var pos:int = 0; - if (source.length == 10) { - areaCode = source.substr(pos,3); - pos += 3; - } - - exchange = source.substr(pos,3); - pos += 3; - - num = source.substr(pos,4); - - var result:String = ""; - if (source.length == 10) { - result = result + "("+areaCode+") "; - } - result = result + exchange + "-" + num; - return result; - } - } -} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ImageTest/build.xml ---------------------------------------------------------------------- diff --git a/examples/ImageTest/build.xml b/examples/ImageTest/build.xml deleted file mode 100644 index 5b5fbfa..0000000 --- a/examples/ImageTest/build.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?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. - ---> - - -<project name="imagetest" default="main" basedir="."> - <property name="FLEXJS_HOME" location="../.."/> - <property name="example" value="ImageTest" /> - - <property environment="env"/> - <property file="${FLEXJS_HOME}/build.properties"/> - <property name="FLEX_HOME" value="${FLEXJS_HOME}"/> - <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${env.FALCON_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk"/> - - <available file="${env.FALCONJX_HOME}/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${env.FALCONJX_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler.jx/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler.jx"/> - - <available file="${env.GOOG_HOME}/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${env.GOOG_HOME}"/> - - <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${FLEXJS_HOME}/js/lib/google/closure-library"/> - - <include file="${basedir}/../build_example.xml" /> - - <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of FlexJSUI.swc"> - </target> - - <target name="clean"> - <delete dir="${basedir}/bin" failonerror="false" /> - <delete dir="${basedir}/bin-debug" failonerror="false" /> - <delete dir="${basedir}/bin-release" failonerror="false" /> - </target> - -</project> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ImageTest/src/ImageTest.mxml ---------------------------------------------------------------------- diff --git a/examples/ImageTest/src/ImageTest.mxml b/examples/ImageTest/src/ImageTest.mxml deleted file mode 100644 index 2d5c972..0000000 --- a/examples/ImageTest/src/ImageTest.mxml +++ /dev/null @@ -1,33 +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. -// -//////////////////////////////////////////////////////////////////////////////// ---> -<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:local="*" - xmlns:models="models.*" - xmlns:js="library://ns.apache.org/flexjs/basic" - > - - <js:valuesImpl> - <js:SimpleCSSValuesImpl /> - </js:valuesImpl> - <js:initialView> - <local:MyInitialView /> - </js:initialView> -</js:Application> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ImageTest/src/MyInitialView.mxml ---------------------------------------------------------------------- diff --git a/examples/ImageTest/src/MyInitialView.mxml b/examples/ImageTest/src/MyInitialView.mxml deleted file mode 100644 index 342abcc..0000000 --- a/examples/ImageTest/src/MyInitialView.mxml +++ /dev/null @@ -1,45 +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. - ---> -<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:js="library://ns.apache.org/flexjs/basic" - xmlns:local="*"> - <fx:Script> - <![CDATA[ - - ]]> - </fx:Script> - - <fx:Style> - - </fx:Style> - - <js:Container> - <js:beads> - <js:VerticalLayout /> - </js:beads> - - <js:Image width="48" height="48" source="smallbluerect.jpg" /> - <js:Image width="183" height="178" source="largegreenrect.png" /> - <js:Image width="48" height="48" source="smallorangerect.gif" /> - <js:Image width="48" height="48" source="smallgreenrect.jpg" /> - - </js:Container> - -</js:ViewBase> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ImageTest/src/README.txt ---------------------------------------------------------------------- diff --git a/examples/ImageTest/src/README.txt b/examples/ImageTest/src/README.txt deleted file mode 100644 index e6a0c71..0000000 --- a/examples/ImageTest/src/README.txt +++ /dev/null @@ -1,40 +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. -// -//////////////////////////////////////////////////////////////////////////////// - -DESCRIPTION - -The ImageTest example is a simple demonstration of the FlexJS Image component. -You can use this test to see if your image loads properly. - -This Flex application may be run as a Flash SWF or cross-compiled (using Falcon JX) -into JavaScript and HTML and run without Flash. - -All of the images are placed into a Container and then given various sizes. - -COMPONENTS and BEADS - -- Container -- Image - -- NonVirtualVerticalLayout - -NOTES - -The cross-compilation to JavaScript often results in non-fatal warnings. Some of these warnings -should be addressed in future releases of the Falcon JX compiler. http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ImageTest/src/largegreenrect.png ---------------------------------------------------------------------- diff --git a/examples/ImageTest/src/largegreenrect.png b/examples/ImageTest/src/largegreenrect.png deleted file mode 100644 index 3f10b02..0000000 Binary files a/examples/ImageTest/src/largegreenrect.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ImageTest/src/smallbluerect.jpg ---------------------------------------------------------------------- diff --git a/examples/ImageTest/src/smallbluerect.jpg b/examples/ImageTest/src/smallbluerect.jpg deleted file mode 100644 index 80ed275..0000000 Binary files a/examples/ImageTest/src/smallbluerect.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ImageTest/src/smallgreenrect.jpg ---------------------------------------------------------------------- diff --git a/examples/ImageTest/src/smallgreenrect.jpg b/examples/ImageTest/src/smallgreenrect.jpg deleted file mode 100644 index c5f9ce6..0000000 Binary files a/examples/ImageTest/src/smallgreenrect.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ImageTest/src/smallorangerect.gif ---------------------------------------------------------------------- diff --git a/examples/ImageTest/src/smallorangerect.gif b/examples/ImageTest/src/smallorangerect.gif deleted file mode 100644 index 603f810..0000000 Binary files a/examples/ImageTest/src/smallorangerect.gif and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/build.xml ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/build.xml b/examples/LanguageTests/build.xml deleted file mode 100644 index 6de5e8a..0000000 --- a/examples/LanguageTests/build.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?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. - ---> - - -<project name="languagetests" default="main" basedir="."> - <property name="FLEXJS_HOME" location="../.."/> - <property name="example" value="LanguageTests" /> - - <property file="${FLEXJS_HOME}/env.properties"/> - <property environment="env"/> - <property file="${FLEXJS_HOME}/build.properties"/> - <property name="FLEX_HOME" value="${FLEXJS_HOME}"/> - <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${env.FALCON_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk"/> - - <available file="${env.FALCONJX_HOME}/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${env.FALCONJX_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler.jx/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler.jx"/> - - <available file="${env.GOOG_HOME}/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${env.GOOG_HOME}"/> - - <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${FLEXJS_HOME}/js/lib/google/closure-library"/> - - <include file="${basedir}/../build_example.xml" /> - - <target name="main" depends="clean,build_example.compileas,build_example.compileasjs" description="Clean build of ${example}"> - </target> - - <target name="clean"> - <delete dir="${basedir}/bin" failonerror="false" /> - <delete dir="${basedir}/bin-debug" failonerror="false" /> - <delete dir="${basedir}/bin-release" failonerror="false" /> - </target> - -</project> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/LanguageTests.as ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/LanguageTests.as b/examples/LanguageTests/src/LanguageTests.as deleted file mode 100644 index 1343abe..0000000 --- a/examples/LanguageTests/src/LanguageTests.as +++ /dev/null @@ -1,159 +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 -{ - -import org.apache.flex.core.SimpleApplication; -import org.apache.flex.events.Event; - -import classes.B; - -import interfaces.IA; -import interfaces.IB; -import interfaces.IC; -import interfaces.ID; -import interfaces.IE; -import interfaces.IF; - -public class LanguageTests extends SimpleApplication implements IA, IE -{ - public function LanguageTests() - { - var testResult:Boolean; - var testObject:Object; - - var b:B = new B(); - - testResult = this instanceof SimpleApplication; - trace('this instanceof SimpleApplication - true: ' + testResult.toString()); - testResult = this instanceof B; - trace('this instanceof classes.B - false: ' + testResult.toString()); - testResult = b instanceof classes.B; - trace('b instanceof classes.B - true: ' + testResult.toString()); - testResult = b instanceof classes.C; - trace('b instanceof classes.C - true: ' + testResult.toString()); - testResult = b instanceof interfaces.IC; - trace('b instanceof interfaces.IC - false: ' + testResult.toString()); - testResult = b instanceof interfaces.IF; - trace('b instanceof interfaces.IF - false: ' + testResult.toString()); - testResult = this instanceof IA; - trace('this instanceof interfaces.IA - false: ' + testResult.toString()); - testResult = this instanceof IB; - trace('this instanceof interfaces.IB - false: ' + testResult.toString()); - testResult = this instanceof IC; - trace('this instanceof interfaces.IC - false: ' + testResult.toString()); - testResult = this instanceof ID; - trace('this instanceof interfaces.ID - false: ' + testResult.toString()); - testResult = this instanceof IE; - trace('this instanceof interfaces.IE - false: ' + testResult.toString()); - trace(); - testResult = this is SimpleApplication; - trace('this is SimpleApplication - true: ' + testResult.toString()); - testResult = this is B; - trace('this is classes.B - false: ' + testResult.toString()); - testResult = b is classes.B; - trace('b is classes.B - true: ' + testResult.toString()); - testResult = b is classes.C; - trace('b is classes.C - true: ' + testResult.toString()); - testResult = b is interfaces.IC; - trace('b is interfaces.IC - false: ' + testResult.toString()); - testResult = b is interfaces.IF; - trace('b is interfaces.IF - true: ' + testResult.toString()); - testResult = this is IA; - trace('this is interfaces.IA - true: ' + testResult.toString()); - testResult = this is IB; - trace('this is interfaces.IB - false: ' + testResult.toString()); - testResult = this is IC; - trace('this is interfaces.IC - true: ' + testResult.toString()); - testResult = this is ID; - trace('this is interfaces.ID - true: ' + testResult.toString()); - testResult = this is IE; - trace('this is interfaces.IE - true: ' + testResult.toString()); - trace(); - testObject = (this as SimpleApplication) ? this as SimpleApplication : 'null'; - trace('this as SimpleApplication - [object ...]: ' + testObject.toString()); - testObject = (this as B) ? this as B : 'null'; - trace('this as classes.B - null: ' + testObject.toString()); - testObject = (b as classes.B) ? b as classes.B : 'null'; - trace('b as classes.B - [object ...]: ' + testObject.toString()); - testObject = (b as classes.C) ? b as classes.C : 'null'; - trace('b as classes.C - [object ...]: ' + testObject.toString()); - testObject = (b as interfaces.IC) ? b as interfaces.IC : 'null'; - trace('b as interfaces.IC - null: ' + testObject.toString()); - testObject = (b as interfaces.IF) ? b as interfaces.IF : 'null'; - trace('b as interfaces.IF - [object ...]: ' + testObject.toString()); - testObject = (this as IA) ? this as IA : 'null'; - trace('this as interfaces.IA - [object ...]: ' + testObject.toString()); - testObject = (this as IB) ? this as IB : 'null'; - trace('this as interfaces.IB - null: ' + testObject.toString()); - testObject = (this as IC) ? this as IC : 'null'; - trace('this as interfaces.IC - [object ...]: ' + testObject.toString()); - testObject = (this as ID) ? this as ID : 'null'; - trace('this as interfaces.ID - [object ...]: ' + testObject.toString()); - testObject = (this as IE) ? this as IE : 'null'; - trace('this as interfaces.IE - [object ...]: ' + testObject.toString()); - trace(); - try { - testObject = SimpleApplication(this); - trace('SimpleApplication(this) - [object ...]: ' + testObject.toString()); - } catch (e:Error) - { - trace("This shouldn't show!"); - } - try { - testObject = B(this); - trace("This shouldn't show!"); - } catch (e:Error) - { - trace('B(this) - exception expected: ' + e.message); - } - try { - testObject = interfaces.IC(b); - trace("This shouldn't show!"); - } catch (e:Error) - { - trace('IC(b) - exception expected: ' + e.message); - } - try { - testObject = interfaces.IF(b); - trace('IF(b) - [object ...]: ' + testObject.toString()); - } catch (e:Error) - { - trace("This shouldn't show!"); - } - - addEventListener("foo", eventHandler); - if (hasEventListener("foo")) - trace("addEventListener worked"); - else - trace("This shouldn't show!"); - - removeEventListener("foo", eventHandler); - if (!hasEventListener("foo")) - trace("removeEventListener worked"); - else - trace("This shouldn't show!"); - } - - public function eventHandler(e:Event):void - { - - } -} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/README.txt ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/README.txt b/examples/LanguageTests/src/README.txt deleted file mode 100644 index 89f12b2..0000000 --- a/examples/LanguageTests/src/README.txt +++ /dev/null @@ -1,26 +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. -// -//////////////////////////////////////////////////////////////////////////////// - -DESCRIPTION - -The LanguageTests example is used to test the ActionScript and cross-compiler, -FalconJX. - -Compile the project using ANT and the build.xml script and then run the resulting -index.html file in browser. http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/classes/B.as ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/classes/B.as b/examples/LanguageTests/src/classes/B.as deleted file mode 100644 index d8bd2c7..0000000 --- a/examples/LanguageTests/src/classes/B.as +++ /dev/null @@ -1,25 +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 classes -{ - public class B extends C - { - public function B() {} - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/classes/C.as ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/classes/C.as b/examples/LanguageTests/src/classes/C.as deleted file mode 100644 index fe49eb5..0000000 --- a/examples/LanguageTests/src/classes/C.as +++ /dev/null @@ -1,27 +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 classes -{ - import interfaces.IF; - - public class C implements IF - { - public function C() {} - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/interfaces/IA.as ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/interfaces/IA.as b/examples/LanguageTests/src/interfaces/IA.as deleted file mode 100644 index 5fbd6c2..0000000 --- a/examples/LanguageTests/src/interfaces/IA.as +++ /dev/null @@ -1,22 +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 interfaces -{ - public interface IA extends IC {} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/interfaces/IB.as ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/interfaces/IB.as b/examples/LanguageTests/src/interfaces/IB.as deleted file mode 100644 index a995635..0000000 --- a/examples/LanguageTests/src/interfaces/IB.as +++ /dev/null @@ -1,22 +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 interfaces -{ - public interface IB {} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/interfaces/IC.as ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/interfaces/IC.as b/examples/LanguageTests/src/interfaces/IC.as deleted file mode 100644 index 9183bac..0000000 --- a/examples/LanguageTests/src/interfaces/IC.as +++ /dev/null @@ -1,22 +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 interfaces -{ - public interface IC extends ID {} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/interfaces/ID.as ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/interfaces/ID.as b/examples/LanguageTests/src/interfaces/ID.as deleted file mode 100644 index d5e9543..0000000 --- a/examples/LanguageTests/src/interfaces/ID.as +++ /dev/null @@ -1,22 +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 interfaces -{ - public interface ID {} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/interfaces/IE.as ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/interfaces/IE.as b/examples/LanguageTests/src/interfaces/IE.as deleted file mode 100644 index ae1848a..0000000 --- a/examples/LanguageTests/src/interfaces/IE.as +++ /dev/null @@ -1,22 +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 interfaces -{ - public interface IE {} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/LanguageTests/src/interfaces/IF.as ---------------------------------------------------------------------- diff --git a/examples/LanguageTests/src/interfaces/IF.as b/examples/LanguageTests/src/interfaces/IF.as deleted file mode 100644 index f62be45..0000000 --- a/examples/LanguageTests/src/interfaces/IF.as +++ /dev/null @@ -1,22 +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 interfaces -{ - public interface IF {} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/build.xml ---------------------------------------------------------------------- diff --git a/examples/ListsTest/build.xml b/examples/ListsTest/build.xml deleted file mode 100644 index e6d7c8b..0000000 --- a/examples/ListsTest/build.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?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. - ---> - - -<project name="liststest" default="main" basedir="."> - <property name="FLEXJS_HOME" location="../.."/> - <property name="example" value="ListsTests" /> - - <property file="${FLEXJS_HOME}/env.properties"/> - <property environment="env"/> - <property file="${FLEXJS_HOME}/build.properties"/> - <property name="FLEX_HOME" value="${FLEXJS_HOME}"/> - <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${env.FALCON_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk"/> - - <available file="${env.FALCONJX_HOME}/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${env.FALCONJX_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler.jx/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler.jx"/> - - <available file="${env.GOOG_HOME}/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${env.GOOG_HOME}"/> - - <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${FLEXJS_HOME}/js/lib/google/closure-library"/> - - <include file="${basedir}/../build_example.xml" /> - - <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}"> - </target> - - <target name="clean"> - <delete dir="${basedir}/bin" failonerror="false" /> - <delete dir="${basedir}/bin-debug" failonerror="false" /> - <delete dir="${basedir}/bin-release" failonerror="false" /> - </target> - -</project> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/FirstView.mxml ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/FirstView.mxml b/examples/ListsTest/src/FirstView.mxml deleted file mode 100644 index 4bfc146..0000000 --- a/examples/ListsTest/src/FirstView.mxml +++ /dev/null @@ -1,63 +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. - ---> -<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:js="library://ns.apache.org/flexjs/basic" - xmlns:local="*"> - <fx:Script> - <![CDATA[ - - private function handleListChange() : void - { - pickLabel.text = "Selected: "+productList.selectedItem.title; - } - ]]> - </fx:Script> - - <fx:Style> - @namespace basic "library://ns.apache.org/flexjs/basic"; - @namespace sample "products.*"; - - /* use className="productList" on the List element in place of itemRenderer if you want to specify - * the itemRenderer in a style definition along with other settings. - */ - .productList { - IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.DataItemRendererFactoryForArrayData"); - IItemRenderer: ClassReference("products.ProductItemRenderer"); - } - - sample|ProductItemRenderer { - height: 40; - IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ItemRendererMouseController"); - } - - </fx:Style> - - <js:List id="productList" itemRenderer="products.ProductItemRenderer" x="20" y="20" width="200" height="150" change="handleListChange()"> - <js:beads> - <js:ConstantBinding - sourceID="applicationModel" - sourcePropertyName="products" - destinationPropertyName="dataProvider" /> - </js:beads> - </js:List> - - <js:Label id="pickLabel" x="250" y="20" width="200" /> - -</js:ViewBase> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/ListsTests.mxml ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/ListsTests.mxml b/examples/ListsTest/src/ListsTests.mxml deleted file mode 100644 index 9904c05..0000000 --- a/examples/ListsTest/src/ListsTests.mxml +++ /dev/null @@ -1,36 +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. -// -//////////////////////////////////////////////////////////////////////////////// ---> -<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:local="*" - xmlns:models="models.*" - xmlns:js="library://ns.apache.org/flexjs/basic" - > - - <js:valuesImpl> - <js:SimpleCSSValuesImpl /> - </js:valuesImpl> - <js:model> - <models:ProductsModel /> - </js:model> - <js:initialView> - <local:FirstView /> - </js:initialView> -</js:Application> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/README.txt ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/README.txt b/examples/ListsTest/src/README.txt deleted file mode 100644 index dc48ab4..0000000 --- a/examples/ListsTest/src/README.txt +++ /dev/null @@ -1,47 +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. -// -//////////////////////////////////////////////////////////////////////////////// - -DESCRIPTION - -The ListsTests example demonstrates the FlexJS List component using custom data -and a custom itemRenderer. - -This Flex application may be run as a Flash SWF or cross-compiled (using Falcon JX) -into JavaScript and HTML and run without Flash. - -The data for the list is found in the application model and is bound to the list -via ConstantBinding bead which maps the application data model's products property -to the List's dataProvider property. - -The display of each element of the list is through a custom itemRenderer, -ProductItemRenderer, which can found in the example's source tree. The itemRenderer -uses and Image component to display an image and a Label to give a title. - -COMPONENTS and BEADS - -- Image -- Label -- List - -- ConstantBinding - -NOTES - -More control of the itemRenderer via styles would be a nice addition. ItemRenderers -based on row or data would require a custom itemRendererFactory bead. http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/models/ProductsModel.as ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/models/ProductsModel.as b/examples/ListsTest/src/models/ProductsModel.as deleted file mode 100644 index 9807ee0..0000000 --- a/examples/ListsTest/src/models/ProductsModel.as +++ /dev/null @@ -1,42 +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 models -{ - import org.apache.flex.events.EventDispatcher; - - public class ProductsModel extends EventDispatcher - { - public function ProductsModel() - { - } - - private var _products:Array = [ - {id:"ps100", title:"Widgets", detail:"44", image:"smallbluerect.jpg"}, - {id:"tx200", title:"Thingys", detail:"out of stock", image:"smallgreenrect.jpg"}, - {id:"rz300", title:"Sprockets", detail:"8,000", image:"smallyellowrect.jpg"}, - {id:"dh440", title:"DooHickies", detail:"out of stock", image:"smallredrect.jpg"}, - {id:"ps220", title:"Weejets", detail:"235", image:"smallorangerect.jpg"} - ]; - public function get products():Array - { - return _products; - } - - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/products/Product.as ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/products/Product.as b/examples/ListsTest/src/products/Product.as deleted file mode 100644 index b4854a3..0000000 --- a/examples/ListsTest/src/products/Product.as +++ /dev/null @@ -1,43 +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 products -{ - public class Product - { - public function Product(id:String,title:String,detail:String,sales:Number,image:String) - { - this.id = id; - this.title = title; - this.detail = detail; - this.sales = sales; - this.image = image; - } - - public var id:String; - public var title:String; - public var detail:String; - public var image:String; - public var sales:Number; - - public function toString():String - { - return title; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/products/ProductItemRenderer.as ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/products/ProductItemRenderer.as b/examples/ListsTest/src/products/ProductItemRenderer.as deleted file mode 100644 index c1bab26..0000000 --- a/examples/ListsTest/src/products/ProductItemRenderer.as +++ /dev/null @@ -1,83 +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 products -{ - import org.apache.flex.html.Label; - import org.apache.flex.html.Image; - import org.apache.flex.html.supportClasses.DataItemRenderer; - - public class ProductItemRenderer extends DataItemRenderer - { - public function ProductItemRenderer() - { - super(); - } - - private var image:Image; - private var title:Label; - private var detail:Label; - - override public function addedToParent():void - { - super.addedToParent(); - - // add an image and two labels - image = new Image(); - addElement(image); - - title = new Label(); - addElement(title); - - detail = new Label(); - addElement(detail); - } - - override public function get data():Object - { - return super.data; - } - - override public function set data(value:Object):void - { - super.data = value; - - image.source = data.image; - title.text = data.title; - detail.text = data.detail; - } - - override public function adjustSize():void - { - var cy:Number = this.height/2; - - image.x = 4; - image.y = cy - 16; - image.width = 32; - image.height = 32; - - title.x = 40; - title.y = cy - 16; - - detail.x = 40; - detail.y = cy; - - updateRenderer(); - } - } -} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/smallbluerect.jpg ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/smallbluerect.jpg b/examples/ListsTest/src/smallbluerect.jpg deleted file mode 100755 index 80ed275..0000000 Binary files a/examples/ListsTest/src/smallbluerect.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/smallgreenrect.jpg ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/smallgreenrect.jpg b/examples/ListsTest/src/smallgreenrect.jpg deleted file mode 100755 index c5f9ce6..0000000 Binary files a/examples/ListsTest/src/smallgreenrect.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/smallorangerect.gif ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/smallorangerect.gif b/examples/ListsTest/src/smallorangerect.gif deleted file mode 100644 index 603f810..0000000 Binary files a/examples/ListsTest/src/smallorangerect.gif and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/smallorangerect.jpg ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/smallorangerect.jpg b/examples/ListsTest/src/smallorangerect.jpg deleted file mode 100755 index 4982d87..0000000 Binary files a/examples/ListsTest/src/smallorangerect.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/smallpurplerect.jpg ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/smallpurplerect.jpg b/examples/ListsTest/src/smallpurplerect.jpg deleted file mode 100755 index 201f625..0000000 Binary files a/examples/ListsTest/src/smallpurplerect.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/smallredrect.jpg ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/smallredrect.jpg b/examples/ListsTest/src/smallredrect.jpg deleted file mode 100644 index d2cfa31..0000000 Binary files a/examples/ListsTest/src/smallredrect.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/ListsTest/src/smallyellowrect.jpg ---------------------------------------------------------------------- diff --git a/examples/ListsTest/src/smallyellowrect.jpg b/examples/ListsTest/src/smallyellowrect.jpg deleted file mode 100755 index b17b62d..0000000 Binary files a/examples/ListsTest/src/smallyellowrect.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/RollEventsTest/build.xml ---------------------------------------------------------------------- diff --git a/examples/RollEventsTest/build.xml b/examples/RollEventsTest/build.xml deleted file mode 100644 index 767c856..0000000 --- a/examples/RollEventsTest/build.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?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. - ---> - - -<project name="rolleventstest" default="main" basedir="."> - <property name="FLEXJS_HOME" location="../.."/> - <property name="example" value="RollEventsTest" /> - - <property environment="env"/> - <property file="${FLEXJS_HOME}/build.properties"/> - <property name="FLEX_HOME" value="${FLEXJS_HOME}"/> - <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${env.FALCON_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk/lib/falcon-mxmlc.jar" - type="file" - property="FALCON_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk"/> - - <available file="${env.FALCONJX_HOME}/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${env.FALCONJX_HOME}"/> - - <available file="${FLEXJS_HOME}/../flex-falcon/compiler.jx/lib/jsc.jar" - type="file" - property="FALCONJX_HOME" - value="${FLEXJS_HOME}/../flex-falcon/compiler.jx"/> - - <available file="${env.GOOG_HOME}/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${env.GOOG_HOME}"/> - - <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" - type="file" - property="GOOG_HOME" - value="${FLEXJS_HOME}/js/lib/google/closure-library"/> - - <include file="${basedir}/../build_example.xml" /> - - <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of FlexJSUI.swc"> - </target> - - <target name="clean"> - <delete dir="${basedir}/bin" failonerror="false" /> - <delete dir="${basedir}/bin-debug" failonerror="false" /> - <delete dir="${basedir}/bin-release" failonerror="false" /> - </target> - -</project> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/examples/RollEventsTest/src/RollEvent.as ---------------------------------------------------------------------- diff --git a/examples/RollEventsTest/src/RollEvent.as b/examples/RollEventsTest/src/RollEvent.as deleted file mode 100644 index 7aa3ca0..0000000 --- a/examples/RollEventsTest/src/RollEvent.as +++ /dev/null @@ -1,33 +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 -{ - import org.apache.flex.events.Event; - - public class RollEvent extends Event - { - public function RollEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) - { - super("rollEvent", bubbles, cancelable); - rollEventType = type; - } - - public var rollEventType:String; - } -} \ No newline at end of file
