org.openstreetmap.josm.gui.io
Class CredentialDialog.TFKeyListener
java.lang.Object
org.openstreetmap.josm.gui.io.CredentialDialog.TFKeyListener
- All Implemented Interfaces:
- java.awt.event.KeyListener, java.util.EventListener
- Enclosing class:
- CredentialDialog
private static class CredentialDialog.TFKeyListener
- extends java.lang.Object
- implements java.awt.event.KeyListener
Listener for username and password text fields key events.
When user presses Enter:
If current text field is empty (or just contains a sequence of spaces), nothing happens (or all spaces become selected).
If current text field is not empty, but the next one is (or just contains a sequence of spaces), focuses the next text field.
If both text fields contain characters, submits the form by calling owner's CredentialDialog.OKAction
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
owner
protected CredentialDialog owner
currentTF
protected javax.swing.JTextField currentTF
nextTF
protected javax.swing.JTextField nextTF
CredentialDialog.TFKeyListener
public CredentialDialog.TFKeyListener(CredentialDialog owner,
javax.swing.JTextField currentTF,
javax.swing.JTextField nextTF)
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
- Specified by:
keyPressed
in interface java.awt.event.KeyListener
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
- Specified by:
keyReleased
in interface java.awt.event.KeyListener
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
- Specified by:
keyTyped
in interface java.awt.event.KeyListener
JOSM