Drag and drop and cut, copy, paste between awt / swing and swt.
posted 6 years ago
My Project Team and I are developing an Eclipse / SWT based application that also uses Swing components (like NASA's World Wind). I need to support cut, copy, paste and drag and drop of custom objects between awt / swing and swt. I have found many examples of crating custom Swing DataFlavors and custom SWT ByteArrayTransfer classes for custom types. I can get DND and CCP to work between Swing <-> Swing and between SWT <-> SWT, but I can not get DND or CCP between Swing <-> SWT. I'm not sure what I am doing wrong. I have tried creating many variations of DataFlavors using serialized java objects, mime times etc but they just don't seem to be compatible.
The key point here is that I am trying to create custom DND / CCP Swing DataFlavors and SWT Transfer types, rather than use the standard Text types.
I have spent much time on this and I have gotten nowhere. Any help would be greatly appreciated!