Skip to content

Commit f0ae90f

Browse files
Harshitha Onkaraivanov-jdk
Harshitha Onkar
andcommittedSep 17, 2024
8340210: Add positionTestUI() to PassFailJFrame.Builder
Co-authored-by: Alexey Ivanov <aivanov@openjdk.org> Reviewed-by: aivanov, azvegint
1 parent eabfc6e commit f0ae90f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
 

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

+23
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,29 @@ public Builder testUI(WindowCreator windowCreator) {
12501250
return this;
12511251
}
12521252

1253+
/**
1254+
* Adds an implementation of {@link PositionWindows PositionWindows}
1255+
* which the framework will use to position multiple test UI windows.
1256+
*
1257+
* @param positionWindows an implementation of {@code PositionWindows}
1258+
* to position multiple test UI windows
1259+
* @return this builder
1260+
* @throws IllegalArgumentException if the {@code positionWindows}
1261+
* parameter is {@code null}
1262+
* @throws IllegalStateException if the {@code positionWindows} field
1263+
* is already set
1264+
*/
1265+
public Builder positionTestUI(PositionWindows positionWindows) {
1266+
if (positionWindows == null) {
1267+
throw new IllegalArgumentException("positionWindows parameter can't be null");
1268+
}
1269+
if (this.positionWindows != null) {
1270+
throw new IllegalStateException("PositionWindows is already set");
1271+
}
1272+
this.positionWindows = positionWindows;
1273+
return this;
1274+
}
1275+
12531276
/**
12541277
* Adds a {@code WindowListCreator} which the framework will use
12551278
* to create a list of test UI windows.

0 commit comments

Comments
 (0)
Please sign in to comment.