Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/util/TransferDragSourceListener.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 2005 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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module org.eclipse.jface.util.TransferDragSourceListener; | |
14 | |
15 import org.eclipse.swt.dnd.DragSourceListener; | |
16 import org.eclipse.swt.dnd.Transfer; | |
17 | |
18 import java.lang.all; | |
19 import java.util.Set; | |
20 | |
21 /** | |
22 * A <code>TransferDragSourceListener</code> is a <code>DragSourceListener</code> | |
23 * that can handle one type of SWT {@link Transfer}. | |
24 * The purpose of a <code>TransferDragSourceListener</code> is to: | |
25 * <ul> | |
26 * <li>Determine enablement for a drag operation. A <code>TransferDragSourceListener</code> | |
27 * will not be used in a drag operation if the <code>DragSourceEvent#doit</code> field | |
28 * is set to false in <code>DragSourceListener#dragStart(DragSourceEvent)</code>. | |
29 * <li>Set data for a single type of drag and <code>Transfer</code> type. | |
30 * </ul> | |
31 * <p> | |
32 * A <code>DelegatingDragAdapter</code> allows these functions to be implemented | |
33 * separately for unrelated types of drags. <code>DelegatingDragAdapter</code> then | |
34 * combines the function of each <code>TransferDragSourceListener</code>, while | |
35 * allowing them to be implemented as if they were the only <code>DragSourceListener</code>. | |
36 * </p> | |
37 * @since 3.0 | |
38 */ | |
39 public interface TransferDragSourceListener : DragSourceListener { | |
40 /** | |
41 * Returns the <code>Transfer</code> type that this listener can provide data for. | |
42 * | |
43 * @return the <code>Transfer</code> associated with this listener | |
44 */ | |
45 Transfer getTransfer(); | |
46 } |