|
1 | 1 | /* |
2 | | - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
56 | 56 | import javax.swing.UnsupportedLookAndFeelException; |
57 | 57 | import javax.swing.tree.DefaultMutableTreeNode; |
58 | 58 |
|
59 | | -import sun.swing.MenuItemLayoutHelper; |
60 | | - |
61 | 59 | import static javax.swing.UIManager.getInstalledLookAndFeels; |
62 | 60 |
|
63 | 61 | /** |
64 | 62 | * @test |
65 | 63 | * @key headful |
66 | | - * @bug 8201552 8213843 8213535 |
| 64 | + * @bug 8201552 8213843 8213535 8244400 |
67 | 65 | * @summary Initial layout of the component should use correct graphics config. |
68 | 66 | * It is checked by SwingUtilities.updateComponentTreeUI(), if layout |
69 | 67 | * was correct the call to updateComponentTreeUI() will be no-op. |
70 | | - * @modules java.desktop/sun.swing |
71 | 68 | * @compile -encoding utf-8 StalePreferredSize.java |
72 | | - * @run main/othervm/timeout=400 StalePreferredSize |
73 | | - * @run main/othervm/timeout=400 -Dsun.java2d.uiScale=1 StalePreferredSize |
74 | | - * @run main/othervm/timeout=400 -Dsun.java2d.uiScale=2.25 StalePreferredSize |
| 69 | + * @run main/othervm/timeout=600 StalePreferredSize |
| 70 | + * @run main/othervm/timeout=600 -Dsun.java2d.uiScale=1 StalePreferredSize |
| 71 | + * @run main/othervm/timeout=600 -Dsun.java2d.uiScale=2.25 StalePreferredSize |
75 | 72 | */ |
76 | 73 | public final class StalePreferredSize { |
77 | 74 |
|
@@ -182,10 +179,6 @@ static void checkComponent(Callable<JComponent> creator) throws Exception { |
182 | 179 | int y = frame.getY() + 200; |
183 | 180 | PopupFactory factory = PopupFactory.getSharedInstance(); |
184 | 181 | popup = factory.getPopup(frame, component, x, y); |
185 | | - if (component instanceof JMenuItem) { |
186 | | - // TODO JDK-8244400 |
187 | | - MenuItemLayoutHelper.clearUsedParentClientProperties((JMenuItem)component); |
188 | | - } |
189 | 182 | } else { |
190 | 183 | frame.add(new JScrollPane(component)); |
191 | 184 | } |
|
0 commit comments