From 62d3287e90e1c9f1495f733e54f9d3301226af74 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 25 Apr 2017 13:28:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E6=89=BF=E6=8E=A5=E5=8F=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractIndependentChartUI4Custom.java | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI4Custom.java 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 new file mode 100644 index 000000000..7e44a6908 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI4Custom.java @@ -0,0 +1,117 @@ +package com.fr.design.chart.fun.impl; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.IndependentChartUIProvider; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.PiePlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.PiePlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.general.ComparatorUtils; + +/** + * Created by mengao on 2017/4/24. + * 用户使用第三方图表需要继承的面板抽象类 + */ +public abstract class AbstractIndependentChartUI4Custom implements IndependentChartUIProvider { + + int CURRENT_API_LEVEL = 3; + + + @Override + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { + return new PiePlotTableDataContentPane(parent); + } + + @Override + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { + return new PiePlotReportDataContentPane(parent); + } + + @Override + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return new DataSeriesConditionPane(); + } + + @Override + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return getPlotSeriesPane(); + } + +// @Override +// public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener) { +// return null; +// } + +// public abstract BasicBeanPane getChartConfigPane(); + + @Override + public ChartDataPane getChartDataPane(AttributeChangeListener listener) { + return new ChartDataPane(listener); + } + + public BasicBeanPane getPlotSeriesPane(){ + return new BasicBeanPane() { + @Override + public void populateBean(Plot ob) { + + } + + @Override + public Plot updateBean() { + return null; + } + + @Override + protected String title4PopupWindow() { + return null; + } + }; + } + + + @Override + public boolean isUseDefaultPane(){ + return false; + } + + public boolean equals(Object obj) { + return obj != null && ComparatorUtils.equals(obj.getClass(), this.getClass()); + } + + + @Override + public String getIconPath() { + return "com/fr/design/images/form/toolbar/ChartF-Pie.png"; + } + + @Override + + /** + * plot面板的标题 + * 插件兼容 + */ + public String getPlotTypeTitle4PopupWindow(){ + return getPlotTypePane().title4PopupWindow(); + } + @Override + public int currentAPILevel() { + return CURRENT_API_LEVEL; + } +} + /** + * 是否使用默认的界面,为了避免界面来回切换 + * @return 是否使用默认的界面 + */ + + + + + +