javax.swing
Class JComboBox.DefaultKeySelectionManager
java.lang.Object
javax.swing.JComboBox.DefaultKeySelectionManager
- All Implemented Interfaces:
- JComboBox.KeySelectionManager, Serializable
- Enclosing class:
- JComboBox
- class JComboBox.DefaultKeySelectionManager
- extends Object
- implements JComboBox.KeySelectionManager, Serializable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JComboBox.DefaultKeySelectionManager
JComboBox.DefaultKeySelectionManager()
selectionForKey
public int selectionForKey(char aKey,
ComboBoxModel aModel)
- Description copied from interface:
JComboBox.KeySelectionManager
- Given
aKey
and the model, returns the row
that should become selected. Return -1 if no match was
found.
- Specified by:
selectionForKey
in interface JComboBox.KeySelectionManager
- Parameters:
aKey
- a char value, usually indicating a keyboard key that
was pressedaModel
- a ComboBoxModel -- the component's data model, containing
the list of selectable items
- Returns:
- an int equal to the selected row, where 0 is the
first item and -1 is none.