org.bidib.wizard.api.model.bean.ObservableBean Maven / Gradle / Ivy
Show all versions of bidibwizard-api Show documentation
package org.bidib.wizard.api.model.bean;
import java.beans.PropertyChangeListener;
public interface ObservableBean {
/**
* Adds the given PropertyChangeListener to the listener list. The listener is registered for all bound properties
* of this class.
*
* @param listener
* the PropertyChangeListener to be added
*
* @see #removePropertyChangeListener(PropertyChangeListener)
*/
void addPropertyChangeListener(PropertyChangeListener listener);
/**
* Adds a PropertyChangeListener to the listener list for a specific property. The specified property may be
* user-defined.
*
*
* Note that if this bean is inheriting a bound property, then no event will be fired in response to a change in the
* inherited property.
*
*
* If listener is null, no exception is thrown and no action is performed.
*
* @param propertyName
* one of the property names listed above
* @param listener
* the PropertyChangeListener to be added
*
* @see #removePropertyChangeListener(PropertyChangeListener)
* @see #removePropertyChangeListener(String, PropertyChangeListener)
* @see #addPropertyChangeListener(PropertyChangeListener)
* @see #getPropertyChangeListeners(String)
*/
void addPropertyChangeListener(String propertyName, 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.
*
* @param listener
* the PropertyChangeListener to be removed
*
* @see #addPropertyChangeListener(PropertyChangeListener)
*/
void removePropertyChangeListener(PropertyChangeListener listener);
/**
* Removes a PropertyChangeListener from the listener list for a specific property. This method should be used to
* remove PropertyChangeListeners that were registered for a specific bound property.
*
*
* If listener is null, no exception is thrown and no action is performed.
*
* @param propertyName
* a valid property name
* @param listener
* the PropertyChangeListener to be removed
*
* @see #addPropertyChangeListener(PropertyChangeListener)
* @see #addPropertyChangeListener(String, PropertyChangeListener)
* @see #removePropertyChangeListener(PropertyChangeListener)
* @see #getPropertyChangeListeners(String)
*/
void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
}