aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Drag and drop and cut, copy, paste between awt / swing and swt. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Drag and drop and cut, copy, paste between awt / swing and swt." Watch "Drag and drop and cut, copy, paste between awt / swing and swt." New topic
Author

Drag and drop and cut, copy, paste between awt / swing and swt.

Greg Pirsig
Greenhorn

Joined: Apr 27, 2009
Posts: 1
Greetings all!

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!



Thanks

Greg Pirsig.
 
Consider Paul's rocket mass heater.
 
subject: Drag and drop and cut, copy, paste between awt / swing and swt.