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, indexContainsWordprotected NameFieldAutoCompleter(java.lang.String fieldName)
AutoCompleterFactorypublic NameFieldAutoCompleter(java.lang.String[] fieldNames,
boolean lastNameOnlyAndSeparationBySpace)
public boolean isSingleUnitField()
AbstractAutoCompleterAutoCompleteListener.getCurrentWord(JTextComponent comp)
returns current word only, if true, it returns the text beginning from the bufferisSingleUnitField in class AbstractAutoCompleterpublic void addBibtexEntry(BibtexEntry entry)
AbstractAutoCompleterAbstractAutoCompleter) itself
decides which information should be stored for later completion.addBibtexEntry in class AbstractAutoCompleterpublic java.lang.String[] complete(java.lang.String str)
AbstractAutoCompleterAbstractAutoCompleter
.complete in class AbstractAutoCompleterAbstractAutoCompleter.addBibtexEntry(BibtexEntry)public java.lang.String getFieldName()
public java.lang.String getPrefix()
getPrefix in class AbstractAutoCompleter