org.apache.commons.events.observable.standard
Class StandardPostModificationEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.apache.commons.events.observable.ModificationEvent
          extended by org.apache.commons.events.observable.standard.StandardModificationEvent
              extended by org.apache.commons.events.observable.standard.StandardPostModificationEvent
All Implemented Interfaces:
Serializable

public class StandardPostModificationEvent
extends StandardModificationEvent

Event class that encapsulates all the event information for a standard collection event.

The information stored in this event is all that is available as parameters or return values. In addition, the size method is used on the collection. All objects used are the real objects from the method calls, not clones.

Since:
Commons Events 1.0
Version:
$Revision: 155443 $ $Date: 2005-02-26 13:19:51 +0000 (Sat, 26 Feb 2005) $
Author:
Stephen Colebourne
See Also:
Serialized Form

Field Summary
protected  int postSize
          The size after the event
 
Fields inherited from class org.apache.commons.events.observable.standard.StandardModificationEvent
index, object, preSize, previous, repeat, view, viewOffset
 
Fields inherited from class org.apache.commons.events.observable.ModificationEvent
collection, handler, type
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
StandardPostModificationEvent(ObservableCollection obsCollection, ModificationHandler handler, int type, int preSize, int index, Object object, int repeat, Object previous, ObservableCollection view, int viewOffset)
          Constructor.
 
Method Summary
 int getPostSize()
          Gets the size after the change.
 int getSizeChange()
          Gets the size change, negative for remove/clear.
 boolean isSizeChanged()
          Returns true if the size of the collection changed.
 
Methods inherited from class org.apache.commons.events.observable.standard.StandardModificationEvent
getChangeCollection, getChangeIndex, getChangeObject, getChangeRepeat, getPreSize, getPrevious, getView, getViewOffset, isType, isTypeAdd, isTypeBulk, isTypeChange, isTypeReduce, isView, toString
 
Methods inherited from class org.apache.commons.events.observable.ModificationEvent
getBaseCollection, getHandler, getObservedCollection, getType
 
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
 

Field Detail

postSize

protected final int postSize
The size after the event

Constructor Detail

StandardPostModificationEvent

public StandardPostModificationEvent(ObservableCollection obsCollection,
                                     ModificationHandler handler,
                                     int type,
                                     int preSize,
                                     int index,
                                     Object object,
                                     int repeat,
                                     Object previous,
                                     ObservableCollection view,
                                     int viewOffset)
Constructor.

Parameters:
obsCollection - the event source
handler - the handler
type - the event type
preSize - the size before the change
index - the index that changed
object - the value that changed
repeat - the number of repeats
previous - the previous value being removed/replaced
view - the view collection, null if event from main collection
viewOffset - the offset within the main collection of the view, -1 if unknown
Method Detail

getPostSize

public int getPostSize()
Gets the size after the change.

Returns:
the size after the change

getSizeChange

public int getSizeChange()
Gets the size change, negative for remove/clear.

Returns:
the size before the change

isSizeChanged

public boolean isSizeChanged()
Returns true if the size of the collection changed.

Returns:
true is the size changed


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.