Java Doc for TiledImage.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » Java Advanced Imaging » javax.media.jai 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.jai.PlanarImage
      javax.media.jai.TiledImage

TiledImage
public class TiledImage extends PlanarImage implements WritableRenderedImage,PropertyChangeListener(Code)
A concrete implementation of WritableRenderedImage.

TiledImage is the main class for writable images in JAI. TiledImage provides a straightforward implementation of the WritableRenderedImage interface, taking advantage of that interface's ability to describe images with multiple tiles. The tiles of a WritableRenderedImage must share a SampleModel, which determines their width, height, and pixel format. The tiles form a regular grid, which may occupy any rectangular region of the plane. Tile pixels the locations of which lie outside the stated image bounds have undefined values.

The contents of a TiledImage are defined by a single RenderedImage source provided by means of one of the set() methods or to a constructor which accepts a RenderedImage. The set() methods provide a way to selectively overwrite a portion of a TiledImage, possibly using a region of interest (ROI).

TiledImage also supports direct manipulation of pixels by means of the getWritableTile() method. This method returns a WritableRaster that can be modified directly. Such changes become visible to readers according to the regular thread synchronization rules of the Java virtual machine; JAI makes no additional guarantees. When a writer is finished modifying a tile, it should call releaseWritableTile(). A shortcut is to call setData(), which copies a rectangular region or an area specified by a ROI from a supplied Raster directly into the TiledImage.

A final way to modify the contents of a TiledImage is through calls to the object returned by createGraphics(). This returns a Graphics2D object that can be used to draw line art, text, and images in the usual Abstract Window Toolkit (AWT) manner.

A TiledImage does not attempt to maintain synchronous state on its own. That task is left to SnapshotImage. If a synchronous (unchangeable) view of a TiledImage is desired, its createSnapshot() method must be used. Otherwise, changes due to calls to set() or direct writing of tiles by objects that call getWritableTile() will be visible.

TiledImage does not actually cause its tiles to be copied from the specified source until their contents are demanded. Once a tile has been computed, its contents may be discarded if it can be determined that it can be recomputed identically from the source. The lockTile() method forces a tile to be computed and maintained for the lifetime of the TiledImage.
See Also:   SnapshotImage
See Also:   java.awt.image.RenderedImage
See Also:   java.awt.image.WritableRenderedImage



Field Summary
protected  intminTileX
     The index of the leftmost column of tiles.
protected  intminTileY
     The index of the uppermost row of tiles.
protected  VectortileObservers
     The current set of TileObservers.
protected  WritableRaster[][]tiles
     The tile array.
protected  inttilesX
     The number of tiles in the X direction.
protected  inttilesY
     The number of tiles in the Y direction.
protected  int[][]writers
     The number of writers of each tile; -1 indicates a locked tile.

Constructor Summary
public  TiledImage(int minX, int minY, int width, int height, int tileGridXOffset, int tileGridYOffset, SampleModel tileSampleModel, ColorModel colorModel)
     Constructs a TiledImage with a given layout, SampleModel, and ColorModel.
public  TiledImage(Point origin, SampleModel sampleModel, int tileWidth, int tileHeight)
     Constructs a TiledImage with a SampleModel that is compatible with a given SampleModel, and given tile dimensions.
public  TiledImage(SampleModel sampleModel, int tileWidth, int tileHeight)
     Constructs a TiledImage starting at the global coordinate origin.
public  TiledImage(RenderedImage source, int tileWidth, int tileHeight)
     Constructs a TiledImage equivalent to a given RenderedImage but with specific tile dimensions.
public  TiledImage(RenderedImage source, boolean areBuffersShared)
     Constructs a TiledImage equivalent to a given RenderedImage.

Method Summary
public  voidaddTileObserver(TileObserver observer)
     Informs this TiledImage that another object is interested in being notified whenever any tile becomes writable or ceases to be writable.
public  voidclearTiles()
     Sets the tiles array to null so that the image may be used again.
public static  TiledImagecreateBanded(int minX, int minY, int width, int height, int dataType, int tileWidth, int tileHeight, int[] bankIndices, int[] bandOffsets)
     Returns a TiledImage making use of an banded SampleModel with a given layout, number of bands, and data type.
public  Graphics2DcreateGraphics()
     Creates a Graphics2D object that can be used to paint text and graphics onto the TiledImage.
public static  TiledImagecreateInterleaved(int minX, int minY, int width, int height, int numBands, int dataType, int tileWidth, int tileHeight, int[] bandOffsets)
     Returns a TiledImage making use of an interleaved SampleModel with a given layout, number of bands, and data type.
public  GraphicsgetGraphics()
     Creates a Graphics object that can be used to paint text and graphics onto the TiledImage.
public  intgetSample(int x, int y, int b)
     Returns the value of a given sample of a pixel as an int.
public  doublegetSampleDouble(int x, int y, int b)
     Returns the value of a given sample of a pixel as a double.
public  floatgetSampleFloat(int x, int y, int b)
     Returns the value of a given sample of a pixel as a float.
public  TiledImagegetSubImage(int x, int y, int w, int h, int[] bandSelect, ColorModel cm)
     Returns a TiledImage that shares the tile Rasters of this image.
public  TiledImagegetSubImage(int x, int y, int w, int h, int[] bandSelect)
     Returns a TiledImage that shares the tile Rasters of this image.
public  TiledImagegetSubImage(int x, int y, int w, int h)
     Returns a TiledImage that shares the tile Rasters of this image.
public  TiledImagegetSubImage(int[] bandSelect, ColorModel cm)
     Returns a TiledImage that shares the tile Rasters of this image.

If the specified ColorModel is null then the ColorModel of the sub-image will be set to null unless bandSelect is equal in length to the number of bands in the image in which cases the sub-image ColorModel will be set to that of the current image.
Parameters:
  bandSelect - an array of band indices.
Parameters:
  cm - the ColorModel of the sub-image.

public  TiledImagegetSubImage(int[] bandSelect)
     Returns a TiledImage that shares the tile Rasters of this image.
public  RastergetTile(int tileX, int tileY)
     Retrieves a particular tile from the image for reading only.
public  WritableRastergetWritableTile(int tileX, int tileY)
     Retrieves a particular tile from the image for reading and writing. If the tile is locked, null will be returned.
public  Point[]getWritableTileIndices()
     Returns a list of tiles that are currently held by one or more writers or null of no tiles are so held.
public  booleanhasTileWriters()
     Returns true if any tile is being held by a writer, false otherwise.
protected  booleanisTileLocked(int tileX, int tileY)
     Returns true if a tile is locked.
Parameters:
  tileX - the X index of the tile.
Parameters:
  tileY - the Y index of the tile.
public  booleanisTileWritable(int tileX, int tileY)
     Returns true if a tile has writers.
protected  booleanlockTile(int tileX, int tileY)
     Forces a tile to be computed, and its contents stored indefinitely.
public synchronized  voidpropertyChange(PropertyChangeEvent evt)
     Implementation of PropertyChangeListener.

When invoked with an event emitted by the source image specified for this TiledImage and the event is either a PropertyChangeEventJAI named "InvalidRegion" (case-insensitive) or a RenderingChangeEvent, then all tiles which overlap the intersection of the invalid region and the region of interest specified for this image (if any) will be cleared.

public  voidreleaseWritableTile(int tileX, int tileY)
     Indicates that a writer is done updating a tile.
public  voidremoveTileObserver(TileObserver observer)
     Informs this TiledImage that a particular TileObserver no longer wishes to receive updates on tile writability status.
public  voidset(RenderedImage im)
     Overlays a given RenderedImage on top of the current contents of the TiledImage.
public  voidset(RenderedImage im, ROI roi)
     Overlays a given RenderedImage on top of the current contents of the TiledImage and its intersection with the supplied ROI.
public  voidsetData(Raster r)
     Sets a region of a TiledImage to be a copy of a supplied Raster.
public  voidsetData(Raster r, ROI roi)
     Sets a region of a TiledImage to be a copy of a supplied Raster.
public  voidsetSample(int x, int y, int b, int s)
     Sets a sample of a pixel to a given int value.
public  voidsetSample(int x, int y, int b, float s)
     Sets a sample of a pixel to a given float value.
public  voidsetSample(int x, int y, int b, double s)
     Sets a sample of a pixel to a given double value.

Field Detail
minTileX
protected int minTileX(Code)
The index of the leftmost column of tiles.



minTileY
protected int minTileY(Code)
The index of the uppermost row of tiles.



tileObservers
protected Vector tileObservers(Code)
The current set of TileObservers.



tiles
protected WritableRaster[][] tiles(Code)
The tile array.



tilesX
protected int tilesX(Code)
The number of tiles in the X direction.



tilesY
protected int tilesY(Code)
The number of tiles in the Y direction.



writers
protected int[][] writers(Code)
The number of writers of each tile; -1 indicates a locked tile.




