RFR: JDK-8305248: TableView not rendered correctly after column is made visible if fixed cell size is set

Marius Hanl mhanl at openjdk.org
Sat Apr 1 09:51:24 UTC 2023


On Fri, 31 Mar 2023 08:57:20 GMT, Jose Pereda <jpereda at openjdk.org> wrote:

>> The determined `prefWidth` of a `TableCell` could be `0.0` when a `fixedCellSize` is set.
>> This happened because the `TableCell` may not have a skin since it was never added to the scene graph yet.
>> 
>> The fix is to make sure we get the `prefWidth` after the `TableCell` was added to the scene graph.
>> That is also the reason why the problem only happened the first time and never again after (skin is then already created).
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/TableRowSkinTest.java line 251:
> 
>> 249: 
>> 250:     /**
>> 251:      * When we make an invisible column visible we expect the underlying cells to be visible, e.g. as width > 0.
> 
> This only applies to the case of fixed cell size set (this test will fail if you comment out line 256), so maybe you could clarify the comment?

Yes! Will do.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1077#discussion_r1155086332


More information about the openjfx-dev mailing list