author | anthony |
Fri, 20 Feb 2009 17:34:16 +0300 | |
changeset 2459 | 08f3416ff334 |
parent 2453 | 35e5fab82613 |
child 2464 | 3c6755bdc55f |
permissions | -rw-r--r-- |
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
1 |
/* |
2451 | 2 |
* Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. |
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
4 |
* |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Sun designates this |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
9 |
* by Sun in the LICENSE file that accompanied this code. |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
10 |
* |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
15 |
* accompanied this code). |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
16 |
* |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
20 |
* |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
21 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
22 |
* CA 95054 USA or visit www.sun.com if you need additional information or |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
23 |
* have any questions. |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
24 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
25 |
|
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
26 |
package sun.awt; |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
27 |
|
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
28 |
import java.awt.*; |
2451 | 29 |
import java.awt.geom.Point2D; |
30 |
import java.awt.image.BufferedImage; |
|
31 |
||
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
32 |
import sun.misc.Unsafe; |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
33 |
|
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
34 |
/** The AWTAccessor utility class. |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
35 |
* The main purpose of this class is to enable accessing |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
36 |
* private and package-private fields of classes from |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
37 |
* different classes/packages. See sun.misc.SharedSecretes |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
38 |
* for another example. |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
39 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
40 |
public final class AWTAccessor { |
2451 | 41 |
|
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
42 |
private static final Unsafe unsafe = Unsafe.getUnsafe(); |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
43 |
|
2451 | 44 |
/* |
45 |
* We don't need any objects of this class. |
|
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
46 |
* It's rather a collection of static methods |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
47 |
* and interfaces. |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
48 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
49 |
private AWTAccessor() { |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
50 |
} |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
51 |
|
2451 | 52 |
/* |
53 |
* An interface of accessor for the java.awt.Component class. |
|
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
54 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
55 |
public interface ComponentAccessor { |
2451 | 56 |
/* |
57 |
* Sets whether the native background erase for a component |
|
58 |
* has been disabled via SunToolkit.disableBackgroundErase(). |
|
59 |
*/ |
|
60 |
void setBackgroundEraseDisabled(Component comp, boolean disabled); |
|
61 |
/* |
|
62 |
* Indicates whether the native background erase for a |
|
63 |
* component has been disabled via |
|
64 |
* SunToolkit.disableBackgroundErase(). |
|
65 |
*/ |
|
66 |
boolean getBackgroundEraseDisabled(Component comp); |
|
67 |
/* |
|
68 |
* |
|
69 |
* Gets the bounds of this component in the form of a |
|
70 |
* <code>Rectangle</code> object. The bounds specify this |
|
71 |
* component's width, height, and location relative to |
|
72 |
* its parent. |
|
73 |
*/ |
|
74 |
Rectangle getBounds(Component comp); |
|
75 |
/* |
|
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
76 |
* Sets the shape of a lw component to cut out from hw components. |
2451 | 77 |
* |
78 |
* See 6797587, 6776743, 6768307, and 6768332 for details |
|
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
79 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
80 |
void setMixingCutoutShape(Component comp, Shape shape); |
2459
08f3416ff334
6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents:
2453
diff
changeset
|
81 |
|
08f3416ff334
6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents:
2453
diff
changeset
|
82 |
/** |
08f3416ff334
6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents:
2453
diff
changeset
|
83 |
* Sets GraphicsConfiguration value for the component. |
08f3416ff334
6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents:
2453
diff
changeset
|
84 |
*/ |
08f3416ff334
6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents:
2453
diff
changeset
|
85 |
void setGraphicsConfiguration(Component comp, GraphicsConfiguration gc); |
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
86 |
} |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
87 |
|
2451 | 88 |
/* |
89 |
* An interface of accessor for java.awt.Window class. |
|
90 |
*/ |
|
91 |
public interface WindowAccessor { |
|
92 |
/* |
|
93 |
* Get opacity level of the given window. |
|
94 |
*/ |
|
95 |
float getOpacity(Window window); |
|
96 |
/* |
|
97 |
* Set opacity level to the given window. |
|
98 |
*/ |
|
99 |
void setOpacity(Window window, float opacity); |
|
100 |
/* |
|
101 |
* Get a shape assigned to the given window. |
|
102 |
*/ |
|
103 |
Shape getShape(Window window); |
|
104 |
/* |
|
105 |
* Set a shape to the given window. |
|
106 |
*/ |
|
107 |
void setShape(Window window, Shape shape); |
|
108 |
/* |
|
109 |
* Identify whether the given window is opaque (true) |
|
110 |
* or translucent (false). |
|
111 |
*/ |
|
112 |
boolean isOpaque(Window window); |
|
113 |
/* |
|
114 |
* Set the opaque preoperty to the given window. |
|
115 |
*/ |
|
116 |
void setOpaque(Window window, boolean isOpaque); |
|
117 |
/* |
|
118 |
* Update the image of a non-opaque (translucent) window. |
|
119 |
*/ |
|
120 |
void updateWindow(Window window, BufferedImage backBuffer); |
|
121 |
} |
|
122 |
||
123 |
/* |
|
124 |
* An accessor for the AWTEvent class. |
|
125 |
*/ |
|
126 |
public interface AWTEventAccessor { |
|
127 |
/* |
|
128 |
* |
|
129 |
* Sets the flag on this AWTEvent indicating that it was |
|
130 |
* generated by the system. |
|
131 |
*/ |
|
132 |
void setSystemGenerated(AWTEvent ev); |
|
133 |
/* |
|
134 |
* |
|
135 |
* Indicates whether this AWTEvent was generated by the system. |
|
136 |
*/ |
|
137 |
boolean isSystemGenerated(AWTEvent ev); |
|
138 |
} |
|
139 |
||
140 |
/* |
|
2453
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
141 |
* An accessor for the java.awt.Frame class. |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
142 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
143 |
public interface FrameAccessor { |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
144 |
/* |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
145 |
* Sets the state of this frame. |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
146 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
147 |
void setExtendedState(Frame frame, int state); |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
148 |
/* |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
149 |
* Gets the state of this frame. |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
150 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
151 |
int getExtendedState(Frame frame); |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
152 |
} |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
153 |
|
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
154 |
/* |
2451 | 155 |
* The java.awt.Component class accessor object. |
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
156 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
157 |
private static ComponentAccessor componentAccessor; |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
158 |
|
2451 | 159 |
/* |
160 |
* The java.awt.Window class accessor object. |
|
161 |
*/ |
|
162 |
private static WindowAccessor windowAccessor; |
|
163 |
||
164 |
/* |
|
165 |
* The java.awt.AWTEvent class accessor object. |
|
166 |
*/ |
|
167 |
private static AWTEventAccessor awtEventAccessor; |
|
168 |
||
169 |
/* |
|
2453
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
170 |
* The java.awt.Frame class accessor object. |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
171 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
172 |
private static FrameAccessor frameAccessor; |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
173 |
|
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
174 |
/* |
2451 | 175 |
* Set an accessor object for the java.awt.Component class. |
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
176 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
177 |
public static void setComponentAccessor(ComponentAccessor ca) { |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
178 |
componentAccessor = ca; |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
179 |
} |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
180 |
|
2451 | 181 |
/* |
182 |
* Retrieve the accessor object for the java.awt.Window class. |
|
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
183 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
184 |
public static ComponentAccessor getComponentAccessor() { |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
185 |
if (componentAccessor == null) { |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
186 |
unsafe.ensureClassInitialized(Component.class); |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
187 |
} |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
188 |
|
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
189 |
return componentAccessor; |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
190 |
} |
2451 | 191 |
|
192 |
/* |
|
193 |
* Set an accessor object for the java.awt.Window class. |
|
194 |
*/ |
|
195 |
public static void setWindowAccessor(WindowAccessor wa) { |
|
196 |
windowAccessor = wa; |
|
197 |
} |
|
198 |
||
199 |
/* |
|
200 |
* Retrieve the accessor object for the java.awt.Window class. |
|
201 |
*/ |
|
202 |
public static WindowAccessor getWindowAccessor() { |
|
203 |
if (windowAccessor == null) { |
|
204 |
unsafe.ensureClassInitialized(Window.class); |
|
205 |
} |
|
206 |
return windowAccessor; |
|
207 |
} |
|
208 |
||
209 |
/* |
|
210 |
* Set an accessor object for the java.awt.AWTEvent class. |
|
211 |
*/ |
|
212 |
public static void setAWTEventAccessor(AWTEventAccessor aea) { |
|
213 |
awtEventAccessor = aea; |
|
214 |
} |
|
215 |
||
216 |
/* |
|
217 |
* Retrieve the accessor object for the java.awt.AWTEvent class. |
|
218 |
*/ |
|
219 |
public static AWTEventAccessor getAWTEventAccessor() { |
|
220 |
return awtEventAccessor; |
|
221 |
} |
|
2453
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
222 |
|
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
223 |
/* |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
224 |
* Set an accessor object for the java.awt.Frame class. |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
225 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
226 |
public static void setFrameAccessor(FrameAccessor fa) { |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
227 |
frameAccessor = fa; |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
228 |
} |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
229 |
|
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
230 |
/* |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
231 |
* Retrieve the accessor object for the java.awt.Frame class. |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
232 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
233 |
public static FrameAccessor getFrameAccessor() { |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
234 |
if (frameAccessor == null) { |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
235 |
unsafe.ensureClassInitialized(Frame.class); |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
236 |
} |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
237 |
return frameAccessor; |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
238 |
} |
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
239 |
} |