Package hudson.plugins.plot
Class PlotCategoryDataset
java.lang.Object
org.jfree.data.general.AbstractDataset
hudson.plugins.plot.PlotCategoryDataset
- All Implemented Interfaces:
ObjectInputValidation
,Serializable
,Cloneable
,org.jfree.data.category.CategoryDataset
,org.jfree.data.general.Dataset
,org.jfree.data.KeyedValues2D
,org.jfree.data.Values2D
public class PlotCategoryDataset
extends org.jfree.data.general.AbstractDataset
implements org.jfree.data.category.CategoryDataset
A
CategoryDataset
implementation that stores numeric data points and
corresponding URLs. This data structure is basically a table with row and
column names (keys).- Author:
- Nigel Daley
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clipDataset
(int maxColumns) Truncates the dataset to the lastmaxColumns
columns.int
int
getColumnIndex
(Comparable key) getColumnKey
(int column) int
int
getRowIndex
(Comparable key) getRowKey
(int row) getUrl
(int row, int column) Returns the URL at the given row and column.getValue
(int row, int column) getValue
(Comparable rowKey, Comparable columnKey) Gets the value with the given row and column keys.void
setValue
(Number value, String url, Comparable rowKey, Comparable columnKey) Adds or updates a value.Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, clone, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.data.general.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
-
Constructor Details
-
PlotCategoryDataset
public PlotCategoryDataset()Creates a new empty instance.
-
-
Method Details
-
clipDataset
public void clipDataset(int maxColumns) Truncates the dataset to the lastmaxColumns
columns.- Parameters:
maxColumns
- the maximum number columns that will appear to be in the dataset.
-
getRowCount
public int getRowCount()- Specified by:
getRowCount
in interfaceorg.jfree.data.Values2D
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCount
in interfaceorg.jfree.data.Values2D
-
getValue
- Specified by:
getValue
in interfaceorg.jfree.data.Values2D
-
getRowKey
- Specified by:
getRowKey
in interfaceorg.jfree.data.KeyedValues2D
-
getRowIndex
- Specified by:
getRowIndex
in interfaceorg.jfree.data.KeyedValues2D
-
getRowKeys
- Specified by:
getRowKeys
in interfaceorg.jfree.data.KeyedValues2D
-
getColumnKey
- Specified by:
getColumnKey
in interfaceorg.jfree.data.KeyedValues2D
-
getColumnIndex
- Specified by:
getColumnIndex
in interfaceorg.jfree.data.KeyedValues2D
-
getColumnKeys
- Specified by:
getColumnKeys
in interfaceorg.jfree.data.KeyedValues2D
-
getValue
Gets the value with the given row and column keys.- Specified by:
getValue
in interfaceorg.jfree.data.KeyedValues2D
- Parameters:
rowKey
- the row keycolumnKey
- the column key- Returns:
- the value with the given row and column keys
-
getUrl
Returns the URL at the given row and column.- Parameters:
row
- the row indexcolumn
- the column index- Returns:
- the URL
-
setValue
Adds or updates a value.- Parameters:
value
- the value to addurl
- the URL to add and associate with the valuerowKey
- the row keycolumnKey
- the column key
-