Browse Source

Merge pull request #7016 in DESIGN/design from release/11.0 to feature/x

* commit '5d2b7133de2da0d6e3898a116306dfd193f04f1d':
  REPORT-63092 组件复用-拖入带数据集的复用组件,删除设计画布中的组件后,数据集没有被删除
  REPORT-63729 填报-控件-控件数据字典设置显示值为公式时,公式界面关几次才关得掉
  REPORT-63729 填报-控件-控件数据字典设置显示值为公式时,公式界面关几次才关得掉
feature/x
superman 3 years ago
parent
commit
b561bc3d66
  1. 5
      designer-base/src/main/java/com/fr/design/constants/TableDataConstants.java
  2. 7
      designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java
  3. 4
      designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java
  4. 2
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java

5
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 = "_";
}

7
designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java

@ -1,6 +1,7 @@
package com.fr.design.data; package com.fr.design.data;
import com.fr.data.TableDataSource; import com.fr.data.TableDataSource;
import com.fr.design.constants.TableDataConstants;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -11,8 +12,6 @@ import com.fr.stable.StringUtils;
* Created by hades on 2020/4/27 * Created by hades on 2020/4/27
*/ */
public abstract class BasicTableDataUtils { public abstract class BasicTableDataUtils {
private static final String SEPARATOR = "_";
private static final int LEN = 2; 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) { public static String getTableDataName(boolean isCover, TableDataSource tds, String tdName, String srcName, boolean isDsNameRepeaded) {
if (isCover) { if (isCover) {
return srcName + SEPARATOR + tdName; return srcName + TableDataConstants.SEPARATOR + tdName;
} }
if (tds.getTableData(tdName) != null || isDsNameRepeaded) {//如果有同名的就拼上来源名称 if (tds.getTableData(tdName) != null || isDsNameRepeaded) {//如果有同名的就拼上来源名称
tdName = srcName + SEPARATOR + tdName; tdName = srcName + TableDataConstants.SEPARATOR + tdName;
} }
int i = 0; int i = 0;
while (tds.getTableData(tdName) != null) { while (tds.getTableData(tdName) != null) {

4
designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -389,9 +389,9 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver, UIOb
* @param l * @param l
*/ */
public void addChangeListener(ChangeListener l) { public void addChangeListener(ChangeListener l) {
listenerList.add(ChangeListener.class, l);
for (int i = 0; i < labelButtonList.size(); i++) { for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).addChangeListener(l); labelButtonList.get(i).addChangeListener(l);
listenerList.add(ChangeListener.class, l);
} }
} }
@ -399,9 +399,9 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver, UIOb
* @param l * @param l
*/ */
public void removeChangeListener(ChangeListener l) { public void removeChangeListener(ChangeListener l) {
listenerList.remove(ChangeListener.class, l);
for (int i = 0; i < labelButtonList.size(); i++) { for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).removeChangeListener(l); labelButtonList.get(i).removeChangeListener(l);
listenerList.remove(ChangeListener.class, l);
} }
} }

2
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -1110,7 +1110,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
} }
Iterator tdIterator = sharableEditor.getTableDataSource().getTableDataNameIterator(); Iterator tdIterator = sharableEditor.getTableDataSource().getTableDataNameIterator();
while (tdIterator.hasNext()) { while (tdIterator.hasNext()) {
String tdName = bindInfo.getName() + "-" + tdIterator.next(); String tdName = bindInfo.getName() + TableDataConstants.SEPARATOR + tdIterator.next();
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).removeTableData(tdName); TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).removeTableData(tdName);
} }
} }

Loading…
Cancel
Save