You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2014/10/22 16:49:34 UTC
[06/10] Added the compilable version of all test projects that fail
with falcon and did not fail with the default compiler.
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/flex/com/xyz/view/MainView.mxml
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/flex/com/xyz/view/MainView.mxml b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/flex/com/xyz/view/MainView.mxml
new file mode 100644
index 0000000..a76c2ac
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/flex/com/xyz/view/MainView.mxml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml">
+ <mx:Script>
+ <![CDATA[
+ import mx.resources.ResourceBundle;
+ ]]>
+ </mx:Script>
+
+<mx:Metadata>
+ [ResourceBundle("text")]
+</mx:Metadata>
+
+ <mx:Label text="{resourceManager.getString('text', 'TITLE')}"/>
+</mx:Box>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/locales/en_US/text.properties
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/locales/en_US/text.properties b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/locales/en_US/text.properties
new file mode 100644
index 0000000..2f777b3
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/locales/en_US/text.properties
@@ -0,0 +1,19 @@
+#
+# Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+# Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+TITLE=Main View
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/locales/ja_JP/text.properties
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/locales/ja_JP/text.properties b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/locales/ja_JP/text.properties
new file mode 100644
index 0000000..126867d
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/lib/src/main/locales/ja_JP/text.properties
@@ -0,0 +1,19 @@
+#
+# Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+# Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+TITLE=Main View (J)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/pom.xml
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/pom.xml b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/pom.xml
new file mode 100644
index 0000000..da715d2
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testLocalizedLibraryAndApplication/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>info.rvin.itest</groupId>
+ <artifactId>l10n-swc-swf</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>lib</module>
+ <module>app</module>
+ </modules>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/locale/en_US/FlightReservation2.properties
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/locale/en_US/FlightReservation2.properties b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/locale/en_US/FlightReservation2.properties
new file mode 100644
index 0000000..9c010ce
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/locale/en_US/FlightReservation2.properties
@@ -0,0 +1,75 @@
+#
+# Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+# Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+FILTER_PANEL_TITLE=Find Flights
+FILTER_PANEL_FROM=From:
+FILTER_PANEL_TO=To:
+FILTER_PANEL_TRIP_TYPE=Trip Type:
+FILTER_PANEL_DEPARTURE_DATE=Departure Date:
+FILTER_PANEL_RETURN_DATE=Return Date:
+FILTER_PANEL_PASSENGERS=Passengers:
+FILTER_PANEL_SERVICE=Service:
+FILTER_PANEL_SELECT=Select...
+FILTER_PANEL_ROUND_TRIP=Round Trip
+FILTER_PANEL_ONE_WAY=One Way
+FILTER_PANEL_ADULTS=Adults
+FILTER_PANEL_CHILDREN=Children
+FILTER_PANEL_COACH=Coach
+FILTER_PANEL_BUSINESS=Business
+FILTER_PANEL_FIRST_CLASS=First Class
+
+SELECTION_PANEL_TITLE=Select a Flight
+SELECTION_PANEL_DEPARTING_FLIGHTS=Departing Flights
+SELECTION_PANEL_RETURN_FLIGHTS=Return Flights
+SELECTION_PANEL_FLIGHT=Flight
+SELECTION_PANEL_TIME=Time
+SELECTION_PANEL_PRICE=Price
+
+SUMMARY_PANEL_TITLE=Summary
+SUMMARY_PANEL_FROM=From:
+SUMMARY_PANEL_TO=To:
+SUMMARY_PANEL_DEPARTURE_DATE=Departure Date:
+SUMMARY_PANEL_DEPARTURE_TIME=Departure Time:
+SUMMARY_PANEL_ARRIVAL_DATE=Arrival Date:
+SUMMARY_PANEL_ARRIVAL_TIME=Arrival Time:
+SUMMARY_PANEL_DURATION=Duration:
+SUMMARY_PANEL_DISTANCE=Distance:
+SUMMARY_PANEL_FLIGHT_NUMBER=Flight Number:
+SUMMARY_PANEL_PRICE=Price:
+SUMMARY_PANEL_TOTAL_PRICE=Total Price:
+SUMMARY_PANEL_BOOK_IT=Book It
+
+LAX=Los Angeles
+JFK=New York
+GRU=Sao Paulo
+CPT=Cape Town
+LHR=London
+SVO=Moscow
+DXB=Dubai
+DEL=New Delhi
+SHA=Shanghai
+NRT=Tokyo
+SYD=Sydney
+
+DATE_FORMAT=EEE, MMM D, YYYY
+TIME_FORMAT=L:NN A
+DURATION_FORMAT=Lh NNm
+DISTANCE_CONVERSION=0.621
+DISTANCE_FORMAT={0} miles
+CURRENCY_CONVERSION=1.0
+CURRENCY_PRECISION=2
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/locale/ja_JP/FlightReservation2.properties
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/locale/ja_JP/FlightReservation2.properties b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/locale/ja_JP/FlightReservation2.properties
new file mode 100644
index 0000000..5865173
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/locale/ja_JP/FlightReservation2.properties
@@ -0,0 +1,75 @@
+#
+# Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+# Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+FILTER_PANEL_TITLE=フライト検索
+FILTER_PANEL_FROM=出発地:
+FILTER_PANEL_TO=目的地:
+FILTER_PANEL_TRIP_TYPE=旅行タイプ:
+FILTER_PANEL_DEPARTURE_DATE=ご出発:
+FILTER_PANEL_RETURN_DATE=お帰り:
+FILTER_PANEL_PASSENGERS=人数:
+FILTER_PANEL_SERVICE=サービス:
+FILTER_PANEL_SELECT=選択してください...
+FILTER_PANEL_ROUND_TRIP=往復
+FILTER_PANEL_ONE_WAY=片道
+FILTER_PANEL_ADULTS=大人
+FILTER_PANEL_CHILDREN=子供
+FILTER_PANEL_COACH=エコノミー
+FILTER_PANEL_BUSINESS=ビジネス
+FILTER_PANEL_FIRST_CLASS=ファースト
+
+SELECTION_PANEL_TITLE=フライトを選択
+SELECTION_PANEL_DEPARTING_FLIGHTS=往路フライト
+SELECTION_PANEL_RETURN_FLIGHTS=復路フライト
+SELECTION_PANEL_FLIGHT=フライト
+SELECTION_PANEL_TIME=時間
+SELECTION_PANEL_PRICE=料金
+
+SUMMARY_PANEL_TITLE=確認
+SUMMARY_PANEL_FROM=出発地:
+SUMMARY_PANEL_TO=目的地:
+SUMMARY_PANEL_DEPARTURE_DATE=出発日:
+SUMMARY_PANEL_DEPARTURE_TIME=出発時間:
+SUMMARY_PANEL_ARRIVAL_DATE=到着日:
+SUMMARY_PANEL_ARRIVAL_TIME=到着時間:
+SUMMARY_PANEL_DURATION=飛行時間:
+SUMMARY_PANEL_DISTANCE=飛行距離:
+SUMMARY_PANEL_FLIGHT_NUMBER=フライトナンバー:
+SUMMARY_PANEL_PRICE=料金:
+SUMMARY_PANEL_TOTAL_PRICE=合計:
+SUMMARY_PANEL_BOOK_IT=予約する
+
+LAX=ロサンゼルス
+JFK=ニューヨーク
+GRU=サンパウロ
+CPT=ケープタウン
+LHR=ロンドン
+SVO=モスクワ
+DXB=ドバイ
+DEL=ニューデリー
+SHA=上海
+NRT=東京
+SYD=シドニー
+
+DATE_FORMAT=YYYY年MMMD日(EEE)
+TIME_FORMAT=L:NN A
+DURATION_FORMAT=L時間 NN分
+DISTANCE_CONVERSION=1.0
+DISTANCE_FORMAT={0} キロ
+CURRENCY_CONVERSION=119.3
+CURRENCY_PRECISION=0
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/pom.xml
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/pom.xml b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/pom.xml
new file mode 100644
index 0000000..42f7232
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>com.adobe.flex.samples</groupId>
+ <artifactId>FlightReservation2</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>swf</packaging>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>net.flexmojos.oss</groupId>
+ <artifactId>flexmojos-maven-plugin</artifactId>
+ <version>7.1.0-SNAPSHOT</version>
+ <extensions>true</extensions>
+ <configuration>
+ <resourceBundlePath>${basedir}/locale/{locale}</resourceBundlePath>
+ <localesRuntime>
+ <locale>en_US</locale>
+ <locale>ja_JP</locale>
+ </localesRuntime>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex.compiler</groupId>
+ <artifactId>falcon-compiler</artifactId>
+ <version>0.0.3-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>framework</artifactId>
+ <version>4.13.0.20140701</version>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>com.adobe.flash.framework</groupId>
+ <artifactId>playerglobal</artifactId>
+ <version>13.0</version>
+ <type>swc</type>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/FlightReservation2.mxml
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/FlightReservation2.mxml b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/FlightReservation2.mxml
new file mode 100644
index 0000000..ce22c64
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/FlightReservation2.mxml
@@ -0,0 +1,1082 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="1000" height="520"
+ initialize="application_initializeHandler(event)"
+ viewSourceURL="srcview/index.html">
+
+ <mx:Metadata>
+ [ResourceBundle("FlightReservation2")]
+ </mx:Metadata>
+
+ <mx:XML id="flights" source="Flights.xml"/>
+
+ <mx:XML id="timezones" source="Timezones.xml"/>
+
+ <mx:DateFormatter id="dateFormatter"
+ formatString="{resourceManager.getString(MY_BUNDLE, 'DATE_FORMAT')}"/>
+
+ <mx:DateFormatter id="timeFormatter"
+ formatString="{resourceManager.getString(MY_BUNDLE, 'TIME_FORMAT')}"/>
+
+ <mx:DateFormatter id="durationFormatter"
+ formatString="{resourceManager.getString(MY_BUNDLE, 'DURATION_FORMAT')}"/>
+
+ <mx:CurrencyFormatter id="priceFormatter"
+ precision="{resourceManager.getString(MY_BUNDLE, 'CURRENCY_PRECISION')}"/>
+
+ <mx:Script>
+ <![CDATA[
+
+ import mx.events.ResourceEvent;
+
+ //
+ // Constants
+ //
+
+ /**
+ * The name of the resource bundle
+ * containing the application-specific resources.
+ */
+ private static const MY_BUNDLE:String = "FlightReservation2";
+
+ /**
+ * Speed in km/hr, used to determine
+ * flight durations based on route distance.
+ */
+ private static const SPEED:Number = 1000;
+
+ //
+ // Variables
+ //
+
+ /**
+ * The locales which this application supports.
+ * This is the dataProvider for the Language combobox.
+ */
+ private var locales:Array = [ "en_US", "ja_JP" ];
+
+ //
+ // Methods: Processing of XML data
+ //
+
+ /**
+ * Walks the <route> tags in flights.xml to build
+ * an Array of airport codes for departures,
+ * sorted by localized city name.
+ * This is used as the dataProvider for the "From:" ComboBox.
+ */
+ private function getDepartureCodes():Array
+ {
+ var codes:Array = [];
+
+ var n:int = flights.route.length();
+ for (var i:int = 0; i < n; i++)
+ {
+ var route:XML = flights.route[i];
+ var fromCode:String = route.@from.toString();
+ if (codes.indexOf(fromCode) == -1)
+ codes.push(fromCode);
+ }
+
+ return codes;
+ }
+
+ /**
+ * Given a departure airport code, walks the <route> tags
+ * in flights.xml to build an Array of airport codes for arrivals,
+ * sorted by localized city name.
+ * This is used as the dataProvider for the "To:" ComboBox.
+ * Note that this Array contains only those places you
+ * can fly to, based on where you are flying from.
+ */
+ private function getArrivalCodes(departureCode:String):Array
+ {
+ var codes:Array = [];
+
+ var n:int = flights.route.length();
+ for (var i:int = 0; i < n; i++)
+ {
+ var route:XML = flights.route[i];
+ var fromCode:String = route.@from.toString();
+ var toCode:String = route.@to.toString();
+ if ((fromCode == departureCode || departureCode == null) &&
+ route.flight.length() > 0 &&
+ codes.indexOf(toCode) == -1)
+ {
+ codes.push(toCode);
+ }
+ }
+
+ return codes;
+ }
+
+ /**
+ * Given a <flight>, returns its locale departure time as a Date.
+ */
+ private function getDepartureTime(flight:XML):Date
+ {
+ var departs:String = flight.@departs;
+ // 'departs' will be a 4-character 24-hour time
+ // such as "0800" or "1630".
+ var hour:int = int(departs.substring(0, 2));
+ var minute:int = int(departs.substring(2, 4));
+ var time:Date = new Date(0, 0, 0, hour, minute);
+ return time;
+ }
+
+ /**
+ * Given an airport code like "JFK", returns the number
+ * of milliseconds by which the local timezone differs from GMT.
+ */
+ private function getTimezoneDelta(airportCode:String):Number
+ {
+ var delta:String =
+ timezones.timezone.(@where == airportCode).@delta;
+ var sign:String = delta.substring(0, 1);
+ var hh:String = delta.substring(1, 3);
+ var mm:String = delta.substring(3, 5);
+ var milliseconds:int = (60 * int(hh) + int(mm)) * 60 * 1000;
+ if (sign == "-")
+ milliseconds = -milliseconds;
+ return milliseconds;
+ }
+
+ /**
+ * Given a <route> and a <flight> on that route,
+ * returns the locale arrival time as a Date.
+ */
+ private function getArrivalTime(route:XML, flight:XML):Date
+ {
+ var departureTime:Number = getDepartureTime(flight).getTime();
+
+ var departureDelta:Number = getTimezoneDelta(route.@from);
+ var arrivalDelta:Number = getTimezoneDelta(route.@to);
+
+ var distance:Number = route.@distance; // in km
+ var duration:Number =
+ distance / SPEED * 60 * 60 * 1000; // in milliseconds
+
+ var arrivalTime:Number = departureTime - departureDelta +
+ duration + arrivalDelta;
+
+ return new Date(arrivalTime);
+ }
+
+ //
+ // Methods: Locale-specific formatting
+ //
+
+ /**
+ * Formats a price, using locale-dependent currency.
+ * The price="..." attribute in flights.xml
+ * is in U.S. dollars and the CURRENCY_CONVERSION resource
+ * converts dollars to the unit appropriate for the locale.
+ */
+ private function formatPrice(price:Number):String
+ {
+ var currencyConversionFactor:Number =
+ resourceManager.getNumber(MY_BUNDLE, "CURRENCY_CONVERSION");
+
+ return priceFormatter.format(price * currencyConversionFactor);
+ }
+
+ /**
+ * Formats the Arrival Time info in the Summary panel.
+ */
+ private function formatArrivalTime(route:XML, flight:XML):String
+ {
+ var departureTime:Date = getDepartureTime(flight);
+ var arrivalTime:Date = getArrivalTime(route, flight);
+
+ var s:String = timeFormatter.format(arrivalTime);
+ if (arrivalTime.day != departureTime.day)
+ s += " (next day)";
+ return s;
+ }
+
+ /**
+ * Formats the Duration info in the Summary panel
+ * using a locale-dependent format.
+ * The passed-in duration of the flight is specified
+ * in fractional hours, and has been calculated
+ * from the flight distance in flights.xml by assuming
+ * that the plane's speed is the constant SPEED.
+ */
+ private function formatDuration(duration:Number):String
+ {
+ var hours:int = int(duration);
+ var minutes:int = int((duration - Math.floor(duration)) * 60);
+ var d:Date = new Date(0, 0, 0, hours, minutes);
+
+ return durationFormatter.format(d);
+ }
+
+ /**
+ * Formats the Distance info in the Summary panel,
+ * using locale-dependent units (miles, kilometers, etc.)
+ * The distance="..." attribute in flights.xml
+ * is in kilometers and the DISTANCE_CONVERSION resource
+ * converts kilometers to the unit appropriate for the locale.
+ */
+ private function formatDistance(km:Number):String
+ {
+ var distanceConversionFactor:Number =
+ resourceManager.getNumber(MY_BUNDLE, "DISTANCE_CONVERSION");
+
+ return resourceManager.getString(
+ MY_BUNDLE, "DISTANCE_FORMAT",
+ [ int(km * distanceConversionFactor) ]);
+ }
+
+ //
+ // Methods: Support for the Language combobox
+ //
+
+ /**
+ * The labelFunction for the Language combobox.
+ * It takes a locale such as "en_US"
+ * and produces the localized string "English".
+ */
+ private function languageComboBoxLabelFunction(item:Object):String
+ {
+ var locale:String = String(item);
+ return resourceManager.getString(MY_BUNDLE, locale);
+ }
+
+ /**
+ * Comparison function for sorting the 'locales' Array,
+ * which is the dataProvider for the Language combobox.
+ * The sort order is locale-dependent,
+ * because the localized language names for the locales
+ * are presented in alphabetical order.
+ */
+ private function localeCompareFunction(item1:Object, item2:Object):int
+ {
+ var language1:String = languageComboBoxLabelFunction(item1);
+ var language2:String = languageComboBoxLabelFunction(item2);
+
+ if (language1 < language2)
+ return -1;
+ if (language1 > language2)
+ return 1;
+ return 0;
+ }
+
+ /**
+ * Repopulates the Language combobox with localized language names
+ * for the supported locales, alphabetized by language name.
+ */
+ private function updateLanguageComboBox():void
+ {
+ var oldSelectedItem:Object = languageComboBox.selectedItem;
+
+ // Repopulate the combobox with locales,
+ // re-sorting by localized language name.
+ locales.sort(localeCompareFunction);
+ languageComboBox.dataProvider = locales;
+
+ languageComboBox.selectedItem = oldSelectedItem;
+ }
+
+ /**
+ * Switches the user interface to display in a different locale.
+ * This method is called when the user changes the selection
+ * in the Language combobox.
+ */
+ private function switchLocale():void
+ {
+ var newLocale:String = String(languageComboBox.selectedItem);
+ resourceManager.localeChain = [ newLocale ];
+
+ updateLanguageComboBox();
+
+ updateDepartureCityComboBox();
+ updateArrivalCityComboBox();
+
+ departureDateField.selectedDate = departureDateField.selectedDate;
+ returnDateField.selectedDate = returnDateField.selectedDate;
+
+ updateSummary();
+ }
+
+ //
+ // Methods: Support for the From and To comboboxes
+ //
+
+ /**
+ * The labelFunction for the From and To comboboxes.
+ * It takes an airport code such as "JFK"
+ * and returns a localized string like "New York (JFK)".
+ */
+ private function cityLabelFunction(item:Object):String
+ {
+ var airportCode:String = String(item);
+ var city:String =
+ resourceManager.getString(MY_BUNDLE, airportCode);
+ return city + " (" + airportCode + ")";
+ }
+
+ /**
+ * Comparison function for sorting the From and To comboboxes.
+ * The sort order is locale-dependent,
+ * because the localized city names for the airport codes
+ * are presented in alphabetical order.
+ */
+ private function cityCompareFunction(item1:Object, item2:Object):int
+ {
+ var label1:String = cityLabelFunction(item1);
+ var label2:String = cityLabelFunction(item2);
+
+ if (label1 < label2)
+ return -1;
+ if (label1 > label2)
+ return 1;
+ return 0;
+ }
+
+ /**
+ * Repopulates the From combobox
+ * with airport codes sorted by city name.
+ * Called when the app starts
+ * and when the user changes the language.
+ */
+ private function updateDepartureCityComboBox():void
+ {
+ var oldSelectedItem:Object = departureCityComboBox.selectedItem;
+
+ // Repopulate athe combobox with airport codes,
+ // re-sorting by localized city name.
+ var dp:Array = getDepartureCodes();
+ dp.sort(cityCompareFunction);
+ departureCityComboBox.dataProvider = dp;
+
+ // Restore the previously selected item if there was one.
+ departureCityComboBox.selectedItem = oldSelectedItem;
+ }
+
+ /**
+ * Repopulates the To combobox with airport codes sorted by city name.
+ * Called when the app starts and when the user changes
+ * the From city or the language.
+ */
+ private function updateArrivalCityComboBox():void
+ {
+ var oldSelectedItem:Object = arrivalCityComboBox.selectedItem;
+
+ var departureCode:String =
+ departureCityComboBox.selectedItem as String;
+
+ // Repopulate the combobox with airport codes,
+ // re-sorting by localized city name.
+ var dp:Array = getArrivalCodes(departureCode);
+ dp.sort(cityCompareFunction);
+ arrivalCityComboBox.dataProvider = dp;
+
+ // Restore the previously selected item if there was one
+ // and it isn't the same as the From city.
+ if (oldSelectedItem &&
+ oldSelectedItem != departureCityComboBox.selectedItem)
+ {
+ arrivalCityComboBox.selectedItem = oldSelectedItem;
+ }
+ }
+
+ /**
+ * Based on the selections in the From and To comboxes,
+ * returns the <route> from the From city to the To city.
+ */
+ private function getDepartingRoute():XML
+ {
+ if (!departureCityComboBox.selectedItem ||
+ !arrivalCityComboBox.selectedItem)
+ {
+ return null;
+ }
+
+ var departureCode:String =
+ departureCityComboBox.selectedItem as String;
+
+ var arrivalCode:String =
+ arrivalCityComboBox.selectedItem as String;
+
+ return flights.route.(@from == departureCode &&
+ @to == arrivalCode)[0];
+ }
+
+ /**
+ * Based on the selections in the From and To comboxes,
+ * returns the <route> from the To city to the From city.
+ */
+ private function getReturnRoute():XML
+ {
+ if (!departureCityComboBox.selectedItem ||
+ !arrivalCityComboBox.selectedItem)
+ {
+ return null;
+ }
+
+ var departureCode:String =
+ departureCityComboBox.selectedItem as String;
+
+ var arrivalCode:String =
+ arrivalCityComboBox.selectedItem as String;
+
+ return flights.route.(@from == arrivalCode &&
+ @to == departureCode)[0];
+ }
+
+ //
+ // Methods: Support for the Departing Date and Return Date datefields
+ //
+
+ /**
+ * The labelFunction for the Departure Date and Return Date.
+ * It takes a Date and returns a locale-dependent String
+ * like "Wed, Apr 4, 2007".
+ */
+ private function dateFieldLabelFunction(date:Date):String
+ {
+ return dateFormatter.format(date);
+ }
+
+ /**
+ * The parseFunction for the Departure Date.
+ * When you use a labelFunction, you must also use parseFunction
+ * even though nothing needs to be parsed.
+ */
+ public function departureDateFieldParseFunction(
+ value:String, inputFormat:String):Date
+ {
+ return departureDateField.selectedDate;
+ }
+
+ /**
+ * The parseFunction for the Return Date.
+ * When you use a labelFunction, you must also use parseFunction
+ * even though nothing needs to be parsed.
+ */
+ public function returnDateFieldParseFunction(
+ value:String, inputFormat:String):Date
+ {
+ return returnDateField.selectedDate;
+ }
+
+ //
+ // Methods: Support for the Departing Flights
+ // and Return Flights datagrids.
+ //
+
+ /**
+ * The labelFunction for the Time column of the datagrids.
+ * It takes a <flight> and returns a locale-dependent String
+ * like "4:15 PM".
+ */
+ private function timeColumnLabelFunction(
+ item:Object,
+ column:DataGridColumn):String
+ {
+ var flight:XML = XML(item);
+ return timeFormatter.format(getDepartureTime(flight));
+ }
+
+ /**
+ * Comparison function for sorting the Time column of the datagrids.
+ */
+ private function timeColumnSortCompareFunction(
+ item1:Object, item2:Object):int
+ {
+ var time1:String = item1.@departs;
+ var time2:String = item2.@departs;
+
+ if (time1 < time2)
+ return -1;
+ else if (time1 > time2)
+ return 1;
+ return 0;
+ }
+
+ /**
+ * The labelFunction for the Price column of the datagrids.
+ * It takes a <flight> and returns a locale-dependent String
+ * like "$1234.56" in the appropriate currency.
+ */
+ private function priceColumnLabelFunction(
+ item:Object,
+ column:DataGridColumn = null):String
+ {
+ var flight:XML = XML(item);
+ var price:Number = Number(flight.@price);
+
+ if (serviceRadioButtonGroup.selectedValue == "business")
+ price *= 2;
+ else if (serviceRadioButtonGroup.selectedValue == "firstClass")
+ price *= 3;
+
+ return formatPrice(price);
+ }
+
+ /**
+ * Comparison function for sorting the Price column of the datagrids.
+ */
+ private function priceColumnSortCompareFunction(
+ item1:Object, item2:Object):int
+ {
+ var price1:Number = item1.@price;
+ var price2:Number = item2.@price;
+
+ if (price1 < price2)
+ return -1;
+ else if (price1 > price2)
+ return 1;
+ return 0;
+ }
+
+ /**
+ * Updates the DataGrid displaying departing flights.
+ * This method is called when the user changes
+ * the departure date, return date,
+ * depature city, or return city.
+ */
+ private function updateDepartingFlights():void
+ {
+ // Find the <route> from the 'From' city to the 'To' city.
+ var route:XML = getDepartingRoute();
+
+ // Display the <flight> children of that <route>.
+ departingFlightsDataGrid.dataProvider = route ? route.flight : null;
+ }
+
+ /**
+ * Updates the DataGrid displaying return flights.
+ * This method is called when the user changes
+ * the departure date, return date,
+ * depature city, or return city.
+ */
+ private function updateReturnFlights():void
+ {
+ // Find the <route> from the 'To' city to the 'From' city.
+ var route:XML = getReturnRoute();
+
+ // Display the <flight> children of that <route>.
+ returnFlightsDataGrid.dataProvider = route ? route.flight : null;
+ }
+
+ //
+ // Methods: Support for the Summary panel
+ //
+
+ /**
+ * Updates the departure and return summaries.
+ */
+ private function updateSummary():void
+ {
+ var departingRoute:XML = getDepartingRoute();
+ var returnRoute:XML = getReturnRoute();
+
+ var departingFlight:XML =
+ XML(departingFlightsDataGrid.selectedItem);
+ var returnFlight:XML =
+ XML(returnFlightsDataGrid.selectedItem);
+
+ if (departingFlightsDataGrid.selectedItem)
+ {
+ summaryDepartingFromCity.text =
+ departureCityComboBox.selectedLabel;
+ summaryDepartingToCity.text =
+ arrivalCityComboBox.selectedLabel;
+
+ summaryDepartingDate.text =
+ dateFormatter.format(departureDateField.selectedDate);
+ summaryDepartingTime.text =
+ timeFormatter.format(getDepartureTime(departingFlight));
+ summaryDepartingArrivalTime.text =
+ formatArrivalTime(departingRoute, departingFlight);
+
+ var departingDistance:Number = departingRoute.@distance;
+ summaryDepartingDuration.text =
+ formatDuration(departingDistance / SPEED);
+ summaryDepartingDistance.text =
+ formatDistance(departingDistance);
+
+ summaryDepartingFlightID.text = departingFlight.@id;
+ }
+ else
+ {
+ summaryDepartingFromCity.text = "";
+ summaryDepartingToCity.text = "";
+ summaryDepartingDate.text = "";
+ summaryDepartingTime.text = "";
+ summaryDepartingArrivalTime.text = "";
+ summaryDepartingDuration.text = "";
+ summaryDepartingDistance.text = "";
+ summaryDepartingFlightID.text = "";
+ }
+
+ if (returnFlightsDataGrid.selectedItem)
+ {
+ summaryReturnFromCity.text =
+ arrivalCityComboBox.selectedLabel;
+ summaryReturnToCity.text =
+ departureCityComboBox.selectedLabel;
+
+ summaryReturnDate.text =
+ dateFormatter.format(returnDateField.selectedDate);
+ summaryReturnTime.text =
+ timeFormatter.format(getDepartureTime(returnFlight));
+ summaryReturnArrivalTime.text =
+ formatArrivalTime(returnRoute, returnFlight);
+
+ var returnDistance:Number = returnRoute.@distance;
+ summaryReturnDuration.text =
+ formatDuration(returnDistance / SPEED);
+ summaryReturnDistance.text =
+ formatDistance(returnDistance);
+
+ summaryReturnFlightID.text = returnFlight.@id;
+ }
+ else
+ {
+ summaryReturnFromCity.text = "";
+ summaryReturnToCity.text = "";
+ summaryReturnDate.text = "";
+ summaryReturnTime.text = "";
+ summaryReturnArrivalTime.text = "";
+ summaryReturnDuration.text = "";
+ summaryReturnDistance.text = "";
+ summaryReturnFlightID.text = "";
+ }
+
+ var totalPrice:Number = Number(departingFlight.@price);
+ if (travelTypeRadioButtonGroup.selectedValue == "roundTrip")
+ totalPrice += Number(returnFlight.@price);
+ totalPrice *= adultNumericStepper.value +
+ childNumericStepper.value / 2;
+ if (serviceRadioButtonGroup.selectedValue == "business")
+ totalPrice *= 2;
+ else if (serviceRadioButtonGroup.selectedValue == "firstClass")
+ totalPrice *= 3;
+ totalPriceLabel.text = formatPrice(totalPrice);
+
+ bookItButton.enabled =
+ travelTypeRadioButtonGroup.selectedValue == "roundTrip" &&
+ departingFlightsDataGrid.selectedItem &&
+ returnFlightsDataGrid.selectedItem ||
+ travelTypeRadioButtonGroup.selectedValue == "oneWay" &&
+ departingFlightsDataGrid.selectedItem;
+ }
+
+ //
+ // Event handlers
+ //
+
+ /**
+ * Called when the application starts,
+ * after its children have been created.
+ */
+ private function application_initializeHandler(event:Event):void
+ {
+ updateLanguageComboBox();
+ languageComboBox.selectedItem = resourceManager.localeChain[0];
+
+ updateDepartureCityComboBox();
+ updateArrivalCityComboBox();
+
+ var now:Date = new Date();
+ var today:Date = new Date(now.getFullYear(),
+ now.getMonth(),
+ now.getDate());
+
+ // Departure date can be today or later.
+ departureDateField.selectableRange = { rangeStart: today };
+ departureDateField.selectedDate = today;
+
+ // Return date can be today or later.
+ returnDateField.selectableRange = { rangeStart: today };
+ returnDateField.selectedDate = today;
+
+ updateDepartingFlights();
+ updateReturnFlights();
+
+ updateSummary();
+ }
+
+ /**
+ * Called when the user selects "English" or "Japanese"
+ * from the Language combobox.
+ */
+ private function languageComboBox_changeHandler(event:Event):void
+ {
+ var newLocale:String = String(languageComboBox.selectedItem);
+
+ // If we already have the resources for the new locale,
+ // switch to that locale.
+ // Otherwise, start loading the appropriate resource module.
+ if (resourceManager.getLocales().indexOf(newLocale) != -1)
+ {
+ switchLocale();
+ }
+ else
+ {
+ var resourceModuleURL:String = "Resources_" + newLocale + ".swf";
+ var eventDispatcher:IEventDispatcher =
+ resourceManager.loadResourceModule(resourceModuleURL);
+ eventDispatcher.addEventListener(
+ ResourceEvent.COMPLETE, resourceModule_completeHandler);
+ }
+ }
+
+ /**
+ * Called when a resource module is loaded in response
+ * to the user selecting a new language in the Language combobox.
+ */
+ private function resourceModule_completeHandler(
+ event:ResourceEvent):void
+ {
+ switchLocale();
+ }
+
+ /**
+ * Called when the user selects a departure city
+ * in the "From" combobox.
+ */
+ private function departureCityComboBox_changeHandler(event:Event):void
+ {
+ // Change the To combobox to display only cities
+ // with flights arriving from the new departure city.
+ updateArrivalCityComboBox();
+
+ updateDepartingFlights();
+ updateReturnFlights();
+
+ updateSummary();
+ }
+
+ /**
+ * Called when the user selects an arrival city
+ * in the "To" combobox.
+ */
+ private function arrivalCityComboBox_changeHandler(event:Event):void
+ {
+ updateDepartingFlights();
+ updateReturnFlights();
+
+ updateSummary();
+ }
+
+ /**
+ * Called when the user selects the "Round Trip" or "One Way"
+ * radio button.
+ */
+ private function travelTypeRadioButtonGroup_changeHandler(
+ event:Event):void
+ {
+ var b:Boolean =
+ travelTypeRadioButtonGroup.selectedValue == "roundTrip";
+
+ returnDateField.enabled = b;
+
+ returnFlightsLabel.visible = b;
+ returnFlightsDataGrid.visible = b;
+ arrivalSummaryForm.visible = b;
+ hRule.visible = b;
+
+ updateSummary();
+ }
+
+ /**
+ * Called when the user changes the Departure Date.
+ */
+ private function departureDateField_changeHandler(event:Event):void
+ {
+ returnDateField.selectableRange =
+ { rangeStart: departureDateField.selectedDate };
+
+ // The Return Date can't be earlier than the Departure Date.
+ if (departureDateField.selectedDate > returnDateField.selectedDate)
+ returnDateField.selectedDate = departureDateField.selectedDate;
+
+ updateDepartingFlights();
+ updateReturnFlights();
+ updateSummary();
+ }
+
+ /**
+ * Called when the user changes the Return Date.
+ */
+ private function returnDateField_changeHandler(event:Event):void
+ {
+ updateReturnFlights();
+ updateSummary();
+ }
+
+ /**
+ * Called when the user changes the number of adults.
+ */
+ private function adultNumericStepper_changeHandler(event:Event):void
+ {
+ updateSummary();
+ }
+
+ /**
+ * Called when the user changes the number of children.
+ */
+ private function childNumericStepper_changeHandler(event:Event):void
+ {
+ updateSummary();
+ }
+
+ /**
+ * Called when the user selects a departing flight.
+ */
+ private function departingFlightsDataGrid_changeHandler(
+ event:Event):void
+ {
+ updateSummary();
+ }
+
+ /**
+ * Called when the user selects a return flight.
+ */
+ private function returnFlightsDataGrid_changeHandler(event:Event):void
+ {
+ updateSummary();
+ }
+
+ /**
+ * Called when the user selects the "Coach", "Business",
+ * or "First Class" radio button.
+ */
+ private function serviceRadioButtonGroup_changeHandler(event:Event):void
+ {
+ departingFlightsDataGrid.invalidateList();
+ returnFlightsDataGrid.invalidateList();
+
+ updateSummary();
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Style>
+
+ FormItemLabel
+ {
+ fontWeight: bold;
+ }
+
+ .myHighlight
+ {
+ color:#990000;
+ }
+
+ </mx:Style>
+
+ <mx:ApplicationControlBar width="100%" height="30">
+ <mx:Label fontSize="14" fontWeight="bold"
+ text="{resourceManager.getString(MY_BUNDLE, 'APP_TITLE')}"/>
+ <mx:Spacer width="100%"/>
+ <mx:Label text="{resourceManager.getString(MY_BUNDLE, 'LANGUAGE_LABEL')}"/>
+ <mx:ComboBox id="languageComboBox"
+ labelFunction="languageComboBoxLabelFunction"
+ change="languageComboBox_changeHandler(event)"/>
+ </mx:ApplicationControlBar>
+
+ <mx:HBox id="myHB" width="100%" height="100%" horizontalAlign="center">
+
+ <mx:Panel width="100%" height="100%"
+ title="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_TITLE')}">
+ <mx:Form width="100%" verticalGap="15">
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_FROM')}">
+ <mx:ComboBox id="departureCityComboBox" width="170" rowCount="11"
+ prompt="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_SELECT')}"
+ labelFunction="cityLabelFunction"
+ change="departureCityComboBox_changeHandler(event)"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_TO')}">
+ <mx:ComboBox id="arrivalCityComboBox" width="170" rowCount="11"
+ prompt="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_SELECT')}"
+ labelFunction="cityLabelFunction"
+ change="arrivalCityComboBox_changeHandler(event)"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_TRIP_TYPE')}">
+ <mx:RadioButtonGroup id="travelTypeRadioButtonGroup" selectedValue="roundTrip"
+ change="travelTypeRadioButtonGroup_changeHandler(event)"/>
+ <mx:RadioButton id="roundTripRadioButton" groupName="travelTypeRadioButtonGroup"
+ label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_ROUND_TRIP')}"
+ value="roundTrip"/>
+ <mx:RadioButton id="oneWayRadioButton" groupName="travelTypeRadioButtonGroup"
+ label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_ONE_WAY')}"
+ value="oneWay"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_DEPARTURE_DATE')}">
+ <mx:DateField id="departureDateField" width="185"
+ labelFunction="dateFieldLabelFunction"
+ parseFunction="departureDateFieldParseFunction"
+ change="departureDateField_changeHandler(event)"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_RETURN_DATE')}">
+ <mx:DateField id="returnDateField" width="185"
+ labelFunction="dateFieldLabelFunction"
+ parseFunction="returnDateFieldParseFunction"
+ change="returnDateField_changeHandler(event)"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_PASSENGERS')}"
+ direction="horizontal">
+ <mx:VBox verticalGap="0">
+ <mx:NumericStepper id="adultNumericStepper" width="80"
+ maximum="10" value="1"
+ change="adultNumericStepper_changeHandler(event)"/>
+ <mx:Label text="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_ADULTS')}"/>
+ </mx:VBox>
+ <mx:VBox verticalGap="0" >
+ <mx:NumericStepper id="childNumericStepper" width="80"
+ maximum="10"
+ change="childNumericStepper_changeHandler(event)"/>
+ <mx:Label text="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_CHILDREN')}"/>
+ </mx:VBox>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_SERVICE')}">
+ <mx:RadioButtonGroup id="serviceRadioButtonGroup" selectedValue="coach"
+ change="serviceRadioButtonGroup_changeHandler(event)"/>
+ <mx:RadioButton id="coachRadioButton" groupName="serviceRadioButtonGroup"
+ label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_COACH')}"
+ value="coach"/>
+ <mx:RadioButton id="businessRadioButton" groupName="serviceRadioButtonGroup"
+ label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_BUSINESS')}"
+ value="business"/>
+ <mx:RadioButton id="firstClassButton" groupName="serviceRadioButtonGroup"
+ label="{resourceManager.getString(MY_BUNDLE, 'FILTER_PANEL_FIRST_CLASS')}"
+ value="firstClass"/>
+ </mx:FormItem>
+ </mx:Form>
+ </mx:Panel>
+
+ <mx:Panel width="100%" height="100%" paddingTop="8" paddingLeft="8" paddingRight="8"
+ title="{resourceManager.getString(MY_BUNDLE, 'SELECTION_PANEL_TITLE')}">
+ <mx:Label id="departingFlightsLabel" fontWeight="bold"
+ text="{resourceManager.getString(MY_BUNDLE, 'SELECTION_PANEL_DEPARTING_FLIGHTS')}"/>
+ <mx:DataGrid id="departingFlightsDataGrid" width="100%" height="154"
+ resizableColumns="false"
+ change="departingFlightsDataGrid_changeHandler(event)">
+ <mx:columns>
+ <mx:DataGridColumn headerText="{resourceManager.getString(MY_BUNDLE, 'SELECTION_PANEL_FLIGHT')}"
+ dataField="@id" sortable="false"/>
+ <mx:DataGridColumn headerText="{resourceManager.getString(MY_BUNDLE, 'SELECTION_PANEL_TIME')}"
+ textAlign="right"
+ labelFunction="timeColumnLabelFunction"
+ sortCompareFunction="timeColumnSortCompareFunction"/>
+ <mx:DataGridColumn headerText="{resourceManager.getString(MY_BUNDLE, 'SELECTION_PANEL_PRICE')}"
+ textAlign="right"
+ labelFunction="priceColumnLabelFunction"
+ sortCompareFunction="priceColumnSortCompareFunction"/>
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:Label id="returnFlightsLabel" fontWeight="bold"
+ text="{resourceManager.getString(MY_BUNDLE, 'SELECTION_PANEL_RETURN_FLIGHTS')}"/>
+ <mx:DataGrid id="returnFlightsDataGrid" width="100%" height="154"
+ resizableColumns="false"
+ change="returnFlightsDataGrid_changeHandler(event)">
+ <mx:columns>
+ <mx:DataGridColumn headerText="{resourceManager.getString(MY_BUNDLE, 'SELECTION_PANEL_FLIGHT')}"
+ dataField="@id" sortable="false"/>
+ <mx:DataGridColumn headerText="{resourceManager.getString(MY_BUNDLE, 'SELECTION_PANEL_TIME')}"
+ textAlign="right"
+ labelFunction="timeColumnLabelFunction"
+ sortCompareFunction="timeColumnSortCompareFunction"/>
+ <mx:DataGridColumn headerText="{resourceManager.getString(MY_BUNDLE, 'SELECTION_PANEL_PRICE')}"
+ textAlign="right"
+ labelFunction="priceColumnLabelFunction"
+ sortCompareFunction="priceColumnSortCompareFunction"/>
+ </mx:columns>
+ </mx:DataGrid>
+ </mx:Panel>
+
+ <mx:Panel width="100%" height="100%" paddingTop="8" verticalGap="0"
+ title="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_TITLE')}">
+ <mx:Form id="departureSummaryForm" paddingTop="0" paddingBottom="0" verticalGap="0">
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_FROM')}">
+ <mx:Label id="summaryDepartingFromCity" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_TO')}">
+ <mx:Label id="summaryDepartingToCity" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_DEPARTURE_DATE')}">
+ <mx:Label id="summaryDepartingDate" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_DEPARTURE_TIME')}">
+ <mx:Label id="summaryDepartingTime" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_ARRIVAL_TIME')}">
+ <mx:Label id="summaryDepartingArrivalTime" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_DURATION')}">
+ <mx:Label id="summaryDepartingDuration" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_DISTANCE')}">
+ <mx:Label id="summaryDepartingDistance" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_FLIGHT_NUMBER')}">
+ <mx:Label id="summaryDepartingFlightID" styleName="myHighlight"/>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:HRule width="100%"/>
+ <mx:Form id="arrivalSummaryForm" paddingTop="0" paddingBottom="0" verticalGap="0">
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_FROM')}">
+ <mx:Label id="summaryReturnFromCity" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_TO')}">
+ <mx:Label id="summaryReturnToCity" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_DEPARTURE_DATE')}">
+ <mx:Label id="summaryReturnDate" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_DEPARTURE_TIME')}">
+ <mx:Label id="summaryReturnTime" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_ARRIVAL_TIME')}">
+ <mx:Label id="summaryReturnArrivalTime" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_DURATION')}">
+ <mx:Label id="summaryReturnDuration" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_DISTANCE')}">
+ <mx:Label id="summaryReturnDistance" styleName="myHighlight"/>
+ </mx:FormItem>
+ <mx:FormItem label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_FLIGHT_NUMBER')}">
+ <mx:Label id="summaryReturnFlightID" styleName="myHighlight"/>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:HRule id="hRule" width="100%"/>
+ <mx:VBox width="100%" height="100%"
+ horizontalAlign="center" verticalAlign="middle" verticalGap="10">
+ <mx:HBox width="100%">
+ <mx:Label width="50%" text="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_TOTAL_PRICE')}"
+ textAlign="right" fontWeight="bold"/>
+ <mx:Label id="totalPriceLabel" width="50%" fontWeight="bold" styleName="myHighlight"/>
+ </mx:HBox>
+ <mx:Button id="bookItButton" enabled="false" styleName="myHighlight"
+ label="{resourceManager.getString(MY_BUNDLE, 'SUMMARY_PANEL_BOOK_IT')}"/>
+ </mx:VBox>
+ </mx:Panel>
+
+ </mx:HBox>
+
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/Flights.xml
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/Flights.xml b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/Flights.xml
new file mode 100644
index 0000000..c97dfb8
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/Flights.xml
@@ -0,0 +1,488 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<flights>
+
+ <!-- from Los Angeles -->
+ <route from="LAX" to="JFK" distance="3971">
+ <flight id="WW873" departs="0758" price="467.42"/>
+ <flight id="WW625" departs="0941" price="389.08"/>
+ <flight id="WW928" departs="1151" price="440.85"/>
+ <flight id="WW486" departs="1401" price="320.69"/>
+ <flight id="WW615" departs="1541" price="470.88"/>
+ <flight id="WW956" departs="1820" price="394.79"/>
+ <flight id="WW171" departs="1953" price="446.29"/>
+ <flight id="WW608" departs="2158" price="388.45"/>
+ </route>
+ <route from="LAX" to="GRU" distance="9912">
+ <flight id="WW439" departs="1138" price="897.71"/>
+ <flight id="WW214" departs="1743" price="997.37"/>
+ </route>
+ <route from="LAX" to="CPT" distance="16047"/>
+ <route from="LAX" to="LHR" distance="8754">
+ <flight id="WW445" departs="0842" price="785.54"/>
+ <flight id="WW593" departs="1109" price="1004.56"/>
+ <flight id="WW774" departs="1331" price="947.60"/>
+ <flight id="WW293" departs="1628" price="868.55"/>
+ <flight id="WW218" departs="1908" price="818.03"/>
+ <flight id="WW283" departs="2113" price="879.87"/>
+ </route>
+ <route from="LAX" to="SVO" distance="9751">
+ <flight id="WW942" departs="1058" price="1042.76"/>
+ <flight id="WW229" departs="1808" price="1168.89"/>
+ </route>
+ <route from="LAX" to="DXB" distance="13391">
+ <flight id="WW591" departs="1233" price="1230.28"/>
+ <flight id="WW176" departs="1800" price="1514.15"/>
+ </route>
+ <route from="LAX" to="DEL" distance="12866">
+ <flight id="WW220" departs="1217" price="1358.19"/>
+ <flight id="WW368" departs="1802" price="1067.30"/>
+ </route>
+ <route from="LAX" to="SHA" distance="10436">
+ <flight id="WW628" departs="0958" price="899.94"/>
+ <flight id="WW686" departs="1322" price="961.75"/>
+ <flight id="WW578" departs="1612" price="1027.25"/>
+ <flight id="WW269" departs="2014" price="954.07"/>
+ </route>
+ <route from="LAX" to="NRT" distance="8748">
+ <flight id="WW614" departs="0940" price="769.92"/>
+ <flight id="WW414" departs="1232" price="793.94"/>
+ <flight id="WW564" departs="1621" price="780.86"/>
+ <flight id="WW145" departs="2011" price="1012.91"/>
+ </route>
+ <route from="LAX" to="SYD" distance="12053">
+ <flight id="WW941" departs="1151" price="1231.12"/>
+ <flight id="WW555" departs="1803" price="1304.17"/>
+ </route>
+
+ <!-- from New York -->
+ <route from="JFK" to="LAX" distance="3971">
+ <flight id="WW166" departs="0803" price="436.60"/>
+ <flight id="WW848" departs="0959" price="385.59"/>
+ <flight id="WW466" departs="1141" price="402.74"/>
+ <flight id="WW603" departs="1356" price="329.08"/>
+ <flight id="WW241" departs="1543" price="353.71"/>
+ <flight id="WW256" departs="1755" price="354.26"/>
+ <flight id="WW147" departs="1954" price="401.23"/>
+ <flight id="WW928" departs="2213" price="449.26"/>
+ </route>
+ <route from="JFK" to="GRU" distance="7658">
+ <flight id="WW277" departs="0931" price="840.35"/>
+ <flight id="WW375" departs="1313" price="623.34"/>
+ <flight id="WW739" departs="1616" price="621.91"/>
+ <flight id="WW897" departs="2012" price="837.22"/>
+ </route>
+ <route from="JFK" to="CPT" distance="12531">
+ <flight id="WW735" departs="1204" price="1008.81"/>
+ <flight id="WW618" departs="1908" price="1420.30"/>
+ </route>
+ <route from="JFK" to="LHR" distance="5537">
+ <flight id="WW629" departs="0742" price="533.42"/>
+ <flight id="WW744" departs="1005" price="505.94"/>
+ <flight id="WW173" departs="1150" price="535.46"/>
+ <flight id="WW643" departs="1348" price="550.26"/>
+ <flight id="WW955" departs="1619" price="494.34"/>
+ <flight id="WW893" departs="1735" price="502.92"/>
+ <flight id="WW897" departs="1956" price="525.35"/>
+ <flight id="WW600" departs="2200" price="658.62"/>
+ </route>
+ <route from="JFK" to="SVO" distance="7477">
+ <flight id="WW833" departs="0953" price="713.29"/>
+ <flight id="WW734" departs="1309" price="634.66"/>
+ <flight id="WW812" departs="1716" price="864.98"/>
+ <flight id="WW546" departs="1946" price="671.24"/>
+ </route>
+ <route from="JFK" to="DXB" distance="10993">
+ <flight id="WW337" departs="0941" price="1012.47"/>
+ <flight id="WW778" departs="1259" price="1265.14"/>
+ <flight id="WW927" departs="1619" price="955.94"/>
+ <flight id="WW458" departs="1955" price="1076.04"/>
+ </route>
+ <route from="JFK" to="DEL" distance="11748">
+ <flight id="WW167" departs="1107" price="1023.98"/>
+ <flight id="WW646" departs="1754" price="1250.35"/>
+ </route>
+ <route from="JFK" to="SHA" distance="11869">
+ <flight id="WW376" departs="1153" price="984.96"/>
+ <flight id="WW523" departs="1804" price="1057.97"/>
+ </route>
+ <route from="JFK" to="NRT" distance="10823">
+ <flight id="WW129" departs="1255" price="897.62"/>
+ <flight id="WW157" departs="1844" price="1192.06"/>
+ </route>
+ <route from="JFK" to="SYD" distance="16002"/>
+ <route from="GRU" to="LAX" distance="9912">
+ <flight id="WW437" departs="1115" price="812.01"/>
+ <flight id="WW232" departs="1822" price="1075.21"/>
+ </route>
+
+ <!-- from Sao Paulo -->
+ <route from="GRU" to="JFK" distance="7658">
+ <flight id="WW609" departs="0859" price="616.38"/>
+ <flight id="WW663" departs="1320" price="830.22"/>
+ <flight id="WW839" departs="1626" price="781.31"/>
+ <flight id="WW520" departs="2027" price="736.87"/>
+ </route>
+ <route from="GRU" to="CPT" distance="6326">
+ <flight id="WW878" departs="1154" price="561.28"/>
+ <flight id="WW617" departs="1846" price="563.72"/>
+ </route>
+ <route from="GRU" to="LHR" distance="9454">
+ <flight id="WW177" departs="1158" price="853.85"/>
+ <flight id="WW173" departs="1851" price="786.32"/>
+ </route>
+ <route from="GRU" to="SVO" distance="11774"/>
+ <route from="GRU" to="DXB" distance="12205"/>
+ <route from="GRU" to="DEL" distance="14389"/>
+ <route from="GRU" to="SHA" distance="18522"/>
+ <route from="GRU" to="NRT" distance="18480"/>
+ <route from="GRU" to="SYD" distance="13359"/>
+
+ <!-- from Cape Town -->
+ <route from="CPT" to="LAX" distance="16047"/>
+ <route from="CPT" to="JFK" distance="12531">
+ <flight id="WW790" departs="1106" price="1272.32"/>
+ <flight id="WW686" departs="1846" price="1291.36"/>
+ </route>
+ <route from="CPT" to="GRU" distance="6326">
+ <flight id="WW526" departs="1230" price="530.37"/>
+ <flight id="WW827" departs="1810" price="575.49"/>
+ </route>
+ <route from="CPT" to="LHR" distance="9664">
+ <flight id="WW154" departs="1223" price="954.73"/>
+ <flight id="WW224" departs="1656" price="978.31"/>
+ </route>
+ <route from="CPT" to="SVO" distance="10150"/>
+ <route from="CPT" to="DXB" distance="7645">
+ <flight id="WW918" departs="1058" price="890.62"/>
+ <flight id="WW753" departs="1718" price="810.14"/>
+ </route>
+ <route from="CPT" to="DEL" distance="9291">
+ <flight id="WW387" departs="1050" price="970.09"/>
+ <flight id="WW793" departs="1654" price="830.94"/>
+ </route>
+ <route from="CPT" to="SHA" distance="12961"/>
+ <route from="CPT" to="NRT" distance="14789"/>
+ <route from="CPT" to="SYD" distance="11000"/>
+
+ <!-- from London -->
+ <route from="LHR" to="LAX" distance="8754">
+ <flight id="WW518" departs="0849" price="940.26"/>
+ <flight id="WW566" departs="1131" price="945.00"/>
+ <flight id="WW612" departs="1331" price="728.87"/>
+ <flight id="WW808" departs="1633" price="1026.67"/>
+ <flight id="WW351" departs="1855" price="843.81"/>
+ <flight id="WW937" departs="2103" price="1008.75"/>
+ </route>
+ <route from="LHR" to="JFK" distance="5537">
+ <flight id="WW712" departs="0806" price="555.33"/>
+ <flight id="WW320" departs="0937" price="658.79"/>
+ <flight id="WW868" departs="1151" price="472.34"/>
+ <flight id="WW944" departs="1343" price="492.23"/>
+ <flight id="WW134" departs="1553" price="540.28"/>
+ <flight id="WW351" departs="1814" price="528.59"/>
+ <flight id="WW948" departs="2018" price="486.19"/>
+ <flight id="WW789" departs="2214" price="566.93"/>
+ </route>
+ <route from="LHR" to="GRU" distance="9454">
+ <flight id="WW786" departs="1130" price="1109.52"/>
+ <flight id="WW670" departs="1826" price="1006.91"/>
+ </route>
+ <route from="LHR" to="CPT" distance="9664">
+ <flight id="WW561" departs="1137" price="974.54"/>
+ <flight id="WW197" departs="1753" price="1062.80"/>
+ </route>
+ <route from="LHR" to="SVO" distance="2506">
+ <flight id="WW604" departs="1210" price="226.72"/>
+ <flight id="WW555" departs="1840" price="288.35"/>
+ </route>
+ <route from="LHR" to="DXB" distance="5492">
+ <flight id="WW635" departs="0909" price="645.00"/>
+ <flight id="WW591" departs="1338" price="556.98"/>
+ <flight id="WW128" departs="1623" price="552.51"/>
+ <flight id="WW359" departs="1941" price="479.16"/>
+ </route>
+ <route from="LHR" to="DEL" distance="6727">
+ <flight id="WW463" departs="0953" price="797.72"/>
+ <flight id="WW855" departs="1323" price="608.34"/>
+ <flight id="WW718" departs="1726" price="606.64"/>
+ <flight id="WW185" departs="2002" price="750.22"/>
+ </route>
+ <route from="LHR" to="SHA" distance="9206">
+ <flight id="WW483" departs="0949" price="1030.93"/>
+ <flight id="WW731" departs="1323" price="978.76"/>
+ <flight id="WW950" departs="1639" price="888.00"/>
+ <flight id="WW525" departs="2032" price="790.05"/>
+ </route>
+ <route from="LHR" to="NRT" distance="9585">
+ <flight id="WW947" departs="0920" price="936.53"/>
+ <flight id="WW572" departs="1325" price="858.46"/>
+ <flight id="WW796" departs="1700" price="883.97"/>
+ <flight id="WW225" departs="2031" price="1148.69"/>
+ </route>
+ <route from="LHR" to="SYD" distance="17009"/>
+
+ <!-- from Moscow -->
+ <route from="SVO" to="LAX" distance="9751">
+ <flight id="WW676" departs="1209" price="1051.68"/>
+ <flight id="WW671" departs="1721" price="1020.87"/>
+ </route>
+ <route from="SVO" to="JFK" distance="7477">
+ <flight id="WW544" departs="0859" price="624.11"/>
+ <flight id="WW431" departs="1321" price="671.30"/>
+ <flight id="WW527" departs="1609" price="853.27"/>
+ <flight id="WW715" departs="2025" price="658.59"/>
+ </route>
+ <route from="SVO" to="GRU" distance="11774"/>
+ <route from="SVO" to="CPT" distance="10150"/>
+ <route from="SVO" to="LHR" distance="2506">
+ <flight id="WW365" departs="1203" price="238.82"/>
+ <flight id="WW523" departs="1840" price="249.54"/>
+ </route>
+ <route from="SVO" to="DXB" distance="3708">
+ <flight id="WW516" departs="0907" price="326.06"/>
+ <flight id="WW614" departs="1244" price="368.77"/>
+ <flight id="WW704" departs="1641" price="438.98"/>
+ <flight id="WW351" departs="2049" price="352.96"/>
+ </route>
+ <route from="SVO" to="DEL" distance="4361">
+ <flight id="WW281" departs="1255" price="352.67"/>
+ <flight id="WW156" departs="1806" price="517.02"/>
+ </route>
+ <route from="SVO" to="SHA" distance="6813">
+ <flight id="WW610" departs="1128" price="763.01"/>
+ <flight id="WW409" departs="1831" price="768.98"/>
+ </route>
+ <route from="SVO" to="NRT" distance="7502">
+ <flight id="WW451" departs="1248" price="601.10"/>
+ <flight id="WW495" departs="1831" price="634.93"/>
+ </route>
+ <route from="SVO" to="SYD" distance="14505"/>
+
+ <!-- from Dubai -->
+ <route from="DXB" to="LAX" distance="13391">
+ <flight id="WW770" departs="1220" price="1188.01"/>
+ <flight id="WW661" departs="1734" price="1319.57"/>
+ </route>
+ <route from="DXB" to="JFK" distance="10993"/>
+ <route from="DXB" to="GRU" distance="12205"/>
+ <route from="DXB" to="CPT" distance="7645">
+ <flight id="WW883" departs="1244" price="668.70"/>
+ <flight id="WW328" departs="1835" price="832.14"/>
+ </route>
+ <route from="DXB" to="LHR" distance="5492">
+ <flight id="WW116" departs="1251" price="577.34"/>
+ <flight id="WW600" departs="1902" price="472.03"/>
+ </route>
+ <route from="DXB" to="SVO" distance="3708">
+ <flight id="WW371" departs="0917" price="330.75"/>
+ <flight id="WW105" departs="1231" price="338.65"/>
+ <flight id="WW769" departs="1647" price="303.56"/>
+ <flight id="WW345" departs="2056" price="387.22"/>
+ </route>
+ <route from="DXB" to="DEL" distance="2187">
+ <flight id="WW417" departs="1007" price="199.29"/>
+ <flight id="WW590" departs="1316" price="224.32"/>
+ <flight id="WW685" departs="1648" price="223.25"/>
+ <flight id="WW409" departs="2023" price="220.64"/>
+ </route>
+ <route from="DXB" to="SHA" distance="6403">
+ <flight id="WW927" departs="1010" price="752.48"/>
+ <flight id="WW170" departs="1234" price="563.95"/>
+ <flight id="WW269" departs="1650" price="665.83"/>
+ <flight id="WW571" departs="1948" price="712.35"/>
+ </route>
+ <route from="DXB" to="NRT" distance="7977">
+ <flight id="WW153" departs="1006" price="775.69"/>
+ <flight id="WW421" departs="1243" price="767.43"/>
+ <flight id="WW507" departs="1700" price="957.18"/>
+ <flight id="WW644" departs="1952" price="695.43"/>
+ </route>
+ <route from="DXB" to="SYD" distance="12038"/>
+ <route from="DEL" to="LAX" distance="12866">
+ <flight id="WW104" departs="1251" price="1236.72"/>
+ <flight id="WW409" departs="1715" price="1248.10"/>
+ </route>
+
+ <!-- from New Delhi -->
+ <route from="DEL" to="JFK" distance="11748">
+ <flight id="WW512" departs="1222" price="996.52"/>
+ <flight id="WW590" departs="1650" price="1184.59"/>
+ </route>
+ <route from="DEL" to="GRU" distance="14389"/>
+ <route from="DEL" to="CPT" distance="9291">
+ <flight id="WW760" departs="1134" price="854.58"/>
+ <flight id="WW543" departs="1845" price="1003.12"/>
+ </route>
+ <route from="DEL" to="LHR" distance="6727">
+ <flight id="WW336" departs="0907" price="796.51"/>
+ <flight id="WW161" departs="1240" price="576.68"/>
+ <flight id="WW255" departs="1720" price="643.23"/>
+ <flight id="WW957" departs="1941" price="762.12"/>
+ </route>
+ <route from="DEL" to="SVO" distance="4361">
+ <flight id="WW404" departs="1230" price="421.63"/>
+ <flight id="WW847" departs="1808" price="387.57"/>
+ </route>
+ <route from="DEL" to="DXB" distance="2187">
+ <flight id="WW338" departs="0946" price="187.21"/>
+ <flight id="WW794" departs="1310" price="261.33"/>
+ <flight id="WW321" departs="1619" price="237.60"/>
+ <flight id="WW497" departs="1946" price="198.43"/>
+ </route>
+ <route from="DEL" to="SHA" distance="4243">
+ <flight id="WW437" departs="0918" price="489.28"/>
+ <flight id="WW274" departs="1251" price="501.82"/>
+ <flight id="WW331" departs="1721" price="423.81"/>
+ <flight id="WW877" departs="1956" price="485.38"/>
+ </route>
+ <route from="DEL" to="NRT" distance="5904">
+ <flight id="WW877" departs="0920" price="560.20"/>
+ <flight id="WW748" departs="1251" price="662.45"/>
+ <flight id="WW726" departs="1640" price="544.14"/>
+ <flight id="WW650" departs="2012" price="497.42"/>
+ </route>
+ <route from="DEL" to="SYD" distance="10427">
+ <flight id="WW824" departs="1117" price="1144.39"/>
+ <flight id="WW117" departs="1727" price="1124.35"/>
+ </route>
+
+ <!-- from Shanghai -->
+ <route from="SHA" to="LAX" distance="10436">
+ <flight id="WW239" departs="0857" price="1244.22"/>
+ <flight id="WW566" departs="1323" price="944.68"/>
+ <flight id="WW928" departs="1634" price="947.97"/>
+ <flight id="WW943" departs="2104" price="1241.41"/>
+ </route>
+ <route from="SHA" to="JFK" distance="11869">
+ <flight id="WW501" departs="1130" price="1229.58"/>
+ <flight id="WW346" departs="1907" price="951.51"/>
+ </route>
+ <route from="SHA" to="GRU" distance="18522"/>
+ <route from="SHA" to="CPT" distance="12961"/>
+ <route from="SHA" to="LHR" distance="9206">
+ <flight id="WW550" departs="0918" price="765.98"/>
+ <flight id="WW794" departs="1317" price="994.45"/>
+ <flight id="WW212" departs="1608" price="806.07"/>
+ <flight id="WW796" departs="2004" price="1096.53"/>
+ </route>
+ <route from="SHA" to="SVO" distance="6813">
+ <flight id="WW958" departs="1234" price="774.18"/>
+ <flight id="WW342" departs="1908" price="574.98"/>
+ </route>
+ <route from="SHA" to="DXB" distance="6403">
+ <flight id="WW725" departs="0906" price="588.83"/>
+ <flight id="WW505" departs="1232" price="672.98"/>
+ <flight id="WW432" departs="1642" price="622.66"/>
+ <flight id="WW846" departs="1941" price="743.98"/>
+ </route>
+ <route from="SHA" to="DEL" distance="4243">
+ <flight id="WW272" departs="0855" price="456.56"/>
+ <flight id="WW282" departs="1347" price="492.06"/>
+ <flight id="WW809" departs="1655" price="384.65"/>
+ <flight id="WW687" departs="2047" price="508.49"/>
+ </route>
+ <route from="SHA" to="NRT" distance="1834">
+ <flight id="WW116" departs="0838" price="213.69"/>
+ <flight id="WW230" departs="1132" price="209.21"/>
+ <flight id="WW743" departs="1350" price="163.64"/>
+ <flight id="WW488" departs="1619" price="150.55"/>
+ <flight id="WW732" departs="1915" price="203.68"/>
+ <flight id="WW275" departs="2118" price="216.18"/>
+ </route>
+ <route from="SHA" to="SYD" distance="7885">
+ <flight id="WW429" departs="1251" price="733.03"/>
+ <flight id="WW988" departs="1735" price="835.20"/>
+ </route>
+
+ <!-- from Tokyo -->
+ <route from="NRT" to="LAX" distance="8748">
+ <flight id="WW160" departs="0908" price="895.40"/>
+ <flight id="WW998" departs="1254" price="1046.53"/>
+ <flight id="WW207" departs="1610" price="1046.85"/>
+ <flight id="WW833" departs="2039" price="931.84"/>
+ </route>
+ <route from="NRT" to="JFK" distance="10823">
+ <flight id="WW198" departs="1132" price="1099.64"/>
+ <flight id="WW783" departs="1729" price="1159.15"/>
+ </route>
+ <route from="NRT" to="GRU" distance="18480"/>
+ <route from="NRT" to="CPT" distance="14789"/>
+ <route from="NRT" to="LHR" distance="9585">
+ <flight id="WW778" departs="0947" price="861.80"/>
+ <flight id="WW523" departs="1236" price="1068.30"/>
+ <flight id="WW933" departs="1620" price="806.16"/>
+ <flight id="WW115" departs="1942" price="1013.28"/>
+ </route>
+ <route from="NRT" to="SVO" distance="7502">
+ <flight id="WW239" departs="1243" price="870.87"/>
+ <flight id="WW718" departs="1717" price="817.57"/>
+ </route>
+ <route from="NRT" to="DXB" distance="7977">
+ <flight id="WW492" departs="0941" price="827.91"/>
+ <flight id="WW881" departs="1230" price="672.40"/>
+ <flight id="WW311" departs="1613" price="712.96"/>
+ <flight id="WW645" departs="1948" price="647.39"/>
+ </route>
+ <route from="NRT" to="DEL" distance="5904">
+ <flight id="WW657" departs="0943" price="642.77"/>
+ <flight id="WW701" departs="1322" price="482.63"/>
+ <flight id="WW918" departs="1631" price="545.27"/>
+ <flight id="WW196" departs="2002" price="503.27"/>
+ </route>
+ <route from="NRT" to="SHA" distance="1834">
+ <flight id="WW227" departs="0823" price="160.94"/>
+ <flight id="WW768" departs="1059" price="210.22"/>
+ <flight id="WW174" departs="1352" price="212.06"/>
+ <flight id="WW869" departs="1639" price="151.08"/>
+ <flight id="WW519" departs="1838" price="173.23"/>
+ <flight id="WW146" departs="2129" price="152.51"/>
+ </route>
+ <route from="NRT" to="SYD" distance="7827">
+ <flight id="WW349" departs="1108" price="703.57"/>
+ <flight id="WW611" departs="1829" price="908.15"/>
+ </route>
+
+ <!-- from Sydney -->
+ <route from="SYD" to="LAX" distance="12053">
+ <flight id="WW792" departs="1134" price="1256.68"/>
+ <flight id="WW192" departs="1708" price="1089.62"/>
+ </route>
+ <route from="SYD" to="JFK" distance="16002"/>
+ <route from="SYD" to="GRU" distance="13359"/>
+ <route from="SYD" to="CPT" distance="11000"/>
+ <route from="SYD" to="LHR" distance="17009"/>
+ <route from="SYD" to="SVO" distance="14505"/>
+ <route from="SYD" to="DXB" distance="12038"/>
+ <route from="SYD" to="DEL" distance="10427">
+ <flight id="WW619" departs="1115" price="1189.47"/>
+ <flight id="WW988" departs="1741" price="1143.81"/>
+ </route>
+ <route from="SYD" to="SHA" distance="7885">
+ <flight id="WW113" departs="1135" price="923.03"/>
+ <flight id="WW294" departs="1750" price="841.27"/>
+ </route>
+ <route from="SYD" to="NRT" distance="7827">
+ <flight id="WW986" departs="1110" price="635.02"/>
+ <flight id="WW665" departs="1836" price="806.74"/>
+ </route>
+
+</flights>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/Timezones.xml
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/Timezones.xml b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/Timezones.xml
new file mode 100644
index 0000000..2ab933b
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.L10NTest.testRuntimeLocalization/src/Timezones.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<timezones>
+ <timezone where="LAX" delta="-0800"/> <!-- Los Angeles, USA -->
+ <timezone where="JFK" delta="-0500"/> <!-- New York, USA -->
+ <timezone where="GRU" delta="-0300"/> <!-- Sao Paulo, Brazil -->
+ <timezone where="CPT" delta="+0200"/> <!-- Cape Town, South Africa -->
+ <timezone where="LHR" delta="+0000"/> <!-- London, England -->
+ <timezone where="SVO" delta="+0300"/> <!-- Moscow, Russia -->
+ <timezone where="DXB" delta="+0400"/> <!-- Dubai, United Arab Emirates -->
+ <timezone where="DEL" delta="+0530"/> <!-- New Delhi, India -->
+ <timezone where="SHA" delta="+0800"/> <!-- Shanghai, China -->
+ <timezone where="NRT" delta="+0900"/> <!-- Tokyo, Japan -->
+ <timezone where="SYD" delta="+1000"/> <!-- Sydney, Australia -->
+</timezones>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/pom.xml
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/pom.xml b/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/pom.xml
new file mode 100644
index 0000000..a1c7cab
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>com.bit101</groupId>
+ <artifactId>minimal-comps</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>swc</packaging>
+
+ <name>Minimal comps</name>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>net.flexmojos.oss</groupId>
+ <artifactId>flexmojos-maven-plugin</artifactId>
+ <version>7.1.0-SNAPSHOT</version>
+ <extensions>true</extensions>
+ <configuration>
+ <namespaces>
+ <namespace>
+ <uri>http://www.bit101.com/minimal-comps</uri>
+ <manifest>${project.build.directory}/manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+ <includeNamespaces>
+ <namespace>http://www.bit101.com/minimal-comps</namespace>
+ </includeNamespaces>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex.compiler</groupId>
+ <artifactId>falcon-compiler</artifactId>
+ <version>0.0.3-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>framework</artifactId>
+ <version>4.13.0.20140701</version>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>com.adobe.flash.framework</groupId>
+ <artifactId>playerglobal</artifactId>
+ <version>13.0</version>
+ <type>swc</type>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/src/assets/pf_ronda_seven.ttf
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/src/assets/pf_ronda_seven.ttf b/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/src/assets/pf_ronda_seven.ttf
new file mode 100644
index 0000000..0bbf3aa
Binary files /dev/null and b/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/src/assets/pf_ronda_seven.ttf differ
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b6e082df/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/src/com/bit101/components/CheckBox.as
----------------------------------------------------------------------
diff --git a/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/src/com/bit101/components/CheckBox.as b/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/src/com/bit101/components/CheckBox.as
new file mode 100644
index 0000000..66ffc7c
--- /dev/null
+++ b/flexmojos-tests/net.flexmojos.oss.tests.concept.ManifestTest.manifestCreation/src/com/bit101/components/CheckBox.as
@@ -0,0 +1,162 @@
+/**
+ * Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ * Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.bit101.components
+{
+ import flash.display.DisplayObjectContainer;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+
+ public class CheckBox extends Component
+ {
+ private var _back:Sprite;
+ private var _button:Sprite;
+ private var _label:Label;
+ private var _labelText:String = "";
+ private var _selected:Boolean = false;
+
+
+ /**
+ * Constructor
+ * @param parent The parent DisplayObjectContainer on which to add this CheckBox.
+ * @param xpos The x position to place this component.
+ * @param ypos The y position to place this component.
+ * @param label String containing the label for this component.
+ * @param defaultHandler The event handling function to handle the default event for this component (click in this case).
+ */
+ public function CheckBox(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, label:String = "", defaultHandler:Function = null)
+ {
+ _labelText = label;
+ super(parent, xpos, ypos);
+ if(defaultHandler != null)
+ {
+ addEventListener(MouseEvent.CLICK, defaultHandler);
+ }
+ }
+
+ /**
+ * Initializes the component.
+ */
+ override protected function init():void
+ {
+ super.init();
+ buttonMode = true;
+ useHandCursor = true;
+ }
+
+ /**
+ * Creates the children for this component
+ */
+ override protected function addChildren():void
+ {
+ _back = new Sprite();
+ _back.filters = [getShadow(2, true)];
+ addChild(_back);
+
+ _button = new Sprite();
+ _button.filters = [getShadow(1)];
+ _button.visible = false;
+ addChild(_button);
+
+ _label = new Label(this, 0, 0, _labelText);
+ draw();
+
+ addEventListener(MouseEvent.CLICK, onClick);
+ }
+
+
+
+
+ ///////////////////////////////////
+ // public methods
+ ///////////////////////////////////
+
+ /**
+ * Draws the visual ui of the component.
+ */
+ override public function draw():void
+ {
+ super.draw();
+ _back.graphics.clear();
+ _back.graphics.beginFill(Style.BACKGROUND);
+ _back.graphics.drawRect(0, 0, 10, 10);
+ _back.graphics.endFill();
+
+ _button.graphics.clear();
+ _button.graphics.beginFill(Style.BUTTON_FACE);
+ _button.graphics.drawRect(2, 2, 6, 6);
+
+ _label.text = _labelText;
+ _label.draw();
+ _label.x = 12;
+ _label.y = (10 - _label.height) / 2;
+ _width = _label.width + 12;
+ _height = 10;
+ }
+
+
+
+
+ ///////////////////////////////////
+ // event handler
+ ///////////////////////////////////
+
+ /**
+ * Internal click handler.
+ * @param event The MouseEvent passed by the system.
+ */
+ protected function onClick(event:MouseEvent):void
+ {
+ _selected = !_selected;
+ _button.visible = _selected;
+ }
+
+
+
+
+ ///////////////////////////////////
+ // getter/setters
+ ///////////////////////////////////
+
+ /**
+ * Sets / gets the label text shown on this CheckBox.
+ */
+ public function set label(str:String):void
+ {
+ _labelText = str;
+ invalidate();
+ }
+ public function get label():String
+ {
+ return _labelText;
+ }
+
+ /**
+ * Sets / gets the selected state of this CheckBox.
+ */
+ public function set selected(s:Boolean):void
+ {
+ _selected = s;
+ _button.visible = _selected;
+ }
+ public function get selected():Boolean
+ {
+ return _selected;
+ }
+
+ }
+}
\ No newline at end of file