FilteredList/SortedList

Richard Bair richard.bair at oracle.com
Fri Jan 18 10:15:01 PST 2013


>> Why not just implement SortedList and FilterList as concrete subclasses
>> of ListBinding that are bound to their source ObservableList and an
>> observable Comparator or predicate?  For convenience, you could provide
>> sort and filter methods to ListExpression that take the appropriate
>> observable Comparator or predicate and return another sorted or filtered
>> ListExpression so you can chain the calls and build a transformation
>> pipeline?
> Good question actually!

Yes, very good question as it provides an entirely different angle that we hadn't considered. With a ListBinding, I assume that if I sort the binding it sorts the source to match?

Glazed Lists: http://www.glazedlists.com/propaganda/features

Their EventList is just a List, and and claims API compatibility with ArrayList. Is this just fudged or do they have another solution to the API incompatibilities that you've encountered? If it is just fudged (and isn't really compatible), then that really bolsters the argument that the incompatibilities are "technical" and not really "practical" as GlazedLists has been used pretty widely in the Swing world?

I think using a ListBinding would work, in that we already pay attention both to the reference changing or the items changing. The main question will be around how sorting a ListBinding target works (does it update the source as well?). Particularly if the ListBinding is doing some filtering (or based on 5 source lists or something).

Richard


More information about the openjfx-dev mailing list