org.springframework.richclient.list
Class EditableComboBoxAutoCompletion
java.lang.Object
java.awt.event.KeyAdapter
org.springframework.richclient.list.EditableComboBoxAutoCompletion
- All Implemented Interfaces:
- KeyListener, EventListener
public class EditableComboBoxAutoCompletion
- extends KeyAdapter
Provides auto-completion for an editable combobox. Based on public domain postings.
Original author unknown. Also copied some code from ComboBoxAutoCompletion
to deal with focus loss.
- Author:
- Larry Streepy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EditableComboBoxAutoCompletion
public EditableComboBoxAutoCompletion(JComboBox comboBox)
- Adds autocompletion support to the given
combobox
.
- Parameters:
comboBox
- the combobox to augment
keyReleased
public void keyReleased(KeyEvent e)
- Handle a key release event. See if what they've type so far matches anything in the
selectable items list. If so, then show the popup and select the item. If not, then
hide the popup.
- Specified by:
keyReleased
in interface KeyListener
- Overrides:
keyReleased
in class KeyAdapter
- Parameters:
e
- key event
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.