On Wed, 20 Mar 2024 20:25:33 GMT, Alexander Zvegintsev <azveg...@openjdk.org> 
wrote:

>>> we need to add next to Pass/Fail a "Pause Timer" button, that
>> (a) stops the count down
>> (b) changes the Pause Timer to "Resume Timer"
>> ~~(c) disables Pass/Fail until the timer is resumed~~
>> the test will not have to pause or be aware - only the PassFailJFrame 
>> machinery.
>> ~~So the tester can do anything they want except exit the test in the paused 
>> mode.~~
>> 
>> This PR implements everything except the (c).
>> I see nothing wrong with completing the test from the paused state, and it 
>> does not add an extra click.  
>> 
>> 
>> Example screenshots:
>> 
>> ![image](https://github.com/openjdk/jdk/assets/77687766/65d34bf8-1e46-4e68-b39e-a77f257ec3c0)
>> ![image](https://github.com/openjdk/jdk/assets/77687766/3a43e059-2d48-46f3-9d1b-c2ab84fcce37)
>
> Alexander Zvegintsev has updated the pull request incrementally with two 
> additional commits since the last revision:
> 
>  - TimeoutHandler -> TimeoutHandlerPanel
>  - review comments

Marked as reviewed by aivanov (Reviewer).

test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 660:

> 658: 
> 659:             label =  new JLabel("", JLabel.CENTER);
> 660:             button = new JButton(TimeoutHandlerPanel.PAUSE_BUTTON_LABEL);

Suggestion:

            button = new JButton(PAUSE_BUTTON_LABEL);

I believe it can be used directly as in `pauseToggle`.

test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 662:

> 660:             button = new JButton(TimeoutHandlerPanel.PAUSE_BUTTON_LABEL);
> 661: 
> 662:             button.setFocusPainted(false);

I wonder if it's the default focus owner? Should we request focus to `Pass` 
instead?

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

PR Review: https://git.openjdk.org/jdk/pull/18368#pullrequestreview-1951858944
PR Review Comment: https://git.openjdk.org/jdk/pull/18368#discussion_r1533684791
PR Review Comment: https://git.openjdk.org/jdk/pull/18368#discussion_r1533688961

Reply via email to