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 MouseEvents triggered by TrayIcon are visible
31 * by an AWTEventListener added to the Toolkit. It also
32 * checks if all listeners are triggered when AWTEventListeners
33 * and MouseListeners are added.
34 * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
35 * @modules java.desktop/java.awt:open
36 * @library /java/awt/patchlib
37 * @library ../../../../lib/testlibrary ../
38 * @build java.desktop/java.awt.Helper
39 * @build ExtendedRobot SystemTrayIconHelper
40 * @run main MouseEventMaskTest
41 */
42
43 public class MouseEventMaskTest {
44
45 TrayIcon icon;
46 Robot robot;
47 int[] buttonTypes = {
48 InputEvent.BUTTON1_MASK,
49 InputEvent.BUTTON2_MASK,
|
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 MouseEvents triggered by TrayIcon are visible
32 * by an AWTEventListener added to the Toolkit. It also
33 * checks if all listeners are triggered when AWTEventListeners
34 * and MouseListeners 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 MouseEventMaskTest
42 */
43
44 public class MouseEventMaskTest {
45
46 TrayIcon icon;
47 Robot robot;
48 int[] buttonTypes = {
49 InputEvent.BUTTON1_MASK,
50 InputEvent.BUTTON2_MASK,
|