javax.media.jai.iterator
Class RookIterFactory

java.lang.Object
  extended byjavax.media.jai.iterator.RookIterFactory

public class RookIterFactory
extends Object

A factory class to instantiate instances of the RookIter and WritableRookIter interfaces on sources of type Raster, RenderedImage, and WritableRenderedImage.

See Also:
RookIter, WritableRookIter

Method Summary
static RookIter create(Raster ras, Rectangle bounds)
          Constructs and returns an instance of RookIter suitable for iterating over the given bounding rectangle within the given Raster source.
static RookIter create(RenderedImage im, Rectangle bounds)
          Constructs and returns an instance of RookIter suitable for iterating over the given bounding rectangle within the given RenderedImage source.
static WritableRookIter createWritable(WritableRaster ras, Rectangle bounds)
          Constructs and returns an instance of WritableRookIter suitable for iterating over the given bounding rectangle within the given WritableRaster source.
static WritableRookIter createWritable(WritableRenderedImage im, Rectangle bounds)
          Constructs and returns an instance of WritableRookIter suitable for iterating over the given bounding rectangle within the given WritableRenderedImage source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static RookIter create(RenderedImage im,
                              Rectangle bounds)
Constructs and returns an instance of RookIter suitable for iterating over the given bounding rectangle within the given RenderedImage source. If the bounds parameter is null, the entire image will be used.

Parameters:
im - a read-only RenderedImage source.
bounds - the bounding Rectangle for the iterator, or null.
Returns:
a RookIter allowing read-only access to the source.

create

public static RookIter create(Raster ras,
                              Rectangle bounds)
Constructs and returns an instance of RookIter suitable for iterating over the given bounding rectangle within the given Raster source. If the bounds parameter is null, the entire Raster will be used.

Parameters:
ras - a read-only Raster source.
bounds - the bounding Rectangle for the iterator, or null.
Returns:
a RookIter allowing read-only access to the source.

createWritable

public static WritableRookIter createWritable(WritableRenderedImage im,
                                              Rectangle bounds)
Constructs and returns an instance of WritableRookIter suitable for iterating over the given bounding rectangle within the given WritableRenderedImage source. If the bounds parameter is null, the entire image will be used.

Parameters:
im - a WritableRenderedImage source.
bounds - the bounding Rectangle for the iterator, or null.
Returns:
a WritableRookIter allowing read/write access to the source.

createWritable

public static WritableRookIter createWritable(WritableRaster ras,
                                              Rectangle bounds)
Constructs and returns an instance of WritableRookIter suitable for iterating over the given bounding rectangle within the given WritableRaster source. If the bounds parameter is null, the entire Raster will be used.

Parameters:
ras - a WritableRaster source.
bounds - the bounding Rectangle for the iterator, or null.
Returns:
a WritableRookIter allowing read/write access to the source.