On Fri, 5 Mar 2021 13:31:38 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Thanks for the additional fixes. I'll change the title of the JBS bug to 
>> "CSS pseudo classes missing by default for some controls". Can you change 
>> the PR title to match?
>> 
>> The changes to `ListView` and `TableView` look correct to me.
>> 
>> In looking more closely, I'm not sure the changes  to `TreeCell` or 
>> `TreeTableRow` are correct. When a `TreeCell` or `TreeTableRow` is 
>> constructed, the item is null. Unless I'm missing something, it looks like a 
>> cell/row with a null item shouldn't have a pseudo-class state set.
>
>> The changes to ListView and TableView look correct to me.
> 
> And also `TreeTableView`.

I guess that depends on whether a `TreeCell` or `TreeTableRow` that is not 
expanded should be considered collapsed.

Unless there are compelling reasons to have cells that are neither expanded nor 
collapsed, I think it is sensible to default to treating non-existing items as 
collapsed.

Currently, once `:expanded` or `:collapsed` has been set, it will not be 
removed even if the item is set to `null`. This should probably be changed to 
either:
1. remove any pseudoclass when the item is set to `null`, or
2. set the `:collapsed` pseudoclass and remove the `:expanded` pseudoclass when 
the item is set to null.

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

PR: https://git.openjdk.java.net/jfx/pull/413

Reply via email to