Package org.jfree.xml.parser.coretypes
Class FontReadHandler
- java.lang.Object
-
- org.jfree.xml.parser.AbstractXmlReadHandler
-
- org.jfree.xml.parser.coretypes.FontReadHandler
-
- All Implemented Interfaces:
XmlReadHandler
public class FontReadHandler extends AbstractXmlReadHandler
A SAX handler for reading a font definition.
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Font
font
The font under construction.
-
Constructor Summary
Constructors Constructor Description FontReadHandler()
Creates a new SAX handler for reading aFont
from XML.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
getFontStyle(java.lang.String style)
Converts a string to a font style constant.java.lang.Object
getObject()
Returns the font under construction.protected void
startParsing(org.xml.sax.Attributes attrs)
Called at the start of parsing a font element, this method reads the attributes and constructs the font.-
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 a font element, this method reads the attributes and constructs the font.- Overrides:
startParsing
in classAbstractXmlReadHandler
- Parameters:
attrs
- the attributes.- Throws:
org.xml.sax.SAXException
- to indicate a parsing error.
-
getFontStyle
private int getFontStyle(java.lang.String style)
Converts a string to a font style constant.- Parameters:
style
- the style as text.- Returns:
- The font style.
-
getObject
public java.lang.Object getObject()
Returns the font under construction.- Returns:
- the font.
-
-