/*
* @(#)DropTargetEvent.java 1.18 03/12/19
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.awt.dnd;
import java.util.EventObject;
import java.awt.Component;
import java.awt.Point;
import java.awt.datatransfer.DataFlavor;
import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetContext;
/**
* The DropTargetEvent
is the base
* class for both the DropTargetDragEvent
* and the DropTargetDropEvent
.
* It encapsulates the current state of the Drag and
* Drop operations, in particular the current
* DropTargetContext
.
*
* @version 1.18, 12/19/03
* @since 1.2
*
*/
public class DropTargetEvent extends java.util.EventObject {
private static final long serialVersionUID = 2821229066521922993L;
/**
* Construct a DropTargetEvent
with
* a specified DropTargetContext
.
*
* @param dtc the DropTargetContext
*/
public DropTargetEvent(DropTargetContext dtc) {
super(dtc.getDropTarget());
context = dtc;
}
/**
* This method returns the DropTargetContext
* associated with this DropTargetEvent
.
*
* @return the DropTargetContext
*/
public DropTargetContext getDropTargetContext() {
return context;
}
/**
* The DropTargetContext
associated with this
* DropTargetEvent
.
*
* @serial
*/
protected DropTargetContext context;
}