Browse Source
* commit 'bf75d4d9b9979ca5aa7a989223bdea870d7eb657': (27 commits) 删除多余实现 修改PMD问题 删除部分多余代码,API等级改为由用户设置 提供需要继承的抽象类 去掉不需要的方法,不需要的面板返回null。 接口代码优化 优化代码 优化代码 优化接口设计代码 优化接口设计代码 优化代码 修改文件换行格式 修改代码中存在的一些问题。 修改文件名,删除多余的类,修改一些方法。 格式化代码 还原多修改的代码 添加一些注释 接口设计 第三方图表接口设计 接口设计 第三方图表接口 ...master
zack
8 years ago
14 changed files with 454 additions and 38 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,85 @@
|
||||
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.condition.ConditionAttributesPane; |
||||
import com.fr.design.gui.frpane.AttributeChangeListener; |
||||
import com.fr.design.mainframe.chart.AbstractChartAttrPane; |
||||
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.table.AbstractTableDataContentPane; |
||||
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
||||
import com.fr.design.mainframe.chart.gui.type.PiePlotPane; |
||||
import com.fr.general.ComparatorUtils; |
||||
|
||||
/** |
||||
* Created by mengao on 2017/4/24. |
||||
* 用户使用第三方图表需要继承的面板抽象类 |
||||
*/ |
||||
public abstract class AbstractIndependentChartUI4Custom implements IndependentChartUIProvider { |
||||
|
||||
@Override |
||||
public AbstractChartTypePane getPlotTypePane() { |
||||
return new PiePlotPane(); |
||||
} |
||||
|
||||
@Override |
||||
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { |
||||
return null; |
||||
} |
||||
|
||||
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){ |
||||
return null; |
||||
} |
||||
|
||||
public BasicBeanPane<Plot> getPlotSeriesPane(){ |
||||
return null; |
||||
} |
||||
|
||||
public boolean equals(Object obj) { |
||||
return obj != null && ComparatorUtils.equals(obj.getClass(), this.getClass()); |
||||
} |
||||
|
||||
public ConditionAttributesPane getPlotConditionPane(Plot plot){ |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){ |
||||
return new AbstractChartAttrPane[]{}; |
||||
} |
||||
|
||||
@Override |
||||
public boolean isUseDefaultPane(){ |
||||
return false; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public String getIconPath() { |
||||
return "com/fr/design/images/form/toolbar/ChartF-Column.png"; |
||||
} |
||||
|
||||
@Override |
||||
|
||||
/** |
||||
* plot面板的标题 |
||||
* 插件兼容 |
||||
*/ |
||||
public String getPlotTypeTitle4PopupWindow(){ |
||||
return getPlotTypePane().title4PopupWindow(); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,46 @@
|
||||
package com.fr.design.mainframe.chart; |
||||
|
||||
import com.fr.chart.chartattr.ChartCollection; |
||||
|
||||
/** |
||||
* Created by mengao on 2017/5/3. |
||||
*/ |
||||
public abstract class ThirdChartEditPane extends ChartEditPane { |
||||
|
||||
protected void createTabsPane() {} |
||||
|
||||
public String getSelectedTabName() { |
||||
return paneList.get(1).title4PopupWindow(); |
||||
} |
||||
|
||||
public void populate(ChartCollection collection) { |
||||
populateBean(collection.getSelectedChart()); |
||||
} |
||||
|
||||
protected void dealWithStyleChange(){ |
||||
populateBean(collection.getSelectedChart()); |
||||
} |
||||
|
||||
/** |
||||
* 图表设计器,显示选中的面板 |
||||
*/ |
||||
public void populateSelectedTabPane() { |
||||
populateBean(collection.getSelectedChart()); |
||||
} |
||||
|
||||
/** |
||||
* 数据集改变的事件监听 |
||||
*/ |
||||
public void registerDSChangeListener() { |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return "CustomChart"; |
||||
} |
||||
|
||||
protected abstract void populateBean(Object ob); |
||||
|
||||
protected abstract void updateBean(Object ob); |
||||
|
||||
} |
Loading…
Reference in new issue