Skip to content

Commit 0c639de

Browse files
author
duke
committed
Backport f0ae90f30c346544e87217ef1832d6a350fe1985
1 parent 9308dec commit 0c639de

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
@@ -1144,6 +1144,29 @@ public Builder testUI(WindowCreator windowCreator) {
11441144
return this;
11451145
}
11461146

1147+
/**
1148+
* Adds an implementation of {@link PositionWindows PositionWindows}
1149+
* which the framework will use to position multiple test UI windows.
1150+
*
1151+
* @param positionWindows an implementation of {@code PositionWindows}
1152+
* to position multiple test UI windows
1153+
* @return this builder
1154+
* @throws IllegalArgumentException if the {@code positionWindows}
1155+
* parameter is {@code null}
1156+
* @throws IllegalStateException if the {@code positionWindows} field
1157+
* is already set
1158+
*/
1159+
public Builder positionTestUI(PositionWindows positionWindows) {
1160+
if (positionWindows == null) {
1161+
throw new IllegalArgumentException("positionWindows parameter can't be null");
1162+
}
1163+
if (this.positionWindows != null) {
1164+
throw new IllegalStateException("PositionWindows is already set");
1165+
}
1166+
this.positionWindows = positionWindows;
1167+
return this;
1168+
}
1169+
11471170
/**
11481171
* Adds a {@code WindowListCreator} which the framework will use
11491172
* to create a list of test UI windows.

0 commit comments

Comments
 (0)