Class BasicStrokeReadHandler

  • All Implemented Interfaces:
    XmlReadHandler

    public class BasicStrokeReadHandler
    extends AbstractXmlReadHandler
    A SAX handler for reading a BasicStroke object from XML.

    To do: this should have a multiplexer in front like the PaintReadHandler

    • Field Detail

      • stroke

        private java.awt.BasicStroke stroke
        The stroke under construction.
    • Constructor Detail

      • BasicStrokeReadHandler

        public BasicStrokeReadHandler()
        Creates a new handler.
    • Method Detail

      • startParsing

        protected void startParsing​(org.xml.sax.Attributes attrs)
                             throws org.xml.sax.SAXException
        Called at the start of parsing a BasicStroke element, this method reads the attributes and constructs the stroke.
        Overrides:
        startParsing in class AbstractXmlReadHandler
        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.