Package org.jfree.xml.parser.coretypes
Class GradientPaintReadHandler
- java.lang.Object
-
- org.jfree.xml.parser.AbstractXmlReadHandler
-
- org.jfree.xml.parser.coretypes.GradientPaintReadHandler
-
- All Implemented Interfaces:
XmlReadHandler
public class GradientPaintReadHandler extends AbstractXmlReadHandler
A SAX handler for reading aGradientPaintfrom an XML element.
-
-
Field Summary
Fields Modifier and Type Field Description private XmlReadHandlercolor1HandlerThe handler for color 1.private XmlReadHandlercolor2HandlerThe handler for color 2.private java.awt.GradientPaintgradientThe gradient paint under construction.private XmlReadHandlerpoint1HandlerThe handler for point 1.private XmlReadHandlerpoint2HandlerThe handler for point 2.
-
Constructor Summary
Constructors Constructor Description GradientPaintReadHandler()Creates a new handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoneParsing()At the end of parsing the element, the gradient paint is constructed.protected XmlReadHandlergetHandlerForChild(java.lang.String tagName, org.xml.sax.Attributes atts)Returns the handler for a child element.java.lang.ObjectgetObject()Returns the gradient paint under construction.-
Methods inherited from class org.jfree.xml.parser.AbstractXmlReadHandler
characters, endElement, getRootHandler, getTagName, init, startElement, startParsing
-
-
-
-
Field Detail
-
gradient
private java.awt.GradientPaint gradient
The gradient paint under construction.
-
color1Handler
private XmlReadHandler color1Handler
The handler for color 1.
-
color2Handler
private XmlReadHandler color2Handler
The handler for color 2.
-
point1Handler
private XmlReadHandler point1Handler
The handler for point 1.
-
point2Handler
private XmlReadHandler point2Handler
The handler for point 2.
-
-
Method Detail
-
getObject
public java.lang.Object getObject()
Returns the gradient paint under construction.- Returns:
- the gradient paint.
-
getHandlerForChild
protected XmlReadHandler getHandlerForChild(java.lang.String tagName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException, XmlReaderException
Returns the handler for a child element.- Overrides:
getHandlerForChildin classAbstractXmlReadHandler- Parameters:
tagName- the tag name.atts- the attributes.- Returns:
- the handler.
- Throws:
org.xml.sax.SAXException- to indicate a parsing error.XmlReaderException- if there is a reader error.
-
doneParsing
protected void doneParsing() throws XmlReaderExceptionAt the end of parsing the element, the gradient paint is constructed.- Overrides:
doneParsingin classAbstractXmlReadHandler- Throws:
XmlReaderException- if there is a parsing error.
-
-