/* * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.awt.dnd; import java.util.EventObject; 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. * * @since 1.2 * */ public class DropTargetEvent extends java.util.EventObject { private static final long serialVersionUID = 2821229066521922993L; /** * Construct a DropTargetEvent object with * the specified DropTargetContext. *

* @param dtc The DropTargetContext * @throws NullPointerException if {@code dtc} equals {@code null}. * @see #getSource() * @see #getDropTargetContext() */ 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; }