|
|
|
@ -67,10 +67,12 @@ public class CellStyleListEditPane extends JListControlPane {
|
|
|
|
|
allNames[index] = StringUtils.EMPTY; |
|
|
|
|
if (StringUtils.isEmpty(newName)) { |
|
|
|
|
showTipDialogAndReset(i18nText("Fine-Design_Basic_Predefined_Style_Empty_Name"), index); |
|
|
|
|
nameableList.setNameAt(oldName, index); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (isNameRepeated(new List[]{Arrays.asList(allNames)}, newName)) { |
|
|
|
|
showTipDialogAndReset(i18nText("Fine-Design_Basic_Predefined_Style_Duplicate_Name", newName), index); |
|
|
|
|
nameableList.setNameAt(oldName, index); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
populateSelectedValue(); |
|
|
|
@ -249,6 +251,7 @@ public class CellStyleListEditPane extends JListControlPane {
|
|
|
|
|
super(i18nText("Fine-Design_Predefined_Cell_New_Style"), ThemedCellStyle.class, updatePane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Nameable createNameable(UnrepeatedNameHelper helper) { |
|
|
|
|
ThemedCellStyle cellStyle = new ThemedCellStyle(); |
|
|
|
|
cellStyle.setName(menuName); |
|
|
|
@ -260,6 +263,7 @@ public class CellStyleListEditPane extends JListControlPane {
|
|
|
|
|
return new NameObject(helper.createUnrepeatedName(this.menuName()), cellStyle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Object acceptObject2Populate(Object ob) { |
|
|
|
|
if (ob instanceof NameObject) { |
|
|
|
|
ob = ((NameObject) ob).getObject(); |
|
|
|
|