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