8341037: Use standard layouts in DefaultFrameIconTest.java and MenuCrash.java
Reviewed-by: azvegint, prr
This commit is contained in:
parent
76283dd270
commit
c43202baf6
@ -50,21 +50,11 @@ public class DefaultFrameIconTest {
|
||||
.instructions(INSTRUCTIONS)
|
||||
.columns(45)
|
||||
.testUI(DefaultFrameIconTest::createAndShowUI)
|
||||
.positionTestUI(DefaultFrameIconTest::positionTestWindows)
|
||||
.positionTestUIRightRow()
|
||||
.build()
|
||||
.awaitAndCheck();
|
||||
}
|
||||
|
||||
private static void positionTestWindows(List<? extends Window> testWindows,
|
||||
PassFailJFrame.InstructionUI instructionUI) {
|
||||
int gap = 5;
|
||||
int x = instructionUI.getLocation().x + instructionUI.getSize().width + gap;
|
||||
for (Window w : testWindows) {
|
||||
w.setLocation(x, instructionUI.getLocation().y);
|
||||
x += w.getWidth() + gap;
|
||||
}
|
||||
}
|
||||
|
||||
private static List<Window> createAndShowUI() {
|
||||
Frame testFrame = new Frame("Frame DefaultFrameIconTest");
|
||||
Dialog testDialog = new Dialog(testFrame, "Dialog DefaultFrameIconTest");
|
||||
|
@ -62,7 +62,7 @@ public class MenuCrash {
|
||||
.instructions(INSTRUCTIONS)
|
||||
.columns(45)
|
||||
.testUI(MenuCrash::createAndShowUI)
|
||||
.positionTestUI(MenuCrash::positionTestWindows)
|
||||
.positionTestUIRightRow()
|
||||
.build()
|
||||
.awaitAndCheck();
|
||||
}
|
||||
@ -81,16 +81,6 @@ public class MenuCrash {
|
||||
return List.of(frame1, frame2);
|
||||
}
|
||||
|
||||
private static void positionTestWindows(List<? extends Window> testWindows,
|
||||
PassFailJFrame.InstructionUI instructionUI) {
|
||||
int gap = 5;
|
||||
int x = instructionUI.getLocation().x + instructionUI.getSize().width + gap;
|
||||
for (Window w : testWindows) {
|
||||
w.setLocation(x, instructionUI.getLocation().y);
|
||||
x += w.getWidth() + gap;
|
||||
}
|
||||
}
|
||||
|
||||
static class MenuFrame extends Frame {
|
||||
private final TextField field;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user