/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* The XDropTargetContextPeer is the class responsible for handling
*
* @since 1.5
*/
/*
* A key to store a peer instance for an AppContext.
*/
private XDropTargetContextPeer() {}
synchronized (_globalLock) {
peer = new XDropTargetContextPeer();
}
return peer;
}
}
return XDropTargetProtocolListenerImpl.getInstance();
}
/*
* @param returnValue the drop action selected by the Java drop target.
*/
boolean dispatcherDone) {
/* The native context is the pointer to the XClientMessageEvent
structure. */
long ctxt = getNativeDragContext();
/* If the event was not consumed, send a response to the source. */
try {
while (dropTargetProtocols.hasNext()) {
returnValue)) {
break;
}
}
}
} finally {
}
}
}
boolean isLocal) {
/* The native context is the pointer to the XClientMessageEvent
structure. */
long ctxt = getNativeDragContext();
if (ctxt != 0) {
try {
while (dropTargetProtocols.hasNext()) {
dropAction)) {
break;
}
}
} finally {
}
}
}
throws IOException {
/* The native context is the pointer to the XClientMessageEvent
structure. */
long ctxt = getNativeDragContext();
if (ctxt != 0) {
while (dropTargetProtocols.hasNext()) {
// getData throws IAE if ctxt is not for this protocol.
try {
} catch (IllegalArgumentException iae) {
}
}
}
return null;
}
private void cleanup() {
}
if (!processSunDropTargetEvent(event)) {
super.processEnterMessage(event);
}
}
if (!processSunDropTargetEvent(event)) {
super.processExitMessage(event);
}
}
boolean operationChanged) {
if (!processSunDropTargetEvent(event)) {
}
}
if (!processSunDropTargetEvent(event)) {
super.processDropMessage(event);
}
}
// If source is an XEmbedCanvasPeer, passes the event to it for processing and
// return true if the event is forwarded to the XEmbed child.
// Otherwise, does nothing and return false.
if (peer instanceof XEmbedCanvasPeer) {
/* The native context is the pointer to the XClientMessageEvent
structure. */
long ctxt = getNativeDragContext();
}
/* If the event is not consumed, pass it to the
XEmbedCanvasPeer for processing. */
if (!event.isConsumed()) {
// NOTE: ctxt can be zero at this point.
return true;
}
}
}
}
return false;
}
int eventID) {
while (dropTargetProtocols.hasNext()) {
eventID)) {
break;
}
}
}
static final class XDropTargetProtocolListenerImpl
implements XDropTargetProtocolListener {
private XDropTargetProtocolListenerImpl() {}
return theInstance;
}
int dropAction, int actions,
long[] formats, long nativeCtxt,
int eventID) {
// The Every component is associated with some AppContext.
// Every component is associated with some AppContext.
assert appContext != null;
}
}
}