Package org.apache.batik.parser
Class PointsParser
- java.lang.Object
-
- org.apache.batik.parser.AbstractParser
-
- org.apache.batik.parser.NumberParser
-
- org.apache.batik.parser.PointsParser
-
- All Implemented Interfaces:
Localizable,Parser
public class PointsParser extends NumberParser
This class implements an event-based parser for the SVG points attribute values (used with polyline and polygon elements).- Version:
- $Id: PointsParser.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected booleaneReadWhether the last character was a 'e' or 'E'.protected PointsHandlerpointsHandlerThe points 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 PointsParser()Creates a new PointsParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoParse()Parses the current stream.PointsHandlergetPointsHandler()Returns the points handler in use.voidsetPointsHandler(PointsHandler handler)Allows an application to register a points handler.-
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, reportCharacterExpectedError, reportError, reportUnexpectedCharacterError, setErrorHandler, setLocale, skipCommaSpaces, skipSpaces
-
-
-
-
Field Detail
-
pointsHandler
protected PointsHandler pointsHandler
The points handler used to report parse events.
-
eRead
protected boolean eRead
Whether the last character was a 'e' or 'E'.
-
-
Method Detail
-
setPointsHandler
public void setPointsHandler(PointsHandler handler)
Allows an application to register a points 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.
-
getPointsHandler
public PointsHandler getPointsHandler()
Returns the points handler in use.
-
doParse
protected void doParse() throws ParseException, java.io.IOExceptionParses the current stream.- Specified by:
doParsein classAbstractParser- Throws:
ParseExceptionjava.io.IOException
-
-