javax.media.jai
Class CollectionOp

java.lang.Object
  |
  +--javax.media.jai.CollectionImage
        |
        +--javax.media.jai.CollectionOp
All Implemented Interfaces:
Collection, EventListener, ImageJAI, OperationNode, PropertyChangeEmitter, PropertyChangeListener, PropertySource, WritablePropertySource

public class CollectionOp
extends CollectionImage
implements OperationNode, PropertyChangeListener

A node in a CollectionImage chain. A CollectionOp 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. A CollectionOp may be used in either the rendered or the renderable mode for Collections, i.e., "collection" or "renderableCollection" mode, respectively.

A CollectionOp may be constructed directly as, for example,

 
 Collection srcCol;
 double[] constants;
 ParameterBlock pb =
     (new ParameterBlock()).addSource(srcCol).add(constants);
 CollectionOp node =
     new CollectionOp("addConstToCollection", pb, null);
 
 
or by the createCollection or createCollectionNS() "collection" mode methods or the createRenderableCollection() or createRenderableCollectionNS() "renderableCollection" mode 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 appropriate mode, i.e., "collection" or "renderableCollection".
  2. It is verified that the operation generates a CollectionImage, a RenderedImage ("collection" mode only), or a RenderableImage ("renderableCollection" mode only).
  3. Global RenderingHints maintained by the JAI instance are merged with the local RenderingHints with the local hints taking precedence.
  4. Using the validateArguments() method of the associated OperationDescriptor, the arguments (sources and parameters) are validated as being compatible with the specified operation in the appropriate mode.
  5. If the arguments are valid, then the CollectionOp is created; otherwise any source Collections are "unwrapped" until a valid argument list is obtained or it is determined that such is impossible.
  6. If the operation is in the rendered mode and 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 CollectionImages is created. Each node in the chain of CollectionOps corresponds to a node in the chain of CollectionImages. Collection methods invoked on the CollectionOp are in general forwarded to the associated CollectionImage which is referred to as the rendering of the node. The rendering of the node may be a rendered or renderable CollectionImage, i.e., eventually contain RenderedImages or RenderableImages, respectively, depending on the mode in which the node is used.

The translation between CollectionOp chains and CollectionImage chains makes use of two levels of indirection provided by the OperationRegistry and either the CollectionImageFactory (CIF) or the RenderableCollectionImageFactory (RCIF) facilities. First, the local OperationRegistry is used to map the operation name into a CIF or RCIF. This factory then constructs a CollectionImage. The local OperationRegistry is used in order to take advantage of the best possible implementation of the operation.

A node may be rendered explicitly by invoking the method getCollection() which also returns the rendering of the node. A node may be rendered implicitly by invoking any method defined in the Collection interface. A rendering of a node may also be obtained by means of the createInstance() method. This method returns a Collection rendering without marking the node as having been rendered. If the node is not marked as rendered then it will not fire CollectionChangeEvents as described below.

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

Certain PropertyChangeEvents may be emitted by the CollectionOp. These include the PropertyChangeEventJAIs and PropertySourceChangeEvents required by virtue of implementing the OperationNode interface. Additionally a CollectionChangeEvent may be emitted if the node is operating in the "collection" mode, has already been rendered, and one of the following conditions is satisfied:

In either case the following sequence of actions should occur:
  1. A. If the operation name or the registry has changed, a new CollectionImage will be generated by the OperationRegistry for the new operation.
    B. If the operation name has not changed, an attempt will be made to re-use some elements of the previously generated CollectionImage by invoking update() on the CollectionImageFactory which generated it. If this attempt fails, a new CollectionImage for this operation will be requested from the OperationRegistry.
  2. A CollectionChangeEvent will be fired to all registered listeners of the "Collection" PropertyChangeEvent and to all sinks which are PropertyChangeListeners. The new and old values set on the event object correspond to the previous and current CollectionImages, respectively, associated with this node.

CollectionOp 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 CollectionOp 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.

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. local properties;
  2. the rendering of the node if it is a PropertySource;
  3. any registered PropertyGenerators, or
    a source specified via a copy-from-source directive;
  4. the first 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.

All dynamically computed properties of a CollectionOp 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 CollectionChangeEvent is received from any node source. The property environment or the cached properties may also be cleared by invoking resetProperties().

See Also:
CollectionImage, OperationRegistry, RenderableOp, RenderedOp

Field Summary
protected  boolean isRenderable
          Flag indicating whether the operation is being instantiated in renderable mode.
protected  OperationNodeSupport nodeSupport
          An object to assist in implementing OperationNode.
