g-Eclipse
Release 1.0.0

eu.geclipse.ui.dialogs
Class PasswordDialog

java.lang.Object
  extended by Dialog
      extended by eu.geclipse.ui.dialogs.PasswordDialog

public class PasswordDialog
extends Dialog

A simple password dialog for soliciting a password string from the user.

This concrete dialog class can be instantiated as is, or further subclassed as required.

NOTE: This is a modified version of org.eclipse.jface.dialogs.InputDialog which was changed to have a password entry text widget.


Constructor Summary
PasswordDialog(Shell parentShell, java.lang.String dialogTitle, java.lang.String dialogMessage, java.lang.String initialValue, IInputValidator validator)
          Creates an input dialog with OK and Cancel buttons.
 
Method Summary
 java.lang.String getValue()
          Returns the string typed into this input dialog.
 void setErrorMessage(java.lang.String errorMessage)
          Sets or clears the error message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordDialog

public PasswordDialog(Shell parentShell,
                      java.lang.String dialogTitle,
                      java.lang.String dialogMessage,
                      java.lang.String initialValue,
                      IInputValidator validator)
Creates an input dialog with OK and Cancel buttons. Note that the dialog will have no visual representation (no widgets) until it is told to open.

Note that the open method blocks for input dialogs.

Parameters:
parentShell - the parent shell, or null to create a top-level shell
dialogTitle - the dialog title, or null if none
dialogMessage - the dialog message, or null if none
initialValue - the initial input value, or null if none (equivalent to the empty string)
validator - an input validator, or null if none
Method Detail

getValue

public java.lang.String getValue()
Returns the string typed into this input dialog.

Returns:
the input string

setErrorMessage

public void setErrorMessage(java.lang.String errorMessage)
Sets or clears the error message. If not null, the OK button is disabled.

Parameters:
errorMessage - the error message, or null to clear
Since:
3.0

g-Eclipse
Release 1.0.0