mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8341037: Use standard layouts in DefaultFrameIconTest.java and MenuCrash.java
Backport-of: c43202baf6
This commit is contained in:
committed by
Sergey Shelomentsev
parent
f346730792
commit
9374aaa014
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user