arlut.csd.ganymede.client
Class JInvidChooserFieldEditor
java.lang.Object
|
+--java.awt.event.KeyAdapter
|
+--arlut.csd.ganymede.client.JInvidChooserFieldEditor
- All Implemented Interfaces:
- java.awt.event.ActionListener, javax.swing.ComboBoxEditor, java.util.EventListener, java.awt.event.KeyListener
- class JInvidChooserFieldEditor
- extends java.awt.event.KeyAdapter
- implements javax.swing.ComboBoxEditor, java.awt.event.ActionListener
A combobox editor class to provide intelligent keyboard handling for
the JInvidChooser scalar
invid field gui component.
| Methods inherited from class java.awt.event.KeyAdapter |
keyPressed, keyTyped |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
debug
static final boolean debug
theField
javax.swing.JTextField theField
curItem
java.lang.Object curItem
box
javax.swing.JComboBox box
chooser
JInvidChooser chooser
actionListeners
java.util.Vector actionListeners
lastGoodString
java.lang.String lastGoodString
lastGoodMatched
boolean lastGoodMatched
lastGoodIndex
int lastGoodIndex
JInvidChooserFieldEditor
public JInvidChooserFieldEditor(JInvidChooser chooser)
setItem
public void setItem(java.lang.Object anObject)
- Specified by:
setItem in interface javax.swing.ComboBoxEditor
getEditorComponent
public java.awt.Component getEditorComponent()
- Specified by:
getEditorComponent in interface javax.swing.ComboBoxEditor
getItem
public java.lang.Object getItem()
- Specified by:
getItem in interface javax.swing.ComboBoxEditor
selectAll
public void selectAll()
- Specified by:
selectAll in interface javax.swing.ComboBoxEditor
addActionListener
public void addActionListener(java.awt.event.ActionListener l)
- Specified by:
addActionListener in interface javax.swing.ComboBoxEditor
removeActionListener
public void removeActionListener(java.awt.event.ActionListener l)
- Specified by:
removeActionListener in interface javax.swing.ComboBoxEditor
keyReleased
public void keyReleased(java.awt.event.KeyEvent ke)
Tap into the text field's key release to see if
we can complete the user's selection. Note that
we are doing this without synchronizing on the text
field's own user interface.. to do this properly, we might
ought to be doing this with a document model on the text
field, but this works ok. Since we're keying on key release,
we can expect to be called after the text field has processed
the key press.
- Overrides:
keyReleased in class java.awt.event.KeyAdapter
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Handle the user hitting return in the editable area.. if they hit return
without a reasonable value, revert the combo.
- Specified by:
actionPerformed in interface java.awt.event.ActionListener