public class CompleterFilter extends AbstractCompleterFilter
Add this filter class to the Document of the text field.
The first match in the array is the one used to autocomplete. So sort your array by most important objects first.
DocumentFilter.FilterBypass| Modifier and Type | Field and Description |
|---|---|
protected Object[] |
objectList |
protected JTextField |
textField |
caseSensitive, corrective, firstSelectedIndex, preText, strict| Constructor and Description |
|---|
CompleterFilter(Object[] completerObjs,
JTextField textField)
Creates a new instance of CompleterFilter.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCompleterListSize()
DOCUMENT ME!
|
Object |
getCompleterObjectAt(int i)
DOCUMENT ME!
|
JTextField |
getTextField()
DOCUMENT ME!
|
void |
setCompleterMatches(Object[] objectsToMatch)
Set the list of objects to match against.
|
getLeadingSelectedIndex, insertString, isCaseSensitive, isCorrectingCase, isStrict, remove, replace, setCaseSensitive, setCorrectCase, setStrictprotected JTextField textField
protected Object[] objectList
public CompleterFilter(Object[] completerObjs, JTextField textField)
completerObjs - an array of objects used to attempt completiontextField - the text component to receive the completionpublic int getCompleterListSize()
AbstractCompleterFiltergetCompleterListSize in class AbstractCompleterFilterpublic Object getCompleterObjectAt(int i)
AbstractCompleterFiltergetCompleterObjectAt in class AbstractCompleterFilteri - DOCUMENT ME!public JTextField getTextField()
AbstractCompleterFiltergetTextField in class AbstractCompleterFilterpublic void setCompleterMatches(Object[] objectsToMatch)
objectsToMatch - DOCUMENT ME!Copyright © 2012–2026 cismet GmbH. All rights reserved.