RFR: 8328242: Add a log area to the PassFailJFrame [v2]

Alexander Zvegintsev azvegint at openjdk.org
Fri Mar 15 14:48:41 UTC 2024


> Often manual tests have a text area in the instruction window to print feedback from the test to be evaluated by a tester.
> I stumbled across another test that needed this, so I decided to make these changes a standard feature.
> 
> List of changes:
> * The log text area can be added below the `Pass` and `Fail` buttons panel.
> To do this, use the builder methods `logArea()`, `logArea(int rows)`.
> * `PassFailJFrame.log(message)`, `PassFailJFrame.logClear()` and `PassFailJFrame.logSet()` are added to control this text area. (maybe I missed something?)
> * added `invokeOnEDTUncheckedException` for easier use of logging methods
> 
> So typical usage would be like:
> 
>         PassFailJFrame
>                 .builder()
>                 .title("GetBoundsResizeTest Instructions")
>                 .instructions(INSTRUCTIONS)
>                 .rows(20)
>                 .columns(70)
>                 .logArea()
>                 .build()
>                 .awaitAndCheck();
> 
> 
> ----
> 
> //somewhere in event handlers:
> PassFailJFrame.log("Very important message");

Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision:

 - Add logArea placeholder text
 - review comments

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18319/files
  - new: https://git.openjdk.org/jdk/pull/18319/files/a0fc617c..77e5e4a5

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18319&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18319&range=00-01

  Stats: 29 lines in 1 file changed: 7 ins; 10 del; 12 mod
  Patch: https://git.openjdk.org/jdk/pull/18319.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18319/head:pull/18319

PR: https://git.openjdk.org/jdk/pull/18319


More information about the client-libs-dev mailing list