You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2018/07/31 17:13:42 UTC
[19/21] git commit: [flex-examples] [refs/heads/develop] - TDF with
modules where possible
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/i18n/DateExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/i18n/DateExample.mxml b/tourdeflexmodules/src/apache/i18n/DateExample.mxml
new file mode 100644
index 0000000..12d2559
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/DateExample.mxml
@@ -0,0 +1,84 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <fx:Script>
+ <![CDATA[
+ import mx.formatters.DateFormatter;
+
+ private var formatter:DateFormatter;
+
+ protected function formatDate(event:Event):void
+ {
+ formatter = new DateFormatter();
+
+ if (int1.selected) {
+ formatter.formatString = "DD/MM/YYYY";
+ }
+ else if (int2.selected) {
+ formatter.formatString = "D/M/YYYY";
+ }
+ else if (int3.selected) {
+ formatter.formatString = "D.M.YYYY";
+ }
+ else if (jap.selected) {
+ formatter.formatString = "YYYY年MM月DD日";
+ }
+ else if (chi.selected) {
+ formatter.formatString = "YYYY年MM月DD日";
+ }
+ else if (kor.selected) {
+ formatter.formatString = "YYYY년 MM월 DD일";
+ }
+
+ formatted.text = formatter.format(date.selectedDate);
+ parsed.text = DateFormatter.parseDateString(formatted.text, formatter.formatString).toString();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="International Date Formating Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Date" />
+ <mx:DateField id="date" change="formatDate(event)" />
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Date Format" />
+ <s:RadioButton id="int1" label="DD/MM/YYYY" selected="true" click="formatDate(event)" />
+ <s:RadioButton id="int2" label="D/M/YYYY" click="formatDate(event)" />
+ <s:RadioButton id="int3" label="D.M.YYYY" click="formatDate(event)" />
+ <s:RadioButton id="jap" label="Japanese" click="formatDate(event)" />
+ <s:RadioButton id="chi" label="Chinese" click="formatDate(event)" />
+ <s:RadioButton id="kor" label="Korean" click="formatDate(event)" />
+ </s:HGroup>
+ <s:HGroup>
+ <s:Label text="Formatted Date" />
+ <s:Label id="formatted" />
+ </s:HGroup>
+ <s:HGroup>
+ <s:Label text="Parsed Date String" />
+ <s:Label id="parsed" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/i18n/LocaleExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/i18n/LocaleExample.mxml b/tourdeflexmodules/src/apache/i18n/LocaleExample.mxml
new file mode 100644
index 0000000..2435237
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/LocaleExample.mxml
@@ -0,0 +1,67 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayList;
+ import mx.events.FlexEvent;
+ import mx.resources.IResourceBundle;
+ import mx.resources.ResourceManager;
+
+ import spark.events.IndexChangeEvent;
+
+ [Bindable]
+ protected var langauges:ArrayList = new ArrayList(["USA", "Australian", "British", "Canadian", "Greek", "Switzerland (German)", "Portuguese"]);
+ protected var locales:Array = ["en_US", "en_AU", "en_GB", "en_CA", "el_GR", "de_CH", "pt_PT"];
+
+ protected function changeLocale(event:IndexChangeEvent):void
+ {
+ var newLocale:String = locales[locale.selectedIndex];
+ var bundle:IResourceBundle = ResourceManager.getInstance().getResourceBundle(newLocale, "validators");
+ var message:String = bundle.content["missingPeriodInDomainError"];
+
+ error.text = message;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- so validators resource bundle is included -->
+ <mx:EmailValidator />
+ </fx:Declarations>
+
+ <s:Panel title="SDK Locale Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Select Lanagage" />
+ <s:ComboBox id="locale" dataProvider="{langauges}" change="changeLocale(event)" />
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Error message" />
+ <s:Label id="error" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/i18n/MillisecondExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/i18n/MillisecondExample.mxml b/tourdeflexmodules/src/apache/i18n/MillisecondExample.mxml
new file mode 100644
index 0000000..bd3118a
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/MillisecondExample.mxml
@@ -0,0 +1,57 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ initialize="init(event)">
+ <fx:Script>
+ <![CDATA[
+ import mx.events.FlexEvent;
+ import mx.formatters.DateFormatter;
+
+ private var formatter:DateFormatter;
+ private var timer:Timer = new Timer(20);
+
+ protected function formatDate(event:TimerEvent):void
+ {
+ formatted.text = formatter.format(new Date());
+ }
+
+ protected function init(event:FlexEvent):void
+ {
+ formatter = new DateFormatter();
+ formatter.formatString = "DD/MM/YYYY H:NN:SS QQQ";
+
+ timer.addEventListener(TimerEvent.TIMER, formatDate);
+ timer.start();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="Millisecond Format Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Label text="Formatted Date" />
+ <s:Label id="formatted" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/i18n/NumericStepperExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/i18n/NumericStepperExample.mxml b/tourdeflexmodules/src/apache/i18n/NumericStepperExample.mxml
new file mode 100644
index 0000000..223a416
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/NumericStepperExample.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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ locale="en_ES">
+
+ <s:Panel title="European Numeric Stepper Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Number" />
+ <s:NumericStepper maximum="10" snapInterval="0.05" stepSize="0.05" />
+ </s:HGroup>
+</s:Panel>
+</s:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/i18n/ScientificExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/i18n/ScientificExample.mxml b/tourdeflexmodules/src/apache/i18n/ScientificExample.mxml
new file mode 100644
index 0000000..64175be
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/ScientificExample.mxml
@@ -0,0 +1,44 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <fx:Declarations>
+ <mx:CurrencyFormatter id="amount" />
+ </fx:Declarations>
+
+ <s:Panel title="Scientific Notation Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Number" />
+ <s:Label text="1.23e02" />
+ <s:Label text="Formatted" />
+ <s:Label text="{amount.format('1.23e2')}" />
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Number" />
+ <s:Label text="1.23e-1" />
+ <s:Label text="Formatted" />
+ <s:Label text="{amount.format('1.23e-2')}" />
+ </s:HGroup>
+</s:Panel>
+</s:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/i18n/TimeZoneExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/i18n/TimeZoneExample.mxml b/tourdeflexmodules/src/apache/i18n/TimeZoneExample.mxml
new file mode 100644
index 0000000..37ae6aa
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/TimeZoneExample.mxml
@@ -0,0 +1,67 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <fx:Script>
+ <![CDATA[
+ import mx.formatters.DateFormatter;
+
+ private var formatter:DateFormatter;
+
+ protected function formatDate(event:Event):void
+ {
+ formatter = new DateFormatter();
+
+ if (format1.selected) {
+ formatter.formatString = "DD/MM/YYYY ZO";
+ }
+ else if (format2.selected) {
+ formatter.formatString = "DD/MM/YYYY ZOO";
+ }
+ else if (format3.selected) {
+ formatter.formatString = "DD/MM/YYYY ZOOO";
+ }
+
+ formatted.text = formatter.format(date.selectedDate);
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="Timezone Formating Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Date" />
+ <mx:DateField id="date" change="formatDate(event)" />
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Date Format" />
+ <s:RadioButton id="format1" label="DD/MM/YYYY ZO" selected="true" click="formatDate(event)" />
+ <s:RadioButton id="format2" label="DD/MM/YYYY ZOO" click="formatDate(event)"/>
+ <s:RadioButton id="format3" label="DD/MM/YYYY ZOOO" click="formatDate(event)"/>
+ </s:HGroup>
+ <s:HGroup>
+ <s:Label text="Formatted Date" />
+ <s:Label id="formatted" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/squiggly/SpellingConfig.xml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/squiggly/SpellingConfig.xml b/tourdeflexmodules/src/apache/squiggly/SpellingConfig.xml
new file mode 100644
index 0000000..dfae724
--- /dev/null
+++ b/tourdeflexmodules/src/apache/squiggly/SpellingConfig.xml
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+<SpellingConfig>
+ <LanguageResource language="English (British)" languageCode="en_GB" ruleFile="./dictionaries/en_GB/en_GB.aff" dictionaryFile="./dictionaries/en_GB/en_GB.dic"/>
+ <LanguageResource language="English (US)" languageCode="en_US" ruleFile="./dictionaries/en_US/en_US.aff" dictionaryFile="./dictionaries/en_US/en_US.dic"/>
+</SpellingConfig>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/squiggly/SpellingExExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/squiggly/SpellingExExample.mxml b/tourdeflexmodules/src/apache/squiggly/SpellingExExample.mxml
new file mode 100644
index 0000000..bccd7fb
--- /dev/null
+++ b/tourdeflexmodules/src/apache/squiggly/SpellingExExample.mxml
@@ -0,0 +1,44 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <fx:Script>
+ <![CDATA[
+ import com.adobe.linguistics.spelling.SpellUI;
+
+ private function enableSpelling():void {
+ SpellUI.enableSpelling(textArea, "en_US");
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="Spell Check" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:Group width="100%" height="100%">
+ <s:TextArea id="textArea" width="50%" height="50%"
+ text="I know Enlish. Use the context menu to see the suggestions of the missbelled word." />
+ </s:Group>
+ <s:Button label="Check Spelling" click="enableSpelling()" />
+ </s:Panel>
+
+</s:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/squiggly/SpellingExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/squiggly/SpellingExample.mxml b/tourdeflexmodules/src/apache/squiggly/SpellingExample.mxml
new file mode 100644
index 0000000..05c7e0e
--- /dev/null
+++ b/tourdeflexmodules/src/apache/squiggly/SpellingExample.mxml
@@ -0,0 +1,49 @@
+<?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.
+
+-->
+<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+<mx:Script>
+ <![CDATA[
+ import com.adobe.linguistics.spelling.SpellUI;
+
+ private function enableUS():void {
+ SpellUI.enableSpelling(textArea, "en_US");
+ }
+
+ private function enableGB():void {
+ SpellUI.enableSpelling(textArea, "en_GB");
+ }
+ ]]>
+</mx:Script>
+ <s:Panel title="Spell Check" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:VGroup width="100%" height="100%">
+ <mx:TextArea id="textArea" width="50%" height="50%" text="Spell cheecking in TextArea"/>
+ <mx:Button label="Check British English" click="enableGB()" />
+ <mx:Button label="Check American English" click="enableUS()" />
+ </s:VGroup>
+ </s:Panel>
+
+</mx:Module>
+
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/apache/validators/PostCodeValidatorExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/apache/validators/PostCodeValidatorExample.mxml b/tourdeflexmodules/src/apache/validators/PostCodeValidatorExample.mxml
new file mode 100644
index 0000000..eebaac4
--- /dev/null
+++ b/tourdeflexmodules/src/apache/validators/PostCodeValidatorExample.mxml
@@ -0,0 +1,85 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:a="http://flex.apache.org/ns">
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Script>
+ <![CDATA[
+ import org.apache.flex.validators.PostCodeValidator;
+
+ import mx.controls.Alert;
+
+ protected function validatePostCode(event:MouseEvent):void
+ {
+ if (aust.selected) {
+ checkAustralianPostCode(postcode.text);
+ }
+ else if (uk.selected) {
+ checkUKPostCode(postcode.text);
+ }
+ else if (can.selected) {
+ checkCanadianPostCode(postcode.text);
+ }
+ }
+
+ public function checkAustralianPostCode(postcode:String):void {
+ validator.formats = ["NNNN"];
+ }
+
+ public function checkUKPostCode(postcode:String):void {
+ validator.formats = ["AN NAA", "ANN NAA", "AAN NAA", "ANA NAA", "AANN NAA", "AANA NAA"];
+ }
+
+ public function checkCanadianPostCode(postcode:String):void {
+ validator.format = "ANA NAN";
+ }
+ ]]>
+ </fx:Script>
+
+
+ <fx:Declarations>
+ <a:PostCodeValidator id="validator" source="{postcode}" property="text"
+ trigger="{checkPostcode}" triggerEvent="click"
+ invalid="Alert.show('Postcode incorrect format!', 'Postcode')"/>
+ </fx:Declarations>
+
+
+ <s:Panel title="Postcode Validator Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Postcode" />
+ <s:TextInput id="postcode" text=""/>
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Country" />
+ <s:RadioButton id="aust" label="Australia" selected="true" />
+ <s:RadioButton id="uk" label="UK" />
+ <s:RadioButton id="can" label="Canada" />
+ </s:HGroup>
+ <s:Button id="checkPostcode" label="Validate Postcode" click="validatePostCode(event)" />
+ </s:Panel>
+</s:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/explorer.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/explorer.mxml b/tourdeflexmodules/src/explorer.mxml
new file mode 100755
index 0000000..51b6dea
--- /dev/null
+++ b/tourdeflexmodules/src/explorer.mxml
@@ -0,0 +1,232 @@
+<?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.
+ -->
+
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:explorer="*"
+ pageTitle="{TITLE}" layout="vertical" width="100%" height="100%"
+ paddingBottom="2" paddingTop="2" paddingLeft="2" paddingRight="2"
+ initialize="init()" creationComplete="checkParameters()">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.core.FlexGlobals;
+
+ static protected const VERSION:String = "1.2";
+ static protected const TITLE:String = "Tour De Flex Component Explorer";
+ static protected const FULL_TITLE:String = "Apache Flex® Tour De Flex Component Explorer " + VERSION;
+
+ [Embed(source="explorer.xml", mimeType="application/octet-stream")]
+ private var XMLData:Class;
+
+ [Bindable]
+ protected var noExamples:int = 0;
+
+ private function init():void
+ {
+ var data:XML = XML(new XMLData());
+
+ explorerTree = XML(data.node);
+ compLibTree.dataProvider = explorerTree;
+
+ noExamples = (explorerTree..node.(hasOwnProperty("@app") && @app.length() > 0)).length();
+
+ var loader:URLLoader = new URLLoader();
+ var request:URLRequest = new URLRequest("3rdparty.xml");
+ loader.addEventListener(Event.COMPLETE, load3rdParty);
+ loader.load(request);
+ }
+
+ protected function load3rdParty(event:Event):void
+ {
+ var loader:URLLoader = URLLoader(event.target);
+ var newNode:XML = new XML(loader.data);
+
+ if (newNode..node.length() > 0) {
+ explorerTree.appendChild(newNode.node);
+ compLibTree.dataProvider = explorerTree;
+ noExamples += (newNode..node.(hasOwnProperty("@app") && @app.length() > 0)).length();
+ }
+ }
+
+ protected function checkParameters():void
+ {
+ var parameters:Object = FlexGlobals.topLevelApplication.parameters;
+
+ if (parameters.hasOwnProperty("app")) {
+ var application:String = parameters.app;
+ var source:String = explorerTree..node.(hasOwnProperty("@app") && @app == application).@src;
+ loadApp(application, source, false);
+ openNode(application);
+ }
+ else if (parameters.hasOwnProperty("module")) {
+ var module:String = parameters.module;
+ var moduleSource:String = explorerTree..node.(hasOwnProperty("@module") && @module == application).@src;
+ loadModule(module, moduleSource, false);
+ openModuleNode(module);
+ }
+ else {
+ loadModule("Welcome", null, false);
+ }
+ }
+
+ private function treeChanged(event:Event):void
+ {
+ var nodeApp:String = compLibTree.selectedItem.@app;
+ var nodeModule:String = compLibTree.selectedItem.@module;
+ var link:String = compLibTree.selectedItem.hasOwnProperty("@link") ? compLibTree.selectedItem.@link : "";
+ var thirdParty:Boolean = compLibTree.selectedItem.hasOwnProperty("@thirdParty")
+ && compLibTree.selectedItem.@thirdParty == "true";
+
+ if (nodeApp != null && nodeApp != "")
+ {
+ loadApp(nodeApp, compLibTree.selectedItem.@src, thirdParty, link);
+ }
+ else if (nodeModule != null && nodeModule != "")
+ {
+ loadModule(nodeModule, compLibTree.selectedItem.@src, thirdParty, link);
+ }
+ else
+ {
+ compLibTree.expandItem(compLibTree.selectedItem, true, true);
+ }
+ }
+
+ private function loadApp(application:String, source:String, thirdParty:Boolean, link:String=""):void
+ {
+ if (application.indexOf(".swf") > 0) {
+ swfLoader.loadApp(application);
+ }
+ else if(application.indexOf(".jpg") > 0 || application.indexOf(".png") > 0)
+ {
+ swfLoader.loadApp(application,link);
+ }
+ else {
+ swfLoader.loadApp(application + ".swf");
+ }
+ if (thirdParty) {
+ vs.thirdPartyWarning();
+ }
+ else {
+ vs.loadSource(application, source);
+ }
+ }
+
+ private function loadModule(application:String, source:String, thirdParty:Boolean, link:String=""):void
+ {
+ if (application.indexOf(".swf") > 0) {
+ swfLoader.loadModule(application);
+ }
+ else {
+ swfLoader.loadModule(application + ".swf");
+ }
+ if (thirdParty) {
+ vs.thirdPartyWarning();
+ }
+ else {
+ vs.loadSource(application, source);
+ }
+ }
+
+ private function gotoHome(event:Event):void
+ {
+ var urlRequest:URLRequest = new URLRequest("http://flex.apache.org/download-tourdeflex.html");
+ navigateToURL(urlRequest);
+ }
+
+ private function openNode(application:String):void
+ {
+ var node:XML = explorerTree..node.(hasOwnProperty("@app") && @app == application)[0];
+ var parent:XML;
+ var nodes:Array = [];
+
+ if (!node) {
+ return;
+ }
+
+ parent = node.parent();
+
+ while (parent != null) {
+ if (!compLibTree.isItemOpen(parent)) {
+ nodes.push(parent);
+ }
+ parent = parent.parent();
+ }
+
+ for each (var expand:XML in nodes) {
+ compLibTree.expandItem(expand, true);
+ }
+
+ compLibTree.selectedIndex = compLibTree.getItemIndex(node);
+ compLibTree.scrollToIndex(explorerTree.selectedIndex);
+ }
+
+ private function openModuleNode(application:String):void
+ {
+ var node:XML = explorerTree..node.(hasOwnProperty("@module") && @module == application)[0];
+ var parent:XML;
+ var nodes:Array = [];
+
+ if (!node) {
+ return;
+ }
+
+ parent = node.parent();
+
+ while (parent != null) {
+ if (!compLibTree.isItemOpen(parent)) {
+ nodes.push(parent);
+ }
+ parent = parent.parent();
+ }
+
+ for each (var expand:XML in nodes) {
+ compLibTree.expandItem(expand, true);
+ }
+
+ compLibTree.selectedIndex = compLibTree.getItemIndex(node);
+ compLibTree.scrollToIndex(explorerTree.selectedIndex);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <fx:XML id="explorerTree"/>
+ </fx:Declarations>
+
+ <mx:HBox width="100%">
+ <mx:Image source="./mx/controls/assets/ApacheFlexIcon.png" useHandCursor="true" buttonMode="true" click="gotoHome(event)" />
+ <mx:Label text="{FULL_TITLE}" fontSize="20" fontWeight="bold" />
+ <mx:Spacer width="100%" />
+ <mx:Label text="{noExamples} examples" />
+ </mx:HBox>
+ <mx:HDividedBox width="100%" height="100%">
+ <mx:Panel width="30%" height="100%" title="{TITLE}" dropShadowVisible="false">
+ <mx:Tree id="compLibTree" width="100%" height="100%" showRoot="false" labelField="@label" borderStyle="none"
+ change="treeChanged(event)"/>
+ </mx:Panel>
+ <mx:VDividedBox width="100%" height="100%">
+ <explorer:loaderPanel id="swfLoader" width="100%" height="50%"/>
+ <mx:VBox width="100%" height="50%" backgroundColor="#FFFFFF">
+ <explorer:viewsource id="vs" width="100%" height="100%"/>
+ </mx:VBox>
+ </mx:VDividedBox>
+ </mx:HDividedBox>
+ <mx:HBox width="100%">
+ <mx:Label fontSize="9" width="100%" text="Copyright © 2014 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache Flex is trademark of The Apache Software Foundation." />
+ </mx:HBox>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/explorer.xml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/explorer.xml b/tourdeflexmodules/src/explorer.xml
new file mode 100755
index 0000000..3fcd6ed
--- /dev/null
+++ b/tourdeflexmodules/src/explorer.xml
@@ -0,0 +1,486 @@
+<?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.
+ -->
+
+<compTree>
+ <node>
+ <node label="MX Framework Components">
+ <node label="Visual Components">
+ <node label="General Controls">
+ <node label="Alert" module="mx/controls/SimpleAlert" />
+ <node label="ColorPicker" module="mx/controls/ColorPickerExample" />
+ <node label="ComboBox" module="mx/controls/SimpleComboBox" />
+ <node label="DataGrid" module="mx/controls/SimpleDataGrid" />
+ <node label="HorizontalList" module="mx/controls/HorizontalListExample" />
+ <node label="HRule" module="mx/controls/SimpleHRule" />
+ <node label="HScrollBar" module="mx/controls/HScrollBarExample" />
+ <node label="HSlider" module="mx/controls/SimpleImageHSlider" />
+ <node label="List" module="mx/controls/SimpleList" />
+ <node label="NumericStepper" module="mx/controls/NumericStepperExample" />
+ <node label="ProgressBar" module="mx/controls/SimpleProgressBar" />
+ <node label="Spacer" module="mx/controls/SpacerExample" />
+ <node label="TabBar" module="mx/controls/TabBarExample" />
+ <node label="TileList" module="mx/controls/TileListExample" />
+ <node label="Tree" module="mx/controls/TreeExample" />
+ <node label="VRule" module="mx/controls/SimpleVRule" />
+ <node label="VScrollBar" module="mx/controls/VScrollBarExample" />
+ <node label="VSlider" module="mx/controls/SimpleImageVSlider" />
+ </node>
+ <node label="Button Controls">
+ <node label="Button" module="mx/controls/ButtonExample" />
+ <node label="ButtonBar" module="mx/controls/ButtonBarExample" />
+ <node label="CheckBox" module="mx/controls/CheckBoxExample" />
+ <node label="LinkBar" module="mx/controls/LinkBarExample" />
+ <node label="LinkButton" module="mx/controls/LinkButtonExample" />
+ <node label="PopUpButton" module="mx/controls/PopUpButtonExample" />
+ <node label="RadioButton" module="mx/controls/RadioButtonExample" />
+ <node label="RadioButtonGroup" module="mx/controls/RadioButtonGroupExample" />
+ <node label="ToggleButtonBar" module="mx/controls/ToggleButtonBarExample" />
+ </node>
+ <node label="Date Controls">
+ <node label="DateChooser" module="mx/controls/DateChooserExample" />
+ <node label="DateField" module="mx/controls/DateFieldExample" />
+ </node>
+ <node label="Loader Controls">
+ <node label="Image" module="mx/controls/SimpleImage" />
+ <node label="SWFLoader" module="mx/controls/SimpleLoader" src="mx/controls/Local.mxml" />
+ <node label="VideoDisplay" module="mx/controls/VideoDisplayExample" />
+ </node>
+ <node label="Menu Controls">
+ <node label="Menu" module="mx/controls/SimpleMenuExample" />
+ <node label="MenuBar" module="mx/controls/MenuBarExample" />
+ <node label="PopUpMenuButton" module="mx/controls/PopUpButtonMenuExample" />
+ </node>
+ <node label="Text Controls">
+ <node label="Label" module="mx/controls/LabelExample" />
+ <node label="RichTextEditor" module="mx/controls/RichTextEditorExample" />
+ <node label="Text" module="mx/controls/TextExample" />
+ <node label="TextArea" module="mx/controls/TextAreaExample" />
+ <node label="TextInput" module="mx/controls/TextInputExample" />
+ </node>
+ <node label="Containers">
+ <!-- not needed yet
+ <node label="Application" app="mx/core/SimpleApplicationExample" />
+ -->
+ <node label="Accordion" module="mx/containers/AccordionExample" />
+ <!-- not needed yet
+ <node label="ApplicationControlBar" app="mx/containers/SimpleApplicationControlBarExample" />
+ -->
+ <node label="Box" module="mx/containers/SimpleBoxExample" />
+ <node label="Canvas" module="mx/containers/SimpleCanvasExample" />
+ <node label="ControlBar" module="mx/containers/SimpleControlBarExample" />
+ <node label="DividedBox" module="mx/containers/DividedBoxExample" />
+ <node label="Form, FormHeading, FormItem" module="mx/containers/FormExample" />
+ <node label="Grid, GridItem, GridRow" module="mx/containers/GridLayoutExample" />
+ <node label="HBox" module="mx/containers/HBoxExample" />
+ <node label="HDividedBox" module="mx/containers/HDividedBoxExample" />
+ <node label="Panel" module="mx/containers/SimplePanelExample" />
+ <node label="TabNavigator" module="mx/containers/TabNavigatorExample" />
+ <node label="Tile" module="mx/containers/TileLayoutExample" />
+ <node label="TitleWindow" module="mx/containers/TitleWindowApp"
+ src="mx/containers/SimpleTitleWindowExample.mxml" />
+ <node label="VBox" module="mx/containers/VBoxExample" />
+ <node label="VDividedBox" module="mx/containers/VDividedBoxExample" />
+ <node label="ViewStack" module="mx/containers/ViewStackExample" />
+ </node>
+ <node label="Repeater Control">
+ <node label="Repeater" module="mx/core/RepeaterExample" />
+ </node>
+ </node>
+ <node label="Print Controls">
+ <node label="FlexPrintJob, PrintDataGrid" module="mx/printing/PrintDataGridExample"
+ src="mx/printing/FormPrintView.mxml&mx/printing/FormPrintHeader.mxml&mx/printing/FormPrintFooter.mxml" />
+ </node>
+ <node label="Validators and Formatters">
+ <node label="Validators">
+ <node label="CreditCardValidator" module="mx/validators/CreditCardValidatorExample" />
+ <node label="CurrencyValidator" module="mx/validators/CurrencyValidatorExample" />
+ <node label="DateValidator" module="mx/validators/DateValidatorExample" />
+ <node label="EmailValidator" module="mx/validators/EmailValidatorExample" />
+ <node label="NumberValidator" module="mx/validators/NumberValidatorExample" />
+ <node label="PhoneNumberValidator" module="mx/validators/PhoneNumberValidatorExample" />
+ <node label="RegExpValidator" module="mx/validators/RegExValidatorExample" />
+ <node label="SocialSecurityValidator" module="mx/validators/SocialSecurityValidatorExample" />
+ <node label="StringValidator" module="mx/validators/StringValidatorExample" />
+ <node label="Validator" module="mx/validators/SimpleValidatorExample" />
+ <node label="ZipCodeValidator" module="mx/validators/ZipCodeValidatorExample" />
+ </node>
+ <node label="Formatters">
+ <node label="CurrencyFormatter" module="mx/formatters/CurrencyFormatterExample" />
+ <node label="DateFormatter" module="mx/formatters/DateFormatterExample" />
+ <node label="Formatter" module="mx/formatters/SimpleFormatterExample" />
+ <node label="NumberFormatter" module="mx/formatters/NumberFormatterExample" />
+ <node label="PhoneFormatter" module="mx/formatters/PhoneFormatterExample" />
+ <node label="SwitchSymbolFormatter" module="mx/formatters/SwitchSymbolFormatterExample" />
+ <node label="ZipCodeFormatter" module="mx/formatters/ZipCodeFormatterExample" />
+ </node>
+ </node>
+ <node label="Effects, View States, and Transitions">
+ <node label="Effects">
+ <node label="AddItemActionEffect" module="mx/effects/AddItemActionEffectExample" />
+ <node label="AnimateProperty" module="mx/effects/AnimatePropertyEffectExample" />
+ <node label="Blur" module="mx/effects/BlurEffectExample" />
+ <node label="Dissolve" module="mx/effects/DissolveEffectExample" />
+ <node label="Effect" module="mx/effects/SimpleEffectExample" />
+ <node label="Fade" module="mx/effects/FadeEffectExample" />
+ <node label="Glow" module="mx/effects/GlowEffectExample" />
+ <node label="Iris" module="mx/effects/IrisEffectExample" />
+ <node label="Move" module="mx/effects/MoveEffectExample" />
+ <node label="Parallel" module="mx/effects/ParallelEffectExample" />
+ <node label="Pause" module="mx/effects/PauseEffectExample" />
+ <node label="RemoveItemActionEffect" module="mx/effects/AddItemActionEffectExample" />
+ <node label="Resize" module="mx/effects/ResizeEffectExample" />
+ <node label="Rotate" module="mx/effects/RotateEffectExample" />
+ <node label="Sequence" module="mx/effects/SequenceEffectExample" />
+ <node label="SoundEffect" module="mx/effects/SoundEffectExample" />
+ <node label="WipeDown" module="mx/effects/WipeDownExample" />
+ <node label="WipeLeft" module="mx/effects/WipeLeftExample" />
+ <node label="WipeRight" module="mx/effects/WipeRightExample" />
+ <node label="WipeUp" module="mx/effects/WipeUpExample" />
+ <node label="Zoom" module="mx/effects/ZoomEffectExample" />
+ </node>
+ <node label="View States">
+ <node label="State" module="mx/states/StatesExample" />
+ </node>
+ <node label="Transitions">
+ <node label="Transition" module="mx/states/TransitionExample" />
+ </node>
+ </node>
+ <node label="Datavisualization Components">
+ <node label="Charts">
+ <node label="Chart Controls">
+ <node label="AreaChart" module="mx/charts/Line_AreaChartExample" />
+ <node label="AxisRenderer" module="mx/charts/HLOCChartExample" />
+ <node label="BarChart" module="mx/charts/Column_BarChartExample" />
+ <node label="BubbleChart" module="mx/charts/BubbleChartExample" />
+ <node label="CandlestickChart" module="mx/charts/CandlestickChartExample" />
+ <node label="CategoryAxis" module="mx/charts/HLOCChartExample" />
+ <node label="ColumnChart" module="mx/charts/Column_BarChartExample" />
+ <node label="DateTimeAxis" module="mx/charts/DateTimeAxisExample" />
+ <node label="GridLines" module="mx/charts/GridLinesExample" />
+ <node label="HLOCChart" module="mx/charts/HLOCChartExample" />
+ <node label="Legend" module="mx/charts/PlotChartExample" />
+ <node label="LinearAxis" module="mx/charts/HLOCChartExample" />
+ <node label="LineChart" module="mx/charts/Line_AreaChartExample" />
+ <node label="LogAxis" module="mx/charts/LogAxisExample" />
+ <node label="PieChart" module="mx/charts/PieChartExample" />
+ <node label="PlotChart" module="mx/charts/PlotChartExample" />
+ </node>
+ <node label="Chart Series">
+ <node label="AreaSeries" module="mx/charts/Line_AreaChartExample" />
+ <node label="BarSeries" module="mx/charts/Column_BarChartExample" />
+ <node label="BubbleSeries" module="mx/charts/BubbleChartExample" />
+ <node label="CandlestickSeries" module="mx/charts/CandlestickChartExample" />
+ <node label="ColumnSeries" module="mx/charts/Column_BarChartExample" />
+ <node label="HLOCSeries" module="mx/charts/HLOCChartExample" />
+ <node label="LineSeries" module="mx/charts/Line_AreaChartExample" />
+ <node label="PieSeries" module="mx/charts/PieChartExample" />
+ <node label="PlotSeries" module="mx/charts/PlotChartExample" />
+ </node>
+ <node label="Chart Effects">
+ <node label="SeriesInterpolate" module="mx/charts/SeriesInterpolateExample" />
+ <node label="SeriesSlide" module="mx/charts/SeriesSlideExample" />
+ <node label="SeriesZoom" module="mx/charts/SeriesZoomExample" />
+ </node>
+ </node>
+ <node label="AdancedDataGrid">
+ <node label="AdvancedDataGrid" module="mx/controls/AdvancedDataGridExample" />
+ </node>
+ <node label="OLAPDataGrid">
+ <node label="OLAPDataGrid" module="mx/controls/OLAPDataGridExample" />
+ </node>
+ <node label="Printing">
+ <node label="ADG Printing" module="mx/printing/AdvancedPrintDataGridExample" />
+ </node>
+ </node>
+ </node>
+ <node label="Spark Framework Components">
+ <node label="Techniques and Examples">
+ <node label="Advanced CSS">
+ <node label="Descendant Selector" module="spark/css/CSSDescendantSelectorExample" />
+ <node label="ID Selector" module="spark/css/CSSIDSelectorExample" />
+ <node label="Type + Class Selector" module="spark/css/CSSTypeClassSelectorExample" />
+ </node>
+ <node label="Binding">
+ <node label="Bidirectional Binding 1" module="spark/other/BidirectionalBinding1Example" />
+ <node label="Bidirectional Binding 2" module="spark/other/BidirectionalBinding2Example" />
+ </node>
+ <node label="Cursors">
+ <node label="Busy Cursor" module="spark/other/Cursor1Example" />
+ <node label="Custom Cursor" module="spark/other/Cursor2Example" />
+ </node>
+ <!-- Require remote service to work
+ <node label="DataGrid">
+ <node label="DataGrid" module="spark/controls/DataGridExample2"/>
+ <node label="Custom Renderer" module="spark/controls/DataGridCustomRendererExample"/>
+ <node label="Custom Renderer" module="spark/controls/DataGridCustomRendererPrepareExample"/>
+ <node label="Custom Skin" module="spark/controls/DataGridCustomSkinExample"/>
+ <node label="Columns" module="spark/controls/DataGridSimpleColumnsExample"/>
+ <node label="No wrap" module="spark/controls/DataGridSimpleNoWrapExample"/>
+ <node label="Sizing" module="spark/controls/DataGridSizingExample"/>
+ </node>
+ <node label="Data Paging">
+ <node label="Data Paging" module="spark/controls/ListDataPagingExample" />
+ </node>
+ -->
+ <node label="Drag and Drop">
+ <node label="List to List" module="spark/other/DragAndDrop1Example" />
+ <node label="List to Panel" module="spark/other/DragAndDrop2Example" />
+ </node>
+ <node label="Custom Components">
+ <node label="Search" module="spark/components/SearchExample" src="spark/components/SearchBox.as" />
+ <node label="Video Player" module="spark/components/VideoPlayerExample" src="spark/components/VideoPlayer.mxml" />
+ </node>
+ <node label="i18n">
+ <node label="Collator" module="spark/i18n/SparkCollatorExample"/>
+ <node label="Basic Collator" module="spark/i18n/SparkCollator2Example"/>
+ <node label="Currency Validator" module="spark/i18n/SparkCurrencyValidatorExample"/>
+ <node label="Basic Currency Validator" module="spark/i18n/SparkCurrencyValidator2Example"/>
+ <node label="Number Validator" module="spark/i18n/SparkNumberValidatorExample"/>
+ <node label="Basic Number Validator" module="spark/i18n/SparkNumberValidator2Example"/>
+ <node label="Date Time Formatter" module="spark/i18n/SparkDateTimeFormatterExample"/>
+ <node label="Basic Date Time Formatter" module="spark/i18n/SparkDateTimeFormatter2Example"/>
+ <node label="Currency Formatter" module="spark/i18n/SparkCurrencyFormatterExample"/>
+ <node label="Basic Currency Formatter" module="spark/i18n/SparkCurrencyFormatter2Example"/>
+ <node label="Number Formatter" module="spark/i18n/SparkNumberFormatterExample"/>
+ <node label="Basic Number Formatter" module="spark/i18n/SparkNumberFormatter2Example"/>
+ <node label="Sort" module="spark/i18n/SparkSortandSortFieldExample"/>
+ <node label="Basic Sort" module="spark/i18n/SparkSortandSortField2Example"/>
+ <node label="String Tools" module="spark/i18n/SparkStringToolsExample"/>
+ <node label="Formatters" module="spark/i18n/SparkFormatterExample"/>
+ </node>
+ <node label="Item Renderers">
+ <node label="List" module="spark/itemRenderers/ListItemRendererExample" src="spark/itemRenderers/MyListItemRenderer.mxml"/>
+ <node label="Scale Image" module="spark/itemRenderers/ItemRenderer1Example" src="spark/itemRenderers/renderers/ImageRenderer1.mxml" />
+ <node label="3D Rotate" module="spark/itemRenderers/ItemRenderer2Example" src="spark/itemRenderers/renderers/ImageRenderer2.mxml" />
+ </node>
+ <node label="Events">
+ <node label="Inline property" module="spark/events/EventExample1" />
+ <node label="Inline block" module="spark/events/EventExample2" />
+ <node label="Function" module="spark/events/EventExample3" />
+ <node label="addEventListener" module="spark/events/EventExample4" />
+ <node label="Dispatch" module="spark/events/EventExample5" />
+ <node label="Custom" module="spark/events/EventExample6" />
+ </node>
+ <node label="Forms">
+ <node label="Help Form" module="spark/controls/SampleHelpFormExample"/>
+ <node label="Sequence Form" module="spark/controls/SampleSequenceFormExample"/>
+ <node label="Simple Form" module="spark/controls/SampleSimpleFormExample"/>
+ <node label="Stacked Form" module="spark/controls/SampleStackedFormExample"/>
+ </node>
+ <node label="Modules">
+ <node label="Load" module="spark/modules/ModuleExample" />
+ </node>
+ <node label="Repeater">
+ <node label="Repeater" module="spark/other/RepeaterExample" />
+ </node>
+ <node label="ScrollBars">
+ <node label="ScrollBars" module="spark/other/ScrollBarsExample" />
+ </node>
+ <node label="Skinning">
+ <node label="Button With Icon" module="spark/skinning/ButtonWithIconExample" src="spark/skinning/skins/CloseButtonSkin.mxml&spark/skinning/skins/AddButtonSkin.mxml&spark/skinning/skins/IconTextButtonSkin.mxml" />
+ <node label="Gradient Skin" module="spark/skinning/SkinningApplication1Example" src="spark/skinning/skins/GradientBackgroundAppSkin.mxml"/>
+ <node label="Background Image Skin" module="spark/skinning/SkinningApplication2Example" src="spark/skinning/skins/BackgroundImageAppSkin.mxml" />
+ <node label="Control Bar Skin" app="spark/skinning/SkinningApplication3Example" src="spark/skinning/skins/CustomControlBarAppSkin.mxml" />
+ <node label="Container Skin" module="spark/skinning/SkinningContainerExample" src="spark/skinning/skins/CustomSkinnableContainerSkin.mxml" />
+ </node>
+ <node label="Viewport">
+ <node label="Controlling Viewport" module="spark/other/ControllingViewportExample" />
+ </node>
+ </node>
+ <node label="Effects and Filters">
+ <node label="Move 3D" module="spark/effects/Move3DExample" />
+ <node label="Filter" module="spark/other/FilterExample" />
+ <node label="Wipe" module="spark/effects/WipeExample" />
+ <node label="Animate Property" module="spark/effects/AnimatePropertiesExample" />
+ <node label="Animate Transform" module="spark/effects/AnimateTransformExample" />
+ <!-- not working
+ <node label="Cross Fade" module="spark/effects/CrossFadeExample" />
+ -->
+ <node label="Fade" module="spark/effects/FadeExample" />
+ <node label="Rotate 3D" module="spark/effects/Rotate3DExample" />
+ <node label="Scale 3D" module="spark/effects/Scale3DExample" />
+ </node>
+ <node label="Visual Components">
+ <node label="Containers">
+ <node label="Accordion" module="spark/controls/AccordionExample" />
+ <node label="Border" module="spark/containers/BorderExample"/>
+ <node label="DataGroup" module="spark/controls/DataGroupExample" />
+ <node label="Form" module="spark/controls/FormExample" />
+ <node label="HGroup" module="spark/containers/SampleHGroup" />
+ <node label="Group" module="spark/containers/GroupExample"/>
+ <node label="Panel" module="spark/containers/PanelExample"/>
+ <node label="SkinnableDataContainer" module="spark/containers/SkinnableDataContainerExample" />
+ <node label="TabNavigator" module="spark/containers/TabNavigator1Example" />
+ <node label="TabNavigator" module="spark/containers/TabNavigator2Example" />
+ <node label="TileGroup" module="spark/containers/TileGroupExample" />
+ <node label="TitleWindow" module="spark/controls/TitleWindowExample" />
+ <node label="ViewStack" module="spark/controls/ViewStackExample" />
+ <node label="VGroup" module="spark/containers/SampleVGroup" />
+ <node label="Vertical Horizontal Align" module="spark/containers/SampleVerticalHorizontalAlign" />
+ </node>
+ <node label="Graphics and FXG">
+ <node label="Drop Shadow" module="spark/fxg/DropShadowGraphicExample" />
+ <node label="Image" module="spark/fxg/BitmapImageExample" />
+ <node label="Eclipse" module="spark/fxg/EclipseExample" />
+ <node label="Ellipse Transform" module="spark/fxg/EllipseTransformExample" />
+ <node label="Line" module="spark/fxg/LineExample" />
+ <node label="Linear Gradient" module="spark/fxg/LinearGradientsSpreadMethodExample" />
+ <node label="Rectangle" module="spark/fxg/RectExample" />
+ <node label="RichText" module="spark/fxg/RichTextExample" />
+ <node label="Static FXG" module="spark/fxg/StaticFXGExample" />
+ </node>
+ <node label="General Controls">
+ <node label="AdvancedDataGrid" module="spark/controls/AdvancedDatagridExample" />
+ <node label="Checkbox" module="spark/controls/CheckboxExample"/>
+ <node label="ColorPicker" module="spark/controls/ColorPickerExample" />
+ <node label="ComboBox" module="spark/controls/ComboBoxExample" />
+ <node label="DropDown" module="spark/controls/DropdownExample"/>
+ <node label="DataGrid" module="spark/controls/DataGridExample" />
+ <node label="Image" module="spark/controls/ImageExample" />
+ <node label="List" module="spark/controls/ListExample" />
+ <node label="Menu" module="spark/controls/MenuExample" />
+ <node label="NumericStepper" module="spark/controls/NumericStepperExample"/>
+ <node label="OLAPDataGrid" module="spark/controls/OLAPDataGridExample" />
+ <node label="ProgressBar" module="spark/controls/ProgressBarExample" />
+ <node label="RadioButton" module="spark/controls/RadioButtonExample"/>
+ <node label="ScrollBar" module="spark/controls/ScrollBarExample" />
+ <node label="Scroller" module="spark/controls/Scroller1Example"/>
+ <node label="Scroller and Tabbing" module="spark/controls/Scroller2Example"/>
+ <node label="Slider" module="spark/controls/SliderExample"/>
+ <node label="Spinner" module="spark/controls/SpinnerExample"/>
+ <!-- Removed to avoid putting swf in repo
+ <node label="SWFloader" module="spark/controls/SWFLoaderExample" />
+ -->
+ <node label="ToolTip" module="spark/controls/ToolTipExample" />
+ <node label="Tree" module="spark/controls/TreeExample" />
+ <node label="VideoDisplay" module="spark/controls/VideoDisplayExample" />
+ <!-- Removed as it's using an external asset they may not work any more
+ <node label="VideoDisplay" module="spark/controls/OSMFExample" />
+ -->
+ <node label="VideoPlayer" module="spark/controls/VideoPlayerExample" />
+ </node>
+ <node label="Button Controls">
+ <node label="Button" module="spark/controls/ButtonExample"/>
+ <node label="ButtonBar" module="spark/controls/ButtonBarExample"/>
+ <node label="LinkBar" module="spark/controls/LinkBarExample" />
+ <node label="LinkButton" module="spark/controls/LinkButtonExample" />
+ <node label="PopUpButton" module="spark/controls/PopupButtonExample" />
+ <node label="PopUpAnchor" module="spark/controls/PopUpAnchor1Example"/>
+ <node label="PopUpAnchor" module="spark/controls/PopUpAnchor2Example"/>
+ <node label="ToggleButton" module="spark/controls/ToggleButtonExample"/>
+ <node label="ToggleButtonBar" module="spark/controls/ToggleButtonBarExample" />
+ </node>
+ <node label="Date Controls">
+ <node label="DateChooser" module="spark/controls/DateChooserExample" />
+ <node label="DateField" module="spark/controls/DateFieldExample" />
+ </node>
+ <node label="Text Controls">
+ <node label="RichEditableText" module="spark/controls/RichEditableTextExample" />
+ <node label="TextArea" module="spark/controls/TextAreaExample" />
+ <node label="TextInput" module="spark/controls/TextInputExample" />
+ <node label="Sample Layout" module="spark/controls/TextLayout1Example" />
+ <node label="News Layout" module="spark/controls/TextLayout2Example" />
+ <node label="Text Controls" module="spark/controls/TextLayout3Example" />
+ <node label="Import Format Types" module="spark/controls/TextLayout4Example" />
+ <!-- Doesn't comile with current version of TLF
+ <node label="Text Layout Editor" module="spark/tlf/TextLayoutEditorSample" />
+ -->
+ </node>
+ <node label="Layouts">
+ <node label="Animated" module="spark/layouts/CustomLayoutAnimatedExample" />
+ <node label="Baseline" module="spark/layouts/CustomLayoutHBaselineExample" />
+ <node label="Image Wheel" module="spark/layouts/CustomLayoutFlickrWheelExample" />
+ <node label="Text Flow" module="spark/layouts/CustomLayoutFlowExample" />
+ </node>
+ </node>
+ <node label="Charts">
+ <node label="AreaChart" module="spark/charts/AreaChartExample" />
+ <node label="BarChart" module="spark/charts/BarChartExample" />
+ <node label="BubbleChart" module="spark/charts/BubbleChartExample" />
+ <node label="CandleStickChart" module="spark/charts/CandleStickChartExample" />
+ <node label="ColumnChart" module="spark/charts/ColumnChartExample" />
+ <node label="HLOCChart" module="spark/charts/HLOCChartExample" />
+ <node label="LineChart" module="spark/charts/LineChartExample" />
+ <node label="PieChart" module="spark/charts/PieChartExample" />
+ <node label="PlotChart" module="spark/charts/PlotChartExample" />
+ <node label="SeriesInterpolate" module="spark/charts/SeriesInterpolateExample" />
+ <node label="SeriesSlide" module="spark/charts/SeriesSlideExample" />
+ <node label="SeriesZoom" module="spark/charts/SeriesZoomExample" />
+ </node>
+ <node label="Validators and Formatters">
+ <node label="Validators">
+ <node label="CreditCardValidator" module="spark/validators/CreditCardValidatorExample" />
+ <node label="CurrencyValidator" module="spark/validators/CurrencyValidatorExample" />
+ <node label="DateValidator" module="spark/validators/DateValidatorExample" />
+ <node label="EmailValidator" module="spark/validators/EmailValidatorExample" />
+ <node label="NumberValidator" module="spark/validators/NumberValidatorExample" />
+ <node label="RegExpValidator" module="spark/validators/RegExpValidatorExample" />
+ <node label="SocialSecurityValidator" module="spark/validators/SocialSecurityValidatorExample" />
+ <node label="StringValidator" module="spark/validators/StringValidatorExample" />
+ <node label="Validator" module="spark/validators/FormValidatorExample" />
+ <node label="ZipCodeValidator" module="spark/validators/ZipCodeValidatorExample" />
+ </node>
+ <node label="Formatters">
+ <node label="CurrencyFormatter" module="spark/formatters/CurrencyFormatterExample" />
+ <node label="DateFormatter" module="spark/formatters/DateFormatterExample" />
+ <node label="NumberFormatter" module="spark/formatters/NumberFormatterExample" />
+ <node label="PhoneFormatter" module="spark/formatters/PhoneFormatterExample" />
+ <node label="SwitchFormatter" module="spark/formatters/SwitchFormatterExample" />
+ <node label="ZipCodeFormatter" module="spark/formatters/ZipCodeFormatterExample" />
+ </node>
+ </node>
+ </node>
+ <node label="Apache Flex Components and Features">
+ <node label="Apache Flex 4.8" module="apache/ApacheFlex4_8_0">
+ <!-- Do we habe any examples here? -->
+ </node>
+ <node label="Apache Flex 4.9" module="apache/ApacheFlex4_9_0">
+ <!-- Add more examples here -->
+ <node label="PostCodeFormatter" module="apache/formatters/PostCodeFormatterExample"/>
+ <node label="PostCodeValidator" module="apache/validators/PostCodeValidatorExample"/>
+ <node label="New SDK locales" module="apache/i18n/LocaleExample"/>
+ </node>
+ <node label="Apache Flex 4.10" module="apache/ApacheFlex4_10_0">
+ <!-- Add more examples here -->
+ <node label="International Dates" module="apache/i18n/DateExample"/>
+ <node label="Millisecond Formatting" module="apache/i18n/MillisecondExample"/>
+ <node label="NumberStepper" module="apache/i18n/NumericStepperExample"/>
+ <node label="Scientific Notation Formatting" module="apache/i18n/ScientificExample"/>
+ <node label="Timezone Formatting" module="apache/i18n/TimeZoneExample"/>
+ </node>
+ <node label="Apache Flex 4.11" module="apache/ApacheFlex4_11_0">
+ <!-- Add more examples here -->
+ <node label="Callout" module="apache/containers/CalloutExample"/>
+ </node>
+ <node label="Apache Flex 4.12" module="apache/ApacheFlex4_12_1">
+ <!-- Add more examples here -->
+ <node label="MaskedTextInput" module="apache/controls/MaskedTextInputExample"/>
+ </node>
+ <node label="Apache Flex 4.13" module="apache/ApacheFlex4_13_0">
+ <!-- Add examples here -->
+ </node>
+ <node label="Apache Flex 4.14" module="apache/ApacheFlex4_14_0">
+ <node label="MaskedTextInput" module="apache/controls/SparkRichTextEditorExample"/>
+ </node>
+ <node label="Apache Flex Squiggly" module="apache/Squiggly1_1">
+ <node label="MX Spelling Example" module="apache/squiggly/SpellingExample"/>
+ <node label="Spark Spelling Example" module="apache/squiggly/SpellingExExample"/>
+ </node>
+ </node>
+ </node>
+</compTree>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/favicon.ico
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/favicon.ico b/tourdeflexmodules/src/favicon.ico
new file mode 100644
index 0000000..d2be817
Binary files /dev/null and b/tourdeflexmodules/src/favicon.ico differ
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/index.html
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/index.html b/tourdeflexmodules/src/index.html
new file mode 100755
index 0000000..75e06d9
--- /dev/null
+++ b/tourdeflexmodules/src/index.html
@@ -0,0 +1,79 @@
+<!--
+ ~ 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.
+ -->
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Apache Flex® Tour De Flex Component Explorer</title>
+<script src="AC_OETags.js" language="javascript"></script>
+<style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: #ffffff; }
+ object:focus { outline:none; }
+ #flashContent { display:none; }
+</style>
+<script type="text/javascript" src="swfobject.js"></script>
+<script type="text/javascript">
+ var swfVersionStr = "11.1.0";
+ var xiSwfUrlStr = "";
+ var flashvars = {};
+ if (swfobject.getQueryParamValue("app") && swfobject.getQueryParamValue("app")) {
+ flashvars.app = swfobject.getQueryParamValue("app");
+ }
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "#ffffff";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "TourDeFlex";
+ attributes.name = "TourDeFlex";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "explorer.swf", "flashContent",
+ "100%", "100%",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+</script>
+<!-- Google Analytics -->
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-37926454-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+</head>
+
+<body scroll='no'>
+<div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+</div>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/loaderPanel.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/loaderPanel.mxml b/tourdeflexmodules/src/loaderPanel.mxml
new file mode 100755
index 0000000..1c1653d
--- /dev/null
+++ b/tourdeflexmodules/src/loaderPanel.mxml
@@ -0,0 +1,71 @@
+<?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.
+ -->
+
+<mx:Box xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="100%" height="100%">
+ <fx:Script>
+ <![CDATA[
+ import flash.net.navigateToURL;
+ private var _link:String;
+ //For third party components, we are loading an image. Clicking on the image
+ //would take the user to the demo app on the third party website
+ public function loadApp(swfApp:String, link:String=""):void
+ {
+ myLoader.source = swfApp;
+ myLoader.visible = true;
+ myLoader.includeInLayout = true;
+ myModuleLoader.visible = false;
+ myModuleLoader.includeInLayout = false;
+ if(link != "")
+ {
+ _link = link;
+ myLoader.addEventListener(MouseEvent.CLICK, handleClick);
+ myLoader.buttonMode = myLoader.useHandCursor = true;
+ }
+ else
+ {
+ myLoader.removeEventListener(MouseEvent.CLICK, handleClick);
+ myLoader.buttonMode = myLoader.useHandCursor = false;
+ }
+
+ }
+
+ //For third party components, we are loading an image. Clicking on the image
+ //would take the user to the demo app on the third party website
+ public function loadModule(swfApp:String, link:String=""):void
+ {
+ myModuleLoader.url = swfApp;
+ myModuleLoader.visible = true;
+ myModuleLoader.includeInLayout = true;
+ myLoader.visible = false;
+ myLoader.includeInLayout = false;
+ }
+
+ private function handleClick(event:MouseEvent):void
+ {
+ navigateToURL(new URLRequest(_link),"_blank");
+ }
+
+ ]]>
+ </fx:Script>
+
+<mx:SWFLoader id="myLoader" width="100%" height="100%" horizontalAlign="center" verticalAlign="middle" />
+<mx:ModuleLoader id="myModuleLoader" width="100%" height="100%" horizontalAlign="center" verticalAlign="middle" />
+
+</mx:Box>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/mx/charts/BubbleChartExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/mx/charts/BubbleChartExample.mxml b/tourdeflexmodules/src/mx/charts/BubbleChartExample.mxml
new file mode 100755
index 0000000..5e6cd2d
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/BubbleChartExample.mxml
@@ -0,0 +1,64 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the BubbleChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var expensesAC:ArrayCollection = new ArrayCollection( [
+ { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
+ { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
+ { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
+ { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
+ { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define custom color and line style for the bubbles. -->
+ <mx:SolidColor id="sc1" alpha=".3"/>
+ <mx:SolidColorStroke id="stroke1" weight="1"/>
+ </fx:Declarations>
+
+ <mx:Panel title="BubbleChart Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <mx:BubbleChart id="bubblechart"
+ height="100%" width="100%"
+ paddingRight="5" paddingLeft="5"
+ showDataTips="true" maxRadius="20"
+ dataProvider="{expensesAC}">
+ <mx:series>
+ <mx:BubbleSeries
+ displayName="Profit/Expenses/Amount"
+ xField="Profit"
+ yField="Expenses"
+ radiusField="Amount"
+ fill="{sc1}"
+ stroke="{stroke1}" />
+ </mx:series>
+ </mx:BubbleChart>
+ <mx:Legend dataProvider="{bubblechart}"/>
+ </mx:Panel>
+</mx:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/mx/charts/CandlestickChartExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/mx/charts/CandlestickChartExample.mxml b/tourdeflexmodules/src/mx/charts/CandlestickChartExample.mxml
new file mode 100755
index 0000000..e2c277e
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/CandlestickChartExample.mxml
@@ -0,0 +1,90 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the CandlestickChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var expensesAC:ArrayCollection = new ArrayCollection( [
+ { Date: "25-Jul", Open: 40.75, High: 40.75, Low: 40.24, Close:40.31},
+ { Date: "26-Jul", Open: 39.98, High: 40.78, Low: 39.97, Close:40.34},
+ { Date: "27-Jul", Open: 40.38, High: 40.66, Low: 40, Close:40.63},
+ { Date: "28-Jul", Open: 40.49, High: 40.99, Low: 40.3, Close:40.98},
+ { Date: "29-Jul", Open: 40.13, High: 40.4, Low: 39.65, Close:39.95},
+ { Date: "1-Aug", Open: 39.00, High: 39.50, Low: 38.7, Close:38.6},
+ { Date: "2-Aug", Open: 38.68, High: 39.34, Low: 37.75, Close:38.84},
+ { Date: "3-Aug", Open: 38.76, High: 38.76, Low: 38.03, Close:38.12},
+ { Date: "4-Aug", Open: 37.98, High: 37.98, Low: 36.56, Close:36.69},
+ { Date: "5-Aug", Open: 36.61, High: 37, Low: 36.48, Close:36.86} ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define custom colors for the candles. -->
+ <mx:SolidColor id="up" color="green" alpha=".8"/>
+ <mx:SolidColor id="down" color="red" alpha=".8"/>
+
+ <!-- Define custom Stroke for the candle wick. -->
+ <mx:SolidColorStroke id="wick" color="black" weight="2"/>
+
+ <!-- Define custom Stroke for the candle box. -->
+ <mx:SolidColorStroke id="box" color="black" weight="1"/>
+ </fx:Declarations>
+
+ <mx:Panel title="CandlestickChart Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <mx:CandlestickChart id="candlestickchart"
+ height="100%"
+ width="100%"
+ paddingRight="5"
+ paddingLeft="5"
+ showDataTips="true"
+ dataProvider="{expensesAC}">
+ <mx:verticalAxis>
+ <mx:LinearAxis id="vaxis" baseAtZero="false" title="Price"/>
+ </mx:verticalAxis>
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis id="haxis" categoryField="Date" title="Date"/>
+ </mx:horizontalAxis>
+
+ <mx:horizontalAxisRenderers>
+ <mx:AxisRenderer axis="{haxis}" canDropLabels="true"/>
+ </mx:horizontalAxisRenderers>
+
+ <mx:series>
+ <mx:CandlestickSeries
+ openField="Open"
+ highField="High"
+ lowField="Low"
+ closeField="Close"
+ fill="{up}"
+ declineFill="{down}"
+ stroke="{wick}"
+ boxStroke="{box}" />
+ </mx:series>
+ </mx:CandlestickChart>
+ </mx:Panel>
+</mx:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/mx/charts/Column_BarChartExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/mx/charts/Column_BarChartExample.mxml b/tourdeflexmodules/src/mx/charts/Column_BarChartExample.mxml
new file mode 100755
index 0000000..b787d38
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/Column_BarChartExample.mxml
@@ -0,0 +1,119 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the ColumnChart and BarChart controls. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var medalsAC:ArrayCollection = new ArrayCollection( [
+ { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
+ { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
+ { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 } ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define custom colors for use as fills. -->
+ <mx:SolidColor id="sc1" color="yellow" alpha=".8"/>
+ <mx:SolidColor id="sc2" color="0xCCCCCC" alpha=".6"/>
+ <mx:SolidColor id="sc3" color="0xFFCC66" alpha=".6"/>
+
+ <!-- Define custom Strokes for the columns. -->
+ <mx:SolidColorStroke id="s1" color="yellow" weight="2"/>
+ <mx:SolidColorStroke id="s2" color="0xCCCCCC" weight="2"/>
+ <mx:SolidColorStroke id="s3" color="0xFFCC66" weight="2"/>
+ </fx:Declarations>
+
+ <mx:Panel title="ColumnChart and BarChart Controls Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ layout="horizontal" height="100%" width="100%">
+ <mx:ColumnChart id="column"
+ height="100%"
+ width="45%"
+ paddingLeft="5"
+ paddingRight="5"
+ showDataTips="true"
+ dataProvider="{medalsAC}">
+ <mx:horizontalAxis>
+ <mx:CategoryAxis categoryField="Country"/>
+ </mx:horizontalAxis>
+
+ <mx:series>
+ <mx:ColumnSeries
+ xField="Country"
+ yField="Gold"
+ displayName="Gold"
+ fill="{sc1}"
+ stroke="{s1}" />
+ <mx:ColumnSeries
+ xField="Country"
+ yField="Silver"
+ displayName="Silver"
+ fill="{sc2}"
+ stroke="{s2}" />
+ <mx:ColumnSeries
+ xField="Country"
+ yField="Bronze"
+ displayName="Bronze"
+ fill="{sc3}"
+ stroke="{s3}" />
+ </mx:series>
+ </mx:ColumnChart>
+
+ <mx:Legend dataProvider="{column}"/>
+
+ <mx:BarChart id="bar" height="100%" width="45%"
+ paddingLeft="5" paddingRight="5"
+ showDataTips="true" dataProvider="{medalsAC}">
+
+ <mx:verticalAxis>
+ <mx:CategoryAxis categoryField="Country"/>
+ </mx:verticalAxis>
+
+ <mx:series>
+ <mx:BarSeries
+ yField="Country"
+ xField="Gold"
+ displayName="Gold"
+ fill="{sc1}"
+ stroke="{s1}" />
+ <mx:BarSeries
+ yField="Country"
+ xField="Silver"
+ displayName="Silver"
+ fill="{sc2}"
+ stroke="{s2}" />
+ <mx:BarSeries
+ yField="Country"
+ xField="Bronze"
+ displayName="Bronze"
+ fill="{sc3}"
+ stroke="{s3}" />
+ </mx:series>
+ </mx:BarChart>
+
+ <mx:Legend dataProvider="{bar}"/>
+
+ </mx:Panel>
+</mx:Module>
http://git-wip-us.apache.org/repos/asf/flex-examples/blob/9343d391/tourdeflexmodules/src/mx/charts/DateTimeAxisExample.mxml
----------------------------------------------------------------------
diff --git a/tourdeflexmodules/src/mx/charts/DateTimeAxisExample.mxml b/tourdeflexmodules/src/mx/charts/DateTimeAxisExample.mxml
new file mode 100755
index 0000000..53de874
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/DateTimeAxisExample.mxml
@@ -0,0 +1,72 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the DateTimeAxis class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ public var stockDataAC:ArrayCollection = new ArrayCollection( [
+ {date: "2005, 7, 27", close: 41.71},
+ {date: "2005, 7, 28", close: 42.21},
+ {date: "2005, 7, 29", close: 42.11},
+ {date: "2005, 8, 1", close: 42.71},
+ {date: "2005, 8, 2", close: 42.99},
+ {date: "2005, 8, 3", close: 44} ]);
+
+ public function myParseFunction(s:String):Date {
+ // Get an array of Strings from the comma-separated String passed in.
+ var a:Array = s.split(",");
+ // Create the new Date object. Subtract one from
+ // the month property because months are zero-based in
+ // the Date constructor.
+ var newDate:Date = new Date(a[0],a[1]-1,a[2]);
+ return newDate;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="DateTimeAxis Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:LineChart id="mychart" height="100%" width="100%"
+ paddingRight="5" paddingLeft="5"
+ showDataTips="true" dataProvider="{stockDataAC}">
+
+ <mx:horizontalAxis>
+ <mx:DateTimeAxis dataUnits="days" parseFunction="myParseFunction"/>
+ </mx:horizontalAxis>
+
+ <mx:verticalAxis>
+ <mx:LinearAxis baseAtZero="false" />
+ </mx:verticalAxis>
+
+ <mx:series>
+ <mx:LineSeries yField="close" xField="date" displayName="AAPL"/>
+ </mx:series>
+ </mx:LineChart>
+
+ </mx:Panel>
+</mx:Module>