|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.jfree.data.AbstractDataset
|
+--org.jfree.data.CategoryToPieDataset
A PieDataset implementation that obtains its data from one row or column of a
CategoryDataset.
| Field Summary | |
static int |
COLUMN
A constant indicating that data should be extracted from a column. |
static int |
ROW
A constant indicating that data should be extracted from a row. |
| Constructor Summary | |
CategoryToPieDataset(CategoryDataset source,
int 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 | |
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 (possibly null) for a given key. |
java.lang.Number |
getValue(int item)
Returns a value. |
| Methods inherited from class org.jfree.data.AbstractDataset |
addChangeListener, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jfree.data.Dataset |
addChangeListener, getGroup, removeChangeListener, setGroup |
| Field Detail |
public static final int ROW
public static final int COLUMN
| Constructor Detail |
public CategoryToPieDataset(CategoryDataset source,
int extract,
int index)
CategoryDataset into a PieDataset, by
taking the values from a single row or column.
source - the source dataset.extract - ROW or COLUMN.index - the row or column index.| Method Detail |
public int getItemCount()
getItemCount in interface Valuespublic java.lang.Number getValue(int item)
getValue in interface Valuesitem - the item index (zero-based).
public java.lang.Comparable getKey(int index)
getKey in interface KeyedValuesindex - the item index (zero-based).
public int getIndex(java.lang.Comparable key)
getIndex in interface KeyedValueskey - the key.
public java.util.List getKeys()
getKeys in interface KeyedValuespublic java.lang.Number getValue(java.lang.Comparable key)
If the key is not recognised, the method should return null.
getValue in interface KeyedValueskey - the key.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||