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 javax.swing.plaf.basic.BasicInternalFrameTitlePane; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
26 |
import javax.swing.plaf.basic.BasicInternalFrameUI; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
27 |
import java.awt.*; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
28 |
import java.beans.PropertyChangeEvent; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
29 |
import java.beans.PropertyChangeListener; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
30 |
import java.util.Locale; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
31 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
32 |
/* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
33 |
* @test |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
34 |
* @summary Check that JInternalFrame constructor and methods do not throw unexpected |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
35 |
* exceptions in headless mode |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
36 |
* @run main/othervm -Djava.awt.headless=true HeadlessJInternalFrame |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
37 |
*/ |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
38 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
39 |
public class HeadlessJInternalFrame { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
40 |
public static void main(String args[]) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
41 |
JInternalFrame intf = new JInternalFrame("TEST"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
42 |
intf.setUI(new BasicInternalFrameUI(intf) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
43 |
protected JComponent createNorthPane(JInternalFrame w) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
44 |
titlePane = new BasicInternalFrameTitlePane(w) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
45 |
protected PropertyChangeListener createPropertyChangeListener() { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
46 |
return new BasicInternalFrameTitlePane.PropertyChangeHandler() { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
47 |
int countUI = 0; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
48 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
49 |
public void propertyChange(PropertyChangeEvent evt) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
50 |
if (evt.getPropertyName().equals("UI")) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
51 |
countUI++; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
52 |
else if (countUI > 1) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
53 |
throw new RuntimeException("Test failed. Listener not removed!"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
54 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
55 |
}; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
56 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
57 |
}; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
58 |
return titlePane; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
59 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
60 |
}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
61 |
intf.setUI(null); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
62 |
intf.getAccessibleContext(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
63 |
intf.isFocusTraversable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
64 |
intf.setEnabled(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
65 |
intf.setEnabled(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
66 |
intf.requestFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
67 |
intf.requestFocusInWindow(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
68 |
intf.getPreferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
69 |
intf.getMaximumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
70 |
intf.getMinimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
71 |
intf.contains(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
72 |
Component c1 = intf.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
73 |
Component c2 = intf.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
74 |
Component c3 = intf.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
75 |
Insets ins = intf.getInsets(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
76 |
intf.getAlignmentY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
77 |
intf.getAlignmentX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
78 |
intf.getGraphics(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
79 |
intf.setVisible(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
80 |
intf.setVisible(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
81 |
intf.setForeground(Color.red); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
82 |
intf.setBackground(Color.red); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
83 |
for (String font : Toolkit.getDefaultToolkit().getFontList()) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
84 |
for (int j = 8; j < 17; j++) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
85 |
Font f1 = new Font(font, Font.PLAIN, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
86 |
Font f2 = new Font(font, Font.BOLD, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
87 |
Font f3 = new Font(font, Font.ITALIC, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
88 |
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
|
89 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
90 |
intf.setFont(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
91 |
intf.setFont(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
92 |
intf.setFont(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
93 |
intf.setFont(f4); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
94 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
95 |
intf.getFontMetrics(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
96 |
intf.getFontMetrics(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
97 |
intf.getFontMetrics(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
98 |
intf.getFontMetrics(f4); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
99 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
100 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
101 |
intf.enable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
102 |
intf.disable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
103 |
intf.reshape(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
104 |
intf.getBounds(new Rectangle(1, 1, 1, 1)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
105 |
intf.getSize(new Dimension(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
106 |
intf.getLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
107 |
intf.getX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
108 |
intf.getY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
109 |
intf.getWidth(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
110 |
intf.getHeight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
111 |
intf.isOpaque(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
112 |
intf.isValidateRoot(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
113 |
intf.isOptimizedDrawingEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
114 |
intf.isDoubleBuffered(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
115 |
intf.getComponentCount(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
116 |
intf.countComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
117 |
intf.getComponent(0); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
118 |
Component[] cs = intf.getComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
119 |
intf.getLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
120 |
intf.setLayout(new FlowLayout()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
121 |
intf.doLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
122 |
intf.layout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
123 |
intf.invalidate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
124 |
intf.validate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
125 |
intf.remove(0); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
126 |
intf.remove(c2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
127 |
intf.removeAll(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
128 |
intf.preferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
129 |
intf.minimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
130 |
intf.getComponentAt(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
131 |
intf.locate(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
132 |
intf.getComponentAt(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
133 |
intf.isFocusCycleRoot(new Container()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
134 |
intf.transferFocusBackward(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
135 |
intf.setName("goober"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
136 |
intf.getName(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
137 |
intf.getParent(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
138 |
intf.getGraphicsConfiguration(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
139 |
intf.getTreeLock(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
140 |
intf.getToolkit(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
141 |
intf.isValid(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
142 |
intf.isDisplayable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
143 |
intf.isVisible(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
144 |
intf.isShowing(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
145 |
intf.isEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
146 |
intf.enable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
147 |
intf.enable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
148 |
intf.enableInputMethods(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
149 |
intf.enableInputMethods(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
150 |
intf.show(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
151 |
intf.show(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
152 |
intf.show(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
153 |
intf.hide(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
154 |
intf.getForeground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
155 |
intf.isForegroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
156 |
intf.getBackground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
157 |
intf.isBackgroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
158 |
intf.getFont(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
159 |
intf.isFontSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
160 |
Container c = new Container(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
161 |
c.add(intf); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
162 |
intf.getLocale(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
163 |
for (Locale locale : Locale.getAvailableLocales()) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
164 |
intf.setLocale(locale); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
165 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
166 |
intf.getColorModel(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
167 |
intf.getLocation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
168 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
169 |
boolean exceptions = false; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
170 |
try { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
171 |
intf.getLocationOnScreen(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
172 |
} catch (IllegalComponentStateException e) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
173 |
exceptions = true; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
174 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
175 |
if (!exceptions) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
176 |
throw new RuntimeException("IllegalComponentStateException did not occur when expected"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
177 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
178 |
intf.location(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
179 |
intf.setLocation(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
180 |
intf.move(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
181 |
intf.setLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
182 |
intf.getSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
183 |
intf.size(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
184 |
intf.setSize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
185 |
intf.resize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
186 |
intf.setSize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
187 |
intf.resize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
188 |
intf.getBounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
189 |
intf.bounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
190 |
intf.setBounds(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
191 |
intf.setBounds(new Rectangle(10, 10, 10, 10)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
192 |
intf.isLightweight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
193 |
intf.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
194 |
intf.getCursor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
195 |
intf.isCursorSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
196 |
intf.inside(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
197 |
intf.contains(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
198 |
intf.isFocusable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
199 |
intf.setFocusable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
200 |
intf.setFocusable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
201 |
intf.transferFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
202 |
intf.getFocusCycleRootAncestor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
203 |
intf.nextFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
204 |
intf.transferFocusUpCycle(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
205 |
intf.hasFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
206 |
intf.isFocusOwner(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
207 |
intf.toString(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
208 |
intf.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
209 |
intf.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
210 |
intf.setComponentOrientation(ComponentOrientation.UNKNOWN); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
211 |
intf.getComponentOrientation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
212 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
213 |
} |