TDF with modules where possible
diff --git a/tourdeflexmodules/README b/tourdeflexmodules/README
new file mode 100644
index 0000000..695b151
--- /dev/null
+++ b/tourdeflexmodules/README
@@ -0,0 +1,80 @@
+
+ The Apache Flex Tour De Flex component explorer provides a sample set of working
+ Apache Flex examples.
+
+ This application is based on work donated by Adobe and their component explorer and is
+ expected to be updated over time.
+
+
+==========================================================================================
+Initial Setup Required
+==========================================================================================
+
+ The environment variable FLEX_HOME needs to be set to the absolute path of the Apache
+ Flex SDK. If you prefer you can set this in env.properties.
+
+==========================================================================================
+How to build Tour De Flex using ant (no IDE is required)
+==========================================================================================
+
+1. On Linux or Mac un tar/gzip the source distribution:
+ tar -zxvf apache-flex-tour-de-flex-component-explorer-1.2.tar.gz
+ Or if on windows unzip
+ apache-flex-tour-de-flex-component-explorer-1.2.zip
+
+2. In the base directory, run:
+ ant compile
+
+3. To optionally create a release source package, run:
+ ant package
+
+4. Open explorer.html in your browser of choice.
+
+Note Some browsers (such as Chrome) may not be able to view local content without further
+configuration.
+
+5. To remove all of the compiled swfs:
+ ant clean
+
+==========================================================================================
+Some other useful ant targets
+==========================================================================================
+
+There are several other useful ant targets. Note that compile-shell is required if you want
+changes to explorer.xml to take effect.
+
+ compile-shell compile explorer shell
+ compile-mx compile mx examples
+ compile-spark compile first set of spark examples
+ compile-spark2 compile second set of spark examples
+ compile-spark3 compile third set of spark examples
+ compile-apache compile apache examples
+ compile-squiggly compile apache squiggly examples
+ package-tar tar up all source files
+ package-zip zip up all source files
+
+==========================================================================================
+Compiling a single example
+==========================================================================================
+
+Most of the examples can be compiled by hand with mxmlc. For example:
+
+ mxmlc ./src/spark/controls/ListExample.mxml
+
+==========================================================================================
+How to check the code out of Git
+==========================================================================================
+
+1. Check out the the code from the Apache Flex utilities project
+ git clone https://git-wip-us.apache.org/repos/asf/flex-utilities.git flex-utilities
+ cd flex-utilities
+ git checkout develop
+
+2. Change directory to:
+ cd TourDeFlex/TourDeFlex3
+
+
+Thanks for using Apache Flex. Enjoy!
+
+ The Apache Flex Project
+ <http://flex.apache.org>
diff --git a/tourdeflexmodules/RELEASE_NOTES b/tourdeflexmodules/RELEASE_NOTES
new file mode 100644
index 0000000..a8faa5f
--- /dev/null
+++ b/tourdeflexmodules/RELEASE_NOTES
@@ -0,0 +1,68 @@
+------------------------------------------------
+Apache Flex Tour De Flex Component Explorer 1.2
+------------------------------------------------
+
+Apache Flex Tour De Flex 1.2 is an update to 1.1 adding a few minor improvements.
+
+Changes since the version 1.1
+- Added welcome page
+- Added support for 3rd party examples
+- Changed examples look and feel to be more consistent
+- Added Squiggly spelling engine examples
+
+Known issues:
+- Callout example in the Apache Flex 4.9 examples fails to show the callout.
+ The sample code will work externally. See FLEX-34539 for details.
+
+Bugs fixed and improvements:
+FLEX-34505 Add squiggly example to Tour De Flex
+FLEX-34501 Allow 3rd parties to provide examples for inclusion in TourDeFlex
+FLEX-34596 Tour De Flex linking is broken
+FLEX-34493 Loading bar not centered in panel
+FLEX-34485 Improve TourDeFlex consistency and design
+
+------------------------------------------------
+Apache Flex Tour De Flex Component Explorer 1.1
+------------------------------------------------
+
+Apache Flex Tour De Flex 1.1 is an update to 1.0 adding a few improvements and
+fixing a few broken and non working examples.
+
+Changes since the version 1.0
+- Update README and RELEASE_NOTES
+- Added some Apache Flex specific examples (we would like to see more)
+- Added button to copy code in source tab
+- Added button to link to github code
+- Added button to copy link to example
+- Improved build file ant tasks descriptions
+- Removed broken view source URLs
+- Fixed a few other minor issues
+- Now contains over 300 examples!
+
+Known issues:
+- Callout example in the Apache Flex 4.9 examples fails to show the callout.
+ The sample code will work externally. See FLEX-34539 for details.
+
+Bugs fixed and improvements:
+FLEX-34530 TDF ScrollBarExample not setting up default vertical scroll and 2 warnings
+FLEX-34529 TDF Bidirectional binding example label/warning
+FLEX-34502 Add link to github in TourDeFlex
+FLEX-34500 Show total number of examples in Tour De Flex UI
+FLEX-34495 Error loading source file
+FLEX-34492 Need ability to link to examples
+FLEX-34491 The Spark Module Load example is non functional
+FLEX-34490 The Spark Video example produces a "Playback Error"
+FLEX-34489 Some examples are missing all source files tab
+FLEX-34488 Add favicon to TourDeFlex
+FLEX-34483 Make logo links to Apache Flex web site
+FLEX-34482 Add copy button to copy code examples to clipboard
+FLEX-34480 If TourDeFlex is run from an untrusted location you get an error
+FLEX-34479 Change naming format of TourDeFlex
+FLEX-34478 Wrong paths for video in TourDeFlex application
+FLEX-34474 TourDeFlex effects example bad styles and modifying default destination scaling
+
+------------------------------------------------
+Apache Flex Tour De Flex Component Explorer 1.0
+------------------------------------------------
+
+Initial parity release for Adobe's Tour De Flex Component Explorer.
\ No newline at end of file
diff --git a/tourdeflexmodules/build.xml b/tourdeflexmodules/build.xml
new file mode 100644
index 0000000..876a68f
--- /dev/null
+++ b/tourdeflexmodules/build.xml
@@ -0,0 +1,524 @@
+<?xml version="1.0" ?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project name="TourDeFlex" default="compile" basedir=".">
+
+ <property file="${basedir}/env.properties"/>
+ <property environment="env"/>
+ <property file="${basedir}/local.properties"/>
+ <property file="${basedir}/build.properties"/>
+ <condition property="FLEX_HOME" value="${env.FLEX_HOME}">
+ <isset property="env.FLEX_HOME" />
+ </condition>
+ <property name="version" value="1.2" />
+
+ <!-- additional tasks - mxmlc tag -->
+ <path id="flexTasks.path">
+ <fileset dir="${FLEX_HOME}">
+ <include name="lib/flexTasks.jar" />
+ <include name="ant/lib/flexTasks.jar" />
+ </fileset>
+ </path>
+ <taskdef resource="flexTasks.tasks" classpathref="flexTasks.path"/>
+
+ <macrodef name="compile-mxml">
+ <attribute name="example"/>
+
+ <sequential>
+ <mxmlc file="${basedir}/src/@{example}.mxml"
+ output="${basedir}/src/@{example}.swf" fork="true" failonerror="true">
+ <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
+ </mxmlc>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="compile-mxml-locales">
+ <attribute name="example"/>
+ <attribute name="locales" default="en_US"/>
+
+ <sequential>
+ <mxmlc file="${basedir}/src/@{example}.mxml"
+ output="${basedir}/src/@{example}.swf" fork="true" failonerror="true">
+ <locale>en_US</locale>
+ <locale>en_AU</locale>
+ <locale>en_GB</locale>
+ <locale>en_CA</locale>
+ <locale>el_GR</locale>
+ <locale>de_CH</locale>
+ <locale>pt_PT</locale>
+ <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
+ </mxmlc>
+ </sequential>
+ </macrodef>
+
+ <target name="compile" description="compile all examples and the explorer shell" depends="compile-shell,compile-mx,compile-spark,compile-spark2,compile-spark3,compile-apache">
+ </target>
+
+ <target name="compile-shell" description="compile explorer shell">
+ <compile-mxml example="/explorer"/>
+ <compile-mxml-locales example="/loaderPanel"/>
+ <compile-mxml example="/SourceTab"/>
+ <compile-mxml example="/Welcome"/>
+ </target>
+
+ <target name="compile-mx" description="compile mx examples">
+ <compile-mxml example="/mx/charts/BubbleChartExample"/>
+ <compile-mxml example="/mx/charts/CandlestickChartExample"/>
+ <compile-mxml example="/mx/charts/Column_BarChartExample"/>
+ <compile-mxml example="/mx/charts/DateTimeAxisExample"/>
+ <compile-mxml example="/mx/charts/GridLinesExample"/>
+ <compile-mxml example="/mx/charts/HLOCChartExample"/>
+ <compile-mxml example="/mx/charts/Line_AreaChartExample"/>
+ <compile-mxml example="/mx/charts/LogAxisExample"/>
+ <compile-mxml example="/mx/charts/PieChartExample"/>
+ <compile-mxml example="/mx/charts/PlotChartExample"/>
+ <compile-mxml example="/mx/charts/SeriesInterpolateExample"/>
+ <compile-mxml example="/mx/charts/SeriesSlideExample"/>
+ <compile-mxml example="/mx/charts/SeriesZoomExample"/>
+ <compile-mxml example="/mx/containers/AccordionExample"/>
+ <compile-mxml example="/mx/containers/DividedBoxExample"/>
+ <compile-mxml example="/mx/containers/FormExample"/>
+ <compile-mxml example="/mx/containers/GridLayoutExample"/>
+ <compile-mxml example="/mx/containers/HBoxExample"/>
+ <compile-mxml example="/mx/containers/HDividedBoxExample"/>
+ <compile-mxml example="/mx/containers/SimpleApplicationControlBarExample"/>
+ <compile-mxml example="/mx/containers/SimpleBoxExample"/>
+ <compile-mxml example="/mx/containers/SimpleCanvasExample"/>
+ <compile-mxml example="/mx/containers/SimpleControlBarExample"/>
+ <compile-mxml example="/mx/containers/SimplePanelExample"/>
+ <compile-mxml example="/mx/containers/SimpleTitleWindowExample"/>
+ <compile-mxml example="/mx/containers/TabNavigatorExample"/>
+ <compile-mxml example="/mx/containers/TileLayoutExample"/>
+ <compile-mxml example="/mx/containers/TitleWindowApp"/>
+ <compile-mxml example="/mx/containers/VBoxExample"/>
+ <compile-mxml example="/mx/containers/VDividedBoxExample"/>
+ <compile-mxml example="/mx/containers/ViewStackExample"/>
+ <compile-mxml example="/mx/controls/AdvancedDataGridExample"/>
+ <compile-mxml example="/mx/controls/ButtonBarExample"/>
+ <compile-mxml example="/mx/controls/ButtonExample"/>
+ <compile-mxml example="/mx/controls/CheckBoxExample"/>
+ <compile-mxml example="/mx/controls/ColorPickerExample"/>
+ <compile-mxml example="/mx/controls/DateChooserExample"/>
+ <compile-mxml example="/mx/controls/DateFieldExample"/>
+ <compile-mxml example="/mx/controls/HorizontalListExample"/>
+ <compile-mxml example="/mx/controls/HScrollBarExample"/>
+ <compile-mxml example="/mx/controls/LabelExample"/>
+ <compile-mxml example="/mx/controls/LinkBarExample"/>
+ <compile-mxml example="/mx/controls/LinkButtonExample"/>
+ <compile-mxml example="/mx/controls/Local"/>
+ <compile-mxml example="/mx/controls/MenuBarExample"/>
+ <compile-mxml example="/mx/controls/NumericStepperExample"/>
+ <compile-mxml example="/mx/controls/OLAPDataGridExample"/>
+ <compile-mxml example="/mx/controls/PopUpButtonExample"/>
+ <compile-mxml example="/mx/controls/PopUpButtonMenuExample"/>
+ <compile-mxml example="/mx/controls/RadioButtonExample"/>
+ <compile-mxml example="/mx/controls/RadioButtonGroupExample"/>
+ <compile-mxml example="/mx/controls/RichTextEditorExample"/>
+ <compile-mxml example="/mx/controls/SimpleAlert"/>
+ <compile-mxml example="/mx/controls/SimpleComboBox"/>
+ <compile-mxml example="/mx/controls/SimpleDataGrid"/>
+ <compile-mxml example="/mx/controls/SimpleHRule"/>
+ <compile-mxml example="/mx/controls/SimpleImage"/>
+ <compile-mxml example="/mx/controls/SimpleImageHSlider"/>
+ <compile-mxml example="/mx/controls/SimpleImageVSlider"/>
+ <compile-mxml example="/mx/controls/SimpleList"/>
+ <compile-mxml example="/mx/controls/SimpleLoader"/>
+ <compile-mxml example="/mx/controls/SimpleMenuExample"/>
+ <compile-mxml example="/mx/controls/SimpleProgressBar"/>
+ <compile-mxml example="/mx/controls/SimpleVRule"/>
+ <compile-mxml example="/mx/controls/SpacerExample"/>
+ <compile-mxml example="/mx/controls/TabBarExample"/>
+ <compile-mxml example="/mx/controls/TextAreaExample"/>
+ <compile-mxml example="/mx/controls/TextExample"/>
+ <compile-mxml example="/mx/controls/TextInputExample"/>
+ <compile-mxml example="/mx/controls/TileListExample"/>
+ <compile-mxml example="/mx/controls/ToggleButtonBarExample"/>
+ <compile-mxml example="/mx/controls/TreeExample"/>
+ <compile-mxml example="/mx/controls/VideoDisplayExample"/>
+ <compile-mxml example="/mx/controls/VScrollBarExample"/>
+ <compile-mxml example="/mx/core/RepeaterExample"/>
+ <compile-mxml example="/mx/core/SimpleApplicationExample"/>
+ <compile-mxml example="/mx/effects/AddItemActionEffectExample"/>
+ <compile-mxml example="/mx/effects/AnimatePropertyEffectExample"/>
+ <compile-mxml example="/mx/effects/BlurEffectExample"/>
+ <compile-mxml example="/mx/effects/CompositeEffectExample"/>
+ <compile-mxml example="/mx/effects/DefaultListEffectExample"/>
+ <compile-mxml example="/mx/effects/DefaultTileListEffectExample"/>
+ <compile-mxml example="/mx/effects/DissolveEffectExample"/>
+ <compile-mxml example="/mx/effects/FadeEffectExample"/>
+ <compile-mxml example="/mx/effects/GlowEffectExample"/>
+ <compile-mxml example="/mx/effects/IrisEffectExample"/>
+ <compile-mxml example="/mx/effects/MoveEffectExample"/>
+ <compile-mxml example="/mx/effects/ParallelEffectExample"/>
+ <compile-mxml example="/mx/effects/PauseEffectExample"/>
+ <compile-mxml example="/mx/effects/ResizeEffectExample"/>
+ <compile-mxml example="/mx/effects/RotateEffectExample"/>
+ <compile-mxml example="/mx/effects/SequenceEffectExample"/>
+ <compile-mxml example="/mx/effects/SimpleEffectExample"/>
+ <compile-mxml example="/mx/effects/SimpleTweenEffectExample"/>
+ <compile-mxml example="/mx/effects/SoundEffectExample"/>
+ <compile-mxml example="/mx/effects/WipeDownExample"/>
+ <compile-mxml example="/mx/effects/WipeLeftExample"/>
+ <compile-mxml example="/mx/effects/WipeRightExample"/>
+ <compile-mxml example="/mx/effects/WipeUpExample"/>
+ <compile-mxml example="/mx/effects/ZoomEffectExample"/>
+ <compile-mxml example="/mx/formatters/CurrencyFormatterExample"/>
+ <compile-mxml example="/mx/formatters/DateFormatterExample"/>
+ <compile-mxml example="/mx/formatters/NumberFormatterExample"/>
+ <compile-mxml example="/mx/formatters/PhoneFormatterExample"/>
+ <compile-mxml example="/mx/formatters/SimpleFormatterExample"/>
+ <compile-mxml example="/mx/formatters/SwitchSymbolFormatterExample"/>
+ <compile-mxml example="/mx/formatters/ZipCodeFormatterExample"/>
+ <compile-mxml example="/mx/printing/AdvancedPrintDataGridExample"/>
+ <compile-mxml example="/mx/printing/FormPrintFooter"/>
+ <compile-mxml example="/mx/printing/FormPrintHeader"/>
+ <compile-mxml example="/mx/printing/FormPrintView"/>
+ <compile-mxml example="/mx/printing/PrintDataGridExample"/>
+ <compile-mxml example="/mx/states/StatesExample"/>
+ <compile-mxml example="/mx/states/TransitionExample"/>
+ <compile-mxml example="/mx/validators/CreditCardValidatorExample"/>
+ <compile-mxml example="/mx/validators/CurrencyValidatorExample"/>
+ <compile-mxml example="/mx/validators/DateValidatorExample"/>
+ <compile-mxml example="/mx/validators/EmailValidatorExample"/>
+ <compile-mxml example="/mx/validators/NumberValidatorExample"/>
+ <compile-mxml example="/mx/validators/PhoneNumberValidatorExample"/>
+ <compile-mxml example="/mx/validators/RegExValidatorExample"/>
+ <compile-mxml example="/mx/validators/SimpleValidatorExample"/>
+ <compile-mxml example="/mx/validators/SocialSecurityValidatorExample"/>
+ <compile-mxml example="/mx/validators/StringValidatorExample"/>
+ <compile-mxml example="/mx/validators/ZipCodeValidatorExample"/>
+ </target>
+
+ <target name="compile-spark" description="compile first set of spark examples">
+ <compile-mxml example="/spark/controls/AccordionExample"/>
+ <compile-mxml example="/spark/controls/AdvancedDatagridExample"/>
+ <compile-mxml example="/spark/controls/ColorPickerExample"/>
+ <compile-mxml example="/spark/controls/ComboBoxExample"/>
+ <compile-mxml example="/spark/controls/DataGridExample"/>
+ <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"/>
+ <!-- Currently broken <compile-mxml example="/spark/controls/SWFLoaderExample"/> -->
+ <compile-mxml example="/spark/controls/TitleWindowExample"/>
+ <compile-mxml example="/spark/controls/ToggleButtonBarExample"/>
+ <compile-mxml example="/spark/controls/ToolTipExample"/>
+ <compile-mxml example="/spark/controls/TreeExample"/>
+ <compile-mxml example="/spark/controls/ViewStackExample"/>
+ <compile-mxml example="/spark/controls/TextAreaExample"/>
+ <compile-mxml example="/spark/controls/TextInputExample"/>
+ <compile-mxml example="/spark/controls/TextLayout1Example"/>
+ <compile-mxml example="/spark/controls/TextLayout2Example"/>
+ <compile-mxml example="/spark/controls/TextLayout3Example"/>
+ <compile-mxml example="/spark/controls/TextLayout4Example"/>
+ <compile-mxml example="/spark/controls/VideoDisplayExample"/>
+
+ <compile-mxml example="/spark/css/CSSDescendantSelectorExample"/>
+ <compile-mxml example="/spark/css/CSSTypeClassSelectorExample"/>
+
+ <compile-mxml example="/spark/layouts/CustomLayoutAnimatedExample"/>
+ <compile-mxml example="/spark/layouts/CustomLayoutFlickrWheelExample"/>
+ <compile-mxml example="/spark/layouts/CustomLayoutFlowExample"/>
+ <compile-mxml example="/spark/layouts/CustomLayoutHBaselineExample"/>
+
+ <compile-mxml example="/spark/itemRenderers/ItemRenderer1Example"/>
+ <compile-mxml example="/spark/itemRenderers/ItemRenderer2Example"/>
+
+ <compile-mxml example="/spark/fxg/BitmapImageExample"/>
+ <compile-mxml example="/spark/fxg/EclipseExample"/>
+ <compile-mxml example="/spark/fxg/LineExample"/>
+ <compile-mxml example="/spark/fxg/RectExample"/>
+ <compile-mxml example="/spark/fxg/RichTextExample"/>
+
+ <compile-mxml example="/spark/containers/SampleHGroup"/>
+ <compile-mxml example="/spark/containers/SampleVGroup"/>
+ <compile-mxml example="/spark/containers/SampleVerticalHorizontalAlign"/>
+ <compile-mxml example="/spark/containers/SkinnableDataContainerExample"/>
+ <compile-mxml example="/spark/containers/TileGroupExample"/>
+
+ <compile-mxml example="/spark/effects/Move3DExample"/>
+ <compile-mxml example="/spark/effects/WipeExample"/>
+
+ <compile-mxml example="/spark/charts/AreaChartExample"/>
+ <compile-mxml example="/spark/charts/BarChartExample"/>
+ <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/charts/SeriesInterpolateExample"/>
+ <compile-mxml example="/spark/charts/SeriesSlideExample"/>
+ <compile-mxml example="/spark/charts/SeriesZoomExample"/>
+
+ <compile-mxml example="/spark/components/SearchExample"/>
+ <compile-mxml example="/spark/components/VideoPlayerExample"/>
+
+ <compile-mxml example="/spark/validators/CreditCardValidatorExample"/>
+ <compile-mxml example="/spark/validators/CurrencyValidatorExample"/>
+ <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/validators/SocialSecurityValidatorExample"/>
+ <compile-mxml example="/spark/validators/StringValidatorExample"/>
+ <compile-mxml example="/spark/validators/FormValidatorExample"/>
+ <compile-mxml example="/spark/validators/ZipCodeValidatorExample"/>
+
+ <compile-mxml example="/spark/formatters/CurrencyFormatterExample"/>
+ <compile-mxml example="/spark/formatters/DateFormatterExample"/>
+ <compile-mxml example="/spark/formatters/NumberFormatterExample"/>
+ <compile-mxml example="/spark/formatters/PhoneFormatterExample"/>
+ <compile-mxml example="/spark/formatters/SwitchFormatterExample"/>
+ <compile-mxml example="/spark/formatters/ZipCodeFormatterExample"/>
+
+ <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/other/RepeaterExample"/>
+ <compile-mxml example="/spark/other/ScrollBarsExample"/>
+
+ <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"/>
+
+ <!-- currently broken <compile-mxml example="/spark/tlf/TextLayoutEditorSample"/> -->
+ </target>
+
+ <target name="compile-spark2" description="compile second set of spark examples">
+ <compile-mxml example="/spark/i18n/SparkCollatorExample"/>
+ <compile-mxml example="/spark/i18n/SparkCollator2Example"/>
+ <compile-mxml example="/spark/i18n/SparkCurrencyValidatorExample"/>
+ <compile-mxml example="/spark/i18n/SparkCurrencyValidator2Example"/>
+ <compile-mxml example="/spark/i18n/SparkNumberValidatorExample"/>
+ <compile-mxml example="/spark/i18n/SparkNumberValidator2Example"/>
+ <compile-mxml example="/spark/i18n/SparkDateTimeFormatterExample"/>
+ <compile-mxml example="/spark/i18n/SparkDateTimeFormatter2Example"/>
+ <compile-mxml example="/spark/i18n/SparkCurrencyFormatterExample"/>
+ <compile-mxml example="/spark/i18n/SparkCurrencyFormatter2Example"/>
+ <compile-mxml example="/spark/i18n/SparkNumberFormatterExample"/>
+ <compile-mxml example="/spark/i18n/SparkNumberFormatter2Example"/>
+ <compile-mxml example="/spark/i18n/SparkSortandSortFieldExample"/>
+ <compile-mxml example="/spark/i18n/SparkSortandSortField2Example"/>
+ <compile-mxml example="/spark/i18n/SparkStringToolsExample"/>
+ <compile-mxml example="/spark/i18n/SparkFormatterExample"/>
+
+ <compile-mxml example="/spark/controls/DataGridCustomRendererExample"/>
+ <compile-mxml example="/spark/controls/DataGridCustomRendererPrepareExample"/>
+ <compile-mxml example="/spark/controls/DataGridCustomSkinExample"/>
+ <compile-mxml example="/spark/controls/DataGridExample2"/>
+ <compile-mxml example="/spark/controls/DataGridSimpleColumnsExample"/>
+ <compile-mxml example="/spark/controls/DataGridSimpleNoWrapExample"/>
+ <compile-mxml example="/spark/controls/DataGridSizingExample"/>
+
+ <compile-mxml example="/spark/controls/ListDataPagingExample"/>
+
+ <compile-mxml example="/spark/controls/SampleHelpFormExample"/>
+ <compile-mxml example="/spark/controls/SampleSequenceFormExample"/>
+ <compile-mxml example="/spark/controls/SampleSimpleFormExample"/>
+ <compile-mxml example="/spark/controls/SampleStackedFormExample"/>
+
+ <compile-mxml example="/spark/controls/OSMFExample"/>
+ </target>
+
+ <target name="compile-spark3" description="compile third set of spark examples">
+ <compile-mxml example="/spark/other/BidirectionalBinding1Example"/>
+ <compile-mxml example="/spark/other/BidirectionalBinding2Example"/>
+ <compile-mxml example="/spark/other/ControllingViewportExample"/>
+ <compile-mxml example="/spark/itemRenderers/ListItemRendererExample"/>
+ <compile-mxml example="/spark/effects/AnimatePropertiesExample"/>
+ <compile-mxml example="/spark/effects/AnimateTransformExample"/>
+ <compile-mxml example="/spark/effects/CrossFadeExample"/>
+ <compile-mxml example="/spark/effects/FadeExample"/>
+ <compile-mxml example="/spark/effects/Rotate3DExample"/>
+ <compile-mxml example="/spark/effects/Scale3DExample"/>
+ <compile-mxml example="/spark/fxg/EllipseTransformExample"/>
+ <compile-mxml example="/spark/fxg/DropShadowGraphicExample"/>
+ <compile-mxml example="/spark/fxg/LinearGradientsSpreadMethodExample"/>
+ <compile-mxml example="/spark/fxg/StaticFXGExample"/>
+ <compile-mxml example="/spark/containers/BorderExample"/>
+ <compile-mxml example="/spark/containers/GroupExample"/>
+ <compile-mxml example="/spark/containers/PanelExample"/>
+ <compile-mxml example="/spark/containers/TabNavigator1Example"/>
+ <compile-mxml example="/spark/containers/TabNavigator2Example"/>
+ <compile-mxml example="/spark/skinning/ButtonWithIconExample"/>
+ <compile-mxml example="/spark/skinning/SkinningApplication1Example"/>
+ <compile-mxml example="/spark/skinning/SkinningApplication2Example"/>
+ <compile-mxml example="/spark/skinning/SkinningApplication3Example"/>
+ <compile-mxml example="/spark/skinning/SkinningContainerExample"/>
+ <compile-mxml example="/spark/css/CSSIDSelectorExample"/>
+ <compile-mxml example="/spark/controls/ButtonExample"/>
+ <compile-mxml example="/spark/controls/ButtonBarExample"/>
+ <compile-mxml example="/spark/controls/PopUpAnchor1Example"/>
+ <compile-mxml example="/spark/controls/PopUpAnchor2Example"/>
+ <compile-mxml example="/spark/controls/ToggleButtonExample"/>
+ <compile-mxml example="/spark/controls/CheckboxExample"/>
+ <compile-mxml example="/spark/controls/DropdownExample"/>
+ <compile-mxml example="/spark/controls/NumericStepperExample"/>
+ <compile-mxml example="/spark/controls/RadioButtonExample"/>
+ <compile-mxml example="/spark/controls/ToggleButton2Example"/>
+ <compile-mxml example="/spark/controls/ScrollBarExample"/>
+ <compile-mxml example="/spark/controls/Scroller1Example"/>
+ <compile-mxml example="/spark/controls/Scroller2Example"/>
+ <compile-mxml example="/spark/controls/SliderExample"/>
+ <compile-mxml example="/spark/controls/SpinnerExample"/>
+ <compile-mxml example="/spark/controls/VideoPlayerExample"/>
+ <compile-mxml example="/spark/controls/ListExample"/>
+ </target>
+
+ <target name="compile-apache" description="compile apache examples">
+ <compile-mxml example="/apache/ApacheFlex4_8_0"/>
+ <compile-mxml example="/apache/ApacheFlex4_9_0"/>
+ <compile-mxml example="/apache/ApacheFlex4_10_0"/>
+ <compile-mxml example="/apache/ApacheFlex4_11_0"/>
+ <compile-mxml example="/apache/ApacheFlex4_12_1"/>
+ <compile-mxml example="/apache/ApacheFlex4_13_0"/>
+ <!-- <compile-mxml example="/apache/ApacheFlex4_13_0"/> -->
+
+ <compile-mxml example="/apache/formatters/PostCodeFormatterExample"/>
+ <compile-mxml example="/apache/validators/PostCodeValidatorExample"/>
+ <compile-mxml-locales example="/apache/i18n/LocaleExample"/>
+ <compile-mxml example="/apache/i18n/DateExample"/>
+ <compile-mxml example="/apache/i18n/TimeZoneExample"/>
+ <compile-mxml example="/apache/i18n/MillisecondExample"/>
+ <compile-mxml example="/apache/i18n/ScientificExample"/>
+ <compile-mxml example="/apache/i18n/NumericStepperExample"/>
+ <compile-mxml example="/apache/containers/CalloutExample"/>
+ <compile-mxml example="/apache/controls/MaskedTextInputExample"/>
+
+ <!-- Uncomment when Flex 4.14 is released -->
+ <!-- compile-mxml example="/apache/controls/SparkRichTextEditorExample"/-->
+ </target>
+
+ <!--- don't worry about squiggly for now -->
+
+ <target name="package" description="package up all source files" depends="package-dir,package-tar,package-zip">
+ </target>
+
+ <target name="package-dir">
+ <delete dir="${basedir}/out"/>
+ <mkdir dir="${basedir}/out"/>
+ </target>
+
+ <target name="package-tar" description="tar up all source files">
+ <tar destfile="${basedir}/out/apache-flex-tour-de-flex-component-explorer-${version}-src.tar.gz"
+ compression="gzip"
+ longfile="gnu">
+ <tarfileset dir="${basedir}/..">
+ <include name="LICENSE" />
+ <include name="NOTICE" />
+ <include name="CONTRIB*" />
+ </tarfileset>
+ <tarfileset dir="${basedir}">
+ <include name="README" />
+ <include name="RELEASE_NOTES" />
+ <include name="build.xml" />
+ <include name="src/favicon.ico" />
+ <include name="src/index.html" />
+ <include name="src/explorer.xml" />
+ <include name="src/swfobject.js" />
+ <include name="**/*.mxml" />
+ <include name="**/*.as" />
+ <include name="**/*.jpg" />
+ <include name="**/*.png" />
+ <include name="**/*.gif" />
+ <include name="**/*.ttf" />
+ <include name="**/*.mp4" />
+ <include name="**/*.mp3" />
+ <include name="**/*.fxg" />
+ <include name="**/*.xml" />
+ <exclude name="**/*.swf" />
+ <exclude name="installer.xml" />
+ <exclude name="squiggly" />
+ <exclude name="dictionaries" />
+ <exclude name="src/dictionaries" />
+ <exclude name="src/apache/squiggly/dictionaries" />
+ </tarfileset>
+ </tar>
+ </target>
+
+ <target name="package-zip" description="zip up all source files">
+ <zip destfile="${basedir}/out/apache-flex-tour-de-flex-component-explorer-${version}-src.zip">
+ <fileset dir="${basedir}/..">
+ <include name="LICENSE" />
+ <include name="NOTICE" />
+ <include name="CONTRIB*" />
+ </fileset>
+ <fileset dir="${basedir}">
+ <include name="README" />
+ <include name="RELEASE_NOTES" />
+ <include name="build.xml" />
+ <include name="src/favicon.ico" />
+ <include name="src/index.html" />
+ <include name="src/explorer.xml" />
+ <include name="src/swfobject.js" />
+ <include name="**/*.mxml" />
+ <include name="**/*.as" />
+ <include name="**/*.jpg" />
+ <include name="**/*.png" />
+ <include name="**/*.gif" />
+ <include name="**/*.ttf" />
+ <include name="**/*.mp4" />
+ <include name="**/*.mp3" />
+ <include name="**/*.fxg" />
+ <include name="**/*.xml" />
+ <exclude name="**/*.swf" />
+ <exclude name="installer.xml" />
+ <exclude name="squiggly" />
+ <exclude name="dictionaries" />
+ <exclude name="src/dictionaries" />
+ <exclude name="src/apache/squiggly/dictionaries" />
+ </fileset>
+ </zip>
+ </target>
+
+ <target name="create-md5" >
+ <echo message="Generating MD5 hashes for release artifacts"/>
+ <checksum algorithm="md5" file="${basedir}/out/apache-flex-tour-de-flex-component-explorer-${version}-src.tar.gz" forceOverwrite="yes"/>
+ <checksum algorithm="md5" file="${basedir}/out/apache-flex-tour-de-flex-component-explorer-${version}-src.zip" forceOverwrite="yes"/>
+ </target>
+
+ <target name="clean" description="clean up">
+ <delete>
+ <fileset dir="${basedir}" includes="**/*.swf" />
+ </delete>
+ <delete dir="${basedir}/squiggly" />
+ <delete dir="${basedir}/dictionaries" />
+ <delete dir="${basedir}/src/dictionaries" />
+ <delete dir="${basedir}/src/apache/squiggly/dictionaries" />
+ </target>
+</project>
diff --git a/tourdeflexmodules/html-template/history/history.css b/tourdeflexmodules/html-template/history/history.css
new file mode 100755
index 0000000..822d47e
--- /dev/null
+++ b/tourdeflexmodules/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
diff --git a/tourdeflexmodules/html-template/history/history.js b/tourdeflexmodules/html-template/history/history.js
new file mode 100755
index 0000000..1f41c7f
--- /dev/null
+++ b/tourdeflexmodules/html-template/history/history.js
@@ -0,0 +1,694 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ // Flag to denote the existence of onhashchange
+ var browserHasHashChange = false;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari && !browserHasHashChange) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, just tell the browser to go there
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari && !browserHasHashChange) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox && !browserHasHashChange) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ }
+
+ var _initialize = function () {
+
+ browserHasHashChange = ("onhashchange" in document.body);
+
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari && !browserHasHashChange)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+ }
+
+ if (browserHasHashChange)
+ document.body.onhashchange = hashChangeHandler;
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
diff --git a/tourdeflexmodules/html-template/history/historyFrame.html b/tourdeflexmodules/html-template/history/historyFrame.html
new file mode 100755
index 0000000..255339f
--- /dev/null
+++ b/tourdeflexmodules/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
diff --git a/tourdeflexmodules/html-template/index.template.html b/tourdeflexmodules/html-template/index.template.html
new file mode 100755
index 0000000..b064431
--- /dev/null
+++ b/tourdeflexmodules/html-template/index.template.html
@@ -0,0 +1,124 @@
+<!--
+ ~ 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.
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Apache Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta name="google" value="notranslate" />
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Fix for
+ Firefox 3.6 focus border issues. Initially, don't display flashContent div so it won't show
+ if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ object:focus { outline:none; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section -->
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!-- END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection.
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ // To use express install, set to playerProductInstall.swf, otherwise the empty string.
+ var xiSwfUrlStr = "playerProductInstall.swf";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
diff --git a/tourdeflexmodules/installer.xml b/tourdeflexmodules/installer.xml
new file mode 100644
index 0000000..02a26a6
--- /dev/null
+++ b/tourdeflexmodules/installer.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<project name="tour-de-flex_install" default="install" basedir=".">
+
+ <!-- Required for OSX 10.6 / Snow Leopard Performance. -->
+ <!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
+ <!-- local.d32 is set/used in build.properties so this needs to be done first. -->
+ <condition property="local.d32" value="-d32">
+ <and>
+ <os family="windows"/>
+ <equals arg1="${sun.arch.data.model}" arg2="64"/>
+ <equals arg1="${os.arch}" arg2="x86_64"/>
+ <equals arg1="${ant.java.version}" arg2="1.6"/>
+ </and>
+ </condition>
+
+ <condition property="isMacOrLinux" value="mac">
+ <or>
+ <os family="mac" />
+ <os family="unix" />
+ </or>
+ </condition>
+ <condition property="isWindows" value="windows">
+ <os family="windows" />
+ </condition>
+
+ <property environment="env"/>
+ <condition property="FLEX_HOME" value="${env.FLEX_HOME}">
+ <isset property="env.FLEX_HOME" />
+ </condition>
+
+ <property file="${FLEX_HOME}/local.properties"/>
+ <property file="${FLEX_HOME}/build.properties"/>
+ <property file="${basedir}/${bundle}.properties"/>
+
+ <property name="download.dir" value="${FLEX_HOME}/in"/>
+ <property name="unpack.dir" value="${FLEX_HOME}/tour-de-flex"/>
+ <property name="mirror.url" value="http://flex.apache.org/single-mirror-url.cgi" />
+
+ <property name="tour-de-flex.url.folder" value="flex/tourdeflex/1.1" />
+
+ <target name="file-setup-win" if="isWindows">
+ <property name="tour-de-flex.url.file" value="apache-flex-tour-de-flex-component-explorer-1.1-src.zip" />
+ <property name="tour-de-flex.url.md5" value="95b9895120eebac1f2cd09929629ba2c" />
+ </target>
+
+ <target name="file-setup-unix" if="isMacOrLinux">
+ <property name="tour-de-flex.url.file" value="apache-flex-tour-de-flex-component-explorer-1.1-src.tar.gz" />
+ <property name="tour-de-flex.url.md5" value="95b9895120eebac1f2cd09929629ba2c" />
+ </target>
+
+ <target name="install" depends="file-setup-win,file-setup-unix,tour-de-flex-download-unpack" description="Adds tour-de-flex to an Apache Flex SDK">
+ <delete dir="${download.dir}" />
+ <echo>Tour De Flex installed</echo>
+ </target>
+
+ <target name="tour-de-flex-download-unpack" description="Downloads tour-de-flex and copies into the Apache Flex SDK">
+ <mkdir dir="${download.dir}"/>
+
+ <get src="${mirror.url}" dest="${download.dir}/mirror.txt" />
+ <replace file="${download.dir}/mirror.txt" token="<p>" />
+ <replace file="${download.dir}/mirror.txt" token="</p>" />
+ <loadfile property="tour-de-flex.url.server" srcFile="${download.dir}/mirror.txt" />
+
+ <echo>Downloading ${tour-de-flex.url.server}/${tour-de-flex.url.folder}/${tour-de-flex.url.file}</echo>
+
+ <antcall target="download-check-md5">
+ <param name="domain" value="${tour-de-flex.url.server}" />
+ <param name="folder" value="${tour-de-flex.url.folder}" />
+ <param name="file" value="${tour-de-flex.url.file}" />
+ <param name="dest" value="${download.dir}/${tour-de-flex.url.file}"/>
+ <param name="failmessage" value="Tour De Flex download failed" />
+ <param name="md5" value="${tour-de-flex.url.md5}" />
+ </antcall>
+
+ <mkdir dir="${unpack.dir}"/>
+ <antcall target="files-unzip" />
+ <antcall target="files-untar" />
+ </target>
+
+ <target name="files-unzip" if="isWindows">
+ <unzip dest="${unpack.dir}">
+ <fileset file="${download.dir}/${tour-de-flex.url.file}" />
+ </unzip>
+ </target>
+
+ <target name="files-untar" if="isMacOrLinux">
+ <untar dest="${unpack.dir}" compression="gzip">
+ <fileset file="${download.dir}/${tour-de-flex.url.file}" />
+ </untar>
+ </target>
+
+ <target name="download-check-md5" description="Downloads file, and verifies checksum.">
+ <tstamp />
+ <property name="ts" value="${DSTAMP}${TSTAMP}" />
+ <get src="${domain}/${folder}/${file}?ts=${ts}" dest="${dest}" verbose="true" />
+ <antcall target="check-md5" />
+ </target>
+
+ <target name="check-md5" description="Verifies MD5 checksum, and fails if checksum doesn't match">
+ <echo>Checking ${dest} matches ${md5}</echo>
+ <checksum file="${dest}" algorithm="MD5" verifyproperty="md5.failed" property="${md5}" />
+ <fail message="${failmessage}">
+ <condition>
+ <equals arg1="${md5.failed}" arg2="false" />
+ </condition>
+ </fail>
+ </target>
+</project>
diff --git a/tourdeflexmodules/src/3rdparty.xml b/tourdeflexmodules/src/3rdparty.xml
new file mode 100755
index 0000000..93078e4
--- /dev/null
+++ b/tourdeflexmodules/src/3rdparty.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<compTree>
+ <node label="3rd Party Components">
+ <node label="Ardisia">
+ <node thirdParty="true" label="Ardisia Component Library" app="http://www.ardisialabs.com/tourDeFlex/tour-de-flex.jpg" src="" link="http://www.ardisialabs.com/tour-de-flex" />
+ </node>
+ <node label="Flexicious">
+ <node thirdParty="true" label="Dashboard Framework" app="http://www.flexicious.com/dashboard.jpg" src="" link="http://www.flexicious.com/Home/Dashboard"/>
+ <node thirdParty="true" label="Ultimate DataGrid" app="http://www.flexicious.com/ultimate.jpg" src="" link="http://www.flexicious.com/Home/Ultimate" />
+ <node thirdParty="true" label="Classic DataGrid" app="http://www.flexicious.com/classic.jpg" src="" link="http://www.flexicious.com/Home/DemoFlex4"/>
+ </node>
+ </node>
+</compTree>
diff --git a/tourdeflexmodules/src/SourceTab.mxml b/tourdeflexmodules/src/SourceTab.mxml
new file mode 100755
index 0000000..874ed18
--- /dev/null
+++ b/tourdeflexmodules/src/SourceTab.mxml
@@ -0,0 +1,87 @@
+<?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:VBox xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="100%" height="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.rpc.events.ResultEvent;
+ import mx.rpc.events.FaultEvent;
+ import mx.controls.Alert;
+
+ public var app:String;
+
+ public function set source(file:String):void
+ {
+ label = file.substring(file.lastIndexOf("/")+1);
+ srv.url = file;
+ srv.send();
+ ta.verticalScrollPosition = 19; // at end of header
+ }
+
+ private function resultHandler(event:ResultEvent):void
+ {
+ var str:String = String(event.result);
+ var r:RegExp = new RegExp("\r\n", "gs");
+ str = str.replace(r, "\r");
+ ta.text = str;
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show("Error loading source file");
+ }
+
+ private function copyCode():void
+ {
+ System.setClipboard(ta.text);
+ }
+
+ private function copyLink():void
+ {
+ var linkText:String = "http://flex.apache.org/tourdeflex/?app=" + app;
+
+ System.setClipboard(linkText);
+ }
+
+ private function viewInGitHub():void
+ {
+ var gitHubLink:String = "https://github.com/apache/flex-utilities/tree/master/TourDeFlex/TourDeFlex3/src/" + srv.url;
+ var urlRequest:URLRequest = new URLRequest(gitHubLink);
+ navigateToURL(urlRequest, "_blank");
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:HTTPService id="srv" useProxy="false" resultFormat="text" result="resultHandler(event)" fault="faultHandler(event)"/>
+ </fx:Declarations>
+
+ <mx:TextArea id="ta" color="#0000A0" fontFamily="Courier" editable="false" wordWrap="false" width="100%" height="100%"/>
+ <mx:HBox width="100%" paddingBottom="5" paddingRight="20">
+ <mx:Spacer width="100%" />
+ <mx:Button label="Copy" click="copyCode()" />
+ <mx:Button label="Copy Link" click="copyLink()" />
+ <mx:Button label="GitHub" click="viewInGitHub()" />
+ </mx:HBox>
+</mx:VBox>
diff --git a/tourdeflexmodules/src/SpellingConfig.xml b/tourdeflexmodules/src/SpellingConfig.xml
new file mode 100644
index 0000000..dfae724
--- /dev/null
+++ b/tourdeflexmodules/src/SpellingConfig.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<SpellingConfig>
+ <LanguageResource language="English (British)" languageCode="en_GB" ruleFile="./dictionaries/en_GB/en_GB.aff" dictionaryFile="./dictionaries/en_GB/en_GB.dic"/>
+ <LanguageResource language="English (US)" languageCode="en_US" ruleFile="./dictionaries/en_US/en_US.aff" dictionaryFile="./dictionaries/en_US/en_US.dic"/>
+</SpellingConfig>
diff --git a/tourdeflexmodules/src/ThirdPartyTab.mxml b/tourdeflexmodules/src/ThirdPartyTab.mxml
new file mode 100644
index 0000000..29f7860
--- /dev/null
+++ b/tourdeflexmodules/src/ThirdPartyTab.mxml
@@ -0,0 +1,31 @@
+<?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:VBox xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ label="3rd Party Example"
+ paddingTop="10" paddingBottom="10" paddingLeft="20" paddingRight="20"
+ borderStyle="solid"
+ width="100%" height="100%">
+
+ <s:RichText width="100%" height="100%">
+ <s:p>This example or component has been developed by a 3rd party and is hosted outside of the Tour De Flex site and may contain links to non ASF sites. It's code may not be Open Source or may be under a license other than the Apache license so please check carefully before using it. Neither the ASF or the Apache Flex PMC can endorse or recommend using this example but you may still find it useful.</s:p>
+ </s:RichText>
+</mx:VBox>
diff --git a/tourdeflexmodules/src/Welcome.mxml b/tourdeflexmodules/src/Welcome.mxml
new file mode 100644
index 0000000..6b86e04
--- /dev/null
+++ b/tourdeflexmodules/src/Welcome.mxml
@@ -0,0 +1,52 @@
+<?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.
+ -->
+
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="Welcome to Tour De Flex"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <s:HGroup>
+ <s:Image source="@Embed('/apache/assets/ApacheFlexLogo.png')" width="50" height="50" />
+ <s:VGroup height="100%" verticalAlign="middle">
+ <s:Label text="Apache Tour De Flex" fontSize="20" fontWeight="bold" />
+ </s:VGroup>
+ </s:HGroup>
+
+ <s:RichText width="100%" height="100%">
+ <s:p />
+ <s:p>The Apache Flex Tour De Flex component explorer provides a sample set of working
+ Apache Flex examples.</s:p>
+ <s:p />
+ <s:p>New in this version:</s:p>
+ <s:list>
+ <s:li>Added this welcome page</s:li>
+ <s:li>Changed examples look and feel to be more consistent</s:li>
+ <s:li>Added support for 3rd party examples</s:li>
+ <s:li>Added Squiggly spelling engine examples</s:li>
+ </s:list>
+ <s:p />
+ <s:p>For a full list of changes please see the README.</s:p>
+ <s:p />
+ </s:RichText>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/apache/ApacheFlex4_10_0.mxml b/tourdeflexmodules/src/apache/ApacheFlex4_10_0.mxml
new file mode 100644
index 0000000..18e90e8
--- /dev/null
+++ b/tourdeflexmodules/src/apache/ApacheFlex4_10_0.mxml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <s:Panel title="Apache Flex 4.10" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Image source="@Embed('/assets/ApacheFlexLogo.png')" width="50" height="50" />
+ <s:VGroup height="100%" verticalAlign="middle">
+ <s:Label text="Apache Flex 4.10" fontSize="20" fontWeight="bold" />
+ <s:Label text="Released Aug 6, 2013" />
+ </s:VGroup>
+ </s:HGroup>
+ <s:RichText width="100%">
+ <s:p />
+ <s:p>Apache Flex community releases Flex 4.10.0.</s:p>
+ <s:p />
+ <s:p>Differences and highlights include:</s:p>
+ <s:list>
+ <s:li>Support for latest versions of Flash Player (up to 11.8) and AIR runtimes (up to 3.8)</s:li>
+ <s:li>Improved support for older Flash Player versions (down to 10.2)</s:li>
+ <s:li>Linux support</s:li>
+ <s:li>15 new Spark components</s:li>
+ <s:li>Advanced telemetry support</s:li>
+ <s:li>480 dpi mobile skins</s:li>
+ <s:li>Over 200 bugs fixeds</s:li>
+ </s:list>
+ <s:p />
+ <s:p>For a full list of changes please see the README.</s:p>
+ <s:p />
+ </s:RichText>
+ <s:Label text="Content from Wikipedia licenced under a Creative Commons Attribution-ShareAlike 3.0 Unported License" fontSize="9" />
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/ApacheFlex4_11_0.mxml b/tourdeflexmodules/src/apache/ApacheFlex4_11_0.mxml
new file mode 100644
index 0000000..e462b72
--- /dev/null
+++ b/tourdeflexmodules/src/apache/ApacheFlex4_11_0.mxml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <s:Panel title="Apache Flex 4.11" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Image source="@Embed('/assets/ApacheFlexLogo.png')" width="50" height="50" />
+ <s:VGroup height="100%" verticalAlign="middle">
+ <s:Label text="Apache Flex 4.11" fontSize="20" fontWeight="bold" />
+ <s:Label text="Released Oct 28, 2013" />
+ </s:VGroup>
+ </s:HGroup>
+ <s:RichText width="100%">
+ <s:p />
+ <s:p>Apache Flex community releases Flex 4.11.0.</s:p>
+ <s:p />
+ <s:p>Differences and highlights include:</s:p>
+ <s:list>
+ <s:li>Support for Flash Player 11.9 and AIR runtime 3.9</s:li>
+ <s:li>mx:AdvancedDataGrid and mx:DataGrid speed improvements</s:li>
+ <s:li>Updated OSMF to latest version</s:li>
+ <s:li>Mobile datagrid component</s:li>
+ <s:li>120 and 640 dpi mobile skins</s:li>
+ <s:li>Desktop callout component</s:li>
+ <s:li>Over 50 bugs fixed</s:li>
+ </s:list>
+ <s:p />
+ <s:p>For a full list of changes please see the README.</s:p>
+ <s:p />
+ </s:RichText>
+ <s:Label text="Content from Wikipedia licenced under a Creative Commons Attribution-ShareAlike 3.0 Unported License" fontSize="9" />
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/ApacheFlex4_12_1.mxml b/tourdeflexmodules/src/apache/ApacheFlex4_12_1.mxml
new file mode 100644
index 0000000..275e910
--- /dev/null
+++ b/tourdeflexmodules/src/apache/ApacheFlex4_12_1.mxml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <s:Panel title="Apache Flex 4.12" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Image source="@Embed('/assets/ApacheFlexLogo.png')" width="50" height="50" />
+ <s:VGroup height="100%" verticalAlign="middle">
+ <s:Label text="Apache Flex 4.12" fontSize="20" fontWeight="bold" />
+ <s:Label text="Released May 3, 2014" />
+ </s:VGroup>
+ </s:HGroup>
+ <s:RichText width="100%">
+ <s:p />
+ <s:p>Apache Flex community releases Flex 4.12.1.</s:p>
+ <s:p />
+ <s:p>Differences and highlights in 4.12.0 and 4.12.1 include:</s:p>
+ <s:list>
+ <s:li>Support for Flash Player 12.0 and 13.0 and AIR runtime 4.0 and 13.0</s:li>
+ <s:li>Fixed Adobe Flash Builder bug, which inserts a incorrect attribute while creating a new project that uses Apache Flex SDK</s:li>
+ <s:li>Extended mobile media query support</s:li>
+ <s:li>Improved mobile memory usage/performance</s:li>
+ <s:li>Improved iPad and iOS7 support</s:li>
+ <s:li>mx:AdvancedDataGrid and mx:DataGrid performance improvements</s:li>
+ <s:li>New MaskedTextinput component</s:li>
+ <s:li>JSON support for ArrayCollection and ArrayList</s:li>
+ <s:li>Over 100 bugs fixed</s:li>
+ </s:list>
+ <s:p />
+ <s:p>For a full list of changes please see the README.</s:p>
+ <s:p />
+ </s:RichText>
+ <s:Label text="Content from Wikipedia licenced under a Creative Commons Attribution-ShareAlike 3.0 Unported License" fontSize="9" />
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/ApacheFlex4_13_0.mxml b/tourdeflexmodules/src/apache/ApacheFlex4_13_0.mxml
new file mode 100644
index 0000000..047d6b5
--- /dev/null
+++ b/tourdeflexmodules/src/apache/ApacheFlex4_13_0.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:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <s:Panel title="Apache Flex 4.13" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Image source="@Embed('/assets/ApacheFlexLogo.png')" width="50" height="50" />
+ <s:VGroup height="100%" verticalAlign="middle">
+ <s:Label text="Apache Flex 4.13" fontSize="20" fontWeight="bold" />
+ <s:Label text="Released Jul 28, 2014" />
+ </s:VGroup>
+ </s:HGroup>
+ <s:RichText width="100%">
+ <s:p />
+ <s:p>Apache Flex community releases Flex 4.13.0.</s:p>
+ <s:p />
+ <s:p>Differences and highlights include:</s:p>
+ <s:list>
+ <s:li>Support for Flash Player 14.0 and AIR runtime 14.0</s:li>
+ <s:li>FDB supports debugging ActionScript Workers</s:li>
+ <s:li>percentWidth for GridColumn</s:li>
+ <s:li>Add Chinese translations for all the installers of Flex</s:li>
+ <s:li>Over 30 bugs fixed</s:li>
+ </s:list>
+ <s:p />
+ <s:p>For a full list of changes please see the README.</s:p>
+ <s:p />
+ </s:RichText>
+ <s:Label text="Content from Wikipedia licenced under a Creative Commons Attribution-ShareAlike 3.0 Unported License" fontSize="9" />
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/ApacheFlex4_14_0.mxml b/tourdeflexmodules/src/apache/ApacheFlex4_14_0.mxml
new file mode 100644
index 0000000..4571431
--- /dev/null
+++ b/tourdeflexmodules/src/apache/ApacheFlex4_14_0.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:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <s:Panel title="Apache Flex 4.14" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Image source="@Embed('/assets/ApacheFlexLogo.png')" width="50" height="50" />
+ <s:VGroup height="100%" verticalAlign="middle">
+ <s:Label text="Apache Flex 4.14" fontSize="20" fontWeight="bold" />
+ <s:Label text="Released Feb 03, 2014" />
+ </s:VGroup>
+ </s:HGroup>
+ <s:RichText width="100%">
+ <s:p />
+ <s:p>Apache Flex community releases Flex 4.14.0.</s:p>
+ <s:p />
+ <s:p>Differences and highlights include:</s:p>
+ <s:list>
+ <s:li>Support for Flash Player 15.0, 16.0 and AIR runtime 15.0, 16.0</s:li>
+ <s:li>iOS7 and Android 4.x mobile themess</s:li>
+ <s:li>FlatSpark skins and components</s:li>
+ <s:li>Native support for tables in TLF</s:li>
+ <s:li>New spark RichTextEditor component</s:li>
+ <s:li>Over 50 bugs fixed</s:li>
+ </s:list>
+ <s:p />
+ <s:p>For a full list of changes please see the README.</s:p>
+ <s:p />
+ </s:RichText>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/ApacheFlex4_8_0.mxml b/tourdeflexmodules/src/apache/ApacheFlex4_8_0.mxml
new file mode 100644
index 0000000..2850eac
--- /dev/null
+++ b/tourdeflexmodules/src/apache/ApacheFlex4_8_0.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:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <s:Panel title="Apache Flex 4.8 (incubating)" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Image source="@Embed('/assets/ApacheFlexLogo.png')" width="50" height="50" />
+ <s:VGroup height="100%" verticalAlign="middle">
+ <s:Label text="Apache Flex 4.8 (incubating)" fontSize="20" fontWeight="bold" />
+ <s:Label text="Released Jul 25, 2012" />
+ </s:VGroup>
+ </s:HGroup>
+ <s:RichText width="100%">
+ <s:p />
+ <s:p>Apache Flex community releases Flex 4.8.0 incubating and it as a parity release with Adobe Flex 4.6.0. This is the first release under the incubator of the Apache Software Foundation and represents the initial donation of Adobe Flex 4.6 by Adobe System Inc.</s:p>
+ <s:p />
+ <s:p>Differences and highlights include:</s:p>
+ <s:list>
+ <s:li>Flex trademark issues are largely cleared up</s:li>
+ <s:li>Bug-tracking / issue-tracking system (JIRA) transferred from the Adobe bug tracker to Apache bug tracker</s:li>
+ <s:li>Mustela test suite is donated to Apache</s:li>
+ </s:list>
+ <s:p />
+ <s:p>For a full list of changes please see the README.</s:p>
+ <s:p />
+ </s:RichText>
+ <s:Label text="Content from Wikipedia licenced under a Creative Commons Attribution-ShareAlike 3.0 Unported License" fontSize="9" />
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/ApacheFlex4_9_0.mxml b/tourdeflexmodules/src/apache/ApacheFlex4_9_0.mxml
new file mode 100644
index 0000000..2113db3
--- /dev/null
+++ b/tourdeflexmodules/src/apache/ApacheFlex4_9_0.mxml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <s:Panel title="Apache Flex 4.9" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Image source="@Embed('/assets/ApacheFlexLogo.png')" width="50" height="50" />
+ <s:VGroup height="100%" verticalAlign="middle">
+ <s:Label text="Apache Flex 4.9" fontSize="20" fontWeight="bold" />
+ <s:Label text="Released Jan 11, 2013" />
+ </s:VGroup>
+ </s:HGroup>
+ <s:RichText width="100%">
+ <s:p />
+ <s:p>Apache Flex community releases Flex 4.9.0. This is the first release since Apache Flex became a top level project of the Apache Software Foundation.</s:p>
+ <s:p />
+ <s:p>Differences and highlights include:</s:p>
+ <s:list>
+ <s:li>New locales for Apache Flex including Australian, British, Canadian, Greek, Switzerland (German) and Portuguese</s:li>
+ <s:li>Apache Flex SDK can be compiled for any version of the Flash Player from 10.2 to 11.5</s:li>
+ <s:li>New PostCodeFormatter and PostCodeValidator classes for international postcode formatting and validation</s:li>
+ <s:li>New VectorList and VectorCollection classes for lists and collections of vectors</s:li>
+ <s:li>New version of the TLF (Text Layout Framework), the TLF 3.0.33 source code is now included as it is now part of the Apache Flex donation</s:li>
+ <s:li>Can use Java 7 to compile SDK (see README for instructions)</s:li>
+ <s:li>Many improvements and updates to Mustella tests</s:li>
+ <s:li>An SDK installer has also been created and is the recommended way of installing the Apache Flex SDK in an IDE</s:li>
+ <s:li>Various important bug fixes</s:li>
+ </s:list>
+ <s:p />
+ <s:p>For a full list of changes please see the README.</s:p>
+ <s:p />
+ </s:RichText>
+ <s:Label text="Content from Wikipedia licenced under a Creative Commons Attribution-ShareAlike 3.0 Unported License" fontSize="9" />
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/Squiggly1_1.mxml b/tourdeflexmodules/src/apache/Squiggly1_1.mxml
new file mode 100644
index 0000000..3184711
--- /dev/null
+++ b/tourdeflexmodules/src/apache/Squiggly1_1.mxml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <s:Panel title="Apache Squiggly 1.1" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Image source="@Embed('/assets/ApacheFlexLogo.png')" width="50" height="50" />
+ <s:VGroup height="100%" verticalAlign="middle">
+ <s:Label text="Apache Flex Squiggly 1.1" fontSize="20" fontWeight="bold" />
+ <s:Label text="Released Oct 28, 2014" />
+ </s:VGroup>
+ </s:HGroup>
+ <s:RichText width="100%">
+ <s:p />
+ <s:p>Apache Flex community releases Squiggly 1.1</s:p>
+ <s:p />
+ <s:p>Apache Flex Squiggly is a ActionScript spell checking library.</s:p>
+ <s:p />
+ <s:p>Differences and highlights from 1.0 include:</s:p>
+ <s:list>
+ <s:li>Mavenized version of Squiggly</s:li>
+ <s:li>Added installer ant file</s:li>
+ <s:li>Added en_US and en_GB dictionaries</s:li>
+ <s:li>Now works with both halo and spark components</s:li>
+ </s:list>
+ </s:RichText>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/assets/ApacheFlexLogo.png b/tourdeflexmodules/src/apache/assets/ApacheFlexLogo.png
new file mode 100644
index 0000000..4ff037f
--- /dev/null
+++ b/tourdeflexmodules/src/apache/assets/ApacheFlexLogo.png
Binary files differ
diff --git a/tourdeflexmodules/src/apache/containers/CalloutExample.mxml b/tourdeflexmodules/src/apache/containers/CalloutExample.mxml
new file mode 100644
index 0000000..fa34ae2
--- /dev/null
+++ b/tourdeflexmodules/src/apache/containers/CalloutExample.mxml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <s:Callout id="callout">
+ <s:VGroup horizontalAlign="center">
+ <s:Label text="Callout - click close" />
+ <s:Button label="Close" click="callout.close()" />
+ </s:VGroup>
+ </s:Callout>
+ </fx:Declarations>
+
+ <s:Panel title="Callout Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Button id="show" label="Show Callout" click="callout.open(show)" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/controls/MaskedTextInputExample.mxml b/tourdeflexmodules/src/apache/controls/MaskedTextInputExample.mxml
new file mode 100644
index 0000000..cbf5d50
--- /dev/null
+++ b/tourdeflexmodules/src/apache/controls/MaskedTextInputExample.mxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:x="http://flex.apache.org/experimental/ns">
+
+ <s:Panel title="Masked TextInput Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="bottom">
+ <s:Label text="Phone Number:" />
+ <x:MaskedTextInput maskText="####-####" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/controls/SparkRichTextEditorExample.mxml b/tourdeflexmodules/src/apache/controls/SparkRichTextEditorExample.mxml
new file mode 100644
index 0000000..78cab09
--- /dev/null
+++ b/tourdeflexmodules/src/apache/controls/SparkRichTextEditorExample.mxml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <fx:Script>
+ <![CDATA[
+ import spark.components.RichTextEditor;
+ import spark.events.TextOperationEvent;
+
+ private var rte:RichTextEditor;
+
+ protected override function createChildren():void
+ {
+ super.createChildren();
+ rte = new RichTextEditor();
+ rte.htmlText = '<b>This is great!</b><br/><font color="#FF0000">Another Line.</font>';
+ rte.addEventListener(TextOperationEvent.CHANGE, handleChange);
+ container.addElementAt(rte, 0);
+ handleChange();
+ }
+
+ private function handleChange(e:TextOperationEvent = null):void
+ {
+ richTextEditorOutput.text = rte.htmlText;
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="RichTextEditor Sample" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <s:VGroup id="container" width="600" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10">
+ <s:Label text="HTML Output:" fontSize="20"/>
+ <s:Label id="richTextEditorOutput" width="100%"/>
+ </s:VGroup>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/formatters/PostCodeFormatterExample.mxml b/tourdeflexmodules/src/apache/formatters/PostCodeFormatterExample.mxml
new file mode 100644
index 0000000..00ef002
--- /dev/null
+++ b/tourdeflexmodules/src/apache/formatters/PostCodeFormatterExample.mxml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Script>
+ <![CDATA[
+ import org.apache.flex.formatters.PostCodeFormatter;
+
+ private var formatter:PostCodeFormatter;
+
+ protected function formatPostCode(event:MouseEvent):void
+ {
+ formatter = new PostCodeFormatter();
+
+ if (aust.selected) {
+ formatted.text = checkAustralianPostCode(postcode.text);
+ }
+ else if (uk.selected) {
+ formatted.text = checkUKPostCode(postcode.text);
+ }
+ else if (can.selected) {
+ formatted.text = checkCanadianPostCode(postcode.text);
+ }
+ }
+
+ public function checkAustralianPostCode(postcode:String):String {
+ formatter.formats = ["NNNN"];
+
+ return formatter.format(postcode);
+ }
+
+ public function checkUKPostCode(postcode:String):String {
+ formatter.formats = ["AN NAA", "ANN NAA", "AAN NAA", "ANA NAA", "AANN NAA", "AANA NAA"];
+
+ return formatter.format(postcode);
+ }
+
+ public function checkCanadianPostCode(postcode:String):String {
+ formatter.formatString = "ANA NAN";
+
+ return formatter.format(postcode);
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="Postcode Formatter Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Postcode" />
+ <s:TextInput id="postcode" text=""/>
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Country" />
+ <s:RadioButton id="aust" label="Australia" selected="true" />
+ <s:RadioButton id="uk" label="UK" />
+ <s:RadioButton id="can" label="Canada" />
+ </s:HGroup>
+ <s:Button label="Show Formatted Postcode" click="formatPostCode(event)" />
+ <s:HGroup>
+ <s:Label text="Formatted Postcode" />
+ <s:Label id="formatted" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/i18n/DateExample.mxml b/tourdeflexmodules/src/apache/i18n/DateExample.mxml
new file mode 100644
index 0000000..12d2559
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/DateExample.mxml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <fx:Script>
+ <![CDATA[
+ import mx.formatters.DateFormatter;
+
+ private var formatter:DateFormatter;
+
+ protected function formatDate(event:Event):void
+ {
+ formatter = new DateFormatter();
+
+ if (int1.selected) {
+ formatter.formatString = "DD/MM/YYYY";
+ }
+ else if (int2.selected) {
+ formatter.formatString = "D/M/YYYY";
+ }
+ else if (int3.selected) {
+ formatter.formatString = "D.M.YYYY";
+ }
+ else if (jap.selected) {
+ formatter.formatString = "YYYY年MM月DD日";
+ }
+ else if (chi.selected) {
+ formatter.formatString = "YYYY年MM月DD日";
+ }
+ else if (kor.selected) {
+ formatter.formatString = "YYYY년 MM월 DD일";
+ }
+
+ formatted.text = formatter.format(date.selectedDate);
+ parsed.text = DateFormatter.parseDateString(formatted.text, formatter.formatString).toString();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="International Date Formating Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Date" />
+ <mx:DateField id="date" change="formatDate(event)" />
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Date Format" />
+ <s:RadioButton id="int1" label="DD/MM/YYYY" selected="true" click="formatDate(event)" />
+ <s:RadioButton id="int2" label="D/M/YYYY" click="formatDate(event)" />
+ <s:RadioButton id="int3" label="D.M.YYYY" click="formatDate(event)" />
+ <s:RadioButton id="jap" label="Japanese" click="formatDate(event)" />
+ <s:RadioButton id="chi" label="Chinese" click="formatDate(event)" />
+ <s:RadioButton id="kor" label="Korean" click="formatDate(event)" />
+ </s:HGroup>
+ <s:HGroup>
+ <s:Label text="Formatted Date" />
+ <s:Label id="formatted" />
+ </s:HGroup>
+ <s:HGroup>
+ <s:Label text="Parsed Date String" />
+ <s:Label id="parsed" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/i18n/LocaleExample.mxml b/tourdeflexmodules/src/apache/i18n/LocaleExample.mxml
new file mode 100644
index 0000000..2435237
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/LocaleExample.mxml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayList;
+ import mx.events.FlexEvent;
+ import mx.resources.IResourceBundle;
+ import mx.resources.ResourceManager;
+
+ import spark.events.IndexChangeEvent;
+
+ [Bindable]
+ protected var langauges:ArrayList = new ArrayList(["USA", "Australian", "British", "Canadian", "Greek", "Switzerland (German)", "Portuguese"]);
+ protected var locales:Array = ["en_US", "en_AU", "en_GB", "en_CA", "el_GR", "de_CH", "pt_PT"];
+
+ protected function changeLocale(event:IndexChangeEvent):void
+ {
+ var newLocale:String = locales[locale.selectedIndex];
+ var bundle:IResourceBundle = ResourceManager.getInstance().getResourceBundle(newLocale, "validators");
+ var message:String = bundle.content["missingPeriodInDomainError"];
+
+ error.text = message;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- so validators resource bundle is included -->
+ <mx:EmailValidator />
+ </fx:Declarations>
+
+ <s:Panel title="SDK Locale Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Select Lanagage" />
+ <s:ComboBox id="locale" dataProvider="{langauges}" change="changeLocale(event)" />
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Error message" />
+ <s:Label id="error" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/i18n/MillisecondExample.mxml b/tourdeflexmodules/src/apache/i18n/MillisecondExample.mxml
new file mode 100644
index 0000000..bd3118a
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/MillisecondExample.mxml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ initialize="init(event)">
+ <fx:Script>
+ <![CDATA[
+ import mx.events.FlexEvent;
+ import mx.formatters.DateFormatter;
+
+ private var formatter:DateFormatter;
+ private var timer:Timer = new Timer(20);
+
+ protected function formatDate(event:TimerEvent):void
+ {
+ formatted.text = formatter.format(new Date());
+ }
+
+ protected function init(event:FlexEvent):void
+ {
+ formatter = new DateFormatter();
+ formatter.formatString = "DD/MM/YYYY H:NN:SS QQQ";
+
+ timer.addEventListener(TimerEvent.TIMER, formatDate);
+ timer.start();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="Millisecond Format Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup>
+ <s:Label text="Formatted Date" />
+ <s:Label id="formatted" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/i18n/NumericStepperExample.mxml b/tourdeflexmodules/src/apache/i18n/NumericStepperExample.mxml
new file mode 100644
index 0000000..223a416
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/NumericStepperExample.mxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ locale="en_ES">
+
+ <s:Panel title="European Numeric Stepper Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Number" />
+ <s:NumericStepper maximum="10" snapInterval="0.05" stepSize="0.05" />
+ </s:HGroup>
+</s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/i18n/ScientificExample.mxml b/tourdeflexmodules/src/apache/i18n/ScientificExample.mxml
new file mode 100644
index 0000000..64175be
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/ScientificExample.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <fx:Declarations>
+ <mx:CurrencyFormatter id="amount" />
+ </fx:Declarations>
+
+ <s:Panel title="Scientific Notation Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Number" />
+ <s:Label text="1.23e02" />
+ <s:Label text="Formatted" />
+ <s:Label text="{amount.format('1.23e2')}" />
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Number" />
+ <s:Label text="1.23e-1" />
+ <s:Label text="Formatted" />
+ <s:Label text="{amount.format('1.23e-2')}" />
+ </s:HGroup>
+</s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/i18n/TimeZoneExample.mxml b/tourdeflexmodules/src/apache/i18n/TimeZoneExample.mxml
new file mode 100644
index 0000000..37ae6aa
--- /dev/null
+++ b/tourdeflexmodules/src/apache/i18n/TimeZoneExample.mxml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <fx:Script>
+ <![CDATA[
+ import mx.formatters.DateFormatter;
+
+ private var formatter:DateFormatter;
+
+ protected function formatDate(event:Event):void
+ {
+ formatter = new DateFormatter();
+
+ if (format1.selected) {
+ formatter.formatString = "DD/MM/YYYY ZO";
+ }
+ else if (format2.selected) {
+ formatter.formatString = "DD/MM/YYYY ZOO";
+ }
+ else if (format3.selected) {
+ formatter.formatString = "DD/MM/YYYY ZOOO";
+ }
+
+ formatted.text = formatter.format(date.selectedDate);
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="Timezone Formating Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Date" />
+ <mx:DateField id="date" change="formatDate(event)" />
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Date Format" />
+ <s:RadioButton id="format1" label="DD/MM/YYYY ZO" selected="true" click="formatDate(event)" />
+ <s:RadioButton id="format2" label="DD/MM/YYYY ZOO" click="formatDate(event)"/>
+ <s:RadioButton id="format3" label="DD/MM/YYYY ZOOO" click="formatDate(event)"/>
+ </s:HGroup>
+ <s:HGroup>
+ <s:Label text="Formatted Date" />
+ <s:Label id="formatted" />
+ </s:HGroup>
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/squiggly/SpellingConfig.xml b/tourdeflexmodules/src/apache/squiggly/SpellingConfig.xml
new file mode 100644
index 0000000..dfae724
--- /dev/null
+++ b/tourdeflexmodules/src/apache/squiggly/SpellingConfig.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<SpellingConfig>
+ <LanguageResource language="English (British)" languageCode="en_GB" ruleFile="./dictionaries/en_GB/en_GB.aff" dictionaryFile="./dictionaries/en_GB/en_GB.dic"/>
+ <LanguageResource language="English (US)" languageCode="en_US" ruleFile="./dictionaries/en_US/en_US.aff" dictionaryFile="./dictionaries/en_US/en_US.dic"/>
+</SpellingConfig>
diff --git a/tourdeflexmodules/src/apache/squiggly/SpellingExExample.mxml b/tourdeflexmodules/src/apache/squiggly/SpellingExExample.mxml
new file mode 100644
index 0000000..bccd7fb
--- /dev/null
+++ b/tourdeflexmodules/src/apache/squiggly/SpellingExExample.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+ <fx:Script>
+ <![CDATA[
+ import com.adobe.linguistics.spelling.SpellUI;
+
+ private function enableSpelling():void {
+ SpellUI.enableSpelling(textArea, "en_US");
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Panel title="Spell Check" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:Group width="100%" height="100%">
+ <s:TextArea id="textArea" width="50%" height="50%"
+ text="I know Enlish. Use the context menu to see the suggestions of the missbelled word." />
+ </s:Group>
+ <s:Button label="Check Spelling" click="enableSpelling()" />
+ </s:Panel>
+
+</s:Module>
diff --git a/tourdeflexmodules/src/apache/squiggly/SpellingExample.mxml b/tourdeflexmodules/src/apache/squiggly/SpellingExample.mxml
new file mode 100644
index 0000000..05c7e0e
--- /dev/null
+++ b/tourdeflexmodules/src/apache/squiggly/SpellingExample.mxml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+<mx:Script>
+ <![CDATA[
+ import com.adobe.linguistics.spelling.SpellUI;
+
+ private function enableUS():void {
+ SpellUI.enableSpelling(textArea, "en_US");
+ }
+
+ private function enableGB():void {
+ SpellUI.enableSpelling(textArea, "en_GB");
+ }
+ ]]>
+</mx:Script>
+ <s:Panel title="Spell Check" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:VGroup width="100%" height="100%">
+ <mx:TextArea id="textArea" width="50%" height="50%" text="Spell cheecking in TextArea"/>
+ <mx:Button label="Check British English" click="enableGB()" />
+ <mx:Button label="Check American English" click="enableUS()" />
+ </s:VGroup>
+ </s:Panel>
+
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/apache/validators/PostCodeValidatorExample.mxml b/tourdeflexmodules/src/apache/validators/PostCodeValidatorExample.mxml
new file mode 100644
index 0000000..eebaac4
--- /dev/null
+++ b/tourdeflexmodules/src/apache/validators/PostCodeValidatorExample.mxml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:a="http://flex.apache.org/ns">
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <fx:Script>
+ <![CDATA[
+ import org.apache.flex.validators.PostCodeValidator;
+
+ import mx.controls.Alert;
+
+ protected function validatePostCode(event:MouseEvent):void
+ {
+ if (aust.selected) {
+ checkAustralianPostCode(postcode.text);
+ }
+ else if (uk.selected) {
+ checkUKPostCode(postcode.text);
+ }
+ else if (can.selected) {
+ checkCanadianPostCode(postcode.text);
+ }
+ }
+
+ public function checkAustralianPostCode(postcode:String):void {
+ validator.formats = ["NNNN"];
+ }
+
+ public function checkUKPostCode(postcode:String):void {
+ validator.formats = ["AN NAA", "ANN NAA", "AAN NAA", "ANA NAA", "AANN NAA", "AANA NAA"];
+ }
+
+ public function checkCanadianPostCode(postcode:String):void {
+ validator.format = "ANA NAN";
+ }
+ ]]>
+ </fx:Script>
+
+
+ <fx:Declarations>
+ <a:PostCodeValidator id="validator" source="{postcode}" property="text"
+ trigger="{checkPostcode}" triggerEvent="click"
+ invalid="Alert.show('Postcode incorrect format!', 'Postcode')"/>
+ </fx:Declarations>
+
+
+ <s:Panel title="Postcode Validator Example" width="100%" height="100%">
+ <s:layout>
+ <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Postcode" />
+ <s:TextInput id="postcode" text=""/>
+ </s:HGroup>
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Country" />
+ <s:RadioButton id="aust" label="Australia" selected="true" />
+ <s:RadioButton id="uk" label="UK" />
+ <s:RadioButton id="can" label="Canada" />
+ </s:HGroup>
+ <s:Button id="checkPostcode" label="Validate Postcode" click="validatePostCode(event)" />
+ </s:Panel>
+</s:Module>
diff --git a/tourdeflexmodules/src/explorer.mxml b/tourdeflexmodules/src/explorer.mxml
new file mode 100755
index 0000000..51b6dea
--- /dev/null
+++ b/tourdeflexmodules/src/explorer.mxml
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:explorer="*"
+ pageTitle="{TITLE}" layout="vertical" width="100%" height="100%"
+ paddingBottom="2" paddingTop="2" paddingLeft="2" paddingRight="2"
+ initialize="init()" creationComplete="checkParameters()">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.core.FlexGlobals;
+
+ static protected const VERSION:String = "1.2";
+ static protected const TITLE:String = "Tour De Flex Component Explorer";
+ static protected const FULL_TITLE:String = "Apache Flex® Tour De Flex Component Explorer " + VERSION;
+
+ [Embed(source="explorer.xml", mimeType="application/octet-stream")]
+ private var XMLData:Class;
+
+ [Bindable]
+ protected var noExamples:int = 0;
+
+ private function init():void
+ {
+ var data:XML = XML(new XMLData());
+
+ explorerTree = XML(data.node);
+ compLibTree.dataProvider = explorerTree;
+
+ noExamples = (explorerTree..node.(hasOwnProperty("@app") && @app.length() > 0)).length();
+
+ var loader:URLLoader = new URLLoader();
+ var request:URLRequest = new URLRequest("3rdparty.xml");
+ loader.addEventListener(Event.COMPLETE, load3rdParty);
+ loader.load(request);
+ }
+
+ protected function load3rdParty(event:Event):void
+ {
+ var loader:URLLoader = URLLoader(event.target);
+ var newNode:XML = new XML(loader.data);
+
+ if (newNode..node.length() > 0) {
+ explorerTree.appendChild(newNode.node);
+ compLibTree.dataProvider = explorerTree;
+ noExamples += (newNode..node.(hasOwnProperty("@app") && @app.length() > 0)).length();
+ }
+ }
+
+ protected function checkParameters():void
+ {
+ var parameters:Object = FlexGlobals.topLevelApplication.parameters;
+
+ if (parameters.hasOwnProperty("app")) {
+ var application:String = parameters.app;
+ var source:String = explorerTree..node.(hasOwnProperty("@app") && @app == application).@src;
+ loadApp(application, source, false);
+ openNode(application);
+ }
+ else if (parameters.hasOwnProperty("module")) {
+ var module:String = parameters.module;
+ var moduleSource:String = explorerTree..node.(hasOwnProperty("@module") && @module == application).@src;
+ loadModule(module, moduleSource, false);
+ openModuleNode(module);
+ }
+ else {
+ loadModule("Welcome", null, false);
+ }
+ }
+
+ private function treeChanged(event:Event):void
+ {
+ var nodeApp:String = compLibTree.selectedItem.@app;
+ var nodeModule:String = compLibTree.selectedItem.@module;
+ var link:String = compLibTree.selectedItem.hasOwnProperty("@link") ? compLibTree.selectedItem.@link : "";
+ var thirdParty:Boolean = compLibTree.selectedItem.hasOwnProperty("@thirdParty")
+ && compLibTree.selectedItem.@thirdParty == "true";
+
+ if (nodeApp != null && nodeApp != "")
+ {
+ loadApp(nodeApp, compLibTree.selectedItem.@src, thirdParty, link);
+ }
+ else if (nodeModule != null && nodeModule != "")
+ {
+ loadModule(nodeModule, compLibTree.selectedItem.@src, thirdParty, link);
+ }
+ else
+ {
+ compLibTree.expandItem(compLibTree.selectedItem, true, true);
+ }
+ }
+
+ private function loadApp(application:String, source:String, thirdParty:Boolean, link:String=""):void
+ {
+ if (application.indexOf(".swf") > 0) {
+ swfLoader.loadApp(application);
+ }
+ else if(application.indexOf(".jpg") > 0 || application.indexOf(".png") > 0)
+ {
+ swfLoader.loadApp(application,link);
+ }
+ else {
+ swfLoader.loadApp(application + ".swf");
+ }
+ if (thirdParty) {
+ vs.thirdPartyWarning();
+ }
+ else {
+ vs.loadSource(application, source);
+ }
+ }
+
+ private function loadModule(application:String, source:String, thirdParty:Boolean, link:String=""):void
+ {
+ if (application.indexOf(".swf") > 0) {
+ swfLoader.loadModule(application);
+ }
+ else {
+ swfLoader.loadModule(application + ".swf");
+ }
+ if (thirdParty) {
+ vs.thirdPartyWarning();
+ }
+ else {
+ vs.loadSource(application, source);
+ }
+ }
+
+ private function gotoHome(event:Event):void
+ {
+ var urlRequest:URLRequest = new URLRequest("http://flex.apache.org/download-tourdeflex.html");
+ navigateToURL(urlRequest);
+ }
+
+ private function openNode(application:String):void
+ {
+ var node:XML = explorerTree..node.(hasOwnProperty("@app") && @app == application)[0];
+ var parent:XML;
+ var nodes:Array = [];
+
+ if (!node) {
+ return;
+ }
+
+ parent = node.parent();
+
+ while (parent != null) {
+ if (!compLibTree.isItemOpen(parent)) {
+ nodes.push(parent);
+ }
+ parent = parent.parent();
+ }
+
+ for each (var expand:XML in nodes) {
+ compLibTree.expandItem(expand, true);
+ }
+
+ compLibTree.selectedIndex = compLibTree.getItemIndex(node);
+ compLibTree.scrollToIndex(explorerTree.selectedIndex);
+ }
+
+ private function openModuleNode(application:String):void
+ {
+ var node:XML = explorerTree..node.(hasOwnProperty("@module") && @module == application)[0];
+ var parent:XML;
+ var nodes:Array = [];
+
+ if (!node) {
+ return;
+ }
+
+ parent = node.parent();
+
+ while (parent != null) {
+ if (!compLibTree.isItemOpen(parent)) {
+ nodes.push(parent);
+ }
+ parent = parent.parent();
+ }
+
+ for each (var expand:XML in nodes) {
+ compLibTree.expandItem(expand, true);
+ }
+
+ compLibTree.selectedIndex = compLibTree.getItemIndex(node);
+ compLibTree.scrollToIndex(explorerTree.selectedIndex);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <fx:XML id="explorerTree"/>
+ </fx:Declarations>
+
+ <mx:HBox width="100%">
+ <mx:Image source="./mx/controls/assets/ApacheFlexIcon.png" useHandCursor="true" buttonMode="true" click="gotoHome(event)" />
+ <mx:Label text="{FULL_TITLE}" fontSize="20" fontWeight="bold" />
+ <mx:Spacer width="100%" />
+ <mx:Label text="{noExamples} examples" />
+ </mx:HBox>
+ <mx:HDividedBox width="100%" height="100%">
+ <mx:Panel width="30%" height="100%" title="{TITLE}" dropShadowVisible="false">
+ <mx:Tree id="compLibTree" width="100%" height="100%" showRoot="false" labelField="@label" borderStyle="none"
+ change="treeChanged(event)"/>
+ </mx:Panel>
+ <mx:VDividedBox width="100%" height="100%">
+ <explorer:loaderPanel id="swfLoader" width="100%" height="50%"/>
+ <mx:VBox width="100%" height="50%" backgroundColor="#FFFFFF">
+ <explorer:viewsource id="vs" width="100%" height="100%"/>
+ </mx:VBox>
+ </mx:VDividedBox>
+ </mx:HDividedBox>
+ <mx:HBox width="100%">
+ <mx:Label fontSize="9" width="100%" text="Copyright © 2014 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache Flex is trademark of The Apache Software Foundation." />
+ </mx:HBox>
+</mx:Application>
diff --git a/tourdeflexmodules/src/explorer.xml b/tourdeflexmodules/src/explorer.xml
new file mode 100755
index 0000000..3fcd6ed
--- /dev/null
+++ b/tourdeflexmodules/src/explorer.xml
@@ -0,0 +1,486 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<compTree>
+ <node>
+ <node label="MX Framework Components">
+ <node label="Visual Components">
+ <node label="General Controls">
+ <node label="Alert" module="mx/controls/SimpleAlert" />
+ <node label="ColorPicker" module="mx/controls/ColorPickerExample" />
+ <node label="ComboBox" module="mx/controls/SimpleComboBox" />
+ <node label="DataGrid" module="mx/controls/SimpleDataGrid" />
+ <node label="HorizontalList" module="mx/controls/HorizontalListExample" />
+ <node label="HRule" module="mx/controls/SimpleHRule" />
+ <node label="HScrollBar" module="mx/controls/HScrollBarExample" />
+ <node label="HSlider" module="mx/controls/SimpleImageHSlider" />
+ <node label="List" module="mx/controls/SimpleList" />
+ <node label="NumericStepper" module="mx/controls/NumericStepperExample" />
+ <node label="ProgressBar" module="mx/controls/SimpleProgressBar" />
+ <node label="Spacer" module="mx/controls/SpacerExample" />
+ <node label="TabBar" module="mx/controls/TabBarExample" />
+ <node label="TileList" module="mx/controls/TileListExample" />
+ <node label="Tree" module="mx/controls/TreeExample" />
+ <node label="VRule" module="mx/controls/SimpleVRule" />
+ <node label="VScrollBar" module="mx/controls/VScrollBarExample" />
+ <node label="VSlider" module="mx/controls/SimpleImageVSlider" />
+ </node>
+ <node label="Button Controls">
+ <node label="Button" module="mx/controls/ButtonExample" />
+ <node label="ButtonBar" module="mx/controls/ButtonBarExample" />
+ <node label="CheckBox" module="mx/controls/CheckBoxExample" />
+ <node label="LinkBar" module="mx/controls/LinkBarExample" />
+ <node label="LinkButton" module="mx/controls/LinkButtonExample" />
+ <node label="PopUpButton" module="mx/controls/PopUpButtonExample" />
+ <node label="RadioButton" module="mx/controls/RadioButtonExample" />
+ <node label="RadioButtonGroup" module="mx/controls/RadioButtonGroupExample" />
+ <node label="ToggleButtonBar" module="mx/controls/ToggleButtonBarExample" />
+ </node>
+ <node label="Date Controls">
+ <node label="DateChooser" module="mx/controls/DateChooserExample" />
+ <node label="DateField" module="mx/controls/DateFieldExample" />
+ </node>
+ <node label="Loader Controls">
+ <node label="Image" module="mx/controls/SimpleImage" />
+ <node label="SWFLoader" module="mx/controls/SimpleLoader" src="mx/controls/Local.mxml" />
+ <node label="VideoDisplay" module="mx/controls/VideoDisplayExample" />
+ </node>
+ <node label="Menu Controls">
+ <node label="Menu" module="mx/controls/SimpleMenuExample" />
+ <node label="MenuBar" module="mx/controls/MenuBarExample" />
+ <node label="PopUpMenuButton" module="mx/controls/PopUpButtonMenuExample" />
+ </node>
+ <node label="Text Controls">
+ <node label="Label" module="mx/controls/LabelExample" />
+ <node label="RichTextEditor" module="mx/controls/RichTextEditorExample" />
+ <node label="Text" module="mx/controls/TextExample" />
+ <node label="TextArea" module="mx/controls/TextAreaExample" />
+ <node label="TextInput" module="mx/controls/TextInputExample" />
+ </node>
+ <node label="Containers">
+ <!-- not needed yet
+ <node label="Application" app="mx/core/SimpleApplicationExample" />
+ -->
+ <node label="Accordion" module="mx/containers/AccordionExample" />
+ <!-- not needed yet
+ <node label="ApplicationControlBar" app="mx/containers/SimpleApplicationControlBarExample" />
+ -->
+ <node label="Box" module="mx/containers/SimpleBoxExample" />
+ <node label="Canvas" module="mx/containers/SimpleCanvasExample" />
+ <node label="ControlBar" module="mx/containers/SimpleControlBarExample" />
+ <node label="DividedBox" module="mx/containers/DividedBoxExample" />
+ <node label="Form, FormHeading, FormItem" module="mx/containers/FormExample" />
+ <node label="Grid, GridItem, GridRow" module="mx/containers/GridLayoutExample" />
+ <node label="HBox" module="mx/containers/HBoxExample" />
+ <node label="HDividedBox" module="mx/containers/HDividedBoxExample" />
+ <node label="Panel" module="mx/containers/SimplePanelExample" />
+ <node label="TabNavigator" module="mx/containers/TabNavigatorExample" />
+ <node label="Tile" module="mx/containers/TileLayoutExample" />
+ <node label="TitleWindow" module="mx/containers/TitleWindowApp"
+ src="mx/containers/SimpleTitleWindowExample.mxml" />
+ <node label="VBox" module="mx/containers/VBoxExample" />
+ <node label="VDividedBox" module="mx/containers/VDividedBoxExample" />
+ <node label="ViewStack" module="mx/containers/ViewStackExample" />
+ </node>
+ <node label="Repeater Control">
+ <node label="Repeater" module="mx/core/RepeaterExample" />
+ </node>
+ </node>
+ <node label="Print Controls">
+ <node label="FlexPrintJob, PrintDataGrid" module="mx/printing/PrintDataGridExample"
+ src="mx/printing/FormPrintView.mxml&mx/printing/FormPrintHeader.mxml&mx/printing/FormPrintFooter.mxml" />
+ </node>
+ <node label="Validators and Formatters">
+ <node label="Validators">
+ <node label="CreditCardValidator" module="mx/validators/CreditCardValidatorExample" />
+ <node label="CurrencyValidator" module="mx/validators/CurrencyValidatorExample" />
+ <node label="DateValidator" module="mx/validators/DateValidatorExample" />
+ <node label="EmailValidator" module="mx/validators/EmailValidatorExample" />
+ <node label="NumberValidator" module="mx/validators/NumberValidatorExample" />
+ <node label="PhoneNumberValidator" module="mx/validators/PhoneNumberValidatorExample" />
+ <node label="RegExpValidator" module="mx/validators/RegExValidatorExample" />
+ <node label="SocialSecurityValidator" module="mx/validators/SocialSecurityValidatorExample" />
+ <node label="StringValidator" module="mx/validators/StringValidatorExample" />
+ <node label="Validator" module="mx/validators/SimpleValidatorExample" />
+ <node label="ZipCodeValidator" module="mx/validators/ZipCodeValidatorExample" />
+ </node>
+ <node label="Formatters">
+ <node label="CurrencyFormatter" module="mx/formatters/CurrencyFormatterExample" />
+ <node label="DateFormatter" module="mx/formatters/DateFormatterExample" />
+ <node label="Formatter" module="mx/formatters/SimpleFormatterExample" />
+ <node label="NumberFormatter" module="mx/formatters/NumberFormatterExample" />
+ <node label="PhoneFormatter" module="mx/formatters/PhoneFormatterExample" />
+ <node label="SwitchSymbolFormatter" module="mx/formatters/SwitchSymbolFormatterExample" />
+ <node label="ZipCodeFormatter" module="mx/formatters/ZipCodeFormatterExample" />
+ </node>
+ </node>
+ <node label="Effects, View States, and Transitions">
+ <node label="Effects">
+ <node label="AddItemActionEffect" module="mx/effects/AddItemActionEffectExample" />
+ <node label="AnimateProperty" module="mx/effects/AnimatePropertyEffectExample" />
+ <node label="Blur" module="mx/effects/BlurEffectExample" />
+ <node label="Dissolve" module="mx/effects/DissolveEffectExample" />
+ <node label="Effect" module="mx/effects/SimpleEffectExample" />
+ <node label="Fade" module="mx/effects/FadeEffectExample" />
+ <node label="Glow" module="mx/effects/GlowEffectExample" />
+ <node label="Iris" module="mx/effects/IrisEffectExample" />
+ <node label="Move" module="mx/effects/MoveEffectExample" />
+ <node label="Parallel" module="mx/effects/ParallelEffectExample" />
+ <node label="Pause" module="mx/effects/PauseEffectExample" />
+ <node label="RemoveItemActionEffect" module="mx/effects/AddItemActionEffectExample" />
+ <node label="Resize" module="mx/effects/ResizeEffectExample" />
+ <node label="Rotate" module="mx/effects/RotateEffectExample" />
+ <node label="Sequence" module="mx/effects/SequenceEffectExample" />
+ <node label="SoundEffect" module="mx/effects/SoundEffectExample" />
+ <node label="WipeDown" module="mx/effects/WipeDownExample" />
+ <node label="WipeLeft" module="mx/effects/WipeLeftExample" />
+ <node label="WipeRight" module="mx/effects/WipeRightExample" />
+ <node label="WipeUp" module="mx/effects/WipeUpExample" />
+ <node label="Zoom" module="mx/effects/ZoomEffectExample" />
+ </node>
+ <node label="View States">
+ <node label="State" module="mx/states/StatesExample" />
+ </node>
+ <node label="Transitions">
+ <node label="Transition" module="mx/states/TransitionExample" />
+ </node>
+ </node>
+ <node label="Datavisualization Components">
+ <node label="Charts">
+ <node label="Chart Controls">
+ <node label="AreaChart" module="mx/charts/Line_AreaChartExample" />
+ <node label="AxisRenderer" module="mx/charts/HLOCChartExample" />
+ <node label="BarChart" module="mx/charts/Column_BarChartExample" />
+ <node label="BubbleChart" module="mx/charts/BubbleChartExample" />
+ <node label="CandlestickChart" module="mx/charts/CandlestickChartExample" />
+ <node label="CategoryAxis" module="mx/charts/HLOCChartExample" />
+ <node label="ColumnChart" module="mx/charts/Column_BarChartExample" />
+ <node label="DateTimeAxis" module="mx/charts/DateTimeAxisExample" />
+ <node label="GridLines" module="mx/charts/GridLinesExample" />
+ <node label="HLOCChart" module="mx/charts/HLOCChartExample" />
+ <node label="Legend" module="mx/charts/PlotChartExample" />
+ <node label="LinearAxis" module="mx/charts/HLOCChartExample" />
+ <node label="LineChart" module="mx/charts/Line_AreaChartExample" />
+ <node label="LogAxis" module="mx/charts/LogAxisExample" />
+ <node label="PieChart" module="mx/charts/PieChartExample" />
+ <node label="PlotChart" module="mx/charts/PlotChartExample" />
+ </node>
+ <node label="Chart Series">
+ <node label="AreaSeries" module="mx/charts/Line_AreaChartExample" />
+ <node label="BarSeries" module="mx/charts/Column_BarChartExample" />
+ <node label="BubbleSeries" module="mx/charts/BubbleChartExample" />
+ <node label="CandlestickSeries" module="mx/charts/CandlestickChartExample" />
+ <node label="ColumnSeries" module="mx/charts/Column_BarChartExample" />
+ <node label="HLOCSeries" module="mx/charts/HLOCChartExample" />
+ <node label="LineSeries" module="mx/charts/Line_AreaChartExample" />
+ <node label="PieSeries" module="mx/charts/PieChartExample" />
+ <node label="PlotSeries" module="mx/charts/PlotChartExample" />
+ </node>
+ <node label="Chart Effects">
+ <node label="SeriesInterpolate" module="mx/charts/SeriesInterpolateExample" />
+ <node label="SeriesSlide" module="mx/charts/SeriesSlideExample" />
+ <node label="SeriesZoom" module="mx/charts/SeriesZoomExample" />
+ </node>
+ </node>
+ <node label="AdancedDataGrid">
+ <node label="AdvancedDataGrid" module="mx/controls/AdvancedDataGridExample" />
+ </node>
+ <node label="OLAPDataGrid">
+ <node label="OLAPDataGrid" module="mx/controls/OLAPDataGridExample" />
+ </node>
+ <node label="Printing">
+ <node label="ADG Printing" module="mx/printing/AdvancedPrintDataGridExample" />
+ </node>
+ </node>
+ </node>
+ <node label="Spark Framework Components">
+ <node label="Techniques and Examples">
+ <node label="Advanced CSS">
+ <node label="Descendant Selector" module="spark/css/CSSDescendantSelectorExample" />
+ <node label="ID Selector" module="spark/css/CSSIDSelectorExample" />
+ <node label="Type + Class Selector" module="spark/css/CSSTypeClassSelectorExample" />
+ </node>
+ <node label="Binding">
+ <node label="Bidirectional Binding 1" module="spark/other/BidirectionalBinding1Example" />
+ <node label="Bidirectional Binding 2" module="spark/other/BidirectionalBinding2Example" />
+ </node>
+ <node label="Cursors">
+ <node label="Busy Cursor" module="spark/other/Cursor1Example" />
+ <node label="Custom Cursor" module="spark/other/Cursor2Example" />
+ </node>
+ <!-- Require remote service to work
+ <node label="DataGrid">
+ <node label="DataGrid" module="spark/controls/DataGridExample2"/>
+ <node label="Custom Renderer" module="spark/controls/DataGridCustomRendererExample"/>
+ <node label="Custom Renderer" module="spark/controls/DataGridCustomRendererPrepareExample"/>
+ <node label="Custom Skin" module="spark/controls/DataGridCustomSkinExample"/>
+ <node label="Columns" module="spark/controls/DataGridSimpleColumnsExample"/>
+ <node label="No wrap" module="spark/controls/DataGridSimpleNoWrapExample"/>
+ <node label="Sizing" module="spark/controls/DataGridSizingExample"/>
+ </node>
+ <node label="Data Paging">
+ <node label="Data Paging" module="spark/controls/ListDataPagingExample" />
+ </node>
+ -->
+ <node label="Drag and Drop">
+ <node label="List to List" module="spark/other/DragAndDrop1Example" />
+ <node label="List to Panel" module="spark/other/DragAndDrop2Example" />
+ </node>
+ <node label="Custom Components">
+ <node label="Search" module="spark/components/SearchExample" src="spark/components/SearchBox.as" />
+ <node label="Video Player" module="spark/components/VideoPlayerExample" src="spark/components/VideoPlayer.mxml" />
+ </node>
+ <node label="i18n">
+ <node label="Collator" module="spark/i18n/SparkCollatorExample"/>
+ <node label="Basic Collator" module="spark/i18n/SparkCollator2Example"/>
+ <node label="Currency Validator" module="spark/i18n/SparkCurrencyValidatorExample"/>
+ <node label="Basic Currency Validator" module="spark/i18n/SparkCurrencyValidator2Example"/>
+ <node label="Number Validator" module="spark/i18n/SparkNumberValidatorExample"/>
+ <node label="Basic Number Validator" module="spark/i18n/SparkNumberValidator2Example"/>
+ <node label="Date Time Formatter" module="spark/i18n/SparkDateTimeFormatterExample"/>
+ <node label="Basic Date Time Formatter" module="spark/i18n/SparkDateTimeFormatter2Example"/>
+ <node label="Currency Formatter" module="spark/i18n/SparkCurrencyFormatterExample"/>
+ <node label="Basic Currency Formatter" module="spark/i18n/SparkCurrencyFormatter2Example"/>
+ <node label="Number Formatter" module="spark/i18n/SparkNumberFormatterExample"/>
+ <node label="Basic Number Formatter" module="spark/i18n/SparkNumberFormatter2Example"/>
+ <node label="Sort" module="spark/i18n/SparkSortandSortFieldExample"/>
+ <node label="Basic Sort" module="spark/i18n/SparkSortandSortField2Example"/>
+ <node label="String Tools" module="spark/i18n/SparkStringToolsExample"/>
+ <node label="Formatters" module="spark/i18n/SparkFormatterExample"/>
+ </node>
+ <node label="Item Renderers">
+ <node label="List" module="spark/itemRenderers/ListItemRendererExample" src="spark/itemRenderers/MyListItemRenderer.mxml"/>
+ <node label="Scale Image" module="spark/itemRenderers/ItemRenderer1Example" src="spark/itemRenderers/renderers/ImageRenderer1.mxml" />
+ <node label="3D Rotate" module="spark/itemRenderers/ItemRenderer2Example" src="spark/itemRenderers/renderers/ImageRenderer2.mxml" />
+ </node>
+ <node label="Events">
+ <node label="Inline property" module="spark/events/EventExample1" />
+ <node label="Inline block" module="spark/events/EventExample2" />
+ <node label="Function" module="spark/events/EventExample3" />
+ <node label="addEventListener" module="spark/events/EventExample4" />
+ <node label="Dispatch" module="spark/events/EventExample5" />
+ <node label="Custom" module="spark/events/EventExample6" />
+ </node>
+ <node label="Forms">
+ <node label="Help Form" module="spark/controls/SampleHelpFormExample"/>
+ <node label="Sequence Form" module="spark/controls/SampleSequenceFormExample"/>
+ <node label="Simple Form" module="spark/controls/SampleSimpleFormExample"/>
+ <node label="Stacked Form" module="spark/controls/SampleStackedFormExample"/>
+ </node>
+ <node label="Modules">
+ <node label="Load" module="spark/modules/ModuleExample" />
+ </node>
+ <node label="Repeater">
+ <node label="Repeater" module="spark/other/RepeaterExample" />
+ </node>
+ <node label="ScrollBars">
+ <node label="ScrollBars" module="spark/other/ScrollBarsExample" />
+ </node>
+ <node label="Skinning">
+ <node label="Button With Icon" module="spark/skinning/ButtonWithIconExample" src="spark/skinning/skins/CloseButtonSkin.mxml&spark/skinning/skins/AddButtonSkin.mxml&spark/skinning/skins/IconTextButtonSkin.mxml" />
+ <node label="Gradient Skin" module="spark/skinning/SkinningApplication1Example" src="spark/skinning/skins/GradientBackgroundAppSkin.mxml"/>
+ <node label="Background Image Skin" module="spark/skinning/SkinningApplication2Example" src="spark/skinning/skins/BackgroundImageAppSkin.mxml" />
+ <node label="Control Bar Skin" app="spark/skinning/SkinningApplication3Example" src="spark/skinning/skins/CustomControlBarAppSkin.mxml" />
+ <node label="Container Skin" module="spark/skinning/SkinningContainerExample" src="spark/skinning/skins/CustomSkinnableContainerSkin.mxml" />
+ </node>
+ <node label="Viewport">
+ <node label="Controlling Viewport" module="spark/other/ControllingViewportExample" />
+ </node>
+ </node>
+ <node label="Effects and Filters">
+ <node label="Move 3D" module="spark/effects/Move3DExample" />
+ <node label="Filter" module="spark/other/FilterExample" />
+ <node label="Wipe" module="spark/effects/WipeExample" />
+ <node label="Animate Property" module="spark/effects/AnimatePropertiesExample" />
+ <node label="Animate Transform" module="spark/effects/AnimateTransformExample" />
+ <!-- not working
+ <node label="Cross Fade" module="spark/effects/CrossFadeExample" />
+ -->
+ <node label="Fade" module="spark/effects/FadeExample" />
+ <node label="Rotate 3D" module="spark/effects/Rotate3DExample" />
+ <node label="Scale 3D" module="spark/effects/Scale3DExample" />
+ </node>
+ <node label="Visual Components">
+ <node label="Containers">
+ <node label="Accordion" module="spark/controls/AccordionExample" />
+ <node label="Border" module="spark/containers/BorderExample"/>
+ <node label="DataGroup" module="spark/controls/DataGroupExample" />
+ <node label="Form" module="spark/controls/FormExample" />
+ <node label="HGroup" module="spark/containers/SampleHGroup" />
+ <node label="Group" module="spark/containers/GroupExample"/>
+ <node label="Panel" module="spark/containers/PanelExample"/>
+ <node label="SkinnableDataContainer" module="spark/containers/SkinnableDataContainerExample" />
+ <node label="TabNavigator" module="spark/containers/TabNavigator1Example" />
+ <node label="TabNavigator" module="spark/containers/TabNavigator2Example" />
+ <node label="TileGroup" module="spark/containers/TileGroupExample" />
+ <node label="TitleWindow" module="spark/controls/TitleWindowExample" />
+ <node label="ViewStack" module="spark/controls/ViewStackExample" />
+ <node label="VGroup" module="spark/containers/SampleVGroup" />
+ <node label="Vertical Horizontal Align" module="spark/containers/SampleVerticalHorizontalAlign" />
+ </node>
+ <node label="Graphics and FXG">
+ <node label="Drop Shadow" module="spark/fxg/DropShadowGraphicExample" />
+ <node label="Image" module="spark/fxg/BitmapImageExample" />
+ <node label="Eclipse" module="spark/fxg/EclipseExample" />
+ <node label="Ellipse Transform" module="spark/fxg/EllipseTransformExample" />
+ <node label="Line" module="spark/fxg/LineExample" />
+ <node label="Linear Gradient" module="spark/fxg/LinearGradientsSpreadMethodExample" />
+ <node label="Rectangle" module="spark/fxg/RectExample" />
+ <node label="RichText" module="spark/fxg/RichTextExample" />
+ <node label="Static FXG" module="spark/fxg/StaticFXGExample" />
+ </node>
+ <node label="General Controls">
+ <node label="AdvancedDataGrid" module="spark/controls/AdvancedDatagridExample" />
+ <node label="Checkbox" module="spark/controls/CheckboxExample"/>
+ <node label="ColorPicker" module="spark/controls/ColorPickerExample" />
+ <node label="ComboBox" module="spark/controls/ComboBoxExample" />
+ <node label="DropDown" module="spark/controls/DropdownExample"/>
+ <node label="DataGrid" module="spark/controls/DataGridExample" />
+ <node label="Image" module="spark/controls/ImageExample" />
+ <node label="List" module="spark/controls/ListExample" />
+ <node label="Menu" module="spark/controls/MenuExample" />
+ <node label="NumericStepper" module="spark/controls/NumericStepperExample"/>
+ <node label="OLAPDataGrid" module="spark/controls/OLAPDataGridExample" />
+ <node label="ProgressBar" module="spark/controls/ProgressBarExample" />
+ <node label="RadioButton" module="spark/controls/RadioButtonExample"/>
+ <node label="ScrollBar" module="spark/controls/ScrollBarExample" />
+ <node label="Scroller" module="spark/controls/Scroller1Example"/>
+ <node label="Scroller and Tabbing" module="spark/controls/Scroller2Example"/>
+ <node label="Slider" module="spark/controls/SliderExample"/>
+ <node label="Spinner" module="spark/controls/SpinnerExample"/>
+ <!-- Removed to avoid putting swf in repo
+ <node label="SWFloader" module="spark/controls/SWFLoaderExample" />
+ -->
+ <node label="ToolTip" module="spark/controls/ToolTipExample" />
+ <node label="Tree" module="spark/controls/TreeExample" />
+ <node label="VideoDisplay" module="spark/controls/VideoDisplayExample" />
+ <!-- Removed as it's using an external asset they may not work any more
+ <node label="VideoDisplay" module="spark/controls/OSMFExample" />
+ -->
+ <node label="VideoPlayer" module="spark/controls/VideoPlayerExample" />
+ </node>
+ <node label="Button Controls">
+ <node label="Button" module="spark/controls/ButtonExample"/>
+ <node label="ButtonBar" module="spark/controls/ButtonBarExample"/>
+ <node label="LinkBar" module="spark/controls/LinkBarExample" />
+ <node label="LinkButton" module="spark/controls/LinkButtonExample" />
+ <node label="PopUpButton" module="spark/controls/PopupButtonExample" />
+ <node label="PopUpAnchor" module="spark/controls/PopUpAnchor1Example"/>
+ <node label="PopUpAnchor" module="spark/controls/PopUpAnchor2Example"/>
+ <node label="ToggleButton" module="spark/controls/ToggleButtonExample"/>
+ <node label="ToggleButtonBar" module="spark/controls/ToggleButtonBarExample" />
+ </node>
+ <node label="Date Controls">
+ <node label="DateChooser" module="spark/controls/DateChooserExample" />
+ <node label="DateField" module="spark/controls/DateFieldExample" />
+ </node>
+ <node label="Text Controls">
+ <node label="RichEditableText" module="spark/controls/RichEditableTextExample" />
+ <node label="TextArea" module="spark/controls/TextAreaExample" />
+ <node label="TextInput" module="spark/controls/TextInputExample" />
+ <node label="Sample Layout" module="spark/controls/TextLayout1Example" />
+ <node label="News Layout" module="spark/controls/TextLayout2Example" />
+ <node label="Text Controls" module="spark/controls/TextLayout3Example" />
+ <node label="Import Format Types" module="spark/controls/TextLayout4Example" />
+ <!-- Doesn't comile with current version of TLF
+ <node label="Text Layout Editor" module="spark/tlf/TextLayoutEditorSample" />
+ -->
+ </node>
+ <node label="Layouts">
+ <node label="Animated" module="spark/layouts/CustomLayoutAnimatedExample" />
+ <node label="Baseline" module="spark/layouts/CustomLayoutHBaselineExample" />
+ <node label="Image Wheel" module="spark/layouts/CustomLayoutFlickrWheelExample" />
+ <node label="Text Flow" module="spark/layouts/CustomLayoutFlowExample" />
+ </node>
+ </node>
+ <node label="Charts">
+ <node label="AreaChart" module="spark/charts/AreaChartExample" />
+ <node label="BarChart" module="spark/charts/BarChartExample" />
+ <node label="BubbleChart" module="spark/charts/BubbleChartExample" />
+ <node label="CandleStickChart" module="spark/charts/CandleStickChartExample" />
+ <node label="ColumnChart" module="spark/charts/ColumnChartExample" />
+ <node label="HLOCChart" module="spark/charts/HLOCChartExample" />
+ <node label="LineChart" module="spark/charts/LineChartExample" />
+ <node label="PieChart" module="spark/charts/PieChartExample" />
+ <node label="PlotChart" module="spark/charts/PlotChartExample" />
+ <node label="SeriesInterpolate" module="spark/charts/SeriesInterpolateExample" />
+ <node label="SeriesSlide" module="spark/charts/SeriesSlideExample" />
+ <node label="SeriesZoom" module="spark/charts/SeriesZoomExample" />
+ </node>
+ <node label="Validators and Formatters">
+ <node label="Validators">
+ <node label="CreditCardValidator" module="spark/validators/CreditCardValidatorExample" />
+ <node label="CurrencyValidator" module="spark/validators/CurrencyValidatorExample" />
+ <node label="DateValidator" module="spark/validators/DateValidatorExample" />
+ <node label="EmailValidator" module="spark/validators/EmailValidatorExample" />
+ <node label="NumberValidator" module="spark/validators/NumberValidatorExample" />
+ <node label="RegExpValidator" module="spark/validators/RegExpValidatorExample" />
+ <node label="SocialSecurityValidator" module="spark/validators/SocialSecurityValidatorExample" />
+ <node label="StringValidator" module="spark/validators/StringValidatorExample" />
+ <node label="Validator" module="spark/validators/FormValidatorExample" />
+ <node label="ZipCodeValidator" module="spark/validators/ZipCodeValidatorExample" />
+ </node>
+ <node label="Formatters">
+ <node label="CurrencyFormatter" module="spark/formatters/CurrencyFormatterExample" />
+ <node label="DateFormatter" module="spark/formatters/DateFormatterExample" />
+ <node label="NumberFormatter" module="spark/formatters/NumberFormatterExample" />
+ <node label="PhoneFormatter" module="spark/formatters/PhoneFormatterExample" />
+ <node label="SwitchFormatter" module="spark/formatters/SwitchFormatterExample" />
+ <node label="ZipCodeFormatter" module="spark/formatters/ZipCodeFormatterExample" />
+ </node>
+ </node>
+ </node>
+ <node label="Apache Flex Components and Features">
+ <node label="Apache Flex 4.8" module="apache/ApacheFlex4_8_0">
+ <!-- Do we habe any examples here? -->
+ </node>
+ <node label="Apache Flex 4.9" module="apache/ApacheFlex4_9_0">
+ <!-- Add more examples here -->
+ <node label="PostCodeFormatter" module="apache/formatters/PostCodeFormatterExample"/>
+ <node label="PostCodeValidator" module="apache/validators/PostCodeValidatorExample"/>
+ <node label="New SDK locales" module="apache/i18n/LocaleExample"/>
+ </node>
+ <node label="Apache Flex 4.10" module="apache/ApacheFlex4_10_0">
+ <!-- Add more examples here -->
+ <node label="International Dates" module="apache/i18n/DateExample"/>
+ <node label="Millisecond Formatting" module="apache/i18n/MillisecondExample"/>
+ <node label="NumberStepper" module="apache/i18n/NumericStepperExample"/>
+ <node label="Scientific Notation Formatting" module="apache/i18n/ScientificExample"/>
+ <node label="Timezone Formatting" module="apache/i18n/TimeZoneExample"/>
+ </node>
+ <node label="Apache Flex 4.11" module="apache/ApacheFlex4_11_0">
+ <!-- Add more examples here -->
+ <node label="Callout" module="apache/containers/CalloutExample"/>
+ </node>
+ <node label="Apache Flex 4.12" module="apache/ApacheFlex4_12_1">
+ <!-- Add more examples here -->
+ <node label="MaskedTextInput" module="apache/controls/MaskedTextInputExample"/>
+ </node>
+ <node label="Apache Flex 4.13" module="apache/ApacheFlex4_13_0">
+ <!-- Add examples here -->
+ </node>
+ <node label="Apache Flex 4.14" module="apache/ApacheFlex4_14_0">
+ <node label="MaskedTextInput" module="apache/controls/SparkRichTextEditorExample"/>
+ </node>
+ <node label="Apache Flex Squiggly" module="apache/Squiggly1_1">
+ <node label="MX Spelling Example" module="apache/squiggly/SpellingExample"/>
+ <node label="Spark Spelling Example" module="apache/squiggly/SpellingExExample"/>
+ </node>
+ </node>
+ </node>
+</compTree>
diff --git a/tourdeflexmodules/src/favicon.ico b/tourdeflexmodules/src/favicon.ico
new file mode 100644
index 0000000..d2be817
--- /dev/null
+++ b/tourdeflexmodules/src/favicon.ico
Binary files differ
diff --git a/tourdeflexmodules/src/index.html b/tourdeflexmodules/src/index.html
new file mode 100755
index 0000000..75e06d9
--- /dev/null
+++ b/tourdeflexmodules/src/index.html
@@ -0,0 +1,79 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Apache Flex® Tour De Flex Component Explorer</title>
+<script src="AC_OETags.js" language="javascript"></script>
+<style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: #ffffff; }
+ object:focus { outline:none; }
+ #flashContent { display:none; }
+</style>
+<script type="text/javascript" src="swfobject.js"></script>
+<script type="text/javascript">
+ var swfVersionStr = "11.1.0";
+ var xiSwfUrlStr = "";
+ var flashvars = {};
+ if (swfobject.getQueryParamValue("app") && swfobject.getQueryParamValue("app")) {
+ flashvars.app = swfobject.getQueryParamValue("app");
+ }
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "#ffffff";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "TourDeFlex";
+ attributes.name = "TourDeFlex";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "explorer.swf", "flashContent",
+ "100%", "100%",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+</script>
+<!-- Google Analytics -->
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-37926454-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+</head>
+
+<body scroll='no'>
+<div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+</div>
+</body>
+</html>
diff --git a/tourdeflexmodules/src/loaderPanel.mxml b/tourdeflexmodules/src/loaderPanel.mxml
new file mode 100755
index 0000000..1c1653d
--- /dev/null
+++ b/tourdeflexmodules/src/loaderPanel.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<mx:Box xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="100%" height="100%">
+ <fx:Script>
+ <![CDATA[
+ import flash.net.navigateToURL;
+ private var _link:String;
+ //For third party components, we are loading an image. Clicking on the image
+ //would take the user to the demo app on the third party website
+ public function loadApp(swfApp:String, link:String=""):void
+ {
+ myLoader.source = swfApp;
+ myLoader.visible = true;
+ myLoader.includeInLayout = true;
+ myModuleLoader.visible = false;
+ myModuleLoader.includeInLayout = false;
+ if(link != "")
+ {
+ _link = link;
+ myLoader.addEventListener(MouseEvent.CLICK, handleClick);
+ myLoader.buttonMode = myLoader.useHandCursor = true;
+ }
+ else
+ {
+ myLoader.removeEventListener(MouseEvent.CLICK, handleClick);
+ myLoader.buttonMode = myLoader.useHandCursor = false;
+ }
+
+ }
+
+ //For third party components, we are loading an image. Clicking on the image
+ //would take the user to the demo app on the third party website
+ public function loadModule(swfApp:String, link:String=""):void
+ {
+ myModuleLoader.url = swfApp;
+ myModuleLoader.visible = true;
+ myModuleLoader.includeInLayout = true;
+ myLoader.visible = false;
+ myLoader.includeInLayout = false;
+ }
+
+ private function handleClick(event:MouseEvent):void
+ {
+ navigateToURL(new URLRequest(_link),"_blank");
+ }
+
+ ]]>
+ </fx:Script>
+
+<mx:SWFLoader id="myLoader" width="100%" height="100%" horizontalAlign="center" verticalAlign="middle" />
+<mx:ModuleLoader id="myModuleLoader" width="100%" height="100%" horizontalAlign="center" verticalAlign="middle" />
+
+</mx:Box>
diff --git a/tourdeflexmodules/src/mx/charts/BubbleChartExample.mxml b/tourdeflexmodules/src/mx/charts/BubbleChartExample.mxml
new file mode 100755
index 0000000..5e6cd2d
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/BubbleChartExample.mxml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the BubbleChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var expensesAC:ArrayCollection = new ArrayCollection( [
+ { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
+ { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
+ { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
+ { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
+ { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define custom color and line style for the bubbles. -->
+ <mx:SolidColor id="sc1" alpha=".3"/>
+ <mx:SolidColorStroke id="stroke1" weight="1"/>
+ </fx:Declarations>
+
+ <mx:Panel title="BubbleChart Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <mx:BubbleChart id="bubblechart"
+ height="100%" width="100%"
+ paddingRight="5" paddingLeft="5"
+ showDataTips="true" maxRadius="20"
+ dataProvider="{expensesAC}">
+ <mx:series>
+ <mx:BubbleSeries
+ displayName="Profit/Expenses/Amount"
+ xField="Profit"
+ yField="Expenses"
+ radiusField="Amount"
+ fill="{sc1}"
+ stroke="{stroke1}" />
+ </mx:series>
+ </mx:BubbleChart>
+ <mx:Legend dataProvider="{bubblechart}"/>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/CandlestickChartExample.mxml b/tourdeflexmodules/src/mx/charts/CandlestickChartExample.mxml
new file mode 100755
index 0000000..e2c277e
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/CandlestickChartExample.mxml
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the CandlestickChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var expensesAC:ArrayCollection = new ArrayCollection( [
+ { Date: "25-Jul", Open: 40.75, High: 40.75, Low: 40.24, Close:40.31},
+ { Date: "26-Jul", Open: 39.98, High: 40.78, Low: 39.97, Close:40.34},
+ { Date: "27-Jul", Open: 40.38, High: 40.66, Low: 40, Close:40.63},
+ { Date: "28-Jul", Open: 40.49, High: 40.99, Low: 40.3, Close:40.98},
+ { Date: "29-Jul", Open: 40.13, High: 40.4, Low: 39.65, Close:39.95},
+ { Date: "1-Aug", Open: 39.00, High: 39.50, Low: 38.7, Close:38.6},
+ { Date: "2-Aug", Open: 38.68, High: 39.34, Low: 37.75, Close:38.84},
+ { Date: "3-Aug", Open: 38.76, High: 38.76, Low: 38.03, Close:38.12},
+ { Date: "4-Aug", Open: 37.98, High: 37.98, Low: 36.56, Close:36.69},
+ { Date: "5-Aug", Open: 36.61, High: 37, Low: 36.48, Close:36.86} ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define custom colors for the candles. -->
+ <mx:SolidColor id="up" color="green" alpha=".8"/>
+ <mx:SolidColor id="down" color="red" alpha=".8"/>
+
+ <!-- Define custom Stroke for the candle wick. -->
+ <mx:SolidColorStroke id="wick" color="black" weight="2"/>
+
+ <!-- Define custom Stroke for the candle box. -->
+ <mx:SolidColorStroke id="box" color="black" weight="1"/>
+ </fx:Declarations>
+
+ <mx:Panel title="CandlestickChart Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <mx:CandlestickChart id="candlestickchart"
+ height="100%"
+ width="100%"
+ paddingRight="5"
+ paddingLeft="5"
+ showDataTips="true"
+ dataProvider="{expensesAC}">
+ <mx:verticalAxis>
+ <mx:LinearAxis id="vaxis" baseAtZero="false" title="Price"/>
+ </mx:verticalAxis>
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis id="haxis" categoryField="Date" title="Date"/>
+ </mx:horizontalAxis>
+
+ <mx:horizontalAxisRenderers>
+ <mx:AxisRenderer axis="{haxis}" canDropLabels="true"/>
+ </mx:horizontalAxisRenderers>
+
+ <mx:series>
+ <mx:CandlestickSeries
+ openField="Open"
+ highField="High"
+ lowField="Low"
+ closeField="Close"
+ fill="{up}"
+ declineFill="{down}"
+ stroke="{wick}"
+ boxStroke="{box}" />
+ </mx:series>
+ </mx:CandlestickChart>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/Column_BarChartExample.mxml b/tourdeflexmodules/src/mx/charts/Column_BarChartExample.mxml
new file mode 100755
index 0000000..b787d38
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/Column_BarChartExample.mxml
@@ -0,0 +1,119 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the ColumnChart and BarChart controls. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var medalsAC:ArrayCollection = new ArrayCollection( [
+ { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
+ { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
+ { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 } ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define custom colors for use as fills. -->
+ <mx:SolidColor id="sc1" color="yellow" alpha=".8"/>
+ <mx:SolidColor id="sc2" color="0xCCCCCC" alpha=".6"/>
+ <mx:SolidColor id="sc3" color="0xFFCC66" alpha=".6"/>
+
+ <!-- Define custom Strokes for the columns. -->
+ <mx:SolidColorStroke id="s1" color="yellow" weight="2"/>
+ <mx:SolidColorStroke id="s2" color="0xCCCCCC" weight="2"/>
+ <mx:SolidColorStroke id="s3" color="0xFFCC66" weight="2"/>
+ </fx:Declarations>
+
+ <mx:Panel title="ColumnChart and BarChart Controls Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ layout="horizontal" height="100%" width="100%">
+ <mx:ColumnChart id="column"
+ height="100%"
+ width="45%"
+ paddingLeft="5"
+ paddingRight="5"
+ showDataTips="true"
+ dataProvider="{medalsAC}">
+ <mx:horizontalAxis>
+ <mx:CategoryAxis categoryField="Country"/>
+ </mx:horizontalAxis>
+
+ <mx:series>
+ <mx:ColumnSeries
+ xField="Country"
+ yField="Gold"
+ displayName="Gold"
+ fill="{sc1}"
+ stroke="{s1}" />
+ <mx:ColumnSeries
+ xField="Country"
+ yField="Silver"
+ displayName="Silver"
+ fill="{sc2}"
+ stroke="{s2}" />
+ <mx:ColumnSeries
+ xField="Country"
+ yField="Bronze"
+ displayName="Bronze"
+ fill="{sc3}"
+ stroke="{s3}" />
+ </mx:series>
+ </mx:ColumnChart>
+
+ <mx:Legend dataProvider="{column}"/>
+
+ <mx:BarChart id="bar" height="100%" width="45%"
+ paddingLeft="5" paddingRight="5"
+ showDataTips="true" dataProvider="{medalsAC}">
+
+ <mx:verticalAxis>
+ <mx:CategoryAxis categoryField="Country"/>
+ </mx:verticalAxis>
+
+ <mx:series>
+ <mx:BarSeries
+ yField="Country"
+ xField="Gold"
+ displayName="Gold"
+ fill="{sc1}"
+ stroke="{s1}" />
+ <mx:BarSeries
+ yField="Country"
+ xField="Silver"
+ displayName="Silver"
+ fill="{sc2}"
+ stroke="{s2}" />
+ <mx:BarSeries
+ yField="Country"
+ xField="Bronze"
+ displayName="Bronze"
+ fill="{sc3}"
+ stroke="{s3}" />
+ </mx:series>
+ </mx:BarChart>
+
+ <mx:Legend dataProvider="{bar}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/DateTimeAxisExample.mxml b/tourdeflexmodules/src/mx/charts/DateTimeAxisExample.mxml
new file mode 100755
index 0000000..53de874
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/DateTimeAxisExample.mxml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the DateTimeAxis class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ public var stockDataAC:ArrayCollection = new ArrayCollection( [
+ {date: "2005, 7, 27", close: 41.71},
+ {date: "2005, 7, 28", close: 42.21},
+ {date: "2005, 7, 29", close: 42.11},
+ {date: "2005, 8, 1", close: 42.71},
+ {date: "2005, 8, 2", close: 42.99},
+ {date: "2005, 8, 3", close: 44} ]);
+
+ public function myParseFunction(s:String):Date {
+ // Get an array of Strings from the comma-separated String passed in.
+ var a:Array = s.split(",");
+ // Create the new Date object. Subtract one from
+ // the month property because months are zero-based in
+ // the Date constructor.
+ var newDate:Date = new Date(a[0],a[1]-1,a[2]);
+ return newDate;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="DateTimeAxis Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:LineChart id="mychart" height="100%" width="100%"
+ paddingRight="5" paddingLeft="5"
+ showDataTips="true" dataProvider="{stockDataAC}">
+
+ <mx:horizontalAxis>
+ <mx:DateTimeAxis dataUnits="days" parseFunction="myParseFunction"/>
+ </mx:horizontalAxis>
+
+ <mx:verticalAxis>
+ <mx:LinearAxis baseAtZero="false" />
+ </mx:verticalAxis>
+
+ <mx:series>
+ <mx:LineSeries yField="close" xField="date" displayName="AAPL"/>
+ </mx:series>
+ </mx:LineChart>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/GridLinesExample.mxml b/tourdeflexmodules/src/mx/charts/GridLinesExample.mxml
new file mode 100755
index 0000000..95b15ca
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/GridLinesExample.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the GridLines class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ 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>
+
+ <mx:Panel title="GridLines Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <mx:LineChart id="linechart" height="100%" width="100%"
+ paddingLeft="5" paddingRight="5"
+ showDataTips="true" dataProvider="{expensesAC}">
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis categoryField="Month"/>
+ </mx:horizontalAxis>
+
+ <mx:backgroundElements>
+ <mx:GridLines gridDirection="horizontal">
+ <mx:horizontalStroke>
+ <mx:SolidColorStroke weight="1"/>
+ </mx:horizontalStroke>
+ <mx:horizontalFill>
+ <mx:SolidColor color="0xCCCCCC" alpha=".66"/>
+ </mx:horizontalFill>
+ </mx:GridLines>
+ </mx:backgroundElements>
+
+ <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}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/HLOCChartExample.mxml b/tourdeflexmodules/src/mx/charts/HLOCChartExample.mxml
new file mode 100755
index 0000000..8580b3c
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/HLOCChartExample.mxml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the HLOCChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var 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>
+
+ <fx:Declarations>
+ <!-- Define custom Stroke for the wick and ticks. -->
+ <mx:SolidColorStroke id="s1" color="0x000000" weight="5" joints="bevel" caps="square"/>
+ </fx:Declarations>
+
+ <mx:Panel title="HLOCChart Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <mx:HLOCChart id="hlocchart" height="100%" width="100%"
+ paddingRight="5" paddingLeft="5"
+ showDataTips="true" dataProvider="{stockDataAC}">
+
+ <mx:verticalAxis>
+ <mx:LinearAxis id="vaxis" baseAtZero="false" title="Price"/>
+ </mx:verticalAxis>
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis id="haxis" categoryField="Date" title="Date"/>
+ </mx:horizontalAxis>
+
+ <mx:horizontalAxisRenderers>
+ <mx:AxisRenderer axis="{haxis}" canDropLabels="true"/>
+ </mx:horizontalAxisRenderers>
+
+ <mx:series>
+ <mx:HLOCSeries
+ openField="Open"
+ highField="High"
+ lowField="Low"
+ closeField="Close"
+ stroke="{s1}"
+ openTickStroke="{s1}"
+ closeTickStroke="{s1}"
+ openTickLength="7"
+ closeTickLength="7" />
+ </mx:series>
+ </mx:HLOCChart>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/Line_AreaChartExample.mxml b/tourdeflexmodules/src/mx/charts/Line_AreaChartExample.mxml
new file mode 100755
index 0000000..4327376
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/Line_AreaChartExample.mxml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the LineChart and AreaChart controls. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var expensesAC:ArrayCollection = new ArrayCollection( [
+ { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
+ { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
+ { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
+ { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
+ { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define custom colors for use as fills in the AreaChart control. -->
+ <mx:SolidColor id="sc1" alpha=".3"/>
+ <mx:SolidColor id="sc2" color="red" alpha=".3"/>
+ <mx:SolidColor id="sc3" color="green" alpha=".3"/>
+
+ <!-- Define custom Strokes. -->
+ <mx:SolidColorStroke id = "s1" weight="2"/>
+ <mx:SolidColorStroke id = "s2" color="red" weight="2"/>
+ <mx:SolidColorStroke id = "s3" color="green" weight="2"/>
+ </fx:Declarations>
+
+ <mx:Panel title="LineChart and AreaChart Controls Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ layout="horizontal" height="100%" width="100%">
+
+
+ <mx:LineChart id="linechart" height="100%" width="45%"
+ paddingLeft="5" paddingRight="5"
+ showDataTips="true" dataProvider="{expensesAC}">
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis categoryField="Month"/>
+ </mx:horizontalAxis>
+
+ <mx:series>
+ <mx:LineSeries yField="Profit" form="curve" displayName="Profit" lineStroke="{s1}"/>
+ <mx:LineSeries yField="Expenses" form="curve" displayName="Expenses" lineStroke="{s2}"/>
+ <mx:LineSeries yField="Amount" form="curve" displayName="Amount" lineStroke="{s3}"/>
+ </mx:series>
+ </mx:LineChart>
+
+ <mx:Legend dataProvider="{linechart}"/>
+
+ <mx:AreaChart id="Areachart" height="100%" width="45%"
+ paddingLeft="5" paddingRight="5"
+ showDataTips="true" dataProvider="{expensesAC}">
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis categoryField="Month"/>
+ </mx:horizontalAxis>
+
+ <mx:series>
+ <mx:AreaSeries yField="Profit" form="curve" displayName="Profit" areaStroke="{s1}" areaFill="{sc1}"/>
+ <mx:AreaSeries yField="Expenses" form="curve" displayName="Expenses" areaStroke="{s2}" areaFill="{sc2}"/>
+ <mx:AreaSeries yField="Amount" form="curve" displayName="Amount" areaStroke="{s3}" areaFill="{sc3}"/>
+ </mx:series>
+ </mx:AreaChart>
+
+ <mx:Legend dataProvider="{Areachart}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/LogAxisExample.mxml b/tourdeflexmodules/src/mx/charts/LogAxisExample.mxml
new file mode 100755
index 0000000..f52d06b
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/LogAxisExample.mxml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the LogAxis class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var expensesAC:ArrayCollection = new ArrayCollection( [
+ { Month: "Jan", Profit: 20000, Expenses: 1500, Amount: 450 },
+ { Month: "Feb", Profit: 1000, Expenses: 15000, Amount: 600 },
+ { Month: "Mar", Profit: 15000, Expenses: 5000, Amount: 300 },
+ { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
+ { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="LogAxis Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:LineChart id="linechart" height="100%" width="100%"
+ paddingLeft="5" paddingRight="5"
+ showDataTips="true" dataProvider="{expensesAC}">
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis categoryField="Month"/>
+ </mx:horizontalAxis>
+
+ <mx:verticalAxis>
+ <mx:LogAxis interval="10"/>
+ </mx:verticalAxis>
+
+ <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}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/PieChartExample.mxml b/tourdeflexmodules/src/mx/charts/PieChartExample.mxml
new file mode 100755
index 0000000..54a8f04
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/PieChartExample.mxml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the PieChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var 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>
+
+ <fx:Declarations>
+ <!-- Define custom colors for use as pie wedge fills. -->
+ <mx:SolidColor id="sc1" alpha=".6"/>
+ <mx:SolidColor id="sc2" color="red" alpha=".6"/>
+ <mx:SolidColor id="sc3" color="0x663300" alpha=".6"/>
+
+ <!-- This Stroke is used for the callout lines. -->
+ <mx:SolidColorStroke id="callouts" weight="2" color="0x999999" alpha=".8" caps="square"/>
+
+ <!-- This Stroke is used to separate the wedges in the pie. -->
+ <mx:SolidColorStroke id="radial" weight="1" color="0xFFFFCC" alpha=".3"/>
+
+ <!-- This Stroke is used for the outer border of the pie. -->
+ <mx:SolidColorStroke id="pieborder" color="0x000000" weight="2" alpha=".5"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Olympics 2004 Medals Tally Panel"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <mx:PieChart id="chart"
+ height="100%"
+ width="100%"
+ paddingRight="5"
+ paddingLeft="5"
+ showDataTips="true"
+ dataProvider="{medalsAC}">
+ <mx:series>
+ <mx:PieSeries
+ nameField="Country"
+ labelPosition="callout"
+ field="Gold"
+ labelFunction="displayGold"
+ calloutStroke="{callouts}"
+ radialStroke="{radial}"
+ stroke="{pieborder}"
+ fills="{[sc1, sc2, sc3]}">
+ <!-- Clear the drop shadow filters from the chart. -->
+ <mx:filters>
+ <fx:Array/>
+ </mx:filters>
+ </mx:PieSeries>
+ </mx:series>
+ </mx:PieChart>
+ <mx:Legend dataProvider="{chart}"/>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/PlotChartExample.mxml b/tourdeflexmodules/src/mx/charts/PlotChartExample.mxml
new file mode 100755
index 0000000..e08ead0
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/PlotChartExample.mxml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the PlotChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var expensesAC:ArrayCollection = new ArrayCollection( [
+ { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
+ { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
+ { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 } ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define custom colors for use as plot point fills. -->
+ <mx:SolidColor id="sc1" alpha=".3"/>
+ <mx:SolidColor id="sc2" color="red" alpha=".3"/>
+ <mx:SolidColor id="sc3" color="green" alpha=".3"/>
+
+ <!-- Define custom Strokes. -->
+ <mx:SolidColorStroke id="s1" weight="1"/>
+ <mx:SolidColorStroke id="s2" color="red" weight="1"/>
+ <mx:SolidColorStroke id="s3" color="green" weight="1"/>
+ </fx:Declarations>
+
+ <mx:Panel title="PlotChart Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <mx:PlotChart id="plot"
+ height="100%"
+ width="100%"
+ paddingLeft="5"
+ paddingRight="5"
+ showDataTips="true"
+ dataProvider="{expensesAC}">
+ <mx:series>
+ <mx:PlotSeries
+ xField="Expenses"
+ yField="Profit"
+ displayName="Plot 1"
+ fill="{sc1}"
+ stroke="{s1}" />
+ <mx:PlotSeries
+ xField="Amount"
+ yField="Expenses"
+ displayName="Plot 2"
+ fill="{sc2}"
+ stroke="{s2}" />
+ <mx:PlotSeries
+ xField="Profit"
+ yField="Amount"
+ displayName="Plot 3"
+ fill="{sc3}"
+ stroke="{s3}" />
+ </mx:series>
+ </mx:PlotChart>
+ <mx:Legend dataProvider="{plot}"/>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/SeriesInterpolateExample.mxml b/tourdeflexmodules/src/mx/charts/SeriesInterpolateExample.mxml
new file mode 100755
index 0000000..152c2c6
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/SeriesInterpolateExample.mxml
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the CandlestickChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var companyAAC:ArrayCollection = new ArrayCollection( [
+ { Date: "25-Jul", Open: 40.75, High: 40.75, Low: 40.24, Close:40.31},
+ { Date: "26-Jul", Open: 39.98, High: 40.78, Low: 39.97, Close:40.34},
+ { Date: "27-Jul", Open: 40.38, High: 40.66, Low: 40, Close:40.63},
+ { Date: "28-Jul", Open: 40.49, High: 40.99, Low: 40.3, Close:40.98},
+ { Date: "29-Jul", Open: 40.13, High: 40.4, Low: 39.65, Close:39.95},
+ { Date: "1-Aug", Open: 39.00, High: 39.50, Low: 38.7, Close:38.6},
+ { Date: "2-Aug", Open: 38.68, High: 39.34, Low: 37.75, Close:38.84},
+ { Date: "3-Aug", Open: 38.76, High: 38.76, Low: 38.03, Close:38.12},
+ { Date: "4-Aug", Open: 37.98, High: 37.98, Low: 36.56, Close:36.69},
+ { Date: "5-Aug", Open: 36.61, High: 37, Low: 36.48, Close:36.86} ]);
+
+ [Bindable]
+ private var companyBAC:ArrayCollection = new ArrayCollection( [
+ { Date: "25-Jul", Open: 18.50, High: 19, Low: 18.48, Close:18.86},
+ { Date: "26-Jul", Open: 19.56, High: 19.98, Low: 18.6, Close:18.69},
+ { Date: "27-Jul", Open: 20.81, High: 20.99, Low: 20.03, Close:20.12},
+ { Date: "28-Jul", Open: 20.70, High: 21.00, Low: 19.5, Close:20.84},
+ { Date: "29-Jul", Open: 21.7, High: 21.79, Low: 20.45, Close:20.6},
+ { Date: "1-Aug", Open: 22.45, High: 22.65, Low: 21.65, Close:21.95},
+ { Date: "2-Aug", Open: 22.56, High: 22.6, Low: 22.05, Close:22.98},
+ { Date: "3-Aug", Open: 22.42, High: 22.70, Low: 22.1, Close:22.63},
+ { Date: "4-Aug", Open: 21.67, High: 22.82, Low: 21.67, Close:22.34},
+ { Date: "5-Aug", Open: 22.44, High: 22.85, Low: 22.12, Close:22.31} ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:SeriesInterpolate id="interpolateIn" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="CandlestickChart Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:CandlestickChart id="candlestickchart" height="100%" width="100%"
+ paddingRight="5" paddingLeft="5"
+ showDataTips="true" dataProvider="{companyAAC}">
+
+ <mx:verticalAxis>
+ <mx:LinearAxis id="vaxis" baseAtZero="false" title="Price"/>
+ </mx:verticalAxis>
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis id="haxis" categoryField="Date" title="Date"/>
+ </mx:horizontalAxis>
+
+ <mx:horizontalAxisRenderers>
+ <mx:AxisRenderer axis="{haxis}" canDropLabels="true"/>
+ </mx:horizontalAxisRenderers>
+
+ <mx:series>
+ <mx:CandlestickSeries
+ openField="Open" highField="High"
+ lowField="Low" closeField="Close"
+ showDataEffect="{interpolateIn}"/>
+ </mx:series>
+ </mx:CandlestickChart>
+
+ <mx:Label width="100%"
+ text="Choose a company to view recent stock data."/>
+
+ <mx:HBox>
+ <mx:RadioButton groupName="stocks" label="View Company A"
+ selected="true" click="candlestickchart.dataProvider=companyAAC"/>
+ <mx:RadioButton groupName="stocks" label="View Company B"
+ click="candlestickchart.dataProvider=companyBAC"/>
+ </mx:HBox>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/SeriesSlideExample.mxml b/tourdeflexmodules/src/mx/charts/SeriesSlideExample.mxml
new file mode 100755
index 0000000..b94872c
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/SeriesSlideExample.mxml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the CandlestickChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var companyAAC:ArrayCollection = new ArrayCollection( [
+ { Date: "25-Jul", Open: 40.75, High: 40.75, Low: 40.24, Close:40.31},
+ { Date: "26-Jul", Open: 39.98, High: 40.78, Low: 39.97, Close:40.34},
+ { Date: "27-Jul", Open: 40.38, High: 40.66, Low: 40, Close:40.63},
+ { Date: "28-Jul", Open: 40.49, High: 40.99, Low: 40.3, Close:40.98},
+ { Date: "29-Jul", Open: 40.13, High: 40.4, Low: 39.65, Close:39.95},
+ { Date: "1-Aug", Open: 39.00, High: 39.50, Low: 38.7, Close:38.6},
+ { Date: "2-Aug", Open: 38.68, High: 39.34, Low: 37.75, Close:38.84},
+ { Date: "3-Aug", Open: 38.76, High: 38.76, Low: 38.03, Close:38.12},
+ { Date: "4-Aug", Open: 37.98, High: 37.98, Low: 36.56, Close:36.69},
+ { Date: "5-Aug", Open: 36.61, High: 37, Low: 36.48, Close:36.86} ]);
+
+ [Bindable]
+ private var companyBAC:ArrayCollection = new ArrayCollection( [
+ { Date: "25-Jul", Open: 18.50, High: 19, Low: 18.48, Close:18.86},
+ { Date: "26-Jul", Open: 19.56, High: 19.98, Low: 18.6, Close:18.69},
+ { Date: "27-Jul", Open: 20.81, High: 20.99, Low: 20.03, Close:20.12},
+ { Date: "28-Jul", Open: 20.70, High: 21.00, Low: 19.5, Close:20.84},
+ { Date: "29-Jul", Open: 21.7, High: 21.79, Low: 20.45, Close:20.6},
+ { Date: "1-Aug", Open: 22.45, High: 22.65, Low: 21.65, Close:21.95},
+ { Date: "2-Aug", Open: 22.56, High: 22.6, Low: 22.05, Close:22.98},
+ { Date: "3-Aug", Open: 22.42, High: 22.70, Low: 22.1, Close:22.63},
+ { Date: "4-Aug", Open: 21.67, High: 22.82, Low: 21.67, Close:22.34},
+ { Date: "5-Aug", Open: 22.44, High: 22.85, Low: 22.12, Close:22.31} ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:SeriesSlide id="slideIn" duration="1000" direction="up"/>
+ <mx:SeriesSlide id="slideOut" duration="1000" direction="down"/>
+ </fx:Declarations>
+
+ <mx:Panel title="CandlestickChart Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:CandlestickChart id="candlestickchart" height="100%" width="100%"
+ paddingRight="5" paddingLeft="5"
+ showDataTips="true" dataProvider="{companyAAC}">
+
+ <mx:verticalAxis>
+ <mx:LinearAxis id="vaxis" baseAtZero="false" title="Price"/>
+ </mx:verticalAxis>
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis id="haxis" categoryField="Date" title="Date"/>
+ </mx:horizontalAxis>
+
+ <mx:horizontalAxisRenderers>
+ <mx:AxisRenderer axis="{haxis}" canDropLabels="true"/>
+ </mx:horizontalAxisRenderers>
+
+ <mx:series>
+ <mx:CandlestickSeries
+ openField="Open" highField="High"
+ lowField="Low" closeField="Close"
+ showDataEffect="{slideIn}"
+ hideDataEffect="{slideOut}"/>
+ </mx:series>
+ </mx:CandlestickChart>
+
+ <mx:Label width="100%"
+ text="Choose a company to view recent stock data."/>
+
+ <mx:HBox>
+ <mx:RadioButton groupName="stocks" label="View Company A"
+ selected="true" click="candlestickchart.dataProvider=companyAAC"/>
+ <mx:RadioButton groupName="stocks" label="View Company B"
+ click="candlestickchart.dataProvider=companyBAC"/>
+ </mx:HBox>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/charts/SeriesZoomExample.mxml b/tourdeflexmodules/src/mx/charts/SeriesZoomExample.mxml
new file mode 100755
index 0000000..c993970
--- /dev/null
+++ b/tourdeflexmodules/src/mx/charts/SeriesZoomExample.mxml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the CandlestickChart control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var companyAAC:ArrayCollection = new ArrayCollection( [
+ { Date: "25-Jul", Open: 40.75, High: 40.75, Low: 40.24, Close:40.31},
+ { Date: "26-Jul", Open: 39.98, High: 40.78, Low: 39.97, Close:40.34},
+ { Date: "27-Jul", Open: 40.38, High: 40.66, Low: 40, Close:40.63},
+ { Date: "28-Jul", Open: 40.49, High: 40.99, Low: 40.3, Close:40.98},
+ { Date: "29-Jul", Open: 40.13, High: 40.4, Low: 39.65, Close:39.95},
+ { Date: "1-Aug", Open: 39.00, High: 39.50, Low: 38.7, Close:38.6},
+ { Date: "2-Aug", Open: 38.68, High: 39.34, Low: 37.75, Close:38.84},
+ { Date: "3-Aug", Open: 38.76, High: 38.76, Low: 38.03, Close:38.12},
+ { Date: "4-Aug", Open: 37.98, High: 37.98, Low: 36.56, Close:36.69},
+ { Date: "5-Aug", Open: 36.61, High: 37, Low: 36.48, Close:36.86} ]);
+
+ [Bindable]
+ private var companyBAC:ArrayCollection = new ArrayCollection( [
+ { Date: "25-Jul", Open: 18.50, High: 19, Low: 18.48, Close:18.86},
+ { Date: "26-Jul", Open: 19.56, High: 19.98, Low: 18.6, Close:18.69},
+ { Date: "27-Jul", Open: 20.81, High: 20.99, Low: 20.03, Close:20.12},
+ { Date: "28-Jul", Open: 20.70, High: 21.00, Low: 19.5, Close:20.84},
+ { Date: "29-Jul", Open: 21.7, High: 21.79, Low: 20.45, Close:20.6},
+ { Date: "1-Aug", Open: 22.45, High: 22.65, Low: 21.65, Close:21.95},
+ { Date: "2-Aug", Open: 22.56, High: 22.6, Low: 22.05, Close:22.98},
+ { Date: "3-Aug", Open: 22.42, High: 22.70, Low: 22.1, Close:22.63},
+ { Date: "4-Aug", Open: 21.67, High: 22.82, Low: 21.67, Close:22.34},
+ { Date: "5-Aug", Open: 22.44, High: 22.85, Low: 22.12, Close:22.31} ]);
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:SeriesZoom id="zoomIn" duration="1000"/>
+ <mx:SeriesZoom id="zoomOut" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="CandlestickChart Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:CandlestickChart id="candlestickchart" height="100%" width="100%"
+ paddingRight="5" paddingLeft="5"
+ showDataTips="true" dataProvider="{companyAAC}">
+
+ <mx:verticalAxis>
+ <mx:LinearAxis id="vaxis" baseAtZero="false" title="Price"/>
+ </mx:verticalAxis>
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis id="haxis" categoryField="Date" title="Date"/>
+ </mx:horizontalAxis>
+
+ <mx:horizontalAxisRenderers>
+ <mx:AxisRenderer axis="{haxis}" canDropLabels="true"/>
+ </mx:horizontalAxisRenderers>
+
+ <mx:series>
+ <mx:CandlestickSeries
+ openField="Open" highField="High"
+ lowField="Low" closeField="Close"
+ showDataEffect="{zoomIn}"
+ hideDataEffect="{zoomOut}"/>
+ </mx:series>
+ </mx:CandlestickChart>
+
+ <mx:Label width="100%"
+ text="Choose a company to view recent stock data."/>
+
+ <mx:HBox>
+ <mx:RadioButton groupName="stocks" label="View Company A"
+ selected="true" click="candlestickchart.dataProvider=companyAAC"/>
+ <mx:RadioButton groupName="stocks" label="View Company B"
+ click="candlestickchart.dataProvider=companyBAC"/>
+ </mx:HBox>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/AccordionExample.mxml b/tourdeflexmodules/src/mx/containers/AccordionExample.mxml
new file mode 100755
index 0000000..edf480d
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/AccordionExample.mxml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Accordion layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="Accordion Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select an Accordion navigator button to change the panel."/>
+
+ <mx:Accordion id="accordion" width="100%" height="100%">
+ <!-- Define each panel using a VBox container. -->
+ <mx:VBox label="Accordion Button for Panel 1">
+ <mx:Label text="Accordion container panel 1"/>
+ </mx:VBox>
+
+ <mx:VBox label="Accordion Button for Panel 2">
+ <mx:Label text="Accordion container panel 2"/>
+ </mx:VBox>
+
+ <mx:VBox label="Accordion Button for Panel 3">
+ <mx:Label text="Accordion container panel 3"/>
+ </mx:VBox>
+ </mx:Accordion>
+
+ <mx:Label width="100%"
+ text="Programmatically select the panel using a Button control."/>
+
+ <mx:HBox>
+ <mx:Button label="Select Panel 1" click="accordion.selectedIndex=0"/>
+ <mx:Button label="Select Panel 2" click="accordion.selectedIndex=1"/>
+ <mx:Button label="Select Panel 3" click="accordion.selectedIndex=2"/>
+ </mx:HBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/DividedBoxExample.mxml b/tourdeflexmodules/src/mx/containers/DividedBoxExample.mxml
new file mode 100755
index 0000000..836c6f3
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/DividedBoxExample.mxml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the DividedBox layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="DividedBox Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="A horizontal DividedBox container. Drag the divider side to side to resize the children."/>
+
+ <mx:DividedBox direction="horizontal" width="100%" height="100%">
+
+ <mx:Panel title="Panel 1" width="25%" height="100%" backgroundColor="0xCCCCCC">
+ </mx:Panel>
+
+ <mx:Panel title="Panel 2" width="25%" height="100%" backgroundColor="0xCCCCCC">
+ </mx:Panel>
+
+ </mx:DividedBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/FormExample.mxml b/tourdeflexmodules/src/mx/containers/FormExample.mxml
new file mode 100755
index 0000000..471e7dc
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/FormExample.mxml
@@ -0,0 +1,88 @@
+<?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 Form layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <fx:Model id="checkModel">
+ <User>
+ <FirstName>{fname.text}</FirstName>
+ <DOB>{dob.text}</DOB>
+ <Email>{email.text}</Email>
+ <Age>{age.text}</Age>
+ <SSN>{ssn.text}</SSN>
+ <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:SocialSecurityValidator source="{ssn}" property="text"/>
+ <mx:ZipCodeValidator source="{zip}" property="text"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Form Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Moving from one form field to another triggers the validator."/>
+
+ <mx:Form width="100%" height="100%">
+ <mx:FormHeading label="Enter values into the form."/>
+
+ <mx:FormItem label="First name">
+ <mx:TextInput id="fname" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Date of birth (mm/dd/yyyy)">
+ <mx:TextInput id="dob" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="E-mail address">
+ <mx:TextInput id="email" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Age">
+ <mx:TextInput id="age" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="SSN">
+ <mx:TextInput id="ssn" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Zip">
+ <mx:TextInput id="zip" width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Phone">
+ <mx:TextInput id="phone" width="200"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/GridLayoutExample.mxml b/tourdeflexmodules/src/mx/containers/GridLayoutExample.mxml
new file mode 100755
index 0000000..2b293eb
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/GridLayoutExample.mxml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Grid layout container.-->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="Grid Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="A 3 by 3 Grid container of Button controls."/>
+
+ <mx:Grid>
+ <mx:GridRow>
+ <mx:GridItem>
+ <mx:Button label="Row 1 Col 1" width="100"/>
+ </mx:GridItem>
+ <mx:GridItem>
+ <mx:Button label="Row 1 Col 2" width="100"/>
+ </mx:GridItem>
+ <mx:GridItem>
+ <mx:Button label="Row 1 Col 3" width="100"/>
+ </mx:GridItem>
+ </mx:GridRow>
+
+ <mx:GridRow>
+ <mx:GridItem>
+ <mx:Button label="Row 2 Col 1" width="100"/>
+ </mx:GridItem>
+ <mx:GridItem>
+ <mx:Button label="Row 2 Col 2" width="100"/>
+ </mx:GridItem>
+ <mx:GridItem>
+ <mx:Button label="Row 2 Col 3" width="100"/>
+ </mx:GridItem>
+ </mx:GridRow>
+
+ <mx:GridRow>
+ <mx:GridItem>
+ <mx:Button label="Row 3 Col 1" width="100"/>
+ </mx:GridItem>
+ <mx:GridItem>
+ <mx:Button label="Row 3 Col 2" width="100"/>
+ </mx:GridItem>
+ <mx:GridItem>
+ <mx:Button label="Row 3 Col 3" width="100"/>
+ </mx:GridItem>
+ </mx:GridRow>
+ </mx:Grid>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/HBoxExample.mxml b/tourdeflexmodules/src/mx/containers/HBoxExample.mxml
new file mode 100755
index 0000000..44db7cc
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/HBoxExample.mxml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the HBox layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="HBox Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="An HBox container with horizontally aligned children."/>
+
+ <mx:HBox borderStyle="solid" paddingTop="10" paddingBottom="10"
+ paddingLeft="10" paddingRight="10">
+
+ <mx:Button label="Button 1"/>
+ <mx:Button label="Button 2"/>
+ <mx:Button label="Button 3"/>
+ <mx:ComboBox/>
+
+ </mx:HBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/HDividedBoxExample.mxml b/tourdeflexmodules/src/mx/containers/HDividedBoxExample.mxml
new file mode 100755
index 0000000..d5a2e75
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/HDividedBoxExample.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the HDividedBox layout -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="HDividedBox Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Drag the divider side to side to resize the children."/>
+
+ <mx:HDividedBox width="100%" height="100%">
+
+ <mx:Canvas label="Canvas 1" width="100%" height="100%" backgroundColor="#FFFFCC">
+ <mx:Label text="Add components here" fontWeight="bold"/>
+ </mx:Canvas>
+
+ <mx:Canvas label="Canvas 2" width="100%" height="100%" backgroundColor="#99CCFF">
+ <mx:Label text="Add components here" fontWeight="bold"/>
+ </mx:Canvas>
+
+ </mx:HDividedBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/SimpleApplicationControlBarExample.mxml b/tourdeflexmodules/src/mx/containers/SimpleApplicationControlBarExample.mxml
new file mode 100755
index 0000000..b04e80a
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/SimpleApplicationControlBarExample.mxml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the ApplicationControlBar container. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ borderStyle="solid"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:ApplicationControlBar dock="true" paddingTop="0" paddingBottom="0">
+ <mx:Label text="Docked"/>
+
+ <mx:MenuBar id="myMenuBar" labelField="@label">
+ <fx:XMLList>
+ <menuitem label="MenuItem A" >
+ <menuitem label="SubMenuItem A-1" type="check"/>
+ <menuitem label="SubMenuItem A-2" type="check"/>
+ </menuitem>
+ <menuitem label="MenuItem B"/>
+ <menuitem label="MenuItem C"/>
+ <menuitem label="MenuItem D" >
+ <menuitem label="SubMenuItem D-1" type="radio" groupName="one"/>
+ <menuitem label="SubMenuItem D-2" type="radio" groupName="one"/>
+ <menuitem label="SubMenuItem D-3" type="radio" groupName="one"/>
+ </menuitem>
+ </fx:XMLList>
+ </mx:MenuBar>
+ </mx:ApplicationControlBar>
+
+ <mx:Label text="A docked ApplicationControlBar appears at the top of the application window."/>
+ <mx:Spacer height="100%" />
+
+ <mx:ApplicationControlBar width="80%">
+ <mx:Label text="Normal"/>
+ <mx:Label text="Search:" />
+ <mx:TextInput width="100%" maxWidth="200" />
+ <mx:Spacer width="100%" />
+ <mx:Button label="Go flex.apache.org" />
+ </mx:ApplicationControlBar>
+
+ <mx:Label text="A normal ApplicationControlBar can appear anywhere in the application."/>
+
+</mx:Application>
diff --git a/tourdeflexmodules/src/mx/containers/SimpleBoxExample.mxml b/tourdeflexmodules/src/mx/containers/SimpleBoxExample.mxml
new file mode 100755
index 0000000..b45c8b4
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/SimpleBoxExample.mxml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Box layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="Box Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="A Box container with vertically aligned children."/>
+ <mx:Box direction="vertical" borderStyle="solid"
+ paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
+ <mx:Button label="Button 1"/>
+ <mx:Button label="Button 2"/>
+ <mx:Button label="Button 3"/>
+ <mx:ComboBox/>
+ </mx:Box>
+
+ <mx:Label width="100%"
+ text="A Box container with horizontally aligned children."/>
+ <mx:Box direction="horizontal" borderStyle="solid"
+ paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
+ <mx:Button label="Button 1"/>
+ <mx:Button label="Button 2"/>
+ <mx:Button label="Button 3"/>
+ <mx:ComboBox/>
+ </mx:Box>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/SimpleCanvasExample.mxml b/tourdeflexmodules/src/mx/containers/SimpleCanvasExample.mxml
new file mode 100755
index 0000000..a2bef7a
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/SimpleCanvasExample.mxml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Canvas layout container.-->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="Canvas Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Use absolute positioning to place the children of a Canvas container."/>
+
+ <mx:Canvas borderStyle="solid" height="200" width="100%">
+
+ <!-- Stagger the position of the TextInput controls using absolute positioning.-->
+ <mx:TextInput width="100" x="50" y="5"/>
+ <mx:TextInput width="100" x="100" y="30"/>
+ <mx:TextInput width="100" x="150" y="55"/>
+
+ <!-- Overlap the VBox containers using layout constraints.-->
+ <mx:VBox right="115" bottom="50" width="75" height="75" backgroundColor="#0080C0"/>
+ <mx:VBox right="70" bottom="30" width="75" height="75" backgroundColor="#FFFF80"/>
+ <mx:VBox right="25" bottom="10" width="75" height="75" backgroundColor="#8080C0" alpha="0.8"/>
+
+ <mx:Text right="25" y="110"
+ text="The Canvas container lets you place components on top of each other."/>
+ </mx:Canvas>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/SimpleControlBarExample.mxml b/tourdeflexmodules/src/mx/containers/SimpleControlBarExample.mxml
new file mode 100755
index 0000000..8498ff4
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/SimpleControlBarExample.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the ControlBar container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="ControlBar Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:HBox width="100%" height="100%">
+ <!-- Area for your catalog. -->
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')" width="50%" height="100%"/>
+ <mx:Text width="50%"
+ text="The ControlBar container in this example adds a Label, NumericStepper, Spacer, and Button control to the bottom of the Panel container."/>
+ </mx:HBox>
+
+ <mx:ControlBar>
+ <mx:Label text="Quantity"/>
+ <mx:NumericStepper/>
+ <!-- Use Spacer to push Button control to the right. -->
+ <mx:Spacer width="100%"/>
+ <mx:Button label="Add to Cart"/>
+ </mx:ControlBar>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/SimplePanelExample.mxml b/tourdeflexmodules/src/mx/containers/SimplePanelExample.mxml
new file mode 100755
index 0000000..75aa93f
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/SimplePanelExample.mxml
@@ -0,0 +1,47 @@
+<?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 Panel layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ private function showProperties():void {
+ panelPropertyArea.text= "Status: " + panel.status + '\n' +
+ "Title: " + panel.title + '\n' +
+ "Width: " + panel.width + '\n' +
+ "Height: " + panel.height ;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel id="panel" title="Panel Container Example" status="Active"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Click the Button control to see panel properties."/>
+
+ <mx:TextArea id="panelPropertyArea" width="100%" height="100%"/>
+ <mx:Button label="Click to view Panel properties" click="showProperties()"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/SimpleTitleWindowExample.mxml b/tourdeflexmodules/src/mx/containers/SimpleTitleWindowExample.mxml
new file mode 100755
index 0000000..2616d8f
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/SimpleTitleWindowExample.mxml
@@ -0,0 +1,52 @@
+<?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 custom MXML TitleWindow component.
+ The TitleWindowApp application displays this component.
+ You cannot run it independently. -->
+
+<mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ title="Title Window" x="168" y="86">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.managers.PopUpManager;
+ import mx.controls.Text;
+
+ // A reference to the TextInput control in which to put the result.
+ public var loginName:Text;
+
+ // Event handler for the OK button.
+ private function returnName():void {
+ loginName.text="Name entered: " + userName.text;
+ PopUpManager.removePopUp(this);
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:HBox>
+ <mx:Label text="Enter Name: "/>
+ <mx:TextInput id="userName" width="100%"/>
+ </mx:HBox>
+
+ <mx:HBox>
+ <mx:Button label="OK" click="returnName()"/>
+ <mx:Button label="Cancel" click="PopUpManager.removePopUp(this)"/>
+ </mx:HBox>
+
+</mx:TitleWindow>
diff --git a/tourdeflexmodules/src/mx/containers/TabNavigatorExample.mxml b/tourdeflexmodules/src/mx/containers/TabNavigatorExample.mxml
new file mode 100755
index 0000000..55fad20
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/TabNavigatorExample.mxml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the TabNavigator layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="TabNavigator Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select the tabs to change the panel."/>
+
+ <mx:TabNavigator id="tn" width="100%" height="100%">
+ <!-- Define each panel using a VBox container. -->
+
+ <mx:VBox label="Panel 1">
+ <mx:Label text="TabNavigator container panel 1"/>
+ </mx:VBox>
+
+ <mx:VBox label="Panel 2">
+ <mx:Label text="TabNavigator container panel 2"/>
+ </mx:VBox>
+
+ <mx:VBox label="Panel 3">
+ <mx:Label text="TabNavigator container panel 3"/>
+ </mx:VBox>
+ </mx:TabNavigator>
+
+ <mx:Label width="100%"
+ text="Programmatically select the panel using a Button control."/>
+
+ <mx:HBox>
+ <mx:Button label="Select Tab 1" click="tn.selectedIndex=0"/>
+ <mx:Button label="Select Tab 2" click="tn.selectedIndex=1"/>
+ <mx:Button label="Select Tab 3" click="tn.selectedIndex=2"/>
+ </mx:HBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/TileLayoutExample.mxml b/tourdeflexmodules/src/mx/containers/TileLayoutExample.mxml
new file mode 100755
index 0000000..5cc8179
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/TileLayoutExample.mxml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Tile layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="Tile Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="A Tile container lays out its children in a grid of equal-sized cells."/>
+
+ <mx:Tile direction="horizontal" borderStyle="inset"
+ horizontalGap="10" verticalGap="15"
+ paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
+
+ <mx:Button label="1" height="50" width="75"/>
+ <mx:Button label="2" height="50" width="75"/>
+ <mx:Button label="3" height="50" width="75"/>
+ <mx:Button label="4" height="50" width="75"/>
+ <mx:Button label="5" height="50" width="75"/>
+ <mx:Button label="6" height="50" width="75"/>
+
+ </mx:Tile>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/TitleWindowApp.mxml b/tourdeflexmodules/src/mx/containers/TitleWindowApp.mxml
new file mode 100755
index 0000000..430d613
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/TitleWindowApp.mxml
@@ -0,0 +1,66 @@
+<?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.
+ -->
+
+<!-- Main application to demonstrate TitleWindow layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.managers.PopUpManager;
+ import mx.containers.TitleWindow;
+ import flash.geom.Point;
+
+ private var point1:Point = new Point();
+
+ // Open the TitleWindow container.
+ // Cast the return value of the createPopUp() method
+ // to SimpleTitleWindowExample, the name of the
+ // component containing the TitleWindow container.
+ private function showWindow():void {
+ var login:SimpleTitleWindowExample=SimpleTitleWindowExample(PopUpManager.createPopUp( this, SimpleTitleWindowExample , true));
+
+ // Calculate position of TitleWindow in Application's coordinates.
+ // Position it 25 pixels down and to the right of the Button control.
+ point1.x=0;
+ point1.y=0;
+ point1=myButton.localToGlobal(point1);
+ login.x=point1.x+25;
+ login.y=point1.y+25;
+
+ // Pass a reference to the TextInput control
+ // to the TitleWindow container so that the
+ // TitleWindow container can return data to the main application.
+ login.loginName=returnedName;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="TitleWindow Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Button id="myButton" label="Click to open the TitleWindow container"
+ click="showWindow()"/>
+
+ <mx:Text id="returnedName" text="" width="100%"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/VBoxExample.mxml b/tourdeflexmodules/src/mx/containers/VBoxExample.mxml
new file mode 100755
index 0000000..99adac2
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/VBoxExample.mxml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the VBox layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="VBox Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="A VBox container with vertically aligned children."/>
+
+ <mx:VBox borderStyle="solid" paddingTop="10" paddingBottom="10"
+ paddingLeft="10" paddingRight="10">
+
+ <mx:Button label="Button 1"/>
+ <mx:Button label="Button 2"/>
+ <mx:Button label="Button 3"/>
+ <mx:ComboBox/>
+
+ </mx:VBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/VDividedBoxExample.mxml b/tourdeflexmodules/src/mx/containers/VDividedBoxExample.mxml
new file mode 100755
index 0000000..2c08bf4
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/VDividedBoxExample.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the VDividedBox layout -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="VDividedBox Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Drag the divider up and down to resize the children."/>
+
+ <mx:VDividedBox width="100%" height="100%">
+
+ <mx:Canvas label="Canvas 1" width="100%" height="100%" backgroundColor="#FFFFCC">
+ <mx:Label text="Add components here" fontWeight="bold"/>
+ </mx:Canvas>
+
+ <mx:Canvas label="Canvas 2" width="100%" height="100%" backgroundColor="#99CCFF">
+ <mx:Label text="Add components here" fontWeight="bold"/>
+ </mx:Canvas>
+
+ </mx:VDividedBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/ViewStackExample.mxml b/tourdeflexmodules/src/mx/containers/ViewStackExample.mxml
new file mode 100755
index 0000000..3f2a063
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/ViewStackExample.mxml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the ViewStack layout container. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="ViewStack Container Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the Button controls to change panels of the ViewStack container."/>
+
+ <mx:HBox borderStyle="solid" width="100%"
+ paddingTop="5" paddingLeft="5" paddingRight="5" paddingBottom="5">
+
+ <mx:Button id="searchButton" label="Search Panel"
+ click="myViewStack.selectedChild=search"/>
+ <mx:Button id="cInfoButton" label="Customer Info Panel"
+ click="myViewStack.selectedChild=custInfo"/>
+ <mx:Button id="aInfoButton" label="Account Panel"
+ click="myViewStack.selectedChild=accountInfo"/>
+ </mx:HBox>
+
+ <!-- Define the ViewStack and the three child containers and have it
+ resize up to the size of the container for the buttons. -->
+ <mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="80%">
+
+ <mx:Canvas id="search" backgroundColor="#FFFFCC" label="Search" width="100%" height="100%">
+ <mx:Label text="Search Screen" color="#000000"/>
+ </mx:Canvas>
+
+ <mx:Canvas id="custInfo" backgroundColor="#CCFFFF" label="Customer Info" width="100%" height="100%">
+ <mx:Label text="Customer Info" color="#000000"/>
+ </mx:Canvas>
+
+ <mx:Canvas id="accountInfo" backgroundColor="#FFCCFF" label="Account Info" width="100%" height="100%">
+ <mx:Label text="Account Info" color="#000000"/>
+ </mx:Canvas>
+ </mx:ViewStack>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/containers/assets/ApacheFlexLogo.png b/tourdeflexmodules/src/mx/containers/assets/ApacheFlexLogo.png
new file mode 100644
index 0000000..4ff037f
--- /dev/null
+++ b/tourdeflexmodules/src/mx/containers/assets/ApacheFlexLogo.png
Binary files differ
diff --git a/tourdeflexmodules/src/mx/controls/AdvancedDataGridExample.mxml b/tourdeflexmodules/src/mx/controls/AdvancedDataGridExample.mxml
new file mode 100755
index 0000000..f1c8e64
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/AdvancedDataGridExample.mxml
@@ -0,0 +1,78 @@
+<?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.
+ -->
+
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var dpFlat:ArrayCollection = new ArrayCollection([
+ {Region:"Southwest", Territory:"Arizona",
+ Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000},
+ {Region:"Southwest", Territory:"Arizona",
+ Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000},
+ {Region:"Southwest", Territory:"Central California",
+ Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000},
+ {Region:"Southwest", Territory:"Nevada",
+ Territory_Rep:"Bethany Pittman", Actual:52888, Estimate:45000},
+ {Region:"Southwest", Territory:"Northern California",
+ Territory_Rep:"Lauren Ipsum", Actual:38805, Estimate:40000},
+ {Region:"Southwest", Territory:"Northern California",
+ Territory_Rep:"T.R. Smith", Actual:55498, Estimate:40000},
+ {Region:"Southwest", Territory:"Southern California",
+ Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000},
+ {Region:"Southwest", Territory:"Southern California",
+ Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000}
+ ]);
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="AdvancedDataGrid Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:AdvancedDataGrid id="myADG"
+ width="100%" height="100%"
+ initialize="gc.refresh()">
+ <mx:dataProvider>
+ <mx:GroupingCollection2 id="gc" source="{dpFlat}">
+ <mx:grouping>
+ <mx:Grouping>
+ <mx:GroupingField name="Region"/>
+ <mx:GroupingField name="Territory"/>
+ </mx:Grouping>
+ </mx:grouping>
+ </mx:GroupingCollection2>
+ </mx:dataProvider>
+
+ <mx:columns>
+ <mx:AdvancedDataGridColumn dataField="Region"/>
+ <mx:AdvancedDataGridColumn dataField="Territory"/>
+ <mx:AdvancedDataGridColumn dataField="Territory_Rep"
+ headerText="Territory Rep"/>
+ <mx:AdvancedDataGridColumn dataField="Actual"/>
+ <mx:AdvancedDataGridColumn dataField="Estimate"/>
+ </mx:columns>
+ </mx:AdvancedDataGrid>
+ </mx:Panel>
+
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/ButtonBarExample.mxml b/tourdeflexmodules/src/mx/controls/ButtonBarExample.mxml
new file mode 100755
index 0000000..6920666
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/ButtonBarExample.mxml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the ButtonBar control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ItemClickEvent;
+
+ // Event handler function to print a message
+ // describing the selected Button control.
+ private function clickHandler(event:ItemClickEvent):void {
+ myTA.text="Selected button index: " + String(event.index) +
+ "\n" + "Selected button label: " + event.label;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="ButtonBar Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select a button in the ButtonBar control."/>
+
+ <mx:TextArea id="myTA" width="100%" height="100%"/>
+
+ <mx:ButtonBar itemClick="clickHandler(event)">
+ <mx:dataProvider>
+ <fx:Array>
+ <fx:String>Flex SDK</fx:String>
+ <fx:String>Flex JS</fx:String>
+ <fx:String>Falcon</fx:String>
+ <fx:String>Falcon JX</fx:String>
+ </fx:Array>
+ </mx:dataProvider>
+ </mx:ButtonBar>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/ButtonExample.mxml b/tourdeflexmodules/src/mx/controls/ButtonExample.mxml
new file mode 100755
index 0000000..588eef9
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/ButtonExample.mxml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Button control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import flash.events.Event;
+
+ // Event handler function to print a message
+ // describing the selected Button control.
+ private function printMessage(event:Event):void {
+ message.text += event.target.label + " pressed" + "\n";
+ }
+
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="Button Control Example" layout="horizontal"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:VBox>
+ <mx:Label width="100%"
+ text="Select a Button control."/>
+
+ <!-- The button can contain an image, as in the "Button with Icon" button -->
+ <!-- The button can contain an image, as in the "Button with Icon" button -->
+ <mx:Button id="iconButton" icon="@Embed('assets/ApacheFlexIcon.png')" label="Button with Icon"
+ paddingLeft="12" paddingRight="18" labelPlacement="right" color="#993300" click="printMessage(event)"/>
+
+ <!-- The size of the button and the label attributes can be customized -->
+ <mx:Button label="Customized Button" color="#993300" toggle="true" selected="true"
+ textAlign="left" fontStyle="italic" fontSize="13" width="{iconButton.width}"
+ click="printMessage(event)"/>
+
+ <!-- By default, the look and feel of the customized button is
+ similar to the Default Button. -->
+ <mx:Button label="Default Button" click="printMessage(event)"/>
+ </mx:VBox>
+
+ <mx:TextArea id="message" text="" editable="false" height="100%" width="100%"
+ color="#0000FF"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/CheckBoxExample.mxml b/tourdeflexmodules/src/mx/controls/CheckBoxExample.mxml
new file mode 100755
index 0000000..116e652
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/CheckBoxExample.mxml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the CheckBox control -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.controls.Alert;
+
+ // This event handler adds and deletes items from the shopping cart.
+ private function modifyCart():void
+ {
+ cartItems.text = "";
+
+ if(milkCB.selected == true) {
+ cartItems.text += "milk" + '\n' ;
+ }
+
+ if(eggsCB.selected == true) {
+ cartItems.text += "eggs" + '\n';
+ }
+
+ if(breadCB.selected == true) {
+ cartItems.text +="bread" + '\n';
+ }
+ }
+
+ // This event handler opens the Alert control.
+ private function sendMessage():void
+ {
+ if(couponCB.selected == true) {
+ Alert.show('You will receive coupons.');
+ }
+ else {
+ Alert.show('You will not receive any coupons.');
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="CheckBox Control Example" layout="horizontal"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:VBox>
+ <mx:CheckBox id="milkCB" label="milk" click="modifyCart()"/>
+ <mx:CheckBox id="eggsCB" label="eggs" click="modifyCart()"/>
+ <mx:CheckBox id="breadCB" label="bread" click="modifyCart()"/>
+ </mx:VBox>
+
+ <mx:VBox>
+ <mx:Label text="Items in my cart "/>
+ <mx:TextArea id="cartItems" width="300" height="50" verticalScrollPolicy="off"/>
+ <!-- Event handler sendMessages() is used to handle event click -->
+ <mx:CheckBox id="couponCB" label="Send me coupons for items in my cart"
+ click="sendMessage()" selected="true"/>
+ </mx:VBox>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/ColorPickerExample.mxml b/tourdeflexmodules/src/mx/controls/ColorPickerExample.mxml
new file mode 100755
index 0000000..34e4b33
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/ColorPickerExample.mxml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the ColorPicker control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="ColorPicker Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select the background color of the VBox container."/>
+ <mx:ColorPicker id="cp" showTextField="true" selectedColor="0xFFFFFF"/>
+
+ <mx:VBox width="100%" height="100%" backgroundColor="{cp.selectedColor}" borderStyle="solid"/>
+ <mx:Label text="selectedColor: 0x{cp.selectedColor.toString(16)}"/>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/DateChooserExample.mxml b/tourdeflexmodules/src/mx/controls/DateChooserExample.mxml
new file mode 100755
index 0000000..9492913
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/DateChooserExample.mxml
@@ -0,0 +1,70 @@
+<?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. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ // 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>
+
+ <mx:Panel title="DateChooser Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select a date in the DateChooser control."/>
+ <mx:Label width="100%"
+ text="Select it again while holding down the Control key to clear it."/>
+
+ <mx:HBox horizontalGap="25">
+ <mx:VBox>
+ <mx:Label text="Simple DateChooser control."/>
+ <mx:DateChooser id="dateChooser1" yearNavigationEnabled="true"
+ change="displayDate(DateChooser(event.target).selectedDate)"/>
+ <mx:Label id="selection" text="Date selected:"/>
+ </mx:VBox>
+
+ <mx:VBox>
+ <mx:Label text="Disable dates before June 1, 2006."/>
+ <mx:DateChooser id="dateChooser2" yearNavigationEnabled="true"
+ disabledRanges="{[ {rangeEnd: new Date(2006, 5, 1)} ]}"/>
+ <mx:Label text="Date selected: {df.format(dateChooser2.selectedDate)}"/>
+ </mx:VBox>
+ </mx:HBox>
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/DateFieldExample.mxml b/tourdeflexmodules/src/mx/controls/DateFieldExample.mxml
new file mode 100755
index 0000000..77d9ff0
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/DateFieldExample.mxml
@@ -0,0 +1,60 @@
+<?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. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ // 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>
+
+ <mx:Panel title="DateField Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select a date in the DateField control. Select it again to clear it."/>
+
+ <mx:Label text="Basic DateField:"/>
+ <mx:DateField id="dateField1" yearNavigationEnabled="true"
+ change="dateChanged(DateField(event.target).selectedDate)" />
+ <mx:Label id="selection" text="Date selected:" />
+
+ <mx:Label text="Disable dates on or before June 1, 2006."/>
+ <mx:DateField id="dateField2" yearNavigationEnabled="true"
+ disabledRanges="{[ {rangeEnd: new Date(2006, 5, 1)} ]}" />
+ <mx:Label text="Date selected: {df.format(dateField2.selectedDate)}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/HScrollBarExample.mxml b/tourdeflexmodules/src/mx/controls/HScrollBarExample.mxml
new file mode 100755
index 0000000..609e3c6
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/HScrollBarExample.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.
+ -->
+
+<!-- Simple example to demonstrate the HScrollBar control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ScrollEvent;
+
+ // Event handler function to display the scroll location
+ // as you move the scroll thumb.
+ private function myScroll(event:ScrollEvent):void
+ {
+ showPosition.text = "HScrollBar properties summary:" + '\n' +
+ "------------------------------------" + '\n' +
+ "Current scroll position: " + event.currentTarget.scrollPosition + '\n' +
+ "The maximum scroll position: " + event.currentTarget.maxScrollPosition + '\n' +
+ "The minimum scroll position: " + event.currentTarget.minScrollPosition ;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel id="panel" title="HScrollBar Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Click on the scroll bar to view its properties."/>
+
+ <mx:HScrollBar id="bar" width="100%"
+ minScrollPosition="0" maxScrollPosition="{panel.width - 20}"
+ lineScrollSize="50" pageScrollSize="100"
+ scroll="myScroll(event)"
+ repeatDelay="1000" repeatInterval="500" />
+
+ <mx:TextArea height="100%" width="100%" id="showPosition" />
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/HorizontalListExample.mxml b/tourdeflexmodules/src/mx/controls/HorizontalListExample.mxml
new file mode 100755
index 0000000..06d9eba
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/HorizontalListExample.mxml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the HorizontalList Control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo1:Class;
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo2:Class;
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo3:Class;
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo4:Class;
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo5:Class;
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="HorizontalList Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="A HorizontalList control displays items in a single row."/>
+
+ <mx:HorizontalList id="CameraSelection" height="250" columnCount="3" columnWidth="125">
+ <mx:dataProvider>
+ <fx:Array>
+ <fx:Object label="Logo 1" icon="{logo1}"/>
+ <fx:Object label="Logo 2" icon="{logo2}"/>
+ <fx:Object label="Logo 3" icon="{logo3}"/>
+ <fx:Object label="Logo 4" icon="{logo4}"/>
+ <fx:Object label="Logo 5" icon="{logo5}"/>
+ </fx:Array>
+ </mx:dataProvider>
+ </mx:HorizontalList>
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/LabelExample.mxml b/tourdeflexmodules/src/mx/controls/LabelExample.mxml
new file mode 100755
index 0000000..9ca5f4e
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/LabelExample.mxml
@@ -0,0 +1,50 @@
+<?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 Label control -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ private var htmlData:String="<br>This label displays <b>bold</b> and <i>italic</i> HTML-formatted text.";
+
+ // Event handler function to change the image size.
+ private function displayHTML():void {
+ simpleLabel.htmlText= htmlData;
+ }
+
+ // Event handler function to change the image size.
+ private function displayText():void {
+ simpleLabel.text="This Label displays plain text.";
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="Label Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label id="simpleLabel" text="This Label displays plain text."/>
+ <mx:Button id="Display" label="Click to display HTML Text" click="displayHTML()"/>
+ <mx:Button id="Clear" label="Click to display plain text" click="displayText()"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/LinkBarExample.mxml b/tourdeflexmodules/src/mx/controls/LinkBarExample.mxml
new file mode 100755
index 0000000..0b9ef07
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/LinkBarExample.mxml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the LinkBar control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="LinkBar Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Select a link in the LinkBar control to set the active child of the ViewStack container."/>
+
+ <mx:LinkBar color="#0000FF" fontWeight="bold" dataProvider="{myViewStack}"/>
+
+ <!-- Define the ViewStack and the three child containers. -->
+ <mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="80%">
+
+ <mx:Canvas id="search" backgroundColor="#FFFFCC" label="Search" width="100%" height="100%">
+ <mx:Label text="Search Screen" color="#000000"/>
+ </mx:Canvas>
+
+ <mx:Canvas id="custInfo" backgroundColor="#CCFFFF" label="Customer Info" width="100%" height="100%">
+ <mx:Label text="Customer Info" color="#000000"/>
+ </mx:Canvas>
+
+ <mx:Canvas id="accountInfo" backgroundColor="#FFCCFF" label="Account Info" width="100%" height="100%">
+ <mx:Label text="Account Info" color="#000000"/>
+ </mx:Canvas>
+ </mx:ViewStack>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/LinkButtonExample.mxml b/tourdeflexmodules/src/mx/controls/LinkButtonExample.mxml
new file mode 100755
index 0000000..346bf89
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/LinkButtonExample.mxml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the LinkButton control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <mx:Panel title="LinkButton Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select the LinkButton control to open the Alert control."/>
+
+ <mx:LinkButton label="LinkButton control" color="#0000FF" fontWeight="bold"
+ click="Alert.show('LinkButton selected!')"/>
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/Local.mxml b/tourdeflexmodules/src/mx/controls/Local.mxml
new file mode 100755
index 0000000..f416e38
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/Local.mxml
@@ -0,0 +1,26 @@
+<?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.
+ -->
+
+<!-- Flex application loaded by the SWFLoader control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="100%" height="100%">
+
+ <mx:Label text="The Label control of the embedded application."/>
+
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/MenuBarExample.mxml b/tourdeflexmodules/src/mx/controls/MenuBarExample.mxml
new file mode 100755
index 0000000..118e506
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/MenuBarExample.mxml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the MenuBar control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%"
+ creationComplete="initCollections()">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.MenuEvent;
+ import mx.controls.Alert;
+ import mx.collections.*;
+
+ [Bindable]
+ public var menuBarCollection:XMLListCollection;
+
+ private var menubarXML:XMLList =
+ <>
+ <menuitem label="Menu1" data="top">
+ <menuitem label="MenuItem 1-A" data="1A"/>
+ <menuitem label="MenuItem 1-B" data="1B"/>
+ </menuitem>
+ <menuitem label="Menu2" data="top">
+ <menuitem label="MenuItem 2-A" type="check" data="2A"/>
+ <menuitem type="separator"/>
+ <menuitem label="MenuItem 2-B" >
+ <menuitem label="SubMenuItem 3-A" type="radio"
+ groupName="one" data="3A"/>
+ <menuitem label="SubMenuItem 3-B" type="radio"
+ groupName="one" data="3B"/>
+ </menuitem>
+ </menuitem>
+ </>;
+
+ // Event handler to initialize the MenuBar control.
+ private function initCollections():void {
+ menuBarCollection = new XMLListCollection(menubarXML);
+ }
+
+ // Event handler for the MenuBar control's itemClick event.
+ private function menuHandler(event:MenuEvent):void {
+ // Don't open the Alert for a menu bar item that
+ // opens a popup submenu.
+ if (event.item.@data != "top") {
+ Alert.show("Label: " + event.item.@label + "\n" +
+ "Data: " + event.item.@data, "Clicked menu item");
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="MenuBar Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select a menu item."/>
+
+ <mx:MenuBar labelField="@label" itemClick="menuHandler(event)"
+ dataProvider="{menuBarCollection}" />
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/NumericStepperExample.mxml b/tourdeflexmodules/src/mx/controls/NumericStepperExample.mxml
new file mode 100755
index 0000000..4dc5947
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/NumericStepperExample.mxml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the NumericStepper control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="NumericStepper Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Default NumericStepper control with a minimum=0, maximum=10, and stepSize=1."/>
+ <mx:NumericStepper/>
+
+ <mx:Text width="100%"
+ text="NumericStepper control with a minimum=10, maximum=40, stepSize=0.01, and starting value of 20."/>
+
+ <mx:NumericStepper id="ns"
+ minimum="10.00" maximum="40.00"
+ stepSize="0.01"
+ value="20.00"
+ width="65"/>
+
+ <mx:Label text="You selected {ns.value}"/>
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/OLAPDataGridExample.mxml b/tourdeflexmodules/src/mx/controls/OLAPDataGridExample.mxml
new file mode 100755
index 0000000..9e8a5e6
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/OLAPDataGridExample.mxml
@@ -0,0 +1,208 @@
+<?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.
+ -->
+
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%"
+ 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;
+
+
+ [Bindable]
+ private var flatData:ArrayCollection = new ArrayCollection(
+ [
+ {customer:"AAA", product:"Flex SDK", quarter:"Q1", revenue:210, cost:25},
+ {customer:"AAA", product:"Flex JS", quarter:"Q2", revenue:210, cost:25},
+ {customer:"AAA", product:"Falcon", quarter:"Q3", revenue:250, cost:125},
+ {customer:"AAA", product:"Falcon JX", quarter:"Q4", revenue:430, cost:75},
+
+ {customer:"BBB", product:"Flex SDK", quarter:"Q2", revenue:125, cost:20},
+ {customer:"BBB", product:"Flex JS", quarter:"Q3", revenue:210, cost:20},
+ {customer:"BBB", product:"Falcon", quarter:"Q4", revenue:320, cost:120},
+ {customer:"BBB", product:"Falcon JX", quarter:"Q1", revenue:280, cost:70},
+
+ {customer:"CCC", product:"Flex SDK", quarter:"Q3", revenue:375, cost:120},
+ {customer:"CCC", product:"Flex JS", quarter:"Q4", revenue:430, cost:120},
+ {customer:"CCC", product:"Falcon", quarter:"Q1", revenue:470, cost:220},
+ {customer:"CCC", product:"Falcon JX", quarter:"Q2", revenue:570, cost:170},
+
+ {customer:"AAA", product:"Flex SDK", quarter:"Q4", revenue:215, cost:90},
+ {customer:"AAA", product:"Flex JS", quarter:"Q1", revenue:210, cost:90},
+ {customer:"AAA", product:"Falcon", quarter:"Q2", revenue:175, cost:190},
+ {customer:"AAA", product:"Falcon JX", quarter:"Q3", revenue:670, cost:75},
+
+ {customer:"BBB", product:"Flex SDK", quarter:"Q1", revenue:175, cost:20},
+ {customer:"BBB", product:"Flex JS", quarter:"Q2", revenue:210, cost:20},
+ {customer:"BBB", product:"Falcon",quarter:"Q3", revenue:120, cost:120},
+ {customer:"BBB", product:"Falcon JX", quarter:"Q4", revenue:310, cost:70},
+
+ {customer:"CCC", product:"Flex SDK", quarter:"Q1", revenue:385, cost:120},
+ {customer:"CCC", product:"Flex JS", quarter:"Q2", revenue:340, cost:120},
+ {customer:"CCC", product:"Falcon", quarter:"Q3", revenue:470, cost:220},
+ {customer:"CCC", product:"Falcon JX", quarter:"Q4", revenue:270, cost:170},
+
+ {customer:"AAA", product:"Flex SDK", quarter:"Q1", revenue:100, cost:25},
+ {customer:"AAA", product:"Flex JS", quarter:"Q2", revenue:150, cost:25},
+ {customer:"AAA", product:"Falcon", quarter:"Q3", revenue:200, cost:125},
+ {customer:"AAA", product:"Falcon JX", quarter:"Q4", revenue:300, cost:75},
+
+ {customer:"BBB", product:"Flex SDK", quarter:"Q2", revenue:175, cost:20},
+ {customer:"BBB", product:"Flex JS", quarter:"Q3", revenue:100, cost:20},
+ {customer:"BBB", product:"Falcon", quarter:"Q4", revenue:270, cost:120},
+ {customer:"BBB", product:"Falcon JX", quarter:"Q1", revenue:370, cost:70},
+
+ {customer:"CCC", product:"Flex SDK", quarter:"Q3", revenue:410, cost:120},
+ {customer:"CCC", product:"Flex JS", quarter:"Q4", revenue:300, cost:320},
+ {customer:"CCC", product:"Falcon", quarter:"Q1", revenue:510, cost:220},
+ {customer:"CCC", product:"Falcon JX", quarter:"Q2", revenue:620, cost:170},
+
+ {customer:"AAA", product:"Flex SDK", quarter:"Q4", revenue:215, cost:90},
+ {customer:"AAA", product:"Flex JS", quarter:"Q1", revenue:210, cost:90},
+ {customer:"AAA", product:"Falcon", quarter:"Q2", revenue:175, cost:190},
+ {customer:"AAA", product:"Falcon JX", quarter:"Q3", revenue:420, cost:75},
+
+ {customer:"BBB", product:"Flex SDK", quarter:"Q1", revenue:240, cost:20},
+ {customer:"BBB", product:"Flex JS", quarter:"Q2", revenue:100, cost:20},
+ {customer:"BBB", product:"Falcon", quarter:"Q3", revenue:270, cost:120},
+ {customer:"BBB", product:"Falcon JX", quarter:"Q4", revenue:370, cost:70},
+
+ {customer:"CCC", product:"Flex SDK", quarter:"Q1", revenue:375, cost:120},
+ {customer:"CCC", product:"Flex JS", quarter:"Q2", revenue:420, cost:120},
+ {customer:"CCC", product:"Falcon", quarter:"Q3", revenue:680, cost:220},
+ {customer:"CCC", product:"Falcon JX", 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>
+
+ <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>
+
+ <mx:Panel title="OLAPCube Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:OLAPDataGrid id="myOLAPDG" width="100%" height="100%"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/PopUpButtonExample.mxml b/tourdeflexmodules/src/mx/controls/PopUpButtonExample.mxml
new file mode 100755
index 0000000..d24fd98
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/PopUpButtonExample.mxml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the PopUpButton control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.controls.*;
+ import mx.events.*;
+
+ 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>
+
+ <mx:Panel title="PopUpButton Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Button label contains the name of the last selected menu item." />
+ <mx:PopUpButton id="popB" label="Edit" creationComplete="initMenu()" width="135" />
+
+ <mx:Spacer height="50" />
+ <mx:TextInput id="popTypeB" />
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/PopUpButtonMenuExample.mxml b/tourdeflexmodules/src/mx/controls/PopUpButtonMenuExample.mxml
new file mode 100755
index 0000000..96b91a1
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/PopUpButtonMenuExample.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.
+ -->
+
+<!-- PopUpMenuButton control example. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.events.*;
+ import mx.controls.*;
+
+ //Event handler, invoked when you select from the menu.
+ public function itemClickHandler(event:MenuEvent):void {
+ Alert.show("Menu label: " + event.label
+ + " \n menu item index within parent menu: " + event.index);
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- A an data provider in E4X format. -->
+ <fx:XMLList id="treeDP2">
+ <node label="Inbox"/>
+ <node label="Calendar"/>
+ <node label="Deleted Items"/>
+ </fx:XMLList>
+ </fx:Declarations>
+
+ <mx:Panel title="PopUpMenuButton Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Click the down arrow to open the menu."/>
+
+ <mx:PopUpMenuButton id="p2"
+ dataProvider="{treeDP2}"
+ labelField="@label"
+ itemClick="itemClickHandler(event)"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/RadioButtonExample.mxml b/tourdeflexmodules/src/mx/controls/RadioButtonExample.mxml
new file mode 100755
index 0000000..dc9940b
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/RadioButtonExample.mxml
@@ -0,0 +1,44 @@
+<?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 RadioButton control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <mx:Panel title="RadioButton Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="What year were women first allowed to compete in the Boston Marathon?"/>
+
+ <mx:RadioButton groupName="year" id="option1" label="1942"/>
+ <mx:RadioButton groupName="year" id="option2" label="1952"/>
+ <mx:RadioButton groupName="year" id="option3" label="1962"/>
+ <mx:RadioButton groupName="year" id="option4" label="1972"/>
+
+ <mx:Button label="Check Answer"
+ click="Alert.show(option4.selected?'Correct Answer!':'Wrong Answer', 'Result')"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/RadioButtonGroupExample.mxml b/tourdeflexmodules/src/mx/controls/RadioButtonGroupExample.mxml
new file mode 100755
index 0000000..0d9101e
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/RadioButtonGroupExample.mxml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate RadioButtonGroup control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.controls.Alert;
+ import mx.events.ItemClickEvent;
+
+ // Event handler function to display the selected button
+ // in an Alert control.
+ private function handleCard(event:ItemClickEvent):void {
+ if (event.currentTarget.selectedValue == "AmEx") {
+ Alert.show("You selected American Express")
+ }
+ else {
+ if (event.currentTarget.selectedValue == "MC") {
+ Alert.show("You selected MasterCard")
+ }
+ else {
+ Alert.show("You selected Visa")
+ }
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="RadioButtonGroup Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select a type of credit card."/>
+
+ <mx:RadioButtonGroup id="cardtype" itemClick="handleCard(event)"/>
+ <mx:RadioButton groupName="cardtype" id="americanExpress" value="AmEx"
+ label="American Express" width="150" />
+ <mx:RadioButton groupName="cardtype" id="masterCard" value="MC"
+ label="MasterCard" width="150" />
+ <mx:RadioButton groupName="cardtype" id="visa" value="Visa"
+ label="Visa" width="150" />
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/RichTextEditorExample.mxml b/tourdeflexmodules/src/mx/controls/RichTextEditorExample.mxml
new file mode 100755
index 0000000..54703e5
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/RichTextEditorExample.mxml
@@ -0,0 +1,39 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the RichTextEditor control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="Rich Text Editor Control Example" horizontalAlign="center"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:RichTextEditor id="rte" title="RichTextEditor" height="75%"
+ text="Enter text into the RichTextEditor control, then click a button to display your text as plain text, or as HTML-formatted text."/>
+
+ <mx:TextArea id="rteText" width="80%" height="25%"/>
+
+ <mx:HBox>
+ <mx:Button label="Show Plain Text" click="rteText.text=rte.text"/>
+ <mx:Button label="Show HTML Markup" click="rteText.text=rte.htmlText"/>
+ </mx:HBox>
+ </mx:Panel>
+
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml b/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml
new file mode 100755
index 0000000..4a64025
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Alert control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ import mx.events.CloseEvent;
+
+ // Event handler function uses a static method to show
+ // a pop-up window with the title, message, and requested buttons.
+ private function clickHandler(event:Event):void {
+ Alert.show("Do you want to save your changes?", "Save Changes", 3, this, alertClickHandler);
+ }
+
+ // Event handler function for displaying the selected Alert button.
+ private function alertClickHandler(event:CloseEvent):void {
+ if (event.detail==Alert.YES)
+ status.text="You answered Yes";
+ else
+ status.text="You answered No";
+ }
+
+ // Event handler function changes the default Button labels and sets the
+ // Button widths. If you later use an Alert with the default Buttons,
+ // you must reset these values.
+ private function secondClickHandler(event:Event):void {
+ Alert.buttonWidth = 100;
+ Alert.yesLabel = "Magenta";
+ Alert.noLabel = "Blue";
+ Alert.cancelLabel = "Green";
+
+ Alert.show("Select a color:","Color Selection",1|2|8,this);
+
+ // Set the labels back to normal:
+ Alert.yesLabel = "Yes";
+ Alert.noLabel = "No";
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="Alert Control Example" horizontalAlign="center"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+ <mx:Text width="100%" textAlign="center"
+ text="Click the button below to display a simple Alert window."/>
+ <mx:Button label="Click Me" click="Alert.show('Hello World!', 'Message')"/>
+
+ <mx:Text width="100%" textAlign="center"
+ text="Click the button below to display an Alert window and capture the button pressed by the user."/>
+ <mx:Button label="Click Me" click="clickHandler(event)"/>
+ <mx:Label id="status" fontWeight="bold"/>
+
+ <mx:Text width="100%" textAlign="center"
+ text="Click the button below to display an Alert window that uses custom Button labels."/>
+ <mx:Button label="Click Me" click="secondClickHandler(event)"/>
+ </mx:Panel>
+
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/SimpleComboBox.mxml b/tourdeflexmodules/src/mx/controls/SimpleComboBox.mxml
new file mode 100755
index 0000000..353e72c
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleComboBox.mxml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the ComboBox control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ public var cards:ArrayCollection = new ArrayCollection(
+ [ {label:"Visa", data:1},
+ {label:"MasterCard", data:2},
+ {label:"American Express", data:3} ]);
+
+ private function closeHandler(event:Event):void {
+ myLabel.text = "You selected: " + ComboBox(event.target).selectedItem.label;
+ myData.text = "Data: " + ComboBox(event.target).selectedItem.data;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="ComboBox Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:ComboBox dataProvider="{cards}" width="150"
+ close="closeHandler(event)"/>
+
+ <mx:VBox width="250">
+ <mx:Text width="200" text="Select a type of credit card."/>
+ <mx:Label id="myLabel" text="You selected:"/>
+ <mx:Label id="myData" text="Data:"/>
+ </mx:VBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/SimpleDataGrid.mxml b/tourdeflexmodules/src/mx/controls/SimpleDataGrid.mxml
new file mode 100755
index 0000000..7624a9c
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleDataGrid.mxml
@@ -0,0 +1,81 @@
+<?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.
+ -->
+
+<!-- DataGrid control example. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <fx:XMLList id="employees">
+ <employee>
+ <name>Christina Coenraets</name>
+ <phone>555-219-2270</phone>
+ <email>ccoenraets@fictitious.com</email>
+ <active>true</active>
+ </employee>
+ <employee>
+ <name>Joanne Wall</name>
+ <phone>555-219-2012</phone>
+ <email>jwall@fictitious.com</email>
+ <active>true</active>
+ </employee>
+ <employee>
+ <name>Maurice Smith</name>
+ <phone>555-219-2012</phone>
+ <email>maurice@fictitious.com</email>
+ <active>false</active>
+ </employee>
+ <employee>
+ <name>Mary Jones</name>
+ <phone>555-219-2000</phone>
+ <email>mjones@fictitious.com</email>
+ <active>true</active>
+ </employee>
+ </fx:XMLList>
+ </fx:Declarations>
+
+ <mx:Panel title="DataGrid Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select a row in the DataGrid control."/>
+
+ <mx:DataGrid id="dg" width="100%" height="100%" rowCount="5" dataProvider="{employees}">
+ <mx:columns>
+ <mx:DataGridColumn dataField="name" headerText="Name"/>
+ <mx:DataGridColumn dataField="phone" headerText="Phone"/>
+ <mx:DataGridColumn dataField="email" headerText="Email"/>
+ </mx:columns>
+ </mx:DataGrid>
+
+ <mx:Form width="100%" height="100%">
+ <mx:FormItem label="Name">
+ <mx:Label text="{dg.selectedItem.name}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Email">
+ <mx:Label text="{dg.selectedItem.email}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Phone">
+ <mx:Label text="{dg.selectedItem.phone}"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/SimpleHRule.mxml b/tourdeflexmodules/src/mx/controls/SimpleHRule.mxml
new file mode 100755
index 0000000..6070a3c
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleHRule.mxml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the HRule control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:WipeLeft id="myWL"/>
+ </fx:Declarations>
+
+ <mx:Panel title="HRule Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:HRule rollOverEffect="{myWL}" width="100%" strokeWidth="1" strokeColor="red"/>
+ <mx:Label width="100%"
+ text="Move mouse over HorizontalRule control to redraw it."/>
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/SimpleImage.mxml b/tourdeflexmodules/src/mx/controls/SimpleImage.mxml
new file mode 100755
index 0000000..fe9ed5e
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleImage.mxml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Image control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel id="myPanel" title="Image Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label text="Image embedded in the application."/>
+ <mx:Image source="@Embed('assets/ApacheFlexLogo.png')" width="50%" height="50%" />
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/SimpleImageHSlider.mxml b/tourdeflexmodules/src/mx/controls/SimpleImageHSlider.mxml
new file mode 100755
index 0000000..b457b22
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleImageHSlider.mxml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the HSlider control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ private var imageWidth:Number = 0;
+ private var imageHeight:Number = 0;
+
+ // Event handler function to change the image size.
+ private function changeSize():void
+ {
+ logo.width = uint(imageWidth*hSlider.value/100);
+ logo.height = uint(imageHeight*hSlider.value/100);
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel id="panel" title="HSlider Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:HBox height="100%" width="100%">
+ <mx:Image id="logo" source="@Embed('assets/ApacheFlexLogo.png')"
+ creationComplete="imageWidth = logo.width; imageHeight = logo.height; changeSize()" />
+ </mx:HBox>
+
+ <mx:Label text="Drag the slider to resize the image."/>
+
+ <mx:HSlider id="hSlider" minimum="0" maximum="100" value="50"
+ dataTipPlacement="top"
+ tickColor="black"
+ snapInterval="1" tickInterval="10"
+ labels="['0%','100%']"
+ allowTrackClick="true"
+ liveDragging="true"
+ change="changeSize()"/>
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/SimpleImageVSlider.mxml b/tourdeflexmodules/src/mx/controls/SimpleImageVSlider.mxml
new file mode 100755
index 0000000..64d74ff
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleImageVSlider.mxml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the VSlider control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ private var imageWidth:Number = 0;
+ private var imageHeight:Number = 0;
+
+ // Event handler function to change the image size.
+ private function changeSize():void
+ {
+ logo.width=uint(imageWidth*hSlider.value/100);
+ logo.height=uint(imageHeight*hSlider.value/100);
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel id="panel" title="VSlider Control Example" layout="horizontal"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:HBox width="50%">
+ <mx:Image id="logo" source="@Embed('assets/ApacheFlexLogo.png')"
+ creationComplete="imageWidth = logo.width; imageHeight = logo.height; changeSize()" />
+ </mx:HBox>
+
+ <mx:VBox horizontalAlign="center">
+ <mx:Label text="Drag the slider to resize the image."/>
+
+ <mx:VSlider id="hSlider"
+ dataTipPlacement="top"
+ minimum="0" maximum="100" value="50"
+ tickColor="black"
+ snapInterval="1" tickInterval="10"
+ labels="['0%','100%']"
+ allowTrackClick="true"
+ liveDragging="true"
+ change="changeSize()"/>
+ </mx:VBox>
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/SimpleList.mxml b/tourdeflexmodules/src/mx/controls/SimpleList.mxml
new file mode 100755
index 0000000..558bbb5
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleList.mxml
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the List Control -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ [Bindable]
+ public var selectedItem:Object;
+ ]]>
+ </fx:Script>
+
+
+ <fx:Declarations>
+ <fx:Model id="mystates">
+ <states>
+ <state label="Alabama" data="AL"/>
+ <state label="Alaska" data="AK"/>
+ <state label="Arizona" data="AZ"/>
+ <state label="Arkansas" data="AR"/>
+ <state label="California" data="CA"/>
+ <state label="Colorado" data="CO"/>
+ <state label="Connecticut" data="CT"/>
+ </states>
+ </fx:Model>
+ </fx:Declarations>
+
+ <mx:Panel title="List Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label text="Select a state to see its abbreviation."/>
+
+ <mx:List id="source" width="100%"
+ dataProvider="{mystates.state}"
+ change="this.selectedItem=List(event.target).selectedItem"/>
+
+ <mx:VBox width="100%">
+ <mx:Label text="Selected State: {selectedItem.label}"/>
+ <mx:Label text="State abbreviation: {selectedItem.data}"/>
+ </mx:VBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/SimpleLoader.mxml b/tourdeflexmodules/src/mx/controls/SimpleLoader.mxml
new file mode 100755
index 0000000..6d3b740
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleLoader.mxml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the SWFLoader control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="SWFLoader Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label text="The Label control of the outer application."/>
+
+ <mx:SWFLoader id="Load" source="@Embed(source='Local.swf')" />
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/SimpleMenuExample.mxml b/tourdeflexmodules/src/mx/controls/SimpleMenuExample.mxml
new file mode 100755
index 0000000..4a8836b
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleMenuExample.mxml
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Menu control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.controls.Menu;
+ import mx.events.MenuEvent;
+ import mx.controls.Alert;
+ import flash.geom.Point;
+
+ private var point1:Point = new Point();
+ private var myMenu:Menu;
+
+ // Create and display the Menu control.
+ private function showMenu():void {
+ myMenu= Menu.createMenu(panel, myMenuData, false);
+ myMenu.labelField="@label"
+ myMenu.addEventListener("itemClick", menuHandler);
+
+ // Calculate position of Menu in Application's coordinates.
+ point1.x=mybutton.x;
+ point1.y=mybutton.y;
+ point1=mybutton.localToGlobal(point1);
+
+ myMenu.show(point1.x + 25, point1.y + 25);
+ }
+
+ // Event handler for the Menu control's change event.
+ private function menuHandler(event:MenuEvent):void {
+ Alert.show("Label: " + event.item.@label, "Clicked menu item");
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <fx:XML id="myMenuData">
+ <root>
+ <menuitem label="MenuItem 1" eventName="copy"/>
+ <menuitem label="MenuItem 2" eventName="paste"/>
+ </root>
+ </fx:XML>
+ </fx:Declarations>
+
+ <mx:Panel id="panel" title="Menu Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Click the button to open the Menu control."/>
+
+ <mx:Button id="mybutton" label="Open Menu" click="showMenu()"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/SimpleProgressBar.mxml b/tourdeflexmodules/src/mx/controls/SimpleProgressBar.mxml
new file mode 100755
index 0000000..b43a8db
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleProgressBar.mxml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the ProgressBar control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ 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>
+
+ <mx:Panel title="ProgressBar Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Click the button to increment the progress bar." />
+ <mx:Button id="Speed" label="Run" click="runit()"/>
+
+ <mx:ProgressBar id="bar" labelPlacement="bottom"
+ minimum="0" visible="true" maximum="100" label="CurrentProgress 0%"
+ direction="right" mode="manual" width="100%"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/SimpleVRule.mxml b/tourdeflexmodules/src/mx/controls/SimpleVRule.mxml
new file mode 100755
index 0000000..14ef18d
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SimpleVRule.mxml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the VRule control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="VRule Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:VRule rollOverEffect="WipeUp" strokeWidth="1" strokeColor="red"/>
+ <mx:Label width="100%"
+ text="Move mouse over VRule control to redraw it."/>
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/SpacerExample.mxml b/tourdeflexmodules/src/mx/controls/SpacerExample.mxml
new file mode 100755
index 0000000..b9324b5
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/SpacerExample.mxml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Spacer control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel id="panel" title="Spacer Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="The Spacer control pushes the second image to the right edge of the HBox container." />
+
+ <mx:HBox width="100%">
+ <mx:Image source="@Embed('assets/ApacheFlexLogo.png')" width="50%" height="50%" />
+ <mx:Spacer width="100%"/>
+ <mx:Image source="@Embed('assets/ApacheFlexLogo.png')" width="50%" height="50%" />
+ </mx:HBox>
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/TabBarExample.mxml b/tourdeflexmodules/src/mx/controls/TabBarExample.mxml
new file mode 100755
index 0000000..7387eee
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/TabBarExample.mxml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the TabBar control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ItemClickEvent;
+ import mx.controls.TabBar;
+
+ [Bindable]
+ public var STATE_ARRAY:Array = [{label:"Alabama", data:"Montgomery"},
+ {label:"Alaska", data:"Juneau"},
+ {label:"Arkansas", data:"LittleRock"}
+ ];
+
+ private function clickEvt(event:ItemClickEvent):void {
+ // Access target TabBar control.
+ var targetComp:TabBar = TabBar(event.currentTarget);
+ forClick.text="label is: " + event.label + ", index is: " +
+ event.index + ", capital is: " +
+ targetComp.dataProvider[event.index].data;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="TabBar Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select a tab to change the current panel."/>
+
+ <mx:TabBar itemClick="clickEvt(event)">
+ <mx:dataProvider>{STATE_ARRAY}</mx:dataProvider>
+ </mx:TabBar>
+
+ <mx:TextArea id="forClick" height="100%" width="100%"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/TextAreaExample.mxml b/tourdeflexmodules/src/mx/controls/TextAreaExample.mxml
new file mode 100755
index 0000000..ddac800
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/TextAreaExample.mxml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the TextArea control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="TextArea Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:TextArea width="400" height="100">
+ <mx:text>
+ This is a multiline, editable TextArea control. If you need
+ a non-editable multiline control, use the Text control.
+ </mx:text>
+ </mx:TextArea>
+
+ <mx:TextArea width="400" height="100">
+ <mx:htmlText><![CDATA[This is <font color="#FF0000">HTML text</font> in a <b>TextArea control</b>. Use the <u>htmlText property</u> of the <font color="#008800">TextArea control</font> to include basic HTML markup in your text.]]></mx:htmlText>
+ </mx:TextArea>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/TextExample.mxml b/tourdeflexmodules/src/mx/controls/TextExample.mxml
new file mode 100755
index 0000000..73cd268
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/TextExample.mxml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Text control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="Text Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%">
+ <mx:text>
+ This is a multiline, non-editable text component.
+ If you need an editable multiline component, use TextArea.
+ </mx:text>
+ </mx:Text>
+
+ <mx:Text width="100%">
+ <mx:htmlText>
+ <![CDATA[This is <font color="#FF0000">HTML text</font> in a <b>Text component</b>. Using the <u>htmlText attribute</u> of the <font color="#008800">Text component</font> you can use basic HTML markup.]]>
+ </mx:htmlText>
+ </mx:Text>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/TextInputExample.mxml b/tourdeflexmodules/src/mx/controls/TextInputExample.mxml
new file mode 100755
index 0000000..d78b043
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/TextInputExample.mxml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the TextInput control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="TextInput Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:TextInput id="src" text="Hello World!"/>
+
+ <mx:Button label="Copy Text" click="dest.text = src.text"/>
+
+ <mx:TextInput id="dest"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/TileListExample.mxml b/tourdeflexmodules/src/mx/controls/TileListExample.mxml
new file mode 100755
index 0000000..ca4ad09
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/TileListExample.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the TileList Control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo1:Class;
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo2:Class;
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo3:Class;
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo4:Class;
+
+ [Bindable]
+ [Embed(source="assets/ApacheFlexLogo.png")]
+ public var logo5:Class;
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="TileList Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="A TileList control displays items in rows and columns."/>
+
+ <mx:TileList id="CameraSelection" height="250" width="300"
+ maxColumns="2" rowHeight="225" columnWidth="125">
+ <mx:dataProvider>
+ <fx:Array>
+ <fx:Object label="Logo 1" icon="{logo1}"/>
+ <fx:Object label="Logo 2" icon="{logo2}"/>
+ <fx:Object label="Logo 3" icon="{logo3}"/>
+ <fx:Object label="Logo 4" icon="{logo4}"/>
+ <fx:Object label="Logo 5" icon="{logo5}"/>
+ </fx:Array>
+ </mx:dataProvider>
+ </mx:TileList>
+
+ </mx:Panel>
+</mx:Module>
+
diff --git a/tourdeflexmodules/src/mx/controls/ToggleButtonBarExample.mxml b/tourdeflexmodules/src/mx/controls/ToggleButtonBarExample.mxml
new file mode 100755
index 0000000..981848f
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/ToggleButtonBarExample.mxml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the ToggleButtonBar control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ItemClickEvent;
+
+ // Event handler function to print a message
+ // describing the selected Button control.
+ private function clickHandler(event:ItemClickEvent):void {
+ myTA.text="Selected button index: " + String(event.index) +
+ "\n" + "Selected button label: " + event.label;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="ToggleButtonBar Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select a button in the ToggleButtonBar control."/>
+
+ <mx:TextArea id="myTA" width="100%" height="100%"/>
+
+ <mx:ToggleButtonBar itemClick="clickHandler(event)">
+ <mx:dataProvider>
+ <fx:Array>
+ <fx:String>Flex SDK</fx:String>
+ <fx:String>Flex JS</fx:String>
+ <fx:String>Falcon</fx:String>
+ <fx:String>Falcon JX</fx:String>
+ </fx:Array>
+ </mx:dataProvider>
+ </mx:ToggleButtonBar>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/TreeExample.mxml b/tourdeflexmodules/src/mx/controls/TreeExample.mxml
new file mode 100755
index 0000000..4ac2f7b
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/TreeExample.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.
+ -->
+
+<!-- Tree control example. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ [Bindable]
+ public var selectedNode:XML;
+
+ // Event handler for the Tree control change event.
+ public function treeChanged(event:Event):void {
+ selectedNode=Tree(event.target).selectedItem as XML;
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <fx:XMLList id="treeData">
+ <node label="Mail Box">
+ <node label="Inbox">
+ <node label="Marketing"/>
+ <node label="Product Management"/>
+ <node label="Personal"/>
+ </node>
+ <node label="Outbox">
+ <node label="Professional"/>
+ <node label="Personal"/>
+ </node>
+ <node label="Spam"/>
+ <node label="Sent"/>
+ </node>
+ </fx:XMLList>
+ </fx:Declarations>
+
+ <mx:Panel title="Tree Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Select a node in the Tree control."/>
+
+ <mx:HDividedBox width="100%" height="100%">
+ <mx:Tree id="myTree" width="50%" height="100%" labelField="@label"
+ showRoot="false" dataProvider="{treeData}" change="treeChanged(event)"/>
+ <mx:TextArea height="100%" width="50%"
+ text="Selected Item: {selectedNode.@label}"/>
+ </mx:HDividedBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/VScrollBarExample.mxml b/tourdeflexmodules/src/mx/controls/VScrollBarExample.mxml
new file mode 100755
index 0000000..288dab9
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/VScrollBarExample.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.
+ -->
+
+<!-- Simple example to demonstrate the VScrollBar control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ScrollEvent;
+
+ // Event handler function to display the scroll location
+ // as you move the scroll thumb.
+ private function myScroll(event:ScrollEvent):void
+ {
+ showPosition.text = "VScrollBar properties summary:" + '\n' +
+ "------------------------------------" + '\n' +
+ "Current scroll position: " + event.currentTarget.scrollPosition + '\n' +
+ "The maximum scroll position: " + event.currentTarget.maxScrollPosition + '\n' +
+ "The minimum scroll position: " + event.currentTarget.minScrollPosition ;
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel id="panel" title="VScrollBar Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Click on the scroll bar to view its properties."/>
+
+ <mx:VScrollBar id="bar" height="100%"
+ minScrollPosition="0" maxScrollPosition="{panel.width - 20}"
+ lineScrollSize="50" pageScrollSize="100"
+ repeatDelay="1000" repeatInterval="500"
+ scroll="myScroll(event)"/>
+
+ <mx:TextArea height="100%" width="100%" id="showPosition"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/VideoDisplayExample.mxml b/tourdeflexmodules/src/mx/controls/VideoDisplayExample.mxml
new file mode 100755
index 0000000..4db2057
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/VideoDisplayExample.mxml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the VideoDisplay control. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <mx:Panel title="VideoDisplay Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="75%"
+ text="Use the buttons to control the video. The Stop button resets the video to the beginning."/>
+
+ <mx:VideoDisplay id="myVid" height="158" width="211" source="assets/FlexInstaller.mp4" autoPlay="false"/>
+
+ <mx:HBox>
+ <mx:Button label="Play" click="myVid.play()"/>
+ <mx:Button label="Pause" click="myVid.pause()"/>
+ <mx:Button label="Stop" click="myVid.stop()"/>
+ </mx:HBox>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/controls/assets/ApacheFlexIcon.png b/tourdeflexmodules/src/mx/controls/assets/ApacheFlexIcon.png
new file mode 100644
index 0000000..e68d831
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/assets/ApacheFlexIcon.png
Binary files differ
diff --git a/tourdeflexmodules/src/mx/controls/assets/ApacheFlexLogo.png b/tourdeflexmodules/src/mx/controls/assets/ApacheFlexLogo.png
new file mode 100644
index 0000000..4ff037f
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/assets/ApacheFlexLogo.png
Binary files differ
diff --git a/tourdeflexmodules/src/mx/controls/assets/buttonDisabled.gif b/tourdeflexmodules/src/mx/controls/assets/buttonDisabled.gif
new file mode 100755
index 0000000..9a19d26
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/assets/buttonDisabled.gif
Binary files differ
diff --git a/tourdeflexmodules/src/mx/controls/assets/buttonDown.gif b/tourdeflexmodules/src/mx/controls/assets/buttonDown.gif
new file mode 100755
index 0000000..18c0ea4
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/assets/buttonDown.gif
Binary files differ
diff --git a/tourdeflexmodules/src/mx/controls/assets/buttonOver.gif b/tourdeflexmodules/src/mx/controls/assets/buttonOver.gif
new file mode 100755
index 0000000..9c66b81
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/assets/buttonOver.gif
Binary files differ
diff --git a/tourdeflexmodules/src/mx/controls/assets/buttonUp.gif b/tourdeflexmodules/src/mx/controls/assets/buttonUp.gif
new file mode 100755
index 0000000..36dfb34
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/assets/buttonUp.gif
Binary files differ
diff --git a/tourdeflexmodules/src/mx/controls/assets/flexinstaller.mp4 b/tourdeflexmodules/src/mx/controls/assets/flexinstaller.mp4
new file mode 100644
index 0000000..8c877c4
--- /dev/null
+++ b/tourdeflexmodules/src/mx/controls/assets/flexinstaller.mp4
Binary files differ
diff --git a/tourdeflexmodules/src/mx/core/RepeaterExample.mxml b/tourdeflexmodules/src/mx/core/RepeaterExample.mxml
new file mode 100755
index 0000000..aec6605
--- /dev/null
+++ b/tourdeflexmodules/src/mx/core/RepeaterExample.mxml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Repeater class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.controls.Alert;
+
+ [Bindable]
+ private var dp:Array = [1, 2, 3, 4, 5, 6, 7, 8, 9];
+
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="Repeater Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the Repeater class to create 9 Button controls in a 3 by 3 Tile container."/>
+
+ <mx:Tile direction="horizontal" borderStyle="inset"
+ horizontalGap="10" verticalGap="15"
+ paddingLeft="10" paddingTop="10" paddingBottom="10" paddingRight="10">
+
+ <mx:Repeater id="rp" dataProvider="{dp}">
+ <mx:Button height="49" width="50"
+ label="{String(rp.currentItem)}"
+ click="Alert.show(String(event.currentTarget.getRepeaterItem()) + ' pressed')"/>
+ </mx:Repeater>
+ </mx:Tile>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/core/SimpleApplicationExample.mxml b/tourdeflexmodules/src/mx/core/SimpleApplicationExample.mxml
new file mode 100755
index 0000000..8585317
--- /dev/null
+++ b/tourdeflexmodules/src/mx/core/SimpleApplicationExample.mxml
@@ -0,0 +1,61 @@
+<?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 Application container. -->
+
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ backgroundColor="0xCCCCCC" borderStyle="solid"
+ horizontalAlign="center" verticalAlign="middle"
+ applicationComplete="appComplete()">
+
+ <fx:Script>
+ <![CDATA[
+
+ // Event handlers for the components.
+ private function appComplete():void {
+ myTA.text+="Application creation complete" + "\n";
+ }
+
+ private function panelCreationComplete():void {
+ myTA.text+="Panel creation complete" + "\n";
+ }
+
+ private function textAreaCreationComplete():void {
+ myTA.text+="\n" + "TextArea creation complete" + "\n";
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:ApplicationControlBar dock="true">
+ <mx:Button label="Set Grey Solid Fill"
+ click="this.setStyle('backgroundColor', 0xCCCCCC)"/>
+ <mx:Button label="Set Blue Solid Fill"
+ click="this.setStyle('backgroundColor', 0x66CCFF)"/>
+ </mx:ApplicationControlBar>
+
+ <mx:Panel title="Application Container Example" backgroundColor="0x9CB0BA"
+ width="75%" height="75%"
+ creationComplete="panelCreationComplete()">
+
+ <mx:TextArea id="myTA" height="100%" width="100%"
+ text="Event order: "
+ creationComplete="textAreaCreationComplete()"/>
+
+ </mx:Panel>
+</mx:Application>
diff --git a/tourdeflexmodules/src/mx/effects/AddItemActionEffectExample.mxml b/tourdeflexmodules/src/mx/effects/AddItemActionEffectExample.mxml
new file mode 100755
index 0000000..c1cbee2
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/AddItemActionEffectExample.mxml
@@ -0,0 +1,103 @@
+<?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.
+ -->
+
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.effects.easing.Elastic;
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var myDP:ArrayCollection = new ArrayCollection(
+ ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P']);
+
+ private function deleteItem():void {
+ // As each item is removed, the index of the other items changes.
+ // So first get the items to delete, then determine their indices
+ // as you remove them.
+ var toRemove:Array = [];
+ for (var i:int = 0; i < tlist0.selectedItems.length; i++)
+ toRemove.push(tlist0.selectedItems[i]);
+ for (i = 0; i < toRemove.length; i++)
+ myDP.removeItemAt(myDP.getItemIndex(toRemove[i]));
+ }
+
+ private var zcount:int = 0;
+ private function addItem():void {
+ // Always add the new item after the third item,
+ // or after the last item if the length is less than 3.
+ myDP.addItemAt("Z"+zcount++,Math.min(3,myDP.length));
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define a custom data effect as a Sequence effect. -->
+ <mx:Sequence id="itemsChangeEffect1">
+ <mx:Blur
+ blurYTo="12" blurXTo="12"
+ duration="300"
+ perElementOffset="150"
+ filter="removeItem"/>
+ <mx:Parallel>
+ <mx:Move
+ duration="750"
+ easingFunction="{Elastic.easeOut}"
+ perElementOffset="20"/>
+ <mx:RemoveItemAction
+ startDelay="400"
+ filter="removeItem"/>
+ <mx:AddItemAction
+ startDelay="400"
+ filter="addItem"/>
+ <mx:Blur
+ startDelay="410"
+ blurXFrom="18" blurYFrom="18" blurXTo="0" blurYTo="0"
+ duration="300"
+ filter="addItem"/>
+ </mx:Parallel>
+ </mx:Sequence>
+ </fx:Declarations>
+
+ <mx:Panel title="AddItemEffect/RemoveItemEffect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <!-- This TileList uses a custom data change effect -->
+ <mx:TileList id="tlist0"
+ height="100%" width="100%"
+ fontSize="18" fontWeight="bold"
+ columnCount="4" rowCount="4"
+ direction="horizontal"
+ dataProvider="{myDP}"
+ allowMultipleSelection="true"
+ offscreenExtraRowsOrColumns="4"
+ itemsChangeEffect="{itemsChangeEffect1}"/>
+
+ <mx:Button
+ label="Delete selected item(s)"
+ click="deleteItem()"/>
+ <mx:Button
+ label="Add item"
+ click="addItem()"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/AnimatePropertyEffectExample.mxml b/tourdeflexmodules/src/mx/effects/AnimatePropertyEffectExample.mxml
new file mode 100755
index 0000000..abc7fd2
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/AnimatePropertyEffectExample.mxml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the AnimateProperty effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:Sequence id="animateScaleXUpDown" >
+ <mx:AnimateProperty property="scaleX" fromValue="1" toValue="1.5" duration="1000" />
+ <mx:AnimateProperty property="scaleX" fromValue="1.5" toValue="1" duration="1000" />
+ </mx:Sequence>
+ </fx:Declarations>
+
+ <mx:Panel title="AnimateProperty Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Click on the image to use the AnimateProperty effect with the scaleX property."/>
+
+ <mx:Image id="flex" source="@Embed(source='assets/ApacheFlexLogo.png')"
+ mouseDownEffect="{animateScaleXUpDown}" width="50%" height="50%" />
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/BlurEffectExample.mxml b/tourdeflexmodules/src/mx/effects/BlurEffectExample.mxml
new file mode 100755
index 0000000..9fd88bb
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/BlurEffectExample.mxml
@@ -0,0 +1,46 @@
+<?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 Blur effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:Blur id="blurImage" duration="1000"
+ blurXFrom="0.0" blurXTo="10.0"
+ blurYFrom="0.0" blurYTo="10.0"/>
+ <mx:Blur id="unblurImage" duration="1000"
+ blurXFrom="10.0" blurXTo="0.0"
+ blurYFrom="10.0" blurYTo="0.0"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Blur Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Click and hold the mouse on the image to see blurImage effect. Release the mouse to see the unblurImage effect."/>
+
+ <mx:Image id="flex" source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ mouseDownEffect="{blurImage}"
+ mouseUpEffect="{unblurImage}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/CompositeEffectExample.mxml b/tourdeflexmodules/src/mx/effects/CompositeEffectExample.mxml
new file mode 100755
index 0000000..a20205a
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/CompositeEffectExample.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.
+ -->
+
+<!-- Simple example to demonstrate the Composite effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.effects.Move;
+ import mx.effects.Sequence;
+ import mx.effects.Parallel;
+
+ private var movesequenceA:Move;
+ private var movesequenceB:Move;
+ private var moveparallelbutton:Move;
+ private var sequenceAB:Sequence;
+ private var parallelAB:Parallel;
+
+ private function startEffect(ax:Number, ay:Number, bx:Number, by:Number):void
+ {
+ movesequenceA= new Move(a);
+ movesequenceB= new Move(b);
+ moveparallelbutton= new Move(button);
+ sequenceAB= new Sequence();
+ parallelAB= new Parallel();
+
+ sequenceAB.addChild(movesequenceA);
+ sequenceAB.addChild(movesequenceB);
+
+ parallelAB.addChild(moveparallelbutton);
+
+ moveparallelbutton.xTo=0;
+ moveparallelbutton.xFrom= 245;
+ moveparallelbutton.yFrom=85;
+ moveparallelbutton.duration= 4000;
+
+ movesequenceA.xTo= ax;
+ movesequenceA.xBy= 200;
+ movesequenceA.yTo= ay;
+ movesequenceA.yBy= 175;
+ movesequenceA.duration= 2000;
+ movesequenceB.yFrom =175;
+ movesequenceB.xTo= bx;
+ movesequenceB.xBy= 200;
+ movesequenceB.yTo= by;
+ movesequenceB.yBy= 200;
+ movesequenceB.duration= 2000;
+
+ sequenceAB.play();
+ parallelAB.play();
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="Composite Effect"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Canvas id="canvas" width="100%" height="100%">
+
+ <mx:Label id="a" color="#009966" text="Sequence 1"
+ height="{(canvas.height-20)/2}"
+ width="{(canvas.width-20)/2}"
+ effectStart=" a.text= 'sequence 1 Running'"
+ effectEnd="a.text='sequence 1 ended!!!' "/>
+
+ <mx:Label id="b" x="0" y="175" color="#00CCFF"
+ text="Sequence 2"
+ height="{(canvas.height-20)/2}"
+ width="{(canvas.width-20)/2}"
+ effectStart=" b.text= 'sequence 2 Running'"
+ effectEnd="b.text='sequence 2 ended!!'" />
+
+ <mx:Button id="button" x="245" y="85"
+ label="Start effect"
+ click="startEffect(200,175,200,0)"
+ effectStart="button.label='parallel effect running'"
+ effectEnd="button.label='parallel effect ended!!'"/>
+
+ </mx:Canvas>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/DefaultListEffectExample.mxml b/tourdeflexmodules/src/mx/effects/DefaultListEffectExample.mxml
new file mode 100755
index 0000000..b147c00
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/DefaultListEffectExample.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.
+ -->
+
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.effects.DefaultListEffect;
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var myDP:ArrayCollection = new ArrayCollection(
+ ['A','B','C','D','E','F','G','H']);
+
+ private function deleteItem():void {
+ // As each item is removed, the index of the other items changes.
+ // So first get the items to delete, then determine their indices
+ // as you remove them.
+ var toRemove:Array = [];
+ for (var i:int = 0; i < list0.selectedItems.length; i++)
+ toRemove.push(list0.selectedItems[i]);
+ for (i = 0; i < toRemove.length; i++)
+ myDP.removeItemAt(myDP.getItemIndex(toRemove[i]));
+ }
+
+ private var zcount:int = 0;
+ private function addItem():void {
+ // Always add the new item after the third item,
+ // or after the last item if the length is less than 3.
+ myDP.addItemAt("Z"+zcount++,Math.min(3,myDP.length));
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define an instance of the DefaultListEffect effect,
+ and set its fadeOutDuration and color properties. -->
+ <mx:DefaultListEffect id="myDLE"
+ fadeOutDuration="1000"
+ color="0x0000ff"/>
+ </fx:Declarations>
+
+ <mx:Panel title="DefaultListEffect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:List id="list0"
+ width="150"
+ dataProvider="{myDP}"
+ variableRowHeight="true"
+ fontSize="18"
+ allowMultipleSelection="true"
+ itemsChangeEffect="{myDLE}"/>
+
+ <mx:Button
+ label="Delete item"
+ click="deleteItem()"/>
+ <mx:Button
+ label="Add item"
+ click="addItem()"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/DefaultTileListEffectExample.mxml b/tourdeflexmodules/src/mx/effects/DefaultTileListEffectExample.mxml
new file mode 100755
index 0000000..e75b4be
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/DefaultTileListEffectExample.mxml
@@ -0,0 +1,82 @@
+<?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.
+ -->
+
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.effects.DefaultTileListEffect;
+ import mx.effects.easing.Elastic;
+ import mx.collections.ArrayCollection;
+ import mx.effects.Move;
+
+ [Bindable]
+ private var myDP:ArrayCollection = new ArrayCollection(
+ ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P']);
+
+ private function deleteItems():void {
+ // As each item is removed, the index of the other items changes.
+ // So first get the items to delete, then determine their indices
+ // as you remove them.
+ var toRemove:Array = [];
+ for (var i:int = 0; i < tlist0.selectedItems.length; i++)
+ toRemove.push(tlist0.selectedItems[i]);
+ for (i = 0; i < toRemove.length; i++)
+ myDP.removeItemAt(myDP.getItemIndex(toRemove[i]));
+ }
+
+ private var zcount:int = 0;
+ private function addItems():void {
+ myDP.addItemAt("Z"+zcount++,Math.min(2,myDP.length));
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define an instance of the DefaultTileListEffect effect,
+ and set its moveDuration and color properties. -->
+ <mx:DefaultTileListEffect id="myDTLE"
+ moveDuration="100"
+ color="0x0000ff"/>
+ </fx:Declarations>
+
+ <mx:Panel title="DefaultTileListEffect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:TileList id="tlist0"
+ height="100%" width="100%"
+ columnCount="4" rowCount="4"
+ fontSize="18" fontWeight="bold"
+ direction="horizontal"
+ dataProvider="{myDP}"
+ allowMultipleSelection="true"
+ offscreenExtraRowsOrColumns="2"
+ itemsChangeEffect="{myDTLE}" />
+
+ <mx:Button
+ label="Delete selected item(s)"
+ click="deleteItems()"/>
+ <mx:Button
+ label="Add item"
+ click="addItems()"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/DissolveEffectExample.mxml b/tourdeflexmodules/src/mx/effects/DissolveEffectExample.mxml
new file mode 100755
index 0000000..aaeb4eb
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/DissolveEffectExample.mxml
@@ -0,0 +1,61 @@
+<?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 Dissolve effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+
+ <fx:Declarations>
+ <mx:Dissolve id="dissolveOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
+ <mx:Dissolve id="dissolveIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Dissolve Effect Example" layout="horizontal"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:VBox height="100%">
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ visible="{cb1.selected}"
+ hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
+ </mx:VBox>
+
+ <mx:VBox height="100%" width="100%">
+ <mx:Text width="100%"
+ text="Use the Dissolve effect to show or hide the text, image, and button."/>
+
+ <mx:Spacer height="100%"/>
+
+ <mx:Button label="Purchase"
+ visible="{cb1.selected}"
+ hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
+ </mx:VBox>
+
+ <mx:ControlBar>
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+ </mx:ControlBar>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/FadeEffectExample.mxml b/tourdeflexmodules/src/mx/effects/FadeEffectExample.mxml
new file mode 100755
index 0000000..3604688
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/FadeEffectExample.mxml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Fade effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Style>
+ @font-face {
+ src:url("./assets/OpenSans-Regular.ttf");
+ fontFamily: OpenSans;
+ embedAsCFF: false;
+ }
+ </fx:Style>
+
+ <fx:Declarations>
+ <mx:Fade id="fadeOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
+ <mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Fade Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the Fade effect to show or hide the text and image. Use an embedded font when applying the Fade effect to text."/>
+
+ <mx:Label text="Apache Flex"
+ fontFamily="OpenSans" fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{fadeOut}" showEffect="{fadeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ visible="{cb1.selected}"
+ hideEffect="{fadeOut}" showEffect="{fadeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/GlowEffectExample.mxml b/tourdeflexmodules/src/mx/effects/GlowEffectExample.mxml
new file mode 100755
index 0000000..8c2b308
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/GlowEffectExample.mxml
@@ -0,0 +1,50 @@
+<?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 Glow effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:Glow id="glowImage" duration="1000"
+ alphaFrom="1.0" alphaTo="0.3"
+ blurXFrom="0.0" blurXTo="50.0"
+ blurYFrom="0.0" blurYTo="50.0"
+ color="0x00FF00"/>
+ <mx:Glow id="unglowImage" duration="1000"
+ alphaFrom="0.3" alphaTo="1.0"
+ blurXFrom="50.0" blurXTo="0.0"
+ blurYFrom="50.0" blurYTo="0.0"
+ color="0x0000FF"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Glow Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Click and hold the mouse on the image to see glowImage effect. Release the mouse to see unglowImage effect."/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ mouseDownEffect="{glowImage}"
+ mouseUpEffect="{unglowImage}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/IrisEffectExample.mxml b/tourdeflexmodules/src/mx/effects/IrisEffectExample.mxml
new file mode 100755
index 0000000..e29ef27
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/IrisEffectExample.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Iris effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:Iris id="irisOut" duration="1000" showTarget="true"/>
+ <mx:Iris id="irisIn" duration="1000" showTarget="false"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Iris Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the Iris effect to show or hide the logo."/>
+
+ <mx:Image id="flex" source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ visible="{cb1.selected}"
+ showEffect="{irisIn}" hideEffect="{irisOut}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/MoveEffectExample.mxml b/tourdeflexmodules/src/mx/effects/MoveEffectExample.mxml
new file mode 100755
index 0000000..ede9fa3
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/MoveEffectExample.mxml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Move effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ private function moveImage():void {
+ myMove.end();
+ myMove.xTo=mouseX-60;
+ myMove.play();
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Move id="myMove" target="{img}"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Move Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Click anywhere on the canvas to move the logo horizontally to that position"/>
+
+ <mx:Canvas id="canvas" width="100%" height="100%" mouseDown="moveImage()">
+
+ <mx:Image id="img" source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"/>
+
+ </mx:Canvas>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/ParallelEffectExample.mxml b/tourdeflexmodules/src/mx/effects/ParallelEffectExample.mxml
new file mode 100755
index 0000000..3456ce4
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/ParallelEffectExample.mxml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Parallel effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:Parallel id="expand" target="{img}">
+ <mx:Move xTo="{canvas.width/2 - 50}" yTo="{canvas.height/2 - 100}"/>
+ <mx:Resize widthTo="100" heightTo="200"/>
+ </mx:Parallel>
+
+ <mx:Parallel id="contract" target="{img}">
+ <mx:Move xTo="20" yTo="20"/>
+ <mx:Resize widthTo="30" heightTo="60"/>
+ </mx:Parallel>
+ </fx:Declarations>
+
+ <mx:Panel title="Parallel Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the Button controls to move and resize the logo in parallel."/>
+
+ <mx:Canvas id="canvas" width="100%" height="100%">
+ <mx:Image id="img" x="20" y="20" width="30" height="60"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+ </mx:Canvas>
+
+ <mx:ControlBar>
+ <mx:Button label="Expand" click="expand.end(); expand.play()"/>
+ <mx:Button label="Contract" click="contract.end(); contract.play()"/>
+ </mx:ControlBar>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/PauseEffectExample.mxml b/tourdeflexmodules/src/mx/effects/PauseEffectExample.mxml
new file mode 100755
index 0000000..8b12112
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/PauseEffectExample.mxml
@@ -0,0 +1,50 @@
+<?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 Pause effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.effects.easing.*;
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Sequence id="movePauseMove">
+ <mx:Move xBy="150" duration="2000" easingFunction="Bounce.easeOut"/>
+ <mx:Pause duration="2000"/>
+ <mx:Move xBy="-150" duration="2000" easingFunction="Bounce.easeIn"/>
+ </mx:Sequence>
+ </fx:Declarations>
+
+ <mx:Panel title="Pause Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Click the logo to start the Sequence effect. The effect pauses for 2 seconds between moves."/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ mouseDownEffect="{movePauseMove}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/ResizeEffectExample.mxml b/tourdeflexmodules/src/mx/effects/ResizeEffectExample.mxml
new file mode 100755
index 0000000..e936e6d
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/ResizeEffectExample.mxml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Resize effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:Resize id="expand" target="{img}" widthTo="100" heightTo="200"/>
+ <mx:Resize id="contract" target="{img}" widthTo="30" heightTo="60"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Resize Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the Button controls to resize the image."/>
+
+ <mx:Image id="img" width="30" height="60"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+
+ <mx:ControlBar>
+ <mx:Button label="Expand" click="expand.end(); expand.play()"/>
+ <mx:Button label="Contract" click="contract.end(); contract.play()"/>
+ </mx:ControlBar>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/RotateEffectExample.mxml b/tourdeflexmodules/src/mx/effects/RotateEffectExample.mxml
new file mode 100755
index 0000000..08f2f89
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/RotateEffectExample.mxml
@@ -0,0 +1,69 @@
+<?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 Rotate effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ [Bindable]
+ public var angle:int=0;
+
+ private function rotateImage():void {
+ rotate.end();
+ angle += 45;
+ rotate.play();
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Style>
+ @font-face {
+ src:url("./assets/OpenSans-Regular.ttf");
+ fontFamily: OpenSans;
+ embedAsCFF: false;
+ }
+ </fx:Style>
+
+ <fx:Declarations>
+ <mx:Rotate id="rotate" angleFrom="{angle-45}" angleTo="{angle}" target="{myVB}"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Rotate Effect Example" layout="horizontal"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:VBox id="myVB" width="50%" horizontalAlign="center">
+ <mx:Label text="Apache Flex"
+ fontFamily="OpenSans" fontSize="14"/>
+
+ <mx:Image id="img"
+ width="50%" height="50%"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+ </mx:VBox>
+
+ <mx:Text width="50%"
+ text="Click the button to rotate the image 45 degrees. Use an embedded font when applying the Rotate effect to text."/>
+
+ <mx:ControlBar>
+ <mx:Button label="Rotate 45 Degrees" click="rotateImage()"/>
+ </mx:ControlBar>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/SequenceEffectExample.mxml b/tourdeflexmodules/src/mx/effects/SequenceEffectExample.mxml
new file mode 100755
index 0000000..7db2617
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/SequenceEffectExample.mxml
@@ -0,0 +1,50 @@
+<?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 Sequence effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.effects.easing.*;
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Sequence id="movePauseMove">
+ <mx:Move xBy="150" duration="2000" easingFunction="Bounce.easeOut"/>
+ <mx:Pause duration="2000"/>
+ <mx:Move xBy="-150" duration="2000" easingFunction="Bounce.easeIn"/>
+ </mx:Sequence>
+ </fx:Declarations>
+
+ <mx:Panel title="Sequence Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Click the logo to start the Sequence effect. The effect pauses for 2 seconds between moves."/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ mouseDownEffect="{movePauseMove}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/SimpleEffectExample.mxml b/tourdeflexmodules/src/mx/effects/SimpleEffectExample.mxml
new file mode 100755
index 0000000..811868b
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/SimpleEffectExample.mxml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Effect class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.controls.Alert;
+
+ // Event handler for the effectEnd event.
+ private function endEffectHandler():void {
+ Alert.show("Effect Ended!");
+ }
+
+ // Event handler for the reset button.
+ private function resetHandler():void {
+ expand.end();
+ img.width=30;
+ img.height=60;
+ button1.enabled=true;
+ }
+ ]]>
+ </fx:Script>
+
+
+ <fx:Declarations>
+ <mx:Resize id="expand" target="{img}" widthTo="100" heightTo="200"
+ duration="10000" effectEnd="endEffectHandler()"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Resize Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the Button controls to control the Resize effect."/>
+
+ <mx:Image id="img" width="30" height="60"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+
+ <mx:ControlBar>
+ <mx:Button id="button1" label="Start" click="expand.play(); button1.enabled=false"/>
+ <mx:Button label="Pause" click="expand.pause()"/>
+ <mx:Button label="Resume" click="expand.resume()"/>
+ <mx:Button label="Reverse" click="expand.reverse()"/>
+ <mx:Button label="End" click="expand.end()"/>
+ <mx:Button label="Reset" click="resetHandler()"/>
+ </mx:ControlBar>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/SimpleTweenEffectExample.mxml b/tourdeflexmodules/src/mx/effects/SimpleTweenEffectExample.mxml
new file mode 100755
index 0000000..55c20fc
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/SimpleTweenEffectExample.mxml
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the TweenEffect class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.TweenEvent;
+
+ // Event handler for the tweenUpdate and tweenEnd effects.
+ private function tweenUpdateHandler(event:TweenEvent):void {
+ // Access current width of the image.
+ currentWidth.text="Current width (in pixels): " + String(event.value[0]);
+ }
+
+ // Event handler for the reset button.
+ private function resetHandler():void {
+ expand.end();
+ img.width=30;
+ currentWidth.text="Current width (in pixels): 30";
+ img.height=60;
+ button1.enabled=true;
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Resize id="expand" target="{img}" widthTo="100" heightTo="200"
+ duration="10000"
+ tweenUpdate="tweenUpdateHandler(event)"
+ tweenEnd="tweenUpdateHandler(event)"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Resize Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the Button controls to resize the image."/>
+
+ <mx:HBox width="100%">
+ <mx:Image id="img" width="30" height="60"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+ <mx:Text id="currentWidth" height="20" width="100%"/>
+ </mx:HBox>
+
+ <mx:ControlBar>
+ <mx:Button id="button1" label="Start" click="expand.play(); button1.enabled=false"/>
+ <mx:Button label="Pause" click="expand.pause()"/>
+ <mx:Button label="Resume" click="expand.resume()"/>
+ <mx:Button label="Reverse" click="expand.reverse()"/>
+ <mx:Button label="End" click="expand.end()"/>
+ <mx:Button label="Reset" click="resetHandler()"/>
+ </mx:ControlBar>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/SoundEffectExample.mxml b/tourdeflexmodules/src/mx/effects/SoundEffectExample.mxml
new file mode 100755
index 0000000..e93d095
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/SoundEffectExample.mxml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the SoundEffect effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:SoundEffect id="mySounds" source="@Embed(source='./assets/ping.mp3')"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Sound Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label width="100%"
+ text="Click on the logo to hear the sound effect."/>
+
+ <mx:Image id="flex" source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ mouseDownEffect="{mySounds}"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/WipeDownExample.mxml b/tourdeflexmodules/src/mx/effects/WipeDownExample.mxml
new file mode 100755
index 0000000..6fd93b9
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/WipeDownExample.mxml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the WipeDown effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:WipeDown id="wipeOut" duration="1000"/>
+ <mx:WipeDown id="wipeIn" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="WipeDown Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the WipeDown effect to show or hide the text and image."/>
+
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/WipeLeftExample.mxml b/tourdeflexmodules/src/mx/effects/WipeLeftExample.mxml
new file mode 100755
index 0000000..3ee0bf5
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/WipeLeftExample.mxml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the WipeLeft effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:WipeLeft id="wipeOut" duration="1000"/>
+ <mx:WipeLeft id="wipeIn" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="WipeLeft Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the WipeLeft effect to show or hide the text and image."/>
+
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/WipeRightExample.mxml b/tourdeflexmodules/src/mx/effects/WipeRightExample.mxml
new file mode 100755
index 0000000..8dc8e72
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/WipeRightExample.mxml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the WipeRight effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:WipeRight id="wipeOut" duration="1000"/>
+ <mx:WipeRight id="wipeIn" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="WipeRight Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the WipeRight effect to show or hide the text and image."/>
+
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/WipeUpExample.mxml b/tourdeflexmodules/src/mx/effects/WipeUpExample.mxml
new file mode 100755
index 0000000..acc2047
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/WipeUpExample.mxml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the WipeUp effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Declarations>
+ <mx:WipeUp id="wipeOut" duration="1000"/>
+ <mx:WipeUp id="wipeIn" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="WipeUp Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Use the WipeUp effect to show or hide the text and image."/>
+
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ width="50%" height="50%"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/ZoomEffectExample.mxml b/tourdeflexmodules/src/mx/effects/ZoomEffectExample.mxml
new file mode 100755
index 0000000..95716bf
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/ZoomEffectExample.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.
+ -->
+
+<!-- Simple example to demonstrate the Zoom effect. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import flash.events.MouseEvent;
+
+ public function doZoom(event:MouseEvent):void {
+ if (zoomAll.isPlaying) {
+ zoomAll.reverse();
+ }
+ else {
+ // If this is a ROLL_OUT event, play the effect backwards.
+ // If this is a ROLL_OVER event, play the effect forwards.
+ zoomAll.play([event.target], event.type == MouseEvent.ROLL_OUT ? true : false);
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Zoom id="zoomAll" zoomWidthTo="0.5" zoomHeightTo="0.5" zoomWidthFrom="0.25" zoomHeightFrom="0.25" />
+ </fx:Declarations>
+
+ <mx:Panel title="Zoom Effect Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Move the mouse over the image to enlarge it. Move the mouse off of the image to shrink it."/>
+
+ <mx:Image id="img"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"
+ scaleX="0.25" scaleY="0.25"
+ rollOver="doZoom(event)"
+ rollOut="doZoom(event)"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/effects/assets/ApacheFlexLogo.png b/tourdeflexmodules/src/mx/effects/assets/ApacheFlexLogo.png
new file mode 100644
index 0000000..4ff037f
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/assets/ApacheFlexLogo.png
Binary files differ
diff --git a/tourdeflexmodules/src/mx/effects/assets/OpenSans-Regular.ttf b/tourdeflexmodules/src/mx/effects/assets/OpenSans-Regular.ttf
new file mode 100644
index 0000000..db43334
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/assets/OpenSans-Regular.ttf
Binary files differ
diff --git a/tourdeflexmodules/src/mx/effects/assets/ping.mp3 b/tourdeflexmodules/src/mx/effects/assets/ping.mp3
new file mode 100644
index 0000000..2eb90ea
--- /dev/null
+++ b/tourdeflexmodules/src/mx/effects/assets/ping.mp3
Binary files differ
diff --git a/tourdeflexmodules/src/mx/formatters/CurrencyFormatterExample.mxml b/tourdeflexmodules/src/mx/formatters/CurrencyFormatterExample.mxml
new file mode 100755
index 0000000..37a085c
--- /dev/null
+++ b/tourdeflexmodules/src/mx/formatters/CurrencyFormatterExample.mxml
@@ -0,0 +1,74 @@
+<?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 CurrencyFormatter. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.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) {
+ var temp:Number=Number(priceUS.text);
+ formattedUSPrice.text= usdFormatter.format(temp);
+ }
+
+ else {
+ formattedUSPrice.text="";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:CurrencyFormatter id="usdFormatter" precision="2"
+ currencySymbol="$" decimalSeparatorFrom="."
+ decimalSeparatorTo="." useNegativeSign="true"
+ useThousandsSeparator="true" alignSymbol="left"/>
+
+ <mx:NumberValidator id="numVal" source="{priceUS}" property="text"
+ allowNegative="true" domain="real"/>
+ </fx:Declarations>
+
+ <mx:Panel title="CurrencyFormatter Example" height="100%" width="100%">
+
+ <mx:Form>
+ <mx:FormItem label="Enter U.S. dollar amount:">
+ <mx:TextInput id="priceUS" text="" width="50%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted amount: ">
+ <mx:TextInput id="formattedUSPrice" text="" width="50%" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format()"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/formatters/DateFormatterExample.mxml b/tourdeflexmodules/src/mx/formatters/DateFormatterExample.mxml
new file mode 100755
index 0000000..4442841
--- /dev/null
+++ b/tourdeflexmodules/src/mx/formatters/DateFormatterExample.mxml
@@ -0,0 +1,68 @@
+<?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 DateFormatter. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.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>
+
+ <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>
+
+ <mx:Panel title="DateFormatter Example" height="100%" width="100%">
+
+ <mx:Form width="100%">
+ <mx:FormItem label="Enter date (mm/dd/yyyy):" width="100%">
+ <mx:TextInput id="dob" text=""/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted date: " width="100%">
+ <mx:TextInput id="formattedDate" text="" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format()"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/formatters/NumberFormatterExample.mxml b/tourdeflexmodules/src/mx/formatters/NumberFormatterExample.mxml
new file mode 100755
index 0000000..bc64f8e
--- /dev/null
+++ b/tourdeflexmodules/src/mx/formatters/NumberFormatterExample.mxml
@@ -0,0 +1,71 @@
+<?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 NumberFormatter. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.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>
+
+ <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>
+
+ <mx:Panel title="NumberFormatter Example" height="100%" width="100%">
+
+ <mx:Form>
+ <mx:FormItem label="Enter number:">
+ <mx:TextInput id="inputVal" text="" width="50%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted number (precision=4): ">
+ <mx:TextInput id="formattedNumber" editable="false" width="50%"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format()"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/formatters/PhoneFormatterExample.mxml b/tourdeflexmodules/src/mx/formatters/PhoneFormatterExample.mxml
new file mode 100755
index 0000000..2f7aa5b
--- /dev/null
+++ b/tourdeflexmodules/src/mx/formatters/PhoneFormatterExample.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.
+ -->
+
+<!-- Simple example to demonstrate PhoneFormatter. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.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>
+
+ <fx:Declarations>
+ <mx:PhoneFormatter id="phoneFormatter"
+ formatString="(###) ###-####" validPatternChars="#-() "/>
+
+ <mx:PhoneNumberValidator id="pnVal" source="{phone}" property="text"
+ allowedFormatChars=""/>
+ </fx:Declarations>
+
+ <mx:Panel title="PhoneFormatter Example" height="100%" width="100%">
+
+ <mx:Form>
+ <mx:FormItem label="Enter a 10-digit phone number:">
+ <mx:TextInput id="phone" text="" width="75%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted phone number: ">
+ <mx:TextInput id="formattedPhone" text="" width="75%" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format()"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/formatters/SimpleFormatterExample.mxml b/tourdeflexmodules/src/mx/formatters/SimpleFormatterExample.mxml
new file mode 100755
index 0000000..ea05724
--- /dev/null
+++ b/tourdeflexmodules/src/mx/formatters/SimpleFormatterExample.mxml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Formatter class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ // 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>
+
+ <fx:Declarations>
+ <mx:NumberFormatter id="numberFormatter"/>
+ </fx:Declarations>
+
+ <mx:Panel title="NumberFormatter Example" height="100%" width="100%">
+
+ <mx:Form>
+ <mx:FormItem label="Enter number - a letter is invalid:">
+ <mx:TextInput id="inputVal" text="" width="75%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted number: ">
+ <mx:TextInput id="formattedNumber" editable="false" width="75%"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format()"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/formatters/SwitchSymbolFormatterExample.mxml b/tourdeflexmodules/src/mx/formatters/SwitchSymbolFormatterExample.mxml
new file mode 100755
index 0000000..fa6e6f9
--- /dev/null
+++ b/tourdeflexmodules/src/mx/formatters/SwitchSymbolFormatterExample.mxml
@@ -0,0 +1,66 @@
+<?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 SwitchSymbolFormatter. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.formatters.SwitchSymbolFormatter;
+ import mx.events.ValidationResultEvent;
+
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = scVal.validate();
+
+ if (vResult.type==ValidationResultEvent.VALID) {
+ var switcher:SwitchSymbolFormatter=new SwitchSymbolFormatter('#');
+
+ formattedSCNumber.text =
+ switcher.formatValue("Formatted Social Securty number: ###-##-#### ", scNum.text);
+ }
+
+ else {
+ formattedSCNumber.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:SocialSecurityValidator id="scVal" source="{scNum}" property="text"/>
+ </fx:Declarations>
+
+ <mx:Panel title="SwitchSymbolFormatter Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Label text="Enter a 9 digit Social Security number with no separator characters:"/>
+ <mx:TextInput id="scNum" text="" maxChars="9" width="50%"/>
+
+ <mx:Button label="Validate and Format" click="Format()"/>
+ <mx:TextInput id="formattedSCNumber" editable="false" width="75%"/>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/formatters/ZipCodeFormatterExample.mxml b/tourdeflexmodules/src/mx/formatters/ZipCodeFormatterExample.mxml
new file mode 100755
index 0000000..c38ccb6
--- /dev/null
+++ b/tourdeflexmodules/src/mx/formatters/ZipCodeFormatterExample.mxml
@@ -0,0 +1,69 @@
+<?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 ZipCodeFormatter. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ValidationResultEvent;
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = zcVal.validate();
+
+ if (vResult.type==ValidationResultEvent.VALID) {
+ formattedZipcode.text= zipFormatter.format(zip.text);
+ }
+
+ else {
+ formattedZipcode.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:ZipCodeFormatter id="zipFormatter" formatString="#####-####"/>
+
+ <mx:ZipCodeValidator id="zcVal" source="{zip}" property="text" allowedFormatChars=""/>
+ </fx:Declarations>
+
+ <mx:Panel title="ZipCodeFormatter Example" height="100%" width="100%">
+
+ <mx:Form width="100%">
+ <mx:FormItem label="Enter a 5 or 9 digit U.S. ZIP code:" width="100%">
+ <mx:TextInput id="zip" text=""/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted ZIP code: " width="100%">
+ <mx:TextInput id="formattedZipcode" text="" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format()"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/printing/AdvancedPrintDataGridExample.mxml b/tourdeflexmodules/src/mx/printing/AdvancedPrintDataGridExample.mxml
new file mode 100755
index 0000000..cb85d1f
--- /dev/null
+++ b/tourdeflexmodules/src/mx/printing/AdvancedPrintDataGridExample.mxml
@@ -0,0 +1,107 @@
+<?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.
+ -->
+
+<!-- printing\ADGPrint.mxml -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.printing.*;
+ import mx.collections.ArrayCollection;
+ import mx.printing.PrintAdvancedDataGrid;
+
+ // Create a PrintJob instance.
+ private function doPrint():void {
+ // Create an instance of the FlexPrintJob class.
+ var printJob:FlexPrintJob = new FlexPrintJob();
+
+ // Initialize the PrintAdvancedDataGrid control.
+ var printADG:PrintAdvancedDataGrid =
+ new PrintAdvancedDataGrid();
+ // Exclude the PrintAdvancedDataGrid control from layout.
+ printADG.includeInLayout = false;
+ printADG.source = adg;
+
+ // Add the print-specific control to the application.
+ addChild(printADG);
+
+ // Start the print job.
+ if (printJob.start() == false) {
+ // User cancelled print job.
+ // Remove the print-specific control to free memory.
+ removeChild(printADG);
+ return;
+ }
+
+ // Add the object to print. Do not scale it.
+ printJob.addObject(printADG, FlexPrintJobScaleType.NONE);
+
+ // Send the job to the printer.
+ printJob.send();
+
+ // Remove the print-specific control to free memory.
+ removeChild(printADG);
+ }
+
+ [Bindable]
+ private var dpHierarchy:ArrayCollection = new ArrayCollection([
+ {Region:"Southwest", children: [
+ {Region:"Arizona", children: [
+ {Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000},
+ {Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000}]},
+ {Region:"Central California", children: [
+ {Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000}]},
+ {Region:"Nevada", children: [
+ {Territory_Rep:"Bethany Pittman", Actual:52888, Estimate:45000}]},
+ {Region:"Northern California", children: [
+ {Territory_Rep:"Lauren Ipsum", Actual:38805, Estimate:40000},
+ {Territory_Rep:"T.R. Smith", Actual:55498, Estimate:40000}]},
+ {Region:"Southern California", children: [
+ {Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000},
+ {Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000}]}
+ ]}
+ ]);
+
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="PrintAdvancedDataGrid Control Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:AdvancedDataGrid id="adg"
+ width="100%" height="100%">
+ <mx:dataProvider>
+ <mx:HierarchicalData source="{dpHierarchy}"/>
+ </mx:dataProvider>
+ <mx:columns>
+ <mx:AdvancedDataGridColumn dataField="Region"/>
+ <mx:AdvancedDataGridColumn dataField="Territory_Rep"
+ headerText="Territory Rep"/>
+ <mx:AdvancedDataGridColumn dataField="Actual"/>
+ <mx:AdvancedDataGridColumn dataField="Estimate"/>
+ </mx:columns>
+ </mx:AdvancedDataGrid>
+
+ <mx:Button id="myButton"
+ label="Print"
+ click="doPrint()"/>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/printing/FormPrintFooter.mxml b/tourdeflexmodules/src/mx/printing/FormPrintFooter.mxml
new file mode 100755
index 0000000..853f59f
--- /dev/null
+++ b/tourdeflexmodules/src/mx/printing/FormPrintFooter.mxml
@@ -0,0 +1,34 @@
+<?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.
+ -->
+
+<!-- Custom control for the footer area of the printed page. -->
+
+<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="60%" horizontalAlign="right">
+
+ <!-- Declare and initialize the product total variable. -->
+ <fx:Script>
+ <![CDATA[
+ [Bindable]
+ public var pTotal:Number = 0;
+ ]]>
+ </fx:Script>
+
+ <mx:Label text="Product Total: {pTotal}"/>
+
+</mx:VBox>
diff --git a/tourdeflexmodules/src/mx/printing/FormPrintHeader.mxml b/tourdeflexmodules/src/mx/printing/FormPrintHeader.mxml
new file mode 100755
index 0000000..5285a93
--- /dev/null
+++ b/tourdeflexmodules/src/mx/printing/FormPrintHeader.mxml
@@ -0,0 +1,25 @@
+<?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.
+ -->
+
+<!-- Custom control for the header area of the printed page. -->
+
+<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="60%" horizontalAlign="right">
+
+ <mx:Label text="This is a placeholder for first page contents"/>
+</mx:VBox>
diff --git a/tourdeflexmodules/src/mx/printing/FormPrintView.mxml b/tourdeflexmodules/src/mx/printing/FormPrintView.mxml
new file mode 100755
index 0000000..4701121
--- /dev/null
+++ b/tourdeflexmodules/src/mx/printing/FormPrintView.mxml
@@ -0,0 +1,77 @@
+<?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.
+ -->
+
+<!-- Custom control to print the DataGrid control on multiple pages. -->
+
+<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns="*" backgroundColor="#FFFFFF" paddingTop="50" paddingBottom="50" paddingLeft="50">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.core.*
+ // Declare and initialize the variables used in the component.
+ // The application sets the actual prodTotal value.
+ [Bindable]
+ public var pageNumber:Number = 1;
+ [Bindable]
+ public var prodTotal:Number = 0;
+
+ // Control the page contents by selectively hiding the header and
+ // footer based on the page type.
+ public function showPage(pageType:String):void {
+ if(pageType == "first" || pageType == "middle") {
+ // Hide the footer.
+ footer.includeInLayout=false;
+ footer.visible = false;
+ }
+ if(pageType == "middle" || pageType == "last") {
+ // The header won't be used again; hide it.
+ header.includeInLayout=false;
+ header.visible = false;
+ }
+ if(pageType == "last") {
+ // Show the footer.
+ footer.includeInLayout=true;
+ footer.visible = true;
+ }
+ //Update the DataGrid layout to reflect the results.
+ validateNow();
+ }
+ ]]>
+ </fx:Script>
+
+ <!-- The template for the printed page, with the contents for all pages. -->
+ <mx:VBox width="80%" horizontalAlign="left">
+ <mx:Label text="Page {pageNumber}"/>
+ </mx:VBox>
+
+ <FormPrintHeader id="header" />
+ <!-- The data grid. The sizeToPage property is true by default, so the last
+ page has only as many grid rows as are needed for the data. -->
+ <mx:PrintDataGrid id="myDataGrid" width="60%" height="100%">
+ <!-- Specify the columns to ensure that their order is correct. -->
+ <mx:columns>
+ <mx:DataGridColumn dataField="Index" />
+ <mx:DataGridColumn dataField="Qty" />
+ </mx:columns>
+ </mx:PrintDataGrid>
+
+ <!-- Create a FormPrintFooter control and set its prodTotal variable. -->
+ <FormPrintFooter id="footer" pTotal="{prodTotal}" />
+
+</mx:VBox>
diff --git a/tourdeflexmodules/src/mx/printing/PrintDataGridExample.mxml b/tourdeflexmodules/src/mx/printing/PrintDataGridExample.mxml
new file mode 100755
index 0000000..94ce408
--- /dev/null
+++ b/tourdeflexmodules/src/mx/printing/PrintDataGridExample.mxml
@@ -0,0 +1,145 @@
+<?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.
+ -->
+
+<!-- Main application to print a DataGrid control on multiple pages. -->
+
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0" initialize="initData()">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.core.FlexGlobals;
+ import mx.printing.*;
+ import mx.collections.ArrayCollection;
+ import FormPrintView;
+
+ // Declare variables and initialize simple variables.
+ [Bindable]
+ public var dgProvider:ArrayCollection;
+ public var footerHeight:Number = 20;
+ public var prodIndex:Number;
+ public var prodTotal:Number = 0;
+
+ // Data initialization.
+ public function initData():void {
+ // Create the data provider for the DataGrid control.
+ dgProvider = new ArrayCollection;
+ }
+
+ // Fill the dgProvider ArrayCollection with the specified items.
+ public function setdgProvider(items:int):void {
+
+ prodIndex=1;
+ dgProvider.removeAll();
+ for (var z:int=0; z<items; z++)
+ {
+ var prod1:Object = {};
+ prod1.Qty = prodIndex * 7;
+ prod1.Index = prodIndex++;
+ prodTotal += prod1.Qty;
+ dgProvider.addItem(prod1);
+ }
+ }
+
+ // The function to print the output.
+ public function doPrint():void {
+
+ var printJob:FlexPrintJob = new FlexPrintJob();
+ if (printJob.start()) {
+ // Create a FormPrintView control as a child of the current view.
+ var thePrintView:FormPrintView = new FormPrintView();
+ FlexGlobals.topLevelApplication.addChild(thePrintView);
+
+ //Set the print view properties.
+ thePrintView.width=printJob.pageWidth;
+ thePrintView.height=printJob.pageHeight;
+ thePrintView.prodTotal = prodTotal;
+ // Set the data provider of the FormPrintView component's data grid
+ // to be the data provider of the displayed data grid.
+ thePrintView.myDataGrid.dataProvider = myDataGrid.dataProvider;
+ // Create a single-page image.
+ thePrintView.showPage("single");
+ // If the print image's data grid can hold all the provider's rows,
+ // add the page to the print job.
+ if(!thePrintView.myDataGrid.validNextPage)
+ {
+ printJob.addObject(thePrintView);
+ }
+ // Otherwise, the job requires multiple pages.
+ else
+ {
+ // Create the first page and add it to the print job.
+ thePrintView.showPage("first");
+ printJob.addObject(thePrintView);
+ thePrintView.pageNumber++;
+ // Loop through the following code until all pages are queued.
+ while(true)
+ {
+ // Move the next page of data to the top of the print grid.
+ thePrintView.myDataGrid.nextPage();
+ thePrintView.showPage("last");
+ // If the page holds the remaining data, or if the last page
+ // was completely filled by the last grid data, queue it for printing.
+ // Test if there is data for another PrintDataGrid page.
+ if(!thePrintView.myDataGrid.validNextPage)
+ {
+ // This is the last page; queue it and exit the print loop.
+ printJob.addObject(thePrintView);
+ break;
+ }
+ else
+ // This is not the last page. Queue a middle page.
+ {
+ thePrintView.showPage("middle");
+ printJob.addObject(thePrintView);
+ thePrintView.pageNumber++;
+ }
+ }
+ }
+ // All pages are queued; remove the FormPrintView control to free memory.
+ FlexGlobals.topLevelApplication.removeChild(thePrintView);
+ }
+ // Send the job to the printer.
+ printJob.send();
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="DataGrid Printing Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:DataGrid id="myDataGrid" dataProvider="{dgProvider}">
+ <mx:columns>
+ <mx:DataGridColumn dataField="Index"/>
+ <mx:DataGridColumn dataField="Qty"/>
+ </mx:columns>
+ </mx:DataGrid>
+
+ <mx:Text width="100%"
+ text="Specify the number of lines and click Fill Grid first. Then you can click Print."/>
+
+ <mx:TextInput id="dataItems" text="35"/>
+
+ <mx:HBox>
+ <mx:Button id="setDP" label="Fill Grid" click="setdgProvider(int(dataItems.text))"/>
+ <mx:Button id="printDG" label="Print" click="doPrint()"/>
+ </mx:HBox>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/states/StatesExample.mxml b/tourdeflexmodules/src/mx/states/StatesExample.mxml
new file mode 100755
index 0000000..04b5fc4
--- /dev/null
+++ b/tourdeflexmodules/src/mx/states/StatesExample.mxml
@@ -0,0 +1,59 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the States class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <!-- Define one view state, in addition to the base state.-->
+ <mx:states>
+ <mx:State name="default" />
+ <mx:State name="register" />
+ </mx:states>
+
+ <!-- Define a Panel container that defines the login form.-->
+ <mx:Panel title="Login" title.register="Register" id="loginPanel"
+ horizontalScrollPolicy="off" verticalScrollPolicy="off"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Click the 'Need to Register?' link to change state. Click the 'Return to Login' link to return to the base state."/>
+
+ <mx:Form id="loginForm">
+ <mx:FormItem label="Username:">
+ <mx:TextInput/>
+ </mx:FormItem>
+ <mx:FormItem label="Password:">
+ <mx:TextInput/>
+ </mx:FormItem>
+ <mx:FormItem id="confirm" label="Confirm:" includeIn="register">
+ <mx:TextInput/>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:ControlBar>
+ <mx:LinkButton id="registerLink" label="Need to Register?"
+ click="currentState='register'" excludeFrom="register"/>
+ <mx:LinkButton id="loginLink" label="Return to Login" click="currentState='default'"
+ includeIn="register" />
+ <mx:Spacer width="100%" id="spacer1"/>
+ <mx:Button label="Login" label.register="register" color.register="blue" id="loginButton" />
+ </mx:ControlBar>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/states/TransitionExample.mxml b/tourdeflexmodules/src/mx/states/TransitionExample.mxml
new file mode 100755
index 0000000..e93ada5
--- /dev/null
+++ b/tourdeflexmodules/src/mx/states/TransitionExample.mxml
@@ -0,0 +1,85 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the Transition class. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <!-- Define one view state, in addition to the base state.-->
+ <mx:states>
+ <mx:State name="default" />
+ <mx:State name="register" />
+ </mx:states>
+
+ <mx:transitions>
+ <!-- Define the transition from the base state to the Register state.-->
+ <mx:Transition id="toRegister" fromState="default" toState="register">
+ <mx:Sequence targets="{[loginPanel, registerLink, confirm, loginLink, spacer1]}">
+ <mx:RemoveChildAction/>
+ <mx:SetPropertyAction target="{loginPanel}" name="title"/>
+ <mx:SetPropertyAction target="{loginButton}" name="label"/>
+ <mx:SetStyleAction target="{loginButton}" name="color"/>
+ <mx:Resize target="{loginPanel}"/>
+ <mx:AddChildAction/>
+ </mx:Sequence>
+ </mx:Transition>
+
+ <!-- Define the transition from the Register state to the base state.-->
+ <mx:Transition id="toDefault" fromState="register" toState="default">
+ <mx:Sequence targets="{[loginPanel, registerLink, confirm, loginLink, spacer1]}">
+ <mx:RemoveChildAction/>
+ <mx:SetPropertyAction target="{loginPanel}" name="title"/>
+ <mx:SetPropertyAction target="{loginButton}" name="label"/>
+ <mx:SetStyleAction target="{loginButton}" name="color"/>
+ <mx:Resize target="{loginPanel}"/>
+ <mx:AddChildAction/>
+ </mx:Sequence>
+ </mx:Transition>
+ </mx:transitions>
+
+ <!-- Define a Panel container that defines the login form.-->
+ <mx:Panel title="Login" title.register="Register" id="loginPanel"
+ horizontalScrollPolicy="off" verticalScrollPolicy="off"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Text width="100%"
+ text="Click the 'Need to Register?' link to change state. Click the 'Return to Login' link to return to the base state."/>
+
+ <mx:Form id="loginForm">
+ <mx:FormItem label="Username:">
+ <mx:TextInput/>
+ </mx:FormItem>
+ <mx:FormItem label="Password:">
+ <mx:TextInput/>
+ </mx:FormItem>
+ <mx:FormItem id="confirm" label="Confirm:" includeIn="register">
+ <mx:TextInput/>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:ControlBar>
+ <mx:LinkButton id="registerLink" label="Need to Register?"
+ click="currentState='register'" excludeFrom="register"/>
+ <mx:LinkButton id="loginLink" label="Return to Login" click="currentState='default'"
+ includeIn="register" />
+ <mx:Spacer width="100%" id="spacer1"/>
+ <mx:Button label="Login" label.register="register" color.register="blue" id="loginButton" />
+ </mx:ControlBar>
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/validators/CreditCardValidatorExample.mxml b/tourdeflexmodules/src/mx/validators/CreditCardValidatorExample.mxml
new file mode 100755
index 0000000..161ccec
--- /dev/null
+++ b/tourdeflexmodules/src/mx/validators/CreditCardValidatorExample.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate the CreditCardValidator. -->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
+ height="100%" width="100%">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define model for the credit card data. -->
+ <fx:Model id="creditcard">
+ <card>
+ <cardType>{cardTypeCombo.selectedItem.data}</cardType>
+ <cardNumber>{cardNumberInput.text}</cardNumber>
+ </card>
+ </fx:Model>
+
+ <mx:CreditCardValidator id="ccV"
+ cardTypeSource="{creditcard}" cardTypeProperty="cardType"
+ cardNumberSource="{creditcard}" cardNumberProperty="cardNumber"
+ trigger="{myButton}" triggerEvent="click"
+ cardTypeListener="{cardTypeCombo}"
+ cardNumberListener="{cardNumberInput}"
+ valid="Alert.show('Validation Succeeded!')"/>
+ </fx:Declarations>
+
+ <mx:Panel title="CreditCardValidator Example"
+ paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
+ height="100%" width="100%">
+
+ <mx:Form id="creditCardForm">
+ <mx:FormItem label="Card Type">
+ <mx:ComboBox id="cardTypeCombo">
+ <mx:dataProvider>
+ <fx:Object label="American Express" data="American Express"/>
+ <fx:Object label="Diners Club" data="Diners Club"/>
+ <fx:Object label="Discover" data="Discover"/>
+ <fx:Object label="MasterCard" data="MasterCard"/>
+ <fx:Object label="Visa" data="Visa"/>
+ </mx:dataProvider>
+ </mx:ComboBox>
+ </mx:FormItem>
+ <mx:FormItem label="Credit Card Number">
+ <mx:TextInput id="cardNumberInput"/>
+ </mx:FormItem>
+ <mx:FormItem>
+ <mx:Button id="myButton" label="Check Credit"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Module>
diff --git a/tourdeflexmodules/src/mx/validators/CurrencyValidatorExample.mxml b/tourdeflexmodules/src/mx/validators/CurrencyValidatorExample.mxml
new file mode 100755
index 0000000..0dbe21c
--- /dev/null
+++ b/tourdeflexmodules/src/mx/validators/CurrencyValidatorExample.mxml
@@ -0,0 +1,48 @@
+<?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 fo