diff --git a/designer-base/src/main/java/com/fr/design/constants/TableDataConstants.java b/designer-base/src/main/java/com/fr/design/constants/TableDataConstants.java new file mode 100644 index 0000000000..7d8c66c093 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/constants/TableDataConstants.java @@ -0,0 +1,5 @@ +package com.fr.design.constants; + +public class TableDataConstants { + public static final String SEPARATOR = "_"; +} diff --git a/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java b/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java index c711a1999d..ae90c5bacc 100644 --- a/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java @@ -1,6 +1,7 @@ package com.fr.design.data; import com.fr.data.TableDataSource; +import com.fr.design.constants.TableDataConstants; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.i18n.Toolkit; import com.fr.stable.StringUtils; @@ -11,8 +12,6 @@ import com.fr.stable.StringUtils; * Created by hades on 2020/4/27 */ public abstract class BasicTableDataUtils { - private static final String SEPARATOR = "_"; - private static final int LEN = 2; @@ -38,10 +37,10 @@ public abstract class BasicTableDataUtils { public static String getTableDataName(boolean isCover, TableDataSource tds, String tdName, String srcName, boolean isDsNameRepeaded) { if (isCover) { - return srcName + SEPARATOR + tdName; + return srcName + TableDataConstants.SEPARATOR + tdName; } if (tds.getTableData(tdName) != null || isDsNameRepeaded) {//如果有同名的就拼上来源名称 - tdName = srcName + SEPARATOR + tdName; + tdName = srcName + TableDataConstants.SEPARATOR + tdName; } int i = 0; while (tds.getTableData(tdName) != null) { diff --git a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java index 2bd2763c8f..a9b97d2698 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -389,9 +389,9 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver, UIOb * @param l */ public void addChangeListener(ChangeListener l) { + listenerList.add(ChangeListener.class, l); for (int i = 0; i < labelButtonList.size(); i++) { labelButtonList.get(i).addChangeListener(l); - listenerList.add(ChangeListener.class, l); } } @@ -399,9 +399,9 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver, UIOb * @param l */ public void removeChangeListener(ChangeListener l) { + listenerList.remove(ChangeListener.class, l); for (int i = 0; i < labelButtonList.size(); i++) { labelButtonList.get(i).removeChangeListener(l); - listenerList.remove(ChangeListener.class, l); } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 6e16472dfa..9276462cfb 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -1110,7 +1110,7 @@ public class JForm extends JTemplate implements BaseJForm