You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2014/08/23 10:48:22 UTC
svn commit: r1619987 [7/22] - in /flex/site/trunk/content/tourdeflex: ./ mx/
mx/charts/ mx/containers/ mx/containers/assets/ mx/controls/
mx/controls/assets/ mx/core/ mx/effects/ mx/effects/assets/ mx/formatters/
mx/printing/ mx/states/ mx/validators/ ...
Propchange: flex/site/trunk/content/tourdeflex/mx/formatters/SimpleFormatterExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/formatters/SwitchSymbolFormatterExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/formatters/SwitchSymbolFormatterExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/formatters/SwitchSymbolFormatterExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/formatters/SwitchSymbolFormatterExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!-- Simple example to demonstrate SwitchSymbolFormatter. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <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" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <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:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/formatters/SwitchSymbolFormatterExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/formatters/SwitchSymbolFormatterExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/formatters/SwitchSymbolFormatterExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/formatters/SwitchSymbolFormatterExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/formatters/ZipCodeFormatterExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/formatters/ZipCodeFormatterExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/formatters/ZipCodeFormatterExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/formatters/ZipCodeFormatterExample.mxml Sat Aug 23 08:47:51 2014
@@ -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 ZipCodeFormatter. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <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" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <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:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/formatters/ZipCodeFormatterExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/formatters/ZipCodeFormatterExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/formatters/ZipCodeFormatterExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/formatters/ZipCodeFormatterExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/printing/AdvancedPrintDataGridExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/AdvancedPrintDataGridExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/printing/AdvancedPrintDataGridExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/printing/AdvancedPrintDataGridExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,105 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <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"
+ height="75%" width="75%" layout="horizontal"
+ paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
+
+ <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:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/AdvancedPrintDataGridExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/printing/AdvancedPrintDataGridExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/AdvancedPrintDataGridExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/AdvancedPrintDataGridExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintFooter.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/FormPrintFooter.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/printing/FormPrintFooter.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/printing/FormPrintFooter.mxml Sat Aug 23 08:47:51 2014
@@ -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.
+ -->
+
+<!-- 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>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintFooter.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintFooter.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/FormPrintFooter.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintFooter.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintHeader.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/FormPrintHeader.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/printing/FormPrintHeader.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/printing/FormPrintHeader.mxml Sat Aug 23 08:47:51 2014
@@ -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>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintHeader.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintHeader.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/FormPrintHeader.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintHeader.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintView.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/FormPrintView.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/printing/FormPrintView.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/printing/FormPrintView.mxml Sat Aug 23 08:47:51 2014
@@ -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>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintView.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintView.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/FormPrintView.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/FormPrintView.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/printing/PrintDataGridExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/PrintDataGridExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/printing/PrintDataGridExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/printing/PrintDataGridExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,143 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" 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" height="75%" width="75%"
+ paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
+
+ <mx:DataGrid id="myDataGrid" dataProvider="{dgProvider}">
+ <mx:columns>
+ <mx:DataGridColumn dataField="Index"/>
+ <mx:DataGridColumn dataField="Qty"/>
+ </mx:columns>
+ </mx:DataGrid>
+
+ <mx:Text width="100%" color="blue"
+ 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:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/PrintDataGridExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/printing/PrintDataGridExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/printing/PrintDataGridExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/printing/PrintDataGridExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/states/StatesExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/states/StatesExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/states/StatesExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/states/StatesExample.mxml Sat Aug 23 08:47:51 2014
@@ -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 States class. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <!-- 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"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ 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:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/states/StatesExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/states/StatesExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/states/StatesExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/states/StatesExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/states/TransitionExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/states/TransitionExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/states/TransitionExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/states/TransitionExample.mxml Sat Aug 23 08:47:51 2014
@@ -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.
+ -->
+
+<!-- Simple example to demonstrate the Transition class. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <!-- 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"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ 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:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/states/TransitionExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/states/TransitionExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/states/TransitionExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/states/TransitionExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/CreditCardValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/CreditCardValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/CreditCardValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/CreditCardValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -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 CreditCardValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <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" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <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:Application>
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/CreditCardValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/CreditCardValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/CreditCardValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/CreditCardValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/CurrencyValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/CurrencyValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/CurrencyValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/CurrencyValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,45 @@
+<?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 CurrencyValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:CurrencyValidator source="{priceUS}" property="text" precision="2"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+ <mx:Panel title="CurrencyValidator Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter a U.S. dollar amount: ">
+ <mx:TextInput id="priceUS" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <mx:Button id="myButton" label="Validate"/>
+ </mx:FormItem>
+ </mx:Form>
+ </mx:Panel>
+</mx:Application>
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/CurrencyValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/CurrencyValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/CurrencyValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/CurrencyValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/DateValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/DateValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/DateValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/DateValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -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 example to demonstrate the DateValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <fx:Declarations>
+ <fx:Model id="CheckModel">
+ <dateInfo>
+ <DOB>{dob.text}</DOB>
+ </dateInfo>
+ </fx:Model>
+
+ <mx:DateValidator source="{dob}" property="text" allowedFormatChars="/"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+ <mx:Panel title="DateValidator Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter date of birth (mm/dd/yyyy): ">
+ <mx:TextInput id="dob" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <mx:Button id="myButton" label="Validate" />
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/DateValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/DateValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/DateValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/DateValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/EmailValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/EmailValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/EmailValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/EmailValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,45 @@
+<?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 EmailValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:EmailValidator source="{email}" property="text"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+ <mx:Panel title="EmailValidator Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter an e-mail address: ">
+ <mx:TextInput id="email" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <mx:Button id="myButton" label="Validate" />
+ </mx:FormItem>
+ </mx:Form>
+ </mx:Panel>
+ </mx:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/EmailValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/EmailValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/EmailValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/EmailValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/NumberValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/NumberValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/NumberValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/NumberValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -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 NumberValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:NumberValidator source="{age}" property="text" integerError="Enter Integer value"
+ minValue="18" maxValue="50" domain="int"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+ <mx:Panel title="NumberValidator Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter an age between 18 and 50: ">
+ <mx:TextInput id="age" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <mx:Button id="myButton" label="Validate" />
+ </mx:FormItem>
+ </mx:Form>
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/NumberValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/NumberValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/NumberValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/NumberValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/PhoneNumberValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/PhoneNumberValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/PhoneNumberValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/PhoneNumberValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,45 @@
+<?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 PhoneNumberValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:PhoneNumberValidator source="{phone}" property="text"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Phone Number Validator Panel" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter 10-digit phone number: ">
+ <mx:TextInput id="phone" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <mx:Button id="myButton" label="Validate" />
+ </mx:FormItem>
+ </mx:Form>
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/PhoneNumberValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/PhoneNumberValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/PhoneNumberValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/PhoneNumberValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/RegExValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/RegExValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/RegExValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/RegExValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -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 RegExpValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.events.ValidationResultEvent;
+ import mx.validators.*;
+
+ // Write the results to the
+ private function handleResult(eventObj:ValidationResultEvent):void {
+ if (eventObj.type == ValidationResultEvent.VALID)
+ {
+ // For valid events, the results Array contains
+ // RegExpValidationResult objects.
+ var xResult:RegExpValidationResult;
+ reResults.text="";
+ for (var i:uint = 0; i < eventObj.results.length; i++)
+ {
+ xResult = eventObj.results[i];
+ reResults.text=reResults.text + xResult.matchedIndex + " " +
+ xResult.matchedString + "\n";
+ }
+ }
+ else
+ {
+ reResults.text="";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:RegExpValidator id="regExpV"
+ source="{regex_text}" property="text"
+ flags="g" expression="{regex.text}"
+ valid="handleResult(event)" invalid="handleResult(event)"
+ trigger="{myButton}" triggerEvent="click"/>
+ </fx:Declarations>
+
+ <mx:Panel title="RegExpValidator Example" width="95%" height="95%"
+ paddingTop="5" paddingLeft="5" paddingRight="5" paddingBottom="5">
+
+ <mx:Text width="100%" text="Instructions:"/>
+ <mx:Text width="100%" text="1. Enter text to search. By default, enter a string containing the letters ABC in sequence followed by any digit."/>
+ <mx:Text width="100%" text="2. Enter the regular expression. By default, enter ABC\d."/>
+ <mx:Text width="100%" text="3. Click the Button control to trigger the validation."/>
+ <mx:Text width="100%" text="4. The results show the index in the text where the matching pattern begins, and the matching pattern. "/>
+
+ <mx:Form>
+ <mx:FormItem label="Enter text: ">
+ <mx:TextInput id="regex_text" text="xxxxABC4xxx" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Enter regular expression: ">
+ <mx:TextInput id="regex" text="ABC\d" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Results: ">
+ <mx:TextInput id="reResults" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <mx:Button id="myButton" label="Validate"/>
+ </mx:FormItem>
+ </mx:Form>
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/RegExValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/RegExValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/RegExValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/RegExValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/SimpleValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/SimpleValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/SimpleValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/SimpleValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -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 Validator class. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ // Import necessary classes.
+ import mx.controls.Alert;
+ import mx.events.ValidationResultEvent;
+
+ // Event listener for the valid and invalid events.
+ private function handleValid(eventObj:ValidationResultEvent):void {
+ if(eventObj.type==ValidationResultEvent.VALID)
+ // Enable Submit button.
+ submitButton.enabled = true;
+ else
+ submitButton.enabled = false;
+ }
+
+ // Submit form is everything is valid.
+ private function submitForm():void {
+ Alert.show("Form Submitted!");
+ }
+
+ ]]>
+ </fx:Script>
+
+ <!-- The Validator class defines the required property and the validator events
+ used by all validator subclasses. -->
+ <fx:Declarations>
+ <mx:Validator id="reqValid" required="true"
+ source="{fname}" property="text"
+ valid="handleValid(event)" invalid="handleValid(event)"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Validator Example" width="100%" height="100%"
+ paddingTop="5" paddingLeft="5" paddingRight="5" paddingBottom="5">
+
+ <mx:Form>
+ <mx:Text width="100%" color="blue"
+ text="Enter a value in the Name field before you can submit. The E-mail field is optional."/>
+
+ <mx:FormItem label="Name: " required="true">
+ <mx:TextInput id="fname" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="E-mail address: " required="false">
+ <mx:TextInput id="email" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button id="submitButton" enabled="false"
+ label="Submit" click="submitForm();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/SimpleValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/SimpleValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/SimpleValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/SimpleValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/SocialSecurityValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/SocialSecurityValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/SocialSecurityValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/SocialSecurityValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,45 @@
+<?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 SocialSecurityValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:SocialSecurityValidator source="{ssn}" property="text"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Social Security Validator Panel" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter Social Security number: ">
+ <mx:TextInput id="ssn" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <mx:Button id="myButton" label="Validate" />
+ </mx:FormItem>
+ </mx:Form>
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/SocialSecurityValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/SocialSecurityValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/SocialSecurityValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/SocialSecurityValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/StringValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/StringValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/StringValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/StringValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -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 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 StringValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:StringValidator source="{fname}" property="text"
+ tooShortError="This string is shorter than the minimum allowed length of 4. "
+ tooLongError="This string is longer than the maximum allowed length of 20."
+ minLength="4" maxLength="20"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+ <mx:Panel title="StringValidator Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter a name between 4 and 20 characters: ">
+ <mx:TextInput id="fname" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <mx:Button id="myButton" label="Validate" />
+ </mx:FormItem>
+ </mx:Form>
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/StringValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/StringValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/StringValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/StringValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/mx/validators/ZipCodeValidatorExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/ZipCodeValidatorExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/mx/validators/ZipCodeValidatorExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/mx/validators/ZipCodeValidatorExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,45 @@
+<?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 ZipCodeValidator. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ import mx.controls.Alert;
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:ZipCodeValidator source="{zip}" property="text"
+ trigger="{myButton}" triggerEvent="click"
+ valid="Alert.show('Validation Succeeded!');"/>
+ </fx:Declarations>
+
+ <mx:Panel title="ZipcodeValidator Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter a 5 or 9 digit U.S. Zip code: ">
+ <mx:TextInput id="zip" width="100%"/>
+ </mx:FormItem>
+
+ <mx:FormItem >
+ <mx:Button id="myButton" label="Validate" />
+ </mx:FormItem>
+ </mx:Form>
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/ZipCodeValidatorExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/mx/validators/ZipCodeValidatorExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/mx/validators/ZipCodeValidatorExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/mx/validators/ZipCodeValidatorExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/spark/charts/AreaChartExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/spark/charts/AreaChartExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/spark/charts/AreaChartExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/spark/charts/AreaChartExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var expensesAC:ArrayCollection = new ArrayCollection( [
+ { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
+ { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
+ { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
+ { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
+ { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
+ ]]>
+ </fx:Script>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="AreaChart Control" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:AreaChart id="Areachart" color="0x323232" height="100%"
+ showDataTips="true" dataProvider="{expensesAC}">
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis categoryField="Month"/>
+ </mx:horizontalAxis>
+
+ <mx:series>
+ <mx:AreaSeries yField="Profit" form="curve" displayName="Profit"/>
+ <mx:AreaSeries yField="Expenses" form="curve" displayName="Expenses"/>
+ <mx:AreaSeries yField="Amount" form="curve" displayName="Amount"/>
+ </mx:series>
+ </mx:AreaChart>
+
+ <mx:Legend dataProvider="{Areachart}" color="0x323232"/>
+
+ </s:Panel>
+
+</s:Application>
Propchange: flex/site/trunk/content/tourdeflex/spark/charts/AreaChartExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/spark/charts/AreaChartExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/spark/charts/AreaChartExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/spark/charts/AreaChartExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/spark/charts/BarChartExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/spark/charts/BarChartExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/spark/charts/BarChartExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/spark/charts/BarChartExample.mxml Sat Aug 23 08:47:51 2014
@@ -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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin">
+
+ <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>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="BarChart Control" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:BarChart id="bar" height="100%" color="0x323232"
+ showDataTips="true" dataProvider="{medalsAC}">
+
+ <mx:verticalAxis>
+ <mx:CategoryAxis categoryField="Country"/>
+ </mx:verticalAxis>
+
+ <mx:series>
+ <mx:BarSeries yField="Country" xField="Gold" displayName="Gold"/>
+ <mx:BarSeries yField="Country" xField="Silver" displayName="Silver"/>
+ <mx:BarSeries yField="Country" xField="Bronze" displayName="Bronze"/>
+ </mx:series>
+ </mx:BarChart>
+
+ <mx:Legend dataProvider="{bar}" color="0x323232"/>
+
+ </s:Panel>
+
+</s:Application>
Propchange: flex/site/trunk/content/tourdeflex/spark/charts/BarChartExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/spark/charts/BarChartExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/spark/charts/BarChartExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/spark/charts/BarChartExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: flex/site/trunk/content/tourdeflex/spark/charts/BubbleChartExample.mxml
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/spark/charts/BubbleChartExample.mxml?rev=1619987&view=auto
==============================================================================
--- flex/site/trunk/content/tourdeflex/spark/charts/BubbleChartExample.mxml (added)
+++ flex/site/trunk/content/tourdeflex/spark/charts/BubbleChartExample.mxml Sat Aug 23 08:47:51 2014
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ skinClass="TDFGradientBackgroundSkin">
+
+ <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:Style>
+ @namespace mx "library://ns.adobe.com/flex/mx";
+
+ mx|BubbleChart { color:#000099; }
+ </fx:Style>
+
+ <s:layout>
+ <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+ </s:layout>
+
+ <s:Panel title="BubbleChart Control" width="600" height="100%"
+ color="0x000000"
+ borderAlpha="0.15">
+
+ <s:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ paddingLeft="10" paddingRight="10"
+ paddingTop="10" paddingBottom="10"/>
+ </s:layout>
+
+ <mx:BubbleChart id="bubblechart" height="100%" width="100%" paddingRight="5" paddingLeft="5" color="0x323232"
+ showDataTips="true" maxRadius="20" dataProvider="{expensesAC}">
+
+ <mx:series>
+ <mx:BubbleSeries displayName="Profit/Expenses/Amount"
+ xField="Profit" yField="Expenses" radiusField="Amount"/>
+ </mx:series>
+ </mx:BubbleChart>
+
+ <mx:Legend dataProvider="{bubblechart}" color="0x323232"/>
+
+ </s:Panel>
+
+</s:Application>
Propchange: flex/site/trunk/content/tourdeflex/spark/charts/BubbleChartExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Added: flex/site/trunk/content/tourdeflex/spark/charts/BubbleChartExample.swf
URL: http://svn.apache.org/viewvc/flex/site/trunk/content/tourdeflex/spark/charts/BubbleChartExample.swf?rev=1619987&view=auto
==============================================================================
Binary file - no diff available.
Propchange: flex/site/trunk/content/tourdeflex/spark/charts/BubbleChartExample.swf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream