Hi, we were just looking at your project at SourceForge, the jOutldd, and it seems to be perfect for our application. However, when emails are dragged from Outlook, they are deleted there (the dnd operation is a move instead of copy). Is there any way to configure this?
Thanks a lot!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
in your DropTargetAdapter function dragOver, set the accepted drag mode to COPY if MOVE is requested. Maybe this is nessesary in function drop too. I cannot check this at the moment.
public void dragOver(java.awt.dnd.DropTargetDragEvent dtde) {
int action = dtde.getDropAction();
if (action == DnDConstants.ACTION_MOVE) {
action = DnDConstants.ACTION_COPY;
}
dtde.acceptDrag(action);
}
public void drop(java.awt.dnd.DropTargetDragEvent dtde) {
int action = dtde.getDropAction();
if (action == DnDConstants.ACTION_MOVE) {
action = DnDConstants.ACTION_COPY;
}
dtde.acceptDrop(action);
}
Regards
Wolfgang Imig
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-08-15
Fantastic! That did exactly what we needed.
Thanks again for a great library, this really helps us out with a problem we've been having for years!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, we were just looking at your project at SourceForge, the jOutldd, and it seems to be perfect for our application. However, when emails are dragged from Outlook, they are deleted there (the dnd operation is a move instead of copy). Is there any way to configure this?
Thanks a lot!
Hello Egil Sørensen,
in your DropTargetAdapter function dragOver, set the accepted drag mode to COPY if MOVE is requested. Maybe this is nessesary in function drop too. I cannot check this at the moment.
Regards
Wolfgang Imig
Fantastic! That did exactly what we needed.
Thanks again for a great library, this really helps us out with a problem we've been having for years!