java.lang.Object
io.sf.carte.echosvg.parser.AbstractParser
io.sf.carte.echosvg.parser.NumberParser
io.sf.carte.echosvg.parser.TransformListParser
- All Implemented Interfaces:
Localizable
,Parser
This class implements an event-based parser for the SVG transform attribute
values.
-
Field Summary
Modifier and TypeFieldDescriptionprotected TransformListHandler
The transform list handler used to report parse events.Fields inherited from class io.sf.carte.echosvg.parser.AbstractParser
BUNDLE_CLASSNAME, current, errorHandler, localizableSupport, reader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doParse()
Parses the current reader.Returns the transform list handler in use.protected void
Parses a matrix transform.protected void
Parses a rotate transform.protected void
Parses a scale transform.protected void
Parses a skew transform.protected void
Parses a translate transform.void
Allows an application to register a transform list handler.protected void
Skips characters in the given reader until a ')' is encountered.Methods inherited from class io.sf.carte.echosvg.parser.NumberParser
buildFloat, handleCalc, parseFloat
Methods inherited from class io.sf.carte.echosvg.parser.AbstractParser
createErrorMessage, formatMessage, getBundleClassName, getCurrent, getLocale, parse, parse, parse, reportCharacterExpectedError, reportError, reportUnexpectedCharacterError, setErrorHandler, setLocale, skipCommaSpaces, skipSpaces
-
Field Details
-
transformListHandler
The transform list handler used to report parse events.
-
-
Constructor Details
-
TransformListParser
public TransformListParser()Creates a new TransformListParser.
-
-
Method Details
-
setTransformListHandler
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
Returns the transform list handler in use. -
doParse
Parses the current reader.- Specified by:
doParse
in classAbstractParser
- Throws:
ParseException
IOException
-
parseMatrix
Parses a matrix transform. 'm' is assumed to be the current character.- Throws:
ParseException
IOException
-
parseRotate
Parses a rotate transform. 'r' is assumed to be the current character.- Throws:
ParseException
IOException
-
parseTranslate
Parses a translate transform. 't' is assumed to be the current character.- Throws:
ParseException
IOException
-
parseScale
Parses a scale transform. 'c' is assumed to be the current character.- Throws:
ParseException
IOException
-
parseSkew
Parses a skew transform. 'e' is assumed to be the current character.- Throws:
ParseException
IOException
-
skipTransform
Skips characters in the given reader until a ')' is encountered.- Throws:
IOException
-