Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.progeeks.meta
Class ListPropertyChangeEvent  view ListPropertyChangeEvent download ListPropertyChangeEvent.java

java.lang.Object
  extended byjava.util.EventObject
      extended byjava.beans.PropertyChangeEvent
          extended byorg.progeeks.meta.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.2 $

Field Summary
static int DELETE
           
private  int firstIndex
           
static int INSERT
           
private  int lastIndex
           
private  int type
           
static int UPDATE
           
 
Fields inherited from class java.beans.PropertyChangeEvent
 
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, java.lang.Object list, 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

firstIndex

private int firstIndex

lastIndex

private int lastIndex

type

private int type
Constructor Detail

ListPropertyChangeEvent

public ListPropertyChangeEvent(java.lang.Object source,
                               java.lang.String propertyName,
                               java.lang.Object list,
                               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.

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.