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.
53 lines
1.5 KiB
53 lines
1.5 KiB
4 years ago
|
package com.fr.plugin.pane;
|
||
|
|
||
|
import com.fr.design.gui.icombobox.UIComboBox;
|
||
|
import com.fr.extended.chart.AbstractExtendedChartTableDataPane;
|
||
|
import com.fr.plugin.WaterChartConfig;
|
||
|
|
||
|
/**
|
||
|
* 使用这个界面时,fr会自动生成一个数据集选择器(意味着只能单一数据源),
|
||
|
* 然后根据我们有多少个字段,编写多少个(1)和(2),然后渲染出来就自动生成
|
||
|
*/
|
||
|
public class WaterChartTableDataPane extends AbstractExtendedChartTableDataPane<WaterChartConfig> {
|
||
|
private UIComboBox xComboBox;
|
||
|
private UIComboBox xComboBox1;
|
||
|
/**
|
||
|
* (1) 说明标签
|
||
|
* @return
|
||
|
*/
|
||
|
@Override
|
||
|
protected String[] fieldLabels() {
|
||
|
return new String[]{
|
||
|
"百分比数据集选择",
|
||
|
"第二个字段"
|
||
|
};
|
||
|
}
|
||
|
/**
|
||
|
* (2)
|
||
|
* 字段选择器
|
||
|
*/
|
||
|
@Override
|
||
|
protected UIComboBox[] filedComboBoxes() {
|
||
|
if (xComboBox == null) {
|
||
|
xComboBox=new UIComboBox();
|
||
|
xComboBox1=new UIComboBox();
|
||
|
}
|
||
|
return new UIComboBox[]{
|
||
|
xComboBox,
|
||
|
xComboBox1
|
||
|
};
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected void populate(WaterChartConfig waterChartConfig) {
|
||
|
populateField(xComboBox, waterChartConfig.getValue());
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected WaterChartConfig update() {
|
||
|
WaterChartConfig waterChartConfig = new WaterChartConfig();
|
||
|
updateField(xComboBox, waterChartConfig.getValue());
|
||
|
return waterChartConfig;
|
||
|
}
|
||
|
}
|