public class PieDatasetHandler extends RootHandler implements DatasetTags
PieDataset
from an XML file.CATEGORYDATASET_TAG, ITEM_TAG, KEY_TAG, PIEDATASET_TAG, SERIES_TAG, VALUE_TAG
Constructor and Description |
---|
PieDatasetHandler()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(java.lang.Comparable key,
java.lang.Number value)
Adds an item to the dataset under construction.
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
The end of an element.
|
PieDataset |
getDataset()
Returns the dataset.
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Starts an element.
|
characters, getCurrentHandler, getSubHandlers, popSubHandler, pushSubHandler
public PieDatasetHandler()
public PieDataset getDataset()
public void addItem(java.lang.Comparable key, java.lang.Number value)
key
- the key.value
- the value.public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- the namespace.localName
- the element name.qName
- the element name.atts
- the element attributes.org.xml.sax.SAXException
- for errors.public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- the namespace.localName
- the element name.qName
- the element name.org.xml.sax.SAXException
- for errors.