Browse Source

REPORT-56855 将原来获取修改数据集后的名字的方法改成私有的

persist/11.0
方磊 3 years ago
parent
commit
9f2e530ba4
  1. 8
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  2. 25
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java
  3. 2
      designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java

8
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -160,7 +160,7 @@ public abstract class DesignTableDataManager {
return dsNameChangedMap.containsKey(oldDsName); return dsNameChangedMap.containsKey(oldDsName);
} }
public static String getChangedDsNameByOldDsName(String oldDsName) { private static String getChangedDsNameFromMap(String oldDsName) {
if (isDsNameChanged(oldDsName)) { if (isDsNameChanged(oldDsName)) {
return dsNameChangedMap.get(oldDsName); return dsNameChangedMap.get(oldDsName);
} else { } else {
@ -168,10 +168,10 @@ public abstract class DesignTableDataManager {
} }
} }
public static String getFinalChangedDsNameByOldDsName(String oldDsName) { public static String getChangedDsNameByOldDsName(String oldDsName) {
String changeName = getChangedDsNameByOldDsName(oldDsName); String changeName = getChangedDsNameFromMap(oldDsName);
if (StringUtils.isNotEmpty(changeName)) { if (StringUtils.isNotEmpty(changeName)) {
return getFinalChangedDsNameByOldDsName(changeName); return getChangedDsNameByOldDsName(changeName);
} else { } else {
return oldDsName; return oldDsName;
} }

25
designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java

@ -1,27 +1,26 @@
package com.fr.design.data.datapane; package com.fr.design.data.datapane;
import java.awt.Component; import com.fr.data.TableDataSource;
import java.awt.event.ItemEvent;
import java.util.Iterator;
import java.util.Map.Entry;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.data.TableDataSource;
import com.fr.design.data.tabledata.Prepare4DataSourceChange; import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.util.Iterator;
import java.util.Map.Entry;
/** /**
* 包含所有数据集的下拉框 * 包含所有数据集的下拉框
* *

2
designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java

@ -83,7 +83,7 @@ public class TreeTableDataComboBox extends UIComboBox {
public void setSelectedTableDataByName(String name) { public void setSelectedTableDataByName(String name) {
refresh(); refresh();
TableDataWrapper tableDataWrapper; TableDataWrapper tableDataWrapper;
String changeName = DesignTableDataManager.getFinalChangedDsNameByOldDsName(name); String changeName = DesignTableDataManager.getChangedDsNameByOldDsName(name);
if (StringUtils.isNotEmpty(changeName)) { if (StringUtils.isNotEmpty(changeName)) {
tableDataWrapper = res_map.get(changeName); tableDataWrapper = res_map.get(changeName);
} else { } else {

Loading…
Cancel
Save