Package org.apache.batik.parser
Class LengthParser
- java.lang.Object
-
- org.apache.batik.parser.AbstractParser
-
- org.apache.batik.parser.LengthParser
-
- All Implemented Interfaces:
Localizable,Parser
- Direct Known Subclasses:
LengthListParser
public class LengthParser extends AbstractParser
This class implements an event-based parser for the SVG length values.- Version:
- $Id: LengthParser.java 1802297 2017-07-18 13:58:12Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description protected LengthHandlerlengthHandlerThe length handler used to report parse events.-
Fields inherited from class org.apache.batik.parser.AbstractParser
BUNDLE_CLASSNAME, current, errorHandler, localizableSupport, reader
-
-
Constructor Summary
Constructors Constructor Description LengthParser()Creates a new LengthParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoParse()Method responsible for actually parsing data after AbstractParser has initialized itself.LengthHandlergetLengthHandler()Returns the length handler in use.protected voidparseLength()Parses a length value.voidsetLengthHandler(LengthHandler handler)Allows an application to register a length handler.-
Methods inherited from class org.apache.batik.parser.AbstractParser
createErrorMessage, formatMessage, getBundleClassName, getCurrent, getLocale, parse, parse, parse, reportCharacterExpectedError, reportError, reportUnexpectedCharacterError, setErrorHandler, setLocale, skipCommaSpaces, skipSpaces
-
-
-
-
Field Detail
-
lengthHandler
protected LengthHandler lengthHandler
The length handler used to report parse events.
-
-
Method Detail
-
setLengthHandler
public void setLengthHandler(LengthHandler handler)
Allows an application to register a length 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 list handler.
-
getLengthHandler
public LengthHandler getLengthHandler()
Returns the length handler in use.
-
doParse
protected void doParse() throws ParseException, java.io.IOExceptionDescription copied from class:AbstractParserMethod responsible for actually parsing data after AbstractParser has initialized itself.- Specified by:
doParsein classAbstractParser- Throws:
ParseExceptionjava.io.IOException
-
parseLength
protected void parseLength() throws ParseException, java.io.IOExceptionParses a length value.- Throws:
ParseExceptionjava.io.IOException
-
-