Class BasicStrokeReadHandler

java.lang.Object
org.jfree.xml.parser.AbstractXmlReadHandler
org.jfree.xml.parser.coretypes.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 Details

    • stroke

      private BasicStroke stroke
      The stroke under construction.
  • Constructor Details

    • BasicStrokeReadHandler

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

    • startParsing

      protected void startParsing(Attributes attrs) throws 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:
      SAXException - to indicate a parsing error.
    • parseDashArray

      private float[] parseDashArray(String string)
      Parses the dash array.
      Parameters:
      string - the dash array string representation.
      Returns:
      a dash array.
    • getObject

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