| java.lang.Object javax.media.jai.PlanarImage javax.media.jai.RenderedImageAdapter
All known Subclasses: com.sun.media.jai.opimage.StreamImage, javax.media.jai.WritableRenderedImageAdapter, javax.media.jai.AttributedImage,
RenderedImageAdapter | public class RenderedImageAdapter extends PlanarImage (Code) | | 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.
See Also: PlanarImage See Also: WritableRenderedImageAdapter See Also: java.awt.image.RenderedImage See Also: java.awt.image.WritableRenderedImage |
Field Summary | |
protected RenderedImage | theImage The RenderedImage being adapted. |
Constructor Summary | |
public | RenderedImageAdapter(RenderedImage im) Constructs a RenderedImageAdapter. |
Method Summary | |
final public WritableRaster | copyData(WritableRaster raster) Forwards call to the true source. | final public Raster | getData() Forwards call to the true source. | final public Raster | getData(Rectangle rect) Forwards call to the true source. | final public 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. | final public Class | getPropertyClass(String name) Returns the class expected to be returned by a request for
the property with the specified name. | final public String[] | getPropertyNames() Retrieves a list of property names recognized by this image. | final public 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. | final public RenderedImage | getWrappedImage() Returns the reference to the external RenderedImage
originally supplied to the constructor. | static String[] | mergePropertyNames(String[] localNames, String[] sourceNames) Merge the String s in the two arrays with the local names
taking precedence. |
theImage | protected RenderedImage theImage(Code) | | The RenderedImage being adapted.
|
RenderedImageAdapter | public RenderedImageAdapter(RenderedImage im)(Code) | | Constructs a RenderedImageAdapter.
Parameters: im - a RenderedImage to be `wrapped' as a PlanarImage. throws: IllegalArgumentException - if im isnull . |
copyData | final public WritableRaster copyData(WritableRaster raster)(Code) | | Forwards call to the true source.
|
getData | final public Raster getData()(Code) | | Forwards call to the true source.
|
getData | final public Raster getData(Rectangle rect)(Code) | | Forwards call to the true source.
|
getProperty | final public Object getProperty(String name)(Code) | | 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.
exception: IllegalArgumentException - if name is null . |
getPropertyClass | final public Class getPropertyClass(String name)(Code) | | Returns the class expected to be returned by a request for
the property with the specified name. If this information
is unavailable, null will be returned.
exception: IllegalArgumentException - if name is null . The Class expected to be return by arequest for the value of this property or null . since: JAI 1.1 |
getPropertyNames | final public String[] getPropertyNames()(Code) | | Retrieves a list of property names recognized by this image.
The locally defined property names are combined with those derived
from the true source.
|
getTile | final public Raster getTile(int x, int y)(Code) | | 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.
|
getWrappedImage | final public RenderedImage getWrappedImage()(Code) | | Returns the reference to the external RenderedImage
originally supplied to the constructor.
since: JAI 1.1.2 |
mergePropertyNames | static String[] mergePropertyNames(String[] localNames, String[] sourceNames)(Code) | | Merge the String s in the two arrays with the local names
taking precedence. Comparison is performed independent of case. Both
parameters may be null .
The merged name arrays or null . |
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)
|
|
|