|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.media.jai.PlanarImage org.geotools.resources.image.DeferredPlanarImage
G?re l'affichage en diff?r? d'une image compos?e de tuiles. Lorsqu'une tuile solicit?e n'est pas disponible, une tuile comportant une valeur par d?faut est retourn?e. Lorsque la tuile est enfin disponible, un ?v?nement est d?clench? indiquant au composant qui d?sire afficher l'image que la tuile est maintenant disponible.
Le composant qui d?sire ?tre inform? des ?v?nements sur les tuiles doit au pr?alable
s'enregistrer aupr?s de la classe DefferedPlanarImage
au travers de la
m?thode addTileObserver(java.awt.image.TileObserver)
. Lorsque le composant est inform? qu'une tuile est
pr?te, il lui suffit d'appeler une m?thode repaint(...)
pour mettre ?
jour cette tuile.
Field Summary |
Fields inherited from class javax.media.jai.PlanarImage |
colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width |
Constructor Summary | |
DeferredPlanarImage(java.awt.image.RenderedImage source)
Construct a new instance of . |
Method Summary | |
void |
addTileObserver(java.awt.image.TileObserver observer)
Adds an observer. |
void |
dispose()
Provides a hint that this image will no longer be accessed from a reference in user space. |
java.awt.image.Raster |
getTile(int tileX,
int tileY)
Returns the specified tile, or a default one if the requested tile is not yet available. |
java.awt.image.WritableRaster |
getWritableTile(int tileX,
int tileY)
Checks out a tile for writing. |
java.awt.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(java.awt.image.TileObserver observer)
Removes an observer. |
void |
setData(java.awt.image.Raster r)
Sets a rectangle of the image to the contents of the raster. |
void |
tileCancelled(java.lang.Object eventSource,
javax.media.jai.TileRequest[] requests,
javax.media.jai.PlanarImage image,
int tileX,
int tileY)
Invoked when a tile computation has been cancelled. |
void |
tileComputationFailure(java.lang.Object eventSource,
javax.media.jai.TileRequest[] requests,
javax.media.jai.PlanarImage image,
int tileX,
int tileY,
java.lang.Throwable cause)
Invoked when a tile computation failed. |
void |
tileComputed(java.lang.Object eventSource,
javax.media.jai.TileRequest[] requests,
javax.media.jai.PlanarImage image,
int tileX,
int tileY,
java.awt.image.Raster tile)
Invoked when a tile has been computed. |
void |
tileUpdate(java.awt.image.WritableRenderedImage source,
int tileX,
int tileY,
boolean willBeWritable)
Invoked if the underlying image is writable and one of its tile changed. |
Methods inherited from class javax.media.jai.PlanarImage |
addPropertyChangeListener, addPropertyChangeListener, addSink, addSink, addSource, addTileComputationListener, cancelTiles, copyData, copyData, copyExtendedData, createColorModel, createSnapshot, createWritableRaster, finalize, getAsBufferedImage, getAsBufferedImage, getBounds, getColorModel, getData, getData, getDefaultColorModel, getExtendedData, getGraphics, getHeight, getImageID, getMaxTileX, getMaxTileY, getMaxX, getMaxY, getMinTileX, getMinTileY, getMinX, getMinY, getNumBands, getNumSources, getNumXTiles, getNumYTiles, getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNames, getSampleModel, getSinks, getSource, getSourceImage, getSourceObject, getSources, getSplits, getTileComputationListeners, getTileFactory, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileIndices, getTileRect, getTiles, getTiles, getTileWidth, getWidth, overlapsMultipleTiles, prefetchTiles, queueTiles, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeSink, removeSink, removeSinks, removeSource, removeSources, removeTileComputationListener, setImageLayout, setProperties, setProperty, setSource, setSources, tileXToX, tileXToX, tileYToY, tileYToY, toString, wrapRenderedImage, XToTileX, XToTileX, YToTileY, YToTileY |
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, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth |
Constructor Detail |
public DeferredPlanarImage(java.awt.image.RenderedImage source)
source
- The source image.Method Detail |
public java.awt.image.Raster getTile(int tileX, int tileY)
TileObserver
when the real tile will
be available.
getTile
in interface java.awt.image.RenderedImage
tileX
- Tile X index.tileY
- Tile Y index.
public void tileComputed(java.lang.Object eventSource, javax.media.jai.TileRequest[] requests, javax.media.jai.PlanarImage image, int tileX, int tileY, java.awt.image.Raster tile)
tileComputed
in interface javax.media.jai.TileComputationListener
eventSource
- The caller of this method.requests
- The relevant tile computation requests as returned by the method
used to queue the tile.image
- The image for which tiles are being computed as specified to the
TileScheduler
.tileX
- The X index of the tile in the tile array.tileY
- The Y index of the tile in the tile array.tile
- The computed tile.public void tileCancelled(java.lang.Object eventSource, javax.media.jai.TileRequest[] requests, javax.media.jai.PlanarImage image, int tileX, int tileY)
tileCancelled
in interface javax.media.jai.TileComputationListener
public void tileComputationFailure(java.lang.Object eventSource, javax.media.jai.TileRequest[] requests, javax.media.jai.PlanarImage image, int tileX, int tileY, java.lang.Throwable cause)
tileComputationFailure
in interface javax.media.jai.TileComputationListener
public void tileUpdate(java.awt.image.WritableRenderedImage source, int tileX, int tileY, boolean willBeWritable)
tileUpdate
in interface java.awt.image.TileObserver
public void addTileObserver(java.awt.image.TileObserver observer)
addTileObserver
in interface java.awt.image.WritableRenderedImage
public void removeTileObserver(java.awt.image.TileObserver observer)
removeTileObserver
in interface java.awt.image.WritableRenderedImage
public java.awt.image.WritableRaster getWritableTile(int tileX, int tileY)
UnsupportedOperationException
.
getWritableTile
in interface java.awt.image.WritableRenderedImage
public void releaseWritableTile(int tileX, int tileY)
IllegalStateException
(the state is
really illegal since getWritableTile(int, int)
should never have succeeded).
releaseWritableTile
in interface java.awt.image.WritableRenderedImage
public boolean hasTileWriters()
hasTileWriters
in interface java.awt.image.WritableRenderedImage
public boolean isTileWritable(int tileX, int tileY)
isTileWritable
in interface java.awt.image.WritableRenderedImage
public java.awt.Point[] getWritableTileIndices()
Point
objects indicating which tiles are
checked out for writing. Returns null if none are checked out.
getWritableTileIndices
in interface java.awt.image.WritableRenderedImage
public void setData(java.awt.image.Raster r)
UnsupportedOperationException
.
setData
in interface java.awt.image.WritableRenderedImage
public void dispose()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |