Java Doc for RenderedOp.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.RenderedOp

All known Subclasses:   javax.media.jai.remote.RemoteRenderedOp,
RenderedOp
public class RenderedOp extends PlanarImage implements OperationNode,PropertyChangeListener,Serializable(Code)
A node in a rendered imaging chain. A RenderedOp stores an operation name, a ParameterBlock containing sources and parameters, and a RenderingHints containing hints which may be used in rendering the node. A set of nodes may be joined together via the source Vectors within their respective ParameterBlocks to form a directed acyclic graph (DAG). The topology, i.e., connectivity, of the graph may be altered by changing the node's sources. The operation name, parameters, and rendering hints may also be changed.

Such chains are useful for example as arguments to a RemoteImage; they convey the structure of an imaging chain in a compact representation and at a suitably high level of abstraction to allow the server some leeway in materializing the results. They are also useful in that a chain may be manipulated dynamically and rendered multiple times. Thus for example the same chain of operations may be applied to different images or the parameters of certain operations in a chain may be modified interactively.

A RenderedOp may be constructed directly as, for example,

 
 ParameterBlock pb =
 (new ParameterBlock()).add("SomeFile.tif");
 RenderedOp node = new RenderedOp("fileload", pb, null);
 
 
or via the create or createNS() methods defined in the JAI class. The difference between direct construction of a node and creation via a convenience method is that in the latter case:
  1. It is verified that the operation supports the rendered mode.
  2. Using the validateArguments() method of the associated OperationDescriptor, the arguments (sources and parameters) are validated as being compatible with the specified operation.
  3. Global RenderingHints maintained by the JAI instance are merged with the local RenderingHints with the local hints taking precedence.
  4. If the operation is defined to be "immediate" (the isImmediate() method of the corresponding OperationDescriptor returns true) then the node is rendered.

When a chain of nodes is rendered by any means a "parallel" chain of RenderedImages is created. Each node in the chain of RenderedOps corresponds to a node in the chain of RenderedImages. RenderedImage methods invoked on the RenderedOp are in general forwarded to the associated RenderedImage which is referred to as the rendering of the node.

The translation between RenderedOp chains and RenderedImage (usually OpImage) chains makes use of two levels of indirection provided by the OperationRegistry and RenderedImageFactory (RIF) facilities. First, the local OperationRegistry is used to map the operation name into a RIF. This RIF then constructs a RenderedImage (usually an OpImage) which does the actual image data processing. The local OperationRegistry is used in order to take advantage of the best possible implementation of the operation, e.g., RIFs that provide acceleration for certain cases or RIFs that are known to a server without having to burden the client.

A node may be rendered explicitly by invoking the method getRendering() which also returns the rendering of the node. A node may be rendered implicitly by invoking any method defined in the RenderedImage interface. A node may also be rendered implicitly by invoking any method the execution of which

  • requires some dimensional quantity of the image such as its bounds or tile layout;
  • retrieves image data by any means;
The current rendering may be obtained without forcing the rendering of an unrendered node via the method getCurrentRendering(). A node may also be re-rendered via getNewRendering() which regenerates the rendering from the existing set of sources, parameters, and hints.

A rendering of a node may also be obtained by means of the createInstance() method. This method returns a PlanarImage rendering without marking the node as having been rendered. If the node is not marked as rendered then it will not fire RenderingChangeEvents as described below.

RenderedOp nodes may participate in Java Bean-style events. The PropertyChangeEmitter methods may be used to register and unregister PropertyChangeListeners. RenderedOps are also PropertyChangeListeners so that they may be registered as listeners of other PropertyChangeEmitters or the equivalent. Each RenderedOp also automatically receives any RenderingChangeEvents emitted by any of its sources which are also RenderedOps or any CollectionChangeEvents from any CollectionOp sources.

Certain PropertyChangeEvents may be emitted by the RenderedOp. These include the PropertyChangeEventJAIs and PropertySourceChangeEvents required by virtue of implementing the OperationNode interface. Additionally a RenderingChangeEvent may be emitted if the node has already been rendered and both of the following conditions are satisfied:

  1. A. any of the critical attributes is changed (edited), i.e., the operation name, operation registry, node sources, parameters, or rendering hints; or
    B. the node receives a RenderingChangeEvent from one of its RenderedOp sources or a CollectionChangeEvent from one of its CollectionOp sources.
  2. the old and new renderings differ over some non-empty region.

When a rendered RenderedOp node receives a RenderingChangeEvent from a RenderedOp source, then if the rendering is an OpImage, the region of the current rendering which may be retained will be determined by using mapSourceRect() to forward map the bounds of the invalid region. A similar procedure is used for "InvalidRegion" events emitted by source RenderedImages such as TiledImages. If a critical attribute of the node is edited, then the getInvalidRegion() method of the corresponding OperationDescriptor will be used to determine the invalid region. If the complement of the invalid region contains any tiles of the current rendering and the rendering is an OpImage, a new rendering of the node will be generated and the identified tiles will be retained from the old rendering insofar as possible. This might involve for example adding tiles to a TileCache under the ownership of the new rendering. A RenderingChangeEvent will then be fired to all PropertyChangeListeners of the node, and to any sinks that are PropertyChangeListeners. The newRendering parameter of the event constructor (which may be retrieved via the getNewValue() method of the event) will be set to either the new rendering of the node or to null if it was not possible to retain any tiles of the previous rendering.

RenderedOp nodes are WritablePropertySources and so manage a name-value database of image meta-data also known as image properties. Properties may be set on and requested from a node. The value of a property not explicitly set on the node (via setProperty()) is obtained from the property environment of the node. When a property is derived from the property environment it is cached locally to ensure synchronization, i.e., that properties do not change spontaneously if for example the same property is modified upstream.

The property environment of a RenderedOp is initially derived from that of the corresponding OperationDescriptor as maintained by the OperationRegistry. It may be modified locally by adding PropertyGenerators, directives to copy certain properties from specific sources, or requests to suppress certain properties. These modifications per se cannot be undone directly but may be eliminated as a side effect of other changes to the node as described below.

The RenderedOp itself synthesizes several property values, which may neither be set nor removed. These are: image_width, image_height, image_min_x_coord, image_min_y_coord, tile_cache and tile_cache_key. These properties are referred to as synthetic properties. The property tile_cache_key has a value of type TileCache which indicates where the tiles of the rendering are cached, if anywhere. The value of the property tile_cache_key is a RenderedImage by which the cached tiles are referenced in the indicated cache. If the rendering is of type OpImage or javax.media.jai.remote.PlanarImageServerProxy then the value of tile_cache_key will be set to the rendering itself and the value of tile_cache to the value returned by invoking getTileCache() on the rendering. Otherwise these properties will be set to the same values as the properties of the same names set on the rendering. It is legal for these properties to have the value java.awt.Image.UndefinedProperty.

