Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.parser
Class PathParser

    java.lang.Object
      org.apache.batik.parser.AbstractParser
          org.apache.batik.parser.NumberParser
              org.apache.batik.parser.PathParser

All Implemented Interfaces:
  Localizable, Parser

    public class PathParser

extends NumberParser

This class implements an event-based parser for the SVG path's d attribute values.

Field Summary
`protected PathHandler` | `pathHandler` The path handler used to report parse events.

Fields inherited from class org.apache.batik.parser.AbstractParser
`BUNDLE_CLASSNAME, current, errorHandler, localizableSupport, reader`

Constructor Summary
`PathParser()` Creates a new PathParser.

Method Summary
`protected void` | `_parsel(boolean expectNumber)`
`protected void` | `_parseL(boolean expectNumber)`
`protected void` | `doParse()` Method responsible for actually parsing data after AbstractParser has initialized itself.
`PathHandler` | `getPathHandler()` Returns the path handler in use.
`protected void` | `parsea()` Parses a 'a' command.
`protected void` | `parseA()` Parses a 'A' command.
`protected void` | `parsec()` Parses a 'c' command.
`protected void` | `parseC()` Parses a 'C' command.
`protected void` | `parseh()` Parses a 'h' command.
`protected void` | `parseH()` Parses a 'H' command.
`protected void` | `parsel()` Parses a 'l' command.
`protected void` | `parseL()` Parses a 'L' command.
`protected void` | `parsem()` Parses a 'm' command.
`protected void` | `parseM()` Parses a 'M' command.
`protected void` | `parseq()` Parses a 'q' command.
`protected void` | `parseQ()` Parses a 'Q' command.
`protected void` | `parses()` Parses a 's' command.
`protected void` | `parseS()` Parses a 'S' command.
`protected void` | `parset()` Parses a 't' command.
`protected void` | `parseT()` Parses a 'T' command.
`protected void` | `parsev()` Parses a 'v' command.
`protected void` | `parseV()` Parses a 'V' command.
`protected void` | `reportUnexpected(int ch)`
`void` | `setPathHandler(PathHandler handler)` Allows an application to register a path handler.
`protected boolean` | `skipCommaSpaces2()` Skips the whitespaces and an optional comma.
`protected void` | `skipSubPath()` Skips a sub-path.

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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

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

### getPathHandler

    public PathHandler getPathHandler()

  Returns the path handler in use.

### doParse

    protected void doParse()
                    throws ParseException,
                           IOException

  Description copied from class: `AbstractParser`
  Method responsible for actually parsing data after AbstractParser has initialized itself.

  Specified by:
    `doParse` in class `AbstractParser`
  Throws:
    `ParseException`
    `IOException`

### parsem

    protected void parsem()
                   throws ParseException,
                          IOException

  Parses a 'm' command.

  Throws:
    `ParseException`
    `IOException`

### parseM

    protected void parseM()
                   throws ParseException,
                          IOException

  Parses a 'M' command.

  Throws:
    `ParseException`
    `IOException`

### parsel

    protected void parsel()
                   throws ParseException,
                          IOException

  Parses a 'l' command.

  Throws:
    `ParseException`
    `IOException`

### _parsel

    protected void _parsel(boolean expectNumber)
                    throws ParseException,
                           IOException

  Throws:
    `ParseException`
    `IOException`

### parseL

    protected void parseL()
                   throws ParseException,
                          IOException

  Parses a 'L' command.

  Throws:
    `ParseException`
    `IOException`

### _parseL

    protected void _parseL(boolean expectNumber)
                    throws ParseException,
                           IOException

  Throws:
    `ParseException`
    `IOException`

### parseh

    protected void parseh()
                   throws ParseException,
                          IOException

  Parses a 'h' command.

  Throws:
    `ParseException`
    `IOException`

### parseH

    protected void parseH()
                   throws ParseException,
                          IOException

  Parses a 'H' command.

  Throws:
    `ParseException`
    `IOException`

### parsev

    protected void parsev()
                   throws ParseException,
                          IOException

  Parses a 'v' command.

  Throws:
    `ParseException`
    `IOException`

### parseV

    protected void parseV()
                   throws ParseException,
                          IOException

  Parses a 'V' command.

  Throws:
    `ParseException`
    `IOException`

### parsec

    protected void parsec()
                   throws ParseException,
                          IOException

  Parses a 'c' command.

  Throws:
    `ParseException`
    `IOException`

### parseC

    protected void parseC()
                   throws ParseException,
                          IOException

  Parses a 'C' command.

  Throws:
    `ParseException`
    `IOException`

### parseq

    protected void parseq()
                   throws ParseException,
                          IOException

  Parses a 'q' command.

  Throws:
    `ParseException`
    `IOException`

### parseQ

    protected void parseQ()
                   throws ParseException,
                          IOException

  Parses a 'Q' command.

  Throws:
    `ParseException`
    `IOException`

### parses

    protected void parses()
                   throws ParseException,
                          IOException

  Parses a 's' command.

  Throws:
    `ParseException`
    `IOException`

### parseS

    protected void parseS()
                   throws ParseException,
                          IOException

  Parses a 'S' command.

  Throws:
    `ParseException`
    `IOException`

### parset

    protected void parset()
                   throws ParseException,
                          IOException

  Parses a 't' command.

  Throws:
    `ParseException`
    `IOException`

### parseT

    protected void parseT()
                   throws ParseException,
                          IOException

  Parses a 'T' command.

  Throws:
    `ParseException`
    `IOException`

### parsea

    protected void parsea()
                   throws ParseException,
                          IOException

  Parses a 'a' command.

  Throws:
    `ParseException`
    `IOException`

### parseA

    protected void parseA()
                   throws ParseException,
                          IOException

  Parses a 'A' command.

  Throws:
    `ParseException`
    `IOException`

### skipSubPath

    protected void skipSubPath()
                        throws ParseException,
                               IOException

  Skips a sub-path.

  Throws:
    `ParseException`
    `IOException`

### reportUnexpected

    protected void reportUnexpected(int ch)
                             throws ParseException,
                                    IOException

  Throws:
    `ParseException`
    `IOException`

### skipCommaSpaces2

    protected boolean skipCommaSpaces2()
                                throws IOException

  Skips the whitespaces and an optional comma.

  Returns:
    true if comma was skipped.
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.