public class NameFieldAutoCompleter extends AbstractAutoCompleter
SHORTEST_TO_COMPLETE, SHORTEST_WORD
Modifier | Constructor and Description |
---|---|
protected |
NameFieldAutoCompleter(java.lang.String fieldName) |
|
NameFieldAutoCompleter(java.lang.String[] fieldNames,
boolean lastNameOnlyAndSeparationBySpace) |
Modifier and Type | Method and Description |
---|---|
void |
addBibtexEntry(BibtexEntry entry)
Add a BibtexEntry to this autocompleter.
|
java.lang.String[] |
complete(java.lang.String str)
Returns one or more possible completions for a given String.
|
java.lang.String |
getFieldName() |
java.lang.String |
getPrefix() |
boolean |
isSingleUnitField()
States whether the field consists of multiple values (false) or of a single value (true)
Symptom: if false,
AutoCompleteListener.getCurrentWord(JTextComponent comp)
returns current word only, if true, it returns the text beginning from the buffer |
addWordToIndex, indexContainsWord
protected NameFieldAutoCompleter(java.lang.String fieldName)
AutoCompleterFactory
public NameFieldAutoCompleter(java.lang.String[] fieldNames, boolean lastNameOnlyAndSeparationBySpace)
public boolean isSingleUnitField()
AbstractAutoCompleter
AutoCompleteListener.getCurrentWord(JTextComponent comp)
returns current word only, if true, it returns the text beginning from the bufferisSingleUnitField
in class AbstractAutoCompleter
public void addBibtexEntry(BibtexEntry entry)
AbstractAutoCompleter
AbstractAutoCompleter
) itself
decides which information should be stored for later completion.addBibtexEntry
in class AbstractAutoCompleter
public java.lang.String[] complete(java.lang.String str)
AbstractAutoCompleter
AbstractAutoCompleter
.complete
in class AbstractAutoCompleter
AbstractAutoCompleter.addBibtexEntry(BibtexEntry)
public java.lang.String getFieldName()
public java.lang.String getPrefix()
getPrefix
in class AbstractAutoCompleter