When a property value is requested an attempt will be made to derive it from the several entities in the following order of precedence:

  1. synthetic properties;
  2. local properties;
  3. the rendering of the node;
  4. any registered PropertyGenerators, or
    a source specified via a copy-from-source directive;
  5. the first node source which defines the property.
Local properties are those which have been cached locally either by virtue of direct invocation of setProperty() or due to caching of a property derived from the property environment. Note that the properties of a node are not copied to its rendering.

All dynamically computed properties of a RenderedOp which have been cached locally, i.e., those cached properties which were not set by an explicit call to setProperty(), will be cleared when any of the critical attributes of the node is edited. By implication these properties will also be cleared when a RenderingChangeEvent is received from any node source. The property environment or the cached properties may also be cleared by invoking resetProperties().

As mentioned, a RenderedOp chain created on a client may be passed to a server via a RemoteImage. Whether the node has been previously rendered is irrelevant to its ability to be serialized. Any RenderedImage sources which are not Serializable will be wrapped in SerializableRenderedImages for serialization. The tile transmission parameters will be determined from the RenderingHints of the node. All other non-serializable objects will attempt to be serialized using SerializerFactory. If no Serializer is available for a particular object, a java.io.NotSerializableException may result. Image properties (meta-data) are serialized insofar as they are serializable: non-serializable components are simply eliminated from the local cache of properties and from the property environment.

Note that RenderedOp nodes used to instantiate operations which have a corresponding OperationDescriptor the isImmediate() method of which returns true are rendered upon deserialization.

RenderedOp represents a single PlanarImage as a node in a RenderedImage operation chain. Its companion classes, RenderableOp and CollectionOp, represent nodes in operation chains of RenderableImages and CollectionImages, respectively.
See Also:   CollectionOp
See Also:   JAI
See Also:   OperationDescriptor
See Also:   OperationRegistry
See Also:   OpImage
See Also:   RenderableOp
See Also:   RenderingChangeEvent
See Also:   javax.media.jai.remote.SerializableRenderedImage
See Also:   javax.media.jai.remote.Serializer
See Also:   javax.media.jai.remote.SerializerFactory
See Also:   java.awt.RenderingHints
See Also:   java.awt.image.renderable.ParameterBlock
See Also:   java.awt.image.renderable.RenderedImageFactory



Field Summary
protected  OperationNodeSupportnodeSupport
     An object to assist in implementing OperationNode.
protected transient  PlanarImagetheImage
     The rendering of the current image, not preserved over RMI.
protected transient  PropertySourcethePropertySource
     The PropertySource containing the combined properties of all of the node's sources.

Constructor Summary
public  RenderedOp(OperationRegistry registry, String opName, ParameterBlock pb, RenderingHints hints)
     Constructs a RenderedOp that will be used to instantiate a particular rendered operation from the specified operation registry, an operation name, a ParameterBlock, and a set of rendering hints.

This method does not validate the contents of the supplied ParameterBlock.

public  RenderedOp(String opName, ParameterBlock pb, RenderingHints hints)
     Constructs a RenderedOp that will be used to instantiate a particular rendered operation from the default operation registry, an operation name, a ParameterBlock, and a set of rendering hints.

Method Summary
public synchronized  voidaddNodeSource(Object source)
     Adds a source to the ParameterBlock of this node.
public synchronized  voidaddPropertyGenerator(PropertyGenerator pg)
     Adds a PropertyGenerator to the node.
public synchronized  voidaddSink(PlanarImage sink)
     Adds a PlanarImage sink to the list of sinks of the node.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1.

public  booleanaddSink(Object sink)
     Adds a sink to the list of node sinks.
public synchronized  voidaddSource(PlanarImage source)
     Adds a PlanarImage source to the ParameterBlock of this node. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1.

public synchronized  voidaddSource(Object source)
     Adds a source to the ParameterBlock of this node.
public  voidcancelTiles(TileRequest request, Point[] tileIndices)
     Issue an advisory cancellation request to nullify processing of the indicated tiles.
public  WritableRastercopyData()
     Renders the node if it has not already been rendered, and copies and returns the entire rendered image into a single raster.
public  WritableRastercopyData(WritableRaster raster)
     Renders the node if it has not already been rendered, and copies a specified rectangle of the rendered image into the given WritableRaster.
Parameters:
  raster - A WritableRaster to be filled with image data.
public synchronized  voidcopyPropertyFromSource(String propertyName, int sourceIndex)
     Forces a property to be copied from the specified source node. By default, a property is copied from the first source node that emits it.
public synchronized  PlanarImagecreateInstance()
     Instantiate a PlanarImage that computes the result of this RenderedOp.
protected synchronized  PlanarImagecreateInstance(boolean isNodeRendered)
     This method performs the actions described by the documentation of createInstance() optionally marking the node as rendered according to the parameter.
protected synchronized  voidcreateRendering()
     Creates a PlanarImage rendering if none exists and sets theImage to the resulting value.
public synchronized  voiddispose()
     Hints that this node and its rendering will no longer be used.
public synchronized  bytegetByteParameter(int index)
     Returns the specified parameter stored in the ParameterBlock of this node as a byte.
public synchronized  chargetCharParameter(int index)
     Returns the specified parameter stored in the ParameterBlock of this node as a char.
public  ColorModelgetColorModel()
     Renders the node if it has not already been rendered, and returns the ColorModel of the rendered image.
public  PlanarImagegetCurrentRendering()
     Returns the value of the protected variable theImage which may be null if no rendering has yet been created.
public  RastergetData()
     Renders the node if it has not already been rendered, and returns the entire rendered image as a Raster.
public  RastergetData(Rectangle rect)
     Renders the node if it has not already been rendered, and returns a specified rectangular region of the rendered image as a Raster.
public synchronized  doublegetDoubleParameter(int index)
     Returns the specified parameter stored in the ParameterBlock of this node as a double.
public synchronized  ObjectgetDynamicProperty(String name)
     Returns the property associated with the specified property name, or java.awt.Image.UndefinedProperty if the specified property is not set on the image.
public synchronized  floatgetFloatParameter(int index)
     Returns the specified parameter stored in the ParameterBlock of this node as a float.
public  intgetHeight()
     Renders the node if it has not already been rendered, and returns the height of the rendered image.
public synchronized  intgetIntParameter(int index)
     Returns the specified parameter stored in the ParameterBlock of this node as an int.
public synchronized  longgetLongParameter(int index)
     Returns the specified parameter stored in the ParameterBlock of this node as a long.
public  intgetMinX()
     Renders the node if it has not already been rendered, and returns the X coordinate of the leftmost column of the rendered image.
public  intgetMinY()
     Renders the node if it has not already been rendered, and returns the X coordinate of the uppermost row of the rendered image.
public  PlanarImagegetNewRendering()
     Forces the node to be re-rendered and returns the new rendering.

If the node has not yet been rendered this method is identical to getRendering().

If the node has already been rendered, then a new rendering will be generated.

public synchronized  ObjectgetNodeSource(int index)
     Returns the specified source stored in the ParameterBlock of this node.
public synchronized  intgetNumParameters()
     Returns the number of parameters stored in the ParameterBlock of this node.
public  intgetNumSources()
     Returns the number of sources stored in the ParameterBlock of this node.
public synchronized  ObjectgetObjectParameter(int index)
     Returns the specified parameter stored in the ParameterBlock of this node as an Object.
public synchronized  StringgetOperationName()
     Returns the name of the operation this node represents as a String.
public synchronized  ParameterBlockgetParameterBlock()
     Returns a clone of the ParameterBlock of this node.
public synchronized  VectorgetParameters()
     Returns a clone of the Vector of parameters stored in the ParameterBlock of this node.
public synchronized  ObjectgetProperty(String name)
     Returns the property associated with the specified property name, or java.awt.Image.UndefinedProperty if the specified property is not set on the image.
public  ClassgetPropertyClass(String name)
     Returns the class expected to be returned by a request for the property with the specified name.
public synchronized  String[]getPropertyNames()
     Returns the names of properties available from this node.
public synchronized  OperationRegistrygetRegistry()
     Returns the OperationRegistry that is used by this node.
public  StringgetRegistryModeName()
     Returns the name of the RegistryMode corresponding to this RenderedOp.
public  PlanarImagegetRendering()
     Returns the PlanarImage rendering associated with this RenderedOp node.
public synchronized  ObjectgetRenderingHint(RenderingHints.Key key)
     Gets a hint from the RenderingHints of this node.
public  RenderingHintsgetRenderingHints()
     Returns a clone of the RenderingHints of this node or null.
public  SampleModelgetSampleModel()
     Renders the node if it has not already been rendered, and returns the SampleModel of the rendered image.
public synchronized  shortgetShortParameter(int index)
     Returns the specified parameter stored in the ParameterBlock of this node as a short.
public  PlanarImagegetSource(int index)
     Returns the specified PlanarImage source stored in the ParameterBlock of this node. If there is no source corresponding to the specified index, an ArrayIndexOutOfBoundsException will be thrown.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1.

public  PlanarImagegetSourceImage(int index)
     Returns the specified PlanarImage source stored in the ParameterBlock of this node. If there is no source corresponding to the specified index, an ArrayIndexOutOfBoundsException will be thrown.
Parameters:
  index - The index of the desired source.
public synchronized  ObjectgetSourceObject(int index)
     Returns the specified source stored in the ParameterBlock of this node.
public synchronized  VectorgetSources()
     Returns a clone of the Vector of sources stored in the ParameterBlock of this node.
public  RastergetTile(int tileX, int tileY)
     Renders the node if it has not already been rendered, and returns the specified tile of the rendered image.
Parameters:
  tileX - The X index of the tile.
Parameters:
  tileY - The Y index of the tile.
public  intgetTileGridXOffset()
     Renders the node if it has not already been rendered, and returns the tile grid X offset of the rendered image.
public  intgetTileGridYOffset()
     Renders the node if it has not already been rendered, and returns the tile grid Y offset of the rendered image.
public  intgetTileHeight()
     Renders the node if it has not already been rendered, and returns the tile height of the rendered image.
public  intgetTileWidth()
     Renders the node if it has not already been rendered, and returns the tile width of the rendered image.
public  Raster[]getTiles(Point tileIndices)
     Renders the node if it has not already been rendered, and returns the tiles indicated by the tileIndices of the rendered image as an array of Rasters.
Parameters:
  tileIndices - An array of Points representing TileIndices.
public  intgetWidth()
     Renders the node if it has not already been rendered, and returns the width of the rendered image.
public  Point2DmapDestPoint(Point2D destPt, int sourceIndex)
     Computes the position in the specified source that best matches the supplied destination image position.
public  Point2DmapSourcePoint(Point2D sourcePt, int sourceIndex)
     Computes the position in the destination that best matches the supplied source image position.
public  voidprefetchTiles(Point tileIndices)
     Renders the node if it has not already been rendered.
public synchronized  voidpropertyChange(PropertyChangeEvent evt)
     Implementation of PropertyChangeListener.

When invoked with an event which is an instance of RenderingChangeEvent or CollectionChangeEvent emitted by a RenderedOp or CollectionOp, respectively, the node will respond by re-rendering itself while retaining any tiles possible.

public  TileRequestqueueTiles(Point[] tileIndices)
     Queues a list of tiles for computation.
public  voidremoveProperty(String name)
     Removes the named property from the local property set of the RenderedOp as well as from its property environment.
public synchronized  booleanremoveSink(PlanarImage sink)
     Removes a PlanarImage sink from the list of sinks of the node.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1.

public  booleanremoveSink(Object sink)
     Removes a sink from the list of node sinks.
public  voidremoveSinks()
     Removes all sinks from the list of sinks of the node.
public synchronized  booleanremoveSource(PlanarImage source)
     Removes the specified PlanarImage source from the ParameterBlock of this node.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1.

public synchronized  booleanremoveSource(Object source)
     Removes the specified Object source from the ParameterBlock of this node.

The node is removed automatically as a sink if the source is a PlanarImage or a CollectionImage.
Parameters:
  source - A Object to be removed.
throws:
  IllegalArgumentException - ifsource is null.

public synchronized  voidremoveSources()
     Removes all the sources stored in the ParameterBlock of this node.
protected synchronized  voidresetProperties(boolean resetPropertySource)
     Resets the PropertySource.
 voidsendExceptionToListener(String message, Exception e)
    
public synchronized  voidsetNodeSource(Object source, int index)
     Sets the specified source stored in the ParameterBlock of this node to a new source object.
public synchronized  voidsetOperationName(String opName)
     Sets the name of the operation this node represents.
public synchronized  voidsetParameter(byte param, int index)
     Sets one of the node's parameters to a byte.
public synchronized  voidsetParameter(char param, int index)
     Sets one of the node's parameters to a char.
public synchronized  voidsetParameter(short param, int index)
     Sets one of the node's parameters to a short.
public synchronized  voidsetParameter(int param, int index)
     Sets one of the node's parameters to an int.
public synchronized  voidsetParameter(long param, int index)
     Sets one of the node's parameters to a long.
public synchronized  voidsetParameter(float param, int index)
     Sets one of the node's parameters to a float.
public synchronized  voidsetParameter(double param, int index)
     Sets one of the node's parameters to a double.
public synchronized  voidsetParameter(Object param, int index)
     Sets one of the node's parameters to an Object. If the index lies beyond the current source list, the list is extended with nulls as needed. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The Object may be a DeferredData instance.

