|
||||||||||
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.category.CategoryToPieDataset
A PieDataset
implementation that obtains its data from one row or column of a
CategoryDataset
.
Constructor Summary | |
CategoryToPieDataset(CategoryDataset source,
TableOrder extract,
int index)
An adaptor class that converts any CategoryDataset into a PieDataset , by
taking the values from a single row or column. |
Method Summary | |
void |
datasetChanged(DatasetChangeEvent event)
Passes the DatasetChangeEvent through. |
int |
getIndex(java.lang.Comparable key)
Returns the index for a given key. |
int |
getItemCount()
Returns the number of items (values) in the collection. |
java.lang.Comparable |
getKey(int index)
Returns a key. |
java.util.List |
getKeys()
Returns the keys. |
java.lang.Number |
getValue(java.lang.Comparable key)
Returns the value for a given key. |
java.lang.Number |
getValue(int item)
Returns a value. |
Methods inherited from class org.jfree.data.general.AbstractDataset |
addChangeListener, clone, fireDatasetChanged, getGroup, 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 CategoryToPieDataset(CategoryDataset source, TableOrder extract, int index)
CategoryDataset
into a PieDataset
, by
taking the values from a single row or column.
source
- the source dataset (null
permitted).extract
- extract data from rows or columns? (null
not permitted).index
- the row or column index.Method Detail |
public int getItemCount()
null
, this method returns zero.
getItemCount
in interface Values
public java.lang.Number getValue(int item)
getValue
in interface Values
item
- the item index (zero-based).
null
).public java.lang.Comparable getKey(int index)
getKey
in interface KeyedValues
index
- the item index (zero-based).
public int getIndex(java.lang.Comparable key)
getIndex
in interface KeyedValues
key
- the key.
public java.util.List getKeys()
getKeys
in interface KeyedValues
public java.lang.Number getValue(java.lang.Comparable key)
null
(but note that null
can be associated with a
valid key also).
getValue
in interface KeyedValues
key
- the key.
null
).public void datasetChanged(DatasetChangeEvent event)
DatasetChangeEvent
through.
datasetChanged
in interface DatasetChangeListener
event
- the event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |