|
|
|
@ -23,17 +23,11 @@ public class ParameterArrayPane extends JListControlPane {
|
|
|
|
|
*/ |
|
|
|
|
public ParameterArrayPane() { |
|
|
|
|
super(); |
|
|
|
|
this.addModNameActionListener(new ModNameActionListener() { |
|
|
|
|
public void nameModed(int index, String oldName, String newName) { |
|
|
|
|
populateSelectedValue(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
this.addModNameActionListener((index, oldName, newName) -> populateSelectedValue()); |
|
|
|
|
this.addEditingListener(new PropertyChangeAdapter() { |
|
|
|
|
public void propertyChange() { |
|
|
|
|
Parameter[] parameters = ParameterConfig.getInstance().getGlobalParameters(); |
|
|
|
|
String[] allListNames = nameableList.getAllNames(); |
|
|
|
|
allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY; |
|
|
|
|
allListNames[editingIndex] = StringUtils.EMPTY; |
|
|
|
|
String tempName = getEditingName(); |
|
|
|
|
if (StringUtils.isEmpty(tempName)) { |
|
|
|
|
nameableList.stopEditing(); |
|
|
|
@ -42,7 +36,7 @@ public class ParameterArrayPane extends JListControlPane {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!ComparatorUtils.equals(tempName, selectedName) |
|
|
|
|
&& isNameRepeated(new List[]{Arrays.asList(parameters), Arrays.asList(allListNames)}, tempName)) { |
|
|
|
|
&& isNameRepeated(new List[]{Arrays.asList(allListNames)}, tempName)) { |
|
|
|
|
nameableList.stopEditing(); |
|
|
|
|
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ParameterArrayPane.this), |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Duplicate_Parameter_Name")); |
|
|
|
|