From a3603b0fa47f8846bd994486eb1b36fdad5100f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 26 Jan 2021 11:33:49 +0800 Subject: [PATCH] =?UTF-8?q?CHART-17983=20=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E5=80=BC=E9=BB=98=E8=AE=A4=20&&=20CHART-1802?= =?UTF-8?q?4=20=E6=95=B0=E6=8D=AE=E9=9B=86=E6=94=B9=E5=8F=98=EF=BC=8C?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E9=87=8D=E5=A4=8D=E5=AF=BC=E8=87=B4=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/data/DatabaseTableDataPane.java | 15 ++++++++++----- .../data/table/MeterPlotTableDataContentPane.java | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java index 3c5ebf535..40983c56b 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java @@ -58,7 +58,7 @@ public class DatabaseTableDataPane extends BasicPane{ * 返回选中的数据源. */ public TableDataWrapper getTableDataWrapper() { - return tableNameCombox.getSelectedItem(); + return tableNameCombox.getSelectedItem(); } public void populateBean(TableData nameTableData) { @@ -68,12 +68,12 @@ public class DatabaseTableDataPane extends BasicPane{ tableNameCombox.setSelectedTableDataByName(((NameTableData)nameTableData).getName()); } } - + @Override protected String title4PopupWindow() { return null; } - + /** * 数据集列表选中后的事件 */ @@ -82,7 +82,12 @@ public class DatabaseTableDataPane extends BasicPane{ } private void initTableCombox() { - tableNameCombox = new TableDataComboBox(DesignTableDataManager.getEditingTableDataSource()); + tableNameCombox = new TableDataComboBox(DesignTableDataManager.getEditingTableDataSource()){ + //图表的数据集选择下拉框,不需要注册监听,chartEditPane已经注册了。 + public void registerDSChangeListener() { + + } + }; tableNameCombox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { @@ -94,7 +99,7 @@ public class DatabaseTableDataPane extends BasicPane{ } }); } - + private void initReviewButton() { reviewButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/search.png")); reviewButton.setBorder(new LineBorder(UIConstants.LINE_COLOR)); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java index c7830f246..bc18fafda 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java @@ -56,6 +56,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane this.setLayout(new BorderLayout()); nameBox = new UIComboBoxWithNone(); + nameBox.setSelectedIndex(nameBox.getItemCount() -1); valueBox = new UIComboBox(); targetBox = new UIComboBox(); custom = new TinyFormulaPane();