Package com.jgoodies.common.collect
Interface ObservableList2<E>
- Type Parameters:
E
- the type of the list elements
- All Superinterfaces:
Collection<E>
,Iterable<E>
,List<E>
,ListModel
,ObservableList<E>
- All Known Implementing Classes:
ArrayListModel
,LinkedListModel
Adds behavior for explicit change notification to the
ObservableList
interface. The ObservableList implementations that ship with the
JGoodies Common, ArrayListModel
and LinkedListModel
,
implement ObservableList2.- Since:
- 1.7
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fireContentsChanged
(int index) Notifies all registeredListDataListeners
that the element at the specified index has changed.void
fireContentsChanged
(int index0, int index1) Notifies all registeredListDataListeners
that the element at the specified index has changed.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
-
Method Details
-
fireContentsChanged
void fireContentsChanged(int index) Notifies all registeredListDataListeners
that the element at the specified index has changed. Useful if there's a content change without any structural change.This method must be called after the element of the list changes.
- Parameters:
index
- the index of the element that has changed- See Also:
-
fireContentsChanged
void fireContentsChanged(int index0, int index1) Notifies all registeredListDataListeners
that the element at the specified index has changed. Useful if there's a content change without any structural change.This method must be called after one or more elements of the list change. The changed elements are specified by the closed interval index0, index1 -- the end points are included. Note that index0 need not be less than or equal to index1.
- Parameters:
index0
- one end of the new intervalindex1
- the other end of the new interval- See Also:
-