test/java/awt/Window/ShapedAndTranslucentWindows/Translucent.java
Print this page
*** 24,55 ****
import java.awt.*;
/*
* @test
* @summary Check if translucent window is dragged and resized
! correctly.
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @library ../../../../lib/testlibrary
* @build Common ExtendedRobot
* @run main Translucent
*/
public class Translucent extends Common {
public static void main(String[] args) throws Exception {
! if (checkTranslucencyMode(GraphicsDevice.WindowTranslucency.TRANSLUCENT) &&
! checkTranslucencyMode(GraphicsDevice.WindowTranslucency.PERPIXEL_TRANSPARENT))
for (Class<Window> windowClass: WINDOWS_TO_TEST){
new Translucent(windowClass).doTest();
}
}
public Translucent(Class windowClass) throws Exception{
super(windowClass, 0.3f);
}
public void applyShape(){ }
public void doTest() throws Exception{
super.doTest();
checkTranslucentShape();
--- 24,68 ----
import java.awt.*;
/*
* @test
* @summary Check if translucent window is dragged and resized
! * correctly.
! *
! * Test Description: Check if TRANSLUCENT translucency type is supported
! * on the current platform. Proceed if they are supported. Create
! * a window and apply opacity of 0.3. Drag and resize the window
! * using AWT Robot and verify that translucency is not affected.
! * Make the window appear on top of a known background. Repeat this
! * for Window, Dialog, Frame.
! * Expected Result: If TRANSLUCENT translucency type is supported, the
! * window should show the background. Dragging and resizing
! * shouldn't affect the translucency.
! *
! * @author mrkam
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @library ../../../../lib/testlibrary
* @build Common ExtendedRobot
* @run main Translucent
*/
public class Translucent extends Common {
public static void main(String[] args) throws Exception {
! if (checkTranslucencyMode(GraphicsDevice.WindowTranslucency.TRANSLUCENT))
for (Class<Window> windowClass: WINDOWS_TO_TEST){
new Translucent(windowClass).doTest();
}
}
public Translucent(Class windowClass) throws Exception{
super(windowClass, 0.3f);
}
+ @Override
public void applyShape(){ }
+ @Override
public void doTest() throws Exception{
super.doTest();
checkTranslucentShape();