|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
org.jfree.data.category.DefaultIntervalCategoryDataset
public class DefaultIntervalCategoryDataset
A convenience class that provides a default implementation of the
IntervalCategoryDataset
interface.
The standard constructor accepts data in a two dimensional array where the first dimension is the series, and the second dimension is the category.
Constructor Summary | |
---|---|
DefaultIntervalCategoryDataset(java.lang.Comparable[] seriesKeys,
java.lang.Comparable[] categoryKeys,
java.lang.Number[][] starts,
java.lang.Number[][] ends)
Constructs a DefaultIntervalCategoryDataset, populates it with data from the arrays, and uses the supplied names for the series and the supplied objects for the categories. |
|
DefaultIntervalCategoryDataset(double[][] starts,
double[][] ends)
Creates a new dataset. |
|
DefaultIntervalCategoryDataset(java.lang.Number[][] starts,
java.lang.Number[][] ends)
Constructs a dataset and populates it with data from the array. |
|
DefaultIntervalCategoryDataset(java.lang.String[] seriesNames,
java.lang.Number[][] starts,
java.lang.Number[][] ends)
Constructs a DefaultIntervalCategoryDataset, populates it with data from the arrays, and uses the supplied names for the series. |
Method Summary | |
---|---|
java.util.List |
getCategories()
Returns a list of the categories in the dataset. |
int |
getCategoryCount()
Returns the number of categories in the dataset. |
int |
getColumnCount()
Returns the number of categories in the dataset. |
int |
getColumnIndex(java.lang.Comparable columnKey)
Returns a column index. |
java.lang.Comparable |
getColumnKey(int column)
Returns a column key. |
java.util.List |
getColumnKeys()
Returns a list of the categories in the dataset. |
java.lang.Number |
getEndValue(java.lang.Comparable series,
java.lang.Comparable category)
Returns the end data value for one category in a series. |
java.lang.Number |
getEndValue(int series,
int category)
Returns the end data value for one category in a series. |
int |
getItemCount()
Returns the item count. |
int |
getRowCount()
Returns the number of series in the dataset (possibly zero). |
int |
getRowIndex(java.lang.Comparable rowKey)
Returns a row index. |
java.lang.Comparable |
getRowKey(int row)
Returns the name of the specified series. |
java.util.List |
getRowKeys()
Returns a list of the series in the dataset. |
java.util.List |
getSeries()
Returns a list of the series in the dataset. |
int |
getSeriesCount()
Returns the number of series in the dataset (possibly zero). |
int |
getSeriesIndex(java.lang.Comparable series)
Returns a series index. |
java.lang.Comparable |
getSeriesKey(int series)
Returns the name of the specified series. |
java.lang.Number |
getStartValue(java.lang.Comparable series,
java.lang.Comparable category)
Returns the start data value for one category in a series. |
java.lang.Number |
getStartValue(int series,
int category)
Returns the start data value for one category in a series. |
java.lang.Number |
getValue(java.lang.Comparable series,
java.lang.Comparable category)
Returns the data value for one category in a series. |
java.lang.Number |
getValue(int series,
int category)
Returns the data value for one category in a series. |
void |
setCategoryKeys(java.lang.Comparable[] categoryKeys)
Sets the categories for the dataset. |
void |
setEndValue(int series,
java.lang.Comparable category,
java.lang.Number value)
Sets the end data value for one category in a series. |
void |
setSeriesKeys(java.lang.Comparable[] seriesKeys)
Sets the names of the series in the dataset. |
void |
setStartValue(int series,
java.lang.Comparable category,
java.lang.Number value)
Sets the start data value for one category in a series. |
Methods inherited from class org.jfree.data.general.AbstractSeriesDataset |
---|
indexOf, seriesChanged |
Methods inherited from class org.jfree.data.general.AbstractDataset |
---|
addChangeListener, clone, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, 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 Detail |
---|
public DefaultIntervalCategoryDataset(double[][] starts, double[][] ends)
starts
- the starting values for the intervals.ends
- the ending values for the intervals.public DefaultIntervalCategoryDataset(java.lang.Number[][] starts, java.lang.Number[][] ends)
The arrays are indexed as data[series][category]. Series and category
names are automatically generated - you can change them using the
setSeriesKeys(Comparable[])
and
setCategoryKeys(Comparable[])
methods.
starts
- the start values data.ends
- the end values data.public DefaultIntervalCategoryDataset(java.lang.String[] seriesNames, java.lang.Number[][] starts, java.lang.Number[][] ends)
Category names are generated automatically ("Category 1", "Category 2", etc).
seriesNames
- the series names.starts
- the start values data, indexed as data[series][category].ends
- the end values data, indexed as data[series][category].public DefaultIntervalCategoryDataset(java.lang.Comparable[] seriesKeys, java.lang.Comparable[] categoryKeys, java.lang.Number[][] starts, java.lang.Number[][] ends)
seriesKeys
- the series keys.categoryKeys
- the categories.starts
- the start values data, indexed as data[series][category].ends
- the end values data, indexed as data[series][category].Method Detail |
---|
public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public int getItemCount()
public int getSeriesIndex(java.lang.Comparable series)
series
- the series key.
public java.lang.Comparable getSeriesKey(int series)
getSeriesKey
in interface SeriesDataset
getSeriesKey
in class AbstractSeriesDataset
series
- the index of the required series (zero-based).
public void setSeriesKeys(java.lang.Comparable[] seriesKeys)
seriesKeys
- the keys of the series in the dataset.public int getCategoryCount()
This method is part of the CategoryDataset interface.
public java.util.List getSeries()
Supports the CategoryDataset interface.
public java.util.List getCategories()
Supports the CategoryDataset interface.
public java.util.List getColumnKeys()
Supports the CategoryDataset interface.
getColumnKeys
in interface KeyedValues2D
public void setCategoryKeys(java.lang.Comparable[] categoryKeys)
categoryKeys
- an array of objects representing the categories in
the dataset.public java.lang.Number getValue(java.lang.Comparable series, java.lang.Comparable category)
This method is part of the CategoryDataset interface. Not particularly meaningful for this class...returns the end value.
getValue
in interface KeyedValues2D
series
- The required series (zero based index).category
- The required category.
public java.lang.Number getValue(int series, int category)
This method is part of the CategoryDataset interface. Not particularly meaningful for this class...returns the end value.
getValue
in interface Values2D
series
- the required series (zero based index).category
- the required category.
public java.lang.Number getStartValue(java.lang.Comparable series, java.lang.Comparable category)
getStartValue
in interface IntervalCategoryDataset
series
- the required series.category
- the required category.
null
).public java.lang.Number getStartValue(int series, int category)
getStartValue
in interface IntervalCategoryDataset
series
- the required series (zero based index).category
- the required category.
null
).public java.lang.Number getEndValue(java.lang.Comparable series, java.lang.Comparable category)
getEndValue
in interface IntervalCategoryDataset
series
- the required series.category
- the required category.
public java.lang.Number getEndValue(int series, int category)
getEndValue
in interface IntervalCategoryDataset
series
- the required series (zero based index).category
- the required category.
public void setStartValue(int series, java.lang.Comparable category, java.lang.Number value)
series
- the series (zero-based index).category
- the category.value
- The value.public void setEndValue(int series, java.lang.Comparable category, java.lang.Number value)
series
- the series (zero-based index).category
- the category.value
- the value.public java.lang.Comparable getColumnKey(int column)
getColumnKey
in interface KeyedValues2D
column
- the column index.
public int getColumnIndex(java.lang.Comparable columnKey)
getColumnIndex
in interface KeyedValues2D
columnKey
- the column key.
public int getRowIndex(java.lang.Comparable rowKey)
getRowIndex
in interface KeyedValues2D
rowKey
- the row key.
public java.util.List getRowKeys()
Supports the CategoryDataset interface.
getRowKeys
in interface KeyedValues2D
public java.lang.Comparable getRowKey(int row)
getRowKey
in interface KeyedValues2D
row
- the index of the required row/series (zero-based).
public int getColumnCount()
CategoryDataset
interface.
getColumnCount
in interface Values2D
public int getRowCount()
getRowCount
in interface Values2D
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |