objectdraw
Class DrawableIterator

java.lang.Object
  extended by objectdraw.DrawableIterator

public class DrawableIterator
extends Object

An object of type DrawableIterator can be obtained by invoking the getDrawableIterator method of a DrawaingCanvas and then used to write loops that sequentially process all the Drawable objects displayed on the associated canvas.

Version:
1.1.1 released February 2005

Constructor Summary
DrawableIterator(Vector v)
          Constructs a new DrawableIterator from a vector of Drawables.
 
Method Summary
 boolean hasNext()
          Tells whether the iterator has any more elements to return
 Drawable next()
          Gives the next Drawable in the Vector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableIterator

DrawableIterator(Vector v)
Constructs a new DrawableIterator from a vector of Drawables.

Parameters:
v - the vector of Drawables
Method Detail

hasNext

public boolean hasNext()
Tells whether the iterator has any more elements to return

Returns:
whether the iterator has more elements

next

public Drawable next()
Gives the next Drawable in the Vector

Returns:
the next Drawable