ObservableList<E>#replaceRange(int from, int to, Collection<? extends E> col)

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • jfx26
    • Affects Version/s: 8
    • Component/s: javafx
    • master

      Add a new method to ObservableList to be able to replace a range of elements with different elements. This is highly useful when forwarding events received by a ListChangeListener to another observable list that must be kept in sync (but perhaps has its items subtly transformed). Without this method, permutations are most efficiently implemented with add/remove, but this changes the list's size temporarily (which may trigger things like selection/cursor updates). Doing in place replacements (with `set`) is also not a good option as a single large permutation event must then be forwarded as many single item set events.

      Originally a request for additional setAll method with range:
      ObservableList<E>#setAll(int from, int to, Collection<? extends E> col)

            Assignee:
            John Hendrikx
            Reporter:
            Martin Sládeček
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: