author | dcherepanov |
Fri, 12 Feb 2010 19:58:10 +0300 | |
changeset 4913 | 9b3caa50afcf |
parent 4371 | dc9dcb8b0ae7 |
child 5506 | 202f599c92aa |
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; |
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
33 |
import java.awt.peer.ComponentPeer; |
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
34 |
|
2464
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
35 |
/** |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
36 |
* The AWTAccessor utility class. |
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
37 |
* 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
|
38 |
* 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
|
39 |
* different classes/packages. See sun.misc.SharedSecretes |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
40 |
* for another example. |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
41 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
42 |
public final class AWTAccessor { |
2451 | 43 |
|
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
44 |
private static final Unsafe unsafe = Unsafe.getUnsafe(); |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
45 |
|
2451 | 46 |
/* |
47 |
* 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
|
48 |
* 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
|
49 |
* and interfaces. |
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 |
private AWTAccessor() { |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
52 |
} |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
53 |
|
2451 | 54 |
/* |
55 |
* 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
|
56 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
57 |
public interface ComponentAccessor { |
2451 | 58 |
/* |
59 |
* Sets whether the native background erase for a component |
|
60 |
* has been disabled via SunToolkit.disableBackgroundErase(). |
|
61 |
*/ |
|
62 |
void setBackgroundEraseDisabled(Component comp, boolean disabled); |
|
63 |
/* |
|
64 |
* Indicates whether the native background erase for a |
|
65 |
* component has been disabled via |
|
66 |
* SunToolkit.disableBackgroundErase(). |
|
67 |
*/ |
|
68 |
boolean getBackgroundEraseDisabled(Component comp); |
|
69 |
/* |
|
70 |
* |
|
71 |
* Gets the bounds of this component in the form of a |
|
72 |
* <code>Rectangle</code> object. The bounds specify this |
|
73 |
* component's width, height, and location relative to |
|
74 |
* its parent. |
|
75 |
*/ |
|
76 |
Rectangle getBounds(Component comp); |
|
77 |
/* |
|
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
78 |
* Sets the shape of a lw component to cut out from hw components. |
2451 | 79 |
* |
80 |
* 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
|
81 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
82 |
void setMixingCutoutShape(Component comp, Shape shape); |
2459
08f3416ff334
6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents:
2453
diff
changeset
|
83 |
|
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 |
* Sets GraphicsConfiguration value for the component. |
08f3416ff334
6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents:
2453
diff
changeset
|
86 |
*/ |
08f3416ff334
6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents:
2453
diff
changeset
|
87 |
void setGraphicsConfiguration(Component comp, GraphicsConfiguration gc); |
2464
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
88 |
/* |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
89 |
* Requests focus to the component. |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
90 |
*/ |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
91 |
boolean requestFocus(Component comp, CausedFocusEvent.Cause cause); |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
92 |
/* |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
93 |
* Determines if the component can gain focus. |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
94 |
*/ |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
95 |
boolean canBeFocusOwner(Component comp); |
2472
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
96 |
|
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
97 |
/** |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
98 |
* Returns whether the component is visible without invoking |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
99 |
* any client code. |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
100 |
*/ |
4371
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
101 |
boolean isVisible(Component comp); |
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
102 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
103 |
/** |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
104 |
* Sets the RequestFocusController. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
105 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
106 |
void setRequestFocusController(RequestFocusController requestController); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
107 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
108 |
/** |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
109 |
* Returns the appContext of the component. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
110 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
111 |
AppContext getAppContext(Component comp); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
112 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
113 |
/** |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
114 |
* Sets the appContext of the component. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
115 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
116 |
void setAppContext(Component comp, AppContext appContext); |
4371
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
117 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
118 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
119 |
* Returns the parent of the component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
120 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
121 |
Container getParent(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
122 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
123 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
124 |
* Sets the parent of the component to the specified parent. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
125 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
126 |
void setParent(Component comp, Container parent); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
127 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
128 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
129 |
* Resizes the component to the specified width and height. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
130 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
131 |
void setSize(Component comp, int width, int height); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
132 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
133 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
134 |
* Returns the location of the component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
135 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
136 |
Point getLocation(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
137 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
138 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
139 |
* Moves the component to the new location. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
140 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
141 |
void setLocation(Component comp, int x, int y); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
142 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
143 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
144 |
* Determines whether this component is enabled. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
145 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
146 |
boolean isEnabled(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
147 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
148 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
149 |
* Determines whether this component is displayable. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
150 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
151 |
boolean isDisplayable(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
152 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
153 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
154 |
* Gets the cursor set in the component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
155 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
156 |
Cursor getCursor(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
157 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
158 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
159 |
* Returns the peer of the component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
160 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
161 |
ComponentPeer getPeer(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
162 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
163 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
164 |
* Sets the peer of the component to the specified peer. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
165 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
166 |
void setPeer(Component comp, ComponentPeer peer); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
167 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
168 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
169 |
* Determines whether this component is lightweight. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
170 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
171 |
boolean isLightweight(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
172 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
173 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
174 |
* Returns whether or not paint messages received from |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
175 |
* the operating system should be ignored. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
176 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
177 |
boolean getIgnoreRepaint(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
178 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
179 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
180 |
* Returns the width of the component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
181 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
182 |
int getWidth(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
183 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
184 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
185 |
* Returns the height of the component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
186 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
187 |
int getHeight(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
188 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
189 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
190 |
* Returns the x coordinate of the component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
191 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
192 |
int getX(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
193 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
194 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
195 |
* Returns the y coordinate of the component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
196 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
197 |
int getY(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
198 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
199 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
200 |
* Gets the foreground color of this component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
201 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
202 |
Color getForeground(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
203 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
204 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
205 |
* Gets the background color of this component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
206 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
207 |
Color getBackground(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
208 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
209 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
210 |
* Sets the background of this component to the specified color. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
211 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
212 |
void setBackground(Component comp, Color background); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
213 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
214 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
215 |
* Gets the font of the component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
216 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
217 |
Font getFont(Component comp); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
218 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
219 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
220 |
* Processes events occurring on this component. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
221 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
222 |
void processEvent(Component comp, AWTEvent e); |
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
223 |
} |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
224 |
|
2451 | 225 |
/* |
226 |
* An interface of accessor for java.awt.Window class. |
|
227 |
*/ |
|
228 |
public interface WindowAccessor { |
|
229 |
/* |
|
230 |
* Get opacity level of the given window. |
|
231 |
*/ |
|
232 |
float getOpacity(Window window); |
|
233 |
/* |
|
234 |
* Set opacity level to the given window. |
|
235 |
*/ |
|
236 |
void setOpacity(Window window, float opacity); |
|
237 |
/* |
|
238 |
* Get a shape assigned to the given window. |
|
239 |
*/ |
|
240 |
Shape getShape(Window window); |
|
241 |
/* |
|
242 |
* Set a shape to the given window. |
|
243 |
*/ |
|
244 |
void setShape(Window window, Shape shape); |
|
245 |
/* |
|
246 |
* Set the opaque preoperty to the given window. |
|
247 |
*/ |
|
248 |
void setOpaque(Window window, boolean isOpaque); |
|
249 |
/* |
|
250 |
* Update the image of a non-opaque (translucent) window. |
|
251 |
*/ |
|
2808
a139a919f645
6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents:
2472
diff
changeset
|
252 |
void updateWindow(Window window); |
2472
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
253 |
|
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
254 |
/** Get the size of the security warning. |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
255 |
*/ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
256 |
Dimension getSecurityWarningSize(Window w); |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
257 |
|
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
258 |
/** |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
259 |
* Set the size of the security warning. |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
260 |
*/ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
261 |
void setSecurityWarningSize(Window w, int width, int height); |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
262 |
|
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
263 |
/** Set the position of the security warning. |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
264 |
*/ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
265 |
void setSecurityWarningPosition(Window w, Point2D point, |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
266 |
float alignmentX, float alignmentY); |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
267 |
|
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
268 |
/** Request to recalculate the new position of the security warning for |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
269 |
* the given window size/location as reported by the native system. |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
270 |
*/ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
271 |
Point2D calculateSecurityWarningPosition(Window window, |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
2465
diff
changeset
|
272 |
double x, double y, double w, double h); |
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
273 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
274 |
/** Sets the synchronous status of focus requests on lightweight |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
275 |
* components in the specified window to the specified value. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
276 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
277 |
void setLWRequestStatus(Window changed, boolean status); |
4371
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
278 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
279 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
280 |
* Indicates whether this window should receive focus on subsequently |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
281 |
* being shown, or being moved to the front. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
282 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
283 |
boolean isAutoRequestFocus(Window w); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
284 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
285 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
286 |
* Indicates whether the specified window is an utility window for TrayIcon. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
287 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
288 |
boolean isTrayIconWindow(Window w); |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
289 |
|
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
290 |
/** |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
291 |
* Marks the specified window as an utility window for TrayIcon. |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
292 |
*/ |
dc9dcb8b0ae7
6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents:
4365
diff
changeset
|
293 |
void setTrayIconWindow(Window w, boolean isTrayIconWindow); |
2451 | 294 |
} |
295 |
||
296 |
/* |
|
297 |
* An accessor for the AWTEvent class. |
|
298 |
*/ |
|
299 |
public interface AWTEventAccessor { |
|
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
300 |
/** |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
301 |
* Marks the event as posted. |
2451 | 302 |
*/ |
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
303 |
void setPosted(AWTEvent ev); |
2451 | 304 |
} |
305 |
||
306 |
/* |
|
2453
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
307 |
* 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
|
308 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
309 |
public interface FrameAccessor { |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
310 |
/* |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
311 |
* 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
|
312 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
313 |
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
|
314 |
/* |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
315 |
* 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
|
316 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
317 |
int getExtendedState(Frame frame); |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
318 |
} |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
319 |
|
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
320 |
/* |
2465 | 321 |
* An interface of accessor for the java.awt.KeyboardFocusManager class. |
2464
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
322 |
*/ |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
323 |
public interface KeyboardFocusManagerAccessor { |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
324 |
/* |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
325 |
* Indicates whether the native implementation should |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
326 |
* proceed with a pending focus request for the heavyweight. |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
327 |
*/ |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
328 |
int shouldNativelyFocusHeavyweight(Component heavyweight, |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
329 |
Component descendant, |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
330 |
boolean temporary, |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
331 |
boolean focusedWindowChangeAllowed, |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
332 |
long time, |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
333 |
CausedFocusEvent.Cause cause); |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
334 |
/* |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
335 |
* Delivers focus for the lightweight descendant of the heavyweight |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
336 |
* synchronously. |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
337 |
*/ |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
338 |
boolean processSynchronousLightweightTransfer(Component heavyweight, |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
339 |
Component descendant, |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
340 |
boolean temporary, |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
341 |
boolean focusedWindowChangeAllowed, |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
342 |
long time); |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
343 |
/* |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
344 |
* Removes the last focus request for the heavyweight from the queue. |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
345 |
*/ |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
346 |
void removeLastFocusRequest(Component heavyweight); |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
347 |
} |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
348 |
|
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
349 |
/* |
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
350 |
* An accessor for the MenuComponent class. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
351 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
352 |
public interface MenuComponentAccessor { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
353 |
/** |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
354 |
* Returns the appContext of the menu component. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
355 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
356 |
AppContext getAppContext(MenuComponent menuComp); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
357 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
358 |
/** |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
359 |
* Sets the appContext of the menu component. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
360 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
361 |
void setAppContext(MenuComponent menuComp, AppContext appContext); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
362 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
363 |
/** |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
364 |
* Returns the menu container of the menu component |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
365 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
366 |
MenuContainer getParent(MenuComponent menuComp); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
367 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
368 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
369 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
370 |
* An accessor for the EventQueue class |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
371 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
372 |
public interface EventQueueAccessor { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
373 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
374 |
* Gets the event dispatch thread. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
375 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
376 |
Thread getDispatchThread(EventQueue eventQueue); |
4365 | 377 |
/* |
378 |
* Checks if the current thread is EDT for the given EQ. |
|
379 |
*/ |
|
380 |
public boolean isDispatchThreadImpl(EventQueue eventQueue); |
|
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
381 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
382 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
383 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
384 |
* An accessor for the PopupMenu class |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
385 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
386 |
public interface PopupMenuAccessor { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
387 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
388 |
* Returns whether the popup menu is attached to a tray |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
389 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
390 |
boolean isTrayIconPopup(PopupMenu popupMenu); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
391 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
392 |
|
4913
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
393 |
/* |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
394 |
* An accessor for the FileDialog class |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
395 |
*/ |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
396 |
public interface FileDialogAccessor { |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
397 |
/* |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
398 |
* Sets the files the user selects |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
399 |
*/ |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
400 |
void setFiles(FileDialog fileDialog, String directory, String files[]); |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
401 |
|
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
402 |
/* |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
403 |
* Sets the file the user selects |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
404 |
*/ |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
405 |
void setFile(FileDialog fileDialog, String file); |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
406 |
|
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
407 |
/* |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
408 |
* Sets the directory the user selects |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
409 |
*/ |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
410 |
void setDirectory(FileDialog fileDialog, String directory); |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
411 |
|
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
412 |
/* |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
413 |
* Returns whether the file dialog allows the multiple file selection. |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
414 |
*/ |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
415 |
boolean isMultipleMode(FileDialog fileDialog); |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
416 |
} |
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
417 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
418 |
/* |
2451 | 419 |
* 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
|
420 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
421 |
private static ComponentAccessor componentAccessor; |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
422 |
|
2451 | 423 |
/* |
424 |
* The java.awt.Window class accessor object. |
|
425 |
*/ |
|
426 |
private static WindowAccessor windowAccessor; |
|
427 |
||
428 |
/* |
|
429 |
* The java.awt.AWTEvent class accessor object. |
|
430 |
*/ |
|
431 |
private static AWTEventAccessor awtEventAccessor; |
|
432 |
||
433 |
/* |
|
2453
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
434 |
* 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
|
435 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
436 |
private static FrameAccessor frameAccessor; |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
437 |
|
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
438 |
/* |
2464
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
439 |
* The java.awt.KeyboardFocusManager class accessor object. |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
440 |
*/ |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
441 |
private static KeyboardFocusManagerAccessor kfmAccessor; |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
442 |
|
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
443 |
/* |
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
444 |
* The java.awt.MenuComponent class accessor object. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
445 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
446 |
private static MenuComponentAccessor menuComponentAccessor; |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
447 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
448 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
449 |
* The java.awt.EventQueue class accessor object. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
450 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
451 |
private static EventQueueAccessor eventQueueAccessor; |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
452 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
453 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
454 |
* The java.awt.PopupMenu class accessor object. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
455 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
456 |
private static PopupMenuAccessor popupMenuAccessor; |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
457 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
458 |
/* |
4913
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
459 |
* The java.awt.FileDialog class accessor object. |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
460 |
*/ |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
461 |
private static FileDialogAccessor fileDialogAccessor; |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
462 |
|
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
463 |
/* |
2451 | 464 |
* 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
|
465 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
466 |
public static void setComponentAccessor(ComponentAccessor ca) { |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
467 |
componentAccessor = ca; |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
468 |
} |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
469 |
|
2451 | 470 |
/* |
471 |
* 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
|
472 |
*/ |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
473 |
public static ComponentAccessor getComponentAccessor() { |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
474 |
if (componentAccessor == null) { |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
475 |
unsafe.ensureClassInitialized(Component.class); |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
476 |
} |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
477 |
|
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
478 |
return componentAccessor; |
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
479 |
} |
2451 | 480 |
|
481 |
/* |
|
482 |
* Set an accessor object for the java.awt.Window class. |
|
483 |
*/ |
|
484 |
public static void setWindowAccessor(WindowAccessor wa) { |
|
485 |
windowAccessor = wa; |
|
486 |
} |
|
487 |
||
488 |
/* |
|
489 |
* Retrieve the accessor object for the java.awt.Window class. |
|
490 |
*/ |
|
491 |
public static WindowAccessor getWindowAccessor() { |
|
492 |
if (windowAccessor == null) { |
|
493 |
unsafe.ensureClassInitialized(Window.class); |
|
494 |
} |
|
495 |
return windowAccessor; |
|
496 |
} |
|
497 |
||
498 |
/* |
|
499 |
* Set an accessor object for the java.awt.AWTEvent class. |
|
500 |
*/ |
|
501 |
public static void setAWTEventAccessor(AWTEventAccessor aea) { |
|
502 |
awtEventAccessor = aea; |
|
503 |
} |
|
504 |
||
505 |
/* |
|
506 |
* Retrieve the accessor object for the java.awt.AWTEvent class. |
|
507 |
*/ |
|
508 |
public static AWTEventAccessor getAWTEventAccessor() { |
|
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
509 |
if (awtEventAccessor == null) { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
510 |
unsafe.ensureClassInitialized(AWTEvent.class); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
511 |
} |
2451 | 512 |
return awtEventAccessor; |
513 |
} |
|
2453
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
514 |
|
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
515 |
/* |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
516 |
* 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
|
517 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
518 |
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
|
519 |
frameAccessor = fa; |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
520 |
} |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
521 |
|
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
522 |
/* |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
523 |
* 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
|
524 |
*/ |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
525 |
public static FrameAccessor getFrameAccessor() { |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
526 |
if (frameAccessor == null) { |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
527 |
unsafe.ensureClassInitialized(Frame.class); |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
528 |
} |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
529 |
return frameAccessor; |
35e5fab82613
6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents:
2451
diff
changeset
|
530 |
} |
2464
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
531 |
|
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
532 |
/* |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
533 |
* Set an accessor object for the java.awt.KeyboardFocusManager class. |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
534 |
*/ |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
535 |
public static void setKeyboardFocusManagerAccessor(KeyboardFocusManagerAccessor kfma) { |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
536 |
kfmAccessor = kfma; |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
537 |
} |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
538 |
|
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
539 |
/* |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
540 |
* Retrieve the accessor object for the java.awt.KeyboardFocusManager class. |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
541 |
*/ |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
542 |
public static KeyboardFocusManagerAccessor getKeyboardFocusManagerAccessor() { |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
543 |
if (kfmAccessor == null) { |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
544 |
unsafe.ensureClassInitialized(KeyboardFocusManager.class); |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
545 |
} |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
546 |
return kfmAccessor; |
3c6755bdc55f
6806217: implement synthetic focus model for MS Windows
ant
parents:
2459
diff
changeset
|
547 |
} |
3084
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
548 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
549 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
550 |
* Set an accessor object for the java.awt.MenuComponent class. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
551 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
552 |
public static void setMenuComponentAccessor(MenuComponentAccessor mca) { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
553 |
menuComponentAccessor = mca; |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
554 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
555 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
556 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
557 |
* Retrieve the accessor object for the java.awt.MenuComponent class. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
558 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
559 |
public static MenuComponentAccessor getMenuComponentAccessor() { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
560 |
if (menuComponentAccessor == null) { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
561 |
unsafe.ensureClassInitialized(MenuComponent.class); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
562 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
563 |
return menuComponentAccessor; |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
564 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
565 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
566 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
567 |
* Set an accessor object for the java.awt.EventQueue class. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
568 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
569 |
public static void setEventQueueAccessor(EventQueueAccessor eqa) { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
570 |
eventQueueAccessor = eqa; |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
571 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
572 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
573 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
574 |
* Retrieve the accessor object for the java.awt.EventQueue class. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
575 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
576 |
public static EventQueueAccessor getEventQueueAccessor() { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
577 |
if (eventQueueAccessor == null) { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
578 |
unsafe.ensureClassInitialized(EventQueue.class); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
579 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
580 |
return eventQueueAccessor; |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
581 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
582 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
583 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
584 |
* Set an accessor object for the java.awt.PopupMenu class. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
585 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
586 |
public static void setPopupMenuAccessor(PopupMenuAccessor pma) { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
587 |
popupMenuAccessor = pma; |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
588 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
589 |
|
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
590 |
/* |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
591 |
* Retrieve the accessor object for the java.awt.PopupMenu class. |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
592 |
*/ |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
593 |
public static PopupMenuAccessor getPopupMenuAccessor() { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
594 |
if (popupMenuAccessor == null) { |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
595 |
unsafe.ensureClassInitialized(PopupMenu.class); |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
596 |
} |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
597 |
return popupMenuAccessor; |
67ca55732362
6824169: Need to remove some AWT class dependencies
dcherepanov
parents:
2808
diff
changeset
|
598 |
} |
4913
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
599 |
|
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
600 |
/* |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
601 |
* Set an accessor object for the java.awt.FileDialog class. |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
602 |
*/ |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
603 |
public static void setFileDialogAccessor(FileDialogAccessor fda) { |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
604 |
fileDialogAccessor = fda; |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
605 |
} |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
606 |
|
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
607 |
/* |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
608 |
* Retrieve the accessor object for the java.awt.FileDialog class. |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
609 |
*/ |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
610 |
public static FileDialogAccessor getFileDialogAccessor() { |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
611 |
if (fileDialogAccessor == null) { |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
612 |
unsafe.ensureClassInitialized(FileDialog.class); |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
613 |
} |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
614 |
return fileDialogAccessor; |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
615 |
} |
9b3caa50afcf
6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents:
4371
diff
changeset
|
616 |
|
1978
8b981ce05cd0
6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff
changeset
|
617 |
} |