/** This is called to transfer the data. */ public void dragSetData(DragSourceEvent event) { if (LocalTransfer.getInstance().isSupportedType(event.dataType)) { event.data = selection; } }
/** This is called when dragging is completed; it forgets the {@link #selection}. */ public void dragFinished(DragSourceEvent event) { selection = null; LocalTransfer.getInstance().javaToNative(null, null); }