|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.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,
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. |
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.im
is
null
.Method Detail |
public final Raster getTile(int x, int y)
null
is returned.tileX
- The X index of the requested tile in the tile array.tileY
- The Y index of the requested tile in the tile array.public final Raster getData()
Raster
containing the entire image data.Raster
.public final Raster getData(Rectangle rect)
region
- The rectangular region of this image to be
returned, or null
.Raster
containing the specified image data.Raster
.public final WritableRaster copyData(WritableRaster raster)
raster
- 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()
String
s containing valid
property names or null
.public final Object getProperty(String name)
name
is null
.public final Class getPropertyClass(String name)
null
will be returned.Class
expected to be return by a
request for the value of this property or null
.name
is null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |