Repository: flex-utilities Updated Branches: refs/heads/develop 609dae6ed -> dbe6309cc
Add missing example file Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/dbe6309c Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/dbe6309c Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/dbe6309c Branch: refs/heads/develop Commit: dbe6309cce5a9db0ce506492bf91bb04d6ff97de Parents: 609dae6 Author: Justin Mclean <jmcl...@apache.org> Authored: Mon Sep 22 06:37:09 2014 +1000 Committer: Justin Mclean <jmcl...@apache.org> Committed: Mon Sep 22 06:37:09 2014 +1000 ---------------------------------------------------------------------- .../SpellingDemoEx/src/AdobeSpellingDemoEx.mxml | 70 ++++++++++++++++++++ 1 file changed, 70 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/dbe6309c/Squiggly/main/Demo/SpellingDemoEx/src/AdobeSpellingDemoEx.mxml ---------------------------------------------------------------------- diff --git a/Squiggly/main/Demo/SpellingDemoEx/src/AdobeSpellingDemoEx.mxml b/Squiggly/main/Demo/SpellingDemoEx/src/AdobeSpellingDemoEx.mxml new file mode 100644 index 0000000..9badc49 --- /dev/null +++ b/Squiggly/main/Demo/SpellingDemoEx/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>