From c0675ef3f738d14023c8bc07e956c7feeefd23af Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Wed, 14 Sep 2016 17:17:58 +0800 Subject: [PATCH] update --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 12 ++++++++++++ .../src/com/fr/design/chart/ChartTypePane.java | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 1d5cd101a8..2dfb2b8cdd 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -94,6 +94,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if(rowChart == null) { continue; } + + //初始化图表模型图片 + initChartsDemoImage(rowChart); + String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); @@ -101,6 +105,14 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh return child; } + private static void initChartsDemoImage(Chart[] rowChart) { + int rowChartsCount = rowChart.length; + for (int j = 0; j < rowChartsCount; j++) { + //此时,为图片生成模型数据 + rowChart[j].createSlotImage(); + } + } + private synchronized static void envChanged() { classManager = null; } diff --git a/designer_chart/src/com/fr/design/chart/ChartTypePane.java b/designer_chart/src/com/fr/design/chart/ChartTypePane.java index dcff11869a..9ef53f9bf0 100644 --- a/designer_chart/src/com/fr/design/chart/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/chart/ChartTypePane.java @@ -35,8 +35,6 @@ public class ChartTypePane extends ChartCommonWizardPane { charts4Icon[i] = new Chart[rowChartsCount]; for (int j = 0; j < rowChartsCount; j++) { try { - //此时,为图片生成模型数据 - rowCharts[j].createSlotImage(); //获取图片模型 charts4Icon[i][j] = (Chart) rowCharts[j].clone(); charts4Icon[i][j].setTitle(null);