Joda System API

org.joda.property
Class ListPropertyChangeEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.beans.PropertyChangeEvent
              |
              +--org.joda.property.PropertyValueChangeEvent
                    |
                    +--org.joda.property.ListPropertyChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class ListPropertyChangeEvent
extends PropertyValueChangeEvent

ListPropertyChangeEvent is the event object sent when a list property changes. It encapsulates better the details of the change. The oldValue and newValue fields of the superclass are not populated for performance reasons.

Author:
Stephen Colebourne
See Also:
Serialized Form

Nested Class Summary
static class ListPropertyChangeEvent.Change
           
 
Field Summary
static ListPropertyChangeEvent.Change REGION_ADDED
           
static ListPropertyChangeEvent.Change REGION_CHANGED
           
static ListPropertyChangeEvent.Change REGION_REMOVED
           
 
Fields inherited from class java.util.EventObject
source
 
Method Summary
static ListPropertyChangeEvent createRegionAddedEvent(Property source, int startIndex, int endIndex)
          Static factory constructor.
static ListPropertyChangeEvent createRegionChangedEvent(Property source, int startIndex, int endIndex)
          Static factory constructor.
static ListPropertyChangeEvent createRegionRemovedEvent(Property source, int startIndex, int endIndex)
          Static factory constructor.
 ListPropertyChangeEvent.Change getChangeType()
          Gets the change type.
 int getEndIndex()
          Get the end index of the affected region (inclusive).
 int getStartIndex()
          Get the start index of the affected region.
 
Methods inherited from class org.joda.property.PropertyValueChangeEvent
createValueChangedEvent, getBean, getProperty
 
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

REGION_ADDED

public static final ListPropertyChangeEvent.Change REGION_ADDED

REGION_REMOVED

public static final ListPropertyChangeEvent.Change REGION_REMOVED

REGION_CHANGED

public static final ListPropertyChangeEvent.Change REGION_CHANGED
Method Detail

createRegionAddedEvent

public static ListPropertyChangeEvent createRegionAddedEvent(Property source,
                                                             int startIndex,
                                                             int endIndex)
Static factory constructor.

Parameters:
source - the property that fired the event
startIndex - the inclusive start index of the affected region
endIndex - the inclusive end index of the affected region

createRegionRemovedEvent

public static ListPropertyChangeEvent createRegionRemovedEvent(Property source,
                                                               int startIndex,
                                                               int endIndex)
Static factory constructor.

Parameters:
source - the property that fired the event
startIndex - the inclusive start index of the affected region
endIndex - the inclusive end index of the affected region

createRegionChangedEvent

public static ListPropertyChangeEvent createRegionChangedEvent(Property source,
                                                               int startIndex,
                                                               int endIndex)
Static factory constructor.

Parameters:
source - the property that fired the event
startIndex - the inclusive start index of the affected region
endIndex - the inclusive end index of the affected region

getStartIndex

public int getStartIndex()
Get the start index of the affected region.

Returns:
the index into the list of the affected region

getEndIndex

public int getEndIndex()
Get the end index of the affected region (inclusive).

Returns:
the end index into the list of the affected region

getChangeType

public ListPropertyChangeEvent.Change getChangeType()
Gets the change type.

Returns:
the Change type

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.