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
Method Summary |
int |
getIndex()
Returns the index of the property the event occurred for. |
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
getIndex
public int getIndex()
- Returns the index of the property the event occurred for. This is only used
by the indexed properties