|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fife.ui.autocomplete.CompletionProviderBase
org.fife.ui.autocomplete.AbstractCompletionProvider
public abstract class AbstractCompletionProvider
A base class for completion providers. Completions are kept in
a sorted list. To get the list of completions that match a given input,
a binary search is done to find the first matching completion, then all
succeeding completions that also match are also returned.
| Field Summary | |
|---|---|
protected Comparator |
comparator
Compares a Completion against a String. |
protected List |
completions
The completions this provider is aware of. |
| Fields inherited from class org.fife.ui.autocomplete.CompletionProviderBase |
|---|
EMPTY_STRING |
| Constructor Summary | |
|---|---|
AbstractCompletionProvider()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addCompletion(Completion c)
Adds a single completion to this provider. |
void |
addCompletions(List completions)
Adds Completions to this provider. |
protected void |
addWordCompletions(String[] words)
Adds simple completions for a list of words. |
protected void |
checkProviderAndAdd(Completion c)
|
void |
clear()
Removes all completions from this provider. |
List |
getCompletionByInputText(String inputText)
Returns a list of Completions in this provider with the specified input text. |
protected List |
getCompletionsImpl(JTextComponent comp)
Does the dirty work of creating a list of completions. |
boolean |
removeCompletion(Completion c)
Removes the specified completion from this provider. |
| Methods inherited from class org.fife.ui.autocomplete.CompletionProviderBase |
|---|
clearParameterizedCompletionParams, getCompletions, getListCellRenderer, getParameterChoicesProvider, getParameterListEnd, getParameterListSeparator, getParameterListStart, getParent, isAutoActivateOkay, setAutoActivationRules, setListCellRenderer, setParameterChoicesProvider, setParameterizedCompletionParams, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.fife.ui.autocomplete.CompletionProvider |
|---|
getAlreadyEnteredText, getCompletionsAt, getParameterizedCompletions |
| Field Detail |
|---|
protected List completions
protected Comparator comparator
Completion against a String.
| Constructor Detail |
|---|
public AbstractCompletionProvider()
| Method Detail |
|---|
public void addCompletion(Completion c)
addCompletions(List) instead.
c - The completion to add.
IllegalArgumentException - If the completion's provider isn't
this CompletionProvider.addCompletions(List),
removeCompletion(Completion),
clear()public void addCompletions(List completions)
Completions to this provider.
completions - The completions to add. This cannot be
null.
IllegalArgumentException - If a completion's provider isn't
this CompletionProvider.addCompletion(Completion),
removeCompletion(Completion),
clear()protected void addWordCompletions(String[] words)
words - The words.BasicCompletionprotected void checkProviderAndAdd(Completion c)
public void clear()
addCompletion(Completion),
addCompletions(List),
removeCompletion(Completion)public List getCompletionByInputText(String inputText)
inputText - The input text to search for.
Completions, or null if there
are no matching Completions.protected List getCompletionsImpl(JTextComponent comp)
getCompletionsImpl in class CompletionProviderBasecomp - The text component to look in.
public boolean removeCompletion(Completion c)
c - The completion to remove.
true if this provider contained the specified
completion.clear(),
addCompletion(Completion),
addCompletions(List)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||