comparison dwt/dnd/DragSourceEffect.d @ 96:bc175cd0484a

Ported dwt.dnd.DragSourceEffect
author Jacob Carlborg <doob@me.com>
date Tue, 30 Dec 2008 20:52:35 +0100
parents d8635bb48c7c
children
comparison
equal deleted inserted replaced
95:52007db1276d 96:bc175cd0484a
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
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 *
11 * Port to the D programming language:
12 * Jacob Carlborg <doob@me.com>
10 *******************************************************************************/ 13 *******************************************************************************/
11 module dwt.dnd.DragSourceEffect; 14 module dwt.dnd.DragSourceEffect;
12 15
13 import dwt.dwthelper.utils; 16 import dwt.dwthelper.utils;
14 17
15 import dwt.DWT; 18 import dwt.DWT;
16 import dwt.widgets.Control; 19 import dwt.widgets.Control;
20
21 import dwt.dnd.DragSourceAdapter;
17 22
18 /** 23 /**
19 * This class provides default implementations to display a drag source 24 * This class provides default implementations to display a drag source
20 * effect during a drag and drop operation. The current implementation 25 * effect during a drag and drop operation. The current implementation
21 * does not provide any visual feedback. 26 * does not provide any visual feedback.
36 * @see DragSourceEvent 41 * @see DragSourceEvent
37 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> 42 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
38 * 43 *
39 * @since 3.3 44 * @since 3.3
40 */ 45 */
41 public class DragSourceEffect extends DragSourceAdapter { 46 public class DragSourceEffect : DragSourceAdapter {
42 Control control = null; 47 Control control = null;
43 48
44 /** 49 /**
45 * Creates a new <code>DragSourceEffect</code> to handle drag effect from the specified <code>Control</code>. 50 * Creates a new <code>DragSourceEffect</code> to handle drag effect from the specified <code>Control</code>.
46 * 51 *
48 * 53 *
49 * @exception IllegalArgumentException <ul> 54 * @exception IllegalArgumentException <ul>
50 * <li>ERROR_NULL_ARGUMENT - if the control is null</li> 55 * <li>ERROR_NULL_ARGUMENT - if the control is null</li>
51 * </ul> 56 * </ul>
52 */ 57 */
53 public DragSourceEffect(Control control) { 58 public this(Control control) {
54 if (control is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 59 if (control is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
55 this.control = control; 60 this.control = control;
56 } 61 }
57 62
58 /** 63 /**