org.openstreetmap.josm.gui.io
Class CredentialDialog.TFKeyListener

java.lang.Object
  extended by 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.


Field Summary
protected  javax.swing.JTextField currentTF
           
protected  javax.swing.JTextField nextTF
           
protected  CredentialDialog owner
           
 
Constructor Summary
CredentialDialog.TFKeyListener(CredentialDialog owner, javax.swing.JTextField currentTF, javax.swing.JTextField nextTF)
           
 
Method Summary
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

protected CredentialDialog owner

currentTF

protected javax.swing.JTextField currentTF

nextTF

protected javax.swing.JTextField nextTF
Constructor Detail

CredentialDialog.TFKeyListener

public CredentialDialog.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 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