prefixString, this.parent.getFONT(), this);
final JTextFieldResizing namespaceTF = new JTextFieldResizing(
namespaceString, this.parent.getFONT(), this);
prefixTF.addFocusListener(new FocusAdapter() {
private String oldValue = prefixString;
public void focusLost(final FocusEvent fe) {
final String newPrefix = prefixTF.getText();
if (!namespaceTF.getText().equals("")
&& !newPrefix.equals(this.oldValue)) {
final int choice = showPrefixNameChangedOptionDialog();
if (choice == JOptionPane.YES_OPTION) { // change prefix
// name and notify
// operators...
prefix.changeEntryName(this.oldValue, newPrefix, true);
this.oldValue = newPrefix;
} else if (choice == JOptionPane.NO_OPTION) { // change
// prefix
// name but
// don't
// notify
// operators
// ...
prefix.changeEntryName(this.oldValue, newPrefix, false);
this.oldValue = newPrefix;
} else if (choice == JOptionPane.CANCEL_OPTION) { // don't
// change
// prefix
// name
// ...
prefixTF.setText(this.oldValue);
prefixTF.grabFocus();
}
}
}
});
namespaceTF.addFocusListener(new FocusAdapter() {
private String oldValue = namespaceString;
public void focusLost(final FocusEvent fe) {
String newNamespace = namespaceTF.getText();