You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.9 KiB
63 lines
1.9 KiB
2 years ago
|
package com.fr.plugin.pielinecomb.data;
|
||
|
|
||
|
import com.fr.design.formula.TinyFormulaPane;
|
||
|
import com.fr.design.i18n.Toolkit;
|
||
|
import com.fr.extended.chart.AbstractExtendedChartReportDataPane;
|
||
|
|
||
|
/**
|
||
|
* @author duan.jingliang
|
||
|
* @date 2022/10/19
|
||
|
*/
|
||
|
public class PieReportDataPane extends AbstractExtendedChartReportDataPane<PieDataConfig> {
|
||
|
|
||
|
private TinyFormulaPane category;
|
||
|
private TinyFormulaPane gridline;
|
||
|
private TinyFormulaPane regioncolor;
|
||
|
|
||
|
@Override
|
||
|
protected boolean hasCustomFieldPane() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected String[] fieldLabel() {
|
||
|
return new String[]{
|
||
|
Toolkit.i18nText("Plugin-Pielinecomb-category"),
|
||
|
Toolkit.i18nText("Plugin-Pielinecomb-gridline"),
|
||
|
Toolkit.i18nText("Plugin-Pielinecomb-regioncolor")
|
||
|
};
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected TinyFormulaPane[] formulaPanes() {
|
||
|
if (null == category) {
|
||
|
this.category = new TinyFormulaPane();
|
||
|
}
|
||
|
if (this.gridline == null) {
|
||
|
this.gridline = new TinyFormulaPane();
|
||
|
}
|
||
|
if (this.regioncolor == null) {
|
||
|
this.regioncolor = new TinyFormulaPane();
|
||
|
}
|
||
|
return new TinyFormulaPane[]{
|
||
|
category, gridline, regioncolor
|
||
|
};
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected void populate(PieDataConfig dataConfig) {
|
||
|
populateField(this.category, dataConfig.getCategory());
|
||
|
populateField(this.gridline, dataConfig.getGridline());
|
||
|
populateField(this.regioncolor, dataConfig.getRegioncolor());
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected PieDataConfig update() {
|
||
|
PieDataConfig dataConfig = new PieDataConfig();
|
||
|
updateField(this.category, dataConfig.getCategory());
|
||
|
updateField(this.gridline, dataConfig.getGridline());
|
||
|
updateField(this.regioncolor, dataConfig.getRegioncolor());
|
||
|
return dataConfig;
|
||
|
}
|
||
|
}
|