RFR: 8328402: Implement pausing functionality for the PassFailJFrame [v2]

Alexander Zvegintsev azvegint at openjdk.org
Wed Mar 20 20:32:21 UTC 2024


On Wed, 20 Mar 2024 17:58:59 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> I would place the Pause button into the timeout panel at the top. Yet the button is larger than the label. The font may be reduced, a symbol '⏸' (U+23F8) and '⏵' (U+23F5) could be used (see [Media control symbols](https://en.wikipedia.org/wiki/Media_control_symbols)), or an image icon with a tooltip.

Unfortunately `a symbol '⏸' (U+23F8) and '⏵' (U+23F5)` doesn't work on Linux for me:
![image](https://github.com/openjdk/jdk/assets/77687766/b7ad68e2-ad58-4ca4-9672-d529cb8866eb)
![image](https://github.com/openjdk/jdk/assets/77687766/d97bbe8c-ed44-4bb8-935e-61015e833d7b)

So the text is used (icons can be added separately):
![image](https://github.com/openjdk/jdk/assets/77687766/24ca05b4-79ac-46f6-8958-576114522d48)
![image](https://github.com/openjdk/jdk/assets/77687766/a6420488-7071-49e4-908e-84d1e18c9261)
![image](https://github.com/openjdk/jdk/assets/77687766/fb2d1b02-4b15-4e49-8af4-c6a28398ebef)
![image](https://github.com/openjdk/jdk/assets/77687766/542ec12d-7121-498e-aba9-fde8d8dda77a)
![image](https://github.com/openjdk/jdk/assets/77687766/5ebfea75-fade-4bc6-91b3-e212c0c17cf6)
![image](https://github.com/openjdk/jdk/assets/77687766/7f3ccd0b-9492-4e60-bbd1-8bd32e002864)

> test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 704:
> 
>> 702:             } else {
>> 703:                 label.setText(label.getText().replace(PAUSED_LABEL_SUFFIX, ""));
>> 704:                 endTime = System.currentTimeMillis() + pauseTimeLeft;
> 
> I'd rather call `updateTime(pauseTimeLeft)` here instead of editing the text.
> 
> Suggestion:
> 
>                 endTime = System.currentTimeMillis() + pauseTimeLeft;
>                 updateTime(pauseTimeLeft);

Yes, this way is better.

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

PR Comment: https://git.openjdk.org/jdk/pull/18368#issuecomment-2010561001
PR Review Comment: https://git.openjdk.org/jdk/pull/18368#discussion_r1532807064


More information about the client-libs-dev mailing list