Integrated: 8371859: Dialog unnecessarily invokes DialogPane.requestLayout()
Michael Strauß
mstrauss at openjdk.org
Fri Nov 14 20:33:38 UTC 2025
On Thu, 13 Nov 2025 21:24:25 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
> The implementation of `Dialog.dialogPane` adds a `ListChangeListener` to `DialogPane.getButtonTypes()`, and calls `DialogPane.requestLayout()` from the listener.
>
> This is not needed, because the `DialogPane.createButtonBar()` method already specifies that implementers are required to observe changes of `DialogPane.getButtonTypes()`, and relayout the button bar as needed.
>
> I've added a test to verify that changing the button types indeed requests a layout on the `DialogPane`.
This pull request has now been integrated.
Changeset: 310a260c
Author: Michael Strauß <mstrauss at openjdk.org>
URL: https://git.openjdk.org/jfx/commit/310a260cbca5c79763caafc30da07af99bd44399
Stats: 18 lines in 2 files changed: 10 ins; 6 del; 2 mod
8371859: Dialog unnecessarily invokes DialogPane.requestLayout()
Reviewed-by: jhendrikx, angorya, mhanl
-------------
PR: https://git.openjdk.org/jfx/pull/1973
More information about the openjfx-dev
mailing list