I want to use image drag and drop for our application. I have got one sample application from the http://www.vogella.de/articles/EclipseDragAndDrop/article.html. It is very useful in fact. But instead of TextTransfer what could I use for transfer type for images? I could not find out ImageTransfer as transfer type for image drag and drop. My requirement is that I need to drag one image from one view to the another view\editor. Is there any class for as ImageTransfer for image drag and drop? I could not find out.
Asked
Active
Viewed 497 times
1
-
Please edit the question to clarify the last two statements. – Tonny Madsen Jul 14 '11 at 18:17
-
I have edited the question. Is that clear for you? – Parameswaran Jul 15 '11 at 03:06
-
Yes, and the answer from @Max is spot on as long as you don't need to DnD from/to other applications. – Tonny Madsen Jul 15 '11 at 12:05
-
I have just tested `ImageTransfer` as the transfer type, and it seems to work fine on Windows and OSX. – Tonny Madsen Jul 15 '11 at 12:12
1 Answers
0
If you implement both editor and view, you don't have to use native transfer types like ImageTransfer unless you want to accept DnD from other applications. Use org.eclipse.jface.util.LocalSelectionTransfer instead since it allow easily pass a object(s) from one Eclipse part into another. In case you want to accept DnD from other applications/Desktop, FileTransfer would be the best choice.
Cheers, Max

Max
- 2,917
- 1
- 16
- 16