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.Point;
13: import org.eclipse.swt.graphics.Rectangle;
14: import org.eclipse.swt.widgets.Control;
15:
16: /**
17: * Implementers of this interface will receive notifications when objects are dragged over
18: * a particular SWT control.
19: */
20: public interface IDragOverListener {
21:
22: /**
23: * Notifies the receiver that the given object has been dragged over
24: * the given position. Returns a drop target if the object may be
25: * dropped in this position. Returns null otherwise.
26: *
27: * @param draggedObject object being dragged over this location
28: * @param position location of the cursor
29: * @param dragRectangle current drag rectangle (may be an empty rectangle if none)
30: * @return a valid drop target or null if none
31: */
32: IDropTarget drag(Control currentControl, Object draggedObject,
33: Point position, Rectangle dragRectangle);
34: }
|