< prev index next >

test/jdk/java/awt/Window/ShapedAndTranslucentWindows/TranslucentWindowClick.java

Print this page




  23 import java.awt.*;
  24 import java.awt.event.MouseAdapter;
  25 import java.awt.event.MouseEvent;
  26 
  27 /*
  28  * @test
  29  * @key headful
  30  * @summary Check if components present in a window set with opacity less than 1.0
  31  *          triggers events correctly
  32  *
  33  * Test Description: Check if TRANSLUCENT Translucency type is supported on the
  34  *      current platform. Proceed if supported. Show a window which contains some
  35  *      components and set with opacity less than 1.0. Another Window having a
  36  *      canvas component drawn with an image can be used as the background for the
  37  *      test window. Click on the components present in the window and check if
  38  *      events trigger correctly.
  39  * Expected Result: The components should trigger events correctly
  40  *
  41  * @author mrkam
  42  * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
  43  * @library ../../../../lib/testlibrary
  44  * @build Common ExtendedRobot
  45  * @run main TranslucentWindowClick
  46  */
  47 public class TranslucentWindowClick extends Common {
  48 
  49     private Component south;
  50     private Component center;
  51     private Component north;
  52 
  53     volatile int clicked;
  54 
  55     public static void main(String[] args) throws Exception{
  56         if (checkTranslucencyMode(GraphicsDevice.WindowTranslucency.TRANSLUCENT))
  57             new TranslucentWindowClick(Window.class).doTest();
  58     }
  59 
  60     public TranslucentWindowClick(Class windowClass) throws Exception {
  61         super(windowClass);
  62     }
  63 




  23 import java.awt.*;
  24 import java.awt.event.MouseAdapter;
  25 import java.awt.event.MouseEvent;
  26 
  27 /*
  28  * @test
  29  * @key headful
  30  * @summary Check if components present in a window set with opacity less than 1.0
  31  *          triggers events correctly
  32  *
  33  * Test Description: Check if TRANSLUCENT Translucency type is supported on the
  34  *      current platform. Proceed if supported. Show a window which contains some
  35  *      components and set with opacity less than 1.0. Another Window having a
  36  *      canvas component drawn with an image can be used as the background for the
  37  *      test window. Click on the components present in the window and check if
  38  *      events trigger correctly.
  39  * Expected Result: The components should trigger events correctly
  40  *
  41  * @author mrkam
  42  * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
  43  * @library ../../../../lib/client
  44  * @build Common ExtendedRobot
  45  * @run main TranslucentWindowClick
  46  */
  47 public class TranslucentWindowClick extends Common {
  48 
  49     private Component south;
  50     private Component center;
  51     private Component north;
  52 
  53     volatile int clicked;
  54 
  55     public static void main(String[] args) throws Exception{
  56         if (checkTranslucencyMode(GraphicsDevice.WindowTranslucency.TRANSLUCENT))
  57             new TranslucentWindowClick(Window.class).doTest();
  58     }
  59 
  60     public TranslucentWindowClick(Class windowClass) throws Exception {
  61         super(windowClass);
  62     }
  63 


< prev index next >