this.setLayout(new AbsoluteLayout());
this.setSize(430, 415);
this.setResizable(false);
LabelField lblfldName = new LabelField(textMessages.title_());
add(lblfldName, new AbsoluteData(7, 6));
nameTextBox = new TextField<String>();
nameTextBox.setReadOnly(isPasswordReadOnly);
add(nameTextBox, new AbsoluteData(82, 6));
nameTextBox.setSize("331px", "22px");
LabelField lblfldUsername = new LabelField(textMessages.username_());
add(lblfldUsername, new AbsoluteData(7, 34));
usernameTextBox = new TextField<String>();
usernameTextBox.setReadOnly(isPasswordReadOnly);
add(usernameTextBox, new AbsoluteData(82, 34));
usernameTextBox.setSize("331px", "22px");
LabelField lblfldPassword = new LabelField(textMessages.password_());
add(lblfldPassword, new AbsoluteData(7, 62));
passwordTextBox = new TextField<String>();
passwordTextBox.setReadOnly(isPasswordReadOnly);
add(passwordTextBox, new AbsoluteData(82, 62));
passwordTextBox.setSize("331px", "22px");
Button generateButton = new Button(textMessages.generatePassword(), new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
doGeneratePassword();
}
});
generateButton.setEnabled(!isPasswordReadOnly);
add(generateButton, new AbsoluteData(82, 90));
generateButton.setSize("127px", "22px");
Button currentButton = new Button(textMessages.currentPassword(), new SelectionListener<ButtonEvent>()
{
@Override
public void componentSelected(ButtonEvent ce)
{
doGetCurrentPassword();
}
});
add(currentButton, new AbsoluteData(215, 90));
currentButton.setSize("127px", "22px");
currentButton.setEnabled(password.getId() > 0);
Button historyButton = new Button(textMessages.viewPasswordHistory(), new SelectionListener<ButtonEvent>()
{
@Override
public void componentSelected(ButtonEvent ce)
{
doViewPasswordHistory();
}
});
add(historyButton, new AbsoluteData(215, 311));
historyButton.setSize("127px", "22px");
historyButton.setEnabled(password.getId() > 0);
LabelField lblfldTags = new LabelField(textMessages.tags_());
add(lblfldTags, new AbsoluteData(6, 118));
tagsComboBox = new TextHelperComboBox<TagData>();
tagsComboBox.setReadOnly(isPasswordReadOnly);
add(tagsComboBox, new AbsoluteData(82, 118));
tagsComboBox.setSize("331px", "22px");
tagsComboBox.setEditable(true);
tagsComboBox.setForceSelection(false);
tagsComboBox.setHideTrigger(true);
tagStore = new ListStore<TagData>();
tagsComboBox.setStore(tagStore);
tagsComboBox.setDisplayField(Constants.NAME);
LabelField lblfldNotes = new LabelField(textMessages.notes_());
add(lblfldNotes, new AbsoluteData(6, 146));
notesTextArea = new TextArea();
notesTextArea.setReadOnly(isPasswordReadOnly);
add(notesTextArea, new AbsoluteData(82, 146));
notesTextArea.setSize("331px", "75px");
LabelField lblfldMaxHistory = new LabelField(textMessages.maxHistory_());
add(lblfldMaxHistory, new AbsoluteData(6, 227));
maxHistoryTextBox = new NumberField();
maxHistoryTextBox.setReadOnly(isPasswordReadOnly);
maxHistoryTextBox.setPropertyEditorType(Integer.class);
add(maxHistoryTextBox, new AbsoluteData(82, 227));
maxHistoryTextBox.setSize("76px", "22px");
LabelField lblfldInfinite = new LabelField(textMessages.infinite());
add(lblfldInfinite, new AbsoluteData(164, 227));
activeCheckBox = new CheckBox();
activeCheckBox.setReadOnly(isPasswordReadOnly);
activeCheckBox.setBoxLabel(textMessages.active());
add(activeCheckBox, new AbsoluteData(82, 255));
Button editPermissionsButton = new Button(isPasswordGrantable ?
textMessages.editPermissions() : textMessages.viewPermissions(),
new SelectionListener<ButtonEvent>()
{
@Override
public void componentSelected(ButtonEvent ce) {
doEditPermissions();
}
});
add(editPermissionsButton, new AbsoluteData(82, 283));
editPermissionsButton.setSize("260px", "22px");
Button accessAuditButton = new Button(textMessages.viewAccessAuditLog(),
new SelectionListener<ButtonEvent>()
{
@Override
public void componentSelected(ButtonEvent ce)
{
doViewAccessAuditLog();
}
});
add(accessAuditButton, new AbsoluteData(82, 311));
accessAuditButton.setSize("127px", "22px");
accessAuditButton.setEnabled(password.getId() > 0);
Button saveButton = new Button(textMessages.save(), new SelectionListener<ButtonEvent>() {
@Override