Integrated: 8327924: Simplify TrayIconScalingTest.java
Alexey Ivanov
aivanov at openjdk.org
Thu Mar 21 16:05:28 UTC 2024
On Tue, 12 Mar 2024 08:33:41 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> This is to simplify `TrayIconScalingTest.java`.
>
> 1. Rename `createAndShowGUI` to `createAndShowTrayIcon` which is more specific.
> 2. Move creating tray icon to the top.
> 3. Streamline PassFailJFrame with the chained calls, including `awaitAndCheck`.
> 4. Ensure tray is not null before removing the icon.
> 5. Pass AWTException as the cause in the wrapped exception.
>
> Previously, before the builder pattern was introduced, `PassFailJFrame.positionTestWindow` had had to be called to show the instructions UI. It's not required any more. Additionally, it has the effect of moving the instruction frame to the left, which doesn't look good and sometimes results in positioning the instructions outside of the screen bounds if the screen resolution is low.
>
> With the builder pattern, the call to the `build` method shows all the registered windows on the screen, including the instruction frame. Since there's no secondary UI, the instructions remain in the centre of the screen.
This pull request has now been integrated.
Changeset: 1496b5de
Author: Alexey Ivanov <aivanov at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/1496b5de9004c6a9e43ead5f6e9e88362028a7cc
Stats: 27 lines in 1 file changed: 10 ins; 11 del; 6 mod
8327924: Simplify TrayIconScalingTest.java
Reviewed-by: honkar, prr
-------------
PR: https://git.openjdk.org/jdk/pull/18224
More information about the client-libs-dev
mailing list