jdk/test/javax/swing/Headless/HeadlessJColorChooser.java
author serb
Fri, 17 Apr 2015 16:54:13 +0300
changeset 30469 bac0a7ff7e1e
parent 25203 ea684628f900
permissions -rw-r--r--
8074028: Remove API references to java.awt.peer Reviewed-by: alanb, ant, yan, prr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25203
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
     1
/*
30469
bac0a7ff7e1e 8074028: Remove API references to java.awt.peer
serb
parents: 25203
diff changeset
     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 JColorChooser 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 HeadlessJColorChooser
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 HeadlessJColorChooser {
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
        JColorChooser cc;
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    38
        cc = new JColorChooser();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    39
        cc.getAccessibleContext();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    40
        cc.isFocusTraversable();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    41
        cc.setEnabled(false);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    42
        cc.setEnabled(true);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    43
        cc.requestFocus();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    44
        cc.requestFocusInWindow();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    45
        cc.getPreferredSize();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    46
        cc.getMaximumSize();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    47
        cc.getMinimumSize();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    48
        cc.contains(1, 2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    49
        Component c1 = cc.add(new Component(){});
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    50
        Component c2 = cc.add(new Component(){});
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    51
        Component c3 = cc.add(new Component(){});
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    52
        Insets ins = cc.getInsets();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    53
        cc.getAlignmentY();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    54
        cc.getAlignmentX();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    55
        cc.getGraphics();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    56
        cc.setVisible(false);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    57
        cc.setVisible(true);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    58
        cc.setForeground(Color.red);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    59
        cc.setBackground(Color.red);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    60
        for (String font : Toolkit.getDefaultToolkit().getFontList()) {
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    61
            for (int j = 8; j < 17; j++) {
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    62
                Font f1 = new Font(font, Font.PLAIN, j);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    63
                Font f2 = new Font(font, Font.BOLD, j);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    64
                Font f3 = new Font(font, Font.ITALIC, j);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    65
                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
    66
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    67
                cc.setFont(f1);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    68
                cc.setFont(f2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    69
                cc.setFont(f3);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    70
                cc.setFont(f4);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    71
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    72
                cc.getFontMetrics(f1);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    73
                cc.getFontMetrics(f2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    74
                cc.getFontMetrics(f3);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    75
                cc.getFontMetrics(f4);
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
        }
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    78
        cc.enable();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    79
        cc.disable();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    80
        cc.reshape(10, 10, 10, 10);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    81
        cc.getBounds(new Rectangle(1, 1, 1, 1));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    82
        cc.getSize(new Dimension(1, 2));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    83
        cc.getLocation(new Point(1, 2));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    84
        cc.getX();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    85
        cc.getY();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    86
        cc.getWidth();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    87
        cc.getHeight();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    88
        cc.isOpaque();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    89
        cc.isValidateRoot();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    90
        cc.isOptimizedDrawingEnabled();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    91
        cc.isDoubleBuffered();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    92
        cc.getComponentCount();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    93
        cc.countComponents();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    94
        cc.getComponent(1);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    95
        cc.getComponent(2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    96
        Component[] cs = cc.getComponents();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    97
        cc.getLayout();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    98
        cc.setLayout(new FlowLayout());
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
    99
        cc.doLayout();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   100
        cc.layout();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   101
        cc.invalidate();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   102
        cc.validate();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   103
        cc.remove(0);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   104
        cc.remove(c2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   105
        cc.removeAll();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   106
        cc.preferredSize();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   107
        cc.minimumSize();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   108
        cc.getComponentAt(1, 2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   109
        cc.locate(1, 2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   110
        cc.getComponentAt(new Point(1, 2));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   111
        cc.isFocusCycleRoot(new Container());
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   112
        cc.transferFocusBackward();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   113
        cc.setName("goober");
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   114
        cc.getName();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   115
        cc.getParent();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   116
        cc.getGraphicsConfiguration();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   117
        cc.getTreeLock();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   118
        cc.getToolkit();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   119
        cc.isValid();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   120
        cc.isDisplayable();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   121
        cc.isVisible();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   122
        cc.isShowing();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   123
        cc.isEnabled();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   124
        cc.enable(false);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   125
        cc.enable(true);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   126
        cc.enableInputMethods(false);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   127
        cc.enableInputMethods(true);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   128
        cc.show();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   129
        cc.show(false);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   130
        cc.show(true);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   131
        cc.hide();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   132
        cc.getForeground();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   133
        cc.isForegroundSet();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   134
        cc.getBackground();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   135
        cc.isBackgroundSet();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   136
        cc.getFont();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   137
        cc.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(cc);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   140
        cc.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
            cc.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
        cc.getColorModel();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   145
        cc.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
            cc.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
        cc.location();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   157
        cc.setLocation(1, 2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   158
        cc.move(1, 2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   159
        cc.setLocation(new Point(1, 2));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   160
        cc.getSize();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   161
        cc.size();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   162
        cc.setSize(1, 32);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   163
        cc.resize(1, 32);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   164
        cc.setSize(new Dimension(1, 32));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   165
        cc.resize(new Dimension(1, 32));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   166
        cc.getBounds();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   167
        cc.bounds();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   168
        cc.setBounds(10, 10, 10, 10);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   169
        cc.setBounds(new Rectangle(10, 10, 10, 10));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   170
        cc.isLightweight();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   171
        cc.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   172
        cc.getCursor();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   173
        cc.isCursorSet();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   174
        cc.inside(1, 2);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   175
        cc.contains(new Point(1, 2));
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   176
        cc.isFocusable();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   177
        cc.setFocusable(true);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   178
        cc.setFocusable(false);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   179
        cc.transferFocus();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   180
        cc.getFocusCycleRootAncestor();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   181
        cc.nextFocus();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   182
        cc.transferFocusUpCycle();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   183
        cc.hasFocus();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   184
        cc.isFocusOwner();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   185
        cc.toString();
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   186
        cc.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   187
        cc.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   188
        cc.setComponentOrientation(ComponentOrientation.UNKNOWN);
ea684628f900 8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff changeset
   189
        cc.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
}