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, completions
Fields inherited from class de.grogra.pf.ui.autocomplete.impl.CompletionProviderBase
EMPTY_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Returns 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).boolean
isValidChar
(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, removeCompletion
Methods 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:
checkProviderAndAdd
in classAbstractCompletionProvider
-
getAlreadyEnteredText
Description copied from interface:CompletionProvider
Returns 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
null
means 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:CompletionProvider
Test if a char is valid for this completion -
getCompletionsAt
Description copied from interface:CompletionProvider
Returns 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:CompletionProvider
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).- Parameters:
tc
- The text component.- Returns:
- The list of
ParameterizedCompletion
s. If no completions are available, this may benull
.
-