|
|||||||||
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 | +--javax.media.jai.WritableRenderedImageAdapter
A PlanarImage
wrapper for a
WritableRenderedImage
. The tile layout, sample model,
and so forth are preserved. Calls to getTile()
and so
forth are forwarded.
From JAI's point of view, this image is a
PlanarImage
of unknown type, with no sources, and
additionally an implementer of the
WritableRenderedImage
interface. The image's pixel
data appear to be variable.
The class and all its 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.
PlanarImage
,
RenderedImageAdapter
,
RenderedImage
,
WritableRenderedImage
Fields inherited from class javax.media.jai.RenderedImageAdapter |
theImage |
Fields inherited from class javax.media.jai.PlanarImage |
colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width |
Constructor Summary | |
WritableRenderedImageAdapter(WritableRenderedImage im)
Constructs a WritableRenderedImageAdapter . |
Method Summary | |
void |
addTileObserver(TileObserver tileObserver)
Adds an observer. |
WritableRaster |
getWritableTile(int tileX,
int tileY)
Checks out a tile for writing. |
Point[] |
getWritableTileIndices()
Returns an array of Point objects indicating which tiles
are checked out for writing. |
boolean |
hasTileWriters()
Returns whether any tile is checked out for writing. |
boolean |
isTileWritable(int tileX,
int tileY)
Returns whether a tile is currently checked out for writing. |
void |
releaseWritableTile(int tileX,
int tileY)
Relinquishes the right to write to a tile. |
void |
removeTileObserver(TileObserver tileObserver)
Removes an observer. |
void |
setData(Raster raster)
Sets a rectangular region of the image to the contents of raster . |
Methods inherited from class javax.media.jai.RenderedImageAdapter |
copyData, getData, getData, getProperty, getPropertyClass, getPropertyNames, getTile, getWrappedImage |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.image.RenderedImage |
copyData, getColorModel, getData, getData, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getPropertyNames, getSampleModel, getSources, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth |
Constructor Detail |
public WritableRenderedImageAdapter(WritableRenderedImage im)
WritableRenderedImageAdapter
.im
- A WritableRenderedImage
to be `wrapped'
as a PlanarImage
.IllegalArgumentException
- if im
is
null
.Method Detail |
public final void addTileObserver(TileObserver tileObserver)
addTileObserver
in interface WritableRenderedImage
tileObserver
- The TileObserver
to be added.IllegalArgumentException
- if
tileObserver
is null
.public final void removeTileObserver(TileObserver tileObserver)
removeTileObserver
in interface WritableRenderedImage
tileObserver
- The TileObserver
to be removed.IllegalArgumentException
- if
tileObserver
is null
.public final WritableRaster getWritableTile(int tileX, int tileY)
The WritableRenderedImage
is responsible for
notifying all of its TileObservers
when a tile
goes from having no writers to having one writer.
getWritableTile
in interface WritableRenderedImage
tileX
- The X index of the tile.tileY
- The Y index of the tile.WritableRaster
.public final void releaseWritableTile(int tileX, int tileY)
getWritableTile()
; any other use will
lead to undefined results.
The WritableRenderedImage
is responsible for
notifying all of its TileObserver
s when a tile
goes from having one writer to having no writers.
releaseWritableTile
in interface WritableRenderedImage
tileX
- The X index of the tile.tileY
- The Y index of the tile.public final boolean isTileWritable(int tileX, int tileY)
isTileWritable
in interface WritableRenderedImage
tileX
- The X index of the tile.tileY
- The Y index of the tile.true
if the tile currently has writers.public final Point[] getWritableTileIndices()
Point
objects indicating which tiles
are checked out for writing.getWritableTileIndices
in interface WritableRenderedImage
Point
s or null
if no
tiles are checked out for writing.public final boolean hasTileWriters()
hasTileWriters
in interface WritableRenderedImage
true
if any tile currently has writers.public final void setData(Raster raster)
raster
.setData
in interface WritableRenderedImage
raster
- A Raster
.IllegalArgumentException
- if raster
is
null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |