21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.lwawt.macosx;
27
28 import java.awt.*;
29
30 import sun.awt.dnd.SunDropTargetContextPeer;
31 import sun.awt.dnd.SunDropTargetEvent;
32
33 import javax.swing.*;
34
35
36 final class CDropTargetContextPeer extends SunDropTargetContextPeer {
37
38 private long fNativeDropTransfer = 0;
39 private long fNativeDataAvailable = 0;
40 private Object fNativeData = null;
41 private boolean insideTarget = false;
42
43 Object awtLockAccess = new Object();
44
45 static CDropTargetContextPeer getDropTargetContextPeer() {
46 return new CDropTargetContextPeer();
47 }
48
49 private CDropTargetContextPeer() {
50 super();
51 }
52
53 // We block, waiting for an empty event to get posted (CToolkit.invokeAndWait)
54 // This is so we finish dispatching DropTarget events before we dispatch the dragDropFinished event (which is a higher priority).
55 private void flushEvents(Component c) {
56 try {
57 LWCToolkit.invokeAndWait(new Runnable() {
58 public synchronized void run() {
59 }
60 }, c);
61 }
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.lwawt.macosx;
27
28 import java.awt.*;
29
30 import sun.awt.dnd.SunDropTargetContextPeer;
31 import sun.awt.dnd.SunDropTargetEvent;
32
33 import javax.swing.*;
34
35
36 final class CDropTargetContextPeer extends SunDropTargetContextPeer {
37
38 private long fNativeDropTransfer = 0;
39 private long fNativeDataAvailable = 0;
40 private Object fNativeData = null;
41 private boolean insideTarget = true;
42
43 Object awtLockAccess = new Object();
44
45 static CDropTargetContextPeer getDropTargetContextPeer() {
46 return new CDropTargetContextPeer();
47 }
48
49 private CDropTargetContextPeer() {
50 super();
51 }
52
53 // We block, waiting for an empty event to get posted (CToolkit.invokeAndWait)
54 // This is so we finish dispatching DropTarget events before we dispatch the dragDropFinished event (which is a higher priority).
55 private void flushEvents(Component c) {
56 try {
57 LWCToolkit.invokeAndWait(new Runnable() {
58 public synchronized void run() {
59 }
60 }, c);
61 }
|