RFR: 8328242: Add a log area to the PassFailJFrame

Alexander Zvegintsev azvegint at openjdk.org
Fri Mar 15 04:45:56 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");

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

Commit messages:
 - 8328242: Add a log area to the PassFailJFrame

Changes: https://git.openjdk.org/jdk/pull/18319/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18319&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8328242
  Stats: 111 lines in 1 file changed: 106 ins; 0 del; 5 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