10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.*;
25 import javax.swing.*;
26 import java.awt.image.BufferedImage;
27
28 /*
29 * @test
30 * @summary Check if a per-pixel translucent window shows up with correct translucency
31 * @author mrkam
32 * @library ../../../../lib/testlibrary
33 * @build Common ExtendedRobot
34 * @run main PerPixelTranslucentCanvas
35 */
36
37 public class PerPixelTranslucentCanvas extends Common {
38
39 JPanel center;
40 Color OVAL_COLOR = Color.BLUE;
41
42 public static void main(String[] ignored) throws Exception {
43 FG_COLOR = new Color(200, 0, 0, 100);
44 BG_COLOR = Color.GREEN;
45 for (Class<Window> windowClass: WINDOWS_TO_TEST)
46 new PerPixelTranslucentCanvas(windowClass).doTest();
47 }
48
49 public PerPixelTranslucentCanvas(Class windowClass) throws Exception {
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.*;
25 import javax.swing.*;
26 import java.awt.image.BufferedImage;
27
28 /*
29 * @test
30 * @key headful
31 * @summary Check if a per-pixel translucent window shows up with correct translucency
32 * @author mrkam
33 * @library ../../../../lib/testlibrary
34 * @build Common ExtendedRobot
35 * @run main PerPixelTranslucentCanvas
36 */
37
38 public class PerPixelTranslucentCanvas extends Common {
39
40 JPanel center;
41 Color OVAL_COLOR = Color.BLUE;
42
43 public static void main(String[] ignored) throws Exception {
44 FG_COLOR = new Color(200, 0, 0, 100);
45 BG_COLOR = Color.GREEN;
46 for (Class<Window> windowClass: WINDOWS_TO_TEST)
47 new PerPixelTranslucentCanvas(windowClass).doTest();
48 }
49
50 public PerPixelTranslucentCanvas(Class windowClass) throws Exception {
|