Class AuthenticationDialog

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class AuthenticationDialog extends JDialog implements ActionListener
Dialog box for a user to enter authentication information for HTTP communication, such as NT or Basic authentication.
Author:
James Murty
See Also:
  • Constructor Details

    • AuthenticationDialog

      public AuthenticationDialog(Frame owner, String title, String question, boolean isNtAuthentication)
      Construct modal dialog for display over a Frame.
      Parameters:
      owner - Frame over which this dialog will be displayed and centred.
      title - the dialog's title text
      question - the question/statement to prompt the user for their password, may be html compatible with JHtmlLabel
      isNtAuthentication - if true a domain name is required in addition to the username and password.
    • AuthenticationDialog

      public AuthenticationDialog(Dialog owner, String title, String question, boolean isNtAuthentication)
      Construct modal dialog for display over another Dialog.
      Parameters:
      owner - Dialog over which this dialog will be displayed and centred.
      title - the dialog's title text
      question - the question/statement to prompt the user for their password
      isNtAuthentication - if true a domain name is required in addition to the username and password.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Event handler for this dialog.
      Specified by:
      actionPerformed in interface ActionListener
    • getDomain

      public String getDomain()
      Returns:
      the domain entered by the user, or null if the dialog was cancelled or NT authentication wasn't used.
    • getUser

      public String getUser()
      Returns:
      the user name entered by the user, or null if the dialog was cancelled.
    • getPassword

      public String getPassword()
      Returns:
      the password entered by the user, or null if the dialog was cancelled.