Interface ObservableList2<E>

  • Type Parameters:
    E - the type of the list elements
    All Superinterfaces:
    java.util.Collection<E>, java.lang.Iterable<E>, java.util.List<E>, javax.swing.ListModel, ObservableList<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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void fireContentsChanged​(int index)
      Notifies all registered ListDataListeners that the element at the specified index has changed.
      void fireContentsChanged​(int index0, int index1)
      Notifies all registered ListDataListeners 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.lang.Iterable

        forEach
      • 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 Detail

      • 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:
        EventListenerList
      • 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:
        EventListenerList