public synchronized  voidsetParameterBlock(ParameterBlock pb)
     Sets the ParameterBlock of this node. If the specified new ParameterBlock is null, it is assumed that this node has no input sources and parameters. The supplied parameter is cloned.

This method does not validate the content of the supplied ParameterBlock.

public synchronized  voidsetParameters(Vector parameters)
     Sets all the parameters of this node. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The Vector may include DeferredData parameters.

public synchronized  voidsetProperty(String name, Object value)
     Sets a local property on a node.
public synchronized  voidsetRegistry(OperationRegistry registry)
     Sets the OperationRegistry that is used by this node.
public synchronized  voidsetRenderingHint(RenderingHints.Key key, Object value)
     Sets a hint in the RenderingHints of this node.
public synchronized  voidsetRenderingHints(RenderingHints hints)
     Sets the RenderingHints of this node.
public synchronized  voidsetSource(PlanarImage source, int index)
     Sets the specified source stored in the ParameterBlock of this node to a new PlanarImage source. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1.

public synchronized  voidsetSource(Object source, int index)
     Sets the specified source stored in the ParameterBlock of this node to a new source object. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The node is added automatically as a sink if the source is a PlanarImage or a CollectionImage.

public synchronized  voidsetSources(List sourceList)
     Replaces the sources in the ParameterBlock of this node with a new list of sources. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The node is added automatically as a sink of any source which is a PlanarImage or a CollectionImage.

public synchronized  voidsuppressProperty(String name)
     Removes a named property from the property environment of this node.

Field Detail
nodeSupport
protected OperationNodeSupport nodeSupport(Code)
An object to assist in implementing OperationNode.
since:
   JAI 1.1



theImage
protected transient PlanarImage theImage(Code)
The rendering of the current image, not preserved over RMI.



thePropertySource
protected transient PropertySource thePropertySource(Code)
The PropertySource containing the combined properties of all of the node's sources.




Constructor Detail
RenderedOp
public RenderedOp(OperationRegistry registry, String opName, ParameterBlock pb, RenderingHints hints)(Code)
Constructs a RenderedOp that will be used to instantiate a particular rendered operation from the specified operation registry, an operation name, a ParameterBlock, and a set of rendering hints.

This method does not validate the contents of the supplied ParameterBlock. The caller should ensure that the sources and parameters in the ParameterBlock are suitable for the operation this node represents; otherwise some form of error or exception may occur at the time of rendering.

The ParameterBlock may include DeferredData parameters. These will not be evaluated until their values are actually required, i.e., when the node is rendered.

The node is added automatically as a sink of any PlanarImage or CollectionImage sources.
Parameters:
  registry - The OperationRegistry to be used forinstantiation. if null, the default registryis used. Saved by reference.
Parameters:
  opName - The operation name. Saved by reference.
Parameters:
  pb - The sources and parameters. If null,it is assumed that this node has no sources and parameters.This parameter is cloned.
Parameters:
  hints - The rendering hints. If null, it is assumedthat no hints are associated with the rendering.This parameter is cloned.
throws:
  IllegalArgumentException - if opName isnull.




RenderedOp
public RenderedOp(String opName, ParameterBlock pb, RenderingHints hints)(Code)
Constructs a RenderedOp that will be used to instantiate a particular rendered operation from the default operation registry, an operation name, a ParameterBlock, and a set of rendering hints. The default operation registry is used.

This method does not validate the contents of the supplied ParameterBlock. The caller should ensure that the sources and parameters in the ParameterBlock are suitable for the operation this node represents; otherwise some form of error or exception may occur at the time of rendering.

The ParameterBlock may include DeferredData parameters. These will not be evaluated until their values are actually required, i.e., when the node is rendered.

The node is added automatically as a sink of any PlanarImage or CollectionImage sources.
Parameters:
  opName - The operation name. Saved by reference.
Parameters:
  pb - The sources and parameters. If null,it is assumed that this node has no sources and parameters.This parameter is cloned.
Parameters:
  hints - The rendering hints. If null, it is assumedthat no hints are associated with the rendering.This parameter is cloned.
throws:
  IllegalArgumentException - if opName isnull.





Method Detail
addNodeSource
public synchronized void addNodeSource(Object source)(Code)
Adds a source to the ParameterBlock of this node. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.
Parameters:
  source - The source to be added to theParameterBlock



addPropertyGenerator
public synchronized void addPropertyGenerator(PropertyGenerator pg)(Code)
Adds a PropertyGenerator to the node. The property values emitted by this property generator override any previous definitions.
Parameters:
  pg - A PropertyGenerator to be added to this node'sproperty environment.
throws:
  IllegalArgumentException - ifpg is null.



addSink
public synchronized void addSink(PlanarImage sink)(Code)
Adds a PlanarImage sink to the list of sinks of the node.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1. To obtain the previous behavior use getRendering().addSink(). The description of the previous behavior is as follows:

Renders the node if it has not already been rendered, and adds a PlanarImage sink to the list of sinks of the rendered image.

Note also that this class no longer overrides getSinks(). To obtain the previous behavior of getSinks() use getRendering().getSinks().
throws:
  IllegalArgumentException - ifsink is null.




addSink
public boolean addSink(Object sink)(Code)
Adds a sink to the list of node sinks. If the sink is an instance of PropertyChangeListener it will be notified in the same manner as registered listeners for the changes to the "Rendering" property of this node as long as its WeakReference has not yet been cleared.
throws:
  IllegalArgumentException - ifsink is null.
since:
   JAI 1.1



addSource
public synchronized void addSource(PlanarImage source)(Code)
Adds a PlanarImage source to the ParameterBlock of this node. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1. To obtain the previous behavior use getRendering().addSource(). The description of the previous behavior is as follows:

Renders the node if it has not already been rendered, and adds a PlanarImage source to the list of sources of the rendered image.

Parameters:
  source - The source to be added to theParameterBlock
throws:
  IllegalArgumentException - if source isnull.



addSource
public synchronized void addSource(Object source)(Code)
Adds a source to the ParameterBlock of this node. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The node is added automatically as a sink if the source is a PlanarImage or a CollectionImage.
Parameters:
  source - The source to be added to theParameterBlock
throws:
  IllegalArgumentException - ifsource is null.
since:
   JAI 1.1




cancelTiles
public void cancelTiles(TileRequest request, Point[] tileIndices)(Code)
Issue an advisory cancellation request to nullify processing of the indicated tiles.
Parameters:
  request - The request for which tiles are to be cancelled.
Parameters:
  tileIndices - The tiles to be cancelled; may be null.Any tiles not actually in the TileRequest will beignored.
throws:
  IllegalArgumentException - If request isnull.
since:
   JAI 1.1



copyData
public WritableRaster copyData()(Code)
Renders the node if it has not already been rendered, and copies and returns the entire rendered image into a single raster.



copyData
public WritableRaster copyData(WritableRaster raster)(Code)
Renders the node if it has not already been rendered, and copies a specified rectangle of the rendered image into the given WritableRaster.
Parameters:
  raster - A WritableRaster to be filled with image data. A reference to the supplied WritableRaster.



copyPropertyFromSource
public synchronized void copyPropertyFromSource(String propertyName, int sourceIndex)(Code)
Forces a property to be copied from the specified source node. By default, a property is copied from the first source node that emits it. The result of specifying an invalid source is undefined.
Parameters:
  propertyName - the name of the property to be copied.
Parameters:
  sourceIndex - the index of the from which to copy the property.
throws:
  IllegalArgumentException - if propertyName isnull.
since:
   JAI 1.1



createInstance
public synchronized PlanarImage createInstance()(Code)
Instantiate a PlanarImage that computes the result of this RenderedOp. The local OperationRegistry of this node is used to translate the operation name into a RenderedImageFactory and eventually an actual RenderedImage (usually an OpImage).

During this method, all the sources supplied in the ParameterBlock are checked. If any of the sources is a RenderedOp, a rendering of that source is created. This propagates all the way up to the top of the op chain. If any of the sources is a Collection, then the collection is passed to the operation as-is. If there is a RenderedOp anywhere in the collection, it is up to the individual operation to create the rendering for that RenderedOp.

This method does not validate the sources and parameters stored in the ParameterBlock against the specification of the operation this node represents. It is the responsibility of the caller 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 source RenderedOp nodes to be rendered using getRendering() and any source CollectionOp nodes to be rendered using getCollection(). Any DeferredData parameters in the ParameterBlock will also be evaluated.

The RenderedImage generated by the selected RenderedImageFactory will be converted to a PlanarImage by invoking PlanarImage.wrapRenderedImage(). The resulting image as a PlanarImage.
throws:
  RuntimeException - if the image factory charged with renderingthe node is unable to create a rendering.




createInstance
protected synchronized PlanarImage createInstance(boolean isNodeRendered)(Code)
This method performs the actions described by the documentation of createInstance() optionally marking the node as rendered according to the parameter.
throws:
  RuntimeException - if the image factory charged with renderingthe node is unable to create a rendering.
See Also:   RenderedOp.createInstance()
since:
   JAI 1.1



createRendering
protected synchronized void createRendering()(Code)
Creates a PlanarImage rendering if none exists and sets theImage to the resulting value. This method performs the same actions as createInstance() but sets theImage to the result.
throws:
  RuntimeException - if the image factory charged with renderingthe node is unable to create a rendering.
See Also:   RenderedOp.createInstance()
since:
   JAI 1.1



dispose
public synchronized void dispose()(Code)
Hints that this node and its rendering will no longer be used.

If theImage is non-null, then this call is first forwarded to theImage.dispose(). Subsequent to this super.dispose() is invoked.

The results of referencing an image after a call to dispose() are undefined.


since:
   JAI 1.1.2



getByteParameter
public synchronized byte getByteParameter(int index)(Code)
Returns the specified parameter stored in the ParameterBlock of this node as a byte. An ArrayIndexOutOfBoundsException may occur if an invalid index is supplied
Parameters:
  index - The index of the parameter.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



getCharParameter
public synchronized char getCharParameter(int index)(Code)
Returns the specified parameter stored in the ParameterBlock of this node as a char. An ArrayIndexOutOfBoundsException may occur if an invalid index is supplied
Parameters:
  index - The index of the parameter.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



getColorModel
public ColorModel getColorModel()(Code)
Renders the node if it has not already been rendered, and returns the ColorModel of the rendered image.



getCurrentRendering
public PlanarImage getCurrentRendering()(Code)
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.
since:
   JAI 1.1



getData
public Raster getData()(Code)
Renders the node if it has not already been rendered, and returns the entire rendered image as a Raster.



getData
public Raster getData(Rectangle rect)(Code)
Renders the node if it has not already been rendered, and returns a specified rectangular region of the rendered image as a Raster.



getDoubleParameter
public synchronized double getDoubleParameter(int index)(Code)
Returns the specified parameter stored in the ParameterBlock of this node as a double. An ArrayIndexOutOfBoundsException may occur if an invalid index is supplied
Parameters:
  index - The index of the parameter.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



getDynamicProperty
public synchronized Object getDynamicProperty(String name)(Code)
Returns the property associated with the specified property name, or java.awt.Image.UndefinedProperty if the specified property is not set on the image. This method is dynamic in the sense that subsequent invocations of this method on the same object may return different values as a function of changes in the property environment of the node, e.g., a change in which PropertyGenerators are registered or in the values associated with properties of node sources. The case of the property name passed to this method is ignored.
Parameters:
  name - A String naming the property.
throws:
  IllegalArgumentException - ifname is null.
since:
   JAI 1.1



getFloatParameter
public synchronized float getFloatParameter(int index)(Code)
Returns the specified parameter stored in the ParameterBlock of this node as a float. An ArrayIndexOutOfBoundsException may occur if an invalid index is supplied
Parameters:
  index - The index of the parameter.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



getHeight
public int getHeight()(Code)
Renders the node if it has not already been rendered, and returns the height of the rendered image.



getIntParameter
public synchronized int getIntParameter(int index)(Code)
Returns the specified parameter stored in the ParameterBlock of this node as an int. An ArrayIndexOutOfBoundsException may occur if an invalid index is supplied
Parameters:
  index - The index of the parameter.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



getLongParameter
public synchronized long getLongParameter(int index)(Code)
Returns the specified parameter stored in the ParameterBlock of this node as a long. An ArrayIndexOutOfBoundsException may occur if an invalid index is supplied
Parameters:
  index - The index of the parameter.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



getMinX
public int getMinX()(Code)
Renders the node if it has not already been rendered, and returns the X coordinate of the leftmost column of the rendered image.



getMinY
public int getMinY()(Code)
Renders the node if it has not already been rendered, and returns the X coordinate of the uppermost row of the rendered image.



getNewRendering
public PlanarImage getNewRendering()(Code)
Forces the node to be re-rendered and returns the new rendering.

If the node has not yet been rendered this method is identical to getRendering().

If the node has already been rendered, then a new rendering will be generated. 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. The (possibly regenerated) rendering of the node. This valuemay be ignored if the intent of invoking the method was merely tore-render the node and generate events forRenderingChangeEvent listeners.
since:
   JAI 1.1




getNodeSource
public synchronized Object getNodeSource(int index)(Code)
Returns the specified source stored in the ParameterBlock of this node. If there is no source corresponding to the specified index, an ArrayIndexOutOfBoundsException will be thrown.
Parameters:
  index - The index of the source.



getNumParameters
public synchronized int getNumParameters()(Code)
Returns the number of parameters stored in the ParameterBlock of this node.



