Save This Page
Home » jcommon-1.0.13 » org.jfree » data » category » [javadoc | source]
org.jfree.data.category
public class: CategoryToPieDataset [javadoc | source]
java.lang.Object
   org.jfree.data.general.AbstractDataset
      org.jfree.data.category.CategoryToPieDataset

All Implemented Interfaces:
    PieDataset, DatasetChangeListener, Cloneable, Dataset, ObjectInputValidation, Serializable

A PieDataset implementation that obtains its data from one row or column of a CategoryDataset .
Field Summary
static final  long serialVersionUID    For serialization. 
Constructor:
 public 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.

    If source is null, the created dataset will be empty.

    Parameters:
    source - the source dataset (null permitted).
    extract - extract data from rows or columns? (null not permitted).
    index - the row or column index.
Method from org.jfree.data.category.CategoryToPieDataset Summary:
datasetChanged,   equals,   getExtractIndex,   getExtractType,   getIndex,   getItemCount,   getKey,   getKeys,   getUnderlyingDataset,   getValue,   getValue
Methods from org.jfree.data.general.AbstractDataset:
addChangeListener,   clone,   fireDatasetChanged,   getGroup,   hasListener,   notifyListeners,   removeChangeListener,   setGroup,   validateObject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.data.category.CategoryToPieDataset Detail:
 public  void datasetChanged(DatasetChangeEvent event) 
    Sends a DatasetChangeEvent to all registered listeners, with this (not the underlying) dataset as the source.
 public boolean equals(Object obj) 
    Tests this dataset for equality with an arbitrary object, returning true if obj is a dataset containing the same keys and values in the same order as this dataset.
 public int getExtractIndex() 
    Returns the index of the row or column from which to extract the data.
 public TableOrder getExtractType() 
    Returns the extract type, which determines whether data is read from one row or one column of the underlying dataset.
 public int getIndex(Comparable key) 
    Returns the index for a given key, or -1 if there is no such key.
 public int getItemCount() 
    Returns the number of items (values) in the collection. If the underlying dataset is null, this method returns zero.
 public Comparable getKey(int index) 
    Returns the key at the specified index.
 public List getKeys() 
    Returns the keys for the dataset.

    If the underlying dataset is null, this method returns an empty list.

 public CategoryDataset getUnderlyingDataset() 
    Returns the underlying dataset.
 public Number getValue(int item) 
    Returns a value from the dataset.
 public Number getValue(Comparable key) 
    Returns the value for a given key. If the key is not recognised, the method should return null (but note that null can be associated with a valid key also).