From 2d1e52a9def24550e9fa789a9ea25836b9512ad8 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Thu, 14 Jul 2016 15:56:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B6=85=E9=93=BE=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ChartHyperPoplinkPane.java | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 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 308df92b2c..676f2567a6 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 @@ -44,7 +44,22 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { hyperEditPane = new ChartHyperEditPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); this.add(hyperEditPane, BorderLayout.CENTER); - ChartCollection cc = new ChartCollection(); + ChartCollection cc = createChartCollection(); + + 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){ @@ -68,9 +83,11 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { hyperEditPane.populate(cc); hyperEditPane.useChartComponent(chartComponent); - } - - protected int getChartParaType() { + + return cc; + } + + protected int getChartParaType() { return ParameterTableModel.CHART_NORMAL_USE; } @@ -99,8 +116,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); } From 6b64af1c3bbd8ab7e69bf9196a1a9a3f4ba92db5 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Thu, 14 Jul 2016 16:20:40 +0800 Subject: [PATCH 2/2] update --- .../impl/ChartHyperPoplinkPane.java | 32 ++++++------------- 1 file changed, 10 insertions(+), 22 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 676f2567a6..252e0b751f 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 @@ -23,7 +23,7 @@ import com.fr.general.Inter; import java.awt.*; /** - * 类说明: 图表超链 -- 弹出 悬浮窗. + * 类说明: 图表超链 -- 弹出 悬浮窗. * @author kunsnat E-mail:kunsnat@gmail.com * @version 创建时间:2011-12-28 上午10:41:39 */ @@ -32,7 +32,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { private UITextField itemNameTextField; private ChartHyperEditPane hyperEditPane; private ChartComponent chartComponent; - + public ChartHyperPoplinkPane() { this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); @@ -43,18 +43,18 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { hyperEditPane = new ChartHyperEditPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); this.add(hyperEditPane, BorderLayout.CENTER); - - ChartCollection cc = createChartCollection(); + + ChartCollection cc = createChartCollection(); chartComponent = new ChartComponent(); - chartComponent.setPreferredSize(new Dimension(220, 170));// �ڵ�Ԫ�񵯳�ʱ ��Ҫ������֤���Ա�Ĵ�С. + chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小. chartComponent.setSupportEdit(false); chartComponent.populate(cc); - + this.add(chartComponent, BorderLayout.EAST); - + hyperEditPane.populate(cc); - + hyperEditPane.useChartComponent(chartComponent); } @@ -72,22 +72,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); - return cc; } - protected int getChartParaType() { + protected int getChartParaType() { return ParameterTableModel.CHART_NORMAL_USE; } @@ -102,7 +90,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { protected boolean needRenamePane(){ return true; } - + @Override protected String title4PopupWindow() { return Inter.getLocText("FR-Chart-Pop_Chart");