com.ibm.db
Class LogonDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--com.ibm.db.LogonDialog

public class LogonDialog
extends java.awt.Dialog
implements java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.WindowListener

LogonDialog represents a dialog to obtain the userID and password prior to making a connection to the database.

See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
LogonDialog(java.awt.Component c)
          Constructs a new LogonDialog.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Handles actionPerformed events.
static java.awt.Frame getFrameForComponent(java.awt.Component parentComponent)
          Returns the specified component's Frame.
 java.awt.Insets getInsets()
          Returns the insets for the dialog.
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 boolean promptAndSetUID(com.ibm.db.base.DatabaseConnectionSpec c)
          Displays a logon dialog to obtain the userid and password.
 boolean promptAndSetUID(java.lang.String[] uid, java.lang.String[] pwd)
          Displays a logon dialog to obtain the userid and password.
 void windowActivated(java.awt.event.WindowEvent e)
          Method to handle events for the WindowListener interface.
 void windowClosed(java.awt.event.WindowEvent e)
          Method to handle events for the WindowListener interface.
 void windowClosing(java.awt.event.WindowEvent e)
          Method to handle events for the WindowListener interface.
 void windowDeactivated(java.awt.event.WindowEvent e)
          Method to handle events for the WindowListener interface.
 void windowDeiconified(java.awt.event.WindowEvent e)
          Method to handle events for the WindowListener interface.
 void windowIconified(java.awt.event.WindowEvent e)
          Method to handle events for the WindowListener interface.
 void windowOpened(java.awt.event.WindowEvent e)
          Method to handle events for the WindowListener interface.
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, isModal, isResizable, setModal, setResizable, setTitle, show
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, removeWindowListener, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogonDialog

public LogonDialog(java.awt.Component c)
Constructs a new LogonDialog.
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Handles actionPerformed events.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - ActionPerformed event

getFrameForComponent

public static java.awt.Frame getFrameForComponent(java.awt.Component parentComponent)
Returns the specified component's Frame.
Parameters:
parentComponent - the Component to check for a Frame
Returns:
the Frame that contains the component, or the default frame if the component is null, or does not have a valid Frame parent

getInsets

public java.awt.Insets getInsets()
Returns the insets for the dialog.
Overrides:
getInsets in class java.awt.Container

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

promptAndSetUID

public boolean promptAndSetUID(java.lang.String[] uid,
                               java.lang.String[] pwd)
Displays a logon dialog to obtain the userid and password. The passed userid and password are used to initialize the dialog.
Parameters:
uid - the userid
pwd - password

promptAndSetUID

public boolean promptAndSetUID(com.ibm.db.base.DatabaseConnectionSpec c)
                        throws DataException
Displays a logon dialog to obtain the userid and password. The userid and password from the specified DatabaseConnectionSpec are used to initialize the dialog. If a connection has already been established for the connection alias name specified in the DatabaseConnectionSpec, no dialog is displayed since the connection is already established.
Parameters:
c - the DatabaseConnectionSpec
Throws:
DataException - driverNotFound - if JDBC driver not found

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Method to handle events for the WindowListener interface.
Specified by:
windowActivated in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Method to handle events for the WindowListener interface.
Specified by:
windowClosed in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Method to handle events for the WindowListener interface.
Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Method to handle events for the WindowListener interface.
Specified by:
windowDeactivated in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Method to handle events for the WindowListener interface.
Specified by:
windowDeiconified in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Method to handle events for the WindowListener interface.
Specified by:
windowIconified in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Method to handle events for the WindowListener interface.
Specified by:
windowOpened in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent