com.virtuosotechnologies.lib.container
Class PropertySetEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.virtuosotechnologies.lib.container.PropertySetEvent
All Implemented Interfaces:
Serializable

public class PropertySetEvent
extends EventObject

An event sent when a property is changed in a property set.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PropertySetEvent(PropertySet source, boolean isSourceOriginal, ConstrainedKey key, Object oldValue, Object newValue)
          Constructor
 
Method Summary
 ConstrainedKey getKey()
          Get the key changed
 Object getNewValue()
          Get the new value
 Object getOldValue()
          Get the old value
 PropertySet getPropertySet()
          Get the source.
 boolean isSourceOriginal()
          Returns true if the PropertySet returned from getPropertySet was the original PropertySet that had a property changed.
 
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

PropertySetEvent

public PropertySetEvent(PropertySet source,
                        boolean isSourceOriginal,
                        ConstrainedKey key,
                        Object oldValue,
                        Object newValue)
Constructor

Parameters:
source - source PropertySet
isSourceOriginal - true if the source of the event is the original PropertySet that was changed, or false if the property change is being propagated from another PropertySet
key - the key of the property being changed
oldValue - old value for the property
newValue - new value for the property
Method Detail

getPropertySet

public PropertySet getPropertySet()
Get the source. This is the PropertySet that is reporting the event, but not necessarily the original PropertySet that had a property changed.

Returns:
source

isSourceOriginal

public boolean isSourceOriginal()
Returns true if the PropertySet returned from getPropertySet was the original PropertySet that had a property changed. If false, this means the PropertySet is a wrapper or otherwise dependent on another set, and didn't have its putValue() method called explicitly.

Returns:
true if this the original source

getKey

public ConstrainedKey getKey()
Get the key changed

Returns:
key

getOldValue

public Object getOldValue()
Get the old value

Returns:
old value

getNewValue

public Object getNewValue()
Get the new value

Returns:
new value