Class FontReadHandler

    • Field Detail

      • font

        private java.awt.Font font
        The font under construction.
    • Constructor Detail

      • FontReadHandler

        public FontReadHandler()
        Creates a new SAX handler for reading a Font from XML.
    • 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 class AbstractXmlReadHandler
        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.