Skip to content

Commit

Permalink
8340210: Add positionTestUI() to PassFailJFrame.Builder
Browse files Browse the repository at this point in the history
Backport-of: f0ae90f30c346544e87217ef1832d6a350fe1985
  • Loading branch information
aivanov-jdk committed Sep 27, 2024
1 parent b8d01b0 commit faa89f4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/jdk/java/awt/regtesthelpers/PassFailJFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,29 @@ public Builder testUI(WindowCreator windowCreator) {
return this;
}

/**
* Adds an implementation of {@link PositionWindows PositionWindows}
* which the framework will use to position multiple test UI windows.
*
* @param positionWindows an implementation of {@code PositionWindows}
* to position multiple test UI windows
* @return this builder
* @throws IllegalArgumentException if the {@code positionWindows}
* parameter is {@code null}
* @throws IllegalStateException if the {@code positionWindows} field
* is already set
*/
public Builder positionTestUI(PositionWindows positionWindows) {
if (positionWindows == null) {
throw new IllegalArgumentException("positionWindows parameter can't be null");
}
if (this.positionWindows != null) {
throw new IllegalStateException("PositionWindows is already set");
}
this.positionWindows = positionWindows;
return this;
}

/**
* Adds a {@code WindowListCreator} which the framework will use
* to create a list of test UI windows.
Expand Down

1 comment on commit faa89f4

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.