com.togethersoft.openapi.util.propertyMap
Class PropertyMapEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.togethersoft.openapi.util.DispatchableEvent
              |
              +--com.togethersoft.openapi.util.propertyMap.PropertyMapEvent

public class PropertyMapEvent
extends DispatchableEvent

The PropertyMapEvent is used in implementaions of PropertyMap interface to deliver
information about changes in a property.

Author:
TogetherSoft
Since: Together 4.0

Field Summary
 private final ObjectmyOldValue
           
 private final PropertymyProperty
           
 private final booleanmyPropertyAdded
           
 private final ObjectmyPropertyKey
           

Fields inherited from class java.util.EventObject
source

Constructor Summary
PropertyMapEvent(PropertyMap map, Property property, Object oldValue, boolean propertyAdded)
          Constructs a new PropertyMapEvent.
PropertyMapEvent(PropertyMap map, Object propertyKey)
          Constructs a new PropertyMapEvent.

Method Summary
 voiddispatch(EventListener listener)
          Executes a listener's propertiesChanged() method.
 ObjectgetOldValue()
          Retuns an old value of the changed Property.
 PropertygetProperty()
          Returns the changed Property instance.
 ObjectgetPropertyKey()
          Returns a key object for the changed Property.
 PropertyMapgetPropertyMap()
          Returns PropertyMap instance which fired this event.
 booleanisPropertyAdded()
          Checks whether value has been added.
 StringtoString()
          Returns a string containing a key, old and new values of the changed Property.

Methods inherited from class java.util.EventObject
getSource

Methods inherited from class java.lang.Object
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize

Field Detail

myOldValue

private final Object myOldValue

myProperty

private final Property myProperty

myPropertyAdded

private final boolean myPropertyAdded

myPropertyKey

private final Object myPropertyKey
Constructor Detail

PropertyMapEvent

public PropertyMapEvent(PropertyMap map, Property property, Object oldValue, boolean propertyAdded)
Constructs a new PropertyMapEvent.
Parameters:
map the PropertyMap instance that fired this event.
property the changed property
oldValue the old value of changed property
propertyAdded true if property was added with addProperty method

PropertyMapEvent

public PropertyMapEvent(PropertyMap map, Object propertyKey)
Constructs a new PropertyMapEvent.
Parameters:
map the PropertyMap instance that fired this event.
propertyKey a key object of the changed property
Method Detail

dispatch

public void dispatch(EventListener listener)
Executes a listener's propertiesChanged() method.
Parameters:
listener a PropertyMapListener kind of a listener
See Also:
PropertyMapListener

getOldValue

public Object getOldValue()
Retuns an old value of the changed Property.
Returns: an old value of the changed Property

getProperty

public Property getProperty()
Returns the changed Property instance.
Returns: the changed Property instance

getPropertyKey

public Object getPropertyKey()
Returns a key object for the changed Property.
Returns: a key object for the changed Property

getPropertyMap

public PropertyMap getPropertyMap()
Returns PropertyMap instance which fired this event.
Parameters:
PropertyMap instance which fired this event

isPropertyAdded

public boolean isPropertyAdded()
Checks whether value has been added.
Returns: true if so, false otherwise

toString

public String toString()
Returns a string containing a key, old and new values of the changed Property.
Returns: a string containing a key, old and new values of the changed Property

Association Links

to Class com.togethersoft.openapi.util.propertyMap.Property

to Class java.lang.Object

to Class java.lang.Object