]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.g2d/src/org/simantics/g2d/dnd/IDropTargetParticipant.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / dnd / IDropTargetParticipant.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 /*
13  *
14  * @author Toni Kalajainen
15  */
16 package org.simantics.g2d.dnd;
17
18 import java.awt.dnd.DropTargetDragEvent;
19 import java.awt.dnd.DropTargetDropEvent;
20 import java.awt.dnd.DropTargetEvent;
21
22 import org.simantics.g2d.canvas.ICanvasParticipant;
23
24 /**
25  * IDropParticipant is an interface for taking part of a DnD event. 
26  * {@link IDnDContext} is a context used during the life cycle of the event.
27  * 
28  * IDnDParticipant implementations require {@link DropInteractor}. 
29  *
30  * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
31  */
32 public interface IDropTargetParticipant extends ICanvasParticipant {
33
34         void dragEnter(DropTargetDragEvent dtde, IDnDContext dp);
35         
36         void dragExit(DropTargetEvent dte, IDnDContext dp);
37
38         void dragOver(DropTargetDragEvent dtde, IDnDContext dp);
39
40         void drop(DropTargetDropEvent dtde, IDnDContext dp);
41         
42         void dropActionChanged(DropTargetDragEvent dtde, IDnDContext dp);
43         
44         /**
45          * Get allowed ops (See DnDConstants)
46          * @return
47          */
48         int getAllowedOps();
49         
50         double getPriority();
51         
52 }