]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/dnd/DropTargetAdapter.java
Work around SWT 4.13 - 4.18 Win32 DnD bug 567422
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / dnd / DropTargetAdapter.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2016 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.swt.dnd;
15
16
17 /**
18  * This adapter class provides default implementations for the
19  * methods described by the <code>DropTargetListener</code> interface.
20  * <p>
21  * Classes that wish to deal with <code>DropTargetEvent</code>s can
22  * extend this class and override only the methods which they are
23  * interested in.
24  * </p>
25  *
26  *<p>
27  * Please note, there are subtle difference in DND behavior on different OS's.
28  * For example during a file transfer, Windows will put out the file path
29  * as soon as the drag begins, where as Linux will make it available only
30  * on a drop operation. For correct crossplatform behavior, it is recommended
31  * to delay OS interaction until drop has occurred or verify the correctness of
32  * the operation across platforms.
33  * </p>
34  *
35  *
36  * @see DropTargetListener
37  * @see DropTargetEvent
38  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
39  * @see <a href="https://eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html"> Eclipse corner article on DND </a>
40  */
41 public class DropTargetAdapter implements DropTargetListener {
42
43 /**
44  * This implementation of <code>dragEnter</code> permits the default
45  * operation defined in <code>event.detail</code>to be performed on the current data type
46  * defined in <code>event.currentDataType</code>.
47  * For additional information see <code>DropTargetListener.dragEnter</code>.
48  *
49  * @param event the information associated with the drag enter event
50  */
51 @Override
52 public void dragEnter(DropTargetEvent event){}
53
54 /**
55  * This implementation of <code>dragLeave</code> does nothing.
56  * For additional information see <code>DropTargetListener.dragOperationChanged</code>.
57  *
58  * @param event the information associated with the drag leave event
59  */
60 @Override
61 public void dragLeave(DropTargetEvent event){}
62
63 /**
64  * This implementation of <code>dragOperationChanged</code> permits the default
65  * operation defined in <code>event.detail</code>to be performed on the current data type
66  * defined in <code>event.currentDataType</code>.
67  * For additional information see <code>DropTargetListener.dragOperationChanged</code>.
68  *
69  * @param event the information associated with the drag operation changed event
70  */
71 @Override
72 public void dragOperationChanged(DropTargetEvent event){}
73
74 /**
75  * This implementation of <code>dragOver</code> permits the default
76  * operation defined in <code>event.detail</code>to be performed on the current data type
77  * defined in <code>event.currentDataType</code>.
78  * For additional information see <code>DropTargetListener.dragOver</code>.
79  *
80  * @param event the information associated with the drag over event
81  */
82 @Override
83 public void dragOver(DropTargetEvent event){}
84
85 /**
86  * This implementation of <code>drop</code> does nothing.
87  * For additional information see <code>DropTargetListener.drop</code>.
88  *
89  * @param event the information associated with the drop event
90  */
91 @Override
92 public void drop(DropTargetEvent event){}
93
94 /**
95  * This implementation of <code>dropAccept</code> permits the default
96  * operation defined in <code>event.detail</code>to be performed on the current data type
97  * defined in <code>event.currentDataType</code>.
98  * For additional information see <code>DropTargetListener.dropAccept</code>.
99  *
100  * @param event the information associated with the drop accept event
101  */
102 @Override
103 public void dropAccept(DropTargetEvent event){}
104
105 }