26 import java.awt.Point;
27 import java.awt.Robot;
28 import java.awt.Window;
29 import java.awt.datatransfer.DataFlavor;
30 import java.awt.datatransfer.Transferable;
31 import java.awt.dnd.DnDConstants;
32 import java.awt.dnd.DragGestureEvent;
33 import java.awt.dnd.DragGestureListener;
34 import java.awt.dnd.DragSource;
35 import java.awt.dnd.DropTarget;
36 import java.awt.dnd.DropTargetDragEvent;
37 import java.awt.dnd.DropTargetDropEvent;
38 import java.awt.dnd.DropTargetEvent;
39 import java.awt.dnd.DropTargetListener;
40 import java.awt.event.InputEvent;
41 import java.awt.event.MouseAdapter;
42 import java.awt.event.MouseEvent;
43
44 /*
45 * @test
46 * @bug 8134917
47 * @summary [macosx] JOptionPane doesn't receive mouse events when opened from a drop event
48 * @author Alexandr Scherbatiy
49 */
50 public class MissingEventsOnModalDialogTest {
51
52 private static volatile boolean passed = false;
53
54 public static void main(String[] args) throws Exception {
55 Frame sourceFrame = createFrame("Source Frame", 0, 0);
56 Frame targetFrame = createFrame("Target Frame", 250, 250);
57
58 DragSource defaultDragSource
59 = DragSource.getDefaultDragSource();
60 defaultDragSource.createDefaultDragGestureRecognizer(sourceFrame,
61 DnDConstants.ACTION_COPY_OR_MOVE,
62 new TestDragGestureListener());
63 new DropTarget(targetFrame, DnDConstants.ACTION_COPY_OR_MOVE,
64 new TestDropTargetListener(targetFrame));
65
|
26 import java.awt.Point;
27 import java.awt.Robot;
28 import java.awt.Window;
29 import java.awt.datatransfer.DataFlavor;
30 import java.awt.datatransfer.Transferable;
31 import java.awt.dnd.DnDConstants;
32 import java.awt.dnd.DragGestureEvent;
33 import java.awt.dnd.DragGestureListener;
34 import java.awt.dnd.DragSource;
35 import java.awt.dnd.DropTarget;
36 import java.awt.dnd.DropTargetDragEvent;
37 import java.awt.dnd.DropTargetDropEvent;
38 import java.awt.dnd.DropTargetEvent;
39 import java.awt.dnd.DropTargetListener;
40 import java.awt.event.InputEvent;
41 import java.awt.event.MouseAdapter;
42 import java.awt.event.MouseEvent;
43
44 /*
45 * @test
46 * @key headful
47 * @bug 8134917
48 * @summary [macosx] JOptionPane doesn't receive mouse events when opened from a drop event
49 * @author Alexandr Scherbatiy
50 */
51 public class MissingEventsOnModalDialogTest {
52
53 private static volatile boolean passed = false;
54
55 public static void main(String[] args) throws Exception {
56 Frame sourceFrame = createFrame("Source Frame", 0, 0);
57 Frame targetFrame = createFrame("Target Frame", 250, 250);
58
59 DragSource defaultDragSource
60 = DragSource.getDefaultDragSource();
61 defaultDragSource.createDefaultDragGestureRecognizer(sourceFrame,
62 DnDConstants.ACTION_COPY_OR_MOVE,
63 new TestDragGestureListener());
64 new DropTarget(targetFrame, DnDConstants.ACTION_COPY_OR_MOVE,
65 new TestDropTargetListener(targetFrame));
66
|