RFR: 8317116: Provide layouts for multiple test UI in PassFailJFrame [v2]
Alexey Ivanov
aivanov at openjdk.org
Fri Sep 27 14:23:38 UTC 2024
On Fri, 27 Sep 2024 14:07:44 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
>> Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add missing parentheses for vertical positioning
>
> test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1405:
>
>> 1403: * Positions the test UI windows in a row to the right of
>> 1404: * the instruction frame. The top of the windows is aligned to
>> 1405: * that of the instruction frame.
>
> Since we are touching this, what are our options for positioning the instruction frame?
>
> The `.position(PassFailJFrame.Position.TOP_LEFT_CORNER)` has no effect now with positionTestUIRightRow:
>
>
> PassFailJFrame.builder()
> .instructions(INSTRUCTIONS)
> .rows(15)
> .columns(30)
> .testUI(() -> WindowCreator.createTestWindows(2))
> .position(PassFailJFrame.Position.TOP_LEFT_CORNER)
> .positionTestUIRightRow()
> .build()
> .awaitAndCheck();
>
>
> Should we provide a way to place instruction frame in arbitrary location on screen?
> It will allow us to provide more flexibility and more advanced layouts without too much effort from a test developer.
If you call `.position(PassFailJFrame.Position.TOP_LEFT_CORNER)` after `.positionTestUIRightRow`, it is respected.
> test/jdk/java/awt/regtesthelpers/WindowLayouts.java line 133:
>
>> 131: public static void bottomOneRowCentered(final List<Window> windows,
>> 132: final PassFailJFrame.InstructionUI instructionUI) {
>> 133: layoutColumn(getScreenCenter().x
>
> Suggestion:
>
> layoutRow(getScreenCenter().x
>
>
> typo.
Let me check… All the samples look good, however, this looks like a typo.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21207#discussion_r1778707886
PR Review Comment: https://git.openjdk.org/jdk/pull/21207#discussion_r1778705954
More information about the client-libs-dev
mailing list