Interface ObservableList2<E>

Type Parameters:
E - the type of the list elements
All Superinterfaces:
Collection<E>, Iterable<E>, List<E>, ListModel, ObservableList<E>, SequencedCollection<E>
All Known Implementing Classes:
ArrayListModel, LinkedListModel

public interface ObservableList2<E> extends ObservableList<E>
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 Details

    • fireContentsChanged

      void fireContentsChanged(int index)
      Notifies all registered ListDataListeners 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 registered ListDataListeners 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 interval
      index1 - the other end of the new interval
      See Also: