public class CollectionChangedEvent<E> extends Object
ObservableCollection
.Constructor and Description |
---|
CollectionChangedEvent(ObservableCollection<? extends E> source,
CollectionChangeAction action,
List<? extends E> oldItems,
List<? extends E> newItems,
int oldIndex,
int newIndex)
Creates an instance of the
CollectionChangedEvent class. |
CollectionChangedEvent(ObservableCollection<E> source,
CollectionChangeAction action)
Creates an instance of the
CollectionChangedEvent class. |
Modifier and Type | Method and Description |
---|---|
CollectionChangeAction |
action()
Gets the current action.
|
int |
getNewIndex()
Gets the new index of the item.
|
List<? extends E> |
getNewItems()
Gets the new item.
|
int |
getOldIndex()
Gets the old index of the item.
|
List<? extends E> |
getOldItems()
Gets the old item.
|
ObservableCollection<? extends E> |
getSource() |
public CollectionChangedEvent(ObservableCollection<? extends E> source, CollectionChangeAction action, List<? extends E> oldItems, List<? extends E> newItems, int oldIndex, int newIndex)
CollectionChangedEvent
class.action
- The action with which this event is associated with.oldItems
- The old item if an item was replaced or removed.newItems
- The newly added item.oldIndex
- The index of the removed or replaced item.newIndex
- The index of the newly added item.public CollectionChangedEvent(ObservableCollection<E> source, CollectionChangeAction action)
CollectionChangedEvent
class.action
- The action which this event is associated with.public ObservableCollection<? extends E> getSource()
public CollectionChangeAction action()
CollectionChangeAction
public int getNewIndex()
public int getOldIndex()