Overview | Package | Class | Deprecated | Index | Help
| Griffon 0.9.5-rc2
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## griffon.core
[Java] Interface Observable

    public interface Observable

Describes objects that provide bound properties as specified in the Java Bean Specification.

Authors:
  Andres Almiray

Since:
  0.9.1

Method Summary
`void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds the given PropertyChangeListener to the listener list.
`void` | `addPropertyChangeListener(String propertyName, PropertyChangeListener listener)` Removes the given PropertyChangeListener from the listener list.
`PropertyChangeListener[]` | `getPropertyChangeListeners()` Returns an array of all the listeners that were added with addPropertyChangeListener().
`PropertyChangeListener[]` | `getPropertyChangeListeners(String propertyName)` Returns an array of all the listeners which have been associated with the named property.
`void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes the given PropertyChangeListener from the listener list.
`void` | `removePropertyChangeListener(String propertyName, PropertyChangeListener listener)` Removes the given PropertyChangeListener from the listener list.

Method Detail

### addPropertyChangeListener

    public void addPropertyChangeListener(PropertyChangeListener listener)

  Adds the given PropertyChangeListener to the listener list.

  The listener is registered for all bound properties of this class.

  Parameters:
    `listener` - the PropertyChangeListener to be added
  See Also:
    removePropertyChangeListener(PropertyChangeListener)

### addPropertyChangeListener

    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)

  Removes the given PropertyChangeListener from the listener list.

  The listener is registered an specific property of this class.

  Parameters:
    `propertyName` - The name of the property to listen on.
    `listener` - the PropertyChangeListener to be added
  See Also:
    removePropertyChangeListener(String, PropertyChangeListener)

### getPropertyChangeListeners

    public PropertyChangeListener[] getPropertyChangeListeners()

  Returns an array of all the listeners that were added with addPropertyChangeListener().

  Returns:
    all of the `PropertyChangeListeners` added or an empty array if no listeners have been added.

### getPropertyChangeListeners

    public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)

  Returns an array of all the listeners which have been associated with the named property.
  Parameters:
    `propertyName` - The name of the property being listened to
  Returns:
    all of the `PropertyChangeListeners` associated with the named property. If no such listeners have been added, or if `propertyName` is null, an empty array is returned.

### removePropertyChangeListener

    public void removePropertyChangeListener(PropertyChangeListener listener)

  Removes the given PropertyChangeListener from the listener list.

  This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.

  Parameters:
    `listener` - the PropertyChangeListener to be removed
  See Also:
    addPropertyChangeListener(PropertyChangeListener)

### removePropertyChangeListener

    public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)

  Removes the given PropertyChangeListener from the listener list.

  This method should be used to remove PropertyChangeListeners that were registered for an specific property of this class.

  Parameters:
    `propertyName` - The name of the property that was listened on.
    `listener` - the PropertyChangeListener to be removed
  See Also:
    addPropertyChangeListener(String, PropertyChangeListener)

Groovy Documentation