KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > dnd > IDragOverListener


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.dnd;
12
13 import org.eclipse.swt.graphics.Point;
14 import org.eclipse.swt.graphics.Rectangle;
15 import org.eclipse.swt.widgets.Control;
16
17 /**
18  * Implementers of this interface will receive notifications when objects are dragged over
19  * a particular SWT control.
20  */

21 public interface IDragOverListener {
22
23     /**
24      * Notifies the receiver that the given object has been dragged over
25      * the given position. Returns a drop target if the object may be
26      * dropped in this position. Returns null otherwise.
27      *
28      * @param draggedObject object being dragged over this location
29      * @param position location of the cursor
30      * @param dragRectangle current drag rectangle (may be an empty rectangle if none)
31      * @return a valid drop target or null if none
32      */

33     IDropTarget drag(Control currentControl, Object JavaDoc draggedObject,
34             Point position, Rectangle dragRectangle);
35 }
36
Popular Tags