PropertyChangeEvent.java revision 2172
0N/A * Copyright 1996-2010 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Sun designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Sun in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1472N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * A "PropertyChange" event gets delivered whenever a bean changes a "bound" 0N/A * or "constrained" property. A PropertyChangeEvent object is sent as an * argument to the PropertyChangeListener and VetoableChangeListener methods. * Normally PropertyChangeEvents are accompanied by the name and the old * and new value of the changed property. If the new value is a primitive * type (such as int or boolean) it must be wrapped as the * corresponding java.lang.* Object type (such as Integer or Boolean). * Null values may be provided for the old and the new values if their * true values are not known. * An event source may send a null object as the name to indicate that an * arbitrary set of if its properties have changed. In this case the * old and new values should also be null. * Constructs a new <code>PropertyChangeEvent</code>. * @param source The bean that fired the event. * @param propertyName The programmatic name of the property * @param oldValue The old value of the property. * @param newValue The new value of the property. * Gets the programmatic name of the property that was changed. * @return The programmatic name of the property that was changed. * May be null if multiple properties have changed. * Gets the new value for the property, expressed as an Object. * @return The new value for the property, expressed as an Object. * May be null if multiple properties have changed. * Gets the old value for the property, expressed as an Object. * @return The old value for the property, expressed as an Object. * May be null if multiple properties have changed. * Sets the propagationId object for the event. * @param propagationId The propagationId object for the event. * The "propagationId" field is reserved for future use. In Beans 1.0 * the sole requirement is that if a listener catches a PropertyChangeEvent * and then fires a PropertyChangeEvent of its own, then it should * make sure that it propagates the propagationId field from its * incoming event to its outgoing event. * name of the property that changed. May be null, if not known. * New value for property. May be null if not known. * Previous value for property. May be null if not known. * Propagation ID. May be null. * Returns a string representation of the object. * @return a string representation of the object