|
|||||||||
| 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
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 java.util.Comparator |
comparator
Compares a Completion against a String. |
protected java.util.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(java.util.List completions)
Adds Completions to this provider. |
protected void |
addWordCompletions(java.lang.String[] words)
Adds simple completions for a list of words. |
protected void |
checkProviderAndAdd(Completion c)
|
void |
clear()
Removes all completions from this provider. |
java.util.List |
getCompletionByInputText(java.lang.String inputText)
Returns a list of Completions in this provider with the specified input text. |
protected java.util.List |
getCompletionsImpl(javax.swing.text.JTextComponent comp)
Does the dirty work of creating a list of completions. |
boolean |
removeCompletion(Completion c)
Removes the specified completion from this provider. |
protected boolean |
startsWithIgnoreCase(java.lang.String str,
java.lang.String start)
Returns whether str starts with start,
ignoring case. |
| Methods inherited from class org.fife.ui.autocomplete.CompletionProviderBase |
clearParameterizedCompletionParams, getCompletions, getListCellRenderer, getParameterListEnd, getParameterListSeparator, getParameterListStart, getParent, setListCellRenderer, 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 java.util.List completions
protected java.util.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.
java.lang.IllegalArgumentException - If the completion's provider isn't
this CompletionProvider.addCompletions(List),
removeCompletion(Completion),
clear()public void addCompletions(java.util.List completions)
Completions to this provider.
completions - The completions to add. This cannot be
null.
java.lang.IllegalArgumentException - If a completion's provider isn't
this CompletionProvider.addCompletion(Completion),
removeCompletion(Completion),
clear()protected void addWordCompletions(java.lang.String[] words)
words - The words.BasicCompletionprotected void checkProviderAndAdd(Completion c)
public void clear()
addCompletion(Completion),
addCompletions(List),
removeCompletion(Completion)public java.util.List getCompletionByInputText(java.lang.String inputText)
inputText - The input text to search for.
Completions, or null if there
are no matching Completions.protected java.util.List getCompletionsImpl(javax.swing.text.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)
protected boolean startsWithIgnoreCase(java.lang.String str,
java.lang.String start)
str starts with start,
ignoring case.
str - The string to check.start - The prefix to check for.
str starts with start,
ignoring case.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||