org.tbee.swing
Class AutoCompleter
java.lang.Object
org.tbee.swing.AutoCompleter
- Direct Known Subclasses:
- AutoCompleter.FileAutoCompleter, AutoCompleter.ListAutoCompleter
public abstract class AutoCompleter
- extends Object
This class adds autocompletion on a JTextField.
Some implementations are available as inner classes o.a. ListAutoCompleter.
Example:
lJTextField = new JTextField(20);
new ListAutoCompleter(lJTextField, Arrays.asList(new String[] { "JFC", "JSF", "JSP", "JAXP", "JDBC", "J2EE" }));
lContainer.add(lJTextField);
- Version:
- $Revision: 1.6 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOURCECODE_VERSION
public static final String SOURCECODE_VERSION
- Standard variable for determining version of a class file.
- See Also:
- Constant Field Values
AutoCompleter
public AutoCompleter(JTextComponent comp)
selectNextPossibleValue
protected void selectNextPossibleValue()
- Selects the next item in the list. It won't change the selection if the
currently selected item is already the last item.
selectPreviousPossibleValue
protected void selectPreviousPossibleValue()
- Selects the previous item in the list. It won't change the selection if the
currently selected item is already the first item.
updateListData
protected abstract boolean updateListData()
acceptedListItem
protected abstract void acceptedListItem(String selected)
Copyright © 2012 KnowledgePlaza. All Rights Reserved.