|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.media.jai.OperationDescriptorImpl javax.media.jai.operator.NullDescriptor
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.
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.
OperationDescriptor
,
Serialized FormField Summary |
Fields inherited from class javax.media.jai.OperationDescriptorImpl |
sourceNames |
Fields inherited from interface javax.media.jai.OperationDescriptor |
NO_PARAMETER_DEFAULT |
Constructor Summary | |
NullDescriptor()
Constructor. |
Method Summary | |
static RenderedOp |
create(RenderedImage source0,
RenderingHints hints)
An operation which does no processing. |
static RenderableOp |
createRenderable(RenderableImage source0,
RenderingHints hints)
An operation which does no processing. |
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. |
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 . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NullDescriptor()
Method Detail |
protected boolean validateSources(String modeName, ParameterBlock args, StringBuffer msg)
true
if there is at least one source
and the first source is a RenderedImage
or
RenderableImage
.
validateSources
in class OperationDescriptorImpl
modeName
- the operation mode nameargs
- a ParameterBlock
that has the sourcesmsg
- A string that may contain error messages.
IllegalArgumentException
- if args
is null
.
IllegalArgumentException
- if msg
is null
and the validation fails.OperationDescriptorImpl.validateArguments(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
public Object getInvalidRegion(String modeName, ParameterBlock oldParamBlock, RenderingHints oldHints, ParameterBlock newParamBlock, RenderingHints newHints, OperationNode node)
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.
getInvalidRegion
in interface OperationDescriptor
getInvalidRegion
in class OperationDescriptorImpl
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).
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.
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.public static RenderedOp create(RenderedImage source0, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.hints
- The RenderingHints
to use.
May be null
.
RenderedOp
destination.
IllegalArgumentException
- if source0
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
public static RenderableOp createRenderable(RenderableImage source0, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.createRenderable(String,ParameterBlock,RenderingHints)
.
source0
- RenderableImage
source 0.hints
- The RenderingHints
to use.
May be null
.
RenderableOp
destination.
IllegalArgumentException
- if source0
is null
.JAI
,
ParameterBlockJAI
,
RenderableOp
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |