|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.jai.PlanarImage
javax.media.jai.RenderedImageAdapter
A PlanarImage wrapper for a non-writable
RenderedImage. The tile layout, sample model, and so forth
are preserved. Calls to getTile(), getData(),
and copyData() are forwarded to the image being adapted.
The set of properties available on the image will be a combination of
those defined locally via setProperty() and those defined
on the source image with the local properties taking precedence. No
PropertySourceChangeEvent will be generated as a result of
changes to the property set of the source image.
From JAI's point of view, this image is a PlanarImage of
unknown type, with no sources. The source image is assumed to be
immutable. If the RenderedImage source implements
WritableRenderedImage, a
WritableRenderedImageAdapter should be used.
The methods are marked 'final' in order to allow dynamic inlining to take place. This should eliminate any performance penalty associated with the use of an adapter class.
Since the methods of this class all derive from
PlanarImage, they are not commented in detail.
PlanarImage,
WritableRenderedImageAdapter,
RenderedImage,
WritableRenderedImage| Field Summary | |
protected RenderedImage |
theImage
The RenderedImage being adapted. |
| Fields inherited from class javax.media.jai.PlanarImage |
colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width |
| Constructor Summary | |
RenderedImageAdapter(RenderedImage im)
Constructs a RenderedImageAdapter. |
|
| Method Summary | |
WritableRaster |
copyData(WritableRaster raster)
Forwards call to the true source. |
Raster |
getData()
Forwards call to the true source. |
Raster |
getData(Rectangle rect)
Forwards call to the true source. |
Object |
getProperty(String name)
Retrieves the property from those set locally on the image or, if the property is not available locally, the call is forwarded to the true source. |
Class |
getPropertyClass(String name)
Returns the class expected to be returned by a request for the property with the specified name. |
String[] |
getPropertyNames()
Retrieves a list of property names recognized by this image. |
Raster |
getTile(int x,
int y)
Forwards call to the true source unless the specified tile indices refer to a tile which does not overlap the image bounds in which case null is returned. |
RenderedImage |
getWrappedImage()
Returns the reference to the external RenderedImage
originally supplied to the constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected RenderedImage theImage
| Constructor Detail |
public RenderedImageAdapter(RenderedImage im)
im - a RenderedImage to be `wrapped' as a PlanarImage.
IllegalArgumentException - if im is
null.| Method Detail |
public final RenderedImage getWrappedImage()
RenderedImage
originally supplied to the constructor.
public final Raster getTile(int x,
int y)
null is returned.
getTile in interface RenderedImagegetTile in class PlanarImagex - The X index of the requested tile in the tile array.y - The Y index of the requested tile in the tile array.public final Raster getData()
getData in interface RenderedImagegetData in class PlanarImageRaster containing the entire image data.public final Raster getData(Rectangle rect)
getData in interface RenderedImagegetData in class PlanarImagerect - The rectangular region of this image to be
returned, or null.
Raster containing the specified image data.public final WritableRaster copyData(WritableRaster raster)
copyData in interface RenderedImagecopyData in class PlanarImageraster - A WritableRaster to hold the copied
pixel data of this image.
WritableRaster,
or to a new WritableRaster if the supplied
one was null.public final String[] getPropertyNames()
getPropertyNames in interface PropertySourcegetPropertyNames in class PlanarImageStrings containing valid
property names or null.public final Object getProperty(String name)
getProperty in interface PropertySourcegetProperty in class PlanarImagename - the name of the property to get, as a String.
Object, or the value
java.awt.Image.UndefinedProperty.
IllegalArgumentException - if name
is null.public final Class getPropertyClass(String name)
null will be returned.
getPropertyClass in interface PropertySourcegetPropertyClass in class PlanarImageClass expected to be return by a
request for the value of this property or null.
IllegalArgumentException - if name
is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||