Class PasswordDialog

java.lang.Object
docking.DialogComponentProvider
docking.widgets.PasswordDialog
All Implemented Interfaces:
ActionContextProvider, StatusListener, TaskListener

public class PasswordDialog extends DialogComponentProvider
PasswordDialog is a modal dialog which prompts a user for a password.
  • Constructor Details

    • PasswordDialog

      public PasswordDialog(String title, String serverType, String serverName, String passPrompt, String namePrompt, String defaultUserID, String choicePrompt, String[] choices, int defaultChoice, boolean includeAnonymousOption)
      Construct a new PasswordDialog.
      Parameters:
      title - title of the dialog
      serverType - 'Server' or 'Key-store' designation
      serverName - name of server or keystore pathname
      passPrompt - password prompt to show in the dialog; may be null, in which case "Password:" is displayed next to the password field
      namePrompt - name prompt to show in the dialog, if null a name will not be prompted for.
      defaultUserID - default name when prompting for a name
      choicePrompt - namePrompt name prompt to show in the dialog, if null a name will not be prompted for.
      choices - array of choices to present if choicePrompt is not null
      defaultChoice - default choice index
      includeAnonymousOption - true signals to add a checkbox to request anonymous login
    • PasswordDialog

      public PasswordDialog(String title, String serverType, String serverName, String passPrompt, String namePrompt, String defaultUserID)
      Construct a new PasswordDialog.
      Parameters:
      title - title of the dialog
      serverType - 'Server' or 'Key-store' designation
      serverName - name of server or keystore pathname
      passPrompt - password prompt to show in the dialog; may be null, in which case "Password:" is displayed next to the password field
      namePrompt - name prompt to show in the dialog, if null a name will not be prompted for.
      defaultUserID - default name when prompting for a name
    • PasswordDialog

      public PasswordDialog(String title, String serverType, String serverName, String passPrompt, String namePrompt, String defaultUserID, boolean hasMessages)
      Construct a new PasswordDialog.
      Parameters:
      title - title of the dialog
      serverType - 'Server' or 'Key-store' designation
      serverName - name of server or keystore pathname
      passPrompt - password prompt to show in the dialog; may be null, in which case "Password:" is displayed next to the password field
      namePrompt - name prompt to show in the dialog, if null a name will not be prompted for.
      defaultUserID - default name when prompting for a name
      hasMessages - true if the client will set messages on this dialog. If true, the dialog's minimum size will be increased
  • Method Details

    • setErrorText

      public void setErrorText(String text)
      Display error status
      Parameters:
      text - the text
    • getPassword

      public char[] getPassword()
      Return the password entered in the password field.
      Returns:
      the password chars
    • anonymousAccessRequested

      public boolean anonymousAccessRequested()
      Returns true if anonymous access is requested
      Returns:
      true if anonymous access requested
    • getUserID

      public String getUserID()
      Return the user ID entered in the password field
      Returns:
      the user ID entered in the password field
    • getChoice

      public int getChoice()
      Returns index of selected choice or -1 if no choice has been made
      Returns:
      index of selected choice or -1 if no choice has been made
    • okWasPressed

      public boolean okWasPressed()
      Returns true if the OK button was pressed.
      Returns:
      true if the OK button was pressed.
    • okCallback

      protected void okCallback()
      Description copied from class: DialogComponentProvider
      The callback method for when the "OK" button is pressed.
      Overrides:
      okCallback in class DialogComponentProvider
    • close

      public void close()
      Overrides:
      close in class DialogComponentProvider
    • dispose

      public void dispose()
      Description copied from class: DialogComponentProvider
      Disposes this dialog. Only call this when the dialog is no longer used. Calling this method will close the dialog if it is open.
      Overrides:
      dispose in class DialogComponentProvider