本文整理汇总了Java中org.jfree.data.general.AbstractDataset类的典型用法代码示例。如果您正苦于以下问题:Java AbstractDataset类的具体用法?Java AbstractDataset怎么用?Java AbstractDataset使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractDataset类属于org.jfree.data.general包,在下文中一共展示了AbstractDataset类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dataset2Table
import org.jfree.data.general.AbstractDataset; //导入依赖的package包/类
public void dataset2Table(AbstractDataset dataset, int type) {
if (dataset == null){
if (type == NULL_EXAMPLE){
example = new String[20][2];
columnNames = new String[2];
columnNames[0] = "C1";
columnNames[1] = "C2";
example[0][0] = ""; example[0][1] = "";
example[1][0] = ""; example[1][1] = "";
example[2][0] = ""; example[2][1] = "";
example[3][0] = ""; example[3][1] = "";
example[4][0] = ""; example[4][1] = "";
example[5][0] = ""; example[5][1] = "";
example[6][0] = ""; example[6][1] = "";
example[7][0] = ""; example[7][1] = "";
example[8][0] = ""; example[8][1] = "";
example[9][0] = ""; example[9][1] = "";
example[10][0] = ""; example[10][1] = "";
example[11][0] = ""; example[11][1] = "";
example[12][0] = ""; example[12][1] = "";
example[13][0] = ""; example[13][1] = "";
example[14][0] = ""; example[14][1] = "";
example[15][0] = ""; example[15][1] = "";
example[16][0] = ""; example[16][1] = "";
example[17][0] = ""; example[17][1] = "";
example[18][0] = ""; example[18][1] = "";
example[19][0] = ""; example[19][1] = "";
dataTable = new JTable(example, columnNames);
return;
} //null_example
else if (type == ChartType.PIE_CHART){
example = new String[6][2];
columnNames = new String[2];
columnNames[0]="Name";
columnNames[1]="Value";
example[0][0] = "One"; example[0][1] = "43.2";
example[1][0] = "Two"; example[1][1] = "10.0";
example[2][0] = "Three"; example[2][1] = "27.5";
example[3][0] = "Four"; example[3][1] = "17.5";
example[4][0] = "Five"; example[4][1] = "11.0";
example[5][0] = "Six"; example[5][1] = "19.4";
dataTable = new JTable(example, columnNames);
return;
} // pie
else if (type == ChartType.BAR_XY_CHART || type == ChartType.BAR_CAT_CHART){
example = new String[5][2];
columnNames = new String[2];
columnNames[0]="Category";
columnNames[1]="Value";
example[0][0] = "Category1"; example[0][1] = "4.0";
example[1][0] = "Category2"; example[1][1] = "3.0";
example[2][0] = "Category3"; example[2][1] = "-2.0";
example[3][0] = "Category4"; example[3][1] = "3.0";
example[4][0] = "Category5"; example[4][1] = "6.0";
dataTable = new JTable(example, columnNames);
return;
} // bar
}
}
示例2: getDataset
import org.jfree.data.general.AbstractDataset; //导入依赖的package包/类
public AbstractDataset getDataset(){
return dataset;
}
示例3: getDataset
import org.jfree.data.general.AbstractDataset; //导入依赖的package包/类
/**
* Returns the dataset for this creator.
*
* @return Created dataset.
*/
public AbstractDataset getDataset() {
return this.dataset;
}