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

Andy Goryachev angorya at openjdk.org
Thu Jul 21 21:10:10 UTC 2022


> …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 incrementally with two additional commits since the last revision:

 - 8235491: whitespace
 - 8235491: javadoc

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

Changes:
  - all: https://git.openjdk.org/jfx/pull/839/files
  - new: https://git.openjdk.org/jfx/pull/839/files/82f0db72..2b76eddb

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=839&range=01
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=839&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jfx/pull/839.diff
  Fetch: git fetch https://git.openjdk.org/jfx pull/839/head:pull/839

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


More information about the openjfx-dev mailing list