Package com.luciad.util.collections
Class TLcdListEvent<T>
java.lang.Object
java.util.EventObject
com.luciad.util.collections.TLcdCollectionEvent<T>
com.luciad.util.collections.TLcdListEvent<T>
- All Implemented Interfaces:
Serializable
An event describing a change in an
ILcdList
- Since:
- 9.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.luciad.util.collections.TLcdCollectionEvent
TLcdCollectionEvent.Type
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionTLcdListEvent
(ILcdList<T> aList, TLcdCollectionEvent.Type aType, T aElement, int aOldIndex, int aNewIndex, boolean aIsAdjusting) Create a new event describing a change inaList
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the index of the element in the list after the change, or -1 when the list no longer contains the element after the change.int
Returns the index of the element in the list before the change occurred, or -1 when the list did not contain the element before the change occurred.Methods inherited from class com.luciad.util.collections.TLcdCollectionEvent
getElement, getType, isAdjusting
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
TLcdListEvent
public TLcdListEvent(ILcdList<T> aList, TLcdCollectionEvent.Type aType, T aElement, int aOldIndex, int aNewIndex, boolean aIsAdjusting) Create a new event describing a change inaList
- Parameters:
aList
- The list in which the change occured.aType
- The type describing the nature of change.aElement
- The element which caused the change.aOldIndex
- The index of the element in the list before the change, or -1 if the list did not contain the element before the change.aNewIndex
- The index of the element in the list after the change, or -1 if the list no longer contains the element after the changeaIsAdjusting
-true
if more changes will be made to the collection after this change,false
otherwise
-
-
Method Details
-
getOldIndex
public int getOldIndex()Returns the index of the element in the list before the change occurred, or -1 when the list did not contain the element before the change occurred.- Returns:
- The index of the element in the list before the change.
-
getNewIndex
public int getNewIndex()Returns the index of the element in the list after the change, or -1 when the list no longer contains the element after the change.- Returns:
- The index of the element in the list after the change.
-
getSource
- Overrides:
getSource
in classTLcdCollectionEvent<T>
-