Mercurial > projects > dwt-mac
comparison dwt/dnd/DropTargetListener.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | e831403a80a9 |
children | 43123e716bda |
comparison
equal
deleted
inserted
replaced
44:ca5e494f2bbf | 45:d8635bb48c7c |
---|---|
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
8 * Contributors: | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 *******************************************************************************/ | 10 *******************************************************************************/ |
11 module dwt.dnd; | 11 module dwt.dnd.DropTargetListener; |
12 | |
13 import dwt.dwthelper.utils; | |
12 | 14 |
13 import dwt.internal.DWTEventListener; | 15 import dwt.internal.DWTEventListener; |
14 | 16 |
15 /** | 17 /** |
16 * The <code>DropTargetListener</code> class provides event notification to the application | 18 * The <code>DropTargetListener</code> class provides event notification to the application |
31 * operation that is performed but the data type is fixed.</p> | 33 * operation that is performed but the data type is fixed.</p> |
32 * | 34 * |
33 * @see DropTargetEvent | 35 * @see DropTargetEvent |
34 * | 36 * |
35 */ | 37 */ |
36 public interface DropTargetListener : DWTEventListener { | 38 public interface DropTargetListener extends DWTEventListener { |
37 | 39 |
38 /** | 40 /** |
39 * The cursor has entered the drop target boundaries. | 41 * The cursor has entered the drop target boundaries. |
40 * | 42 * |
41 * <p>The following fields in the DropTargetEvent apply: | 43 * <p>The following fields in the DropTargetEvent apply: |
174 * data as follows:</p> | 176 * data as follows:</p> |
175 * | 177 * |
176 * <pre><code> | 178 * <pre><code> |
177 * public void dragOver(DropTargetEvent event) { | 179 * public void dragOver(DropTargetEvent event) { |
178 * TextTransfer textTransfer = TextTransfer.getInstance(); | 180 * TextTransfer textTransfer = TextTransfer.getInstance(); |
179 * String data = cast(String)textTransfer.nativeToJava(event.currentDataType); | 181 * String data = (String)textTransfer.nativeToJava(event.currentDataType); |
180 * if (data !is null) { | 182 * if (data !is null) { |
181 * System.out.println("Data to be dropped is cast(Text)"+data); | 183 * System.out.println("Data to be dropped is (Text)"+data); |
182 * } | 184 * } |
183 * }; | 185 * }; |
184 * </code></pre> | 186 * </code></pre> |
185 * | 187 * |
186 * @param event the information associated with the drag over event | 188 * @param event the information associated with the drag over event |