| java.lang.Object javax.media.jai.PlanarImage javax.media.jai.RenderedImageAdapter javax.media.jai.WritableRenderedImageAdapter
WritableRenderedImageAdapter | final public class WritableRenderedImageAdapter extends RenderedImageAdapter implements WritableRenderedImage(Code) | | 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.
See Also: PlanarImage See Also: RenderedImageAdapter See Also: java.awt.image.RenderedImage See Also: java.awt.image.WritableRenderedImage |
Constructor Summary | |
public | WritableRenderedImageAdapter(WritableRenderedImage im) Constructs a WritableRenderedImageAdapter .
Parameters: im - A WritableRenderedImage to be `wrapped'as a PlanarImage . |
Method Summary | |
final public void | addTileObserver(TileObserver tileObserver) Adds an observer. | final public WritableRaster | getWritableTile(int tileX, int tileY) Checks out a tile for writing. | final public Point[] | getWritableTileIndices() Returns an array of Point objects indicating which tiles
are checked out for writing. | final public boolean | hasTileWriters() Returns whether any tile is checked out for writing. | final public boolean | isTileWritable(int tileX, int tileY) Returns whether a tile is currently checked out for writing.
Parameters: tileX - The X index of the tile. Parameters: tileY - The Y index of the tile. | final public void | releaseWritableTile(int tileX, int tileY) Relinquishes the right to write to a tile. | final public void | removeTileObserver(TileObserver tileObserver) Removes an observer. | final public void | setData(Raster raster) Sets a rectangular region of the image to the contents of
raster .
Parameters: raster - A Raster . |
WritableRenderedImageAdapter | public WritableRenderedImageAdapter(WritableRenderedImage im)(Code) | | Constructs a WritableRenderedImageAdapter .
Parameters: im - A WritableRenderedImage to be `wrapped'as a PlanarImage . IllegalArgumentException if im isnull . |
addTileObserver | final public void addTileObserver(TileObserver tileObserver)(Code) | | Adds an observer. If the observer is already present,
it will receive multiple notifications.
Parameters: tileObserver - The TileObserver to be added. IllegalArgumentException iftileObserver is null . |
getWritableTile | final public WritableRaster getWritableTile(int tileX, int tileY)(Code) | | Checks out a tile for writing.
The WritableRenderedImage is responsible for
notifying all of its TileObservers when a tile
goes from having no writers to having one writer.
Parameters: tileX - The X index of the tile. Parameters: tileY - The Y index of the tile. The tile as a WritableRaster . |
getWritableTileIndices | final public Point[] getWritableTileIndices()(Code) | | Returns an array of Point objects indicating which tiles
are checked out for writing.
an array of Point s or null if notiles are checked out for writing. |
hasTileWriters | final public boolean hasTileWriters()(Code) | | Returns whether any tile is checked out for writing.
Semantically equivalent to (getWritableTiles().size() != 0).
true if any tile currently has writers. |
isTileWritable | final public boolean isTileWritable(int tileX, int tileY)(Code) | | Returns whether a tile is currently checked out for writing.
Parameters: tileX - The X index of the tile. Parameters: tileY - The Y index of the tile. true if the tile currently has writers. |
releaseWritableTile | final public void releaseWritableTile(int tileX, int tileY)(Code) | | Relinquishes the right to write to a tile. If the caller
continues to write to the tile, the results are undefined.
Calls to this method should only appear in matching pairs with
calls to 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.
Parameters: tileX - The X index of the tile. Parameters: tileY - The Y index of the tile. |
removeTileObserver | final public void removeTileObserver(TileObserver tileObserver)(Code) | | Removes an observer. If the observer was not registered,
nothing happens. If the observer was registered for multiple
notifications, it will now be registered for one fewer.
Parameters: tileObserver - The TileObserver to be removed. IllegalArgumentException iftileObserver is null . |
setData | final public void setData(Raster raster)(Code) | | Sets a rectangular region of the image to the contents of
raster .
Parameters: raster - A Raster . IllegalArgumentException if raster isnull . |
Fields inherited from javax.media.jai.RenderedImageAdapter | protected RenderedImage theImage(Code)(Java Doc)
|
Methods inherited from javax.media.jai.PlanarImage | public static int XToTileX(int x, int tileGridXOffset, int tileWidth)(Code)(Java Doc) public int XToTileX(int x)(Code)(Java Doc) public static int YToTileY(int y, int tileGridYOffset, int tileHeight)(Code)(Java Doc) public int YToTileY(int y)(Code)(Java Doc) public void addPropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public synchronized boolean addSink(Object sink)(Code)(Java Doc) protected void addSink(PlanarImage sink)(Code)(Java Doc) protected void addSource(Object source)(Code)(Java Doc) public synchronized void addTileComputationListener(TileComputationListener listener)(Code)(Java Doc) public void cancelTiles(TileRequest request, Point[] tileIndices)(Code)(Java Doc) public WritableRaster copyData()(Code)(Java Doc) public WritableRaster copyData(WritableRaster raster)(Code)(Java Doc) public void copyExtendedData(WritableRaster dest, BorderExtender extender)(Code)(Java Doc) public static ColorModel createColorModel(SampleModel sm)(Code)(Java Doc) public PlanarImage createSnapshot()(Code)(Java Doc) final protected WritableRaster createWritableRaster(SampleModel sampleModel, Point location)(Code)(Java Doc) public synchronized void dispose()(Code)(Java Doc) protected void finalize() throws Throwable(Code)(Java Doc) public BufferedImage getAsBufferedImage(Rectangle rect, ColorModel cm)(Code)(Java Doc) public BufferedImage getAsBufferedImage()(Code)(Java Doc) public Rectangle getBounds()(Code)(Java Doc) public ColorModel getColorModel()(Code)(Java Doc) public Raster getData()(Code)(Java Doc) public Raster getData(Rectangle region)(Code)(Java Doc) public static ColorModel getDefaultColorModel(int dataType, int numBands)(Code)(Java Doc) public Raster getExtendedData(Rectangle region, BorderExtender extender)(Code)(Java Doc) public Graphics getGraphics()(Code)(Java Doc) public int getHeight()(Code)(Java Doc) public Object getImageID()(Code)(Java Doc) public int getMaxTileX()(Code)(Java Doc) public int getMaxTileY()(Code)(Java Doc) public int getMaxX()(Code)(Java Doc) public int getMaxY()(Code)(Java Doc) public int getMinTileX()(Code)(Java Doc) public int getMinTileY()(Code)(Java Doc) public int getMinX()(Code)(Java Doc) public int getMinY()(Code)(Java Doc) public int getNumBands()(Code)(Java Doc) public int getNumSources()(Code)(Java Doc) public int getNumXTiles()(Code)(Java Doc) public int getNumYTiles()(Code)(Java Doc) protected Hashtable getProperties()(Code)(Java Doc) public Object getProperty(String name)(Code)(Java Doc) public Class getPropertyClass(String name)(Code)(Java Doc) public String[] getPropertyNames()(Code)(Java Doc) public String[] getPropertyNames(String prefix)(Code)(Java Doc) public SampleModel getSampleModel()(Code)(Java Doc) public Vector getSinks()(Code)(Java Doc) public PlanarImage getSource(int index)(Code)(Java Doc) public PlanarImage getSourceImage(int index)(Code)(Java Doc) public Object getSourceObject(int index)(Code)(Java Doc) public Vector getSources()(Code)(Java Doc) public void getSplits(IntegerSequence xSplits, IntegerSequence ySplits, Rectangle rect)(Code)(Java Doc) abstract public Raster getTile(int tileX, int tileY)(Code)(Java Doc) public TileComputationListener[] getTileComputationListeners()(Code)(Java Doc) public TileFactory getTileFactory()(Code)(Java Doc) public int getTileGridXOffset()(Code)(Java Doc) public int getTileGridYOffset()(Code)(Java Doc) public int getTileHeight()(Code)(Java Doc) public Point[] getTileIndices(Rectangle region)(Code)(Java Doc) public Rectangle getTileRect(int tileX, int tileY)(Code)(Java Doc) public int getTileWidth()(Code)(Java Doc) public Raster[] getTiles(Point[] tileIndices)(Code)(Java Doc) public Raster[] getTiles()(Code)(Java Doc) public int getWidth()(Code)(Java Doc) public boolean overlapsMultipleTiles(Rectangle rect)(Code)(Java Doc) public void prefetchTiles(Point[] tileIndices)(Code)(Java Doc) public TileRequest queueTiles(Point[] tileIndices)(Code)(Java Doc) public void removeProperty(String name)(Code)(Java Doc) public void removePropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public synchronized boolean removeSink(Object sink)(Code)(Java Doc) protected boolean removeSink(PlanarImage sink)(Code)(Java Doc) public void removeSinks()(Code)(Java Doc) protected boolean removeSource(Object source)(Code)(Java Doc) protected void removeSources()(Code)(Java Doc) public synchronized void removeTileComputationListener(TileComputationListener listener)(Code)(Java Doc) protected void setImageLayout(ImageLayout layout)(Code)(Java Doc) protected void setProperties(Hashtable properties)(Code)(Java Doc) public void setProperty(String name, Object value)(Code)(Java Doc) protected void setSource(Object source, int index)(Code)(Java Doc) protected void setSources(List sourceList)(Code)(Java Doc) public static int tileXToX(int tx, int tileGridXOffset, int tileWidth)(Code)(Java Doc) public int tileXToX(int tx)(Code)(Java Doc) public static int tileYToY(int ty, int tileGridYOffset, int tileHeight)(Code)(Java Doc) public int tileYToY(int ty)(Code)(Java Doc) public String toString()(Code)(Java Doc) public static PlanarImage wrapRenderedImage(RenderedImage image)(Code)(Java Doc)
|
|
|