[REVIEW REQUEST] Improvements to TableView sorting
Alexander.Kouznetsov at oracle.com
Fri Feb 22 16:05:55 PST 2013
Actually you can implement your own list that does index based mapping
when getting elements and then pass it to removeAll() method.
On 2/21/13 3:25 AM, Knut Arne Vedaa wrote:
>>>>> It's not possible to do it in a single remove event.
>>>> Can't you do it in a single operation if you use List#removeAll?
>>> No, if you select the top half of the items in a list sorted by Last
>>> Name, then resort the list by First Name, the selection will no
>>> longer be a single range. If you decide to delete them at that
>>> point, you'll have to do many small deletes.
>> Not with removeAll. It doesn't use a range. You give it a list
>> containing only the nodes you wish to remove.
> I think the problem is that removeAll removes by element. In a select
> -> delete scenario you can't really do that because a given element
> may (at least in theory) appear more than once in the list.
> So for this to be efficient we would need an
> ObservableList#removeAllByIndex(List<Integer> indices) method.
More information about the openjfx-dev