Package org.jfree.xml.parser.coretypes
Class BasicStrokeReadHandler
- java.lang.Object
-
- org.jfree.xml.parser.AbstractXmlReadHandler
-
- org.jfree.xml.parser.coretypes.BasicStrokeReadHandler
-
- All Implemented Interfaces:
XmlReadHandler
public class BasicStrokeReadHandler extends AbstractXmlReadHandler
A SAX handler for reading aBasicStroke
object from XML.To do: this should have a multiplexer in front like the PaintReadHandler
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.BasicStroke
stroke
The stroke under construction.
-
Constructor Summary
Constructors Constructor Description BasicStrokeReadHandler()
Creates a new handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getObject()
Returns the stroke under construction.private float[]
parseDashArray(java.lang.String string)
Parses the dash array.protected void
startParsing(org.xml.sax.Attributes attrs)
Called at the start of parsing aBasicStroke
element, this method reads the attributes and constructs the stroke.-
Methods inherited from class org.jfree.xml.parser.AbstractXmlReadHandler
characters, doneParsing, endElement, getHandlerForChild, getRootHandler, getTagName, init, startElement
-
-
-
-
Method Detail
-
startParsing
protected void startParsing(org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
Called at the start of parsing aBasicStroke
element, this method reads the attributes and constructs the stroke.- Overrides:
startParsing
in classAbstractXmlReadHandler
- Parameters:
attrs
- the attributes.- Throws:
org.xml.sax.SAXException
- to indicate a parsing error.
-
parseDashArray
private float[] parseDashArray(java.lang.String string)
Parses the dash array.- Parameters:
string
- the dash array string representation.- Returns:
- a dash array.
-
getObject
public java.lang.Object getObject()
Returns the stroke under construction.- Returns:
- the stroke.
-
-