Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit faa89f4

Browse files
committed
8340210: Add positionTestUI() to PassFailJFrame.Builder
Backport-of: f0ae90f
1 parent b8d01b0 commit faa89f4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/jdk/java/awt/regtesthelpers/PassFailJFrame.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,29 @@ public Builder testUI(WindowCreator windowCreator) {
12841284
return this;
12851285
}
12861286

1287+
/**
1288+
* Adds an implementation of {@link PositionWindows PositionWindows}
1289+
* which the framework will use to position multiple test UI windows.
1290+
*
1291+
* @param positionWindows an implementation of {@code PositionWindows}
1292+
* to position multiple test UI windows
1293+
* @return this builder
1294+
* @throws IllegalArgumentException if the {@code positionWindows}
1295+
* parameter is {@code null}
1296+
* @throws IllegalStateException if the {@code positionWindows} field
1297+
* is already set
1298+
*/
1299+
public Builder positionTestUI(PositionWindows positionWindows) {
1300+
if (positionWindows == null) {
1301+
throw new IllegalArgumentException("positionWindows parameter can't be null");
1302+
}
1303+
if (this.positionWindows != null) {
1304+
throw new IllegalStateException("PositionWindows is already set");
1305+
}
1306+
this.positionWindows = positionWindows;
1307+
return this;
1308+
}
1309+
12871310
/**
12881311
* Adds a {@code WindowListCreator} which the framework will use
12891312
* to create a list of test UI windows.

0 commit comments

Comments
 (0)