| java.lang.Object javax.media.jai.OperationNodeSupport
OperationNodeSupport | public class OperationNodeSupport implements Serializable(Code) | | This is a utility class that can be used by OperationNode s
to consolidate common functionality. An instance of this class may be
used as a member field of the OperationNode and some of the
OperationNode 's work delegated to it.
since: JAI 1.1 |
OperationNodeSupport | public OperationNodeSupport(String registryModeName, String opName, OperationRegistry registry, ParameterBlock pb, RenderingHints hints, PropertyChangeSupportJAI eventManager)(Code) | | Constructs an OperationNodeSupport instance.
All parameters except opName may be null .
If non-null the PropertyChangeSupportJAI
should have been created with the node as its event source (note
that this cannot be verified).
The ParameterBlock may include
DeferredData parameters. These will not be evaluated
until their values are actually required, i.e., when the node is
rendered. Any Observable events generated by such
DeferredData parameters will be trapped by the node,
converted to a PropertyChangeEventJAI named "parameters",
and forwarded to any listeners registered with the supplied.
eventManager . The old and new values of the event object
so generated will be the previous and current values, respectively, of
the data object wrapped by the DeferredData parameter,
and thus will be instances of the class returned by the
getDataClass() method of the DeferredData
parameter.
Parameters: registryModeName - The name of the registry mode concerned. Parameters: opName - The operation name to set. Parameters: registry - The OperationRegistry to set;it may be null in which case the registrywill be set to the default JAI registry. Parameters: pb - The ParameterBlock to set;it may be null . Parameters: hints - The new RenderingHints to be set;it may be null . Parameters: eventManager - The event helper object. The property changeevent source of this object should be theOperationNode which is using the constructedOperationNodeSupport instance. If null no events will be fired. throws: IllegalArgumentException - if registryModeName or opName is null . |
addPropertyGenerator | public 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 theassociated node's property environment. throws: IllegalArgumentException - ifpg is null . |
copyPropertyFromSource | public 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
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 source to copy the property from. throws: IllegalArgumentException - if propertyName is null. |
getOperationName | public String getOperationName()(Code) | | Returns the name of the operation the associated node represents.
The value is returned by reference.
|
getParameterBlock | public ParameterBlock getParameterBlock()(Code) | | Returns the ParameterBlock of the associated node
by reference. Nodes desirous of maintaining a consistent state
for their ParameterBlock may prefer to clone the
value returned by this method.
|
getPropertySource | public PropertySource getPropertySource(OperationNode opNode, PropertySource defaultPS)(Code) | | Constructs and returns a PropertySource suitable for
use by the specified OperationNode . If the registry mode
identified by getRegistryModeName() supports properties,
i.e., the statement
Registry.getMode(getRegistryModeName()).arePropertiesSupported()
evaluates to true , then the PropertySource
will include the global property environment as managed by the
OperationRegistry for the corresponding operation.
Prior and subsequent modifications to the local property environment
made via this object will be reflected in the returned
PropertySource .
Parameters: opNode - the OperationNode requesting itsPropertySource . Parameters: defaultPS - a PropertySource to be used to deriveproperty values if and only if they would otherwise bederived by inheritance from a source rather than from aa PropertyGenerator or a copy-from-sourcedirective. throws: IllegalArgumentException - if opNode is null. A PropertySource including the local and, ifapplicable, the global property environment for the operation. See Also: RegistryMode See Also: OperationRegistry.getPropertySource(OperationNode op) |
getRegistry | public OperationRegistry getRegistry()(Code) | | Returns the OperationRegistry used by the associated
node. The value is returned by reference.
|
getRegistryModeName | public String getRegistryModeName()(Code) | | Returns the name of RegistryMode corresponding to
this OperationNode . This value shoud be immutable
for a given node. The value is returned by reference.
|
getRenderingHints | public RenderingHints getRenderingHints()(Code) | | Returns the RenderingHints of the associated node
by reference. Nodes desirous of maintaining a consistent state
for their RenderingHints may prefer to clone the
value returned by this method.
|
resetPropertyEnvironment | public void resetPropertyEnvironment(boolean resetLocalEnvironment)(Code) | | Resets the property environment. The list of local property
environment modifications made directly on this object is reset
if and only if the parameter is true .
Parameters: resetLocalEnvironment - Whether to clear the list of propertyenvironment changes made directly on this object. |
setOperationName | public void setOperationName(String opName)(Code) | | Sets the name of the operation the associated node represents.
The value is set by reference.
If the operation name changes as a result of calling this
method according to a case-insensitive
comparison by equals() of the old and new names,
a PropertyChangeEventJAI named "OperationName"
will be fired by the event helper object with old and new values
set to the old and new values of the operation name, respectively.
Parameters: opName - The new operation name to be set. throws: IllegalArgumentException - if opName isnull . |
setParameterBlock | public void setParameterBlock(ParameterBlock pb)(Code) | | Sets the ParameterBlock of the associated node by
reference. If the specified ParameterBlock is
null , it is assumed that the associated node has
neither input sources nor parameters. Nodes desirous of maintaining
a consistent state for their ParameterBlock may prefer
to clone any user-supplied ParameterBlock before passing
it to this method.
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 the associated node represents; otherwise
some form of error or exception may occur at the time of rendering.
If the ParameterBlock changes according to a
comparison of the sources and parameters Vector s of the
old and new ParameterBlock s using equals() ,
a PropertyChangeEventJAI named "ParameterBlock"
will be fired by the event helper object with old and new values
set to the old and new values of the ParameterBlock ,
respectively. A PropertyChangeEventJAI named "Sources" or
"Parameters" will instead be fired if it can be determined that the
ParameterBlock modification has affected only the sources
or parameters of the node, respectively.
The ParameterBlock may include
DeferredData parameters. These will not be evaluated
until their values are actually required, i.e., when the node is
rendered. Any Observable events generated by such
DeferredData parameters will be trapped by the node,
converted to a PropertyChangeEventJAI named "parameters",
and forwarded to any listeners registered with the supplied.
eventManager . The old and new values of the event object
so generated will be the previous and current values, respectively, of
the data object wrapped by the DeferredData parameter,
and thus will be instances of the class returned by the
getDataClass() method of the DeferredData
parameter.
Parameters: pb - The new ParameterBlock to be set;it may be null . |
setRegistry | public void setRegistry(OperationRegistry registry)(Code) | | Sets the OperationRegistry that is used by the associated
node. If the specified registry is null , the
registry will be set to the default JAI registry. The value is
set by reference.
If the registry changes according to a direct comparison
of the old and new registry references,
a PropertyChangeEventJAI named "OperationRegistry"
will be fired by the event helper object with old and new values
set to the old and new values of the registry, respectively.
Parameters: registry - The new OperationRegistry to be set;it may be null . |
setRenderingHints | public void setRenderingHints(RenderingHints hints)(Code) | | Sets the RenderingHints of the associated node. It is
legal for nodes to ignore RenderingHints set on them by
this mechanism. Nodes desirous of maintaining
a consistent state for their RenderingHints may prefer
to clone any user-supplied RenderingHints before passing
it to this method.
If the RenderingHints changes according to a
comparison by equals() of the old and new hints,
a PropertyChangeEventJAI named "RenderingHints"
will be fired by the event helper object with old and new values
set to the old and new values of the RenderingHints ,
respectively.
Parameters: hints - The new RenderingHints to be set;it may be null . |
suppressProperty | public void suppressProperty(String name)(Code) | | Removes a named property from the property environment of the
associated node. Unless the property is stored locally either due
to having been set explicitly 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() .
Parameters: name - A String naming the property to be suppressed. throws: IllegalArgumentException - ifname is null . |
|
|