Class CredentialDialog.TFKeyListener

  • All Implemented Interfaces:
    KeyListener, EventListener
    Enclosing class:
    CredentialDialog

    private static class CredentialDialog.TFKeyListener
    extends 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's CredentialDialog.OKAction.