You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2014/08/09 07:42:23 UTC
[1/3] git commit: [flex-utilities] [refs/heads/develop] - Added more
spark examples
Repository: flex-utilities
Updated Branches:
refs/heads/develop 9c4cde037 -> f5d071b30
Added more spark examples
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/6b3f8340
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/6b3f8340
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/6b3f8340
Branch: refs/heads/develop
Commit: 6b3f83403b3b1e395c8c149081b3c5cdbb617c8b
Parents: 9c4cde0
Author: Justin Mclean <jm...@apache.org>
Authored: Sat Aug 9 15:41:28 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Sat Aug 9 15:41:28 2014 +1000
----------------------------------------------------------------------
TourDeFlex/TourDeFlex3/build.xml | 36 ++++++++++++-
TourDeFlex/TourDeFlex3/src/explorer.xml | 80 +++++++++++++++++++++-------
2 files changed, 97 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/6b3f8340/TourDeFlex/TourDeFlex3/build.xml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/build.xml b/TourDeFlex/TourDeFlex3/build.xml
index ed63ccc..7c3c0dc 100644
--- a/TourDeFlex/TourDeFlex3/build.xml
+++ b/TourDeFlex/TourDeFlex3/build.xml
@@ -185,6 +185,15 @@
<compile-mxml example="/spark/controls/DataGroupExample"/>
<compile-mxml example="/spark/controls/MenuExample"/>
<compile-mxml example="/spark/controls/RichEditableTextExample"/>
+ <compile-mxml example="/spark/controls/DateChooserExample"/>
+ <compile-mxml example="/spark/controls/DateFieldExample"/>
+ <compile-mxml example="/spark/controls/FormExample"/>
+ <compile-mxml example="/spark/controls/ImageExample"/>
+ <compile-mxml example="/spark/controls/LinkBarExample"/>
+ <compile-mxml example="/spark/controls/LinkButtonExample"/>
+ <compile-mxml example="/spark/controls/OLAPDataGridExample"/>
+ <compile-mxml example="/spark/controls/PopupButtonExample"/>
+ <compile-mxml example="/spark/controls/ProgressBarExample"/>
<compile-mxml example="/spark/css/CSSDescendantSelectorExample"/>
<compile-mxml example="/spark/css/CSSTypeClassSelectorExample"/>
@@ -214,17 +223,42 @@
<compile-mxml example="/spark/charts/BubbleChartExample"/>
<compile-mxml example="/spark/charts/CandleStickChartExample"/>
<compile-mxml example="/spark/charts/ColumnChartExample"/>
+ <compile-mxml example="/spark/charts/HLOCChartExample"/>
+ <compile-mxml example="/spark/charts/LineChartExample"/>
+ <compile-mxml example="/spark/charts/PieChartExample"/>
+ <compile-mxml example="/spark/charts/PlotChartExample"/>
<compile-mxml example="/spark/components/SearchExample"/>
<compile-mxml example="/spark/components/VideoPlayerExample"/>
<compile-mxml example="/spark/validators/CreditCardValidatorExample"/>
- <compile-mxml example="/spark/validators/CurrancyFormatterExample"/>
+ <compile-mxml example="/spark/validators/CurrancyValidatorExample"/>
+ <compile-mxml example="/spark/validators/DateValidatorExample"/>
+ <compile-mxml example="/spark/validators/EmailValidatorExample"/>
+ <compile-mxml example="/spark/validators/NumberValidatorExample"/>
+ <compile-mxml example="/spark/validators/RegExpValidatorExample"/>
<compile-mxml example="/spark/formatters/CurrancyFormatterExample"/>
+ <compile-mxml example="/spark/formatters/DateFormatterExample"/>
+ <compile-mxml example="/spark/formatters/NumberFormatterExample"/>
+ <compile-mxml example="/spark/formatters/PhoneFormatterExample"/>
<compile-mxml example="/spark/other/Cursor1Example"/>
<compile-mxml example="/spark/other/Cursor2Example"/>
+ <compile-mxml example="/spark/other/DragAndDrop1Example"/>
+ <compile-mxml example="/spark/other/DragAndDrop2Example"/>
+ <compile-mxml example="/spark/other/FilterExample"/>
+
+ <compile-mxml example="/spark/events/EventExample1"/>
+ <compile-mxml example="/spark/events/EventExample2"/>
+ <compile-mxml example="/spark/events/EventExample3"/>
+ <compile-mxml example="/spark/events/EventExample4"/>
+ <compile-mxml example="/spark/events/EventExample5"/>
+ <compile-mxml example="/spark/events/EventExample6"/>
+
+ <compile-mxml example="/spark/modules/ModuleExample"/>
+ <compile-mxml example="/spark/modules/Module1"/>
+ <compile-mxml example="/spark/modules/Module2"/>
<!-- Explorer shell -->
<compile-mxml example="/explorer"/>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/6b3f8340/TourDeFlex/TourDeFlex3/src/explorer.xml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/explorer.xml b/TourDeFlex/TourDeFlex3/src/explorer.xml
index 19735bc..554bc66 100755
--- a/TourDeFlex/TourDeFlex3/src/explorer.xml
+++ b/TourDeFlex/TourDeFlex3/src/explorer.xml
@@ -205,27 +205,48 @@
</node>
</node>
<node label="Spark Framework Components">
- <node label="Advanced CSS">
- <node label="Descendant Selector" app="spark/css/CSSDescendantSelectorExample" />
- <node label="Type + Class Selector" app="spark/css/CSSTypeClassSelectorExample" />
- </node>
- <node label="Cursor">
- <node label="Busy Cursor" app="spark/other/Cursor1Example" />
- <node label="Custom Cursor" app="spark/other/Cursor2Example" />
- </node>
- <node label="Custom Components">
- <node label="Search" app="spark/components/SearchExample" />
- <node label="Video Player" app="spark/components/VideoPlayerExample" />
- </node>
- <node label="Item Renderers">
- <node label="Scale Image" app="spark/itemRenderers/ItemRenderer1Example" />
- <node label="3D Rotate" app="spark/itemRenderers/ItemRenderer2Example" />
+ <node label="Techniques">
+ <node label="Advanced CSS">
+ <node label="Descendant Selector" app="spark/css/CSSDescendantSelectorExample" />
+ <node label="Type + Class Selector" app="spark/css/CSSTypeClassSelectorExample" />
+ </node>
+ <node label="Cursors">
+ <node label="Busy Cursor" app="spark/other/Cursor1Example" />
+ <node label="Custom Cursor" app="spark/other/Cursor2Example" />
+ </node>
+ <node label="Drag and Drop">
+ <node label="List to List" app="spark/other/DragAndDrop1Example" />
+ <node label="List to Panel" app="spark/other/DragAndDrop2Example" />
+ </node>
+ <node label="Custom Components">
+ <node label="Search" app="spark/components/SearchExample" />
+ <node label="Video Player" app="spark/components/VideoPlayerExample" />
+ </node>
+ <node label="Item Renderers">
+ <node label="Scale Image" app="spark/itemRenderers/ItemRenderer1Example" />
+ <node label="3D Rotate" app="spark/itemRenderers/ItemRenderer2Example" />
+ </node>
+ <node label="Events">
+ <node label="Inline property" app="spark/events/EventExample1" />
+ <node label="Inline block" app="spark/events/EventExample2" />
+ <node label="Function" app="spark/events/EventExample3" />
+ <node label="addEventListener" app="spark/events/EventExample4" />
+ <node label="Dispatch" app="spark/events/EventExample5" />
+ <node label="Custom" app="spark/events/EventExample6" />
+ </node>
+ <node label="Modules">
+ <node label="Load" app="spark/modules/ModuleExample" />
+ </node>
</node>
- <node label="Effects">
+ <node label="Effects and Filters">
<node label="Move 3D" app="spark/effects/Move3DExample" />
+ <node label="Filter" app="spark/other/FilterExample" />
</node>
<node label="Visual Components">
<node label="Containers">
+ <node label="Accordion" app="spark/controls/AccordionExample" />
+ <node label="DataGroup" app="spark/controls/DataGroupExample" />
+ <node label="Form" app="spark/controls/FormExample" />
<node label="HGroup" app="spark/containers/SampleHGroup" />
<node label="VGroup" app="spark/containers/SampleVGroup" />
<node label="Vertical Horizontal Align" app="spark/containers/SampleVerticalHorizontalAlign" />
@@ -238,13 +259,25 @@
<node label="RichText" app="spark/fxg/RichTextExample" />
</node>
<node label="General Controls">
- <node label="Accordion" app="spark/controls/AccordionExample" />
<node label="AdvancedDataGrid" app="spark/controls/AdvancedDatagridExample" />
<node label="ColorPicker" app="spark/controls/ColorPickerExample" />
<node label="ComboBox" app="spark/controls/ComboBoxExample" />
- <node label="DataGroup" app="spark/controls/DataGroupExample" />
<node label="DataGrid" app="spark/controls/DataGridExample" />
<node label="Menu" app="spark/controls/MenuExample" />
+ <node label="Image" app="spark/controls/ImageExample" />
+ <node label="OLAPDataGrid" app="spark/controls/OLAPDataGridExample" />
+ <node label="ProgressBar" app="spark/controls/ProgressBarExample" />
+ </node>
+ <node label="Button Controls">
+ <node label="LinkBar" app="spark/controls/LinkBarExample" />
+ <node label="LinkButton" app="spark/controls/LinkButtonExample" />
+ <node label="PopUpButton" app="spark/controls/PopupButtonExample" />
+ </node>
+ <node label="Date Controls">
+ <node label="DateChooser" app="spark/controls/DateChooserExample" />
+ <node label="DateField" app="spark/controls/DateFieldExample" />
+ </node>
+ <node label="Text Controls">
<node label="RichEditableText" app="spark/controls/RichEditableTextExample" />
</node>
<node label="Layouts">
@@ -260,14 +293,25 @@
<node label="BubbleChart" app="spark/charts/BubbleChartExample" />
<node label="CandleStickChart" app="spark/charts/CandleStickChartExample" />
<node label="ColumnChart" app="spark/charts/ColumnChartExample" />
+ <node label="HLOCChart" app="spark/charts/HLOCExample" />
+ <node label="LineChart" app="spark/charts/LineExample" />
+ <node label="PieChart" app="spark/charts/PieChartExample" />
+ <node label="PlotChart" app="spark/charts/PlotChartExample" />
</node>
<node label="Validators and Formatters">
<node label="Validators">
<node label="CreditCardValidator" app="spark/validators/CreditCardValidatorExample" />
<node label="CurrencyValidator" app="spark/validators/CurrencyValidatorExample" />
+ <node label="DateValidator" app="spark/validators/DateValidatorExample" />
+ <node label="EmailValidator" app="spark/validators/EmailValidatorExample" />
+ <node label="NumberValidator" app="spark/validators/NumberValidatorExample" />
+ <node label="RegExpValidator" app="spark/validators/RegExpValidatorExample" />
</node>
<node label="Formatters">
<node label="CurrencyFormatter" app="spark/formatters/CurrencyFormatterExample" />
+ <node label="DateFormatter" app="spark/formatters/DateFormatterExample" />
+ <node label="NumberFormatter" app="spark/formatters/NumberFormatterExample" />
+ <node label="PhoneFormatter" app="spark/formatters/PhoneFormatterExample" />
</node>
</node>
</node>
[2/3] no message
Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/modules/ModuleExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/modules/ModuleExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/modules/ModuleExample.mxml
new file mode 100644
index 0000000..3ef1105
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/modules/ModuleExample.mxml
@@ -0,0 +1,80 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ private function loadModule(title:String, url:String):void
+ {
+ var p:ModulePanel = new ModulePanel();
+ p.title = title;
+ p.url = url;
+ hBox.addChild(p);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <fx:Component className="ModulePanel">
+ <s:Panel>
+ <fx:Script>
+ <![CDATA[
+ [Bindable]
+ public var url:String;
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <mx:ModuleLoader id="ml" url="{url}" width="100%" height="100%">
+ <mx:unload>
+ if(parent != null)
+ {
+ parent.removeChild(this);
+ }
+ </mx:unload>
+ </mx:ModuleLoader>
+ <mx:ControlBar>
+ <s:Button label="unload" click="ml.unloadModule()"/>
+ </mx:ControlBar>
+ </s:Panel>
+ </fx:Component>
+ </fx:Declarations>
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"/>
+ </s:layout>
+
+ <mx:ApplicationControlBar dock="true" fillColors="[0x000000,0x323232]" fillAlphas="[1,1]" horizontalAlign="center">
+ <s:Button label="Load Module 1" click="loadModule('module 1', 'Module1.swf')"/>
+ <s:Button label="Load Module 2" click="loadModule('module 2', 'Module2.swf')"/>
+ </mx:ApplicationControlBar>
+
+ <mx:HBox id="hBox" />
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/modules/TDFGradientBackgroundSkin.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/modules/TDFGradientBackgroundSkin.mxml b/TourDeFlex/TourDeFlex3/src/spark/modules/TDFGradientBackgroundSkin.mxml
new file mode 100644
index 0000000..553aee3
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/modules/TDFGradientBackgroundSkin.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.
+
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:s="library://ns.adobe.com/flex/spark">
+
+ <fx:Metadata>
+ [HostComponent("spark.components.Application")]
+ </fx:Metadata>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <s:layout>
+ <s:BasicLayout />
+ </s:layout>
+
+ <s:Rect id="bg" width="100%" height="100%">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:entries>
+ <s:GradientEntry color="0x000000" ratio="0.00" />
+ <s:GradientEntry color="0x323232" ratio="1.0" />
+ </s:entries>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" />
+</s:SparkSkin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/other/DragAndDrop1Example.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/other/DragAndDrop1Example.mxml b/TourDeFlex/TourDeFlex3/src/spark/other/DragAndDrop1Example.mxml
new file mode 100644
index 0000000..d849d97
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/other/DragAndDrop1Example.mxml
@@ -0,0 +1,62 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <s:ArrayList id="arr1">
+ <fx:String>Orange</fx:String>
+ <fx:String>Apple</fx:String>
+ <fx:String>Pear</fx:String>
+ </s:ArrayList>
+
+ <s:ArrayList id="arr2">
+ <fx:String>Banana</fx:String>
+ </s:ArrayList>
+ </fx:Declarations>
+
+ <s:Panel title="Drag and Drop Samples"
+ width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:List allowMultipleSelection="true" dropEnabled="true" dragEnabled="true" dragMoveEnabled="true"
+ dataProvider="{arr1}"/>
+
+ <s:Label text="Drag Items between lists" color="0x000000"/>
+
+ <s:List allowMultipleSelection="true" dropEnabled="true" dragEnabled="true" dragMoveEnabled="true"
+ dataProvider="{arr2}"/>
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/other/DragAndDrop2Example.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/other/DragAndDrop2Example.mxml b/TourDeFlex/TourDeFlex3/src/spark/other/DragAndDrop2Example.mxml
new file mode 100644
index 0000000..241074b
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/other/DragAndDrop2Example.mxml
@@ -0,0 +1,80 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.managers.DragManager;
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <s:ArrayList id="arr1">
+ <fx:String>Orange</fx:String>
+ <fx:String>Apple</fx:String>
+ <fx:String>Pear</fx:String>
+ <fx:String>Banana</fx:String>
+ </s:ArrayList>
+ </fx:Declarations>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="Fruit" height="100%" color="0x000000" borderAlpha="0.15">
+ <s:List height="100%" dragEnabled="true" color="0x000000" dataProvider="{arr1}" />
+ </s:Panel>
+
+ <s:Panel id="fruitDetails" title="drag fruit here" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:dragEnter>
+ if (event.dragSource.hasFormat('itemsByIndex'))
+ {
+ var dropTarget:Panel = event.currentTarget as Panel;
+ DragManager.acceptDragDrop(dropTarget);
+ }
+ </s:dragEnter>
+ <s:dragOver>
+
+ </s:dragOver>
+ <s:dragDrop>
+ var data:Object = event.dragSource.dataForFormat('itemsByIndex');
+ var p:Panel = new Panel();
+ p.title = new String(data);
+ p.percentWidth = 100;
+ p.percentHeight = 25;
+ p.setStyle("color","black");
+ fruitDetails.addElement(p);
+ </s:dragDrop>
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/other/FilterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/other/FilterExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/other/FilterExample.mxml
new file mode 100644
index 0000000..a6e4822
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/other/FilterExample.mxml
@@ -0,0 +1,96 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html"
+ creationComplete="init()">
+
+ <fx:Script>
+ <![CDATA[
+
+ private var time:Timer;
+ private var count:int = 0;
+
+ private function init():void{
+ time = new Timer(1000,0);
+ time.addEventListener(TimerEvent.TIMER,timeHandler);
+ time.start();
+
+ }
+
+ private function timeHandler(ev:TimerEvent):void{
+ count ++;
+ dynamicText.text = String(count);
+ }
+
+ private function filterHandler(ev:MouseEvent):void{
+ var filterArr:Array = [];
+
+ blurBox.selected ? filterArr.push(blur): null;
+ glowBox.selected ? filterArr.push(glow): null;
+ shadowBox.selected? filterArr.push(dropShadow): null;
+ bevelBox.selected ? filterArr.push(bevel): null;
+
+ textSample.filters = filterArr;
+ dynamicText.filters = filterArr;
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <!--filters-->
+ <s:GlowFilter id="glow" blurX="12" blurY="12" color="#88AEF7" quality="2" strength="1"/>
+ <s:BlurFilter id="blur" blurX="4" blurY="4" quality="2" />
+ <s:DropShadowFilter id="dropShadow" alpha="0.35" blurX="6" blurY="6" distance="6" color="#000000" angle="90" />
+ <s:BevelFilter id="bevel" angle="45" blurX="0.5" blurY="0.5" distance="4" strength="0.7" highlightAlpha="0.7" shadowAlpha="0.7" />
+ </fx:Declarations>
+
+ <s:Panel title="Filters Samples"
+ width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:Label id="textSample" text="SAMPLE TEXT" color="0x000000"
+ fontWeight="bold" fontSize="40" filters="{[bevel]}" />
+
+ <s:HGroup width="100%" color="#323232" horizontalAlign="center">
+ <s:CheckBox id="blurBox" label="Blur" click="filterHandler(event)" />
+ <s:CheckBox id="glowBox" label="Glow" click="filterHandler(event)" />
+ <s:CheckBox id="shadowBox" label="Drop Shadow" click="filterHandler(event)" />
+ <s:CheckBox id="bevelBox" label="Bevel" selected="true" click="filterHandler(event)" />
+ </s:HGroup>
+
+ <s:Label id="dynamicText" text="0" color="#323232" fontSize="18" filters="{[bevel]}" />
+
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/validators/DateValidatorExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/validators/DateValidatorExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/validators/DateValidatorExample.mxml
new file mode 100644
index 0000000..6bce0e6
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/validators/DateValidatorExample.mxml
@@ -0,0 +1,70 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <fx:Model id="CheckModel">
+ <dateInfo>
+ <DOB>{dob.text}</DOB>
+ </dateInfo>
+ </fx:Model>
+
+ <mx:DateValidator source="{dob}" property="text" allowedFormatChars="/"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+ <s:Panel title="DateValidator Example" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:Form color="0x323232">
+ <mx:FormItem label="Enter date of birth (mm/dd/yyyy): ">
+ <s:TextInput id="dob" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <s:Button id="myButton" label="Validate" />
+ </mx:FormItem>
+ </mx:Form>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/validators/EmailValidatorExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/validators/EmailValidatorExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/validators/EmailValidatorExample.mxml
new file mode 100644
index 0000000..a5adaa6
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/validators/EmailValidatorExample.mxml
@@ -0,0 +1,65 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <mx:EmailValidator source="{email}" property="text"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+
+ <s:Panel title="EmailValidator Example" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:Form color="0x323232">
+ <mx:FormItem label="Enter an e-mail address: ">
+ <s:TextInput id="email" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <s:Button id="myButton" label="Validate" />
+ </mx:FormItem>
+ </mx:Form>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/validators/NumberValidatorExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/validators/NumberValidatorExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/validators/NumberValidatorExample.mxml
new file mode 100644
index 0000000..76da726
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/validators/NumberValidatorExample.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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ValidationResultEvent;
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = numVal.validate();
+ if (vResult.type==ValidationResultEvent.VALID) {
+
+ formattedNumber.text= numberFormatter.format(inputVal.text);
+ }
+
+ else {
+ formattedNumber.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <mx:NumberFormatter id="numberFormatter" precision="4" useThousandsSeparator="true" useNegativeSign="true"/>
+
+ <mx:NumberValidator id="numVal" source="{inputVal}" property="text" allowNegative="true" domain="real"/>
+ </fx:Declarations>
+
+ <s:Panel title="NumberValidator Example" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:Form color="0x323232">
+ <mx:FormItem label="Enter number:">
+ <s:TextInput id="inputVal" text="" width="50%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted number (precision=4): ">
+ <s:Label id="formattedNumber" />
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <s:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/validators/RegExpValidatorExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/validators/RegExpValidatorExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/validators/RegExpValidatorExample.mxml
new file mode 100644
index 0000000..c704718
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/validators/RegExpValidatorExample.mxml
@@ -0,0 +1,101 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.events.ValidationResultEvent;
+ import mx.validators.*;
+
+ // Write the results to the
+ private function handleResult(eventObj:ValidationResultEvent):void {
+ if (eventObj.type == ValidationResultEvent.VALID)
+ {
+ // For valid events, the results Array contains
+ // RegExpValidationResult objects.
+ var xResult:RegExpValidationResult;
+ reResults.text="x";
+ for (var i:uint = 0; i < eventObj.results.length; i++)
+ {
+ xResult = eventObj.results[i];
+ reResults.text=reResults.text + xResult.matchedIndex + " " + xResult.matchedString;
+ }
+ }
+ else
+ {
+ reResults.text="";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <mx:RegExpValidator id="regExpV"
+ source="{regex_text}" property="text"
+ flags="g" expression="{regex.text}"
+ valid="handleResult(event)" invalid="handleResult(event)"
+ trigger="{myButton}" triggerEvent="click"/>
+ </fx:Declarations>
+
+ <s:Panel title="RegExpValidator Example" width="620" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:Label width="100%" color="0x323232" text="Instructions:"/>
+ <s:Label width="100%" color="0x323232" text="1. Enter text to search. By default, enter a string containing the letters ABC in sequence followed by any digit."/>
+ <s:Label width="100%" color="0x323232" text="2. Enter the regular expression. By default, enter ABC\d."/>
+ <s:Label width="100%" color="0x323232" text="3. Click the Button control to trigger the validation."/>
+ <s:Label width="100%" color="0x323232" text="4. The results show the index in the text where the matching pattern begins, and the matching pattern. "/>
+
+ <mx:Form color="0x323232">
+ <mx:FormItem label="Enter text: ">
+ <s:TextInput id="regex_text" text="xxxxABC4xxx" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Enter regular expression: ">
+ <s:TextInput id="regex" text="ABC\d" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Results: ">
+ <s:TextInput id="reResults" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <s:Button id="myButton" label="Validate"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </s:Panel>
+
+</s:Application>
[3/3] git commit: [flex-utilities] [refs/heads/develop] - no message
Posted by jm...@apache.org.
no message
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/f5d071b3
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/f5d071b3
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/f5d071b3
Branch: refs/heads/develop
Commit: f5d071b30a9fd7bdbd79e257bb532434a17c8759
Parents: 6b3f834
Author: Justin Mclean <jm...@apache.org>
Authored: Sat Aug 9 15:42:10 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Sat Aug 9 15:42:10 2014 +1000
----------------------------------------------------------------------
.../src/spark/charts/HLOCChartExample.mxml | 79 +++++++
.../src/spark/charts/LineChartExample.mxml | 73 ++++++
.../src/spark/charts/PieChartExample.mxml | 78 +++++++
.../src/spark/charts/PlotChartExample.mxml | 67 ++++++
.../src/spark/controls/DateChooserExample.mxml | 80 +++++++
.../src/spark/controls/DateFieldExample.mxml | 94 ++++++++
.../src/spark/controls/FormExample.mxml | 93 ++++++++
.../src/spark/controls/ImageExample.mxml | 70 ++++++
.../src/spark/controls/LinkBarExample.mxml | 90 ++++++++
.../src/spark/controls/LinkButtonExample.mxml | 51 ++++
.../src/spark/controls/OLAPDataGrid.mxml | 231 +++++++++++++++++++
.../src/spark/controls/PopupButtonExample.mxml | 83 +++++++
.../src/spark/controls/ProgressBarExample.mxml | 72 ++++++
.../src/spark/controls/assets/arrow_icon.png | Bin 0 -> 817 bytes
.../src/spark/controls/assets/arrow_icon_sm.png | Bin 0 -> 527 bytes
.../src/spark/events/EventExample1.mxml | 53 +++++
.../src/spark/events/EventExample2.mxml | 57 +++++
.../src/spark/events/EventExample3.mxml | 58 +++++
.../src/spark/events/EventExample4.mxml | 64 +++++
.../src/spark/events/EventExample5.mxml | 58 +++++
.../src/spark/events/EventExample6.mxml | 59 +++++
.../src/spark/events/FiveSecondTrigger.as | 44 ++++
.../TourDeFlex3/src/spark/events/MyEvent.as | 33 +++
.../spark/events/TDFGradientBackgroundSkin.mxml | 49 ++++
.../spark/formatters/DateFormatterExample.mxml | 83 +++++++
.../formatters/NumberFormatterExample.mxml | 83 +++++++
.../spark/formatters/PhoneFormatterExample.mxml | 83 +++++++
.../TourDeFlex3/src/spark/modules/Module1.mxml | 24 ++
.../TourDeFlex3/src/spark/modules/Module2.mxml | 24 ++
.../src/spark/modules/ModuleExample.mxml | 80 +++++++
.../modules/TDFGradientBackgroundSkin.mxml | 49 ++++
.../src/spark/other/DragAndDrop1Example.mxml | 62 +++++
.../src/spark/other/DragAndDrop2Example.mxml | 80 +++++++
.../src/spark/other/FilterExample.mxml | 96 ++++++++
.../spark/validators/DateValidatorExample.mxml | 70 ++++++
.../spark/validators/EmailValidatorExample.mxml | 65 ++++++
.../validators/NumberValidatorExample.mxml | 84 +++++++
.../validators/RegExpValidatorExample.mxml | 101 ++++++++
38 files changed, 2620 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/charts/HLOCChartExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/charts/HLOCChartExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/charts/HLOCChartExample.mxml
new file mode 100644
index 0000000..38cd01b
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/charts/HLOCChartExample.mxml
@@ -0,0 +1,79 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var stockDataAC:ArrayCollection = new ArrayCollection( [
+ { Date: "25-Jul", Open: 40.55, High: 40.75, Low: 40.24, Close:40.31},
+ { Date: "26-Jul", Open: 40.15, 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>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="HLOCChart Control" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:HLOCChart id="hlocchart" height="100%" width="100%" paddingRight="5" paddingLeft="5"
+ color="0x323232" showDataTips="true" dataProvider="{stockDataAC}">
+
+ <mx:verticalAxis>
+ <mx:LinearAxis baseAtZero="false" />
+ </mx:verticalAxis>
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis categoryField="Date" title="Date" />
+ </mx:horizontalAxis>
+
+ <mx:series>
+ <mx:HLOCSeries openField="Open" highField="High"
+ lowField="Low" closeField="Close"/>
+ </mx:series>
+ </mx:HLOCChart>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/charts/LineChartExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/charts/LineChartExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/charts/LineChartExample.mxml
new file mode 100644
index 0000000..432a064
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/charts/LineChartExample.mxml
@@ -0,0 +1,73 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <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>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="LineChart Control" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:LineChart id="linechart" color="0x323232" height="100%"
+ showDataTips="true" dataProvider="{expensesAC}">
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis categoryField="Month"/>
+ </mx:horizontalAxis>
+
+ <mx:series>
+ <mx:LineSeries yField="Profit" form="curve" displayName="Profit"/>
+ <mx:LineSeries yField="Expenses" form="curve" displayName="Expenses"/>
+ <mx:LineSeries yField="Amount" form="curve" displayName="Amount"/>
+ </mx:series>
+ </mx:LineChart>
+
+ <mx:Legend dataProvider="{linechart}" color="0x323232"/>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/charts/PieChartExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/charts/PieChartExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/charts/PieChartExample.mxml
new file mode 100644
index 0000000..2ad6001
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/charts/PieChartExample.mxml
@@ -0,0 +1,78 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <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 } ]);
+
+ private function displayGold(data:Object, field:String, index:Number, percentValue:Number):String {
+ var temp:String= (" " + percentValue).substr(0,6);
+ return data.Country + ": " + '\n' + "Total Gold: " + data.Gold + '\n' + temp + "%";
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="PieChart Control" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:PieChart id="chart" height="100%" width="100%" paddingRight="5" paddingLeft="5" color="0x323232"
+ showDataTips="true" dataProvider="{medalsAC}" >
+
+ <mx:series>
+ <mx:PieSeries labelPosition="callout" field="Gold" labelFunction="displayGold">
+ <mx:calloutStroke>
+ <s:SolidColorStroke weight="0" color="0x888888" alpha="1.0"/>
+ </mx:calloutStroke>
+ <mx:radialStroke>
+ <s:SolidColorStroke weight="0" color="#FFFFFF" alpha="0.20"/>
+ </mx:radialStroke>
+ <mx:stroke>
+ <s:SolidColorStroke color="0" alpha="0.20" weight="2"/>
+ </mx:stroke>
+ </mx:PieSeries>
+ </mx:series>
+ </mx:PieChart>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/charts/PlotChartExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/charts/PlotChartExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/charts/PlotChartExample.mxml
new file mode 100644
index 0000000..3a60d4f
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/charts/PlotChartExample.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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <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 } ]);
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="PlotChart Control" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:PlotChart id="plot" height="100%" paddingLeft="5" paddingRight="5" color="0x323232"
+ showDataTips="true" dataProvider="{expensesAC}">
+
+ <mx:series>
+ <mx:PlotSeries xField="Expenses" yField="Profit" displayName="Expenses/Profit"/>
+ <mx:PlotSeries xField="Amount" yField="Expenses" displayName="Amount/Expenses"/>
+ <mx:PlotSeries xField="Profit" yField="Amount" displayName="Profit/Amount"/>
+ </mx:series>
+ </mx:PlotChart>
+
+ <mx:Legend dataProvider="{plot}" color="0x323232"/>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/DateChooserExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/DateChooserExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/controls/DateChooserExample.mxml
new file mode 100644
index 0000000..8bd4dc0
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/controls/DateChooserExample.mxml
@@ -0,0 +1,80 @@
+<?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 DateChooser control. -->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin" viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ // Event handler function to write the selected
+ // date to the Label control.
+ private function displayDate(date:Date):void {
+ if (date == null)
+ selection.text = "Date selected: ";
+ else
+ selection.text = "Date selected: " + date.getFullYear().toString() +
+ '/' + (date.getMonth()+1).toString() + '/' + date.getDate();
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:DateFormatter id="df"/>
+ </fx:Declarations>
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="DateChooser Control Example" color="0x000000"
+ borderAlpha="0.15"
+ width="600">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:VGroup>
+ <s:Label width="100%" color="0x000000" text="Simple DateChooser Control"/>
+ <mx:DateChooser id="dateChooser1" yearNavigationEnabled="true" height="145"
+ change="displayDate(DateChooser(event.target).selectedDate)" color="0x000000"/>
+ <s:Label id="selection" color="0x323232" text="Date selected:"/>
+ </s:VGroup>
+
+ <s:VGroup>
+ <s:Label width="100%" color="0x000000" text="Disable dates before Oct 31st, 2008"/>
+ <mx:DateChooser id="dateChooser2" yearNavigationEnabled="true" width="175" height="145"
+ disabledRanges="{[ {rangeEnd: new Date(2008, 9, 31)} ]}" color="0x000000"/>
+ <s:Label color="0x323232" text="Date selected: {df.format(dateChooser2.selectedDate)}"/>
+ </s:VGroup>
+
+ <s:VGroup width="30%">
+ <mx:Text width="100%" color="0x323232" text="Select a date in the DateChooser control."/>
+ <mx:Text width="100%" color="0x323232" text="Select it again while holding down the Control key to clear it."/>
+ </s:VGroup>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/DateFieldExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/DateFieldExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/controls/DateFieldExample.mxml
new file mode 100644
index 0000000..fead8cc
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/controls/DateFieldExample.mxml
@@ -0,0 +1,94 @@
+<?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.
+
+-->
+<!-- Simple example to demonstrate the DateField control. -->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin" viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ // Event handler for the DateField change event.
+ private function dateChanged(date:Date):void {
+ if (date == null)
+ selection.text = "Date selected: ";
+ else
+ selection.text = "Date selected: " + date.getFullYear().toString() +
+ '/' + (date.getMonth()+1).toString() + '/' + date.getDate();
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:DateFormatter id="df"/>
+ </fx:Declarations>
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="DateField Control Example" color="0x000000"
+ borderAlpha="0.15"
+ width="600">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:BorderContainer width="50%" borderColor="0xDCDCDC" height="100%" borderStyle="solid">
+
+ <s:layout>
+ <s:VerticalLayout paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"/>
+ </s:layout>
+
+ <s:Label id="selection" color="0x323232" text="Date selected:" />
+
+ <mx:DateField id="dateField1" yearNavigationEnabled="true"
+ change="dateChanged(DateField(event.target).selectedDate)" color="0x000000"/>
+
+ <s:Label color="0x000000" text="Basic DateField:"/>
+
+
+ <s:Label width="100%" color="0x323232"
+ text="Select a date in the DateField control. Select it again while holding down the Control key to clear it."/>
+
+ </s:BorderContainer>
+
+ <s:BorderContainer width="50%" borderColor="0xDCDCDC" height="100%" borderStyle="solid">
+
+ <s:layout>
+ <s:VerticalLayout paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"/>
+ </s:layout>
+
+ <s:Label color="0x323232" text="Date selected: {df.format(dateField2.selectedDate)}"/>
+
+ <mx:DateField id="dateField2" yearNavigationEnabled="true"
+ disabledRanges="{[ {rangeEnd: new Date(2008, 9, 31)} ]}" color="0x000000"/>
+
+ <s:Label color="0x000000" text="Disable dates on or before Oct 31, 2008."/>
+
+ </s:BorderContainer>
+
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/FormExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/FormExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/controls/FormExample.mxml
new file mode 100644
index 0000000..a7cbc42
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/controls/FormExample.mxml
@@ -0,0 +1,93 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Declarations>
+ <fx:Model id="checkModel">
+ <User>
+ <FirstName>{fname.text}</FirstName>
+ <DOB>{dob.text}</DOB>
+ <Email>{email.text}</Email>
+ <Age>{age.text}</Age>
+ <Zip>{zip.text}</Zip>
+ <Phone>{phone.text}</Phone>
+ </User>
+ </fx:Model>
+
+ <mx:StringValidator source="{fname}" property="text" minLength="4" maxLength="12"/>
+ <mx:PhoneNumberValidator source="{phone}" property="text"/>
+ <mx:DateValidator source="{dob}" property="text"/>
+ <mx:EmailValidator source="{email}" property="text"/>
+ <mx:NumberValidator source="{age}" property="text" integerError="Enter Integer value"
+ minValue="18" maxValue="100" domain="int"/>
+ <mx:ZipCodeValidator source="{zip}" property="text"/>
+
+ </fx:Declarations>
+
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="Form Container: Moving from one form field to another triggers the validator" color="0x000000"
+ borderAlpha="0.15"
+ width="600">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:Form width="100%" color="0x323232" paddingTop="0">
+ <mx:FormHeading fontSize="10" label="Enter values into the form." paddingTop="0" />
+
+ <mx:FormItem label="First name">
+ <s:TextInput id="fname" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Date of birth (mm/dd/yyyy)">
+ <s:TextInput id="dob" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="E-mail address">
+ <s:TextInput id="email" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Age">
+ <s:TextInput id="age" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Zip">
+ <s:TextInput id="zip" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Phone">
+ <s:TextInput id="phone" width="200"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/ImageExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/ImageExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/controls/ImageExample.mxml
new file mode 100644
index 0000000..4a9a295
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/controls/ImageExample.mxml
@@ -0,0 +1,70 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin" viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ private function smoothImage(ev:Event):void{
+ //set image smoothing so image looks better when transformed.
+ var bmp:Bitmap = ev.target.content as Bitmap;
+ bmp.smoothing = true;
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="Image Samples" color="0x000000"
+ borderAlpha="0.15"
+ width="600">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <!--<mx:VBox width="100%" borderColor="0xACACAC" borderThickness="1" borderStyle="solid" horizontalAlign="center"
+ paddingTop="5" paddingRight="5" paddingBottom="5" paddingLeft="5" >-->
+ <s:BorderContainer width="50%" borderColor="0xACACAC" height="100%" borderStyle="solid">
+
+ <s:layout>
+ <s:VerticalLayout paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"/>
+ </s:layout>
+ <s:Label color="0x323232" text="Sample of image embeded at compile time." />
+ <mx:Image id="embededImage" source="@Embed('images/compass.jpg')" creationComplete="smoothImage(event);"/>
+ </s:BorderContainer>
+
+ <s:BorderContainer width="50%" borderColor="0xACACAC" height="100%" borderStyle="solid">
+
+ <s:layout>
+ <s:VerticalLayout paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"/>
+ </s:layout>
+ <s:Label color="0x323232" text="Sample of image loaded at run-time." />
+ <mx:Image id="loadedImage" source="images/backpack.jpg" creationComplete="smoothImage(event);"/>
+ </s:BorderContainer>
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/LinkBarExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/LinkBarExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/controls/LinkBarExample.mxml
new file mode 100644
index 0000000..5710fc9
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/controls/LinkBarExample.mxml
@@ -0,0 +1,90 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="LinkBar Control" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:Label width="100%" color="0x323232" textAlign="center"
+ text="Select a link in the LinkBar control to set the active child of the ViewStack container."/>
+
+ <mx:LinkBar color="0x0050AA" horizontalAlign="center" width="100%" fontWeight="bold" dataProvider="{myViewStack}" borderColor="0xACACAC" borderStyle="solid"/>
+
+ <!-- Define the ViewStack and the three child containers -->
+ <mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="80%" color="0x323232">
+
+ <s:NavigatorContent id="search" label="Customer Info" backgroundColor="0xDCDCDC" fontWeight="bold">
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Label text="Search Panel" width="100%" textAlign="center" paddingTop="10" />
+ <s:HGroup>
+ <s:TextInput id="Searchtxt" width="200" />
+ <s:Button label="search" click="Searchtxt.text=''" />
+ </s:HGroup>
+ </s:NavigatorContent>
+
+ <s:NavigatorContent id="custInfo" label="Customer Info" backgroundColor="0xDCDCDC" width="100%" height="100%">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Label text="Customer Info" width="100%" textAlign="center" paddingTop="10" />
+ <s:HGroup>
+ <s:Label text="Email Address"/>
+ <s:TextInput id="email" width="200"/>
+ <s:Button label="Submit" click="email.text='';" />
+ </s:HGroup>
+
+ </s:NavigatorContent>
+
+ <s:NavigatorContent id="accountInfo" label="Account Info" backgroundColor="0xDCDCDC" width="100%" height="100%" fontWeight="bold" >
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Label text="Account Info" width="100%" textAlign="center" paddingTop="10" />
+ <s:HGroup>
+ <mx:Button label="Purchases" />
+ <mx:Button label="Sales" />
+ <mx:Button label="Reports" />
+ </s:HGroup>
+ </s:NavigatorContent>
+
+ </mx:ViewStack>
+
+ </s:Panel>
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/LinkButtonExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/LinkButtonExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/controls/LinkButtonExample.mxml
new file mode 100644
index 0000000..8be6a83
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/controls/LinkButtonExample.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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="LinkButton Sample" color="0x000000"
+ borderAlpha="0.15"
+ width="600">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:Label color="0x323232" text="Sample of image embeded at compile time." />
+ <mx:LinkButton label="LinkButton Control" color="0x3380DD" click="{Alert.show('LinkButton Pressed');}"
+ textDecoration="underline" fontWeight="normal" icon="@Embed('assets/arrow_icon_blue.png')" />
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/OLAPDataGrid.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/OLAPDataGrid.mxml b/TourDeFlex/TourDeFlex3/src/spark/controls/OLAPDataGrid.mxml
new file mode 100644
index 0000000..82fc104
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/controls/OLAPDataGrid.mxml
@@ -0,0 +1,231 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html"
+ creationComplete="creationCompleteHandler();">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.rpc.AsyncResponder;
+ import mx.rpc.AsyncToken;
+ import mx.olap.OLAPQuery;
+ import mx.olap.OLAPSet;
+ import mx.olap.IOLAPQuery;
+ import mx.olap.IOLAPQueryAxis;
+ import mx.olap.IOLAPCube;
+ import mx.olap.OLAPResult;
+ import mx.events.CubeEvent;
+ import mx.controls.Alert;
+ import mx.collections.ArrayCollection;
+
+
+ //
+ // Format of Objects in the ArrayCollection:
+ //
+ // data:Object = {
+ // customer:"AAA",
+ // product:"ColdFusion",
+ // quarter:"Q1"
+ // revenue: "100.00"
+ // }
+ //
+
+ [Bindable]
+ private var flatData:ArrayCollection = new ArrayCollection(
+ [
+ {customer:"AAA", product:"ColdFusion", quarter:"Q1", revenue:210, cost:25},
+ {customer:"AAA", product:"Flex", quarter:"Q2", revenue:210, cost:25},
+ {customer:"AAA", product:"Dreamweaver", quarter:"Q3", revenue:250, cost:125},
+ {customer:"AAA", product:"Flash", quarter:"Q4", revenue:430, cost:75},
+
+ {customer:"BBB", product:"ColdFusion", quarter:"Q2", revenue:125, cost:20},
+ {customer:"BBB", product:"Flex", quarter:"Q3", revenue:210, cost:20},
+ {customer:"BBB", product:"Dreamweaver", quarter:"Q4", revenue:320, cost:120},
+ {customer:"BBB", product:"Flash", quarter:"Q1", revenue:280, cost:70},
+
+ {customer:"CCC", product:"ColdFusion", quarter:"Q3", revenue:375, cost:120},
+ {customer:"CCC", product:"Flex", quarter:"Q4", revenue:430, cost:120},
+ {customer:"CCC", product:"Dreamweaver", quarter:"Q1", revenue:470, cost:220},
+ {customer:"CCC", product:"Flash", quarter:"Q2", revenue:570, cost:170},
+
+ {customer:"AAA", product:"ColdFusion", quarter:"Q4", revenue:215, cost:90},
+ {customer:"AAA", product:"Flex", quarter:"Q1", revenue:210, cost:90},
+ {customer:"AAA", product:"Dreamweaver", quarter:"Q2", revenue:175, cost:190},
+ {customer:"AAA", product:"Flash", quarter:"Q3", revenue:670, cost:75},
+
+ {customer:"BBB", product:"ColdFusion", quarter:"Q1", revenue:175, cost:20},
+ {customer:"BBB", product:"Flex", quarter:"Q2", revenue:210, cost:20},
+ {customer:"BBB", product:"Dreamweaver",quarter:"Q3", revenue:120, cost:120},
+ {customer:"BBB", product:"Flash", quarter:"Q4", revenue:310, cost:70},
+
+ {customer:"CCC", product:"ColdFusion", quarter:"Q1", revenue:385, cost:120},
+ {customer:"CCC", product:"Flex", quarter:"Q2", revenue:340, cost:120},
+ {customer:"CCC", product:"Dreamweaver", quarter:"Q3", revenue:470, cost:220},
+ {customer:"CCC", product:"Flash", quarter:"Q4", revenue:270, cost:170},
+
+ {customer:"AAA", product:"ColdFusion", quarter:"Q1", revenue:100, cost:25},
+ {customer:"AAA", product:"Flex", quarter:"Q2", revenue:150, cost:25},
+ {customer:"AAA", product:"Dreamweaver", quarter:"Q3", revenue:200, cost:125},
+ {customer:"AAA", product:"Flash", quarter:"Q4", revenue:300, cost:75},
+
+ {customer:"BBB", product:"ColdFusion", quarter:"Q2", revenue:175, cost:20},
+ {customer:"BBB", product:"Flex", quarter:"Q3", revenue:100, cost:20},
+ {customer:"BBB", product:"Dreamweaver", quarter:"Q4", revenue:270, cost:120},
+ {customer:"BBB", product:"Flash", quarter:"Q1", revenue:370, cost:70},
+
+ {customer:"CCC", product:"ColdFusion", quarter:"Q3", revenue:410, cost:120},
+ {customer:"CCC", product:"Flex", quarter:"Q4", revenue:300, cost:320},
+ {customer:"CCC", product:"Dreamweaver", quarter:"Q1", revenue:510, cost:220},
+ {customer:"CCC", product:"Flash", quarter:"Q2", revenue:620, cost:170},
+
+ {customer:"AAA", product:"ColdFusion", quarter:"Q4", revenue:215, cost:90},
+ {customer:"AAA", product:"Flex", quarter:"Q1", revenue:210, cost:90},
+ {customer:"AAA", product:"Dreamweaver", quarter:"Q2", revenue:175, cost:190},
+ {customer:"AAA", product:"Flash", quarter:"Q3", revenue:420, cost:75},
+
+ {customer:"BBB", product:"ColdFusion", quarter:"Q1", revenue:240, cost:20},
+ {customer:"BBB", product:"Flex", quarter:"Q2", revenue:100, cost:20},
+ {customer:"BBB", product:"Dreamweaver", quarter:"Q3", revenue:270, cost:120},
+ {customer:"BBB", product:"Flash", quarter:"Q4", revenue:370, cost:70},
+
+ {customer:"CCC", product:"ColdFusion", quarter:"Q1", revenue:375, cost:120},
+ {customer:"CCC", product:"Flex", quarter:"Q2", revenue:420, cost:120},
+ {customer:"CCC", product:"Dreamweaver", quarter:"Q3", revenue:680, cost:220},
+ {customer:"CCC", product:"Flash", quarter:"Q4", revenue:570, cost:170}
+ ]);
+
+ private function creationCompleteHandler():void {
+ // You must initialize the cube before you
+ // can execute a query on it.
+ myMXMLCube.refresh();
+ }
+
+ // Create the OLAP query.
+ private function getQuery(cube:IOLAPCube):IOLAPQuery {
+ // Create an instance of OLAPQuery to represent the query.
+ var query:OLAPQuery = new OLAPQuery;
+
+ // Get the row axis from the query instance.
+ var rowQueryAxis:IOLAPQueryAxis =
+ query.getAxis(OLAPQuery.ROW_AXIS);
+ // Create an OLAPSet instance to configure the axis.
+ var productSet:OLAPSet = new OLAPSet;
+ // Add the Product to the row to aggregate data
+ // by the Product dimension.
+ productSet.addElements(
+ cube.findDimension("ProductDim").findAttribute("Product").children);
+ // Add the OLAPSet instance to the axis.
+ rowQueryAxis.addSet(productSet);
+
+ // Get the column axis from the query instance, and configure it
+ // to aggregate the columns by the Quarter dimension.
+ var colQueryAxis:IOLAPQueryAxis =
+ query.getAxis(OLAPQuery.COLUMN_AXIS);
+ var quarterSet:OLAPSet= new OLAPSet;
+ quarterSet.addElements(
+ cube.findDimension("QuarterDim").findAttribute("Quarter").children);
+ colQueryAxis.addSet(quarterSet);
+
+ return query;
+ }
+
+ // Event handler to execute the OLAP query
+ // after the cube completes initialization.
+ private function runQuery(event:CubeEvent):void {
+ // Get cube.
+ var cube:IOLAPCube = IOLAPCube(event.currentTarget);
+ // Create a query instance.
+ var query:IOLAPQuery = getQuery(cube);
+ // Execute the query.
+ var token:AsyncToken = cube.execute(query);
+ // Setup handlers for the query results.
+ token.addResponder(new AsyncResponder(showResult, showFault));
+ }
+
+ // Handle a query fault.
+ private function showFault(result:Object, token:Object):void {
+ Alert.show("Error in query.");
+ }
+
+ // Handle a successful query by passing the query results to
+ // the OLAPDataGrid control..
+ private function showResult(result:Object, token:Object):void {
+ if (!result) {
+ Alert.show("No results from query.");
+ return;
+ }
+ myOLAPDG.dataProvider= result as OLAPResult;
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <mx:OLAPCube name="FlatSchemaCube" dataProvider="{flatData}" id="myMXMLCube" complete="runQuery(event);">
+ <mx:OLAPDimension name="CustomerDim">
+ <mx:OLAPAttribute name="Customer" dataField="customer"/>
+ <mx:OLAPHierarchy name="CustomerHier" hasAll="true">
+ <mx:OLAPLevel attributeName="Customer"/>
+ </mx:OLAPHierarchy>
+ </mx:OLAPDimension>
+
+ <mx:OLAPDimension name="ProductDim">
+ <mx:OLAPAttribute name="Product" dataField="product"/>
+ <mx:OLAPHierarchy name="ProductHier" hasAll="true">
+ <mx:OLAPLevel attributeName="Product"/>
+ </mx:OLAPHierarchy>
+ </mx:OLAPDimension>
+
+ <mx:OLAPDimension name="QuarterDim">
+ <mx:OLAPAttribute name="Quarter" dataField="quarter"/>
+ <mx:OLAPHierarchy name="QuarterHier" hasAll="true">
+ <mx:OLAPLevel attributeName="Quarter"/>
+ </mx:OLAPHierarchy>
+ </mx:OLAPDimension>
+
+ <mx:OLAPMeasure name="Revenue"
+ dataField="revenue"
+ aggregator="SUM"/>
+ </mx:OLAPCube>
+ </fx:Declarations>
+
+
+
+ <s:Panel title="OLAPDataGrid Control" color="0x000000"
+ borderAlpha="0.15"
+ width="600">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:OLAPDataGrid id="myOLAPDG" color="0x323232" width="100%" height="100%"/>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/PopupButtonExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/PopupButtonExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/controls/PopupButtonExample.mxml
new file mode 100644
index 0000000..21aff16
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/controls/PopupButtonExample.mxml
@@ -0,0 +1,83 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.controls.*;
+ import mx.events.*;
+ import mx.controls.Alert;
+
+ private var myMenu:Menu;
+
+ // Initialize the Menu control, and specify it as the pop up object
+ // of the PopUpButton control.
+ private function initMenu():void {
+ myMenu = new Menu();
+ var dp:Object = [{label: "New Folder"}, {label: "Sent Items"}, {label: "Inbox"}];
+ myMenu.dataProvider = dp;
+ myMenu.selectedIndex = 0;
+ myMenu.addEventListener("itemClick", itemClickHandler);
+ popB.popUp = myMenu;
+ popB.label = "Put in: " + myMenu.dataProvider[myMenu.selectedIndex].label;
+ }
+
+ // Define the event listener for the Menu control's itemClick event.
+ private function itemClickHandler(event:MenuEvent):void {
+ var label:String = event.item.label;
+ popTypeB.text=String("Moved to " + label);
+ popB.label = "Put in: " + label;
+ popB.close();
+ myMenu.selectedIndex = event.index;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="PopUpButton Control" color="0x000000"
+ borderAlpha="0.15"
+ width="600">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:Label width="100%" color="0x323232"
+ text="Button label contains the name of the last selected menu item." />
+ <mx:PopUpButton id="popB" label="Edit" creationComplete="initMenu();" width="140" color="0x323232" click="{Alert.show('Action: ' + popB.label);}" />
+
+ <mx:Spacer height="65" />
+
+ <s:TextInput id="popTypeB" color="0x323232" text="...waiting" />
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/ProgressBarExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/ProgressBarExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/controls/ProgressBarExample.mxml
new file mode 100644
index 0000000..4a442a9
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/controls/ProgressBarExample.mxml
@@ -0,0 +1,72 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ private var j:uint=10;
+
+ // Event handler function to set the value of the
+ // ProgressBar control.
+ private function runit():void
+ {
+ if(j<=100)
+ {
+ bar.setProgress(j,100);
+ bar.label= "CurrentProgress" + " " + j + "%";
+ j+=10;
+ }
+ if(j>100)
+ {
+ j=0;
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="ProgressBar Control" color="0x000000"
+ borderAlpha="0.15"
+ width="600">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:Label width="100%" color="0x323232"
+ text="Click the button to increment the progress bar." />
+ <s:Button id="Speed" label="Run" click="runit();" color="0x323232"/>
+
+ <mx:ProgressBar id="bar" labelPlacement="bottom" minimum="0" visible="true" maximum="100"
+ color="0x323232" label="CurrentProgress 0%" direction="right" mode="manual" width="100%"/>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/assets/arrow_icon.png
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/assets/arrow_icon.png b/TourDeFlex/TourDeFlex3/src/spark/controls/assets/arrow_icon.png
new file mode 100644
index 0000000..9ac6331
Binary files /dev/null and b/TourDeFlex/TourDeFlex3/src/spark/controls/assets/arrow_icon.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/controls/assets/arrow_icon_sm.png
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/controls/assets/arrow_icon_sm.png b/TourDeFlex/TourDeFlex3/src/spark/controls/assets/arrow_icon_sm.png
new file mode 100644
index 0000000..33debc8
Binary files /dev/null and b/TourDeFlex/TourDeFlex3/src/spark/controls/assets/arrow_icon_sm.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/events/EventExample1.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/events/EventExample1.mxml b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample1.mxml
new file mode 100644
index 0000000..b1b5403
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample1.mxml
@@ -0,0 +1,53 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="Handling Events - Inline property Sample"
+ width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <!-- Handling Events - Inline Property -->
+
+ <s:Button label="click me" click="Alert.show('clicked!')"/>
+
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/events/EventExample2.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/events/EventExample2.mxml b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample2.mxml
new file mode 100644
index 0000000..5448411
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample2.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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="Handling Events - Inline Block Sample"
+ width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <!-- Handling Events - Inline Block -->
+
+ <s:Button id="b" label="click me once">
+ <s:click>
+ b.enabled = false;
+ mx.controls.Alert.show('clicked!');
+ </s:click>
+ </s:Button>
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/events/EventExample3.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/events/EventExample3.mxml b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample3.mxml
new file mode 100644
index 0000000..dc23a5d
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample3.mxml
@@ -0,0 +1,58 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+
+ private function handleClick(event:MouseEvent):void
+ {
+ b.enabled = false;
+ mx.controls.Alert.show('clicked!');
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="Handling Events - Function Sample"
+ width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <!-- Handling Events - Function -->
+
+ <s:Button id="b" label="click me once" click="handleClick(event)"/>
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/events/EventExample4.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/events/EventExample4.mxml b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample4.mxml
new file mode 100644
index 0000000..52c7628
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample4.mxml
@@ -0,0 +1,64 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+
+ private function handleClick(event:MouseEvent):void
+ {
+ b.enabled = false;
+ mx.controls.Alert.show('clicked!');
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="Handling Events - Function with addEventListener Sample"
+ width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+
+ <!-- Handling Events - Function with addEventListener -->
+
+ <s:Button id="b" label="click me once">
+ <s:creationComplete>
+ b.addEventListener(MouseEvent.CLICK, handleClick);
+ </s:creationComplete>
+ </s:Button>
+
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/events/EventExample5.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/events/EventExample5.mxml b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample5.mxml
new file mode 100644
index 0000000..4bd5339
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample5.mxml
@@ -0,0 +1,58 @@
+<?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:Application 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:local="*"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+
+ <!-- Dispatching an Event -->
+ <local:FiveSecondTrigger triggered="Alert.show('five second event triggered')"/>
+ </fx:Declarations>
+
+ <s:Panel title="Dispatching Events Sample"
+ width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:Label text="wait 5 seconds" color="0x000000"/>
+
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/events/EventExample6.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/events/EventExample6.mxml b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample6.mxml
new file mode 100644
index 0000000..2da53d0
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/events/EventExample6.mxml
@@ -0,0 +1,59 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="Dispatching Custom Events Sample"
+ width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:VerticalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <!-- Dispatching a Custom Event -->
+
+ <s:initialize>
+ addEventListener(MyEvent.TRIGGERED, function(event:MyEvent):void {
+ mx.controls.Alert.show('event handled!');
+ });
+ </s:initialize>
+
+ <s:Button label="fire the event!" click="dispatchEvent(new MyEvent(MyEvent.TRIGGERED))"/>
+
+ </s:Panel>
+
+</s:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/events/FiveSecondTrigger.as
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/events/FiveSecondTrigger.as b/TourDeFlex/TourDeFlex3/src/spark/events/FiveSecondTrigger.as
new file mode 100644
index 0000000..7c562d4
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/events/FiveSecondTrigger.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 flash.events.Event;
+ import flash.events.EventDispatcher;
+ import flash.events.TimerEvent;
+ import flash.utils.Timer;
+
+ [Event(name="triggered")]
+
+ public class FiveSecondTrigger extends EventDispatcher
+ {
+ public function FiveSecondTrigger()
+ {
+ var t:Timer = new Timer(5000, 1);
+ t.addEventListener(TimerEvent.TIMER, handleTimer);
+ t.start();
+ }
+
+ private function handleTimer(event:TimerEvent):void
+ {
+ var e:Event = new Event("triggered");
+ dispatchEvent(e);
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/events/MyEvent.as
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/events/MyEvent.as b/TourDeFlex/TourDeFlex3/src/spark/events/MyEvent.as
new file mode 100644
index 0000000..28b176c
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/events/MyEvent.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 mx.events.FlexEvent;
+
+ public class MyEvent extends FlexEvent
+ {
+ public static const TRIGGERED:String = "triggered";
+
+ public function MyEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
+ {
+ super(type, bubbles, cancelable);
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/events/TDFGradientBackgroundSkin.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/events/TDFGradientBackgroundSkin.mxml b/TourDeFlex/TourDeFlex3/src/spark/events/TDFGradientBackgroundSkin.mxml
new file mode 100644
index 0000000..553aee3
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/events/TDFGradientBackgroundSkin.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.
+
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:s="library://ns.adobe.com/flex/spark">
+
+ <fx:Metadata>
+ [HostComponent("spark.components.Application")]
+ </fx:Metadata>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <s:layout>
+ <s:BasicLayout />
+ </s:layout>
+
+ <s:Rect id="bg" width="100%" height="100%">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:entries>
+ <s:GradientEntry color="0x000000" ratio="0.00" />
+ <s:GradientEntry color="0x323232" ratio="1.0" />
+ </s:entries>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" />
+</s:SparkSkin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/formatters/DateFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/formatters/DateFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/formatters/DateFormatterExample.mxml
new file mode 100644
index 0000000..77ca8ee
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/formatters/DateFormatterExample.mxml
@@ -0,0 +1,83 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ValidationResultEvent;
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = dateVal.validate();
+ if (vResult.type==ValidationResultEvent.VALID) {
+ formattedDate.text=dateFormatter.format(dob.text);
+ }
+
+ else {
+ formattedDate.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <mx:DateFormatter id="dateFormatter" formatString="month: MM, day: DD, year: YYYY"/>
+
+ <mx:DateValidator id="dateVal" source="{dob}" property="text" inputFormat="mm/dd/yyyy"/>
+ </fx:Declarations>
+
+
+ <s:Panel title="DateFormatter Example" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:Form width="100%" color="0x323232">
+ <mx:FormItem label="Enter date (mm/dd/yyyy):" width="100%">
+ <s:TextInput id="dob" text=""/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted date: " width="100%">
+ <s:Label id="formattedDate" text="" />
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <s:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </s:Panel>
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/formatters/NumberFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/formatters/NumberFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/formatters/NumberFormatterExample.mxml
new file mode 100644
index 0000000..62f5bda
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/formatters/NumberFormatterExample.mxml
@@ -0,0 +1,83 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ // Event handler to format the input.
+ private function Format():void
+ {
+ // The format() method returns the formatted String,
+ // or an empty String if there is an error.
+ var formattedVal:String = numberFormatter.format(inputVal.text);
+
+ if (formattedVal.length==0) {
+ // If there is an error, the Format.error property
+ // contains the reason.
+ formattedNumber.text=numberFormatter.error;
+ }
+
+ else {
+ formattedNumber.text=formattedVal;
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <mx:NumberFormatter id="numberFormatter" />
+ </fx:Declarations>
+
+ <s:Panel title="Formatter Example" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:Form color="0x323232">
+ <mx:FormItem label="Enter number - a letter is invalid:">
+ <s:TextInput id="inputVal" text="" width="75%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted number: ">
+ <s:Label id="formattedNumber" />
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <s:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/formatters/PhoneFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/formatters/PhoneFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/spark/formatters/PhoneFormatterExample.mxml
new file mode 100644
index 0000000..e0f35ab
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/formatters/PhoneFormatterExample.mxml
@@ -0,0 +1,83 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin"
+ viewSourceURL="srcview/index.html">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ValidationResultEvent;
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = pnVal.validate();
+ if (vResult.type==ValidationResultEvent.VALID) {
+ formattedPhone.text= phoneFormatter.format(phone.text);
+ }
+
+ else {
+ formattedPhone.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Declarations>
+ <mx:PhoneFormatter id="phoneFormatter" formatString="(###) ###-####" validPatternChars="#-() "/>
+
+ <mx:PhoneNumberValidator id="pnVal" source="{phone}" property="text" allowedFormatChars=""/>
+ </fx:Declarations>
+
+ <s:Panel title="PhoneNumberValidator Example" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:Form color="0x323232">
+ <mx:FormItem label="Enter a 10-digit phone number:">
+ <s:TextInput id="phone" text="" width="75%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted phone number: ">
+ <s:Label id="formattedPhone" text="" />
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <s:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/modules/Module1.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/modules/Module1.mxml b/TourDeFlex/TourDeFlex3/src/spark/modules/Module1.mxml
new file mode 100644
index 0000000..5813025
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/modules/Module1.mxml
@@ -0,0 +1,24 @@
+<?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">
+
+ <mx:Label text="this is module 1"/>
+
+</mx:Module>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f5d071b3/TourDeFlex/TourDeFlex3/src/spark/modules/Module2.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/spark/modules/Module2.mxml b/TourDeFlex/TourDeFlex3/src/spark/modules/Module2.mxml
new file mode 100644
index 0000000..5cc2047
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/spark/modules/Module2.mxml
@@ -0,0 +1,24 @@
+<?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">
+
+ <mx:Label text="this is module 2"/>
+
+</mx:Module>
\ No newline at end of file