org.beanfabrics.event
Class ElementChangedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.beanfabrics.event.ListEvent
          extended by org.beanfabrics.event.ElementChangedEvent
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<java.util.EventObject>, FollowUpEvent

public class ElementChangedEvent
extends ListEvent
implements FollowUpEvent

An event which indicates that some change has occurred in a IListPM element.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ElementChangedEvent(IListPM<?> source, int index)
          Constructs a ElementChangedEvent.
ElementChangedEvent(IListPM<?> source, int index, java.util.EventObject cause)
          Constructs a ElementChangedEvent.
 
Method Summary
 java.util.EventObject getCause()
          Returns the triggering event.
 int getIndex()
          Returns the index of the changed element.
 java.util.Iterator<java.util.EventObject> iterator()
          Returns an Iterator of all events that caused this event, beginning with this event and ending with the original trigger.
 java.lang.String paramString()
          
 
Methods inherited from class org.beanfabrics.event.ListEvent
toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElementChangedEvent

public ElementChangedEvent(IListPM<?> source,
                           int index,
                           java.util.EventObject cause)
Constructs a ElementChangedEvent.

Parameters:
source - the list where the element belongs to
index - the index of the element
cause - the (optional) triggering event

ElementChangedEvent

public ElementChangedEvent(IListPM<?> source,
                           int index)
Constructs a ElementChangedEvent.

Parameters:
source -
index -
Method Detail

getIndex

public int getIndex()
Returns the index of the changed element.

Returns:
the index of the changed element

getCause

public java.util.EventObject getCause()
Returns the triggering event.

Specified by:
getCause in interface FollowUpEvent
Returns:
the triggering event

paramString

public java.lang.String paramString()

Overrides:
paramString in class ListEvent

iterator

public java.util.Iterator<java.util.EventObject> iterator()
Returns an Iterator of all events that caused this event, beginning with this event and ending with the original trigger.

Specified by:
iterator in interface java.lang.Iterable<java.util.EventObject>
Returns:
an Iterator of all events that caused this event