10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
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
24 import java.awt.*;
25 import java.awt.event.*;
26 import java.awt.image.BufferedImage;
27
28 /*
29 * @test
30 * @summary Check if ActionEvent triggered when a TrayIcon is double
31 * (single, on Mac) clicked is visible by an AWTEventListener
32 * added to the Toolkit. It also checks if all listeners are
33 * triggered when multiple AWTEventListeners and ActionListeners
34 * are added.
35 * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
36 * @modules java.desktop/java.awt:open
37 * @library /java/awt/patchlib
38 * @library ../../../../lib/testlibrary ../
39 * @build java.desktop/java.awt.Helper
40 * @build ExtendedRobot SystemTrayIconHelper
41 * @run main ActionEventMask
42 */
43
44 public class ActionEventMask {
45
46 private Image image;
47
48 TrayIcon icon;
49 ExtendedRobot robot;
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
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
24 import java.awt.*;
25 import java.awt.event.*;
26 import java.awt.image.BufferedImage;
27
28 /*
29 * @test
30 * @key headful
31 * @summary Check if ActionEvent triggered when a TrayIcon is double
32 * (single, on Mac) clicked is visible by an AWTEventListener
33 * added to the Toolkit. It also checks if all listeners are
34 * triggered when multiple AWTEventListeners and ActionListeners
35 * are added.
36 * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
37 * @modules java.desktop/java.awt:open
38 * @library /java/awt/patchlib
39 * @library ../../../../lib/testlibrary ../
40 * @build java.desktop/java.awt.Helper
41 * @build ExtendedRobot SystemTrayIconHelper
42 * @run main ActionEventMask
43 */
44
45 public class ActionEventMask {
46
47 private Image image;
48
49 TrayIcon icon;
50 ExtendedRobot robot;
|