borland Packages  Class Hierarchy  dbswing Package 

DBPasswordDialog component

java.lang.Object
   +----java.awt.Component
           +----java.awt.Container
                   +----java.awt.Window
                           +----java.awt.Dialog
                                   +----javax.swing.JDialog
                                           +----com.borland.dbswing.DBPasswordDialog

About the DBPasswordDialog component

Variables  Constructors  Properties  Methods  Event Listeners

Implements ActionListener, FocusListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

Note: This is a feature of JBuilder Professional and Enterprise.

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.


DBPasswordDialog variables

Variables implemented in java.awt.Component

Variables implemented in javax.swing.JDialog

DBPasswordDialog constructors

DBPasswordDialog properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.awt.Component

Properties implemented in java.awt.Container

Properties implemented in java.awt.Dialog

Properties implemented in java.awt.Window

Properties implemented in java.lang.Object

Properties implemented in javax.swing.JDialog

DBPasswordDialog methods

Methods implemented in this class

Methods implemented in java.awt.Component

Methods implemented in java.awt.Container

Methods implemented in java.awt.Dialog

Methods implemented in java.awt.Window

Methods implemented in java.lang.Object

Methods implemented in javax.swing.JDialog

DBPasswordDialog event listeners


DBPasswordDialog constructors

DBPasswordDialog()

  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.

DBPasswordDialog(java.awt.Dialog, java.lang.String)

  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.

Parameters:

dialog
The parent Dialog.
title
The text string that is displayed on the dialog box title bar.

DBPasswordDialog(java.awt.Frame, java.lang.String)

  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.

Parameters:

frame
Reserved for future use.
title
The text string that is displayed on the dialog box title bar.

DBPasswordDialog(java.lang.String)

  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.

Parameters:

title
The text string that is displayed on the dialog box title bar.

DBPasswordDialog(java.lang.String, java.awt.Frame)

  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.

DBPasswordDialog properties

autoDispose

 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.

cancelButton

 public JButton getCancelButton()
Returns the Cancel button used by the dialog box.

See also: okButton()

okButton

 public JButton getOkButton()
Returns the OK button used by the dialog box.

See also: cancelButton()

OKPressed

 public boolean isOKPressed()
Returns true if the user pressed the OK button to close the dialog box.

password

 public String getPassword()
 public void setPassword(String password)
Returns and sets the password.

passwordRequired

 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.

userName

 public String getUserName()
 public void setUserName(String userName)
Returns and sets the user name.

userNameRequired

 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.

DBPasswordDialog event listeners

This component is a source for the following event sets.

component

 public synchronized void addComponentListener(java.awt.event.ComponentListener )
 public synchronized void removeComponentListener(java.awt.event.ComponentListener )

container

 public synchronized void addContainerListener(java.awt.event.ContainerListener )
 public synchronized void removeContainerListener(java.awt.event.ContainerListener )

focus

 public synchronized void addFocusListener(java.awt.event.FocusListener )
 public synchronized void removeFocusListener(java.awt.event.FocusListener )

inputMethod

 public synchronized void addInputMethodListener(java.awt.event.InputMethodListener )
 public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )

key

 public synchronized void addKeyListener(java.awt.event.KeyListener )
 public synchronized void removeKeyListener(java.awt.event.KeyListener )

mouse

 public synchronized void addMouseListener(java.awt.event.MouseListener )
 public synchronized void removeMouseListener(java.awt.event.MouseListener )

mouseMotion

 public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
 public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )

propertyChange

 public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
 public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )

window

 public synchronized void addWindowListener(java.awt.event.WindowListener )
 public synchronized void removeWindowListener(java.awt.event.WindowListener )