org.jbeans
Class PropertyEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--org.jbeans.BaseEvent
              |
              +--org.jbeans.PropertyEvent
All Implemented Interfaces:
Serializable

public class PropertyEvent
extends BaseEvent

This class is the event that is generated when a bean property is retrieved or set.

The getOldValue and getNewValue methods in BaseEvent class are different for this event and are described here:

getOldValue - Returns the value of the property. This value is the same whether a call to getPropertyValue or setPropertyValue is called. It is always the current value of the property before any action takes place

getNewValue - Returns the new value of the property. This is equal to the value of getOldValue for get events. For set events this contains the value that was set into the property (which with auto-conversion is the value after conversion)

Author:
Brian Pontarelli
See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PropertyEvent(BaseBeanProperty property, Object oldValue, Object newValue, Object bean)
          Creates a new property event using the values given
PropertyEvent(BaseBeanProperty property, Object oldValue, Object newValue, Object bean, int index)
          Creates a new property event using the values given, for indexed properties
 
Method Summary
 int getIndex()
          Returns the index of the property the event occurred for.
 
Methods inherited from class org.jbeans.BaseEvent
getBean, getFullName, getNewValue, getOldValue, getPropertyName, getPropertyType
 
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

PropertyEvent

public PropertyEvent(BaseBeanProperty property,
                     Object oldValue,
                     Object newValue,
                     Object bean)
Creates a new property event using the values given

PropertyEvent

public PropertyEvent(BaseBeanProperty property,
                     Object oldValue,
                     Object newValue,
                     Object bean,
                     int index)
Creates a new property event using the values given, for indexed properties
Method Detail

getIndex

public int getIndex()
Returns the index of the property the event occurred for. This is only used by the indexed properties