protected  PropertySource thePropertySource
          The PropertySource containing the combined properties of all of the node's sources.
 
Fields inherited from class javax.media.jai.CollectionImage
eventManager, imageCollection, imageFactory, properties, sinks
 
Constructor Summary
CollectionOp(OperationRegistry registry, String opName, ParameterBlock pb)
          Deprecated. as of JAI 1.1.
CollectionOp(OperationRegistry registry, String opName, ParameterBlock pb, RenderingHints hints)
          Constructs a CollectionOp that will be used to instantiate a particular Collection operation from a given operation registry, an operation name, a ParameterBlock, and a set of rendering hints.
CollectionOp(OperationRegistry registry, String opName, ParameterBlock pb, RenderingHints hints, boolean isRenderable)
          Constructs a CollectionOp that will be used to instantiate a particular Collection operation from a given operation registry, an operation name, a ParameterBlock, and a set of rendering hints.
CollectionOp(String opName, ParameterBlock pb, RenderingHints hints)
          Constructs a CollectionOp that will be used to instantiate a particular Collection operation from a given operation name, a ParameterBlock, and a set of rendering hints.
 
Method Summary
 boolean add(Object o)
          Creates the Collection rendering if none yet exists, and adds the specified object to this Collection.
 boolean addAll(Collection c)
          Creates the Collection rendering if none yet exists, and adds all of the elements in the specified Collection to this Collection.
 void addPropertyGenerator(PropertyGenerator pg)
          Adds a PropertyGenerator to the node.
 void clear()
          Creates the Collection rendering if none yet exists, and removes all of the elements from this Collection.
 boolean contains(Object o)
          Creates the Collection rendering if none yet exists, and returns true if this Collection contains the specified object.
 boolean containsAll(Collection c)
          Creates the Collection rendering if none yet exists, and returns true if this Collection contains all of the elements in the specified Collection.
 void copyPropertyFromSource(String propertyName, int sourceIndex)
          Forces a property to be copied from the specified source node.
 Collection createInstance()
          Instantiates a Collection operator that computes the result of this CollectionOp.
 Collection createRendering(RenderContext renderContext)
          Returns the Collection rendering associated with this operation with any contained RenderableImages rendered using the supplied RenderContext parameter.
 Collection getCollection()
          Returns the Collection rendering associated with this operation.
 Object getDynamicProperty(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.
 String getOperationName()
          Returns the name of the operation this node represents as a String.
 ParameterBlock getParameterBlock()
          Returns a clone of the ParameterBlock of this node.
 Object getProperty(String name)
          Gets a property from the property set of this Collection.
 Class getPropertyClass(String name)
          Returns the class expected to be returned by a request for the property with the specified name.
 String[] getPropertyNames()
          Returns the names of properties available from this node.
 OperationRegistry getRegistry()
          Returns the OperationRegistry that is used by this node.
 String getRegistryModeName()
          Returns the name of the RegistryMode corresponding to this CollectionOp.
 RenderingHints getRenderingHints()
          Returns a clone of the RenderingHints of this node or null.
 boolean isEmpty()
          Creates the Collection rendering if none yet exists, and returns true if this Collection contains no element.
 boolean isRenderable()
          Returns whether the operation is being instantiated in renderable mode.
 Iterator iterator()
          Creates the Collection rendering if none yet exists, and returns an Iterator over the elements in this Collection.
 void propertyChange(PropertyChangeEvent evt)
          Implementation of PropertyChangeListener.
 boolean remove(Object o)
          Creates the Collection rendering if none yet exists, and removes the specified object from this Collection.
 boolean removeAll(Collection c)
          Creates the Collection rendering if none yet exists, and removes all this Collection's elements that are also contained in the specified Collection.
 void removeProperty(String name)
          Removes the named property from the local property set of the CollectionOp as well as from its property environment.
protected  void resetProperties(boolean resetPropertySource)
          Resets the PropertySource.
 boolean retainAll(Collection c)
          Creates the Collection rendering if none yet exists, and retains only the elements in this Collection that are contained in the specified Collection.
 void setOperationName(String opName)
          Sets the name of the operation this node represents.
 void setParameterBlock(ParameterBlock pb)
          Sets the ParameterBlock of this node.
 void setProperty(String name, Object value)
          Sets a local property on a node.
 void setRegistry(OperationRegistry registry)
          Sets the OperationRegistry that is used by this node.
 void setRenderingHints(RenderingHints hints)
          Sets the RenderingHints of this node.
 int size()
          Creates the Collection rendering if none yet exists, and returns the number of elements in this Collection.
 void suppressProperty(String name)
          Removes a named property from the property environment of this node.
 Object[] toArray()
          Creates the Collection rendering if none yet exists, and returns an array containing all of the elements in this Collection.
 Object[] toArray(Object[] a)
          Creates the Collection rendering if none yet exists, and returns an array containing all of the elements in this Collection whose runtime type is that of the specified array.
 
Methods inherited from class javax.media.jai.CollectionImage
addPropertyChangeListener, addPropertyChangeListener, addSink, get, getImageFactory, getProperty, getPropertyNames, getSinks, removePropertyChangeListener, removePropertyChangeListener, removeSink, removeSinks, setImageFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.media.jai.PropertySource
getPropertyNames
 
Methods inherited from interface javax.media.jai.PropertyChangeEmitter
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

nodeSupport

protected OperationNodeSupport nodeSupport
An object to assist in implementing OperationNode.
Since:
JAI 1.1

thePropertySource

protected PropertySource thePropertySource
The PropertySource containing the combined properties of all of the node's sources.
Since:
JAI 1.1

isRenderable

protected boolean isRenderable
Flag indicating whether the operation is being instantiated in renderable mode.
Since:
JAI 1.1
Constructor Detail

CollectionOp

public CollectionOp(OperationRegistry registry,
                    String opName,
                    ParameterBlock pb,
                    RenderingHints hints,
                    boolean isRenderable)
Constructs a CollectionOp that will be used to instantiate a particular Collection operation from a given 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 a collection rendering is requested.

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

Parameters:
registry - The OperationRegistry to be used for instantiation. if null, the default registry is used. Saved by reference.
opName - The operation name. Saved by reference.
pb - The sources and other parameters. If null, it is assumed that this node has no sources and parameters. This parameter is cloned.
hints - The rendering hints. If null, it is assumed that no hints are associated with the rendering. This parameter is cloned.
isRenderable - Whether the operation is being executed in renderable mode.
Throws:
IllegalArgumentException - if opName is null.
Since:
JAI 1.1

CollectionOp

public CollectionOp(OperationRegistry registry,
                    String opName,
                    ParameterBlock pb,
                    RenderingHints hints)
Constructs a CollectionOp that will be used to instantiate a particular Collection operation from a given operation registry, an operation name, a ParameterBlock, and a set of rendering hints. The operation will use the rendered mode.

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 a collection rendering is requested.

Parameters:
registry - The OperationRegistry to be used for instantiation. if null, the default registry is used. Saved by reference.
opName - The operation name. Saved by reference.
pb - The sources and other parameters. If null, it is assumed that this node has no sources and parameters. This parameter is cloned.
hints - The rendering hints. If null, it is assumed that no hints are associated with the rendering. This parameter is cloned.
Throws:
IllegalArgumentException - if opName is null.

CollectionOp

public CollectionOp(String opName,
                    ParameterBlock pb,
                    RenderingHints hints)
Constructs a CollectionOp that will be used to instantiate a particular Collection operation from a given 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 a collection rendering is requested.

Parameters:
opName - The operation name. Saved by reference.
pb - The sources and other parameters. If null, it is assumed that this node has no sources and parameters. This parameter is cloned.
hints - The rendering hints. If null, it is assumed that no hints are associated with the rendering. This parameter is cloned.
Throws:
IllegalArgumentException - if opName is null.

CollectionOp

public CollectionOp(OperationRegistry registry,
                    String opName,
                    ParameterBlock pb)
Deprecated. as of JAI 1.1.

Constructs a CollectionOp that will be used to instantiate a particular Collection operation from a given operation registry, an operation name, and a ParameterBlock There are no rendering hints associated with this operation. The operation will use the rendered mode.

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 a collection rendering is requested.

Parameters:
registry - The OperationRegistry to be used for instantiation. if null, the default registry is used. Saved by reference.
opName - The operation name. Saved by reference.
pb - The sources and other parameters. If null, it is assumed that this node has no sources and parameters. This parameter is cloned.
Throws:
IllegalArgumentException - if opName is null.
See Also:
CollectionOp(OperationRegistry,String,ParameterBlock,RenderingHints)
Method Detail

isRenderable

public boolean isRenderable()
Returns whether the operation is being instantiated in renderable mode.
Since:
JAI 1.1

getRegistryModeName

public String getRegistryModeName()
Returns the name of the RegistryMode corresponding to this CollectionOp.
Specified by:
getRegistryModeName in interface OperationNode
Since:
JAI 1.1

getRegistry

public OperationRegistry getRegistry()
Returns the OperationRegistry that is used by this node. If the registry had not been set, the default registry is returned.
Specified by:
getRegistry in interface OperationNode

setRegistry

public void setRegistry(OperationRegistry registry)
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 CollectionChangeEvent may be fired if the node has already been rendered.

Specified by:
setRegistry in interface OperationNode
Parameters:
registry - The new OperationRegistry to be set; it may be null.

getOperationName

public String getOperationName()
Returns the name of the operation this node represents as a String.
Specified by:
getOperationName in interface OperationNode

setOperationName

public void setOperationName(String opName)
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 CollectionChangeEvent may be fired if the node has already been rendered.

Specified by:
setOperationName in interface OperationNode
Parameters:
opName - The new operation name to be set.
Throws:
IllegalArgumentException - if opName is null.

getParameterBlock

public ParameterBlock getParameterBlock()
Returns a clone of the ParameterBlock of this node.
Specified by:
getParameterBlock in interface OperationNode

setParameterBlock

public void setParameterBlock(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 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.

If the supplied ParameterBlock does not equal the current ParameterBlock, a PropertyChangeEventJAI named "ParameterBlock", "Sources", or "Parameters" will be fired. A CollectionChangeEvent 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 a collection rendering is requested.

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.

Specified by:
setParameterBlock in interface OperationNode
Parameters:
pb - The new ParameterBlock to be set; it may be null.

getRenderingHints

public RenderingHints getRenderingHints()
Returns a clone of the RenderingHints of this node or null.
Specified by:
getRenderingHints in interface OperationNode

setRenderingHints

public void setRenderingHints(RenderingHints hints)
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 CollectionChangeEvent may be fired if the node has already been rendered.

Specified by:
setRenderingHints in interface OperationNode
Parameters:
hints - The new RenderingHints to be set; it may be null.

getCollection

public Collection getCollection()
Returns the Collection rendering associated with this operation.

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 DeferredData parameters in the ParameterBlock to be evaluated.

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.

Throws:
RuntimeException - if the image factory charged with rendering the node is unable to create a rendering.

createInstance

public Collection createInstance()
Instantiates a Collection operator that computes the result of this CollectionOp.

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 or CollectionOp nodes to be rendered using their respective createInstance() methods. Any DeferredData parameters in the ParameterBlock will also be evaluated.

Throws:
RuntimeException - if the image factory charged with rendering the node is unable to create a rendering.

createRendering

public Collection createRendering(RenderContext renderContext)
Returns the Collection rendering associated with this operation with any contained RenderableImages rendered using the supplied RenderContext parameter. If the operation is being executed in rendered mode (isRenderable() returns false), invoking this method is equivalent to invoking getCollection(), i.e., the parameter is ignored. If the operation is being executed in renderable mode, the Collection will differ from that returned by getCollection() due to any contained RenderableImages having been rendered. If the Collection contains any nested Collections, these will be unwrapped recursively such that a rendering is created for all RenderableImages encountered. Any RenderingHints in the RenderContext are merged with those set on the node with the argument hints taking precedence.
Since:
JAI 1.1

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Implementation of PropertyChangeListener.

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

Specified by:
propertyChange in interface PropertyChangeListener
Since:
JAI 1.1

resetProperties

protected void resetProperties(boolean resetPropertySource)
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

getPropertyNames

public String[] getPropertyNames()
Returns the names of properties available from this node. These properties are a combination of those derived from prior nodes in the operation chain and those set locally.
Specified by:
getPropertyNames in interface PropertySource
Overrides:
getPropertyNames in class CollectionImage
Returns:
An array of Strings containing valid property names or null if there are none.
Since:
JAI 1.1

getPropertyClass

public Class getPropertyClass(String name)
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.
Specified by:
getPropertyClass in interface PropertySource
Overrides:
getPropertyClass in class CollectionImage
Returns:
The Class expected to be return by a request for the value of this property or null.
Throws:
IllegalArgumentException - if name is null.
Since:
JAI 1.1

getProperty

public Object getProperty(String name)
Gets a property from the property set of this Collection. If the property name is not recognized, java.awt.Image.UndefinedProperty will be returned.
Specified by:
getProperty in interface PropertySource
Overrides:
getProperty in class CollectionImage
Parameters:
name - the name of the property to get, as a String.
Returns:
a reference to the property Object, or the value java.awt.Image.UndefinedProperty.
Throws:
IllegalArgumentException - if name is null.
Since:
JAI 1.1

setProperty

public void setProperty(String name,
                        Object value)
Sets a local property on a node. Local property settings override properties derived from prior nodes in the operation chain.
Overrides:
setProperty in class CollectionImage
Parameters:
name - a String representing the property name.
value - the property's value, as an Object.
Throws:
IllegalArgumentException - if name or value is null.
Since:
JAI 1.1

removeProperty

public void removeProperty(String name)
Removes the named property from the local property set of the CollectionOp as well as from its property environment.
Overrides:
removeProperty in class CollectionImage
Throws:
IllegalArgumentException - if name is null.
Since:
JAI 1.1

getDynamicProperty

public Object getDynamicProperty(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. 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.
Specified by:
getDynamicProperty in interface OperationNode
Parameters:
name - A String naming the property.
Throws:
IllegalArgumentException - if name is null.
Since:
JAI 1.1

addPropertyGenerator

public void addPropertyGenerator(PropertyGenerator pg)
Adds a PropertyGenerator to the node. The property values emitted by this property generator override any previous definitions.
Specified by:
addPropertyGenerator in interface OperationNode
Parameters:
pg - a PropertyGenerator to be added to this node's property environment.
Since:
JAI 1.1

copyPropertyFromSource

public void copyPropertyFromSource(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. The result of specifying an invalid source is undefined.
Specified by:
copyPropertyFromSource in interface OperationNode
Parameters:
propertyName - the name of the property to be copied.
sourceIndex - the index of the from which to copy the property.
Throws:
IllegalArgumentException - if propertyName is null.
Since:
JAI 1.1

suppressProperty

public void suppressProperty(String name)
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.
Specified by:
suppressProperty in interface OperationNode
Parameters:
name - a String naming the property to be suppressed.
Throws:
IllegalArgumentException - if name is null.
Since:
JAI 1.1

size

public int size()
Creates the Collection rendering if none yet exists, and returns the number of elements in this Collection.
Overrides:
size in class CollectionImage

isEmpty

public boolean isEmpty()
Creates the Collection rendering if none yet exists, and returns true if this Collection contains no element.
Overrides:
isEmpty in class CollectionImage

contains

public boolean contains(Object o)
Creates the Collection rendering if none yet exists, and returns true if this Collection contains the specified object.
Overrides:
contains in class CollectionImage

iterator

public Iterator iterator()
Creates the Collection rendering if none yet exists, and returns an Iterator over the elements in this Collection.
Overrides:
iterator in class CollectionImage

toArray

public Object[] toArray()
Creates the Collection rendering if none yet exists, and returns an array containing all of the elements in this Collection.
Overrides:
toArray in class CollectionImage

toArray

public Object[] toArray(Object[] a)
Creates the Collection rendering if none yet exists, and returns an array containing all of the elements in this Collection whose runtime type is that of the specified array.
Overrides:
toArray in class CollectionImage
Throws:
ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every element in this Collection.

add

public boolean add(Object o)
Creates the Collection rendering if none yet exists, and adds the specified object to this Collection.
Overrides:
add in class CollectionImage
Following copied from class: javax.media.jai.CollectionImage
Returns:
true if and only if the parameter is added to the Collection.

remove

public boolean remove(Object o)
Creates the Collection rendering if none yet exists, and removes the specified object from this Collection.
Overrides:
remove in class CollectionImage
Following copied from class: javax.media.jai.CollectionImage
Returns:
true if and only if the parameter is removed from the Collection.

containsAll

public boolean containsAll(Collection c)
Creates the Collection rendering if none yet exists, and returns true if this Collection contains all of the elements in the specified Collection.
Overrides:
containsAll in class CollectionImage

addAll

public boolean addAll(Collection c)
Creates the Collection rendering if none yet exists, and adds all of the elements in the specified Collection to this Collection.
Overrides:
addAll in class CollectionImage
Following copied from class: javax.media.jai.CollectionImage
Returns:
true if this Collection changed as a result of the call.

removeAll

public boolean removeAll(Collection c)
Creates the Collection rendering if none yet exists, and removes all this Collection's elements that are also contained in the specified Collection.
Overrides:
removeAll in class CollectionImage
Following copied from class: javax.media.jai.CollectionImage
Returns:
true if this Collection changed as a result of the call.

retainAll

public boolean retainAll(Collection c)
Creates the Collection rendering if none yet exists, and retains only the elements in this Collection that are contained in the specified Collection.
Overrides:
retainAll in class CollectionImage
Following copied from class: javax.media.jai.CollectionImage
Returns:
true if this Collection changed as a result of the call.

clear

public void clear()
Creates the Collection rendering if none yet exists, and removes all of the elements from this Collection.
Overrides:
clear in class CollectionImage