|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
java.beans.PropertyChangeEvent
public class PropertyChangeEvent
PropertyChangeEvents are fired in the PropertyChange and VetoableChange event classes. They represent the old and new values as well as the source Bean. If the old or new value is a primitive type, it must be wrapped in the appropriate wrapper type (java.lang.Integer for int, etc., etc.).
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.
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
PropertyChangeEvent(Object source,
String propertyName,
Object oldVal,
Object newVal)
Create a new PropertyChangeEvent. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 property
IllegalArgumentException
- if source is nullMethod Detail |
---|
public String getPropertyName()
public Object getNewValue()
public Object getOldValue()
public void setPropagationId(Object propagationId)
propagationId
- the propagation IDgetPropagationId()
public Object getPropagationId()
setPropagationId(Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |