package com.fr.plugin.demo; import com.fr.design.formula.TinyFormulaPane; import com.fr.extended.chart.AbstractExtendedChartReportDataPane; /** * Created by shine on 2018/3/24. */ public class DemoReportDataPane extends AbstractExtendedChartReportDataPane { private TinyFormulaPane xPane; private TinyFormulaPane yPane; private TinyFormulaPane zPane; @Override protected String[] fieldLabel() { return new String[]{ "X轴", "Y轴", "Z轴" }; } @Override protected TinyFormulaPane[] formulaPanes() { if (xPane == null) { xPane = new TinyFormulaPane(); yPane = new TinyFormulaPane(); zPane = new TinyFormulaPane(); } return new TinyFormulaPane[]{ xPane, yPane, zPane }; } @Override protected void populate(DemoDataConfig dataConf) { populateField(xPane, dataConf.getX()); populateField(yPane, dataConf.getY()); populateField(zPane, dataConf.getZ()); } @Override protected DemoDataConfig update() { DemoDataConfig dataConfig = new DemoDataConfig(); updateField(xPane, dataConfig.getX()); updateField(yPane, dataConfig.getY()); updateField(zPane, dataConfig.getZ()); return dataConfig; } }