author | yan |
Fri, 20 Jun 2014 16:48:30 +0400 | |
changeset 25203 | ea684628f900 |
child 30469 | bac0a7ff7e1e |
permissions | -rw-r--r-- |
25203
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
1 |
/* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
2 |
* Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
4 |
* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
8 |
* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
13 |
* accompanied this code). |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
14 |
* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
18 |
* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
21 |
* questions. |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
22 |
*/ |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
23 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
24 |
import javax.swing.*; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
25 |
import java.awt.*; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
26 |
import java.util.Locale; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
27 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
28 |
/* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
29 |
* @test |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
30 |
* @summary Check that JScrollPane constructor and methods do not throw unexpected |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
31 |
* exceptions in headless mode |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
32 |
* @run main/othervm -Djava.awt.headless=true HeadlessJScrollPane |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
33 |
*/ |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
34 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
35 |
public class HeadlessJScrollPane { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
36 |
public static void main(String args[]) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
37 |
JScrollPane sp = new JScrollPane(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
38 |
sp.getAccessibleContext(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
39 |
sp.isFocusTraversable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
40 |
sp.setEnabled(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
41 |
sp.setEnabled(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
42 |
sp.requestFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
43 |
sp.requestFocusInWindow(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
44 |
sp.getPreferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
45 |
sp.getMaximumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
46 |
sp.getMinimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
47 |
sp.contains(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
48 |
Component c1 = sp.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
49 |
Component c2 = sp.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
50 |
Component c3 = sp.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
51 |
Insets ins = sp.getInsets(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
52 |
sp.getAlignmentY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
53 |
sp.getAlignmentX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
54 |
sp.getGraphics(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
55 |
sp.setVisible(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
56 |
sp.setVisible(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
57 |
sp.setForeground(Color.red); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
58 |
sp.setBackground(Color.red); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
59 |
for (String font : Toolkit.getDefaultToolkit().getFontList()) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
60 |
for (int j = 8; j < 17; j++) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
61 |
Font f1 = new Font(font, Font.PLAIN, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
62 |
Font f2 = new Font(font, Font.BOLD, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
63 |
Font f3 = new Font(font, Font.ITALIC, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
64 |
Font f4 = new Font(font, Font.BOLD | Font.ITALIC, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
65 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
66 |
sp.setFont(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
67 |
sp.setFont(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
68 |
sp.setFont(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
69 |
sp.setFont(f4); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
70 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
71 |
sp.getFontMetrics(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
72 |
sp.getFontMetrics(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
73 |
sp.getFontMetrics(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
74 |
sp.getFontMetrics(f4); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
75 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
76 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
77 |
sp.enable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
78 |
sp.disable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
79 |
sp.reshape(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
80 |
sp.getBounds(new Rectangle(1, 1, 1, 1)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
81 |
sp.getSize(new Dimension(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
82 |
sp.getLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
83 |
sp.getX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
84 |
sp.getY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
85 |
sp.getWidth(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
86 |
sp.getHeight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
87 |
sp.isOpaque(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
88 |
sp.isValidateRoot(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
89 |
sp.isOptimizedDrawingEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
90 |
sp.isDoubleBuffered(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
91 |
sp.getComponentCount(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
92 |
sp.countComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
93 |
sp.getComponent(1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
94 |
sp.getComponent(2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
95 |
Component[] cs = sp.getComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
96 |
sp.getLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
97 |
sp.setLayout(new ScrollPaneLayout()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
98 |
sp.doLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
99 |
sp.layout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
100 |
sp.invalidate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
101 |
sp.validate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
102 |
sp.remove(0); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
103 |
sp.remove(c2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
104 |
sp.removeAll(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
105 |
sp.preferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
106 |
sp.minimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
107 |
sp.getComponentAt(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
108 |
sp.locate(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
109 |
sp.getComponentAt(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
110 |
sp.isFocusCycleRoot(new Container()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
111 |
sp.transferFocusBackward(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
112 |
sp.setName("goober"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
113 |
sp.getName(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
114 |
sp.getParent(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
115 |
sp.getPeer(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
116 |
sp.getGraphicsConfiguration(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
117 |
sp.getTreeLock(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
118 |
sp.getToolkit(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
119 |
sp.isValid(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
120 |
sp.isDisplayable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
121 |
sp.isVisible(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
122 |
sp.isShowing(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
123 |
sp.isEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
124 |
sp.enable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
125 |
sp.enable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
126 |
sp.enableInputMethods(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
127 |
sp.enableInputMethods(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
128 |
sp.show(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
129 |
sp.show(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
130 |
sp.show(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
131 |
sp.hide(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
132 |
sp.getForeground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
133 |
sp.isForegroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
134 |
sp.getBackground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
135 |
sp.isBackgroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
136 |
sp.getFont(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
137 |
sp.isFontSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
138 |
Container c = new Container(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
139 |
c.add(sp); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
140 |
sp.getLocale(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
141 |
for (Locale locale : Locale.getAvailableLocales()) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
142 |
sp.setLocale(locale); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
143 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
144 |
sp.getColorModel(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
145 |
sp.getLocation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
146 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
147 |
boolean exceptions = false; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
148 |
try { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
149 |
sp.getLocationOnScreen(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
150 |
} catch (IllegalComponentStateException e) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
151 |
exceptions = true; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
152 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
153 |
if (!exceptions) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
154 |
throw new RuntimeException("IllegalComponentStateException did not occur when expected"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
155 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
156 |
sp.location(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
157 |
sp.setLocation(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
158 |
sp.move(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
159 |
sp.setLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
160 |
sp.getSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
161 |
sp.size(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
162 |
sp.setSize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
163 |
sp.resize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
164 |
sp.setSize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
165 |
sp.resize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
166 |
sp.getBounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
167 |
sp.bounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
168 |
sp.setBounds(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
169 |
sp.setBounds(new Rectangle(10, 10, 10, 10)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
170 |
sp.isLightweight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
171 |
sp.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
172 |
sp.getCursor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
173 |
sp.isCursorSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
174 |
sp.inside(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
175 |
sp.contains(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
176 |
sp.isFocusable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
177 |
sp.setFocusable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
178 |
sp.setFocusable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
179 |
sp.transferFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
180 |
sp.getFocusCycleRootAncestor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
181 |
sp.nextFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
182 |
sp.transferFocusUpCycle(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
183 |
sp.hasFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
184 |
sp.isFocusOwner(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
185 |
sp.toString(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
186 |
sp.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
187 |
sp.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
188 |
sp.setComponentOrientation(ComponentOrientation.UNKNOWN); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
189 |
sp.getComponentOrientation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
190 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
191 |
} |