equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
30 |
30 |
31 import java.io.IOException; |
31 import java.io.IOException; |
32 |
32 |
33 import java.util.Iterator; |
33 import java.util.Iterator; |
34 |
34 |
|
35 import sun.awt.AWTAccessor; |
35 import sun.util.logging.PlatformLogger; |
36 import sun.util.logging.PlatformLogger; |
36 |
37 |
37 import sun.awt.AppContext; |
38 import sun.awt.AppContext; |
38 import sun.awt.SunToolkit; |
39 import sun.awt.SunToolkit; |
39 |
40 |
186 } |
187 } |
187 |
188 |
188 // If source is an XEmbedCanvasPeer, passes the event to it for processing and |
189 // If source is an XEmbedCanvasPeer, passes the event to it for processing and |
189 // return true if the event is forwarded to the XEmbed child. |
190 // return true if the event is forwarded to the XEmbed child. |
190 // Otherwise, does nothing and return false. |
191 // Otherwise, does nothing and return false. |
191 @SuppressWarnings("deprecation") |
|
192 private boolean processSunDropTargetEvent(SunDropTargetEvent event) { |
192 private boolean processSunDropTargetEvent(SunDropTargetEvent event) { |
193 Object source = event.getSource(); |
193 Object source = event.getSource(); |
194 |
194 |
195 if (source instanceof Component) { |
195 if (source instanceof Component) { |
196 ComponentPeer peer = ((Component)source).getPeer(); |
196 Object peer = AWTAccessor.getComponentAccessor() |
|
197 .getPeer((Component) source); |
197 if (peer instanceof XEmbedCanvasPeer) { |
198 if (peer instanceof XEmbedCanvasPeer) { |
198 XEmbedCanvasPeer xEmbedCanvasPeer = (XEmbedCanvasPeer)peer; |
199 XEmbedCanvasPeer xEmbedCanvasPeer = (XEmbedCanvasPeer)peer; |
199 /* The native context is the pointer to the XClientMessageEvent |
200 /* The native context is the pointer to the XClientMessageEvent |
200 structure. */ |
201 structure. */ |
201 long ctxt = getNativeDragContext(); |
202 long ctxt = getNativeDragContext(); |