Package org.openstreetmap.josm.gui.io
Class CredentialDialog.TFKeyListener
- java.lang.Object
-
- java.awt.event.KeyAdapter
-
- 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.awt.event.KeyAdapter
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'sCredentialDialog.OKAction
.
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JTextField
currentTF
protected javax.swing.JTextField
nextTF
protected CredentialDialog
owner
-
Constructor Summary
Constructors Constructor Description TFKeyListener(CredentialDialog owner, javax.swing.JTextField currentTF, javax.swing.JTextField nextTF)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
keyPressed(java.awt.event.KeyEvent e)
-
-
-
Field Detail
-
owner
protected CredentialDialog owner
-
currentTF
protected javax.swing.JTextField currentTF
-
nextTF
protected javax.swing.JTextField nextTF
-
-
Constructor Detail
-
TFKeyListener
TFKeyListener(CredentialDialog owner, javax.swing.JTextField currentTF, javax.swing.JTextField nextTF)
-
-
Method Detail
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
- Overrides:
keyPressed
in classjava.awt.event.KeyAdapter
-
-