public class PropertyChangeEvent extends EventObject
If the old or new values are unknown (although why that would be I do not know), they may be null. Also, if the set of properties itself has changed, the name should be null, and the old and new values may also be null. Right now Sun put in a propagationId, reserved for future use. Read the comments on the constructor and on setPropagationId for more information.
source
Constructor and Description |
---|
PropertyChangeEvent(Object source,
String propertyName,
Object oldVal,
Object newVal)
Create a new PropertyChangeEvent.
|
Modifier and Type | Method and Description |
---|---|
Object |
getNewValue()
Get the property's new value.
|
Object |
getOldValue()
Get the property's old value.
|
Object |
getPropagationId()
Get the propagation ID.
|
String |
getPropertyName()
Get the property name.
|
void |
setPropagationId(Object propagationId)
Set the propagation ID.
|
getSource, toString
public PropertyChangeEvent(Object source, String propertyName, Object oldVal, Object newVal)
source
- the Bean containing the propertypropertyName
- the property's nameoldVal
- the old value of the propertynewVal
- the new value of the propertyIllegalArgumentException
- if source is nullpublic String getPropertyName()
public Object getNewValue()
public Object getOldValue()
public void setPropagationId(Object propagationId)
propagationId
- the propagation IDgetPropagationId()
public Object getPropagationId()
setPropagationId(Object)