javax.media.jai.operator
Class NullDescriptor
java.lang.Object
|
+--javax.media.jai.OperationDescriptorImpl
|
+--javax.media.jai.operator.NullDescriptor
- All Implemented Interfaces:
- OperationDescriptor, RegistryElementDescriptor, Serializable
- public class NullDescriptor
- extends OperationDescriptorImpl
An OperationDescriptor
describing the "Null" operation.
The "Null" operation performs no processing. It merely propagates its
first source along the operation chain unmodified. There may be an
arbitrary number of sources but only the first one is passed along
so it must have the appropriate class type for the operation mode.
This operation may be useful as a placeholder in operation chains
and in creating nodes to which PropertyGenerator
s may be
attached. This would enable non-image data nodes to be present in chains
without requiring that specific OperationDescriptor
s be
implemented for these operations. The PropertyGenerator
s
required would in this case be added locally to the nodes using the
addPropertyGenerator()
method of the node.
Resource List
Name | Value |
GlobalName | Null |
LocalName | Null |
Vendor | com.sun.media.jai |
Description | An operation which does no processing. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/NullDescriptor.html |
Version | 1.0 |
No parameters are needed for this operation.
- Since:
- JAI 1.1
- See Also:
OperationDescriptor
, Serialized Form
Methods inherited from class javax.media.jai.OperationDescriptorImpl |
arePropertiesSupported,
getDefaultSourceClass,
getDestClass,
getDestClass,
getName,
getNumParameters,
getNumSources,
getParamClasses,
getParamDefaults,
getParamDefaultValue,
getParameterListDescriptor,
getParamMaxValue,
getParamMinValue,
getParamNames,
getPropertyGenerators,
getPropertyGenerators,
getRenderableDestClass,
getRenderableSourceClasses,
getResourceBundle,
getResources,
getSourceClasses,
getSourceClasses,
getSourceNames,
getSupportedModes,
isImmediate,
isModeSupported,
isRenderableSupported,
isRenderedSupported,
makeDefaultSourceClassList,
validateArguments,
validateArguments,
validateParameters,
validateParameters,
validateRenderableArguments,
validateRenderableSources,
validateSources |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
NullDescriptor
public NullDescriptor()
- Constructor.
validateSources
protected boolean validateSources(String modeName,
ParameterBlock args,
StringBuffer msg)
- Returns
true
if there is at least one source
and the first source is a RenderedImage
or
RenderableImage
.
- Overrides:
- validateSources in class OperationDescriptorImpl
- Throws:
- IllegalArgumentException - if
args
is null
.- IllegalArgumentException - if
msg
is null
and the validation fails.
getInvalidRegion
public Object getInvalidRegion(String modeName,
ParameterBlock oldParamBlock,
RenderingHints oldHints,
ParameterBlock newParamBlock,
RenderingHints newHints,
OperationNode node)
- Calculates the region over which two distinct renderings
of the "Null" operation may be expected to differ.
The operation returns an empty Shape
if the first
source in each of the two ParameterBlock
s are equal
according to the equals()
method of the old source or
null
for all other cases.
- Overrides:
- getInvalidRegion in class OperationDescriptorImpl
- Parameters:
modeName
- The name of the mode.oldParamBlock
- The previous sources and parameters.oldHints
- The previous hints.newParamBlock
- The current sources and parameters.newHints
- The current hints.node
- The affected node in the processing chain (ignored).- Returns:
- The region over which the data of two renderings of this
operation may be expected to be invalid or
null
if there is no common region of validity.
A non-null
empty region indicates that the
operation would produce identical data over the bounds of the
old rendering although perhaps not over the area occupied by
the tiles of the old rendering. - Throws:
- IllegalArgumentException - if
modeName
is null
or if either oldParamBlock
or newParamBlock
is null
.- IllegalArgumentException - if
oldParamBlock
or
newParamBlock
does not contain at least one source.