Dragged Object

Hi
To get the dragged object in GoDiagram for .NET, I override GoView.DoExternalDrop and write the following two lines:
GoSelection sel = evt.Data.GetData(typeof(GoSelection)) as GoSelection;

GoObject draggedObject = sel.First;
Now, how can I do the same thing in JGo to get the dragged object when overriding JGoView.doDrop or onExternalDrop?

Another two platform user! Congratulations. Sorry for the differences between JGo and GoDiagram, although of course the biggest differences are due to Java being different from .NET.
As you can see in the implementation of JGoView.doDrop:
Transferable tr = e.getTransferable();
Object data = tr.getTransferData(jgoflavor);
JGoObjectSimpleCollection sel = (JGoObjectSimpleCollection)data;
Of course, this assumes the transfer data is in fact a JGoSelection or other JGoObjectSimpleCollection, as determined by it supporting the JGoDocument.getStandardDataFlavor().

What do you mean by e? is it the DropTargetEvent parameter or the JGoCopyEnvironment one?
Neither of them contains getTransferable()

DropTargetDropEvent, the first argument to JGoView.doDrop.

the signature of JGoView.doDrop is as follows:
public boolean doDrop(DropTargetEvent arg0, JGoCopyEnvironment arg1)
The first parameter is of type DropTargetEvent not DropTargetDropEvent, and it doesn’t contain getTranseferable.
I know DropTargetDropEvent extends DropTargetEvent. But getTranseferable only exists in the subclass.
Thanks

Oh, you didn’t say you were using JGo for SWT instead of JGo for Swing. And I guess you aren’t a customer, or else you would already have looked at the source code.
In this case there are differences between Swing and SWT, in addition to the differences between Java and .NET.
JGoSelection sel = null;
ByteArrayInputStream baiStream = new ByteArrayInputStream((byte[])e.data);
ObjectInputStream iStream = new ObjectInputStream(baiStream);
Object newObj = iStream.readObject();
if (newObj instanceof JGoSelection) {
sel = (JGoSelection)newObj;
. . .
}