author | hseigel |
Wed, 01 Mar 2017 08:00:02 -0500 | |
changeset 46194 | 5596e6f63072 |
parent 30469 | bac0a7ff7e1e |
permissions | -rw-r--r-- |
25203
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
1 |
/* |
30469 | 2 |
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. |
25203
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 JViewport constructors 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 HeadlessJViewport |
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 HeadlessJViewport { |
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 |
JViewport v = new JViewport(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
38 |
v.getUI(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
39 |
v.getUIClassID(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
40 |
v.setUI(null); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
41 |
v.updateUI(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
42 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
43 |
JComponent view = new JPanel(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
44 |
view.setMinimumSize(new Dimension(123, 456)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
45 |
v.setView(view); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
46 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
47 |
v.getAccessibleContext(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
48 |
v.isFocusTraversable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
49 |
v.setEnabled(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
50 |
v.setEnabled(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
51 |
v.requestFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
52 |
v.requestFocusInWindow(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
53 |
v.getPreferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
54 |
v.getMaximumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
55 |
v.getMinimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
56 |
v.contains(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
57 |
Component c1 = v.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
58 |
Component c2 = v.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
59 |
Component c3 = v.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
60 |
Insets ins = v.getInsets(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
61 |
v.getAlignmentY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
62 |
v.getAlignmentX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
63 |
v.getGraphics(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
64 |
v.setVisible(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
65 |
v.setVisible(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
66 |
v.setForeground(Color.red); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
67 |
v.setBackground(Color.red); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
68 |
for (String font : Toolkit.getDefaultToolkit().getFontList()) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
69 |
for (int j = 8; j < 17; j++) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
70 |
Font f1 = new Font(font, Font.PLAIN, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
71 |
Font f2 = new Font(font, Font.BOLD, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
72 |
Font f3 = new Font(font, Font.ITALIC, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
73 |
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
|
74 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
75 |
v.setFont(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
76 |
v.setFont(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
77 |
v.setFont(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
78 |
v.setFont(f4); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
79 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
80 |
v.getFontMetrics(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
81 |
v.getFontMetrics(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
82 |
v.getFontMetrics(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
83 |
v.getFontMetrics(f4); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
84 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
85 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
86 |
v.enable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
87 |
v.disable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
88 |
v.reshape(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
89 |
v.getBounds(new Rectangle(1, 1, 1, 1)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
90 |
v.getSize(new Dimension(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
91 |
v.getLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
92 |
v.getX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
93 |
v.getY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
94 |
v.getWidth(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
95 |
v.getHeight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
96 |
v.isOpaque(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
97 |
v.isValidateRoot(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
98 |
v.isOptimizedDrawingEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
99 |
v.isDoubleBuffered(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
100 |
v.getComponentCount(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
101 |
v.countComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
102 |
v.getComponent(0); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
103 |
Component[] cs = v.getComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
104 |
v.getLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
105 |
v.setLayout(new FlowLayout()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
106 |
v.doLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
107 |
v.layout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
108 |
v.invalidate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
109 |
v.validate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
110 |
v.remove(0); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
111 |
v.remove(c2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
112 |
v.removeAll(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
113 |
v.preferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
114 |
v.minimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
115 |
v.getComponentAt(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
116 |
v.locate(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
117 |
v.getComponentAt(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
118 |
v.isFocusCycleRoot(new Container()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
119 |
v.transferFocusBackward(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
120 |
v.setName("goober"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
121 |
v.getName(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
122 |
v.getParent(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
123 |
v.getGraphicsConfiguration(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
124 |
v.getTreeLock(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
125 |
v.getToolkit(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
126 |
v.isValid(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
127 |
v.isDisplayable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
128 |
v.isVisible(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
129 |
v.isShowing(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
130 |
v.isEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
131 |
v.enable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
132 |
v.enable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
133 |
v.enableInputMethods(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
134 |
v.enableInputMethods(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
135 |
v.show(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
136 |
v.show(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
137 |
v.show(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
138 |
v.hide(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
139 |
v.getForeground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
140 |
v.isForegroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
141 |
v.getBackground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
142 |
v.isBackgroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
143 |
v.getFont(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
144 |
v.isFontSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
145 |
Container c = new Container(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
146 |
c.add(v); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
147 |
v.getLocale(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
148 |
for (Locale locale : Locale.getAvailableLocales()) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
149 |
v.setLocale(locale); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
150 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
151 |
v.getColorModel(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
152 |
v.getLocation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
153 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
154 |
boolean exceptions = false; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
155 |
try { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
156 |
v.getLocationOnScreen(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
157 |
} catch (IllegalComponentStateException e) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
158 |
exceptions = true; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
159 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
160 |
if (!exceptions) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
161 |
throw new RuntimeException("IllegalComponentStateException did not occur when expected"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
162 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
163 |
v.location(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
164 |
v.setLocation(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
165 |
v.move(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
166 |
v.setLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
167 |
v.getSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
168 |
v.size(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
169 |
v.setSize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
170 |
v.resize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
171 |
v.setSize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
172 |
v.resize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
173 |
v.getBounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
174 |
v.bounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
175 |
v.setBounds(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
176 |
v.setBounds(new Rectangle(10, 10, 10, 10)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
177 |
v.isLightweight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
178 |
v.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
179 |
v.getCursor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
180 |
v.isCursorSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
181 |
v.inside(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
182 |
v.contains(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
183 |
v.isFocusable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
184 |
v.setFocusable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
185 |
v.setFocusable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
186 |
v.transferFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
187 |
v.getFocusCycleRootAncestor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
188 |
v.nextFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
189 |
v.transferFocusUpCycle(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
190 |
v.hasFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
191 |
v.isFocusOwner(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
192 |
v.toString(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
193 |
v.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
194 |
v.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
195 |
v.setComponentOrientation(ComponentOrientation.UNKNOWN); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
196 |
v.getComponentOrientation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
197 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
198 |
} |