org.tbee.swing
Class AutoCompleter
java.lang.Object
org.tbee.swing.AutoCompleter
- Direct Known Subclasses:
- AutoCompleter.FileAutoCompleter, AutoCompleter.ListAutoCompleter
public abstract class AutoCompleter
- extends java.lang.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 $
|
Field Summary |
static java.lang.String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
|
Constructor Summary |
AutoCompleter(javax.swing.text.JTextComponent comp)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOURCECODE_VERSION
public static final java.lang.String SOURCECODE_VERSION
- Standard variable for determining version of a class file.
- See Also:
- Constant Field Values
AutoCompleter
public AutoCompleter(javax.swing.text.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(java.lang.String selected)
Copyright © 2010. All Rights Reserved.