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 2017/04/18 12:15:09 UTC
[03/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - Squiggly now only replaces
ContainerControllers if they don't implement ISpellingContainerController
Squiggly now only replaces ContainerControllers if they don't implement ISpellingContainerController
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/e62376ea
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/e62376ea
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/e62376ea
Branch: refs/heads/feature/flash-downloader
Commit: e62376ea9d7738ef96ea6abb93e003eda66b4619
Parents: 98b189d
Author: Harbs <ha...@in-tools.com>
Authored: Thu Oct 13 09:05:42 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Oct 13 09:05:42 2016 +0300
----------------------------------------------------------------------
.../linguistics/spelling/ISpellingContainerController.as | 7 +++++++
.../adobe/linguistics/spelling/SpellingContextMenuForTLF.as | 7 +++++--
.../linguistics/spelling/SquigglyCustomContainerController.as | 6 +++---
3 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e62376ea/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/ISpellingContainerController.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/ISpellingContainerController.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/ISpellingContainerController.as
new file mode 100644
index 0000000..c5b25cd
--- /dev/null
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/ISpellingContainerController.as
@@ -0,0 +1,7 @@
+package com.adobe.linguistics.spelling
+{
+ public interface ISpellingContainerController
+ {
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e62376ea/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
index 7cfc65a..45f212b 100644
--- a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
@@ -23,12 +23,12 @@ package com.adobe.linguistics.spelling
import com.adobe.linguistics.spelling.framework.ui.IHighlighter;
import com.adobe.linguistics.spelling.framework.ui.IWordProcessor;
import com.adobe.linguistics.utils.Token;
-
+
import flash.events.ContextMenuEvent;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import flash.utils.describeType;
-
+
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.tlf_internal;
@@ -65,6 +65,9 @@ package com.adobe.linguistics.spelling
for (var idx:int = 0; idx < numControllers; idx++)
{
var containerController:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
+ // if it's already squiggly compatible don't replace it.
+ if(containerController is ISpellingContainerController)
+ continue;
var squigglyContainerController:SquigglyCustomContainerController = new SquigglyCustomContainerController(containerController.container, mTextHighlighter, mWordProcessor,
mSpellEngine, func, containerController.compositionWidth, containerController.compositionHeight);
copyObject(containerController, squigglyContainerController);
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e62376ea/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
index 1c5b4ee..d4028c9 100644
--- a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
@@ -23,19 +23,19 @@ package com.adobe.linguistics.spelling
import com.adobe.linguistics.spelling.framework.ui.IWordProcessor;
import com.adobe.linguistics.spelling.framework.ui.TLFWordProcessor;
import com.adobe.linguistics.utils.Token;
-
+
import flash.display.Sprite;
import flash.events.ContextMenuEvent;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
-
+
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.FlowLeafElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.TextFlow;
/** Custom container controller for populating context menu and hanlding menu item selection */
- internal class SquigglyCustomContainerController extends ContainerController
+ internal class SquigglyCustomContainerController extends ContainerController implements ISpellingContainerController
{
private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");