Browse Source

Pull request #5491: REPORT-56855 树数据集修改名称后-数据字典内的树数据集名称不会改变

Merge in DESIGN/design from ~FANGLEI/design10.0:release/11.0 to release/11.0

* commit 'ee29df29ba37529ef032740f07c5140faa588740':
  REPORT-57202 添加原先“纵向显示长度为9位”的限制
  REPORT-57202 FR11一轮回归-页面设置纸张大小问题
  REPORT-56855 优化方法命名
  REPORT-56855 将原来获取修改数据集后的名字的方法改成私有的
  REPORT-56855 树数据集修改名称后-数据字典内的树数据集名称不会改变
fix-lag
fanglei 3 years ago
parent
commit
9addd22908
  1. 12
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  2. 10
      designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java
  3. 11
      designer-base/src/main/java/com/fr/design/gui/frpane/JTreeAutoBuildPane.java
  4. 2
      designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java

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

@ -161,10 +161,18 @@ public abstract class DesignTableDataManager {
} }
public static String getChangedDsNameByOldDsName(String oldDsName) { public static String getChangedDsNameByOldDsName(String oldDsName) {
String changeName;
if (isDsNameChanged(oldDsName)) { if (isDsNameChanged(oldDsName)) {
return dsNameChangedMap.get(oldDsName); changeName = dsNameChangedMap.get(oldDsName);
} else {
changeName = StringUtils.EMPTY;
}
if (StringUtils.isNotEmpty(changeName)) {
return getChangedDsNameByOldDsName(changeName);
} else { } else {
return StringUtils.EMPTY; return oldDsName;
} }
} }

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

@ -9,6 +9,7 @@ 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.file.TableDataConfig; import com.fr.file.TableDataConfig;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -80,12 +81,13 @@ public class TreeTableDataComboBox extends UIComboBox {
} }
public void setSelectedTableDataByName(String name) { public void setSelectedTableDataByName(String name) {
refresh();
TableDataWrapper tableDataWrapper; TableDataWrapper tableDataWrapper;
if (res_map.get(name) != null) { String changeName = DesignTableDataManager.getChangedDsNameByOldDsName(name);
tableDataWrapper = res_map.get(name); if (StringUtils.isNotEmpty(changeName)) {
} else {
String changeName = DesignTableDataManager.getChangedDsNameByOldDsName(name);
tableDataWrapper = res_map.get(changeName); tableDataWrapper = res_map.get(changeName);
} else {
tableDataWrapper = res_map.get(name);
} }
this.getModel().setSelectedItem(tableDataWrapper); this.getModel().setSelectedItem(tableDataWrapper);
} }

11
designer-base/src/main/java/com/fr/design/gui/frpane/JTreeAutoBuildPane.java

@ -27,13 +27,16 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.awt.*;
import javax.swing.JPanel;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
import java.util.List; import java.util.List;
import javax.swing.*;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
public class JTreeAutoBuildPane extends BasicPane implements PreviewLabel.Previewable, EditOrNewLabel.Editable { public class JTreeAutoBuildPane extends BasicPane implements PreviewLabel.Previewable, EditOrNewLabel.Editable {
private TreeTableDataComboBox treeTableDataComboBox; private TreeTableDataComboBox treeTableDataComboBox;

2
designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java

@ -779,7 +779,7 @@ public class PageSetupPane extends BasicPane {
//使用科学计数法显示长度的时候,限制纵向显示长度为9位 //使用科学计数法显示长度的时候,限制纵向显示长度为9位
if (h_str.contains(E)) { if (h_str.contains(E)) {
String str1 = h_str.substring(h_str.indexOf(E)); String str1 = h_str.substring(h_str.indexOf(E));
String str2 = h_str.substring(0, 9 - str1.length()); String str2 = h_str.substring(0, Math.min(h_str.length(), 9) - str1.length());
h_str = str2 + str1; h_str = str2 + str1;
} else if (h_str.indexOf(CoreConstants.DOT) > 0) { } else if (h_str.indexOf(CoreConstants.DOT) > 0) {
h_str = h_str.substring(0, h_str.indexOf(CoreConstants.DOT) + 2); h_str = h_str.substring(0, h_str.indexOf(CoreConstants.DOT) + 2);

Loading…
Cancel
Save