java.lang.Object
de.grogra.pf.ui.autocomplete.impl.CompletionProviderBase
de.grogra.pf.ui.autocomplete.impl.AbstractCompletionProvider
de.grogra.pf.ui.autocomplete.impl.ChildrenCompletionProvider
- All Implemented Interfaces:
CompletionProvider
A completion provider that do not manage the completion itself. The parent it
processing it.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.pf.ui.autocomplete.impl.AbstractCompletionProvider
AbstractCompletionProvider.CaseInsensitiveComparator -
Field Summary
Fields inherited from class de.grogra.pf.ui.autocomplete.impl.AbstractCompletionProvider
comparator, completionsFields inherited from class de.grogra.pf.ui.autocomplete.impl.CompletionProviderBase
EMPTY_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidReturns the text just before the current caret position that could be the start of something auto-completable.getCompletionsAt(AutoCompletableTextArea comp, Point p) Returns the completions that have been entered at the specified visual location.Returns a list of parameterized completions that have been entered at the current caret position of a text component (and thus can have their completion choices displayed).booleanisValidChar(char c) Test if a char is valid for this completionMethods inherited from class de.grogra.pf.ui.autocomplete.impl.AbstractCompletionProvider
addCompletion, addCompletions, addWordCompletions, clear, getCompletionByInputText, getCompletionsImpl, removeCompletionMethods inherited from class de.grogra.pf.ui.autocomplete.impl.CompletionProviderBase
clearParameterizedCompletionParams, getCompletions, getListCellRenderer, getParameterChoicesProvider, getParameterListEnd, getParameterListSeparator, getParameterListStart, getParent, isAutoActivateOkay, setAutoActivationRules, setListCellRenderer, setParameterChoicesProvider, setParameterizedCompletionParams, setParent
-
Constructor Details
-
ChildrenCompletionProvider
public ChildrenCompletionProvider()
-
-
Method Details
-
checkProviderAndAdd
- Overrides:
checkProviderAndAddin classAbstractCompletionProvider
-
getAlreadyEnteredText
Description copied from interface:CompletionProviderReturns the text just before the current caret position that could be the start of something auto-completable.- Parameters:
comp- The text component.- Returns:
- The text. A return value of
nullmeans nothing should be auto-completed; a value of an empty string ("") means auto-completion should still be considered (i.e., all possible choices are valid).
-
isValidChar
public boolean isValidChar(char c) Description copied from interface:CompletionProviderTest if a char is valid for this completion -
getCompletionsAt
Description copied from interface:CompletionProviderReturns the completions that have been entered at the specified visual location. This can be used for tool tips when the user hovers the mouse over completed text.- Parameters:
comp- The text component.p- The position, usually from aMouseEvent.- Returns:
- The completions, or an empty list if there are none.
-
getParameterizedCompletions
Description copied from interface:CompletionProviderReturns a list of parameterized completions that have been entered at the current caret position of a text component (and thus can have their completion choices displayed).- Parameters:
tc- The text component.- Returns:
- The list of
ParameterizedCompletions. If no completions are available, this may benull.
-