From 69483fcc2fa04533f22bf12667c6c63e2ee64a67 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Thu, 14 Jul 2016 16:27:09 +0800 Subject: [PATCH] update --- .../impl/ChartHyperPoplinkPane.java | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index 308df92b2..614cbd350 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -43,8 +43,22 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { hyperEditPane = new ChartHyperEditPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); this.add(hyperEditPane, BorderLayout.CENTER); + ChartCollection cc = createChartCollection(); - ChartCollection cc = new ChartCollection(); + chartComponent = new ChartComponent(); + chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小. + chartComponent.setSupportEdit(false); + chartComponent.populate(cc); + + this.add(chartComponent, BorderLayout.EAST); + + hyperEditPane.populate(cc); + + hyperEditPane.useChartComponent(chartComponent); + } + + private ChartCollection createChartCollection() { + ChartCollection cc = new ChartCollection(); Chart chart = ChartTypeManager.getFirstChart(); if (chart != null){ @@ -57,20 +71,10 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { }else { cc.addChart(new Chart(new Bar2DPlot())); } - - chartComponent = new ChartComponent(); - chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小. - chartComponent.setSupportEdit(false); - chartComponent.populate(cc); - - this.add(chartComponent, BorderLayout.EAST); - - hyperEditPane.populate(cc); - - hyperEditPane.useChartComponent(chartComponent); - } - - protected int getChartParaType() { + return cc; + } + + protected int getChartParaType() { return ParameterTableModel.CHART_NORMAL_USE; } @@ -99,8 +103,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { BaseChartCollection cc = chartHyperlink.getChartCollection(); if (cc == null || cc.getChartCount() < 1) { - cc = new ChartCollection(); - cc.addChart(new Chart(ChartFactory.createBar2DPlot())); + cc = createChartCollection(); chartHyperlink.setChartCollection(cc); }