interface.
| Method from org.jfree.data.category.DefaultCategoryDataset Detail: |
public void addValue(Number value,
Comparable rowKey,
Comparable columnKey) {
this.data.addValue(value, rowKey, columnKey);
fireDatasetChanged();
}
Adds a value to the table. Performs the same function as setValue(). |
public void addValue(double value,
Comparable rowKey,
Comparable columnKey) {
addValue(new Double(value), rowKey, columnKey);
}
Adds a value to the table. |
public void clear() {
this.data.clear();
fireDatasetChanged();
}
Clears all data from the dataset and sends a DatasetChangeEvent
to all registered listeners. |
public Object clone() throws CloneNotSupportedException {
DefaultCategoryDataset clone = (DefaultCategoryDataset) super.clone();
clone.data = (DefaultKeyedValues2D) this.data.clone();
return clone;
}
Returns a clone of the dataset. |
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof CategoryDataset)) {
return false;
}
CategoryDataset that = (CategoryDataset) obj;
if (!getRowKeys().equals(that.getRowKeys())) {
return false;
}
if (!getColumnKeys().equals(that.getColumnKeys())) {
return false;
}
int rowCount = getRowCount();
int colCount = getColumnCount();
for (int r = 0; r < rowCount; r++) {
for (int c = 0; c < colCount; c++) {
Number v1 = getValue(r, c);
Number v2 = that.getValue(r, c);
if (v1 == null) {
if (v2 != null) {
return false;
}
}
else if (!v1.equals(v2)) {
return false;
}
}
}
return true;
}
Tests this dataset for equality with an arbitrary object. |
public int getColumnCount() {
return this.data.getColumnCount();
}
Returns the number of columns in the table. |
public int getColumnIndex(Comparable key) {
// defer null argument check
return this.data.getColumnIndex(key);
}
Returns the column index for a given key. |
public Comparable getColumnKey(int column) {
return this.data.getColumnKey(column);
}
|
public List getColumnKeys() {
return this.data.getColumnKeys();
}
|
public int getRowCount() {
return this.data.getRowCount();
}
Returns the number of rows in the table. |
public int getRowIndex(Comparable key) {
// defer null argument check
return this.data.getRowIndex(key);
}
Returns the row index for a given key. |
public Comparable getRowKey(int row) {
return this.data.getRowKey(row);
}
Returns the key for the specified row. |
public List getRowKeys() {
return this.data.getRowKeys();
}
|
public Number getValue(int row,
int column) {
return this.data.getValue(row, column);
}
Returns a value from the table. |
public Number getValue(Comparable rowKey,
Comparable columnKey) {
return this.data.getValue(rowKey, columnKey);
}
Returns the value for a pair of keys. |
public int hashCode() {
return this.data.hashCode();
}
Returns a hash code for the dataset. |
public void incrementValue(double value,
Comparable rowKey,
Comparable columnKey) {
double existing = 0.0;
Number n = getValue(rowKey, columnKey);
if (n != null) {
existing = n.doubleValue();
}
setValue(existing + value, rowKey, columnKey);
}
Adds the specified value to an existing value in the dataset (if the
existing value is null, it is treated as if it were 0.0). |
public void removeColumn(int columnIndex) {
this.data.removeColumn(columnIndex);
fireDatasetChanged();
}
Removes a column from the dataset and sends a DatasetChangeEvent
to all registered listeners. |
public void removeColumn(Comparable columnKey) {
this.data.removeColumn(columnKey);
fireDatasetChanged();
}
Removes a column from the dataset and sends a DatasetChangeEvent
to all registered listeners. |
public void removeRow(int rowIndex) {
this.data.removeRow(rowIndex);
fireDatasetChanged();
}
Removes a row from the dataset and sends a DatasetChangeEvent
to all registered listeners. |
public void removeRow(Comparable rowKey) {
this.data.removeRow(rowKey);
fireDatasetChanged();
}
Removes a row from the dataset and sends a DatasetChangeEvent
to all registered listeners. |
public void removeValue(Comparable rowKey,
Comparable columnKey) {
this.data.removeValue(rowKey, columnKey);
fireDatasetChanged();
}
Removes a value from the dataset and sends a DatasetChangeEvent
to all registered listeners. |
public void setValue(Number value,
Comparable rowKey,
Comparable columnKey) {
this.data.setValue(value, rowKey, columnKey);
fireDatasetChanged();
}
Adds or updates a value in the table and sends a
DatasetChangeEvent to all registered listeners. |
public void setValue(double value,
Comparable rowKey,
Comparable columnKey) {
setValue(new Double(value), rowKey, columnKey);
}
Adds or updates a value in the table and sends a
DatasetChangeEvent to all registered listeners. |