public class PlotCategoryDataset
extends org.jfree.data.general.AbstractDataset
implements org.jfree.data.category.CategoryDataset
CategoryDataset implementation that stores numeric data points and
corresponding URLs. This data structure is basically a table with row and
column names (keys).| Constructor and Description |
|---|
PlotCategoryDataset()
Creates a new empty instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clipDataset(int maxColumns)
Truncates the dataset to the last
maxColumns columns. |
int |
getColumnCount() |
int |
getColumnIndex(Comparable key) |
Comparable |
getColumnKey(int column) |
List |
getColumnKeys() |
int |
getRowCount() |
int |
getRowIndex(Comparable key) |
Comparable |
getRowKey(int row) |
List |
getRowKeys() |
String |
getUrl(int row,
int column)
Returns the URL at the given row and column.
|
Number |
getValue(Comparable rowKey,
Comparable columnKey)
Gets the value with the given row and column keys.
|
Number |
getValue(int row,
int column) |
void |
setValue(Number value,
String url,
Comparable rowKey,
Comparable columnKey)
Adds or updates a value.
|
addChangeListener, clone, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, validateObjectpublic void clipDataset(int maxColumns)
maxColumns columns.maxColumns - the maximum number columns that will appear to be in the dataset.public int getRowCount()
getRowCount in interface org.jfree.data.Values2Dpublic int getColumnCount()
getColumnCount in interface org.jfree.data.Values2Dpublic Number getValue(int row, int column)
getValue in interface org.jfree.data.Values2Dpublic Comparable getRowKey(int row)
getRowKey in interface org.jfree.data.KeyedValues2Dpublic int getRowIndex(Comparable key)
getRowIndex in interface org.jfree.data.KeyedValues2Dpublic List getRowKeys()
getRowKeys in interface org.jfree.data.KeyedValues2Dpublic Comparable getColumnKey(int column)
getColumnKey in interface org.jfree.data.KeyedValues2Dpublic int getColumnIndex(Comparable key)
getColumnIndex in interface org.jfree.data.KeyedValues2Dpublic List getColumnKeys()
getColumnKeys in interface org.jfree.data.KeyedValues2Dpublic Number getValue(Comparable rowKey, Comparable columnKey)
getValue in interface org.jfree.data.KeyedValues2DrowKey - the row keycolumnKey - the column keypublic String getUrl(int row, int column)
row - the row indexcolumn - the column indexpublic void setValue(Number value, String url, Comparable rowKey, Comparable columnKey)
value - the value to addurl - the URL to add and associate with the valuerowKey - the row keycolumnKey - the column keyCopyright © 2016–2020. All rights reserved.