Class PropertyChangeSupport
Defined in: core.js.
Constructor Attributes | Constructor Name and Description |
---|---|
PropertyChangeSupport(source)
Creates a PropertyChangeSupport instance.
|
Method Attributes | Method Name and Description |
---|---|
addPropertyChangeListener(propertyName, listener)
Adds the
listener in parameter to the list of listeners that may be notified. |
|
firePropertyChange(propertyName, oldValue, newValue)
Fires a property change event.
|
|
getPropertyChangeListeners(propertyName)
Returns an array of all the listeners that were added to the
PropertyChangeSupport object with addPropertyChangeListener().
|
|
removePropertyChangeListener(listener, listener)
Removes the
listener in parameter to the list of listeners that may be notified. |
Class Detail
PropertyChangeSupport(source)
Creates a PropertyChangeSupport instance.
Adapted from java.beans.PropertyChangeSupport
- Parameters:
- source
Method Detail
addPropertyChangeListener(propertyName, listener)
Adds the
listener
in parameter to the list of listeners that may be notified.
- Parameters:
- {string} propertyName Optional
- the name of an optional property to listen
- listener
- a callback that will be called with a PropertyChangeEvent instance
firePropertyChange(propertyName, oldValue, newValue)
Fires a property change event.
- Parameters:
- propertyName
- {string} the name of the modified property
- oldValue
- old value
- newValue
- new value
getPropertyChangeListeners(propertyName)
Returns an array of all the listeners that were added to the
PropertyChangeSupport object with addPropertyChangeListener().
- Parameters:
- {string} propertyName Optional
- the name of an optional listened property
- Returns:
- [Array]
removePropertyChangeListener(listener, listener)
Removes the
listener
in parameter to the list of listeners that may be notified.
- Parameters:
- listener
- the listener to remove. If it doesn't exist, it's simply ignored.
- listener