RFR: 8235491: Tree/TableView: implementation of isSelected(int) violates contract [v8]
Andy Goryachev
angorya at openjdk.org
Tue Aug 9 18:48:45 UTC 2022
On Tue, 9 Aug 2022 11:57:32 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>>> Aside: there is a general issue with cell selection not updated on columns modification (the selection visual is kept on the same column index without changing selectedCells accordingly - technically due to looping across the visibleLeafCells vs. all leaf columns. Might or might not be what ux requires, but the selectedCells must be in sync with the visuals always).
>>
>> Personally, I feel that any manipulations with the columns structure should clear the existing selection. I would imagine it's such a rare operation, and the "fix" is so easy (clear selection) that it's not worth even creating an issue for - but I could be wrong.
>>
>>> Don't remember if we have it covered in JBS?
>>
>> I did not find a close match. There is JDK-8095010; there is ticket you might be familiar with JDK-8093855; and one possibly related JDK-8091191.
>
>>
>> Personally, I feel that any manipulations with the columns structure should clear the existing selection. I would imagine it's such a rare operation, and the "fix" is so easy (clear selection) that it's not worth even creating an issue for - but I could be wrong.
>>
>
> haha .. are you prepared to get lynched by furious users 😜 Just imagine you selected several cells across the table, then decide to hide an unrelated column (which is not as rare as you assume :) and all your previous selection work is destroyed.
>
>> > Don't remember if we have it covered in JBS?
>>
>> I did not find a close match. There is JDK-8095010; there is ticket you might be familiar with JDK-8093855; and one possibly related JDK-8091191.
>
> none of those seem to be related to modification of columns, so tend to agree with Kevin that we should file a new issue
@kleopatra :
good point! I've tested with swing / JTable, and removing a column seem to deselect the cells in the removed column. I guess this should be the expected behavior - to clear selection in the hidden column(s)? If the app requirements call for preserving selection, this can be done on the app level (store the hidden cell selection and restore once the cells come to view)?
I'll create a separate ticket (TBD).
On another note, it seems the changes impacted/broke cell selection via mouse. Need to investigate.
-------------
PR: https://git.openjdk.org/jfx/pull/839
More information about the openjfx-dev
mailing list