Name

Class java.beans.PropertyChangeEvent

Description

Whenever the value of a Bean’s bound or constrained property is changed, a property change event is fired to all of the registered event listeners. The PropertyChangeEvent contains information about the change, and is passed as an argument to the event notification methods of the PropertyChangeListener and VetoableChangeListener interfaces.

Class Definition

public class PropertyChangeEvent extends java.util.EventObject 
{
   // constructors
   public PropertyChangeEvent(Object source, String propertyName,
                              Object oldValue, Object newValue);
   
   // methods
   public Object getNewValue();
   public Object getOldValue();
   public Object getPropagationId();
   public String getPropertyName();
   public void setPropagationId(Object propagationId);
}

See Also

PropertyChangeListener, VetoableChangeListener

Get Developing Java Beans now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.