RFR: 8235491: Tree/TableView: implementation of isSelected(int) violates contract [v4]
Ajit Ghaisas
aghaisas at openjdk.org
Thu Jul 28 10:16:46 UTC 2022
On Wed, 27 Jul 2022 21:36:10 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> …ontract
>>
>> 1. reword SelectionModel.isSelected(int) javadoc, removing incorrect statement "Is functionally equivalent to calling <code>getSelectedIndices().contains(index)</code>."
>> 2. reimplement TableView.TableViewSelectionModel.isSelected(int) method to return true when at least one cell in *any* column is selected on the given row (was: *all* columns)
>> 3. change selectRowWhenInSingleCellSelectionMode() and selectRowWhenInSingleCellSelectionMode2() in TableViewSelectionModelImplTest to reflect new reality.
>>
>> NOTE: proposed change alters semantics of isSelected(int) method (in the right direction, in my opinion).
>
> 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 seven additional commits since the last revision:
>
> - 8235491: tree table view
> - Merge remote-tracking branch 'origin/master' into 8235491.isselected
> - 8235491: review comments
> - 8235491: whitespace
> - 8235491: javadoc
> - 8235491: 2022
> - 8235491: Tree/TableView: implementation of isSelected(int) violates contract
> 1. Would you suggest possible clarification please?
As you have mentioned the impact of this change & using alternate API in "Compatibility Impact" section of the CSR - we are good! No additional change is required.
One minor issue - the description of this PR starts with `...ontract` - looks like some typo.
-------------
PR: https://git.openjdk.org/jfx/pull/839
More information about the openjfx-dev
mailing list