list digest

Chuck Davis cjgunzel at
Sun Dec 20 21:47:48 UTC 2020

Thanks guys for the link to the digest.

I've looked through a couple of years and find nothing that addresses my
interest.  As background, I write financial applications and usually when a
user selects something to display in a table it's because they're
interested in the total amount.  And it is easy to provide that information
to them on the initial display.

The rub comes when they select a column header or otherwise sort the
table.  I need, first of all, to eliminate the total object from the model
(this is done easily by listening to the onSort property).  Then, after the
sort is complete I need to add the total object back to the model.  If I
don't eliminate the total object from the model the sort puts it in very
strange places.....  What I need to know is when the sort is complete so
that I can add the total object back into the model and get it displayed.

I've been looking at the TableView source and find the following code near
the start of the sort() method:
        SortEvent<TableView<S>> sortEvent = new SortEvent<>(TableView.this,

It seems to me it would be trivial to invent another event type
SORT_COMPLETE and emit it at the end of the sort() method to notify the
program that the sort has been completed.  And that would certainly solve a
major headache with showing a total amount for financial tables.  What I
don't know is whether the sort is done on another thread in which case a
Future would probably be required to detect the sort completion.

If this were implemented we programmers would be able to detect both the
start and completion of a sort of the table and proceed accordingly.  It
would be VERY helpful.

Thanks for reading.

More information about the openjfx-dev mailing list