borland Packages Class Hierarchy dbswing Package
java.lang.Object +----java.awt.Component +----java.awt.Container +----java.awt.Window +----java.awt.Dialog +----javax.swing.JDialog +----com.borland.dbswing.DBPasswordDialog
Variables Constructors Properties Methods Event Listeners
Implements ActionListener, FocusListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants
DBPasswordDialog
is a simple dialog box that prompts a user for a user name and password. DBPasswordDialog
is used by DBPasswordPrompter
as its dialog box. Useful features of DBPasswordDialog
include:
DBPasswordDialog
automatically disposes itself if the user closes the window or presses either the OK or Cancel button. Call the isOKPressed()
method to determine whether or not the user pressed the OK button to close the dialog.
Set the autoDispose
property to false
to prevent DBPasswordDialog
from automatically disposing itself. By default, no actions are attached to the OK or Cancel button. To attach an action to a button, add an ActionListener
directly to either the OK or Cancel button via the getOkButton()
and getCancelButton()
methods. Remember to call the dispose()
method to free DBPasswordDialog's
resources if you disable autoDispose
.
public DBPasswordDialog()Creates a modal
DBPasswordDialog
with no title. Calls the constructor of its superclass which takes a Frame
, a String
, and a boolean
as parameters. Passes default values of a null
cast to a Frame
, a null
String, and true
to the superclass constructor.
public DBPasswordDialog(Dialog dialog, String title)Creates a modal
DBPasswordDialog
using the a specified dialog and title. Calls the constructor of its superclass which takes a Dialog
, a String
, and a boolean
as parameters. Passes the specified Dialog
and String
, along with a default boolean
value of true
to the superclass constructor.
dialog
Dialog
.
title
public DBPasswordDialog(Frame frame, String title)Creates a modal
DBPasswordDialog
with the specified title. The frame
parameter is not currently used, but is reserved for future use. Calls the constructor of its superclass which takes a Frame
, a String
, and a boolean
, and passes a null
cast to a Frame
, the specified String
, and true
.
frame
title
public DBPasswordDialog(String title)Creates a modal
DBPasswordDialog
with a title. Calls the constructor of this
class that takes a Frame
and a String
as parameters. Passes a null
cast to a Frame
, and the specified String
, to the other constructor.
title
public DBPasswordDialog(String title, Frame frame)Creates a modal DBPasswordDialog with a specified frame, a string that appears as the title of the dialog box.
public boolean isAutoDispose() public void setAutoDispose(boolean autoDispose)Returns and sets whether the dialog box should automatically dispose itself when the user closes the window or presses the OK or Cancel button.
public JButton getCancelButton()Returns the Cancel button used by the dialog box.
okButton()
public JButton getOkButton()Returns the OK button used by the dialog box.
cancelButton()
public boolean isOKPressed()Returns
true
if the user pressed the OK button to close the dialog box.
public String getPassword() public void setPassword(String password)Returns and sets the password.
public boolean isPasswordRequired() public void setPasswordRequired(boolean passwordRequired)Returns and sets whether or not a password must be entered to close the dialog with the OK button.
public String getUserName() public void setUserName(String userName)Returns and sets the user name.
public boolean isUserNameRequired() public void setUserNameRequired(boolean userNameRequired)Returns and sets whether or not a user name must be entered to close the dialog with the OK button.
public synchronized void addComponentListener(java.awt.event.ComponentListener ) public synchronized void removeComponentListener(java.awt.event.ComponentListener )
public synchronized void addContainerListener(java.awt.event.ContainerListener ) public synchronized void removeContainerListener(java.awt.event.ContainerListener )
public synchronized void addFocusListener(java.awt.event.FocusListener ) public synchronized void removeFocusListener(java.awt.event.FocusListener )
public synchronized void addInputMethodListener(java.awt.event.InputMethodListener ) public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )
public synchronized void addKeyListener(java.awt.event.KeyListener ) public synchronized void removeKeyListener(java.awt.event.KeyListener )
public synchronized void addMouseListener(java.awt.event.MouseListener ) public synchronized void removeMouseListener(java.awt.event.MouseListener )
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener ) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )
public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener ) public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )
public synchronized void addWindowListener(java.awt.event.WindowListener ) public synchronized void removeWindowListener(java.awt.event.WindowListener )