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 JOptionPane 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 HeadlessJOptionPane |
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 HeadlessJOptionPane { |
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 |
JOptionPane op = new JOptionPane(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
38 |
op.getAccessibleContext(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
39 |
op.isFocusTraversable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
40 |
op.setEnabled(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
41 |
op.setEnabled(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
42 |
op.requestFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
43 |
op.requestFocusInWindow(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
44 |
op.getPreferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
45 |
op.getMaximumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
46 |
op.getMinimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
47 |
op.contains(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
48 |
Component c1 = op.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
49 |
Component c2 = op.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
50 |
Component c3 = op.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
51 |
Insets ins = op.getInsets(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
52 |
op.getAlignmentY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
53 |
op.getAlignmentX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
54 |
op.getGraphics(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
55 |
op.setVisible(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
56 |
op.setVisible(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
57 |
op.setForeground(Color.red); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
58 |
op.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 |
op.setFont(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
67 |
op.setFont(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
68 |
op.setFont(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
69 |
op.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 |
op.getFontMetrics(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
72 |
op.getFontMetrics(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
73 |
op.getFontMetrics(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
74 |
op.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 |
op.enable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
78 |
op.disable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
79 |
op.reshape(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
80 |
op.getBounds(new Rectangle(1, 1, 1, 1)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
81 |
op.getSize(new Dimension(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
82 |
op.getLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
83 |
op.getX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
84 |
op.getY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
85 |
op.getWidth(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
86 |
op.getHeight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
87 |
op.isOpaque(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
88 |
op.isValidateRoot(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
89 |
op.isOptimizedDrawingEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
90 |
op.isDoubleBuffered(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
91 |
op.getComponentCount(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
92 |
op.countComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
93 |
op.getComponent(1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
94 |
op.getComponent(2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
95 |
Component[] cs = op.getComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
96 |
op.getLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
97 |
op.setLayout(new FlowLayout()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
98 |
op.doLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
99 |
op.layout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
100 |
op.invalidate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
101 |
op.validate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
102 |
op.remove(0); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
103 |
op.remove(c2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
104 |
op.removeAll(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
105 |
op.preferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
106 |
op.minimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
107 |
op.getComponentAt(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
108 |
op.locate(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
109 |
op.getComponentAt(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
110 |
op.isFocusCycleRoot(new Container()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
111 |
op.transferFocusBackward(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
112 |
op.setName("goober"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
113 |
op.getName(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
114 |
op.getParent(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
115 |
op.getGraphicsConfiguration(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
116 |
op.getTreeLock(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
117 |
op.getToolkit(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
118 |
op.isValid(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
119 |
op.isDisplayable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
120 |
op.isVisible(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
121 |
op.isShowing(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
122 |
op.isEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
123 |
op.enable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
124 |
op.enable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
125 |
op.enableInputMethods(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
126 |
op.enableInputMethods(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
127 |
op.show(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
128 |
op.show(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
129 |
op.show(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
130 |
op.hide(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
131 |
op.getForeground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
132 |
op.isForegroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
133 |
op.getBackground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
134 |
op.isBackgroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
135 |
op.getFont(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
136 |
op.isFontSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
137 |
Container c = new Container(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
138 |
c.add(op); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
139 |
op.getLocale(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
140 |
for (Locale locale : Locale.getAvailableLocales()) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
141 |
op.setLocale(locale); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
142 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
143 |
op.getColorModel(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
144 |
op.getLocation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
145 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
146 |
boolean exceptions = false; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
147 |
try { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
148 |
op.getLocationOnScreen(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
149 |
} catch (IllegalComponentStateException e) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
150 |
exceptions = true; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
151 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
152 |
if (!exceptions) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
153 |
throw new RuntimeException("IllegalComponentStateException did not occur when expected"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
154 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
155 |
op.location(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
156 |
op.setLocation(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
157 |
op.move(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
158 |
op.setLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
159 |
op.getSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
160 |
op.size(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
161 |
op.setSize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
162 |
op.resize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
163 |
op.setSize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
164 |
op.resize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
165 |
op.getBounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
166 |
op.bounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
167 |
op.setBounds(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
168 |
op.setBounds(new Rectangle(10, 10, 10, 10)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
169 |
op.isLightweight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
170 |
op.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
171 |
op.getCursor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
172 |
op.isCursorSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
173 |
op.inside(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
174 |
op.contains(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
175 |
op.isFocusable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
176 |
op.setFocusable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
177 |
op.setFocusable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
178 |
op.transferFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
179 |
op.getFocusCycleRootAncestor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
180 |
op.nextFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
181 |
op.transferFocusUpCycle(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
182 |
op.hasFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
183 |
op.isFocusOwner(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
184 |
op.toString(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
185 |
op.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
186 |
op.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
187 |
op.setComponentOrientation(ComponentOrientation.UNKNOWN); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
188 |
op.getComponentOrientation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
189 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
190 |
} |