net.refractions.udig.tools.edit.support
Class PathToPathIteratorAdapter

java.lang.Object
  extended by net.refractions.udig.tools.edit.support.PathToPathIteratorAdapter
All Implemented Interfaces:
java.awt.geom.PathIterator

public class PathToPathIteratorAdapter
extends java.lang.Object
implements java.awt.geom.PathIterator

Wraps a Path and allows it to be traversed like a PathIterator.

WARNING: This class takes a snap shot of the path upon creation so any changes after creation will be missed

Since:
1.1.0
Author:
Jesse

Field Summary
 
Fields inherited from interface java.awt.geom.PathIterator
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO
 
Constructor Summary
PathToPathIteratorAdapter(Path path)
          Creates a new instance.
 
Method Summary
 int currentSegment(double[] coords)
           
 int currentSegment(float[] coords)
           
 int getWindingRule()
           
 boolean isDone()
           
 void next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathToPathIteratorAdapter

public PathToPathIteratorAdapter(Path path)
Creates a new instance.

WARNING: This class takes a snap shot of the path upon creation so any changes after creation will be missed

Method Detail

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

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