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
Fields inherited from class io.sf.carte.echosvg.parser.AbstractParser
BUNDLE_CLASSNAME, current, errorHandler, localizableSupport, reader -
Constructor Summary
ConstructorsConstructorDescriptionTransformListParser(TransformListHandler handler) Creates a new TransformListParser with the given handler. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoParse()Parses the current reader.Returns the transform list handler in use.protected voidParses a matrix transform.protected voidParses a rotate transform.protected voidParses a scale transform.protected voidParses a skew transform.protected voidParses a translate transform.voidAllows an application to register a transform list handler.protected voidSkips characters in the given reader until a ')' is encountered.Methods inherited from class io.sf.carte.echosvg.parser.NumberParser
buildFloat, parseFloatMethods inherited from class io.sf.carte.echosvg.parser.AbstractParser
createErrorMessage, formatMessage, getBundleClassName, getCurrent, getLocale, getPreferredUnit, handleCalc, handleIdent, handleListEnd, handleListStart, handleMathExpression, handleMathFunction, handleNumber, parse, parse, parse, reportCharacterExpectedError, reportError, reportUnexpectedCharacterError, setErrorHandler, setLocale, skipCommaSpaces, skipSpaces
-
Constructor Details
-
TransformListParser
Creates a new TransformListParser with the given handler.- Parameters:
handler- The transform handler.
-
-
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:
doParsein classAbstractParser- Throws:
ParseExceptionIOException
-
parseMatrix
Parses a matrix transform. 'm' is assumed to be the current character.- Throws:
ParseExceptionIOException
-
parseRotate
Parses a rotate transform. 'r' is assumed to be the current character.- Throws:
ParseExceptionIOException
-
parseTranslate
Parses a translate transform. 't' is assumed to be the current character.- Throws:
ParseExceptionIOException
-
parseScale
Parses a scale transform. 'c' is assumed to be the current character.- Throws:
ParseExceptionIOException
-
parseSkew
Parses a skew transform. 'e' is assumed to be the current character.- Throws:
ParseExceptionIOException
-
skipTransform
Skips characters in the given reader until a ')' is encountered.- Throws:
IOException
-