## org.apache.batik.parser
Class TransformListParser

    java.lang.Object
      org.apache.batik.parser.AbstractParser
          org.apache.batik.parser.NumberParser
              org.apache.batik.parser.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 Summary
`protected TransformListHandler` `transformListHandler` The transform list handler used to report parse events.

Fields inherited from class org.apache.batik.parser.AbstractParser
`BUNDLE_CLASSNAME, current, errorHandler, localizableSupport, reader`

Constructor Summary
`TransformListParser()` Creates a new TransformListParser.

Method Summary
`protected void` `doParse()` Parses the current reader.
`TransformListHandler` `getTransformListHandler()` Returns the transform list handler in use.
`protected void` `parseMatrix()` Parses a matrix transform.
`protected void` `parseRotate()` Parses a rotate transform.
`protected void` `parseScale()` Parses a scale transform.
`protected void` `parseSkew()` Parses a skew transform.
`protected void` `parseTranslate()` Parses a translate transform.
`void` `setTransformListHandler(TransformListHandler handler)` Allows an application to register a transform list handler.
`protected void` `skipTransform()` Skips characters in the given reader until a ')' is encountered.

Methods inherited from class org.apache.batik.parser.NumberParser
`buildFloat, parseFloat`

Methods inherited from class org.apache.batik.parser.AbstractParser
`createErrorMessage, formatMessage, getBundleClassName, getCurrent, getLocale, parse, parse, parse, reportError, setErrorHandler, setLocale, skipCommaSpaces, skipSpaces`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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.

### doParse

    protected void doParse()
                    throws ParseException,
                           java.io.IOException

  Parses the current reader.

  Specified by:
    `doParse` in class `AbstractParser`
  Throws:
    `ParseException`
    `java.io.IOException`

### 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.

  Returns:
    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.

  Returns:
    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.

  Returns:
    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.

  Returns:
    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.

  Returns:
    the first character after the ')'.
  Throws:
    `java.io.IOException`

Copyright © 2004 Apache Software Foundation. All Rights Reserved.