javax.media.jai
Interface WritablePropertySource

All Superinterfaces:
PropertyChangeEmitter, PropertySource
All Known Subinterfaces:
ImageJAI
All Known Implementing Classes:
CollectionImage, ImageMIPMap, MultiResolutionRenderableImage, PlanarImage, RenderableImageAdapter, RenderableOp, WritablePropertySourceImpl

public interface WritablePropertySource
extends PropertySource, PropertyChangeEmitter

Sub-interface of PropertySource which permits setting the values of JAI properties in addition to obtaining their names and values. As the values of properties managed by classes which implement this interface may change, this is also a sub-interface of PropertyChangeEmitter. This permits other objects to register as listeners of particular JAI properties.

The case of the names of properties added via this interface should be retained although the case will be ignored in queries via getProperty() and will be forced to lower case in emitted PropertySourceChangeEvent.

Since:
JAI 1.1
See Also:
PropertySource, PropertyChangeEmitter

Method Summary
 void removeProperty(String propertyName)
          Removes the named property from the WritablePropertySource.
 void setProperty(String propertyName, Object propertyValue)
          Adds the property value associated with the supplied name to the WritablePropertySource.
 
Methods inherited from interface javax.media.jai.PropertySource
getProperty, getPropertyClass, getPropertyNames, getPropertyNames
 
Methods inherited from interface javax.media.jai.PropertyChangeEmitter
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Method Detail

setProperty

public void setProperty(String propertyName,
                        Object propertyValue)
Adds the property value associated with the supplied name to the WritablePropertySource. Properties set by this means will supersede any properties of the same name which might otherwise be derived dynamically.

Implementing classes which should fire a PropertySourceChangeEvent with a name set to that of the set property (retaining case), source set to the WritablePropertySource, and old and new values set to the previous and current values of the property, respectively. Neither the old nor the new value may null: undefined properties must as usual be indicated by an the constant value java.awt.Image.UndefinedProperty. It is however legal for either but not both of the old and new property values to equal java.awt.Image.UndefinedProperty.

Parameters:
propertyName - the name of the property, as a String.
propertyValue - the property, as a general Object.
Throws:
IllegalArgumentException - if propertyName or propertyValue is null.

removeProperty

public void removeProperty(String propertyName)
Removes the named property from the WritablePropertySource. This method will clear any locally cached (static) properties but may have no effect on properties which would be derived dynamically.

Parameters:
propertyName - the name of the property, as a String.
Throws:
IllegalArgumentException - if propertyName is null.