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 Details

    • font

      private Font font
      The font under construction.
  • Constructor Details

    • FontReadHandler

      public FontReadHandler()
      Creates a new SAX handler for reading a Font from XML.
  • Method Details

    • startParsing

      protected void startParsing(Attributes attrs) throws SAXException
      Called at the start of parsing a font element, this method reads the attributes and constructs the font.
      Overrides:
      startParsing in class AbstractXmlReadHandler
      Parameters:
      attrs - the attributes.
      Throws:
      SAXException - to indicate a parsing error.
    • getFontStyle

      private int getFontStyle(String style)
      Converts a string to a font style constant.
      Parameters:
      style - the style as text.
      Returns:
      The font style.
    • getObject

      public Object getObject()
      Returns the font under construction.
      Returns:
      the font.