From af3ab4f439c2c7a0bf6685ecb4caea7ee83630f1 Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Thu, 21 Nov 2019 00:15:29 +0800 Subject: [PATCH] =?UTF-8?q?CHART-11093=20fix=20=E6=95=B0=E6=8D=AE=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/chartx/AbstractChartDataPane.java | 24 ++++++++++++++++++- .../fr/design/chartx/single/CellDataPane.java | 4 ++++ .../fr/design/chartx/single/DataSetPane.java | 4 ++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java b/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java index d072905e60..04412c0a5a 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java @@ -5,8 +5,11 @@ import com.fr.chartx.data.ChartDataDefinitionProvider; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.plugin.chart.vanchart.VanChart; +import com.fr.stable.AssistUtils; import java.awt.BorderLayout; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; /** * Created by shine on 2019/4/15. @@ -42,12 +45,31 @@ public abstract class AbstractChartDataPane { @Override public void populateBean(CellDataDefinition ob) { + if (ob == null || ob.getColumnFieldCollection() == null) { + return; + } + Type dataType = ((ParameterizedType) cellDataFieldsPane.getClass().getGenericSuperclass()).getActualTypeArguments()[0]; if (AssistUtils.equals(ob.getColumnFieldCollection().getClass(), dataType)) { cellDataFieldsPane.populateBean(ob.getColumnFieldCollection()); diff --git a/designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java b/designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java index 91d1a06881..5875b480a2 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java @@ -100,6 +100,10 @@ public class DataSetPane extends FurtherBasicBeanPane { @Override public void populateBean(DataSetDefinition ob) { + if (ob == null || ob.getColumnFieldCollection() == null) { + return; + } + refreshBoxList(); checkBoxUse();