Integrated: 8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize
Marius Hanl
mhanl at openjdk.org
Thu Dec 8 19:15:15 UTC 2022
On Tue, 28 Jun 2022 17:06:39 GMT, Marius Hanl <mhanl at openjdk.org> wrote:
> Initialize the `(Tree)TableView` when creating the measure row.
> This will guarantee, that we can access the `(Tree)TableView` in the `(Tree)TableRowSkin`, which is currently only null during the autosizing (It is always set otherwise).
>
> With this change, a NPE is happening as the `(Tree)TableRow` currently assumes, that there must be a `VirtualFlow` somewhere in the scene (parent). I guard against this now.
> I remembered, that there is a ticket for the above behaviour here: https://bugs.openjdk.org/browse/JDK-8274065
>
> Finally, the `(Tree)TableRow` must be removed after the autosizing and the index must be set to `-1` (as for the cell) so that e.g. `cancelEdit()` is not triggered. Some tests catched that (see `test_rt_31015`). This did not happen before as the table row setup was not complete, but now the row does know the table and therefore installs some listener on it in order to fire corresponding edit events.
This pull request has now been integrated.
Changeset: c900a00c
Author: Marius Hanl <mhanl at openjdk.org>
URL: https://git.openjdk.org/jfx/commit/c900a00c7527f290e8047792fef4b45002930892
Stats: 109 lines in 8 files changed: 96 ins; 5 del; 8 mod
8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize
8292009: Wrong text artifacts in table header
Reviewed-by: kcr, angorya
-------------
PR: https://git.openjdk.org/jfx/pull/805
More information about the openjfx-dev
mailing list