< prev index next >

test/jdk/java/awt/TrayIcon/TrayIconPopup/TrayIconPopupClickTest.java

Print this page




  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 import java.awt.TrayIcon;
  24 import java.awt.SystemTray;
  25 import java.awt.EventQueue;
  26 import java.awt.Point;
  27 import java.awt.AWTException;
  28 import java.awt.event.MouseEvent;
  29 import java.awt.event.ActionEvent;
  30 import java.awt.event.ActionListener;
  31 import java.awt.event.InputEvent;
  32 import java.awt.event.MouseAdapter;
  33 import java.awt.image.BufferedImage;
  34 
  35 /*
  36  * @test

  37  * @summary Check if a action performed event is received when TrayIcon display
  38  *          message is clicked on.
  39  * @author Shashidhara Veerabhadraiah (shashidhara.veerabhadraiah@oracle.com)
  40  * @modules java.desktop/java.awt:open
  41  * @library /java/awt/patchlib
  42  * @library ../../../../lib/testlibrary ../
  43  * @build java.desktop/java.awt.Helper
  44  * @build ExtendedRobot SystemTrayIconHelper
  45  * @run main TrayIconPopupClickTest
  46  */
  47 
  48 public class TrayIconPopupClickTest {
  49 
  50     TrayIcon icon;
  51     ExtendedRobot robot;
  52     boolean actionPerformed = false;
  53 
  54     public static void main(String[] args) throws Exception {
  55         if (!SystemTray.isSupported()) {
  56             System.out.println("SystemTray not supported on the platform under test. " +




  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 import java.awt.TrayIcon;
  24 import java.awt.SystemTray;
  25 import java.awt.EventQueue;
  26 import java.awt.Point;
  27 import java.awt.AWTException;
  28 import java.awt.event.MouseEvent;
  29 import java.awt.event.ActionEvent;
  30 import java.awt.event.ActionListener;
  31 import java.awt.event.InputEvent;
  32 import java.awt.event.MouseAdapter;
  33 import java.awt.image.BufferedImage;
  34 
  35 /*
  36  * @test
  37  * @key headful
  38  * @summary Check if a action performed event is received when TrayIcon display
  39  *          message is clicked on.
  40  * @author Shashidhara Veerabhadraiah (shashidhara.veerabhadraiah@oracle.com)
  41  * @modules java.desktop/java.awt:open
  42  * @library /java/awt/patchlib
  43  * @library ../../../../lib/testlibrary ../
  44  * @build java.desktop/java.awt.Helper
  45  * @build ExtendedRobot SystemTrayIconHelper
  46  * @run main TrayIconPopupClickTest
  47  */
  48 
  49 public class TrayIconPopupClickTest {
  50 
  51     TrayIcon icon;
  52     ExtendedRobot robot;
  53     boolean actionPerformed = false;
  54 
  55     public static void main(String[] args) throws Exception {
  56         if (!SystemTray.isSupported()) {
  57             System.out.println("SystemTray not supported on the platform under test. " +


< prev index next >