Constructor Detail
TiledImage
public TiledImage(int minX, int minY, int width, int height, int tileGridXOffset, int tileGridYOffset, SampleModel tileSampleModel, ColorModel colorModel)(Code)
Constructs a TiledImage with a given layout, SampleModel, and ColorModel. The width and height of the image tiles will be respectively equal to the width and height of the SampleModel. The tileFactory instance variable will be set to the value of the JAI.KEY_TILE_FACTORY hint set on the default instance of JAI.
Parameters:
  minX - The X coordinate of the upper-left pixel
Parameters:
  minY - The Y coordinate of the upper-left pixel.
Parameters:
  width - The width of the image.
Parameters:
  height - The height of the image.
Parameters:
  tileGridXOffset - The X coordinate of the upper-leftpixel of tile (0, 0).
Parameters:
  tileGridYOffset - The Y coordinate of the upper-leftpixel of tile (0, 0).
Parameters:
  tileSampleModel - A SampleModel with which to becompatible.
Parameters:
  colorModel - A ColorModel to associate with theimage.



TiledImage
public TiledImage(Point origin, SampleModel sampleModel, int tileWidth, int tileHeight)(Code)
Constructs a TiledImage with a SampleModel that is compatible with a given SampleModel, and given tile dimensions. The width and height are taken from the SampleModel, and the image begins at a specified point. The ColorModel will be derived from the SampleModel using the createColorModel method of PlanarImage. Note that this implies that the ColorModel could be null.
Parameters:
  origin - A Point indicating the image's upperleft corner.
Parameters:
  sampleModel - A SampleModel with which to becompatible.
Parameters:
  tileWidth - The desired tile width.
Parameters:
  tileHeight - The desired tile height.



TiledImage
public TiledImage(SampleModel sampleModel, int tileWidth, int tileHeight)(Code)
Constructs a TiledImage starting at the global coordinate origin. The ColorModel will be derived from the SampleModel using the createColorModel method of PlanarImage. Note that this implies that the ColorModel could be null.
Parameters:
  sampleModel - A SampleModel with which to becompatible.
Parameters:
  tileWidth - The desired tile width.
Parameters:
  tileHeight - The desired tile height.



TiledImage
public TiledImage(RenderedImage source, int tileWidth, int tileHeight)(Code)
Constructs a TiledImage equivalent to a given RenderedImage but with specific tile dimensions. Actual copying of the pixel data from the RenderedImage will be deferred until the first time they are requested from the TiledImage.
Parameters:
  source - The source RenderedImage.
Parameters:
  tileWidth - The desired tile width.
Parameters:
  tileHeight - The desired tile height.
since:
   JAI 1.1



TiledImage
public TiledImage(RenderedImage source, boolean areBuffersShared)(Code)
Constructs a TiledImage equivalent to a given RenderedImage. Actual copying of the pixel data from the RenderedImage will be deferred until the first time they are requested from the TiledImage. The tiles of the TiledImage may optionally share DataBuffers with the tiles of the source image but it should be realized in this case that data written into the TiledImage will be visible in the source image.
Parameters:
  source - The source RenderedImage.
Parameters:
  areBuffersShared - Whether the tile DataBuffersof the source are re-used in the tiles ofthis image. If false newWritableRasters will becreated.
since:
   JAI 1.1




Method Detail
addTileObserver
public void addTileObserver(TileObserver observer)(Code)
Informs this TiledImage that another object is interested in being notified whenever any tile becomes writable or ceases to be writable. A tile becomes writable when it is not currently writable and getWritableTile() is called. A tile ceases to be writable when releaseTile() is called and the number of calls to getWritableTile() and releaseWritableTile() are identical.

It is the responsibility of the TiledImage to inform all registered TileObserver objects of such changes in tile writability before the writer has a chance to make any modifications.
Parameters:
  observer - An object implementing theTileObserver interface.




clearTiles
public void clearTiles()(Code)
Sets the tiles array to null so that the image may be used again.
throws:
  IllegalStateException - if hasTileWriters()returns true.
since:
   JAI 1.1.2



createBanded
public static TiledImage createBanded(int minX, int minY, int width, int height, int dataType, int tileWidth, int tileHeight, int[] bankIndices, int[] bandOffsets)(Code)
Returns a TiledImage making use of an banded SampleModel with a given layout, number of bands, and data type. The ColorModel will be derived from the SampleModel using the createColorModel method of PlanarImage. Note that this implies that the ColorModel could be null.
Parameters:
  minX - The X coordinate of the upper-left pixel
Parameters:
  minY - The Y coordinate of the upper-left pixel.
Parameters:
  width - The width of the image.
Parameters:
  height - The height of the image.
Parameters:
  dataType - The data type, from among the constantsDataBuffer.TYPE_*.
Parameters:
  tileWidth - The tile width.
Parameters:
  tileHeight - The tile height.
Parameters:
  bankIndices - An array of ints indicating theindex of the bank to use for each band. Bank indicesmay be duplicated.
Parameters:
  bandOffsets - An array of integers indicating the startingoffset of each band within its bank. Bands stored inthe same bank must have sufficiently different offsetsso as not to overlap.



createGraphics
public Graphics2D createGraphics()(Code)
Creates a Graphics2D object that can be used to paint text and graphics onto the TiledImage. The TiledImage must be of integral data type or an UnsupportedOperationException will be thrown.



createInterleaved
public static TiledImage createInterleaved(int minX, int minY, int width, int height, int numBands, int dataType, int tileWidth, int tileHeight, int[] bandOffsets)(Code)
Returns a TiledImage making use of an interleaved SampleModel with a given layout, number of bands, and data type. The ColorModel will be derived from the SampleModel using the createColorModel method of PlanarImage. Note that this implies that the ColorModel could be null.
Parameters:
  minX - The X coordinate of the upper-left pixel
Parameters:
  minY - The Y coordinate of the upper-left pixel.
Parameters:
  width - The width of the image.
Parameters:
  height - The height of the image.
Parameters:
  numBands - The number of bands in the image.
Parameters:
  dataType - The data type, from among the constantsDataBuffer.TYPE_*.
Parameters:
  tileWidth - The tile width.
Parameters:
  tileHeight - The tile height.
Parameters:
  bandOffsets - An array of non-duplicated integers between 0 andnumBands - 1 of length numBandsindicating the relative offset of each band.



getGraphics
public Graphics getGraphics()(Code)
Creates a Graphics object that can be used to paint text and graphics onto the TiledImage. The TiledImage must be of integral data type or an UnsupportedOperationException will be thrown.



getSample
public int getSample(int x, int y, int b)(Code)
Returns the value of a given sample of a pixel as an int.
Parameters:
  x - The X coordinate of the pixel.
Parameters:
  y - The Y coordinate of the pixel.
Parameters:
  b - The band of the sample within the pixel.



getSampleDouble
public double getSampleDouble(int x, int y, int b)(Code)
Returns the value of a given sample of a pixel as a double.
Parameters:
  x - The X coordinate of the pixel.
Parameters:
  y - The Y coordinate of the pixel.
Parameters:
  b - The band of the sample within the pixel.



getSampleFloat
public float getSampleFloat(int x, int y, int b)(Code)
Returns the value of a given sample of a pixel as a float.
Parameters:
  x - The X coordinate of the pixel.
Parameters:
  y - The Y coordinate of the pixel.
Parameters:
  b - The band of the sample within the pixel.



getSubImage
public TiledImage getSubImage(int x, int y, int w, int h, int[] bandSelect, ColorModel cm)(Code)
Returns a TiledImage that shares the tile Rasters of this image. The returned image occupies a sub-area of the parent image, and possesses a possibly permuted subset of the parent's bands. The two images share a common coordinate system.

The image bounds are clipped against the bounds of the parent image.

If the specified ColorModel is null then the ColorModel of the sub-image will be set to null unless bandSelect is either null or equal in length to the number of bands in the image in which cases the sub-image ColorModel will be set to that of the current image.
Parameters:
  x - the minimum X coordinate of the subimage.
Parameters:
  y - the minimum Y coordinate of the subimage.
Parameters:
  w - the width of the subimage.
Parameters:
  h - the height of the subimage.
Parameters:
  bandSelect - an array of band indices; if null,all bands are selected.
Parameters:
  cm - the ColorModel of the sub-image. The requested sub-image or null if eitherthe specified rectangular area or its intersection withthe current image is empty.
since:
   JAI 1.1




getSubImage
public TiledImage getSubImage(int x, int y, int w, int h, int[] bandSelect)(Code)
Returns a TiledImage that shares the tile Rasters of this image. The returned image occupies a sub-area of the parent image, and possesses a possibly permuted subset of the parent's bands. The two images share a common coordinate system. The ColorModel will be derived from the sub-image SampleModel using the createColorModel method of PlanarImage. Note that this implies that the ColorModel could be null.

The image bounds are clipped against the bounds of the parent image.
Parameters:
  x - the minimum X coordinate of the subimage.
Parameters:
  y - the minimum Y coordinate of the subimage.
Parameters:
  w - the width of the subimage.
Parameters:
  h - the height of the subimage.
Parameters:
  bandSelect - an array of band indices; if null,all bands are selected. The requested sub-image or null if eitherthe specified rectangular area or its intersection withthe current image is empty.




getSubImage
public TiledImage getSubImage(int x, int y, int w, int h)(Code)
Returns a TiledImage that shares the tile Rasters of this image. The returned image occupies a subarea of the parent image. The two images share a common coordinate system.

The image bounds are clipped against the bounds of the parent image.
Parameters:
  x - the minimum X coordinate of the subimage.
Parameters:
  y - the minimum Y coordinate of the subimage.
Parameters:
  w - the width of the subimage.
Parameters:
  h - the height of the subimage.




getSubImage
public TiledImage getSubImage(int[] bandSelect, ColorModel cm)(Code)
Returns a TiledImage that shares the tile Rasters of this image.

If the specified ColorModel is null then the ColorModel of the sub-image will be set to null unless bandSelect is equal in length to the number of bands in the image in which cases the sub-image ColorModel will be set to that of the current image.
Parameters:
  bandSelect - an array of band indices.
Parameters:
  cm - the ColorModel of the sub-image. IllegalArgumentException is bandSelectis null.
since:
   JAI 1.1




getSubImage
public TiledImage getSubImage(int[] bandSelect)(Code)
Returns a TiledImage that shares the tile Rasters of this image. The returned image occupies the same area as the parent image, and possesses a possibly permuted subset of the parent's bands. The ColorModel will be derived from the sub-image SampleModel using the createColorModel method of PlanarImage. Note that this implies that the ColorModel could be null.
Parameters:
  bandSelect - an array of band indices.



getTile
public Raster getTile(int tileX, int tileY)(Code)
Retrieves a particular tile from the image for reading only. The tile will be computed if it hasn't been previously. Any attempt to write to the tile will produce undefined results.
Parameters:
  tileX - the X index of the tile.
Parameters:
  tileY - the Y index of the tile.



getWritableTile
public WritableRaster getWritableTile(int tileX, int tileY)(Code)
Retrieves a particular tile from the image for reading and writing. If the tile is locked, null will be returned. Otherwise, the tile will be computed if it hasn't been previously. Updates of the tile will become visible to readers of this image as they occur.
Parameters:
  tileX - the X index of the tile.
Parameters:
  tileY - the Y index of the tile. The requested tile or null if the tile is locked.



getWritableTileIndices
public Point[] getWritableTileIndices()(Code)
Returns a list of tiles that are currently held by one or more writers or null of no tiles are so held. An array of Points representing tile indicesor null.



hasTileWriters
public boolean hasTileWriters()(Code)
Returns true if any tile is being held by a writer, false otherwise. This provides a quick way to check whether it is necessary to make copies of tiles -- if there are no writers, it is safe to use the tiles directly, while registering to learn of future writers.



isTileLocked
protected boolean isTileLocked(int tileX, int tileY)(Code)
Returns true if a tile is locked.
Parameters:
  tileX - the X index of the tile.
Parameters:
  tileY - the Y index of the tile. Whether the tile is locked.



isTileWritable
public boolean isTileWritable(int tileX, int tileY)(Code)
Returns true if a tile has writers.
Parameters:
  tileX - the X index of the tile.
Parameters:
  tileY - the Y index of the tile.



lockTile
protected boolean lockTile(int tileX, int tileY)(Code)
Forces a tile to be computed, and its contents stored indefinitely. A tile may not be locked if it is currently writable. This method should only be used within JAI, in order to optimize memory allocation.
Parameters:
  tileX - the X index of the tile.
Parameters:
  tileY - the Y index of the tile. Whether the tile was successfully locked.



propertyChange
public synchronized void propertyChange(PropertyChangeEvent evt)(Code)
Implementation of PropertyChangeListener.

When invoked with an event emitted by the source image specified for this TiledImage and the event is either a PropertyChangeEventJAI named "InvalidRegion" (case-insensitive) or a RenderingChangeEvent, then all tiles which overlap the intersection of the invalid region and the region of interest specified for this image (if any) will be cleared. If the event is a RenderingChangeEvent then the invalid region will be obtained from the getInvalidRegion method of the event object; if a PropertyChangeEventJAI it will be obtained from the getNewValue() method. In either case, a new PropertyChangeEventJAI will be fired to all registered listeners of the property name "InvalidRegion" and to all known sinks which are PropertyChangeListeners. Its old and new values will contain the previous and current invalid regions. This may be used to determine which tiles must be re-requested. The TiledImage itself will not re-request the data.
since:
   JAI 1.1




releaseWritableTile
public void releaseWritableTile(int tileX, int tileY)(Code)
Indicates that a writer is done updating a tile. The effects of attempting to release a tile that has not been grabbed, or releasing a tile more than once are undefined.
Parameters:
  tileX - the X index of the tile.
Parameters:
  tileY - the Y index of the tile.



removeTileObserver
public void removeTileObserver(TileObserver observer)(Code)
Informs this TiledImage that a particular TileObserver no longer wishes to receive updates on tile writability status. The result of attempting to remove a listener that is not registered is undefined.
Parameters:
  observer - An object implementing theTileObserver interface.



set
public void set(RenderedImage im)(Code)
Overlays a given RenderedImage on top of the current contents of the TiledImage. The source image must have a SampleModel compatible with that of this image. If the source image does not overlap this image then invoking this method will have no effect.

The source image is added as a fallback PropertySource for the TiledImage: if a given property is not set directly on the TiledImage an attempt will be made to obtain its value from the source image.
Parameters:
  im - A RenderedImage source to overlay. IllegalArgumentException if im isnull.




set
public void set(RenderedImage im, ROI roi)(Code)
Overlays a given RenderedImage on top of the current contents of the TiledImage and its intersection with the supplied ROI. The source image must have a SampleModel compatible with that of this image. If the source image and the region of interest do not both overlap this image then invoking this method will have no effect.

The source image is added as a fallback PropertySource for the TiledImage: if a given property is not set directly on the TiledImage an attempt will be made to obtain its value from the source image.
Parameters:
  im - A RenderedImage source to overlay.
Parameters:
  roi - The region of interest. IllegalArgumentException either parameter isnull.




setData
public void setData(Raster r)(Code)
Sets a region of a TiledImage to be a copy of a supplied Raster. The Raster's coordinate system is used to position it within the image. The computation of all overlapping tiles will be forced prior to modification of the data of the affected area.
Parameters:
  r - a Raster containing pixels to be copiedinto the TiledImage.



setData
public void setData(Raster r, ROI roi)(Code)
Sets a region of a TiledImage to be a copy of a supplied Raster. The Raster's coordinate system is used to position it within the image. The computation of all overlapping tiles will be forced prior to modification of the data of the affected area.
Parameters:
  r - a Raster containing pixels to be copiedinto the TiledImage.
Parameters:
  roi - The region of interest.



setSample
public void setSample(int x, int y, int b, int s)(Code)
Sets a sample of a pixel to a given int value.
Parameters:
  x - The X coordinate of the pixel.
Parameters:
  y - The Y coordinate of the pixel.
Parameters:
  b - The band of the sample within the pixel.
Parameters:
  s - The value to which to set the sample.



setSample
public void setSample(int x, int y, int b, float s)(Code)
Sets a sample of a pixel to a given float value.
Parameters:
  x - The X coordinate of the pixel.
Parameters:
  y - The Y coordinate of the pixel.
Parameters:
  b - The band of the sample within the pixel.
Parameters:
  s - The value to which to set the sample.



setSample
public void setSample(int x, int y, int b, double s)(Code)
Sets a sample of a pixel to a given double value.
Parameters:
  x - The X coordinate of the pixel.
Parameters:
  y - The Y coordinate of the pixel.
Parameters:
  b - The band of the sample within the pixel.
Parameters:
  s - The value to which to set the sample.



Fields inherited from javax.media.jai.PlanarImage
protected ColorModel colorModel(Code)(Java Doc)
protected PropertyChangeSupportJAI eventManager(Code)(Java Doc)
protected int height(Code)(Java Doc)
protected int minX(Code)(Java Doc)
protected int minY(Code)(Java Doc)
protected WritablePropertySourceImpl properties(Code)(Java Doc)
protected SampleModel sampleModel(Code)(Java Doc)
protected TileFactory tileFactory(Code)(Java Doc)
protected int tileGridXOffset(Code)(Java Doc)
protected int tileGridYOffset(Code)(Java Doc)
protected int tileHeight(Code)(Java Doc)
protected int tileWidth(Code)(Java Doc)
protected int width(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)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.