org.apache.batik.refimpl.parser
Class ConcreteTransformListParser
java.lang.Object
|
+--org.apache.batik.refimpl.parser.AbstractParser
|
+--org.apache.batik.refimpl.parser.NumberParser
|
+--org.apache.batik.refimpl.parser.ConcreteTransformListParser
- All Implemented Interfaces:
- Localizable, Parser, TransformListParser
- public class ConcreteTransformListParser
- extends NumberParser
- implements TransformListParser
This class implements an event-based parser for the SVG transform
attribute values.
Methods inherited from class org.apache.batik.refimpl.parser.AbstractParser |
createErrorMessage, formatMessage, getBundleClassName, getCurrent, getLocale, initialize, read, reportError, setErrorHandler, setLocale, skipCommaSpaces, skipSpaces |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transformListHandler
protected TransformListHandler transformListHandler
- The transform list handler used to report parse events.
ConcreteTransformListParser
public ConcreteTransformListParser()
- Creates a new TransformListParser.
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.
- Specified by:
setTransformListHandler
in interface TransformListParser
- Parameters:
handler
- The transform handler.
getTransformListHandler
public TransformListHandler getTransformListHandler()
- Returns the transform list handler in use.
- Specified by:
getTransformListHandler
in interface TransformListParser
parse
public void parse(java.io.Reader r)
throws ParseException
- Parses the given reader.
- Specified by:
parse
in interface Parser
parseMatrix
protected void parseMatrix()
throws ParseException
- Parses a matrix transform. 'm' is assumed to be the current character.
parseRotate
protected void parseRotate()
throws ParseException
- Parses a rotate transform. 'r' is assumed to be the current character.
- Returns:
- the current character.
parseTranslate
protected void parseTranslate()
throws ParseException
- Parses a translate transform. 't' is assumed to be
the current character.
- Returns:
- the current character.
parseScale
protected void parseScale()
throws ParseException
- Parses a scale transform. 'c' is assumed to be the current character.
- Returns:
- the current character.
parseSkew
protected void parseSkew()
throws ParseException
- Parses a skew transform. 'e' is assumed to be the current character.
- Returns:
- the current character.
skipTransform
protected void skipTransform()
- Skips characters in the given reader until a ')' is encountered.
- Returns:
- the first character after the ')'.
readNumber
protected void readNumber()
throws ParseException
- Implements
NumberParser.readNumber()
.
- Overrides:
readNumber
in class NumberParser
Copyright © 2000 Apache Software Foundation. All Rights Reserved.