From d037450fa2518e4aa5af8c640c1314490e194d05 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Sun, 7 May 2017 20:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=BA=9B=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/quickeditor/ChartQuickEditor.java | 1 + .../src/com/fr/design/ChartTypeInterfaceManager.java | 1 + .../com/fr/design/mainframe/MiddleChartPropertyPane.java | 2 +- .../src/com/fr/design/mainframe/chart/ChartEditPane.java | 2 +- .../fr/design/mainframe/chart/gui/data/TableDataPane.java | 6 ++++-- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/quickeditor/ChartQuickEditor.java b/designer/src/com/fr/quickeditor/ChartQuickEditor.java index c6f0c37a78..991cf33989 100644 --- a/designer/src/com/fr/quickeditor/ChartQuickEditor.java +++ b/designer/src/com/fr/quickeditor/ChartQuickEditor.java @@ -46,6 +46,7 @@ public class ChartQuickEditor extends QuickEditor{ element = ((ElementCasePane)tc).getEditingElementCase().getFloatElement(fs.getSelectedFloatName()); } collection = (BaseChartCollection) element.getValue(); + //将chartCollection存在DesignModuleFactory DesignModuleFactory.setChartCollection((ChartCollection) collection); add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER); editingPropertyPane.setSupportCellData(true); diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 142ee19a05..fc345b25df 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -413,6 +413,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private AbstractTableDataContentPane getTableDataSourcePane(String priority, Plot plot, ChartDataPane parent) { return chartTypeInterfaces.get(priority).get(plot.getPlotID()).getTableDataSourcePane(plot, parent); } + //获取指定图表的编辑面板 public ChartEditPane getChartConfigPane(String plotID) { Iterator iterator = chartTypeInterfaces.entrySet().iterator(); while (iterator.hasNext()){ diff --git a/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java b/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java index f9e0b8fee5..3da46c373e 100644 --- a/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java +++ b/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java @@ -26,6 +26,7 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{ protected UILabel nameLabel; protected ChartEditPane chartEditPane; + //获取ChartCollection和当前图表的plotID,用来获取对应的面板 protected ChartCollection chartCollection= DesignModuleFactory.getChartCollection(); protected String plotID=chartCollection.getSelectedChart().getPlot().getPlotID(); @@ -97,7 +98,6 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{ */ public void populateChartPropertyPane(BaseChartCollection collection, TargetComponent ePane) { if (collection instanceof ChartCollection) { - resetChartEditPane(); populateChartPropertyPane((ChartCollection)collection, ePane); } } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java index d899853ed0..1e855476e0 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java @@ -348,7 +348,7 @@ public class ChartEditPane extends BasicBeanPane implements AttributeChange,Prep } }); } - + //添加populate和update方法,第三方图表继承使用 @Override public void populateBean(Object ob) { 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 fb80ac54ff..7a957ba75c 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 @@ -24,12 +24,12 @@ public class TableDataPane extends FurtherBasicBeanPane{ private DatabaseTableDataPane tableDataPane; private AbstractTableDataContentPane dataContentPane; - private ChartDataPane parent; - protected AbstractTableDataContentPane getDataContentPane() { return dataContentPane; } + private ChartDataPane parent; + public TableDataPane(ChartDataPane parent) { this.parent = parent; initDataPane(); @@ -120,6 +120,8 @@ public class TableDataPane extends FurtherBasicBeanPane{ add(dataContentPane, BorderLayout.CENTER); } } + + /** * 更新界面属性 */