org.apache.batik.parser

Class PathParser

public class PathParser extends NumberParser

This class implements an event-based parser for the SVG path's d attribute values.
Field Summary
protected PathHandlerpathHandler
The path handler used to report parse events.
Constructor Summary
PathParser()
Creates a new PathParser.
Method Summary
protected voiddoParse()
PathHandlergetPathHandler()
Returns the path handler in use.
protected voidparseA()
Parses a 'A' command.
protected voidparsea()
Parses a 'a' command.
protected voidparsec()
Parses a 'c' command.
protected voidparseC()
Parses a 'C' command.
protected voidparseh()
Parses a 'h' command.
protected voidparseH()
Parses a 'H' command.
protected voidparsel()
Parses a 'l' command.
protected voidparseL()
Parses a 'L' command.
protected voidparsem()
Parses a 'm' command.
protected voidparseM()
Parses a 'M' command.
protected voidparseq()
Parses a 'q' command.
protected voidparseQ()
Parses a 'Q' command.
protected voidparses()
Parses a 's' command.
protected voidparseS()
Parses a 'S' command.
protected voidparset()
Parses a 't' command.
protected voidparseT()
Parses a 'T' command.
protected voidparsev()
Parses a 'v' command.
protected voidparseV()
Parses a 'V' command.
protected voidreportUnexpected(int ch)
voidsetPathHandler(PathHandler handler)
Allows an application to register a path handler.
protected booleanskipCommaSpaces2()
Skips the whitespaces and an optional comma.
protected voidskipSubPath()
Skips a sub-path.
protected void_parsel(boolean expectNumber)
protected void_parseL(boolean expectNumber)

Field Detail

pathHandler

protected PathHandler pathHandler
The path handler used to report parse events.

Constructor Detail

PathParser

public PathParser()
Creates a new PathParser.

Method Detail

doParse

protected void doParse()

getPathHandler

public PathHandler getPathHandler()
Returns the path handler in use.

parseA

protected void parseA()
Parses a 'A' command.

parsea

protected void parsea()
Parses a 'a' command.

parsec

protected void parsec()
Parses a 'c' command.

parseC

protected void parseC()
Parses a 'C' command.

parseh

protected void parseh()
Parses a 'h' command.

parseH

protected void parseH()
Parses a 'H' command.

parsel

protected void parsel()
Parses a 'l' command.

parseL

protected void parseL()
Parses a 'L' command.

parsem

protected void parsem()
Parses a 'm' command.

parseM

protected void parseM()
Parses a 'M' command.

parseq

protected void parseq()
Parses a 'q' command.

parseQ

protected void parseQ()
Parses a 'Q' command.

parses

protected void parses()
Parses a 's' command.

parseS

protected void parseS()
Parses a 'S' command.

parset

protected void parset()
Parses a 't' command.

parseT

protected void parseT()
Parses a 'T' command.

parsev

protected void parsev()
Parses a 'v' command.

parseV

protected void parseV()
Parses a 'V' command.

reportUnexpected

protected void reportUnexpected(int ch)

setPathHandler

public void setPathHandler(PathHandler handler)
Allows an application to register a path 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.

skipCommaSpaces2

protected boolean skipCommaSpaces2()
Skips the whitespaces and an optional comma.

Returns: true if comma was skipped.

skipSubPath

protected void skipSubPath()
Skips a sub-path.

_parsel

protected void _parsel(boolean expectNumber)

_parseL

protected void _parseL(boolean expectNumber)
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.