|
|||||||||
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,
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 |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
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)
tileObserver
- The TileObserver
to be added.IllegalArgumentException
- if
tileObserver
is null
.public final void removeTileObserver(TileObserver tileObserver)
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.
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.
tileX
- The X index of the tile.tileY
- The Y index of the tile.public final boolean isTileWritable(int tileX, int tileY)
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.Point
s or null
if no
tiles are checked out for writing.public final boolean hasTileWriters()
true
if any tile currently has writers.public final void setData(Raster raster)
raster
.raster
- A Raster
.IllegalArgumentException
- if raster
is
null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |