@(#)BetaProps.txt 1.8 Brian Burkhalter Created: 24 January 2001 Revised: 03/28/01 CHANGES SINCE PREVIOUS VERSION (1.7) ------------------------------ . Revised documentation of PlanarImage.setSources() (section 12.1.1). . Deleted second paragraph in section regarding RenderedImageAdapter.getTile() (section 14). CHANGES SINCE ORIGINAL VERSION (1.1) ------------------------------ . Added section "Property-Related Changes" of which part has been approved in Expert Group e-mail. . Added section "PlanarImage/OpImage Hierarchy Constructors" which includes changes to PlanarImage source Vector mutators. . Added section "SerializerFactory". . Added section "RenderedImageAdapter". . Changed RenderedOp.recreateRendering() to RenderedOp.getNewRendering(). Revised javadoc of this method per Expert Group comments to provide an example of when the method might be used. Added comment about clarifying the javadoc of OperationNode[Support] regarding the comparison of the old and new ParameterBlocks and other node attributes. . Updated javadoc of TileRequest.getTileStatus() per Expert Group comments to indicate that not all status values are required to be supported by a given implementation. . Renamed section "Renderable Node Factory Method" to "Renderable Nodes and RenderingHints". Added a subsection regarding a new RenderableOp constructor accepting RenderingHints. . Retracted cobbling methods section from the proposal. . Changed section "RenderedOp Rendering Accessor" to "RenderedOp Changes" and added a subsection corresponding to the previous topic heading and one for re-rendering a node. . Updated TileComputationListener javadoc per Expert Group comments. . Added TileRequest specification. . Replaced request IDs with TileRequests. . Added eventSource to all TileComputationListener methods. . Deprecate JAI.createRenderableNS(), not JAI.createRenderable(). . Changed cobbleData() methods which return a Raster to allow returning an image tile/argument tile or a child thereof. . Added section on TiledImage source image changes. . Added section on change to initial value of default tile size in JAI class. . Added section "RenderedOp Rendering Accessor". . Added section "TileScheduler-related Changes". Proposed Changes to JAI 1.1 Specification During Beta Period ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This document outlines proposals for modifications to be made to the Java Advanced Imaging (JAI) specification, version 1.1, during the 1.1-beta time frame. 1. Default Rendering of a RenderableImage 1.1 Background on createDefaultRendering() The method createDefaultRendering() is defined in several JAI classes which implement the RenderableImage interface, viz., MultiResolutionRenderableImage RenderableImageAdapter RenderableOp The RenderableImage interface specifies the method's behavior as: Returns a RenderedImage instance of this image with a default width and height in pixels. The RenderContext is built automatically with an appropriate usr2dev transform and an area of interest of the full image. The rendering hints are empty. createDefaultRendering may make use of a stored rendering for speed. No specification of the resulting dimensions is provided so that this is left to the discretion of the implementation. Each of the aforementioned RenderableImage implementations provides a completely different interpretation of the createDefaultRendering(). MultiResolutionRenderableImage Returns the full resolution image of the multi-resultion set (pyramid). RenderableImageAdapter Forwards the method invocation to the wrapped RenderableImage. RenderableOp Creates a rendering using an identity AffineTransform. Among these classes the behavior of the first two appear reasonable. The behavior of the adapter class in fact is probably impossible to modify from this definition. The behavior of RenderableOp however usually leads to an undesirable result. Specifically, for the default case the image dimensions in renderable coordinates are aspect_ratio x 1.0 where aspect_ratio is the ratio of the image width to its height. If an identity affine mapping is used to transform an image with these bounds to rendered coordinate space, then the resultant RenderedImage will have unity height! This is clearly not useful. The proposed solution to this is to make the following API modifications. 1.2 javax.media.jai.JAI 1.2.1 Add a RenderingHints.Key Constant /** * Key for the dimensions of a RenderedImage created by * invoking createDefaultRendering() on a node of type * RenderableOp in a renderable processing chain. The * type of the associated value is java.awt.Dimension. */ public static final RenderingHints.Key KEY_DEFAULT_RENDERING_SIZE; 1.2.2 Add Methods to Manage a Global Setting of Default Rendering Size /** * Sets the default size of the rendering created by invoking * createDefaultRendering() on a RenderableOp. * This default size may be overruled by setting a hint with key * KEY_DEFAULT_RENDERING_SIZE on the node. * If null there are no default dimensions. * Either dimension may be non-positive in which case the other * dimension and the renderable aspect ratio will be used to compute * the rendered image size. The intial value of this setting is *
     * new Dimension(0, 512)
     * 
* which produces a default rendering of height 512 and width * 512*aspect_ratio. * * @param defaultSize The default rendering size or null. * * @throws IllegalArgumentException if * defaultSize is non-null and * both the width and height are non-positive. */ public static final void setDefaultRenderingSize(Dimension defaultSize){} /** * Retrieves a clone of the default rendering size. * If null there is no default size set. * * @return The default rendering size or null. */ public static final Dimension getDefaultRenderingSize(){} 1.3 javax.media.jai.RenderableOp Modify the specification of createDefaultRendering(): /** * Returns a default rendering of this RenderableImage. * The dimensions of the created RenderedImage are * determined in the following order of precedence: *
    *
  1. If a JAI.KEY_DEFAULT_RENDERING_SIZE hint is set on * the node it is used unless both its dimensions are non-positive.
  2. *
  3. The value returned by JAI.getDefaultRenderingSize() * is used unless it is null. *
  4. An identity transform from renderable to rendered coordinates * is applied. *
* In all cases the area of interest will equal the image bounds. * Any hints set on the node via setRenderingHints() will * be used. * *

This method does not validate sources and parameters supplied * in the ParameterBlock supplied at construction against * the specification of the operation this node represents. It is the * caller's responsibility to ensure that the data in the * ParameterBlock are suitable for this operation. * Otherwise, some kind of exception or error will occur. Invoking this * method will cause any DeferredData parameters to be * evaluated. * * @return The default RenderedImage. */ public RenderedImage createDefaultRendering(){} 2. Renderable Nodes and RenderingHints It has been suggested by the Expert Group that the factory methods defined in javax.media.jai.JAI for creating renderable images and collections should be capable of accepting a RenderingHints object. These hints would be set on the RenderableOp or CollectionOp constructed by the method. It is therefore proposed to make the following changes. 2.1 javax.media.jai.JAI 2.1.1 Method Additions public static RenderableOp createRenderable(String opName, ParameterBlock args, RenderingHints hints){} public RenderableOp createRenderableNS(String opName, ParameterBlock args, RenderingHints hints){} public Collection createRenderableCollectionNS(String opName, ParameterBlock args, RenderingHints hints){} public static Collection createRenderableCollection(String opName, ParameterBlock args, RenderingHints hints){} 2.1.2 Method Deprecations public RenderableOp createRenderableNS(String opName, ParameterBlock args) {} 2.1.3 Method Removals public Collection createRenderableCollectionNS(String opName, ParameterBlock args){} 2.2 javax.media.jai.CollectionOp Modify createRendering() such that any RenderingHints set on the node are merged with any RenderingHints in the supplied RenderContext with the hints in the argument taking precedence. 2.3 javax.media.jai.RenderableOp Add a constructor: /** * Constructs a RenderableOp given the name of the operation to be * performed and a ParameterBlock containing RenderableImage sources * and other parameters. Any RenderedImage sources referenced by the * ParameterBlock will be ignored. * *

The ParameterBlock may include * DeferredData parameters. These will not be evaluated * until their values are actually required, i.e., when a rendering of * the node is requested or the renderable dimensions are queried. * * @param registry The OperationRegistry to be used for * instantiation. if null, the default registry * is used. * @param opName The operation name. * @param pb The sources and other parameters. If null, * it is assumed that this node has no sources and parameters. * @param hints The common node RenderingHints to be set; * it may be null. * * @throws IllegalArgumentException if opName is * null. */ public RenderableOp(OperationRegistry registry, String opName, ParameterBlock pb, RenderingHints hints) {} 3. Cobbling Methods !!! THIS PORTION OF THE PROPOSAL IS RETRACTED FOR JAI 1.1 !!! Add static methods to PlanarImage to provide a utility mechanism for cobbling tiles. /** * Cobbles the data of the specified region of the given image and * returns the result in a Raster which may either be * newly constructed or be an actual image tile or a child thereof. * If the specified Rectangle is null the * entire image will be cobbled. * * @param image The image whose tiles are to be cobbled. * @param region The rectangular region of the image to be * returned, or null. * * @return A Raster containing the cobbled image data. * * @throws IllegalArgumentException If the supplied * RenderedImage is null. * @throws IllegalArgumentException If the region does not * intersect the image bounds. * @throws IllegalArgumentException If the size of the returned data * is too large to be stored in a single Raster. */ public static Raster cobbleData(RenderedImage image, Rectangle region){} /** * Cobbles the data of the specified region of the given image and * returns the result in a supplied WritableRaster. The * region of the image the overlapping tiles of which are to be * cobbled is determined by the bounds of the supplied * WritableRaster. If the WritableRaster * is null, the entire image will be cobbled into a newly * created WritableRaster. * * @param image The image whose tiles are to be cobbled. * @param raster The WritableRaster into which data * are to be cobbled or null. * * @return A WritableRaster containing the cobbled image * data. * * @throws IllegalArgumentException If the supplied * RenderedImage is null. * @throws IllegalArgumentException If the region does not * intersect the image bounds. * @throws IllegalArgumentException If the size of the returned data * is too large to be stored in a single Raster. */ public static WritableRaster cobbleData(RenderedImage image, WritableRaster raster){} /** * Cobbles the supplied tiles and returns the result in a * Raster which may either be newly constructed or be an * actual image tile or a child thereof. Data lying outside the * specified Rectangle are ignored. It is expected that the * SampleModels of all the supplied tiles are identical. * If not, unexpected errors may occur. If the specified * Rectangle is null the bounds of the * returned Raster will be set to the minimum bounding * box of all supplied tiles. * * @param tiles The tiles to be cobbled. * @param region The rectangular region of data to be * returned, or null. * * @return A Raster containing the cobbled data. * * @throws IllegalArgumentException If the supplied * Raster[] is null. * @throws IllegalArgumentException If the size of the returned data * is too large to be stored in a single Raster. */ public static Raster cobbleData(Raster[] tiles, Rectangle region){} /** * Cobbles the data of a given set of tiles and returns * the result in a supplied WritableRaster. The * It is expected that the SampleModels of all the supplied * tiles are identical. If not, unexpected errors may occur. * The region to be cobbled is determined by the bounds of the supplied * WritableRaster. If the specified * WritableRaster is null, a new * WritableRaster will be returned with bounds * set to the bounding box of all supplied tiles. * * @param tiles The tiles to be cobbled. * @param raster The WritableRaster into which data * are to be cobbled or null. * * @return A WritableRaster containing the cobbled data. * * @throws IllegalArgumentException If the supplied * Raster[] is null. * @throws IllegalArgumentException If the size of the returned data * is too large to be stored in a single Raster. */ public static WritableRaster cobbleData(Raster[] tiles, WritableRaster raster){} 4. TiledImage This class currently does not utilize the source image methods provided by its superclass, PlanarImage. Instead it defines a protected instance variable "src" to refer to an image from which it may draw its data. This is problematic in particular because it compromises traversal of an operation graph which contains a TiledImage. The source accessor and mutator methods defined in the superclass are also useless as a result. It is proposed to rectify this situation by doing the following: A) Deleted the protected instance variable "src". B) Use the superclass source accessor and mutator methods to manage the source image. 5. Initial Default Tile Size Strictly speaking, this may be considered an implementation detail but it is being included for completeness. In the javax.media.jai.JAI class there is specified a default tile size for use in forcing an image to be tiled as described in the documentation of the javax.media.jai.OpImage constructor. In JAI 1.1-beta the initial value of this default tile size was set to 1024x1024. It was found that in operations with smaller images which is common in a number of situations this actually degraded performance. It was empirically determined that 256x256 or 512x512 gave the best performance for the scenarios in question. Consequently for the final version of JAI 1.1 it is proposed to change this initial value of the default tile size to 512x512. 6. RenderedOp Changes 6.1 Rendering Accessor Add a method /** * Returns the value of the protected variable theImage * which may be null if no rendering has yet been created. * This method does not force the node to be rendered. */ public PlanarImage getCurrentRendering() {} 6.2 Node Re-rendering Add a method /** * Forces the node to be re-rendered and returns the new rendering. * The synthetic and locally cached properties and the property * environment of the node will all be reset. All registered * PropertyChangeListeners and any * PropertyChangeListener sinks will be notifed of the * change in the rendering via a RenderingChangeEvent * the invalid region of which will be null. * *

This method could be used for example to trigger a * re-rendering of the node in cases where this would not happen * automatically but is desirable to the application. One * example occurs if a parameter of the operation is a referent of * some other entity which changes but the parameter itself does not * change according to equals(). This could occur for * example for an image file input operation wherein the path to the * file remains the same but the content of the file changes. */ public PlanarImage getNewRendering() {} The interface OperationNode and the utility class OperationNodeSupport will also be updated to indicate how new and old node attributes (such as the ParameterBlock) are compared to determine whether a PropertyChangeEventJAI should be generated by the OperationNode. 7. TileScheduler-related Changes 7.1 TileRequest Add a new interface to javax.media.jai to represent a tile computation request passed to the TileScheduler directly or via PlanarImage.queueTiles(). /** * Interface representing a TileScheduler request to compute * a specific set of tiles for a given image with optional monitoring by * TileComputationListeners. * * @see TileScheduler * @see TileComputationListener * @see RenderedOp * @see OpImage */ public interface TileRequest { /** * Status value indicating that the tile has yet to be processed. */ public static final int TILE_STATUS_PENDING; /** * Status value indicating that the tile has is being processed. */ public static final int TILE_STATUS_PROCESSING; /** * Status value indicating that the tile has been computed successfully. */ public static final int TILE_STATUS_COMPUTED; /** * Status value indicating that the tile computation has been cancelled. */ public static final int TILE_STATUS_CANCELLED; /** * Status value indicating that the tile computation failed. */ public static final int TILE_STATUS_FAILED; /** * Returns the image associated with the request. This is the image * which is actually specified to the TileScheduler. For * most PlanarImages (including OpImages) * this will be the image on which queueTiles() was * invoked; for RenderedOp nodes this will be the rendering * of the node. */ PlanarImage getImage(); /** * Returns the tile indices of all tiles associated with the request. */ Point[] getTileIndices(); /** * Returns the array of TileComputationListeners specified as * monitoring the request. The returned value should be null * if there are no such listeners. */ TileComputationListener[] getTileListeners(); /** * Whether this TileRequest implementation supports the * getTileStatus() method. */ boolean isStatusAvailable(); /** * Returns one of the TILE_STATUS_* constants defined in * this interface to indicate the status of the specified tile (optional * operation). Implementations for which status is available, i.e., * for which isStatusAvailable() returns true, * may but are not required to support all status levels defined by * this interface. The status levels must however be a subset of those * herein defined. * * @param tileX The X index of the tile in the tile array. * @param tileY The Y index of the tile in the tile array. * * @exception UnsupportedOperationException if * isStatusAvailable() returns false. * @exception IllegalArgumentException if the specified tile is not * associated with this request. */ int getTileStatus(int tileX, int tileY); /** * Issues a request to the TileScheduler which generated * this TileRequest to cancel all tiles in the supplied * parameter array which are associated with this request. Any tiles * in the array which are not associated with this request will be * ignored. If the parameter is null a request to cancel * all tiles in the request will be issued. This method should merely * be a convenience wrapper around the cancelTiles() * method of the TileScheduler which created the * TileRequest. */ void cancelTiles(Point[] tileIndices); } 7.2 TileComputationListener . The "block listener" concept is removed; all listeners are "per-tile". . A method is added to receive notification of tile cancellation. . The requests parameter is added to all methods. /** * Interface to monitor tiles which have been submitted to the * TileScheduler for non-prefetch background processing. * The request parameter of each method corresponds to the value * returned by the method used to queue the tiles, i.e., * TileScheduler.scheduleTiles() or more commonly * PlanarImage.queueTiles(). The eventSource * parameter provides the identity of the emitter of the event. If the * event is emitted by the TileScheduler itself this will * be a reference to the TileScheduler object; if it is * emitted by a RenderedOp this will be the * RenderedOp node. The image parameter will * in all cases be the image actually specified to the * TileScheduler. * *

With respect to standard rendered imaging chains consisting of * RenderedOp nodes, any TileComputationListeners * registered with the RenderedOp itself will receive events * from the RenderedOp so that the event source will be the * RenderedOp. If the listener is registered with the * rendering of the node, then the event source will likely be the * TileScheduler itself. This is definitely the case if * the rendering is either an OpImage or is a * PlanarImage which has not overridden queueTiles(). * *

The image parameter passed to any registered listener of * a RenderedOp will contain a reference to the rendering of the * node rather than to the node itself. * *

For a given TileComputationListener exactly one of the * tile status callbacks should be invoked during the life cycle of a given * tile in the TileScheduler. * * @see TileScheduler * @see TileRequest * @see RenderedOp * @see OpImage */ public interface TileComputationListener extends EventListener { /** * To be invoked after each tile is computed. * * @param eventSource The actual emitter of the tile scheduling event, i.e., * the caller of this method. * @param requests The relevant tile computation requests as returned * by the method used to queue the tile. * @param image The image for which tiles are being computed as * specified to the TileScheduler. * @param tileX The X index of the tile in the tile array. * @param tileY The Y index of the tile in the tile array. * @param tile The computed tile. */ void tileComputed(Object eventSource, TileRequest[] requests, PlanarImage image, int tileX, int tileY, Raster tile); /** * To be invoked after a tile is cancelled. * * @param eventSource The actual emitter of the tile scheduling event, i.e., * the caller of this method. * @param requests The relevant tile computation requests as returned * by the method used to queue the tile. * @param image The image for which tiles are being computed as * specified to the TileScheduler. * @param tileX The X index of the tile in the tile array. * @param tileY The Y index of the tile in the tile array. */ void tileCancelled(Object eventSource, TileRequest[] requests, PlanarImage image, int tileX, int tileY); /** * To be invoked when an exceptional situation prevents computation of * a tile. * * @param eventSource The actual emitter of the tile scheduling event, i.e., * the caller of this method. * @param requests The relevant tile computation requests as returned * by the method used to queue the tile. * @param image The image for which tiles are being computed as * specified to the TileScheduler. * @param tileX The X index of the tile in the tile array. * @param tileY The Y index of the tile in the tile array. * @param situation An object describing the error or exception which * prevented computation of the tile. */ void tileComputationFailure(Object eventSource, TileRequest[] requests, PlanarImage image, int tileX, int tileY, Throwable situation); } 7.3 TileScheduler 7.3.1 scheduleTiles() The four-parameter version of this method will be changed to: TileRequest scheduleTiles(PlanarImage target, Point[] tileIndices, TileComputationListener[] tileListeners); The method now: . accepts a single array of TileComputationListeners as there are now only per-tile listeners; . has return type TileRequest instead of 'void'. 7.3.2 cancelTiles() The method will be changed to: void cancelTiles(TileRequest request, Point[] tileIndices); If the specified request does not exist the method does nothing. The 'target' parameter must be non-null. The 'tileIndices' parameter may be null in which case all tiles in the request will be cancelled. If 'tileIndices' is non-null, only indices actually in the request will be cancelled; others will be ignored. 7.4 PlanarImage 7.4.1 queueTiles() Change this method to: public TileRequest queueTiles(Point[] tileIndices) {} wherein the return type is changed to TileRequest and supplies the request. 7.4.2 cancelTiles() Change this method to: public void cancelTiles(TileRequest request, Point[] tileIndices) {} The behavior would be like that described for the TileScheduler. 7.4.3 getTileComputationListeners() Remove the boolean parameter: public TileComputationListener[] getTileComputationListeners() {} 7.5 OpImage Changes to queueTiles() and cancelTiles() as for PlanarImage. 7.6 RenderedOp Changes to queueTiles() and cancelTiles() as for PlanarImage. 8. EnumeratedParameter Change the toString() method to return the concatenation: [class name]:[parameter name]=[parameter value] where the bracketed quantities are replaced by the appropriate Strings. For example, for a subclass FooParameter the returned String would be as com.foobar.jai.FooParameter:SomeValue=2 wherein the parameter name is "SomeValue" with integer value 2. 9. PerspectiveTransform Some changes are suggested to improve consistency of handling the coefficients of the perspective transform. 9.1 Method Deprecations Deprecate the following methods: public double[] getMatrix(double[] flatmatrix) {} public void setTransform(float m00, float m10, float m20, float m01, float m11, float m21, float m02, float m12, float m22) {} 9.2 Method Addition /** * Sets this transform using a two-dimensional array of double precision * values. The row index is first, and the column index is second. * * @param matrix The 2D double array to be used for setting this transform. * The array is assumed to be at least 3x3. * @throws IllegalArgumentException if matrix is null * @throws ArrayIndexOutOfBoundsException if matrix is too small */ public void setTransform(double[][] matrix) {} 10. TileCache Diagnostics While this topic does not strictly fall under the aegis of the JAI specification, it is nonetheless presented here for completeness. Add a method to com.sun.media.jai.util.SunTileCache: /** * Returns an array of EnumeratedParameters corresponding * to the numeric values returned by the getAction() * method of the CachedTile implementation used by * SunTileCache. The "name" of each * EnumeratedParameter provides a brief string * describing the numeric action value. */ public static EnumeratedParameter[] getCachedTileActions() {} 11. Property-Related Changes 11.1 OperationRegistry Modify specification of "sources" parameter of the method public PropertySource getPropertySource(String modeName, String descriptorName, Object op, Vector sources) { to read: * @param sources the PropertySources corresponding to * the sources of the object representing the named descriptor * in the indicated mode. The supplied Vector may * be empty to indicate that there are no sources. which allows the source Vector to be empty. 11.2 OperationNodeSupport Revise specification of getPropertySource() to indicate that the global property environment will not be included in the returned PropertySource if the mode in use does not support properties. /** * Constructs and returns a PropertySource suitable for * use by the specified OperationNode. If the registry mode * identified by getRegistryModeName() supports properties, * i.e., the statement *

     * Registry.getMode(getRegistryModeName()).arePropertiesSupported()
     * 
* evaluates to true, then the PropertySource * will include the global property environment as managed by the * OperationRegistry for the corresponding operation. * Prior and subsequent modifications to the local property environment * made via this object will be reflected in the returned * PropertySource. * * @param opNode the OperationNode requesting its * PropertySource. * @param defaultPS a PropertySource to be used to derive * property values if and only if they would otherwise be * derived by inheritance from a source rather than from a * a PropertyGenerator or a copy-from-source * directive. * * @throws IllegalArgumentException if opNode is null. * * @return A PropertySource including the local and, if * applicable, the global property environment for the operation. * * @see RegistryMode * @see OperationRegistry#getPropertySource(OperationNode op) */ public PropertySource getPropertySource(OperationNode opNode, PropertySource defaultPS) {} 12. PlanarImage/OpImage Hierarchy Constructors 12.1 PlanarImage Remove constraint that all sources must be RenderedImages. Change this: *

The sources parameter contains a list of immediate * sources of this image. All sources must be RenderedImages * and this constructor automatically converts them into * PlanarImages when necessary. If this image has * no source, this argument should be null. to this: *

The sources parameter contains a list of immediate * sources of this image none of which may be null. All * RenderedImages in the list are automatically converted * into PlanarImages when necessary. If this image has * no source, this argument should be null. and delete this: * @throws ClassCastException If sources * is non-null and any object in sources * is non-null but not a RenderedImage. 12.1.1 PlanarImage Source Vector Mutators These changes are proposed to the source list mutators to make them consistent with the principal constructor. /** * Adds an Object source to the list of sources. * If the source is a RenderedImage it is wrapped using * wrapRenderedImage(). If the unwrapped source is a * PlanarImage then this image is added to its list of sinks. * * @param source An Object to be added as an * immediate source of this image. * * @throws IllegalArgumentException If source is * null. */ protected void addSource(Object source) {} /** * Sets an immediate source of this image. The source to be replaced * with the new input Object is referred to by its * index. This image must already have a source corresponding to the * specified index. If the source is a RenderedImage it is * wrapped using wrapRenderedImage(). If the unwrapped * source is a PlanarImage then this image is added to its * list of sinks. If a PlanarImage source previously * existed at this index, this image is removed from its list of sinks. * * @param source A Object source to be set. * @param index The index of the source to be set. * * @throws ArrayIndexOutOfBoundsException If this image has no * immediate source, or if there is no source corresponding * to the index value. * @throws IllegalArgumentException If source is * null. */ protected void setSource(Object source, int index) {} /** * Sets the list of sources from a given List of * PlanarImages. All of the existing sources are * discarded. Any RenderedImage sources in the supplied * list are wrapped using wrapRenderedImage(). The list * of sinks of each prior PlanarImage source and of each * current unwrapped PlanarImage source is adjusted as * necessary such that this image is a sink of all such current sources * but is removed as a sink of all such prior sources which are not * also current. * * @param sourceList a List of PlanarImages. * * @throws IllegalArgumentException If sourceList is * null or contains any null elements. */ protected void setSources(List sourceList) {} 12.2 OpImage Remove constraint that all sources must be RenderedImages. Change this: *

The sources contains a list of immediate source * images of this image. All sources must be RenderedImages * and may not be null. If this image has no source * this argument should be null. This parameter is * forwarded unmodified to the PlanarImage constructor. to this: *

The sources contains a list of immediate sources * of this image. Elements in the list may not be null. * If this image has no sources this argument should be null. * This parameter is forwarded unmodified to the PlanarImage * constructor. and delete this: * @throws ClassCastException If any object in sources * is not a RenderedImage. Add constraints to the various protected vectorize() methods that the method parameter(s) may not be null, e.g.: /** * Stores a RenderedImage in a Vector. * * @param image The image to be stored in the Vector. * * @return A Vector containing the image. * * @throws IllegalArgumentException if image is * null. */ protected static Vector vectorize(RenderedImage image) {} 12.2.1 AreaOpImage Require source image to be non-null: * @throws IllegalArgumentException if source * is null. 12.2.2 GeometricOpImage Add constructor constraints: * @throws IllegalArgumentException if sources * is null. * @throws IllegalArgumentException If sources * is non-null and any object in * sources is null. 12.2.2.1 ScaleOpImage Require source image to be non-null: * @throws IllegalArgumentException if source * is null. 12.2.2.2 WarpOpImage Require source image to be non-null: * @throws IllegalArgumentException if source * is null. 12.2.3 PointOpImage Add missing exception documentation to the principal constructor (the one which accepts a source Vector): * @throws IllegalArgumentException if sources does not * contain at least one element. Require source image(s) to be non-null in constructors that accept one, two, or three RenderedImage parameters, e.g.: * @throws IllegalArgumentException if source0 or * source1 is null. 12.2.4 UntiledOpImage Add constructor constraints: (principal constructor) * @throws IllegalArgumentException if sources * is null. * @throws IllegalArgumentException If sources * is non-null and any object in * sources is null. (other constructors, e.g.) * @throws IllegalArgumentException if source * is null. 13. SerializerFactory Modify the specifications of a few of the methods as follows. . Indicate that superclass Serializers are not included: /** * Retrieves an array of all Serializers currently * resident in the repository which directly support the specified * Class. Serializers which support * a superclass of the specified class and permit subclass * serialization will not be included. * * @param c The class for which Serializers will be * retrieved. * @exception IllegalArgumentException if c is * null. */ public static synchronized Serializer[] getSerializers(Class c) {} . Clarify that superclass Serializers may be returned; remove throwing of UnsupportedOperationException: /** * Retrieves a Serializer for a given class c. * If more than one Serializer is available for the class * then the most recently registered Serializer will be * returned. If no registered Serializer exists which * directly supports the specified class, i.e., one for which the * getSupportedClass() returns a value equal to the * specified class, then a Serializer may be returned * which is actually registered against a superclass but permits * subclass serialization. * * @param c The class for which Serializers will be * retrieved. * @return A Serializer which supports the specified class. * or null if none is available. * @exception IllegalArgumentException if c is * null. * * @see java.awt.image.BandedSampleModel * @see java.awt.image.ComponentSampleModel */ public static synchronized Serializer getSerializer(Class c) {} . Clarify behavior vis-a-vis superclass Serializer: /** * Whether there is currently resident in the repository a * Serializer the getSupportedClass() * method of which returns a value equal to the parameter supplied * to this method according to equals(). * * @param c The class to be tested for compatibility. * @return Whether the specified class is directly supported. * @exception IllegalArgumentException if c is * null */ public static boolean isSupportedClass(Class c) {} 14. RenderedImageAdapter Modified such that the tile indices are checked against the tile index bounds as defined by getMinTile[XY]() and getNum[XY]Tiles(). /** * 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. */ public final Raster getTile(int x, int y) {}