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
ACategoryDataset
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PlotCategoryDataset()
Creates a new empty instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clipDataset(int maxColumns)
Truncates the dataset to the lastmaxColumns
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(int row, int column)
Number
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
-
-
-
-
Method Detail
-
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
public Number getValue(int row, int column)
- Specified by:
getValue
in interfaceorg.jfree.data.Values2D
-
getRowKey
public Comparable getRowKey(int row)
- Specified by:
getRowKey
in interfaceorg.jfree.data.KeyedValues2D
-
getRowIndex
public int getRowIndex(Comparable key)
- Specified by:
getRowIndex
in interfaceorg.jfree.data.KeyedValues2D
-
getRowKeys
public List getRowKeys()
- Specified by:
getRowKeys
in interfaceorg.jfree.data.KeyedValues2D
-
getColumnKey
public Comparable getColumnKey(int column)
- Specified by:
getColumnKey
in interfaceorg.jfree.data.KeyedValues2D
-
getColumnIndex
public int getColumnIndex(Comparable key)
- Specified by:
getColumnIndex
in interfaceorg.jfree.data.KeyedValues2D
-
getColumnKeys
public List getColumnKeys()
- Specified by:
getColumnKeys
in interfaceorg.jfree.data.KeyedValues2D
-
getValue
public Number getValue(Comparable rowKey, Comparable columnKey)
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
public String getUrl(int row, int column)
Returns the URL at the given row and column.- Parameters:
row
- the row indexcolumn
- the column index- Returns:
- the URL
-
setValue
public void setValue(Number value, String url, Comparable rowKey, Comparable columnKey)
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
-
-