< prev index next >

test/jdk/java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java

Print this page




  21  * questions.
  22  */
  23 
  24 import java.awt.EventQueue;
  25 import java.awt.Point;
  26 import java.awt.SystemTray;
  27 import java.awt.TrayIcon;
  28 import java.awt.event.InputEvent;
  29 import java.awt.image.BufferedImage;
  30 
  31 /*
  32  * @test
  33  * @bug 6384991
  34  * @key headful
  35  * @summary Check if ActionEvent is triggered by a TrayIcon when
  36  *          it is double clicked with mouse button 1 on windows
  37  *          or single clicked with button 3 on Mac OS X
  38  *          or single clicked with button 1 on rest.
  39  * @modules java.desktop/java.awt:open
  40  * @library /java/awt/patchlib
  41  * @library ../../../../lib/testlibrary ../
  42  * @build java.desktop/java.awt.Helper
  43  * @build ExtendedRobot SystemTrayIconHelper
  44  * @run main TrayIconMouseTest
  45  */
  46 
  47 public class TrayIconMouseTest {
  48 
  49     TrayIcon icon;
  50     ExtendedRobot robot;
  51     boolean actionPerformed = false;
  52     Object actionLock = new Object();
  53     static boolean isMacOS = false;
  54     static boolean isWinOS = false;
  55     static boolean isOelOS = false;
  56     String caption = "Sample Icon";
  57     int[] buttonTypes = {
  58         InputEvent.BUTTON1_MASK,
  59         InputEvent.BUTTON2_MASK,
  60         InputEvent.BUTTON3_MASK
  61     };




  21  * questions.
  22  */
  23 
  24 import java.awt.EventQueue;
  25 import java.awt.Point;
  26 import java.awt.SystemTray;
  27 import java.awt.TrayIcon;
  28 import java.awt.event.InputEvent;
  29 import java.awt.image.BufferedImage;
  30 
  31 /*
  32  * @test
  33  * @bug 6384991
  34  * @key headful
  35  * @summary Check if ActionEvent is triggered by a TrayIcon when
  36  *          it is double clicked with mouse button 1 on windows
  37  *          or single clicked with button 3 on Mac OS X
  38  *          or single clicked with button 1 on rest.
  39  * @modules java.desktop/java.awt:open
  40  * @library /java/awt/patchlib
  41  * @library ../../../../lib/client ../
  42  * @build java.desktop/java.awt.Helper
  43  * @build ExtendedRobot SystemTrayIconHelper
  44  * @run main TrayIconMouseTest
  45  */
  46 
  47 public class TrayIconMouseTest {
  48 
  49     TrayIcon icon;
  50     ExtendedRobot robot;
  51     boolean actionPerformed = false;
  52     Object actionLock = new Object();
  53     static boolean isMacOS = false;
  54     static boolean isWinOS = false;
  55     static boolean isOelOS = false;
  56     String caption = "Sample Icon";
  57     int[] buttonTypes = {
  58         InputEvent.BUTTON1_MASK,
  59         InputEvent.BUTTON2_MASK,
  60         InputEvent.BUTTON3_MASK
  61     };


< prev index next >