Class TransformListParser

  • All Implemented Interfaces:
    Localizable, Parser

    public class TransformListParser
    extends NumberParser
    This class implements an event-based parser for the SVG transform attribute values.
    • Field Detail

      • transformListHandler

        protected TransformListHandler transformListHandler
        The transform list handler used to report parse events.
    • Constructor Detail

      • TransformListParser

        public TransformListParser()
        Creates a new TransformListParser.
    • Method Detail

      • setTransformListHandler

        public void setTransformListHandler​(TransformListHandler handler)
        Allows an application to register a transform list handler.

        If the application does not register a handler, all events reported by the parser will be silently ignored.

        Applications may register a new or different handler in the middle of a parse, and the parser must begin using the new handler immediately.

        Parameters:
        handler - The transform handler.
      • getTransformListHandler

        public TransformListHandler getTransformListHandler()
        Returns the transform list handler in use.
      • parseMatrix

        protected void parseMatrix()
                            throws ParseException,
                                   java.io.IOException
        Parses a matrix transform. 'm' is assumed to be the current character.
        Throws:
        ParseException
        java.io.IOException
      • parseRotate

        protected void parseRotate()
                            throws ParseException,
                                   java.io.IOException
        Parses a rotate transform. 'r' is assumed to be the current character.
        Throws:
        ParseException
        java.io.IOException
      • parseTranslate

        protected void parseTranslate()
                               throws ParseException,
                                      java.io.IOException
        Parses a translate transform. 't' is assumed to be the current character.
        Throws:
        ParseException
        java.io.IOException
      • parseScale

        protected void parseScale()
                           throws ParseException,
                                  java.io.IOException
        Parses a scale transform. 'c' is assumed to be the current character.
        Throws:
        ParseException
        java.io.IOException
      • parseSkew

        protected void parseSkew()
                          throws ParseException,
                                 java.io.IOException
        Parses a skew transform. 'e' is assumed to be the current character.
        Throws:
        ParseException
        java.io.IOException
      • skipTransform

        protected void skipTransform()
                              throws java.io.IOException
        Skips characters in the given reader until a ')' is encountered.
        Throws:
        java.io.IOException