个性化阅读
专注于IT技术分析

DefaultCategoryDataset类

  • DefaultCategoryDataset类位于JFreeChart库的org.jfree.data.category包下。
  • CategoryDataset接口的默认实现。
  • 此类中存在的方法向表添加值并设置值。

构造函数:

建设者 描述
DefaultCategoryDataset( ) 它创建新的空数据集。

方法总结

方法 描述
addValue(double value, Comparable rowKey, Comparable columnKey) 此方法向表中添加一个值。
addValue(Number value, Comparable rowKey, Comparable columnKey) 此方法向表中添加一个值。
clear( ) 此方法清除数据集中的所有数据, 并将DatasetChangeEvent发送到所有已注册的侦听器。
equals(Object obj) 此方法测试此数据集是否与任意对象相等。
getColumnCount( ) 此方法返回表中的列数。
getColumnIndex(Comparable key) 此方法返回给定键的列索引。
getColumnKey(int column) 此方法返回一个列键。
getRowCount( ) 此方法返回表中的行数。
getRowIndex(Comparable key) 此方法返回给定键的行索引。
getRowKeys( ) 此方法返回行键。
getValue(Comparable rowKey, Comparable columnKey) 此方法返回一对键的值。
getValue(int row, int column) 此方法从表中返回一个值。
removeColumn(Comparable columnKey) 此方法从数据集中删除一列, 并将DatasetChangeEvent发送到所有已注册的侦听器。
removeRow(Comparable rowKey) 此方法从数据集中删除一行, 并将DatasetChangeEvent发送到所有已注册的侦听器。
setValue(double value, Comparable rowKey, Comparable columnKey) 此方法添加或更新表中的值, 并将DatasetChangeEvent发送到所有已注册的侦听器。
赞(0)
未经允许不得转载:srcmini » DefaultCategoryDataset类

评论 抢沙发

评论前必须登录!