net.refractions.udig.tools.edit.support
Class AbstractPathIterator
java.lang.Object
net.refractions.udig.tools.edit.support.AbstractPathIterator
- All Implemented Interfaces:
- java.awt.geom.PathIterator
- Direct Known Subclasses:
- EditGeomPathIterator
public abstract class AbstractPathIterator
- extends java.lang.Object
- implements java.awt.geom.PathIterator
An abstract class for drawing EditGeom
objects
- Since:
- 1.1.0
- Author:
- jones
Fields inherited from interface java.awt.geom.PathIterator |
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
geom
protected final EditGeom geom
points
protected java.util.Iterator<Point> points
currentPoint
protected Point currentPoint
nextPoint
protected Point nextPoint
currentShape
protected PrimitiveShape currentShape
AbstractPathIterator
protected AbstractPathIterator(EditGeom shape)
toShape
public java.awt.Shape toShape()
- Returns a shape that can be draw.
It is recommended to call getShape() every time a draw is needed because the shape does not update if
the EditGeom is updated between draws. getShape is guaranteed to get a shape that is representative of
the current state of geom.
- Returns:
toPath
public Path toPath(Device device)
createPoint
protected java.awt.Shape createPoint()
- Called if there is only a single point in the geom. Default behaviour
is to return a small square. If null is returned then this PathIterator
will be used to create a geometry.
- Returns:
- a shape to draw or null if PathIterator should be used to create a shape.
createPointPath
protected Path createPointPath(Device device)
getWindingRule
public int getWindingRule()
- Specified by:
getWindingRule
in interface java.awt.geom.PathIterator
isDone
public boolean isDone()
- Specified by:
isDone
in interface java.awt.geom.PathIterator
next
public void next()
- Specified by:
next
in interface java.awt.geom.PathIterator
currentSegment
public int currentSegment(float[] coords)
- Specified by:
currentSegment
in interface java.awt.geom.PathIterator
currentSegment
public int currentSegment(double[] coords)
- Specified by:
currentSegment
in interface java.awt.geom.PathIterator