/* * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * 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. */ /** * Drag and Drop is a direct manipulation gesture found in many Graphical User * Interface systems that provides a mechanism to transfer information between * two entities logically associated with presentation elements in the GUI. * Normally driven by a physical gesture of a human user using an appropriate * input device, Drag and Drop provides both a mechanism to enable continuous * feedback regarding the possible outcome of any subsequent data transfer to * the user during navigation over the presentation elements in the GUI, and the * facilities to provide for any subsequent data negotiation and transfer. *

* This package defines the classes and interfaces necessary to perform Drag and * Drop operations in Java. It defines classes for the drag-source and the * drop-target, as well as events for transferring the data being dragged. This * package also provides a means for giving visual feedback to the user * throughout the duration of the Drag and Drop operation. *

* A typical Drag and Drop operation can be decomposed into the following states * (not entirely sequentially): *

*

* The gesture itself moves a logical cursor across the GUI hierarchy, * intersecting the geometry of GUI Component(s), possibly resulting in the * logical "Drag" cursor entering, crossing, and subsequently leaving * {@code Component}(s) and associated {@code DropTarget}(s). *

* The {@code DragSource} object manifests "Drag Over" feedback to the user, in * the typical case by animating the GUI {@code Cursor} associated with the * logical cursor. *

* {@code DropTarget} objects manifest "Drag Under" feedback to the user, in the * typical case, by rendering animations into their associated GUI * {@code Component}(s) under the GUI Cursor. *

* The determination of the feedback effects, and the ultimate success or * failure of the data transfer, should one occur, is parameterized as follows: *

* * @since 1.2 */ package java.awt.dnd;