jdk/test/java/awt/Window/setLocRelativeTo/SetLocationRelativeToTest.java
changeset 39056 d99e63b6d962
parent 26604 7dd67ef43cce
equal deleted inserted replaced
39055:92f7fed22d5f 39056:d99e63b6d962
     1 /*
     1 /*
     2  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    24 import java.awt.*;
    24 import java.awt.*;
    25 import java.util.ArrayList;
    25 import java.util.ArrayList;
    26 import javax.swing.*;
    26 import javax.swing.*;
    27 
    27 
    28 /*
    28 /*
    29 @test
    29  * @test
    30 @summary Toplevel should be correctly positioned as relative to a component:
    30  * @key headful
    31        so that their centers coincide
    31  * @summary Toplevel should be correctly positioned as relative to a component:
    32        or, if the component is hidden, centered on the screen.
    32  *          so that their centers coincide
    33 @bug 8036915
    33  *          or, if the component is hidden, centered on the screen.
    34 @library ../../../../lib/testlibrary
    34  * @bug 8036915
    35 @build ExtendedRobot
    35  * @library ../../../../lib/testlibrary
    36 @run main/timeout=1200 SetLocationRelativeToTest
    36  * @build ExtendedRobot
    37 */
    37  * @run main/timeout=1200 SetLocationRelativeToTest
       
    38  */
    38 
    39 
    39 public class SetLocationRelativeToTest {
    40 public class SetLocationRelativeToTest {
    40     private static int delay = 500;
    41     private static int delay = 500;
    41     private static boolean testEverything = false;// NB: change this to true to test everything
    42     private static boolean testEverything = false;// NB: change this to true to test everything
    42     java.util.List<Window> awtToplevels = new ArrayList<Window>();
    43     java.util.List<Window> awtToplevels = new ArrayList<Window>();