AWTPolylineProducer (JGraph X 2.1.0.7 API Specification)
Date: 2013-07-31

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

## com.mxgraph.util.svg
Class AWTPolylineProducer

    java.lang.Object
      com.mxgraph.util.svg.AWTPolylineProducer

All Implemented Interfaces:
  PointsHandler, ShapeProducer

Direct Known Subclasses:
  AWTPolygonProducer

    public class AWTPolylineProducer

extends Object
implements PointsHandler, ShapeProducer

This class produces a polyline shape from a reader.

Field Summary
`protected boolean` | `newPath` Is the current path a new one?
`protected GeneralPath` | `path` The current path.
`protected int` | `windingRule` The winding rule to use to construct the path.

Constructor Summary
`AWTPolylineProducer()`

Method Summary
`static Shape` | `createShape(String text, int wr)` Utility method for creating an ExtendedGeneralPath.
`void` | `endPoints()` Implements `PointsHandler.endPoints()`.
`Shape` | `getShape()` Returns the Shape object initialized during the last parsing.
`int` | `getWindingRule()` Returns the current winding rule.
`void` | `point(float x, float y)` Implements `PointsHandler.point(float,float)`.
`void` | `setWindingRule(int i)` Sets the winding rule used to construct the path.
`void` | `startPoints()` Implements `PointsHandler.startPoints()`.

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

Field Detail

### path

    protected GeneralPath path

  The current path.

### newPath

    protected boolean newPath

  Is the current path a new one?

### windingRule

    protected int windingRule

  The winding rule to use to construct the path.

Constructor Detail

### AWTPolylineProducer

    public AWTPolylineProducer()

Method Detail

### createShape

    public static Shape createShape(String text,
                                    int wr)
                             throws ParseException

  Utility method for creating an ExtendedGeneralPath.

  Parameters:
    `text` - The text representation of the path specification.
    `wr` - The winding rule to use for creating the path.
  Throws:
    `ParseException`

### setWindingRule

    public void setWindingRule(int i)

  Sets the winding rule used to construct the path.

  Specified by:
    `setWindingRule` in interface `ShapeProducer`

### getWindingRule

    public int getWindingRule()

  Returns the current winding rule.

  Specified by:
    `getWindingRule` in interface `ShapeProducer`

### getShape

    public Shape getShape()

  Returns the Shape object initialized during the last parsing.

  Specified by:
    `getShape` in interface `ShapeProducer`
  Returns:
    the shape or null if this handler has not been used by a parser.

### startPoints

    public void startPoints()
                     throws ParseException

  Implements `PointsHandler.startPoints()`.

  Specified by:
    `startPoints` in interface `PointsHandler`
  Throws:
    `ParseException` - if an error occured while processing the points

### point

    public void point(float x,
                      float y)
               throws ParseException

  Implements `PointsHandler.point(float,float)`.

  Specified by:
    `point` in interface `PointsHandler`
  Parameters:
    `x` - the x coordinate of the point
    `y` - the y coordinate of the point
  Throws:
    `ParseException` - if an error occured while processing the points

### endPoints

    public void endPoints()
                   throws ParseException

  Implements `PointsHandler.endPoints()`.

  Specified by:
    `endPoints` in interface `PointsHandler`
  Throws:
    `ParseException` - if an error occured while processing the points

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

Copyright (c) 2010 Gaudenz Alder. All rights reserved.