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).


Field Summary
protected  boolean eRead
          Whether the last character was a 'e' or 'E'.
protected  PointsHandler pointsHandler
          The points handler used to report parse events.
 
Fields inherited from class org.apache.batik.parser.NumberParser
buffer, bufferSize
 
Fields inherited from class org.apache.batik.parser.AbstractParser
BUNDLE_CLASSNAME, column, count, current, errorHandler, line, localizableSupport, position, previous, reader
 
Constructor Summary
PointsParser()
          Creates a new PointsParser.
 
Method Summary
 PointsHandler getPointsHandler()
          Returns the points handler in use.
 void parse(java.io.Reader r)
          Parses the given reader.
protected  void readNumber()
          Implements NumberParser.readNumber().
 void setPointsHandler(PointsHandler handler)
          Allows an application to register a points handler.
 
Methods inherited from class org.apache.batik.parser.NumberParser
bufferize, getBufferContent, parseFloat
 
Methods inherited from class org.apache.batik.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
 

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'.
Constructor Detail

PointsParser

public PointsParser()
Creates a new PointsParser.
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.

parse

public void parse(java.io.Reader r)
           throws ParseException
Parses the given reader.

readNumber

protected void readNumber()
                   throws ParseException
Implements NumberParser.readNumber().
Overrides:
readNumber in class NumberParser


Copyright © 2001 Apache Software Foundation. All Rights Reserved.