The PropertyChangeEvent class is a subclass of java.util.EventObject. An event of this type is sent to interested PropertyChangeListener objects whenever a Java bean changes a "bound" property, or whenever a PropertyEditor or Customizer changes a property value. A PropertyChangeEvent is also sent to registered VetoableChangeListener objects when a bean attempts to change the value of a "constrained" property.
When creating a PropertyChangeEvent, you normally specify the bean that generated the event, the programmatic (locale-independent) name of the property that changed, and the old and new values of the property. If the values cannot be determined, null should be passed instead. If the event is a notification that more than one property value changed, the name should also be null.
While Java beans must generate and send PropertyChangeEvent objects, it is typically only application builders and similar tools that are interested in receiving them.
public class PropertyChangeEvent extends EventObject { // Public Constructor public PropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue); // Public Instance Methods public Object getNewValue(); public Object getOldValue(); public Object getPropagationId(); public String getPropertyName(); public void setPropagationId(Object propagationId); }
Object->EventObject(Serializable)->PropertyChangeEvent
PropertyChangeListener.propertyChange(), PropertyVetoException(), VetoableChangeListener.vetoableChange()
PropertyVetoException.getPropertyChangeEvent()
This HTML Help has been published using the chm2web software. |