|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface through which properties may be computed dynamically
with respect to an environment of pre-existing properties. In the
interest of simplicity and consistency, a PropertyGenerator
is required to be a pure function; that is, if called multiple times
with the same environment it must produce identical results.
The OperationRegistry
class allows
PropertyGenerator
s to be associated with a particular
operation type, and will automatically insert them into imaging chains
as needed.
Properties are treated in a case-insensitive manner.
OperationRegistry
Method Summary | |
boolean |
canGenerateProperties(Object opNode)
Determines whether the specified Object will
be recognized by getProperty(String,Object) . |
Class |
getClass(String propertyName)
Returns the class expected to be returned by a request for the property with the specified name. |
Object |
getProperty(String name,
Object opNode)
Computes the value of a property relative to an environment of pre-existing properties. |
Object |
getProperty(String name,
RenderableOp op)
Deprecated. as of JAI 1.1. Use getProperty(String,Object) instead. |
Object |
getProperty(String name,
RenderedOp op)
Deprecated. as of JAI 1.1. Use getProperty(String,Object) instead. |
String[] |
getPropertyNames()
Returns an array of String s naming properties emitted
by this property generator. |
Method Detail |
public String[] getPropertyNames()
String
s naming properties emitted
by this property generator. The String
s may contain
characters of any case.String
s that may be passed as parameter
names to the getProperty()
method.public Class getClass(String propertyName)
null
will be returned indicating
that getProperty(propertyName).getClass()
should
be executed instead. A null
value might
be returned for example to prevent generating the value of
a deferred property solely to obtain its class.Class
expected to be return by a
request for the value of this property or null
.propertyName
is null
.public boolean canGenerateProperties(Object opNode)
Object
will
be recognized by getProperty(String,Object)
.opNode
is null
.public Object getProperty(String name, Object opNode)
String
is ignored.
In the case of an OperationNode
in a chain of
operations these properties may be emitted by the sources of the
node in a chain or the parameters of that operation. The information
requisite to compute the requested property must be available via the
supplied OperationNode
. It is legal to call
getProperty()
on the operation's sources.
name
- the name of the property, as a String
.op
- the Object
from which properties will
be generated.Object
or the
value java.awt.Image.UndefinedProperty
.name
or
opNode
is null
.opNode
is
not an instance of a supported class for this method, i.e.,
canGenerateProperties(opNode)
returns
false
.public Object getProperty(String name, RenderedOp op)
getProperty(String,Object)
instead.
RenderedOp
, and the parameters of that operation.
The operation name, sources, and ParameterBlock
of the RenderedOp
being processed may be obtained by
means of the op.getOperationName
,
op.getSources()
, and op.getParameterBlock()
methods. It is legal to call getProperty()
on the
operation's sources.
name
- the name of the property, as a String
.op
- the RenderedOp
representing the operation.Object
or the
value java.awt.Image.UndefinedProperty
.name
or
op
is null
.public Object getProperty(String name, RenderableOp op)
getProperty(String,Object)
instead.
RenderableOp
, and the parameters of that operation.
The operation name, sources, and ParameterBlock
of the RenderableOp
being processed may be obtained by
means of the op.getOperationName
,
op.getSources()
, and op.getParameterBlock()
methods. It is legal to call getProperty()
on the
operation's sources.
name
- the name of the property, as a String
.op
- the RenderableOp
representing the operation.Object
or the
value java.awt.Image.UndefinedProperty
.name
or
op
is null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |