org.openadaptor.hospital.listeners
Class HATKeyListener

java.lang.Object
  extended by org.openadaptor.hospital.listeners.HATKeyListener
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener

public class HATKeyListener
extends java.lang.Object
implements java.awt.event.KeyListener

class to provide a key stroke listener for the login dialog. This is used when we are using Database authorisation of the user and whatever username and password they type is copied over to the database username and password.

Author:
Russ Fennell

Field Summary
(package private)  javax.swing.JTextField _destPassword
           
(package private)  javax.swing.JTextField _destText
           
(package private)  boolean _isPassword
          flag to indicate that we are dealing with JPasswordField's rather than JTextField's
(package private)  javax.swing.JTextField _sourcePassword
          reference to the source and destination password fields which we are monitoring for keystrokes
(package private)  javax.swing.JTextField _sourceText
          reference to the source and destination text fields which we are monitoring for keystrokes
 
Constructor Summary
HATKeyListener(javax.swing.JPasswordField source, javax.swing.JPasswordField dest)
          constructor.
HATKeyListener(javax.swing.JTextField source, javax.swing.JTextField dest)
          constructor.
 
Method Summary
 void keyPressed(java.awt.event.KeyEvent evt)
           
 void keyReleased(java.awt.event.KeyEvent evt)
           
 void keyTyped(java.awt.event.KeyEvent evt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_sourceText

javax.swing.JTextField _sourceText
reference to the source and destination text fields which we are monitoring for keystrokes


_destText

javax.swing.JTextField _destText

_sourcePassword

javax.swing.JTextField _sourcePassword
reference to the source and destination password fields which we are monitoring for keystrokes


_destPassword

javax.swing.JTextField _destPassword

_isPassword

boolean _isPassword
flag to indicate that we are dealing with JPasswordField's rather than JTextField's

Constructor Detail

HATKeyListener

public HATKeyListener(javax.swing.JTextField source,
                      javax.swing.JTextField dest)
constructor.

Parameters:
source - the source component
dest - the destination component

HATKeyListener

public HATKeyListener(javax.swing.JPasswordField source,
                      javax.swing.JPasswordField dest)
constructor.

Parameters:
source - the source component
dest - the destination component
Method Detail

keyPressed

public void keyPressed(java.awt.event.KeyEvent evt)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent evt)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent evt)
Specified by:
keyTyped in interface java.awt.event.KeyListener