An interface encapsulating the set of operations involved in
identifying and reading properties.
The interface includes the getProperty() and
getPropertyNames() methods familiar from the
RenderedImage and RenderableImage interfaces.
Classes which implement this interface should do so in a manner which
treats the property names as case-retentive. That is to say that as
concerns operations effected using the property name as a key, the
operation should ignore the case of the property name while on the
other hand the property name retrieval methods should return the names
with their case preserved.
PropertySource is implemented by the ImageJAI
interface and, among other classes, by PlanarImage ,
RenderableOp and CollectionImage .
Since all RenderedImage s used with JAI are "wrapped"
by a RenderedImageAdapter , all JAI RenderedImage s
may be assumed to implement PropertySource .
If a PropertySource is also a
PropertyChangeEmitter
then it should fire PropertySourceChangeEvent s to all
registered listeners whenever this is reasonable to do so in the context
of the PropertySource in question.
Property name space collisions may be prevented by adhering to
an hierarchical naming convention. This could for example be based
on the name of the package in question, e.g.,
com.sun.media.jai.MyProperty.
The names of properties generated by JAI itself will not adhere to the
aforementioned naming convention, but this should not pose a problem if
users adopt this convention for their own property names.
Another approach to handling multiple property name spaces would
be to define a separate PropertySource for each name space of properties.
These PropertySources could themselves be attached to images as properties.
Inheritance of these properties would occur by the default mechanism.
Modification of these properties within an operation chain could be
managed by PropertyGenerators which are capable of recognizing these
properties. Note that a potential problem with this approach exists
when a PropertySourceChangeEvent is fired: it might be
necessary to clone the entire tree of properties in order to obtain
the old value of event object.
See Also: ImageJAI See Also: PlanarImage See Also: PropertyChangeEmitter See Also: WritablePropertySource See Also: java.awt.image.RenderedImage See Also: java.awt.image.renderable.RenderableImage |