org.progeeks.util
Class ListPropertyChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.beans.PropertyChangeEvent
          extended by org.progeeks.util.ListPropertyChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class ListPropertyChangeEvent
extends java.beans.PropertyChangeEvent

An extension to the standard PropertyChangeEvent that provides information about changes to the list. Standard property change events don't handle this very well since the list object itself will be the same.

Version:
$Revision: 1.3 $
Author:
Paul Speed
See Also:
Serialized Form

Field Summary
static int DELETE
           
static int INSERT
           
static int UPDATE
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ListPropertyChangeEvent(java.lang.Object source, ListPropertyChangeEvent event)
          Creates a copy of the specified event but using a different source.
ListPropertyChangeEvent(java.lang.Object source, java.lang.String propertyName, ListPropertyChangeEvent event)
          Creates a copy of the specified event but using a different source and name.
ListPropertyChangeEvent(java.lang.Object source, java.lang.String propertyName, java.lang.Object originalList, java.lang.Object newList, int firstIndex, int lastIndex, int changeType)
           
 
Method Summary
 int getFirstIndex()
          Returns the first index of the modified range.
 int getLastIndex()
          Returns the last index of the modified range.
 int getType()
          Returns the type of change done, one of: INSERT, UPDATE, or DELETE.
 
Methods inherited from class java.beans.PropertyChangeEvent
getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId
 
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
 

Field Detail

INSERT

public static final int INSERT
See Also:
Constant Field Values

UPDATE

public static final int UPDATE
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values
Constructor Detail

ListPropertyChangeEvent

public ListPropertyChangeEvent(java.lang.Object source,
                               java.lang.String propertyName,
                               java.lang.Object originalList,
                               java.lang.Object newList,
                               int firstIndex,
                               int lastIndex,
                               int changeType)

ListPropertyChangeEvent

public ListPropertyChangeEvent(java.lang.Object source,
                               ListPropertyChangeEvent event)
Creates a copy of the specified event but using a different source.


ListPropertyChangeEvent

public ListPropertyChangeEvent(java.lang.Object source,
                               java.lang.String propertyName,
                               ListPropertyChangeEvent event)
Creates a copy of the specified event but using a different source and name.

Method Detail

getFirstIndex

public int getFirstIndex()
Returns the first index of the modified range. For deleted elements, this will refer to the index of the element prior to being removed. For added elements, it refers to the index after being added.


getLastIndex

public int getLastIndex()
Returns the last index of the modified range. For deleted elements, this will refer to the index of the element prior to being removed. For added elements, it refers to the index after being added.


getType

public int getType()
Returns the type of change done, one of: INSERT, UPDATE, or DELETE.



Copyright © 2002-2003 Paul Speed. All Rights Reserved.