javax.infobus
Class DataItemChangeEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.infobus.DataItemChangeEvent
Direct Known Subclasses:
DataItemAddedEvent, DataItemDeletedEvent, DataItemRevokedEvent, DataItemShapeChangedEvent, DataItemValueChangedEvent, RowsetCursorMovedEvent

public class DataItemChangeEvent
extends java.util.EventObject

A data item which implements the DataItemChangeManager interface propagates one of these events to all DataItemChangeListeners that have registered on its addDataItemChangeListener method whenever the data item's data has been modified. The event includes two fields:

If the source and changedItem fields are not equal, then the event conveys information about a change in a data item which is in a collection of data items or is itself such a collection.

See Also:
getChangedItem(), Serialized Form

Method Summary
 java.lang.Object getChangedItem()
          Returns the DataItem that changed.
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns a property or metadata information about the change event.
 java.lang.Object getSource()
          Returns the DataItem which sent the DataItemChangeEvent.
 
Methods inherited from class java.util.EventObject
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSource

public java.lang.Object getSource()
Returns the DataItem which sent the DataItemChangeEvent. If the source is a collection, the getChangedItem may point to a unit in the collection that has changed.
Returns:
the sender of the DataItemChangeEvent
Overrides:
getSource in class java.util.EventObject

getChangedItem

public java.lang.Object getChangedItem()
Returns the DataItem that changed. May be the same as the object reported by getSource, or may be a subitem if getSource reports a collection
Returns:
the DataItem that has changed

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Returns a property or metadata information about the change event. For example, properties can provide information about the nature of sub-items that changed when getChangedItem() returns null (more than one sub-item changed).

Support for properties is optional. null will be returned for unsupported properties.

When this method is invoked, the DataItemChangeEvent in turn calls the get method for either the Map or InfoBusMap provided by the event constructor.

Parameters:
propertyName - the name of the property to be retrieved. Property names must not contain the ‘*’ character.
Returns:
the requested property, or null if the specified propertyName is not supported.