From a869bef3232e9ee73d4b45c8ef5f2404e3dba5ce Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 8 May 2017 17:07:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/quickeditor/ChartQuickEditor.java | 14 +++++++++++++- .../impl/AbstractIndependentChartUI4Custom.java | 3 +-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/quickeditor/ChartQuickEditor.java b/designer/src/com/fr/quickeditor/ChartQuickEditor.java index b64cd6834..6187c967a 100644 --- a/designer/src/com/fr/quickeditor/ChartQuickEditor.java +++ b/designer/src/com/fr/quickeditor/ChartQuickEditor.java @@ -2,8 +2,10 @@ package com.fr.quickeditor; import com.fr.base.chart.BaseChartCollection; import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.ThirdChart; import com.fr.design.designer.TargetComponent; import com.fr.design.gui.chart.BaseChartPropertyPane; +import com.fr.design.mainframe.ChartPropertyPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.module.DesignModuleFactory; import com.fr.design.selection.QuickEditor; @@ -19,7 +21,7 @@ import java.awt.*; public class ChartQuickEditor extends QuickEditor{ // kunsnat: editingPropertyPane初始化 避开设计器启动, 在用到的时候再初始化. //private BaseChartPropertyPane editingPropertyPane = null; - + private static boolean lastChartType =false; public ChartQuickEditor() { setLayout(new BorderLayout()); setBorder(null); @@ -46,10 +48,20 @@ public class ChartQuickEditor extends QuickEditor{ element = ((ElementCasePane)tc).getEditingElementCase().getFloatElement(fs.getSelectedFloatName()); } collection = (BaseChartCollection) element.getValue(); + boolean chartType = false; + if (((ChartCollection) collection).getSelectedChart() instanceof ThirdChart) { + chartType = true; + } + if (chartType != lastChartType) { + ChartPropertyPane.clear(); + } add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER); editingPropertyPane.addChartEditPane(((ChartCollection)collection).getSelectedChart().getPlot().getPlotID()); editingPropertyPane.setSupportCellData(true); + if (((ChartCollection) collection).getSelectedChart() instanceof ThirdChart) { + lastChartType = true; + } } editingPropertyPane.populateChartPropertyPane(collection, tc); } diff --git a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI4Custom.java b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI4Custom.java index 4ba55e055..7ec5bf141 100644 --- a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI4Custom.java +++ b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI4Custom.java @@ -21,7 +21,6 @@ import com.fr.general.ComparatorUtils; */ public abstract class AbstractIndependentChartUI4Custom implements IndependentChartUIProvider { - int CURRENT_API_LEVEL = 100000; @Override public AbstractChartTypePane getPlotTypePane() { return new PiePlotPane(); @@ -85,7 +84,7 @@ public abstract class AbstractIndependentChartUI4Custom implements IndependentCh } @Override public int currentAPILevel() { - return CURRENT_API_LEVEL; + return Integer.MAX_VALUE; } }