KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > edit > command > DragAndDropFeedback


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: DragAndDropFeedback.java,v 1.2 2005/06/08 06:17:05 nickb Exp $
16  */

17 package org.eclipse.emf.edit.command;
18
19
20 import java.util.Collection JavaDoc;
21
22
23 /**
24  * This interface is implemented by any {@link org.eclipse.emf.common.command.Command} that supports detailed drag and drop feedback.
25  * This interface provides synonyms for all the important org.eclipse.swt.dnd.DND constants,
26  * so that commands can be written without reference to SWT.
27  */

28 public interface DragAndDropFeedback
29 {
30   /**
31    * This is the same as org.eclipse.swt.dnd.DND.DROP_NONE.
32    */

33   public final static int DROP_NONE = 0;
34
35   /**
36    * This is the same as org.eclipse.swt.dnd.DND.DROP_COPY.
37    */

38   public final static int DROP_COPY = 1;
39
40   /**
41    * This is the same as org.eclipse.swt.dnd.DND.DROP_MOVE.
42    */

43   public final static int DROP_MOVE = 2;
44
45   /**
46    * This is the same as org.eclipse.swt.dnd.DND.DROP_LINK.
47    */

48   public final static int DROP_LINK = 4;
49
50   /**
51    * This is the same as org.eclipse.swt.dnd.DND.FEEDBACK_NONE.
52    */

53   public final static int FEEDBACK_NONE = 0;
54
55   /**
56    * This is the same as org.eclipse.swt.dnd.DND.FEEDBACK_SELECT.
57    */

58   public final static int FEEDBACK_SELECT = 1;
59
60   /**
61    * This is the same as org.eclipse.swt.dnd.DND.FEEDBACK_INSERT_BEFORE.
62    */

63   public final static int FEEDBACK_INSERT_BEFORE = 2;
64
65   /**
66    * This is the same as org.eclipse.swt.dnd.DND.FEEDBACK_INSERT_AFTER.
67    */

68   public final static int FEEDBACK_INSERT_AFTER = 4;
69
70   /**
71    * This is called repeatedly as the drag and drop information changes.
72    * The collection, which represents the dragged source, does not normally change.
73    */

74   public boolean validate(Object JavaDoc owner, float location, int operations, int operation, Collection JavaDoc collection);
75
76   /**
77    * This returns one of the FEEDBACK_* values.
78    */

79   public int getFeedback();
80
81   /**
82    * This returns one of the DROP_* values.
83    */

84   public int getOperation();
85 }
86
Popular Tags