# HG changeset patch # User Jacob Carlborg # Date 1230726264 -3600 # Node ID 1c12673c65cac5e3e633b201ff2d329c1486e500 # Parent 43123e716bdaa95ef3070e921a6cdd1327d03dff Ported dwt.dnd.DropTargetEvent diff -r 43123e716bda -r 1c12673c65ca dwt/dnd/DropTargetEvent.d --- a/dwt/dnd/DropTargetEvent.d Wed Dec 31 13:21:58 2008 +0100 +++ b/dwt/dnd/DropTargetEvent.d Wed Dec 31 13:24:24 2008 +0100 @@ -7,6 +7,9 @@ * * Contributors: * IBM Corporation - initial API and implementation + * + * Port to the D programming language: + * Jacob Carlborg *******************************************************************************/ module dwt.dnd.DropTargetEvent; @@ -15,12 +18,15 @@ import dwt.events.TypedEvent; import dwt.widgets.Widget; +import dwt.dnd.DNDEvent; +import dwt.dnd.TransferData; + /** * The DropTargetEvent contains the event information passed in the methods of the DropTargetListener. * * @see Sample code and further information */ -public class DropTargetEvent extends TypedEvent { +public class DropTargetEvent : TypedEvent { /** * The x-cordinate of the cursor relative to the Display */ @@ -83,7 +89,7 @@ */ public TransferData[] dataTypes; - static final long serialVersionUID = 3256727264573338678L; + static const long serialVersionUID = 3256727264573338678L; /** * Constructs a new instance of this class based on the @@ -91,7 +97,7 @@ * * @param e the untyped event containing the information */ -public DropTargetEvent(DNDEvent e) { +public this(DNDEvent e) { super(e); this.data = e.data; this.x = e.x; @@ -128,7 +134,7 @@ sb.append(string.substring (0, string.length() - 1)); // remove trailing '}' sb.append(" x="); sb.append(x); sb.append(" y="); sb.append(y); - sb.append(" item="); sb.append(item); + sb.append(" item="); sb.append(item.toString); sb.append(" operations="); sb.append(operations); sb.append(" operation="); sb.append(detail); sb.append(" feedback="); sb.append(feedback);