src/share/classes/java/beans/PropertyChangeEvent.java

Print this page
rev 10053 : 8044855: Add missing @since tag under java.beans.*
Reviewed-by:


  26 package java.beans;
  27 
  28 import java.util.EventObject;
  29 
  30 /**
  31  * A "PropertyChange" event gets delivered whenever a bean changes a "bound"
  32  * or "constrained" property.  A PropertyChangeEvent object is sent as an
  33  * argument to the PropertyChangeListener and VetoableChangeListener methods.
  34  * <P>
  35  * Normally PropertyChangeEvents are accompanied by the name and the old
  36  * and new value of the changed property.  If the new value is a primitive
  37  * type (such as int or boolean) it must be wrapped as the
  38  * corresponding java.lang.* Object type (such as Integer or Boolean).
  39  * <P>
  40  * Null values may be provided for the old and the new values if their
  41  * true values are not known.
  42  * <P>
  43  * An event source may send a null object as the name to indicate that an
  44  * arbitrary set of if its properties have changed.  In this case the
  45  * old and new values should also be null.


  46  */
  47 public class PropertyChangeEvent extends EventObject {
  48     private static final long serialVersionUID = 7042693688939648123L;
  49 
  50     /**
  51      * Constructs a new {@code PropertyChangeEvent}.
  52      *
  53      * @param source        the bean that fired the event
  54      * @param propertyName  the programmatic name of the property that was changed
  55      * @param oldValue      the old value of the property
  56      * @param newValue      the new value of the property
  57      *
  58      * @throws IllegalArgumentException if {@code source} is {@code null}
  59      */
  60     public PropertyChangeEvent(Object source, String propertyName,
  61                                Object oldValue, Object newValue) {
  62         super(source);
  63         this.propertyName = propertyName;
  64         this.newValue = newValue;
  65         this.oldValue = oldValue;




  26 package java.beans;
  27 
  28 import java.util.EventObject;
  29 
  30 /**
  31  * A "PropertyChange" event gets delivered whenever a bean changes a "bound"
  32  * or "constrained" property.  A PropertyChangeEvent object is sent as an
  33  * argument to the PropertyChangeListener and VetoableChangeListener methods.
  34  * <P>
  35  * Normally PropertyChangeEvents are accompanied by the name and the old
  36  * and new value of the changed property.  If the new value is a primitive
  37  * type (such as int or boolean) it must be wrapped as the
  38  * corresponding java.lang.* Object type (such as Integer or Boolean).
  39  * <P>
  40  * Null values may be provided for the old and the new values if their
  41  * true values are not known.
  42  * <P>
  43  * An event source may send a null object as the name to indicate that an
  44  * arbitrary set of if its properties have changed.  In this case the
  45  * old and new values should also be null.
  46  *
  47  * @since 1.1
  48  */
  49 public class PropertyChangeEvent extends EventObject {
  50     private static final long serialVersionUID = 7042693688939648123L;
  51 
  52     /**
  53      * Constructs a new {@code PropertyChangeEvent}.
  54      *
  55      * @param source        the bean that fired the event
  56      * @param propertyName  the programmatic name of the property that was changed
  57      * @param oldValue      the old value of the property
  58      * @param newValue      the new value of the property
  59      *
  60      * @throws IllegalArgumentException if {@code source} is {@code null}
  61      */
  62     public PropertyChangeEvent(Object source, String propertyName,
  63                                Object oldValue, Object newValue) {
  64         super(source);
  65         this.propertyName = propertyName;
  66         this.newValue = newValue;
  67         this.oldValue = oldValue;