|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.swing.ComboBoxMultipleKeySelectionManager
public class ComboBoxMultipleKeySelectionManager
Combobox key selection manager which selects items using multiple characters.
Based upon an example in the Java Developer's Almanac 1.4 by Patrick Chan.
Field Summary | |
---|---|
protected long |
lastKeyTime
Time at which last key was typed. |
protected long |
maximumKeyArrivalInterval
Number of milliseconds under which a new keystroke is assumed to be appended to the previous to form a search string. |
protected java.lang.String |
pattern
Accumulates key strokes that are typed less then "keyInterval" milliseconds apart. |
Constructor Summary | |
---|---|
ComboBoxMultipleKeySelectionManager()
|
Method Summary | |
---|---|
int |
selectionForKey(char aKey,
javax.swing.ComboBoxModel model)
Handle selection when a key arrives. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long lastKeyTime
protected java.lang.String pattern
protected long maximumKeyArrivalInterval
Constructor Detail |
---|
public ComboBoxMultipleKeySelectionManager()
Method Detail |
---|
public int selectionForKey(char aKey, javax.swing.ComboBoxModel model)
selectionForKey
in interface javax.swing.JComboBox.KeySelectionManager
aKey
- The typed key.model
- The ComboBoxModel.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |