[Rev 01] RFR: 8193800: TreeTableView selection changes on sorting
Ambarish Rapte
arapte at openjdk.java.net
Wed Jun 3 04:57:19 UTC 2020
On Tue, 2 Jun 2020 21:00:27 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Ambarish Rapte has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Change isSortingInProgress to package scope
>
> modules/javafx.controls/src/main/java/javafx/scene/control/TreeTableView.java line 1822:
>
>> 1821: public void sort() {
>> 1822: sortingInProgress = true;
>> 1823: final ObservableList<TreeTableColumn<S,?>> sortOrder = getSortOrder();
>
> I presume that sorting cannot be called recursively?
The `sort()` is called only once for a `TreeTableView`. This method does not perform the actual sorting but it is
performed by the sort policy(`DEFAULT_SORT_POLICY`). `DEFAULT_SORT_POLICY` initiates the sorting by calling
`rootItem.sort()`, which results in call to `TreeItem.doSort()`. `TreeItem.doSort()` makes the final call to sort the
children list, this method gets executed once for the root TreeItem and then for each expanded child TreeItem.
-------------
PR: https://git.openjdk.java.net/jfx/pull/244
More information about the openjfx-dev
mailing list