Package ca.phon.ui.text
Class TreeTextCompleterModel<T>
java.lang.Object
ca.phon.ui.text.TreeTextCompleterModel<T>
- All Implemented Interfaces:
TextCompleterModel<T>
- Direct Known Subclasses:
DefaultTextCompleterModel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompletion
(String completion, T value) Add completion to model with given data.void
completeText
(String text, String completion) Perform completion and return new text.boolean
containsCompletion
(String completion) getCompletions
(String text) Return completions for given text.Get data for completion key.getDisplayText
(String completion) Get text used for display of completion.boolean
void
removeCompletion
(String completion) Remove completion from model.void
setIncludeInfixEntries
(boolean includeInfixEntries) void
setSeparator
(String separator)
-
Constructor Details
-
TreeTextCompleterModel
public TreeTextCompleterModel()
-
-
Method Details
-
getSeparator
-
setSeparator
-
isIncludeInfixEntries
public boolean isIncludeInfixEntries() -
setIncludeInfixEntries
public void setIncludeInfixEntries(boolean includeInfixEntries) -
addCompletion
Description copied from interface:TextCompleterModel
Add completion to model with given data.- Specified by:
addCompletion
in interfaceTextCompleterModel<T>
-
removeCompletion
Description copied from interface:TextCompleterModel
Remove completion from model.- Specified by:
removeCompletion
in interfaceTextCompleterModel<T>
-
clearCompletions
public void clearCompletions()- Specified by:
clearCompletions
in interfaceTextCompleterModel<T>
-
getData
Description copied from interface:TextCompleterModel
Get data for completion key.- Specified by:
getData
in interfaceTextCompleterModel<T>
-
getDisplayText
Description copied from interface:TextCompleterModel
Get text used for display of completion.- Specified by:
getDisplayText
in interfaceTextCompleterModel<T>
- Returns:
- text
-
containsCompletion
- Specified by:
containsCompletion
in interfaceTextCompleterModel<T>
-
getCompletions
Description copied from interface:TextCompleterModel
Return completions for given text.- Specified by:
getCompletions
in interfaceTextCompleterModel<T>
-
completeText
Description copied from interface:TextCompleterModel
Perform completion and return new text.- Specified by:
completeText
in interfaceTextCompleterModel<T>
- Returns:
- new text
-