From 1642c8ad2a71e7f9c80a3504c82a1e0db630466e Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Sun, 7 May 2017 20:07:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E5=A4=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/data/TableDataPane.java | 34 +++++-------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java index 7a957ba75c..42ba6750cb 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java @@ -1,8 +1,7 @@ package com.fr.design.mainframe.chart.gui.data; import com.fr.base.TableData; -import com.fr.chart.chartattr.ChartCollection; -import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartattr.*; import com.fr.chart.chartdata.TableDataDefinition; import com.fr.chart.chartdata.TopDefinition; import com.fr.data.impl.NameTableData; @@ -12,7 +11,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.chart.gui.ChartDataPane; -import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.*; import com.fr.general.Inter; import javax.swing.*; @@ -24,10 +23,6 @@ public class TableDataPane extends FurtherBasicBeanPane{ private DatabaseTableDataPane tableDataPane; private AbstractTableDataContentPane dataContentPane; - protected AbstractTableDataContentPane getDataContentPane() { - return dataContentPane; - } - private ChartDataPane parent; public TableDataPane(ChartDataPane parent) { @@ -108,20 +103,15 @@ public class TableDataPane extends FurtherBasicBeanPane{ * @param collection 图表属性的集合 */ public void refreshContentPane(ChartCollection collection) { - refreshContentPane(getContentPane(collection.getSelectedChart().getPlot())); - } - - protected void refreshContentPane(AbstractTableDataContentPane contentPane) { if(dataContentPane != null) { remove(dataContentPane); } - dataContentPane = contentPane; + dataContentPane = getContentPane(collection.getSelectedChart().getPlot()); if(dataContentPane != null) { add(dataContentPane, BorderLayout.CENTER); } } - /** * 更新界面属性 */ @@ -130,21 +120,17 @@ public class TableDataPane extends FurtherBasicBeanPane{ return; } TableDataDefinition data = (TableDataDefinition)collection.getSelectedChart().getFilterDefinition(); - populateDSName(data); - if(dataContentPane != null) { - dataContentPane.populateBean(collection); - } - } - protected void populateDSName(TableDataDefinition dataDefinition){ - TableData tableData = null; - if(dataDefinition != null) { - tableData = dataDefinition.getTableData(); + if(data != null) { + tableData = data.getTableData(); } onSelectTableData(); checkBoxUse(); tableDataPane.populateBean(tableData); + if(dataContentPane != null) { + dataContentPane.populateBean(collection); + } } /** @@ -155,10 +141,6 @@ public class TableDataPane extends FurtherBasicBeanPane{ dataContentPane.updateBean(collection); } TopDefinition dataDefinition = (TopDefinition)collection.getSelectedChart().getFilterDefinition(); - updateDSName(dataDefinition); - } - - protected void updateDSName(TopDefinition dataDefinition) { if(dataDefinition instanceof TableDataDefinition) { TableDataWrapper tableDataWrapper = tableDataPane.getTableDataWrapper(); if (dataDefinition != null && tableDataWrapper != null){