RFR: 8235491: Tree/TableView: implementation of isSelected(int) violates contract [v10]

Andy Goryachev angorya at openjdk.org
Thu Aug 11 18:00:37 UTC 2022


On Thu, 11 Aug 2022 12:02:16 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'origin/master' into 8235491.isselected
>>  - 8235491: updated test
>>  - 8235491: removed unnecessary method
>>  - 8235491: delegate to super()
>>  - 8235491: revert clear selection
>>  - 8235491: whitespace
>>  - 8235491: additional tests
>>  - Merge remote-tracking branch 'origin/master' into 8235491.isselected
>>  - 8235491: javadoc
>>  - 8235491: tree table view
>>  - ... and 6 more: https://git.openjdk.org/jfx/compare/d1fee347...35247bc6
>
> modules/javafx.controls/src/main/java/javafx/scene/control/TreeTableRow.java line 445:
> 
>> 443: 
>> 444:         boolean isSelected = getTreeTableView().getSelectionModel().isSelected(index, null);
>> 445:         if (isSelected() == isSelected) return;
> 
> good example of when using the two-param method makes sense - we probably should do the same in TableRow (which does some convoluted ifs for the same result) to keep both as similar as possible. Might be done a new low-priority  follow-up issue

unnecessary in the case of TableRow.
the change in TreeTableRow was necessary because otherwise selecting a cell by mouse selected the whole row.

-------------

PR: https://git.openjdk.org/jfx/pull/839


More information about the openjfx-dev mailing list