flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [01/18] Squiggly spell checker donation from Adobe Systems Inc.
Date Fri, 25 Apr 2014 05:27:06 GMT
Repository: flex-utilities
Updated Branches:
  refs/heads/develop e3d273765 -> a52655acc


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo-app.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo-app.xml b/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo-app.xml
new file mode 100644
index 0000000..36fb899
--- /dev/null
+++ b/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo-app.xml
@@ -0,0 +1,153 @@
+<?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.
+ 
+ -->
+<application xmlns="http://ns.adobe.com/air/application/1.5">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>AdobeSpellingAirDemo</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>AdobeSpellingAirDemo</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>AdobeSpellingAirDemo</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<!-- <systemChrome></systemChrome> -->
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo.mxml b/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo.mxml
new file mode 100644
index 0000000..4c68739
--- /dev/null
+++ b/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo.mxml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="1024" height="768" initialize="init()">		
+			<mx:Script>
+			<![CDATA[
+
+				import com.adobe.linguistics.spelling.SpellUI;
+				
+				public function init():void
+				{
+					SpellUI.enableSpelling(ti, "usa.zwl");
+					SpellUI.enableSpelling(ta, "usa.zwl");
+					SpellUI.enableSpelling(rte, "usa.zwl");
+				}	
+			]]>
+    		</mx:Script>
+    		
+			<mx:Label text="Squiggly Spell Checker Air Demo v0.1" fontSize="30"/>
+    		<mx:TextInput id="ti" width="50%" fontSize="30"/>
+			<mx:TextArea id="ta" width="50%" height="50%" fontSize="30"/>
+			<mx:RichTextEditor id="rte" width="50%" height="50%" fontSize="30"/>	
+</mx:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx-app.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx-app.xml b/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx-app.xml
new file mode 100644
index 0000000..95c29b4
--- /dev/null
+++ b/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx-app.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+ 
+ 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.
+ 
+ -->
+<application xmlns="http://ns.adobe.com/air/application/1.5.2">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5.2
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>AdobeSpellingAirDemoEx</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>AdobeSpellingAirDemoEx</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>AdobeSpellingAirDemoEx</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
+		<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<!-- <systemChrome></systemChrome> -->
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx.mxml b/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx.mxml
new file mode 100644
index 0000000..e8912c9
--- /dev/null
+++ b/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
+					   xmlns:s="library://ns.adobe.com/flex/spark" 
+					   xmlns:mx="library://ns.adobe.com/flex/mx">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	
+	<fx:Script>
+		<![CDATA[
+			
+			import com.adobe.linguistics.spelling.SpellUI;   		           
+			
+			private function EnableAll(evt:MouseEvent):void {
+				SpellUI.enableSpelling(halo1, "usa.zwl");
+				SpellUI.enableSpelling(halo2, "usa.zwl");
+				SpellUI.enableSpelling(halo3, "usa.zwl");
+				SpellUI.enableSpelling(spark1, "usa.zwl");
+				SpellUI.enableSpelling(spark2, "usa.zwl");
+				
+			}
+			
+			private function DisableAll(evt:MouseEvent):void {
+				SpellUI.disableSpelling(halo1);
+				SpellUI.disableSpelling(halo2);
+				SpellUI.disableSpelling(halo3);
+				SpellUI.disableSpelling(spark1);
+				SpellUI.disableSpelling(spark2);
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<mx:Label text="Squiggly Spell Checker Flex Demo v0.2" fontSize="30"/>
+	<s:HGroup>
+		<s:Button label="EnableSpelling" click="EnableAll(event)"/>	
+		<s:Button label="DisableSpelling" click="DisableAll(event)"/>		
+	</s:HGroup>
+	
+	<s:HGroup width="100%" height="100%">
+		<s:VGroup width="50%" height="100%">
+			<mx:Label fontSize="30" text="Halo Components"/>
+			<mx:TextInput id="halo1" width="80%" fontSize="30" text="Spell cheecking in halo TextInput"/>
+			<mx:TextArea id="halo2" width="80%" height="50%" fontSize="30" text="Spell cheecking in halo TextArea"/>
+			<mx:RichTextEditor id="halo3" width="80%" height="50%" fontSize="30" text="Spell cheecking in halo RichTextEditor"/>
+		</s:VGroup>
+		<s:VGroup width="50%" height="100%">
+			<mx:Label fontSize="30" text="Spark Components"/>
+			<s:TextInput id="spark1" width="80%" fontSize="30" text="Spell cheecking in spark TextInput"/>
+			<s:TextArea id="spark2" width="80%" height="50%" fontSize="30" text="Spell cheecking in spark TextArea"/>
+		</s:VGroup>
+	</s:HGroup>
+</s:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingConfig.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingConfig.xml b/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingConfig.xml
new file mode 100644
index 0000000..4b2a819
--- /dev/null
+++ b/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingConfig.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<SpellingConfig>
+  <LanguageResource language="English" languageCode="en_US" ruleFile="data/en_US.aff" dictionaryFile="data/en_US.dic"/>
+  <LanguageResource language="Spanish" languageCode="es_ES" ruleFile="data/es_ES.aff" dictionaryFile="data/es_ES.dic"/>
+  <LanguageResource language="Portuguese" languageCode="pt_PT" ruleFile="data/pt_PT.aff" dictionaryFile="data/pt_PT.dic"/>
+  <LanguageResource language="Italian" languageCode="it_IT" ruleFile="data/it_IT.aff" dictionaryFile="data/it_IT.dic"/>
+  <LanguageResource language="French" languageCode="fr_FR" ruleFile="data/fr_FR.aff" dictionaryFile="data/fr_FR.dic"/>
+</SpellingConfig>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingDemo.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingDemo.mxml b/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingDemo.mxml
new file mode 100644
index 0000000..462c8e9
--- /dev/null
+++ b/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingDemo.mxml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" viewSourceURL="srcview/index.html" applicationComplete="init()">		
+			<mx:Script>
+			<![CDATA[
+				import com.adobe.linguistics.spelling.SpellUI;
+				import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
+				import com.adobe.linguistics.spelling.framework.ResourceTable;
+				
+				
+				public function init():void
+				{
+					var resourceTable:ResourceTable = new ResourceTable();
+					resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});
+					resourceTable.setResource("es_ES", {rule:"data/es_ES.aff", dict:"data/es_ES.dic"});
+					resourceTable.setResource("it_IT", {rule:"data/it_IT.aff", dict:"data/it_IT.dic"});
+					resourceTable.setResource("pt_PT", {rule:"data/pt_PT.aff", dict:"data/pt_PT.dic"});	
+					resourceTable.setResource("fr_FR", {rule:"data/fr_FR.aff", dict:"data/fr_FR.dic"});
+					SpellingConfiguration.resourceTable = resourceTable;
+				}
+			]]>
+    		</mx:Script>
+    		
+			<mx:Label text="Squiggly Spell Checker Flex Demo v0.6" fontSize="30"/>
+
+    		<mx:TabNavigator width="60%" height="100%" fontSize="20">
+    		    <mx:Canvas label="English" width="100%" height="100%">
+    		    	<mx:TextArea id="ta_en" width="100%" height="100%" 
+    		    		text="I know Enlish. Use the context menu to see the suggestions of the missbelled word. "
+    		    		creationComplete="SpellUI.enableSpelling(ta_en, 'en_US');"/>
+    		    </mx:Canvas>
+    		    <mx:Canvas label="Spanish" width="100%" height="100%">
+    		    	<mx:TextArea id="ta_es" width="100%" height="100%" 
+    		    		text="Sé esbañol. Utilice el menú contextual para ver las sugerencias de la palabra mal eskrita. "
+    		    		creationComplete="SpellUI.enableSpelling(ta_es, 'es_ES');" />
+    		    </mx:Canvas>
+    		    <mx:Canvas label="Portuguese" width="100%" height="100%">
+    		    	<mx:TextArea id="ta_pt" width="100%" height="100%" 
+    		    		text="Eu sei Portoguês. Use o menu de contexto para ver as sugestões da palavra grafada incorectamente."
+    		    		creationComplete="SpellUI.enableSpelling(ta_pt, 'pt_PT');"/>
+    		    </mx:Canvas>	
+    		    <mx:Canvas label="Italian" width="100%" height="100%">
+    		    	<mx:TextArea id="ta_it" width="100%" height="100%" 
+    		    		text="So italianou. Utilizzare il menu di scelta rapida per visualizzare le suggestioni della parola erreta. "
+    		    		creationComplete="SpellUI.enableSpelling(ta_it, 'it_IT');" />
+    		    </mx:Canvas> 		
+				<mx:Canvas label="French" width="100%" height="100%">
+					<mx:TextArea id="ta_fr" width="100%" height="100%" 
+								 text="Je sais que le frnçais. Utilisez le menu contextuel pour voir les suggestions du mot mal orthogrrraphié. "
+								 creationComplete="SpellUI.enableSpelling(ta_fr, 'fr_FR');" />
+				</mx:Canvas>
+    		</mx:TabNavigator>	
+</mx:Application>
+
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingConfig.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingConfig.xml b/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingConfig.xml
new file mode 100644
index 0000000..7386b63
--- /dev/null
+++ b/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingConfig.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<SpellingConfig>
+  <LanguageResource language="English" languageCode="en_US" ruleFile="data/en_US.aff" dictionaryFile="data/en_US.dic"/>
+  <LanguageResource language="Spanish" languageCode="es_ES" ruleFile="data/es_ES.aff" dictionaryFile="data/es_ES.dic"/>
+  <LanguageResource language="Portuguese" languageCode="pt_PT" ruleFile="data/pt_PT.aff" dictionaryFile="data/pt_PT.dic"/>
+  <LanguageResource language="Portuguese(Brazil)" languageCode="pt_BR" ruleFile="data/pt_BR.aff" dictionaryFile="data/pt_BR.dic"/>  
+  <LanguageResource language="Italian" languageCode="it_IT" ruleFile="data/it_IT.aff" dictionaryFile="data/it_IT.dic"/>
+  <LanguageResource language="Romanian" languageCode="ro_RO" ruleFile="data/ro_RO.aff" dictionaryFile="data/ro_RO.dic"/>
+</SpellingConfig>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingDemoEx.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingDemoEx.mxml b/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingDemoEx.mxml
new file mode 100644
index 0000000..9badc49
--- /dev/null
+++ b/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingDemoEx.mxml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<!-- Simple example to demonstrate the Spark TextArea control. -->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+			   xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" viewSourceURL="srcview/index.html" applicationComplete="init()">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	
+	<fx:Script>
+		<![CDATA[
+			import com.adobe.linguistics.spelling.SpellUI;
+			import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
+			import com.adobe.linguistics.spelling.framework.ResourceTable;
+			
+			
+			public function init():void
+			{
+				var resourceTable:ResourceTable = new ResourceTable();
+				resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});
+				resourceTable.setResource("es_ES", {rule:"data/es_ES.aff", dict:"data/es_ES.dic"});
+				resourceTable.setResource("it_IT", {rule:"data/it_IT.aff", dict:"data/it_IT.dic"});
+				resourceTable.setResource("pt_PT", {rule:"data/pt_PT.aff", dict:"data/pt_PT.dic"});	
+				SpellingConfiguration.resourceTable = resourceTable;
+			}
+		]]>
+	</fx:Script>
+	
+	<mx:Label text="Squiggly Spell Checker Flex Demo v0.3" fontSize="30"/>
+	
+	<mx:TabNavigator width="70%" height="100%" fontSize="25">
+		<s:NavigatorContent label="English" width="100%" height="100%">
+			<s:TextArea id="ta_en" width="100%" height="100%" 
+						 text="I know Enlish. Use the context menu to see the suggestions of the missbelled word. "
+						 creationComplete="SpellUI.enableSpelling(ta_en, 'en_US');"/>
+		</s:NavigatorContent>
+		<s:NavigatorContent label="Spanish" width="100%" height="100%">
+			<s:TextArea id="ta_es" width="100%" height="100%" 
+						 text="Sé esbañol. Utilice el menú contextual para ver las sugerencias de la palabra mal eskrita. "
+						 creationComplete="SpellUI.enableSpelling(ta_es, 'es_ES');" />
+		</s:NavigatorContent>
+		<s:NavigatorContent label="Portuguese" width="100%" height="100%">
+			<s:TextArea id="ta_pt" width="100%" height="100%" 
+						 text="Eu sei Portoguês. Use o menu de contexto para ver as sugestões da palavra grafada incorectamente."
+						 creationComplete="SpellUI.enableSpelling(ta_pt, 'pt_PT');"/>
+		</s:NavigatorContent>	
+		<s:NavigatorContent label="Italian" width="100%" height="100%">
+			<s:TextArea id="ta_it" width="100%" height="100%" 
+						 text="So italianou. Utilizzare il menu di scelta rapida per visualizzare le suggestioni della parola erreta. "
+						 creationComplete="SpellUI.enableSpelling(ta_it, 'it_IT');"/>
+		</s:NavigatorContent>
+	</mx:TabNavigator>
+</s:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/README.txt
----------------------------------------------------------------------
diff --git a/Squiggly/main/README.txt b/Squiggly/main/README.txt
new file mode 100644
index 0000000..00b9745
--- /dev/null
+++ b/Squiggly/main/README.txt
@@ -0,0 +1,28 @@
+How to use the Squiggly SDK
+===================================
+
+Please read the ASDoc first to understand the classes in Squiggly.
+
+If you are using the SpellChecker class directly, you need.
+- AdobeSpellingEngine.swc in [YourProject]/libs folder, you can find it from ./libs
+- Dictionary files in [YourProject]/src folder, your can find them from ./src/dictionaries folder
+
+If you are using the simple UI integration feature (SpellUI class), in addition to what mentioned above, you also need
+- AdobeSpellingConfig.xml in [YourProject]/src
+- AdobeSpellingUI.swc (AdobeSpellingUIEx.swc if you need spark support in Flex 4) in [YourProject]/libs 
+
+This SDK came with English(US) dictionary. You can download additional HunSpell dictionaries, but for now, what we have tested are just English, Spanish, Portuguese and Italian. If you are doing this, you need to understand AdobeSpellingConfig.xml.
+
+Here's the content of AdobeSpellingConfig.xml, each entry maps the languageCode with the relative path for resource files. 
+<SpellingConfig>
+  <LanguageResource language="English" languageCode="en_US" ruleFile="dictionaries/en_US/en_US.aff" dictionaryFile="dictionaries/en_US/en_US.dic"/>
+</SpellingConfig>
+
+So if you are adding Spanish, you just need to get the hunspell dictionary es_ES.aff/dic and add one line to your config file.
+  <LanguageResource language="Spanish" languageCode="es_ES" ruleFile="dictionaries/es_ES/es_ES.aff" dictionaryFile="dictionaries/es_ES/es_ES.dic"/>
+
+Note that you can put the dictionaries in another location as long as you update the config file, the config file itself MUST be in [YourProject]/src folder.
+
+
+
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Tools/AdobeSpellingDictGen/README.txt
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/README.txt b/Squiggly/main/Tools/AdobeSpellingDictGen/README.txt
new file mode 100644
index 0000000..5326ed6
--- /dev/null
+++ b/Squiggly/main/Tools/AdobeSpellingDictGen/README.txt
@@ -0,0 +1,16 @@
+Squiggly Dictionary Generator v0.1
+
+README
+===================================
+
+This is a simple AIR application that converts a plain text word list file to an Adobe Spelling Dictionary file. 
+
+Here's what each step is doing:
+1. Load a plain text file, each line in the file contains one word, a sampleWOrdList.txt is provided
+2. Calculate the metaphone, which will improve spell checker performance and result
+3. Generate a Squiggly Dictionary object
+4. Export the the Squiggly Dictionary object to a compressed binary file (recommend using *.zwl extension)
+
+Once you have the zwl file, you can use it in your Flex/AIR project.
+
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Tools/AdobeSpellingDictGen/sample/sampleWordList.txt
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/sample/sampleWordList.txt b/Squiggly/main/Tools/AdobeSpellingDictGen/sample/sampleWordList.txt
new file mode 100644
index 0000000..3c6e8ce
--- /dev/null
+++ b/Squiggly/main/Tools/AdobeSpellingDictGen/sample/sampleWordList.txt
@@ -0,0 +1,13 @@
+adobe
+apple
+amazon
+microsoft
+intel
+ibm
+google
+yahoo
+ebay
+vmware
+sun
+orcale
+facebook
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen-app.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen-app.xml b/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen-app.xml
new file mode 100644
index 0000000..ecff5e3
--- /dev/null
+++ b/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen-app.xml
@@ -0,0 +1,153 @@
+<?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.
+ 
+ -->
+<application xmlns="http://ns.adobe.com/air/application/1.5">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>AdobeSpellingDictGen</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>AdobeSpellingDictGen</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>AdobeSpellingDictGen</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<!-- <systemChrome></systemChrome> -->
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen.mxml b/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen.mxml
new file mode 100644
index 0000000..2399910
--- /dev/null
+++ b/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen.mxml
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="800" height="600" fontSize="12">
+
+
+	<mx:Script>
+		<![CDATA[
+			
+			import com.adobe.linguistics.spelling.utils.WordList;
+			import com.adobe.linguistics.spelling.engine.dictionary.SuseDictionary;
+			import com.adobe.linguistics.spelling.codec.language.MetaPhone;
+			
+			// For debug only
+			private var tsStart:int
+			private var tsEnd:int;
+			
+			// An array with words only
+			private var basicWordList:Array;
+			
+			// A suse dictionary object (hash) as defined in suse engine
+			private var suse:SuseDictionary;
+			
+			// An array with index, word, metaphone
+			[Bindable]
+			private var advWordList:Array;
+			
+			private var src:File = File.applicationDirectory;
+			private var dest:File = File.applicationDirectory;
+			
+			
+			private function browseInFile():void
+			{
+				try {
+					src.browseForOpen("Select a TXT file");
+					src.addEventListener(Event.SELECT, inFileSelected);
+				} catch (error:Error)
+				{
+					trace("Failed:", error.message);
+				}
+			}
+			
+			private function inFileSelected(event:Event):void
+			{	
+				tsStart = getTimer();
+				var file:File = event.target as File;
+				var stream:FileStream = new FileStream();
+				stream.open(file, FileMode.READ);
+				var fileData:String = stream.readUTFBytes(stream.bytesAvailable);
+				
+				if (fileData.charAt(fileData.indexOf("\n")-2) == "\r")		//Strange, but happened when generating the text file from mac
+				{
+					basicWordList = fileData.split("\r\r\n");
+				}
+				else if (fileData.charAt(fileData.indexOf("\n")-1) == "\r")
+				{
+					basicWordList = fileData.split("\r\n");			//Windows
+				}
+				else 
+				{
+					basicWordList = fileData.split("\n");			//Mac and linux
+				}
+				
+				loadTxtInfo.text = file.nativePath + " (" + basicWordList.length.toString() + " words, " + file.size.toString() + " bytes)";
+				loadTxtInfo.setStyle("color", "green");
+				
+				// Debug log
+				tsEnd = getTimer();
+				debugInfo.text += "DebugInfo\n================\n" + "TxtLoaded: "+ file.nativePath + " " + (tsEnd - tsStart).toString() + "ms" + "\n";
+				prepareToShow();
+			}
+			
+			
+			private function browseOutFile():void
+			{
+				try {
+					dest.browseForSave("Output ZWL file");
+					dest.addEventListener(Event.SELECT, outFileSelected);
+				} catch (error:Error)
+				{
+					trace("Failed:", error.message);
+				}
+			}
+			
+			private function outFileSelected(event:Event):void
+			{				
+				tsStart = getTimer();
+				var bytes:ByteArray = new ByteArray();
+	    		bytes.writeObject(suse);
+	    		bytes.position = 0;
+	    		bytes.compress();
+	    		bytes.position = 0;
+	    		var outFile:File = new File((event.target as File).nativePath);
+	    		var outStream:FileStream = new FileStream();
+	    		outStream.open(outFile, FileMode.WRITE);
+	    		outStream.writeBytes(bytes, 0, bytes.length);
+	    		outStream.close();
+	    		
+	    		exportInfo.text = outFile.nativePath + " (" + outFile.size.toString() + " bytes)";
+				exportInfo.setStyle("color", "green");
+				
+				// Debug log
+	    		tsEnd = getTimer();
+	    		debugInfo.text += "\nZwlExported: " + outFile.nativePath + " " + (tsEnd - tsStart).toString() + "ms\n";
+				
+			}
+			
+	
+			
+			private function prepareToShow():void
+			{
+				
+				advWordList = new Array();
+				for (var i:uint=0; i<basicWordList.length; i++) {
+					// In case some empty string are there
+					if (basicWordList[i] != "")
+						advWordList.push(new UIWord(i, basicWordList[i]));
+				}
+			}
+			
+			private function genMeta():void
+			{
+
+				var _metaphone:MetaPhone= new MetaPhone();
+				tsStart = getTimer();
+				for (var i:uint=0; i<advWordList.length; i++) {
+					advWordList[i].meta = _metaphone.meta(advWordList[i].word, 4);
+				}
+				genMetaInfo.text = "Metaphone index generated";
+				genMetaInfo.setStyle("color", "green");
+				myDataGrid.dataProvider= advWordList;
+				// Debug log
+				tsEnd = getTimer();
+				debugInfo.text += "\nMetaGenerated: " + (tsEnd - tsStart).toString() + "ms\n";
+			}
+			
+			private function genSuseDict():void
+			{
+				suse = new SuseDictionary();
+				tsStart = getTimer();
+				for (var i:uint=0; i<advWordList.length; i++) {
+					if (suse.MetaPhoneHash[advWordList[i].meta]) {
+						suse.MetaPhoneHash[advWordList[i].meta].insert(advWordList[i].word);
+					}
+					else {
+						if ((advWordList[i].meta == "") || (advWordList[i].meta == "-nde")) continue;
+						suse.MetaPhoneHash[advWordList[i].meta] = new WordList();
+						suse.MetaPhoneHash[advWordList[i].meta].insert(advWordList[i].word);
+					}
+				}
+				genDictInfo.text = "SquigglyDict object generated";
+				genDictInfo.setStyle("color", "green");
+				
+				// Debug log
+				tsEnd = getTimer();
+				debugInfo.text += "\nSquigglyDictGenerated: " + (tsEnd - tsStart).toString() + "ms\n"; 	
+			}
+			
+		]]>
+	</mx:Script>
+	<mx:HBox width="100%">
+		<mx:Label text="Squiggly Dictionary Generator v0.1 (txt2zwl)" fontSize="25"/>		
+	</mx:HBox>
+	<mx:HBox width="100%">
+		<mx:Button label="1. Load TXT File" click="browseInFile()"/>
+		<mx:HRule visible="false" width="100%"/>
+		<mx:Label id="loadTxtInfo" text="Not loaded" color="red"/>
+	</mx:HBox>
+	<mx:HBox width="100%">
+		<mx:Button label="2. Calculate Metaphone" click="genMeta()"/>
+		<mx:HRule visible="false" width="100%"/>
+		<mx:Label id="genMetaInfo" text="Not calculated" color="red"/>
+	</mx:HBox>
+	<mx:HBox width="100%">
+		<mx:Button label="3. Generate SquigglyDict" click="genSuseDict()"/>		
+		<mx:HRule visible="false" width="100%"/>
+		<mx:Label id="genDictInfo" text="Not generated" color="red"/>
+	</mx:HBox>
+	<mx:HBox width="100%">
+		<mx:Button label="4. Export ZWL File" click = "browseOutFile()"/>
+		<mx:HRule visible="false" width="100%"/>
+		<mx:Label id="exportInfo" text="Not exported" color="red"/>
+	</mx:HBox>
+	<mx:HBox width="100%" height="100%">
+		<mx:DataGrid height="100%" id="myDataGrid" dataProvider = "{ advWordList }" width="70%">
+			<mx:columns>
+				<mx:DataGridColumn headerText="Index" dataField="index"/>
+				<mx:DataGridColumn headerText="Word" dataField="word"/>
+				<mx:DataGridColumn headerText="Metaphone" dataField="meta"/>
+			</mx:columns>
+		</mx:DataGrid>
+		<mx:TextArea id="debugInfo" height="100%" width="30%" />
+	</mx:HBox>
+</mx:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Tools/AdobeSpellingDictGen/src/UIWord.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/src/UIWord.as b/Squiggly/main/Tools/AdobeSpellingDictGen/src/UIWord.as
new file mode 100644
index 0000000..74c32e5
--- /dev/null
+++ b/Squiggly/main/Tools/AdobeSpellingDictGen/src/UIWord.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+	public class UIWord
+	{
+		public var index:uint;
+		public var word:String;
+		public var meta:String;
+		
+		public function UIWord(inIndex:uint, inWord:String)
+		{
+			index = inIndex;
+			word = inWord;
+			meta = "";
+		}
+	
+	}
+	
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/Tools/performanceTool/src/performanceTool.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/performanceTool/src/performanceTool.mxml b/Squiggly/main/Tools/performanceTool/src/performanceTool.mxml
new file mode 100644
index 0000000..30b629d
--- /dev/null
+++ b/Squiggly/main/Tools/performanceTool/src/performanceTool.mxml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init()" horizontalAlign="left">
+<mx:Script>
+	<![CDATA[
+		import com.adobe.linguistics.spelling.*;
+		import mx.controls.textClasses.TextRange;
+		
+		private var _newdict:SpellingDictionary = new SpellingDictionary();
+		private var sp:SpellChecker= new SpellChecker();
+		private function init():void {
+			_newdict.addEventListener(Event.COMPLETE, handleLoadComplete);
+			var myUrl:URLRequest = new URLRequest("usa.zwl");
+			_newdict.load(myUrl);
+		}
+		private function handleLoadComplete(evt:Event):void
+		{
+			sp.addDictionary(_newdict);
+		}
+
+		private function checkText():void {
+			var wordPattern:RegExp =/\b\w+\b/; // match next word...
+			var inputValue:String = inputText.text;
+			var rangeArray:Array = new Array();
+			var wordArray:Array = new Array();
+			var offset:int, curPos:int;
+			for ( ; ; ) {
+				var res:Array = inputValue.match( wordPattern); // lookup word by word....
+				if ( res == null ) break;
+				offset = inputText.text.length-inputValue.length;
+				curPos = inputValue.indexOf(res[0]);
+				var currentRange:TextRange = new TextRange(inputText, false, offset+ curPos, offset+ curPos+res[0].length); // mark mispelled word.
+				wordArray.push( res[0] );
+				rangeArray.push( currentRange );
+				inputValue = inputValue.substr(inputValue.indexOf(res[0])+ res[0].length);
+			}
+	        var nStart:Number;
+	        var nMillisElapsed:Number;
+	        var totalMispelled:int = 0;
+			nStart = new Date().time;
+			for ( var i:int=0; i< wordArray.length ; i++ ) {
+				if ( !sp.checkWord( wordArray[i] ) ) {
+					totalMispelled++;
+				}
+			}
+			nMillisElapsed  = new Date().time - nStart;
+			outputText.text = "Total "+ wordArray.length + " Words.\n" + 
+			"Total " + totalMispelled + " Mispelled Words.\n" +
+			"Mispell Rate:" + (totalMispelled/wordArray.length) + ".\n" +
+			"Total time(ms):" + nMillisElapsed + "ms.\n" +
+			"Performance Result:" + (wordArray.length/nMillisElapsed)*1000 + " words per second.\n";
+			for ( i=0; i< wordArray.length ; i++ ) {
+				if ( !sp.checkWord( wordArray[i] ) ) {
+					rangeArray[i].color = "red";
+				}
+			}
+			
+		}
+		
+	]]>
+</mx:Script>
+	<mx:HBox>
+		<mx:Button id="check" label="Check Text" click="checkText()"  />
+	</mx:HBox>
+	<mx:TextArea id="inputText" height="100%" width="100%"/>	
+	<mx:TextArea id="outputText" height="10%" width="50%" editable="false" backgroundColor="0xffcc00"/>	
+</mx:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a52655ac/Squiggly/main/build.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/build.xml b/Squiggly/main/build.xml
new file mode 100644
index 0000000..5bae583
--- /dev/null
+++ b/Squiggly/main/build.xml
@@ -0,0 +1,231 @@
+<?xml version="1.0" ?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project default="test" basedir=".">
+
+    <property file="${basedir}/env.properties"/>
+    <property environment="env"/>
+    <property file="${basedir}/local.properties"/>
+    <property file="${basedir}/build.properties"/>
+    <condition property="FLEX_HOME" value="${env.FLEX_HOME}">
+        <isset property="env.FLEX_HOME" />
+    </condition>
+    <condition property="AIR_HOME" value="${env.AIR_HOME}">
+        <isset property="env.AIR_HOME" />
+    </condition>
+    <condition property="PLAYERGLOBAL_HOME" value="${env.PLAYERGLOBAL_HOME}">
+        <isset property="env.PLAYERGLOBAL_HOME" />
+    </condition>
+
+    <!-- SDK properties -->
+    <property name="FLEX_HOME" value="C:/air3_beta2"/>
+    <property name="AIR_HOME" value="C:/air3_beta2"/>
+	<property name="MXMLC.JAR" value="${FLEX_HOME}/lib/mxmlc.jar"/>
+	<property name="COMPC.JAR" value="${FLEX_HOME}/lib/compc.jar"/>
+	<property name="ADL" value="${AIR_HOME}/bin/adl.exe"/>
+    <property name="ADT.JAR" value="${AIR_HOME}/lib/adt.jar"/>
+    <property name="playerglobal.version" value="11.1" />
+	
+    <property name="OUTPUT_DIR" value="libs"/>
+    
+     <target name="init" depends="clean">
+     	<mkdir dir="${OUTPUT_DIR}"/>
+    </target>
+	
+	<target name="compilelinguistics" depends="init">
+		<java jar="${COMPC.JAR}" fork="true" failonerror="true">
+			<arg value="-swf-version"/>
+			<arg value="13"/>
+			<arg value="+flexlib=${FLEX_HOME}/frameworks"/>
+			<arg value="-source-path"/>
+			<arg value="AdobeLinguisticUtils/src"/>
+			<arg value="-include-sources"/>
+			<arg value="AdobeLinguisticUtils/src"/>
+			<arg value="-output"/>
+			<arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+		</java>
+	</target>
+	
+	<target name="compileengine" depends="init">
+		<java jar="${COMPC.JAR}" fork="true" failonerror="true">
+			<arg value="-swf-version"/>
+			<arg value="13"/>
+			<arg value="+flexlib=${FLEX_HOME}/frameworks"/>
+			<arg value="-source-path"/>
+			<arg value="AdobeSpellingEngine/src"/>
+			<arg value="-include-sources"/>
+			<arg value="AdobeSpellingEngine/src"/>
+			<arg value="-output"/>
+			<arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+		</java>
+	</target>
+
+	<target name="compileframework" depends="init">
+		<java jar="${COMPC.JAR}" fork="true" failonerror="true">
+			<arg value="-swf-version"/>
+			<arg value="13"/>
+			<arg value="+flexlib=${FLEX_HOME}/frameworks"/>
+			<arg value="-source-path"/>
+			<arg value="AdobeSpellingFramework/src"/>
+			<arg value="-include-sources"/>
+			<arg value="AdobeSpellingFramework/src"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/framework.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/mx/mx.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/spark.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/textLayout.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+			<arg value="-output"/>
+			<arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+		</java>
+	</target>
+
+	<target name="compileui" depends="init">
+		<java jar="${COMPC.JAR}" fork="true" failonerror="true">
+			<arg value="-swf-version"/>
+			<arg value="13"/>
+			<arg value="+flexlib=${FLEX_HOME}/frameworks"/>
+			<arg value="-source-path"/>
+			<arg value="AdobeSpellingUI/src"/>
+			<arg value="-include-sources"/>
+			<arg value="AdobeSpellingUI/src"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/framework.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/mx/mx.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/spark.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/textLayout.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+			<arg value="-output"/>
+			<arg value="${OUTPUT_DIR}/AdobeSpellingUI.swc"/>
+		</java>
+	</target>
+
+    <target name="compileuiapi" depends="init">
+        <java jar="${COMPC.JAR}" fork="true" failonerror="true">
+            <arg value="-swf-version"/>
+            <arg value="13"/>
+            <arg value="+flexlib=${FLEX_HOME}/frameworks"/>
+            <arg value="-source-path"/>
+            <arg value="AdobeSpellingUIAPI/src"/>
+            <arg value="-include-sources"/>
+            <arg value="AdobeSpellingUIAPI/src"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/framework.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/mx/mx.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/spark.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/textLayout.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+            <arg value="-output"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingUIAPI.swc"/>
+        </java>
+    </target>
+
+    <target name="compileuitlf" depends="init">
+        <java jar="${COMPC.JAR}" fork="true" failonerror="true">
+            <arg value="-swf-version"/>
+            <arg value="13"/>
+            <arg value="+flexlib=${FLEX_HOME}/frameworks"/>
+            <arg value="-source-path"/>
+            <arg value="AdobeSpellingUITLF/src"/>
+            <arg value="-include-sources"/>
+            <arg value="AdobeSpellingUITLF/src"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/textLayout.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingUI.swc"/>
+            <arg value="-output"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingUITLF.swc"/>
+        </java>
+    </target>
+
+    <target name="compileuiex" depends="init">
+        <java jar="${COMPC.JAR}" fork="true" failonerror="true">
+            <arg value="-swf-version"/>
+            <arg value="13"/>
+            <arg value="+flexlib=${FLEX_HOME}/frameworks"/>
+            <arg value="-source-path"/>
+            <arg value="AdobeSpellingUIEx/src"/>
+            <arg value="-include-sources"/>
+            <arg value="AdobeSpellingUIEx/src"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/framework.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/mx/mx.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/spark.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${FLEX_HOME}/frameworks/libs/textLayout.swc"/>
+			<arg value="-external-library-path"/>
+			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+            <arg value="-external-library-path"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingUI.swc"/>
+            <arg value="-output"/>
+            <arg value="${OUTPUT_DIR}/AdobeSpellingUIEx.swc"/>
+        </java>
+    </target>
+
+    <target name="test" depends="compilelinguistics, compileengine, compileframework, compileui, compileuiapi, compileuitlf, compileuiex">
+    </target>
+   
+    <target name="clean" description="clean up">
+    	<delete dir="${OUTPUT_DIR}"/>
+    </target>
+</project>
\ No newline at end of file


Mime
View raw message