01: /*******************************************************************************
02: * Copyright (c) 2004, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.dnd;
11:
12: import org.eclipse.swt.graphics.Cursor;
13: import org.eclipse.swt.graphics.Rectangle;
14:
15: /**
16: * This interface is used to drop objects. It knows how to drop a particular object
17: * in a particular location. IDropTargets are typically created by IDragOverListeners, and
18: * it is the job of the IDragOverListener to supply the drop target with information about
19: * the object currently being dragged.
20: *
21: * @see org.eclipse.ui.internal.dnd.IDragOverListener
22: */
23: public interface IDropTarget {
24:
25: /**
26: * Drops the object in this position
27: */
28: void drop();
29:
30: /**
31: * Returns a cursor describing this drop operation
32: *
33: * @return a cursor describing this drop operation
34: */
35: Cursor getCursor();
36:
37: /**
38: * Returns a rectangle (screen coordinates) describing the target location
39: * for this drop operation.
40: *
41: * @return a snap rectangle or null if this drop target does not have a specific snap
42: * location.
43: */
44: Rectangle getSnapRectangle();
45: }
|