Repository: flex-asjs Updated Branches: refs/heads/develop 3a5a97fe4 -> b4bfea26f
Setting up my SVG/HTML5 example project Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/75e7b34c Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/75e7b34c Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/75e7b34c Branch: refs/heads/develop Commit: 75e7b34c8e64a0ba6fc43f4328f87281b6a3a1f2 Parents: 3a5a97f Author: Om <bigosma...@gmail.com> Authored: Sun Feb 23 13:24:50 2014 -0800 Committer: Om <bigosma...@gmail.com> Committed: Sun Feb 23 13:26:10 2014 -0800 ---------------------------------------------------------------------- examples/DrawShapesTest/src/DrawShapesTest.mxml | 34 +++++++++++ examples/DrawShapesTest/src/MyInitialView.mxml | 63 ++++++++++++++++++++ .../FlexJSTest_HTML5/src/FlexJSTest_HTML5.mxml | 51 ++++++++++++++++ .../FlexJSTest_HTML5/src/FlexJSTest_again.mxml | 51 ---------------- .../src/controllers/MyController.as | 6 +- 5 files changed, 151 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75e7b34c/examples/DrawShapesTest/src/DrawShapesTest.mxml ---------------------------------------------------------------------- diff --git a/examples/DrawShapesTest/src/DrawShapesTest.mxml b/examples/DrawShapesTest/src/DrawShapesTest.mxml new file mode 100644 index 0000000..af18e70 --- /dev/null +++ b/examples/DrawShapesTest/src/DrawShapesTest.mxml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--- +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// +--> +<basic:Application xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:local="*" + xmlns:models="models.*" + xmlns:basic="library://ns.apache.org/flexjs/basic" + > + + <basic:valuesImpl> + <basic:SimpleCSSValuesImpl /> + </basic:valuesImpl> + <basic:initialView> + <local:MyInitialView /> + </basic:initialView> +</basic:Application> + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75e7b34c/examples/DrawShapesTest/src/MyInitialView.mxml ---------------------------------------------------------------------- diff --git a/examples/DrawShapesTest/src/MyInitialView.mxml b/examples/DrawShapesTest/src/MyInitialView.mxml new file mode 100644 index 0000000..c1a7753 --- /dev/null +++ b/examples/DrawShapesTest/src/MyInitialView.mxml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--> +<basic:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:basic="library://ns.apache.org/flexjs/basic" + xmlns:svg="library:" + xmlns:local="*" + xmlns:models="models.*" +> + <fx:Script> + <![CDATA[ + + + ]]> + </fx:Script> + + <basic:Label id="output" x="450" y="30" width="100" /> + + <basic:BarChart id="barChart" x="20" y="20" width="400" height="200"> + <basic:beads> + <basic:ConstantBinding + sourceID="applicationModel" + sourcePropertyName="productList" + destinationPropertyName="dataProvider" /> + <basic:XAxisBead labelField="title" /> + </basic:beads> + <basic:series> + <basic:BarChartSeries yField="sales" + fillColor="0xFF964D"> + <basic:itemRenderer> + <fx:Component> + <basic:BoxItemRenderer /> + </fx:Component> + </basic:itemRenderer> + </basic:BarChartSeries> + <basic:BarChartSeries yField="detail" + fillColor="0x964DFF"> + <basic:itemRenderer> + <fx:Component> + <basic:BoxItemRenderer /> + </fx:Component> + </basic:itemRenderer> + </basic:BarChartSeries> + </basic:series> + </basic:BarChart> + +</basic:ViewBase> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75e7b34c/examples/FlexJSTest_HTML5/src/FlexJSTest_HTML5.mxml ---------------------------------------------------------------------- diff --git a/examples/FlexJSTest_HTML5/src/FlexJSTest_HTML5.mxml b/examples/FlexJSTest_HTML5/src/FlexJSTest_HTML5.mxml new file mode 100644 index 0000000..b86b828 --- /dev/null +++ b/examples/FlexJSTest_HTML5/src/FlexJSTest_HTML5.mxml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--> +<basic:Application xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:local="*" + xmlns:basic="library://ns.apache.org/flexjs/basic" + xmlns:models="models.*" + xmlns:controllers="controllers.*" + initialize="MyModel(model).labelText='Hello HTML5'" + > + <basic:valuesImpl> + <basic:SimpleCSSValuesImpl /> + </basic:valuesImpl> + <basic:initialView> + <local:MyInitialView /> + </basic:initialView> + <basic:model> + <models:MyModel /> + </basic:model> + <basic:controller> + <controllers:MyController /> + </basic:controller> + <basic:beads> + <basic:HTTPService id="service"> + <basic:LazyCollection id="collection"> + <basic:inputParser> + <basic:JSONInputParser /> + </basic:inputParser> + <basic:itemConverter> + <local:StockDataJSONItemConverter /> + </basic:itemConverter> + </basic:LazyCollection> + </basic:HTTPService> + </basic:beads> +</basic:Application> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75e7b34c/examples/FlexJSTest_HTML5/src/FlexJSTest_again.mxml ---------------------------------------------------------------------- diff --git a/examples/FlexJSTest_HTML5/src/FlexJSTest_again.mxml b/examples/FlexJSTest_HTML5/src/FlexJSTest_again.mxml deleted file mode 100644 index b86b828..0000000 --- a/examples/FlexJSTest_HTML5/src/FlexJSTest_again.mxml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You under the Apache License, Version 2.0 -(the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---> -<basic:Application xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:local="*" - xmlns:basic="library://ns.apache.org/flexjs/basic" - xmlns:models="models.*" - xmlns:controllers="controllers.*" - initialize="MyModel(model).labelText='Hello HTML5'" - > - <basic:valuesImpl> - <basic:SimpleCSSValuesImpl /> - </basic:valuesImpl> - <basic:initialView> - <local:MyInitialView /> - </basic:initialView> - <basic:model> - <models:MyModel /> - </basic:model> - <basic:controller> - <controllers:MyController /> - </basic:controller> - <basic:beads> - <basic:HTTPService id="service"> - <basic:LazyCollection id="collection"> - <basic:inputParser> - <basic:JSONInputParser /> - </basic:inputParser> - <basic:itemConverter> - <local:StockDataJSONItemConverter /> - </basic:itemConverter> - </basic:LazyCollection> - </basic:HTTPService> - </basic:beads> -</basic:Application> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75e7b34c/examples/FlexJSTest_HTML5/src/controllers/MyController.as ---------------------------------------------------------------------- diff --git a/examples/FlexJSTest_HTML5/src/controllers/MyController.as b/examples/FlexJSTest_HTML5/src/controllers/MyController.as index 8120572..b06af1d 100644 --- a/examples/FlexJSTest_HTML5/src/controllers/MyController.as +++ b/examples/FlexJSTest_HTML5/src/controllers/MyController.as @@ -31,14 +31,14 @@ package controllers { if (app) { - this.app = app as FlexJSTest_again; + this.app = app as FlexJSTest_HTML5; app.addEventListener("viewChanged", viewChangeHandler); } } private var queryBegin:String = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22"; private var queryEnd:String = "%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env&format=json"; - private var app:FlexJSTest_again; + private var app:FlexJSTest_HTML5; private function viewChangeHandler(event:Event):void { @@ -84,7 +84,7 @@ package controllers public function setDocument(document:Object, id:String = null):void { - this.app = document as FlexJSTest_again; + this.app = document as FlexJSTest_HTML5; app.addEventListener("viewChanged", viewChangeHandler); }