Mercurial > projects > dwt-mac
changeset 102:1c12673c65ca
Ported dwt.dnd.DropTargetEvent
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Wed, 31 Dec 2008 13:24:24 +0100 |
parents | 43123e716bda |
children | e655f9f35342 |
files | dwt/dnd/DropTargetEvent.d |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 <doob@me.com> *******************************************************************************/ 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 <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ -public class DropTargetEvent extends TypedEvent { +public class DropTargetEvent : TypedEvent { /** * The x-cordinate of the cursor relative to the <code>Display</code> */ @@ -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);