org.jfree.data.xml

Class PieDatasetHandler

Implemented Interfaces:
DatasetTags

public class PieDatasetHandler
extends RootHandler
implements DatasetTags

A SAX handler for reading a PieDataset from an XML file.

Fields inherited from interface org.jfree.data.xml.DatasetTags

CATEGORYDATASET_TAG, ITEM_TAG, KEY_TAG, PIEDATASET_TAG, SERIES_TAG, VALUE_TAG

Constructor Summary

PieDatasetHandler()
Default constructor.

Method Summary

void
addItem(Comparable key, Number value)
Adds an item to the dataset under construction.
void
endElement(String namespaceURI, String localName, String qName)
The end of an element.
PieDataset
getDataset()
Returns the dataset.
void
startElement(String namespaceURI, String localName, String qName, Attributes atts)
Starts an element.

Methods inherited from class org.jfree.data.xml.RootHandler

characters, getCurrentHandler, getSubHandlers, popSubHandler, pushSubHandler

Constructor Details

PieDatasetHandler

public PieDatasetHandler()
Default constructor.

Method Details

addItem

public void addItem(Comparable key,
                    Number value)
Adds an item to the dataset under construction.
Parameters:
key - the key.
value - the value.

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
            throws SAXException
The end of an element.
Parameters:
namespaceURI - the namespace.
localName - the element name.
qName - the element name.

getDataset

public PieDataset getDataset()
Returns the dataset.
Returns:
The dataset.

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
            throws SAXException
Starts an element.
Parameters:
namespaceURI - the namespace.
localName - the element name.
qName - the element name.
atts - the element attributes.