org.openstreetmap.josm.data.osm.visitor.paint
Class MapPainter.OffsetIterator

java.lang.Object
  extended by org.openstreetmap.josm.data.osm.visitor.paint.MapPainter.OffsetIterator
All Implemented Interfaces:
java.util.Iterator<java.awt.Point>
Enclosing class:
MapPainter

public class MapPainter.OffsetIterator
extends java.lang.Object
implements java.util.Iterator<java.awt.Point>

Iterates over a list of Way Nodes and returns screen coordinates that represent a line that is shifted by a certain offset perpendicular to the way direction. There is no intention, to handle consecutive duplicate Nodes in a perfect way, but it is should not throw an exception.


Field Summary
private  int idx
           
private  java.util.List<Node> nodes
           
private  float offset
           
private  java.awt.Point prev
           
private  int x_prev0
           
private  int y_prev0
           
 
Constructor Summary
MapPainter.OffsetIterator(java.util.List<Node> nodes, float offset)
           
 
Method Summary
 boolean hasNext()
           
 java.awt.Point next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodes

private java.util.List<Node> nodes

offset

private float offset

idx

private int idx

prev

private java.awt.Point prev

x_prev0

private int x_prev0

y_prev0

private int y_prev0
Constructor Detail

MapPainter.OffsetIterator

public MapPainter.OffsetIterator(java.util.List<Node> nodes,
                                 float offset)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<java.awt.Point>

next

public java.awt.Point next()
Specified by:
next in interface java.util.Iterator<java.awt.Point>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<java.awt.Point>


JOSM