From 9f2e530ba4d81e585da4d69f8127e6b81f3c3cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 24 Aug 2021 09:57:16 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-56855=20=E5=B0=86=E5=8E=9F=E6=9D=A5?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E5=90=8E=E7=9A=84=E5=90=8D=E5=AD=97=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E6=94=B9=E6=88=90=E7=A7=81=E6=9C=89=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/DesignTableDataManager.java | 8 +++--- .../data/datapane/TableDataComboBox.java | 25 +++++++++---------- .../data/datapane/TreeTableDataComboBox.java | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index 4018a4f1d2..ee8214297f 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java @@ -160,7 +160,7 @@ public abstract class DesignTableDataManager { return dsNameChangedMap.containsKey(oldDsName); } - public static String getChangedDsNameByOldDsName(String oldDsName) { + private static String getChangedDsNameFromMap(String oldDsName) { if (isDsNameChanged(oldDsName)) { return dsNameChangedMap.get(oldDsName); } else { @@ -168,10 +168,10 @@ public abstract class DesignTableDataManager { } } - public static String getFinalChangedDsNameByOldDsName(String oldDsName) { - String changeName = getChangedDsNameByOldDsName(oldDsName); + public static String getChangedDsNameByOldDsName(String oldDsName) { + String changeName = getChangedDsNameFromMap(oldDsName); if (StringUtils.isNotEmpty(changeName)) { - return getFinalChangedDsNameByOldDsName(changeName); + return getChangedDsNameByOldDsName(changeName); } else { return oldDsName; } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java index ebbdbf0f35..cda0fd084e 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java @@ -1,27 +1,26 @@ package com.fr.design.data.datapane; -import java.awt.Component; -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.data.TableDataSource; import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; -import com.fr.data.TableDataSource; 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.TemplateTableDataWrapper; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.general.ComparatorUtils; 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; + /** * 包含所有数据集的下拉框 * diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java b/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java index 7ab969ae6f..422a3a49a8 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java +++ b/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) { refresh(); TableDataWrapper tableDataWrapper; - String changeName = DesignTableDataManager.getFinalChangedDsNameByOldDsName(name); + String changeName = DesignTableDataManager.getChangedDsNameByOldDsName(name); if (StringUtils.isNotEmpty(changeName)) { tableDataWrapper = res_map.get(changeName); } else {