getNumSources
public int getNumSources()(Code)
Returns the number of sources stored in the ParameterBlock of this node. This may differ from the number of sources of the rendered image.



getObjectParameter
public synchronized Object getObjectParameter(int index)(Code)
Returns the specified parameter stored in the ParameterBlock of this node as an Object. An ArrayIndexOutOfBoundsException may occur if an invalid index is supplied
Parameters:
  index - The index of the parameter.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



getOperationName
public synchronized String getOperationName()(Code)
Returns the name of the operation this node represents as a String.



getParameterBlock
public synchronized ParameterBlock getParameterBlock()(Code)
Returns a clone of the ParameterBlock of this node.



getParameters
public synchronized Vector getParameters()(Code)
Returns a clone of the Vector of parameters stored in the ParameterBlock of this node.



getProperty
public synchronized Object getProperty(String name)(Code)
Returns the property associated with the specified property name, or java.awt.Image.UndefinedProperty if the specified property is not set on the image. If name equals the name of any synthetic property, i.e., image_width, image_height, image_min_x_coord, or image_min_y_coord, then the node will be rendered.
Parameters:
  name - A String naming the property.
throws:
  IllegalArgumentException - ifname is null.



getPropertyClass
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 nameis null. The Class expected to be return by arequest for the value of this property or null.
since:
   JAI 1.1



getPropertyNames
public synchronized String[] getPropertyNames()(Code)
Returns the names of properties available from this node. These properties are a combination of those derived from prior nodes in the imaging chain, those set locally, and a number of locally derived, immutable properties based on the rendering associated with this node -- height, width, and so forth. An array of Strings containing validproperty names.



getRegistry
public synchronized OperationRegistry getRegistry()(Code)
Returns the OperationRegistry that is used by this node. If the registry is not set, the default registry is returned.



getRegistryModeName
public String getRegistryModeName()(Code)
Returns the name of the RegistryMode corresponding to this RenderedOp. This method always returns the String "rendered".
since:
   JAI 1.1



getRendering
public PlanarImage getRendering()(Code)
Returns the PlanarImage rendering associated with this RenderedOp node. This method performs the same action as createRendering() but returns theImage.
throws:
  RuntimeException - if the image factory charged with renderingthe node is unable to create a rendering.
See Also:   RenderedOp.createRendering()
See Also:   RenderedOp.createInstance()



getRenderingHint
public synchronized Object getRenderingHint(RenderingHints.Key key)(Code)
Gets a hint from the RenderingHints of this node. the value associated with the specified key ornull if the key is not mapped to any value.
since:
   JAI 1.1



getRenderingHints
public RenderingHints getRenderingHints()(Code)
Returns a clone of the RenderingHints of this node or null.



getSampleModel
public SampleModel getSampleModel()(Code)
Renders the node if it has not already been rendered, and returns the SampleModel of the rendered image.



getShortParameter
public synchronized short getShortParameter(int index)(Code)
Returns the specified parameter stored in the ParameterBlock of this node as a short. An ArrayIndexOutOfBoundsException may occur if an invalid index is supplied
Parameters:
  index - The index of the parameter.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



getSource
public PlanarImage getSource(int index)(Code)
Returns the specified PlanarImage source stored in the ParameterBlock of this node. If there is no source corresponding to the specified index, an ArrayIndexOutOfBoundsException will be thrown.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1. To obtain the previous behavior use getRendering().getSource(). The description of the previous behavior is as follows:

Renders the node if it has not already been rendered, and returns the specified PlanarImage source of the rendered image. If there is no source corresponding to the specified index, this method will throw an ArrayIndexOutOfBoundsException. The source returned may differ from the source stored in the ParameterBlock of this node.

Parameters:
  index - The index of the desired source. A PlanarImage source.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.
throws:
  ClassCastException - if the source at the indicated index isnot a PlanarImage.



getSourceImage
public PlanarImage getSourceImage(int index)(Code)
Returns the specified PlanarImage source stored in the ParameterBlock of this node. If there is no source corresponding to the specified index, an ArrayIndexOutOfBoundsException will be thrown.
Parameters:
  index - The index of the desired source. A PlanarImage source.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.
throws:
  ClassCastException - if the source at the indicated index isnot a PlanarImage.
since:
   JAI 1.1



getSourceObject
public synchronized Object getSourceObject(int index)(Code)
Returns the specified source stored in the ParameterBlock of this node. If there is no source corresponding to the specified index, an ArrayIndexOutOfBoundsException will be thrown.
Parameters:
  index - The index of the source.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.
since:
   JAI 1.1



getSources
public synchronized Vector getSources()(Code)
Returns a clone of the Vector of sources stored in the ParameterBlock of this node. This may differ from the source vector of the rendering of the node.



getTile
public Raster getTile(int tileX, int tileY)(Code)
Renders the node if it has not already been rendered, and returns the specified tile of the rendered image.
Parameters:
  tileX - The X index of the tile.
Parameters:
  tileY - The Y index of the tile. The requested tile as a Raster.



getTileGridXOffset
public int getTileGridXOffset()(Code)
Renders the node if it has not already been rendered, and returns the tile grid X offset of the rendered image.



getTileGridYOffset
public int getTileGridYOffset()(Code)
Renders the node if it has not already been rendered, and returns the tile grid Y offset of the rendered image.



getTileHeight
public int getTileHeight()(Code)
Renders the node if it has not already been rendered, and returns the tile height of the rendered image.



getTileWidth
public int getTileWidth()(Code)
Renders the node if it has not already been rendered, and returns the tile width of the rendered image.



getTiles
public Raster[] getTiles(Point tileIndices)(Code)
Renders the node if it has not already been rendered, and returns the tiles indicated by the tileIndices of the rendered image as an array of Rasters.
Parameters:
  tileIndices - An array of Points representing TileIndices. An array of Raster containing the tiles correspondingto the given TileIndices.
throws:
  IllegalArgumentException - If tileIndices isnull.



getWidth
public int getWidth()(Code)
Renders the node if it has not already been rendered, and returns the width of the rendered image.



mapDestPoint
public Point2D mapDestPoint(Point2D destPt, int sourceIndex)(Code)
Computes the position in the specified source that best matches the supplied destination image position. If it is not possible to compute the requested position, null will be returned. If the point is mapped outside the source bounds, the coordinate value or null may be returned at the discretion of the implementation.

If the rendering of the node is an OpImage, the call is forwarded to the equivalent method of the rendering. Otherwise destPt is returned to indicate the identity mapping. In either case if the node had not been rendered it will be.


Parameters:
  destPt - the position in destination image coordinatesto map to source image coordinates.
Parameters:
  sourceIndex - the index of the source image. a Point2D of the same class asdestPt or null.
throws:
  IllegalArgumentException - if destPt isnull.
throws:
  IndexOutOfBoundsException - if sourceIndex isnegative or greater than or equal to the number of sources.
since:
   JAI 1.1.2



mapSourcePoint
public Point2D mapSourcePoint(Point2D sourcePt, int sourceIndex)(Code)
Computes the position in the destination that best matches the supplied source image position. If it is not possible to compute the requested position, null will be returned. If the point is mapped outside the destination bounds, the coordinate value or null may be returned at the discretion of the implementation.

If the rendering of the node is an OpImage, the call is forwarded to the equivalent method of the rendering. Otherwise sourcePt is returned to indicate the identity mapping. In either case if the node had not been rendered it will be.


Parameters:
  sourcePt - the position in source image coordinatesto map to destination image coordinates.
Parameters:
  sourceIndex - the index of the source image. a Point2D of the same class assourcePt or null.
throws:
  IllegalArgumentException - if sourcePt isnull.
throws:
  IndexOutOfBoundsException - if sourceIndex isnegative or greater than or equal to the number of sources.
since:
   JAI 1.1.2



prefetchTiles
public void prefetchTiles(Point tileIndices)(Code)
Renders the node if it has not already been rendered. Hints that the given tiles of the rendered image might be needed in the near future.
Parameters:
  tileIndices - A list of tileIndices indicating which tilesto prefetch.
throws:
  IllegalArgumentException - If tileIndices isnull.



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

When invoked with an event which is an instance of RenderingChangeEvent or CollectionChangeEvent emitted by a RenderedOp or CollectionOp, respectively, the node will respond by re-rendering itself while retaining any tiles possible. It will respond to an "InvalidRegion" event emitted by a source RenderedImage in a manner similar to that applied for RenderingChangeEvents.
See Also:   TiledImage.propertyChange
since:
   JAI 1.1




queueTiles
public TileRequest queueTiles(Point[] tileIndices)(Code)
Queues a list of tiles for computation. Registered listeners will be notified after each tile has been computed. The event source parameter passed to such listeners will be the node itself; the image parameter will be the rendering of the node. The RenderedOp itself in fact should monitor any TileComputationListener events of its rendering and forward any such events to any of its registered listeners.
Parameters:
  tileIndices - A list of tile indices indicating which tilesto schedule for computation.
throws:
  IllegalArgumentException - If tileIndices isnull.
since:
   JAI 1.1



removeProperty
public void removeProperty(String name)(Code)
Removes the named property from the local property set of the RenderedOp as well as from its property environment. The synthetic properties (containing image width, height, and position) may not be removed.
exception:
  IllegalArgumentException - if nameis null.
throws:
  RuntimeException - if nameconflicts with Synthetic property.
since:
   JAI 1.1



removeSink
public synchronized boolean removeSink(PlanarImage sink)(Code)
Removes a PlanarImage sink from the list of sinks of the node.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1. To obtain the previous behavior use getRendering().removeSink(). The description of the previous behavior is as follows:

Renders the node if it has not already been rendered, and removes a PlanarImage sink from the list of sinks of the rendered image.

Note also that this class no longer overrides getSinks(). To obtain the previous behavior of getSinks() use getRendering().getSinks().
throws:
  IllegalArgumentException - ifsink is null.




removeSink
public boolean removeSink(Object sink)(Code)
Removes a sink from the list of node sinks. If the sink is a PropertyChangeListener for the "Rendering" property of this node it will no longer be eligible for notification events indicating a change in this property.
throws:
  IllegalArgumentException - ifsink is null.
since:
   JAI 1.1



removeSinks
public void removeSinks()(Code)
Removes all sinks from the list of sinks of the node.
since:
   JAI 1.1



removeSource
public synchronized boolean removeSource(PlanarImage source)(Code)
Removes the specified PlanarImage source from the ParameterBlock of this node.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1. To obtain the previous behavior use getRendering().removeSource(). The description of the previous behavior is as follows:

Renders the node if it has not already been rendered, and removes a PlanarImage source from the list of sources of the rendered image.

Parameters:
  source - A PlanarImage to be removed.
throws:
  IllegalArgumentException - ifsource is null. true if the element was present, falseotherwise.



removeSource
public synchronized boolean removeSource(Object source)(Code)
Removes the specified Object source from the ParameterBlock of this node.

The node is removed automatically as a sink if the source is a PlanarImage or a CollectionImage.
Parameters:
  source - A Object to be removed.
throws:
  IllegalArgumentException - ifsource is null. true if the element was present, falseotherwise.
since:
   JAI 1.1




removeSources
public synchronized void removeSources()(Code)
Removes all the sources stored in the ParameterBlock of this node. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The node is removed automatically as a sink of any source which is a PlanarImage or a CollectionImage.




resetProperties
protected synchronized void resetProperties(boolean resetPropertySource)(Code)
Resets the PropertySource. If the parameter is true then the property environment is completely reset; if false then only cached properties are cleared, i.e., those which were derived from the property environment and are now stored in the local cache.
since:
   JAI 1.1



sendExceptionToListener
void sendExceptionToListener(String message, Exception e)(Code)



setNodeSource
public synchronized void setNodeSource(Object source, int index)(Code)
Sets the specified source stored in the ParameterBlock of this node to a new source object. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.
Parameters:
  source - The Source to be set.
Parameters:
  index - The Index at which it is to be set.
throws:
  IllegalArgumentException - ifsource is null.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



setOperationName
public synchronized void setOperationName(String opName)(Code)
Sets the name of the operation this node represents. The parameter is saved by reference.

If the supplied name does not equal the current operation name, a PropertyChangeEventJAI named "OperationName" will be fired and a RenderingChangeEvent may be fired if the node has already been rendered.
Parameters:
  opName - The new operation name to be set.
throws:
  IllegalArgumentException - if opName isnull.




setParameter
public synchronized void setParameter(byte param, int index)(Code)
Sets one of the node's parameters to a byte. If the index lies beyond the current source list, the list is extended with nulls as needed. This is a convenience method that invokes setParameter(Object,int) and so adheres to the same event firing behavior.
Parameters:
  param - The parameter, as a byte.
Parameters:
  index - The index of the parameter.



setParameter
public synchronized void setParameter(char param, int index)(Code)
Sets one of the node's parameters to a char. If the index lies beyond the current source list, the list is extended with nulls as needed. This is a convenience method that invokes setParameter(Object,int) and so adheres to the same event firing behavior.
Parameters:
  param - The parameter, as a char.
Parameters:
  index - The index of the parameter.



setParameter
public synchronized void setParameter(short param, int index)(Code)
Sets one of the node's parameters to a short. If the index lies beyond the current source list, the list is extended with nulls as needed.
Parameters:
  param - The parameter, as a short.
Parameters:
  index - The index of the parameter.



setParameter
public synchronized void setParameter(int param, int index)(Code)
Sets one of the node's parameters to an int. If the index lies beyond the current source list, the list is extended with nulls as needed.
Parameters:
  param - The parameter, as an int.
Parameters:
  index - The index of the parameter.



setParameter
public synchronized void setParameter(long param, int index)(Code)
Sets one of the node's parameters to a long. If the index lies beyond the current source list, the list is extended with nulls as needed.
Parameters:
  param - The parameter, as a long.
Parameters:
  index - The index of the parameter.



setParameter
public synchronized void setParameter(float param, int index)(Code)
Sets one of the node's parameters to a float. If the index lies beyond the current source list, the list is extended with nulls as needed.
Parameters:
  param - The parameter, as a float.
Parameters:
  index - The index of the parameter.



setParameter
public synchronized void setParameter(double param, int index)(Code)
Sets one of the node's parameters to a double. If the index lies beyond the current source list, the list is extended with nulls as needed.
Parameters:
  param - The parameter, as a double.
Parameters:
  index - The index of the parameter.



setParameter
public synchronized void setParameter(Object param, int index)(Code)
Sets one of the node's parameters to an Object. If the index lies beyond the current source list, the list is extended with nulls as needed. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The Object may be a DeferredData instance. It will not be evaluated until its value is actually required, i.e., when the node is rendered.
Parameters:
  param - The parameter, as an Object.
Parameters:
  index - The index of the parameter.




setParameterBlock
public synchronized void setParameterBlock(ParameterBlock pb)(Code)
Sets the ParameterBlock of this node. If the specified new ParameterBlock is null, it is assumed that this node has no input sources and parameters. The supplied parameter is cloned.

This method does not validate the content of the supplied ParameterBlock. The caller should ensure that the sources and parameters in the ParameterBlock are suitable for the operation this node represents; otherwise some form of error or exception may occur at the time of rendering.

If the supplied ParameterBlock does not equal the current ParameterBlock, a PropertyChangeEventJAI named "ParameterBlock", "Sources", or "Parameters" will be fired. A RenderingChangeEvent may also be fired if the node has already been rendered.

The ParameterBlock may include DeferredData parameters. These will not be evaluated until their values are actually required, i.e., when the node is rendered.

The node is registered as a sink of any PlanarImage or CollectionImage sources contained in the supplied ParameterBlock. The node is also removed as a sink of any previous PlanarImage or CollectionImage sources if these are not in the new ParameterBlock.
Parameters:
  pb - The new ParameterBlock to be set;it may be null.




setParameters
public synchronized void setParameters(Vector parameters)(Code)
Sets all the parameters of this node. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The Vector may include DeferredData parameters. These will not be evaluated until their values are actually required, i.e., when the node is rendered.
since:
   JAI 1.1




setProperty
public synchronized void setProperty(String name, Object value)(Code)
Sets a local property on a node. The synthetic properties (containing image width, height, and location) may not be set. Local property settings override properties derived from prior nodes in the imaging chain.

If the node is serialized then serializable properties will also be serialized but non-serializable properties will be lost.
Parameters:
  name - A String representing the property name.
Parameters:
  value - The property's value, as an Object.
throws:
  IllegalArgumentException - ifname is null.
throws:
  IllegalArgumentException - ifvalue is null.
throws:
  RuntimeException - if nameconflicts with Synthetic property.




setRegistry
public synchronized void setRegistry(OperationRegistry registry)(Code)
Sets the OperationRegistry that is used by this node. If the specified registry is null, the default registry is used. The parameter is saved by reference.

If the supplied registry does not equal the current registry, a PropertyChangeEventJAI named "OperationRegistry" will be fired and a RenderingChangeEvent may be fired if the node has already been rendered.
Parameters:
  registry - The new OperationRegistry to be set;it may be null.




setRenderingHint
public synchronized void setRenderingHint(RenderingHints.Key key, Object value)(Code)
Sets a hint in the RenderingHints of this node. This is a convenience method which calls setRenderingHints() and so adheres to the same event firing behavior.
throws:
  IllegalArgumentException - if the key or value is null.
throws:
  IllegalArgumentException - value is not appropriate for the specified key.
since:
   JAI 1.1



setRenderingHints
public synchronized void setRenderingHints(RenderingHints hints)(Code)
Sets the RenderingHints of this node. The supplied parameter is cloned if non-null.

If the supplied RenderingHints does not equal the current RenderingHints, a PropertyChangeEventJAI named "RenderingHints" will be fired and a RenderingChangeEvent may be fired if the node has already been rendered.
Parameters:
  hints - The new RenderingHints to be set;it may be null.




setSource
public synchronized void setSource(PlanarImage source, int index)(Code)
Sets the specified source stored in the ParameterBlock of this node to a new PlanarImage source. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

Note that the behavior of this method has changed as of Java Advanced Imaging 1.1. To obtain the previous behavior use getRendering().setSource(). The description of the previous behavior is as follows:

Renders the node if it has not already been rendered, and sets the specified source of the rendered image to the supplied PlanarImage. An ArrayIndexOutOfBoundsException may be thrown if an invalid index is supplied.

Parameters:
  source - The source, as a PlanarImage.
Parameters:
  index - The index of the source.
throws:
  IllegalArgumentException - if source isnull.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.



setSource
public synchronized void setSource(Object source, int index)(Code)
Sets the specified source stored in the ParameterBlock of this node to a new source object. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The node is added automatically as a sink if the source is a PlanarImage or a CollectionImage. If appropriate the node is removed as a sink of any previous source at the same index.
Parameters:
  source - The Source to be set.
Parameters:
  index - The Index at which it is to be set.
throws:
  IllegalArgumentException - ifsource is null.
throws:
  ArrayIndexOutOfBoundsException - ifindex is invalid.
since:
   JAI 1.1




setSources
public synchronized void setSources(List sourceList)(Code)
Replaces the sources in the ParameterBlock of this node with a new list of sources. This is a convenience method that invokes setParameterBlock() and so adheres to the same event firing behavior.

The node is added automatically as a sink of any source which is a PlanarImage or a CollectionImage. It is also automatically removed as a sink of any such prior sources which are no longer sources.
Parameters:
  sourceList - A List of sources.
throws:
  IllegalArgumentException - ifsourceList is null.




suppressProperty
public synchronized void suppressProperty(String name)(Code)
Removes a named property from the property environment of this node. Unless the property is stored locally either due to having been set explicitly via setProperty() or to having been cached for property synchronization purposes, subsequent calls to getProperty(name) will return java.awt.Image.UndefinedProperty, and name will not appear on the list of properties emitted by getPropertyNames(). To delete the property from the local property set of the node, removeProperty() should be used.
Parameters:
  name - A String naming the property to be suppressed.
throws:
  IllegalArgumentException - ifname is null.
throws:
  IllegalArgumentException - if nameconflicts with Synthetic property.



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.