1 /*2 * @(#)DropTargetEvent.java 1.18 03/12/193 *4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.6 */7 8 package java.awt.dnd;9 10 import java.util.EventObject ;11 12 import java.awt.Component ;13 import java.awt.Point ;14 15 import java.awt.datatransfer.DataFlavor ;16 17 import java.awt.dnd.DropTarget ;18 import java.awt.dnd.DropTargetContext ;19 20 /**21 * The <code>DropTargetEvent</code> is the base 22 * class for both the <code>DropTargetDragEvent</code>23 * and the <code>DropTargetDropEvent</code>. 24 * It encapsulates the current state of the Drag and25 * Drop operations, in particular the current 26 * <code>DropTargetContext</code>.27 *28 * @version 1.18, 12/19/0329 * @since 1.230 *31 */32 33 public class DropTargetEvent extends java.util.EventObject {34 35 private static final long serialVersionUID = 2821229066521922993L;36 37 /**38 * Construct a <code>DropTargetEvent</code> with 39 * a specified <code>DropTargetContext</code>.40 * <P>41 * @param dtc the <code>DropTargetContext</code>42 */43 44 public DropTargetEvent(DropTargetContext dtc) {45 super(dtc.getDropTarget());46 47 context = dtc;48 }49 50 /**51 * This method returns the <code>DropTargetContext</code>52 * associated with this <code>DropTargetEvent</code>.53 * <P>54 * @return the <code>DropTargetContext</code>55 */56 57 public DropTargetContext getDropTargetContext() {58 return context;59 }60 61 /**62 * The <code>DropTargetContext</code> associated with this63 * <code>DropTargetEvent</code>.64 *65 * @serial66 */67 protected DropTargetContext context;68 }69