import org.eclipse.swt.widgets.Text;
/**
- * A dialog for prompting for a username and fPassword
+ * A dialog for prompting for a category and fPassword
*/
public class UserValidationDialog extends Dialog {
// widgets
protected Image keyLockImage;
- // whether or not the username can be changed
+ // whether or not the category can be changed
protected boolean isUsernameMutable = true;
protected boolean showAllowCachingButton = true;
protected String message = null;
/**
- * Creates a new UserValidationDialog.
+ * Creates a new CategoryDialog.
*
* @param parentShell
* the parent shell
*/
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
- newShell.setText(Messages.getString("UserValidationDialog.required")); //$NON-NLS-1$
+ newShell.setText(Messages.getString("CategoryDialog.required")); //$NON-NLS-1$
// set F1 help
// WorkbenchHelp.setHelp(newShell, IHelpContextIds.USER_VALIDATION_DIALOG);
}
usernameField.setText(defaultUsername);
if (isUsernameMutable) {
- // give focus to username field
+ // give focus to category field
usernameField.selectAll();
usernameField.setFocus();
} else {
}
if (domain != null) {
Label d = new Label(main, SWT.WRAP);
- d.setText(Messages.getString("UserValidationDialog.5")); //$NON-NLS-1$
+ d.setText(Messages.getString("CategoryDialog.5")); //$NON-NLS-1$
data = new GridData();
d.setLayoutData(data);
Label label = new Label(main, SWT.WRAP);
if (isUsernameMutable) {
- label.setText(Messages.bind("UserValidationDialog.labelUser", domain)); //$NON-NLS-1$
+ label.setText(Messages.bind("CategoryDialog.labelUser", domain)); //$NON-NLS-1$
} else {
- label.setText(Messages.bind("UserValidationDialog.labelPassword", new Object[] { defaultUsername, domain })); //$NON-NLS-1$
+ label.setText(Messages.bind("CategoryDialog.labelPassword", new Object[] { defaultUsername, domain })); //$NON-NLS-1$
}
data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
data.horizontalSpan = 2;
if (domain != null && showAllowCachingButton) {
allowCachingButton = new Button(main, SWT.CHECK);
- allowCachingButton.setText(Messages.getString("UserValidationDialog.6")); //$NON-NLS-1$
+ allowCachingButton.setText(Messages.getString("CategoryDialog.6")); //$NON-NLS-1$
data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
data.horizontalSpan = 3;
allowCachingButton.setLayoutData(data);
warningLabel.setImage(getImage(DLG_IMG_MESSAGE_WARNING));
warningLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(Messages.getString("UserValidationDialog.7")); //$NON-NLS-1$
+ warningText.setText(Messages.getString("CategoryDialog.7")); //$NON-NLS-1$
data = new GridData(GridData.FILL_HORIZONTAL);
data.widthHint = 300;
warningText.setLayoutData(data);
* the parent of the widgets
*/
protected void createPasswordFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(Messages.getString("UserValidationDialog.password")); //$NON-NLS-1$
+ new Label(parent, SWT.NONE).setText(Messages.getString("CategoryDialog.password")); //$NON-NLS-1$
passwordField = new Text(parent, SWT.BORDER | SWT.PASSWORD);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
* the parent of the widgets
*/
protected void createUsernameFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(Messages.getString("UserValidationDialog.fUser")); //$NON-NLS-1$
+ new Label(parent, SWT.NONE).setText(Messages.getString("CategoryDialog.user")); //$NON-NLS-1$
usernameField = new Text(parent, SWT.BORDER);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
}
/**
- * Returns the username entered by the fUser, or null if the fUser canceled.
+ * Returns the category entered by the fUser, or null if the fUser canceled.
*
- * @return the entered username
+ * @return the entered category
*/
public String getUsername() {
return username;
}
/**
- * Sets whether or not the username field should be mutable. This method must be called before create(), otherwise it will be
+ * Sets whether or not the category field should be mutable. This method must be called before create(), otherwise it will be
* ignored.
*
* @param value
- * whether the username is mutable
+ * whether the category is mutable
*/
public void setUsernameMutable(boolean value) {
isUsernameMutable = value;