author | juh |
Tue, 25 Jun 2013 14:41:46 -0700 | |
changeset 18552 | 005e115dc6ee |
parent 5506 | 202f599c92aa |
child 27764 | 4e79ff3e0602 |
permissions | -rw-r--r-- |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
1 |
/* |
5506 | 2 |
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
4 |
* |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
8 |
* |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
13 |
* accompanied this code). |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
14 |
* |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
18 |
* |
5506 | 19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
22 |
*/ |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
23 |
|
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
24 |
import sun.awt.SunToolkit; |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
25 |
import java.awt.Toolkit; |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
26 |
import java.lang.reflect.InvocationTargetException; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
27 |
import java.lang.reflect.Method; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
28 |
import java.lang.reflect.Modifier; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
29 |
import java.util.Comparator; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
30 |
import java.util.Iterator; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
31 |
import java.util.Set; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
32 |
import java.util.TreeSet; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
33 |
import javax.swing.JFrame; |
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
34 |
import javax.swing.SwingUtilities; |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
35 |
|
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
36 |
/** |
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
37 |
* SwingTest is a utility class for writing regression tests |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
38 |
* that require interacting with the UI. |
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
39 |
* It uses reflection to invoke all public methods without parameters. |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
40 |
* All static methods are starting on the current thread. |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
41 |
* Other methods including constructor are starting on the EDT. |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
42 |
* Between each method invocation all pending events are processed. |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
43 |
* The methods are sorted by name and invoked in that order. |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
44 |
* Failure of the test is signaled by any method throwing an exception. |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
45 |
* If no methods throw an exception the test is assumed to have passed. |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
46 |
* |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
47 |
* @author Sergey A. Malenkov |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
48 |
*/ |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
49 |
final class SwingTest implements Runnable { |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
50 |
|
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
51 |
private static final int WIDTH = 640; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
52 |
private static final int HEIGHT = 480; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
53 |
|
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
54 |
public static void start(Class<?> type) throws Throwable { |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
55 |
new SwingTest(type).start(); |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
56 |
} |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
57 |
|
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
58 |
private final Class<?> type; |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
59 |
private final Iterator<Method> methods; |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
60 |
|
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
61 |
private JFrame frame; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
62 |
private Object object; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
63 |
private Method method; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
64 |
private Throwable error; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
65 |
|
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
66 |
private SwingTest(Class<?> type) { |
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
67 |
Set<Method> methods = new TreeSet<Method>(new Comparator<Method>() { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
68 |
public int compare(Method first, Method second) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
69 |
return first.getName().compareTo(second.getName()); |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
70 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
71 |
}); |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
72 |
for (Method method : type.getMethods()) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
73 |
if (method.getDeclaringClass().equals(type)) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
74 |
if (method.getReturnType().equals(void.class)) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
75 |
if (0 == method.getParameterTypes().length) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
76 |
methods.add(method); |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
77 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
78 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
79 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
80 |
} |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
81 |
this.type = type; |
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
82 |
this.methods = methods.iterator(); |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
83 |
} |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
84 |
|
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
85 |
public void run() { |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
86 |
try { |
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
87 |
if (this.object == null) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
88 |
System.out.println(this.type); |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
89 |
this.frame = new JFrame(this.type.getSimpleName()); |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
90 |
this.frame.setSize(WIDTH, HEIGHT); |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
91 |
this.frame.setLocationRelativeTo(null); |
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
92 |
this.object = this.type.getConstructor(this.frame.getClass()).newInstance(this.frame); |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
93 |
this.frame.setVisible(true); |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
94 |
} |
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
95 |
else if (this.method != null) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
96 |
System.out.println(this.method); |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
97 |
this.method.invoke(this.object); |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
98 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
99 |
else { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
100 |
System.out.println((this.error == null) ? "PASSED" : "FAILED"); // NON-NLS: debug |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
101 |
this.frame.dispose(); |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
102 |
this.frame = null; |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
103 |
} |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
104 |
} |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
105 |
catch (NoSuchMethodException exception) { |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
106 |
this.error = exception; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
107 |
} |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
108 |
catch (SecurityException exception) { |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
109 |
this.error = exception; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
110 |
} |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
111 |
catch (IllegalAccessException exception) { |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
112 |
this.error = exception; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
113 |
} |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
114 |
catch (IllegalArgumentException exception) { |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
115 |
this.error = exception; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
116 |
} |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
117 |
catch (InstantiationException exception) { |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
118 |
this.error = exception; |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
119 |
} |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
120 |
catch (InvocationTargetException exception) { |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
121 |
this.error = exception.getTargetException(); |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
122 |
} |
3502
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
123 |
System.out.flush(); |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
124 |
this.method = this.methods.hasNext() && (this.error == null) |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
125 |
? this.methods.next() |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
126 |
: null; |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
127 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
128 |
|
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
129 |
private void start() throws Throwable { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
130 |
do { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
131 |
if ((this.method != null) && Modifier.isStatic(this.method.getModifiers())) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
132 |
run(); // invoke static method on the current thread |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
133 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
134 |
else { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
135 |
SwingUtilities.invokeLater(this); // invoke on the event dispatch thread |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
136 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
137 |
Toolkit tk = Toolkit.getDefaultToolkit(); |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
138 |
if (tk instanceof SunToolkit) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
139 |
SunToolkit stk = (SunToolkit) tk; |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
140 |
stk.realSync(); // wait until done |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
141 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
142 |
} |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
143 |
while (this.frame != null); |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
144 |
if (this.error != null) { |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
145 |
throw this.error; |
821e773cae60
6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents:
3350
diff
changeset
|
146 |
} |
3350
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
147 |
} |
100ac73bfe6e
6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff
changeset
|
148 |
} |