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
A SAX handler for reading a font definition.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
getFontStyle
(String style) Converts a string to a font style constant.Returns the font under construction.protected void
startParsing
(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
-
Field Details
-
font
The font under construction.
-
-
Constructor Details
-
FontReadHandler
public FontReadHandler()Creates a new SAX handler for reading aFont
from XML.
-
-
Method Details
-
startParsing
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:
SAXException
- to indicate a parsing error.
-
getFontStyle
Converts a string to a font style constant.- Parameters:
style
- the style as text.- Returns:
- The font style.
-
getObject
Returns the font under construction.- Returns:
- the font.
-