Package com.privatejgoodies.common.bean
Interface ObservableBean2
- All Superinterfaces:
ObservableBean
- All Known Subinterfaces:
IActionBean
- All Known Implementing Classes:
AbstractUnitConverter
,Bean
,DefaultUnitConverter
In addition to its super interface ObservableBean, this interface describes the optional support
for registering PropertyChangeListeners for an individual property name. This interface is
primarily intended to ensure compile-time safety for beans that shall be observed.
- Author:
- Karsten Lentzsch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list for a specific property.Returns an array of all the property change listeners registered on this component.getPropertyChangeListeners
(String propertyName) Returns an array of all the listeners which have been associated with the named property.void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list for a specific property.Methods inherited from interface com.privatejgoodies.common.bean.ObservableBean
addPropertyChangeListener, removePropertyChangeListener
-
Method Details
-
addPropertyChangeListener
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.
- Parameters:
propertyName
- one of the property names listed abovelistener
- the PropertyChangeListener to be added- See Also:
-
removePropertyChangeListener
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.
- Parameters:
propertyName
- a valid property namelistener
- the PropertyChangeListener to be removed- See Also:
-
getPropertyChangeListeners
PropertyChangeListener[] getPropertyChangeListeners()Returns an array of all the property change listeners registered on this component.- Returns:
- all of this component's
PropertyChangeListener
s or an empty array if no property change listeners are currently registered - See Also:
-
getPropertyChangeListeners
Returns an array of all the listeners which have been associated with the named property.- Parameters:
propertyName
- the name of the property to lookup listeners- Returns:
- all of the
PropertyChangeListeners
associated with the named property or an empty array if no listeners have been added - See Also:
-