< prev index next >

test/java/awt/TrayIcon/MouseMovedTest/MouseMovedTest.java

Print this page

        

*** 29,46 **** * @test * @bug 7153700 * @summary Check for mouseMoved event for java.awt.TrayIcon * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com) * @library ../../../../lib/testlibrary ! * @build ExtendedRobot * @run main MouseMovedTest */ public class MouseMovedTest { static volatile boolean moved; public static void main(String[] args) throws Exception { moved = false; TrayIcon icon = new TrayIcon(new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB), "Test icon"); icon.addMouseMotionListener(new MouseMotionAdapter() { public void mouseMoved(MouseEvent event) { --- 29,54 ---- * @test * @bug 7153700 * @summary Check for mouseMoved event for java.awt.TrayIcon * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com) * @library ../../../../lib/testlibrary ! * @build ExtendedRobot SystemTrayIconHelper * @run main MouseMovedTest */ public class MouseMovedTest { static volatile boolean moved; public static void main(String[] args) throws Exception { + if (!SystemTray.isSupported()) { + return; + } + + if (SystemTrayIconHelper.isOel7()) { + return; + } + moved = false; TrayIcon icon = new TrayIcon(new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB), "Test icon"); icon.addMouseMotionListener(new MouseMotionAdapter() { public void mouseMoved(MouseEvent event) {
< prev index next >