forked from fanruan/finekit
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.
82 lines
2.2 KiB
82 lines
2.2 KiB
6 years ago
|
package com.fanruan.api.design.chart;
|
||
|
|
||
|
import com.fanruan.api.engine.chart.AbstractChartWithData;
|
||
|
import com.fr.chartx.attr.ChartProvider;
|
||
|
|
||
|
import javax.swing.JPanel;
|
||
|
import java.awt.Component;
|
||
|
|
||
|
/**
|
||
|
* @author Bjorn
|
||
|
* @version 10.0
|
||
|
* Created by Bjorn on 2019-09-18
|
||
|
*/
|
||
|
public class DefaultTypePane<T extends AbstractChartWithData> extends com.fr.design.chartx.impl.DefaultTypePane<T> {
|
||
|
|
||
|
/**
|
||
|
* 获取图表类型界面图表选择子类型的缩略图路径,默认使用UI界面插入图表时子类型的图片路径
|
||
|
*
|
||
|
* @return 图片路径集合
|
||
|
*/
|
||
|
@Override
|
||
|
protected String[] getTypeIconPath() {
|
||
|
return super.getTypeIconPath();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 获取图表类型界面图表选择子类型的缩略图提示内容,默认使用UI界面插入图表时的图表子类型名称
|
||
|
*
|
||
|
* @return 提示内容集合
|
||
|
*/
|
||
|
@Override
|
||
|
protected String[] getTypeTipName() {
|
||
|
return super.getTypeTipName();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 获取图表子类型对象,默认使用AbstractChartType.getChartTypes()返回的第一个对象
|
||
|
*
|
||
|
* @return 图表对象
|
||
|
*/
|
||
|
@Override
|
||
|
public ChartProvider getDefaultChart() {
|
||
|
return super.getDefaultChart();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 获取图表类型界面切换图表类型名称。默认使用UI界面插入图表时的图表名称。
|
||
|
*
|
||
|
* @return 图表名称
|
||
|
*/
|
||
|
@Override
|
||
|
public String title4PopupWindow() {
|
||
|
return super.title4PopupWindow();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 根据图表对象返回该图表对象的所对应的子类型序号,默认返回0
|
||
|
*
|
||
|
* @return 子类型序号
|
||
|
*/
|
||
|
@Override
|
||
|
protected int getSelectIndexInChart(T chart) {
|
||
|
return super.getSelectIndexInChart(chart);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 根据图表子类型序号,还原图表对象对应的属性。
|
||
|
*/
|
||
|
@Override
|
||
|
protected void setSelectIndexInChart(T chart, int index) {
|
||
|
super.setSelectIndexInChart(chart, index);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 根据图表子类型序号,还原图表对象对应的属性。
|
||
|
*/
|
||
|
@Override
|
||
|
protected Component[][] getPaneComponents(JPanel typePane) {
|
||
|
return super.getPaneComponents(typePane);
|
||
|
}
|
||
|
}
|