javax.media.jai
Class PropertyChangeSupportJAI
java.lang.Object
|
+--java.beans.PropertyChangeSupport
|
+--javax.media.jai.PropertyChangeSupportJAI
- All Implemented Interfaces:
- Serializable
- public final class PropertyChangeSupportJAI
- extends PropertyChangeSupport
Extension of the beans utility class PropertyChangeSupport
which adds an accessor for the parameter passed to the constructor. All
events fired by the firePropertyChange()
methods of this
class are instances of PropertyChangeEventJAI
; consequently
all property names are forced to lower case for recognition purposes.
The property name-specific PropertyChangeListener
registration
and unregistration methods defined in this class also force the supplied
property name to lower case.
- Since:
- JAI 1.1
- See Also:
PropertyChangeSupport
, Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
propertyChangeEventSource
protected Object propertyChangeEventSource
- The
PropertyChangeEvent
source.
PropertyChangeSupportJAI
public PropertyChangeSupportJAI(Object propertyChangeEventSource)
- Constructs a
PropertyChangeSupportJAI
object. The
parameter is cached for later use and retrieval.
- Parameters:
propertyChangeEventSource
- The property change event source.- Throws:
If
- propertyChangeEventSource
is null
then a NullPointerException
will be thrown
in the superclass.
getPropertyChangeEventSource
public Object getPropertyChangeEventSource()
- Retrieve the parameter passed to the constructor.
- Returns:
- The property change event source.
addPropertyChangeListener
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
- Add a
PropertyChangeListener
for a specific property.
The propertyName
is forced to lower case.
- Overrides:
addPropertyChangeListener
in class PropertyChangeSupport
- Throws:
IllegalArgumentException
- if propertyName
is
null
.
removePropertyChangeListener
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
- Remove a
PropertyChangeListener
for a specific property.
The propertyName
is forced to lower case.
- Overrides:
removePropertyChangeListener
in class PropertyChangeSupport
- Throws:
IllegalArgumentException
- if propertyName
is
null
.
firePropertyChange
public void firePropertyChange(PropertyChangeEvent evt)
- Report a bound property update to any registered listeners.
If the supplied object is not a
PropertyChangeEventJAI
then a PropertyChangeEventJAI
is constructed from the
event object's accessors and fired instead.
- Overrides:
firePropertyChange
in class PropertyChangeSupport
- Parameters:
evt
- The PropertyChangeEvent
object.
firePropertyChange
public void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
- Report a bound property update to any registered listeners.
A
PropertyChangeEventJAI
is created from the cached
property event source and the supplied parameters and fired using
the superclass firePropertyChange(PropertyChangeEvent)
method.
- Overrides:
firePropertyChange
in class PropertyChangeSupport
- Parameters:
propertyName
- The name of the changed property.oldValue
- The old value of the property.newValue
- The new value of the property.
hasListeners
public boolean hasListeners(String propertyName)
- Check whether there are any listeners for a specific property.
The
propertyName
is forced to lower case.
- Overrides:
hasListeners
in class PropertyChangeSupport
- Parameters:
propertyName
- The name of the property.- Returns:
true
if there are one or more listeners for
the given property