[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.albireo] Re: Drag and drop and cut, copy, paste between awt / swing and swt.

While I don't have a snippet or example I can post, I can say we have done this using both FileTransfer and ByteArrayTransfer so it is possible.

Tom Schindl wrote:
Maybe asking the albireo guys?

Tom

Grant Gayed schrieb:
Hi Greg,

I've asked someone here about this, and though we've never tried this, the
belief is that it should be possible.  On the swt side you subclass
ByteArrayTransfer, and on the awt/swing side you have a custom data flavor.
The part that's less clear (though may be trivial to someone that uses
awt/string reguarly) is how to specify the data type name on the awt/swing
side, because the awt/swing DataFlavors are keyed by mimeType, which I think
!= the data type name on the swt side.  Looking at the javadoc pages,
SystemFlavorMap looks like it could be useful for doing this mapping.

Sorry if this answer isn't definitive enough, I was hoping that someone else
had more concrete experience with this (the awt/swing side in particular).
I plan to investigate this when I have more time and will post an example
snippet if successful, but for the next while we're winding down the eclipse
3.5 work, so I'm not sure when this will be.  (If anyone else has an example
of this then please submit it!).

Grant


"Greg Pirsig" <greg.pirsig@xxxxxxxxx> wrote in message news:80422c4a99c27545a8814a26dd94a875$1@xxxxxxxxxxxxxxxxxx
Greetings all!

My Project Team and I are evaluating different Rich Client Platforms
that we can use with out next integration project.  I don't need
anything too fancy, but I will need to incorporate some existing swing
controls (NASA's World Wind etc) and will need to support cut, copy,
paste and drag and drop of custom objects between awt / swing and swt.
After reading ali's harrowing journey that seemed to end in defeat
(search for "Drag and drop from SWT to Swing with a custom
ByteArrayTransfer"), IÃïd like to clarify if this is a reasonable
expectation.  Does the Eclipse rcp support custom transfer types between
swt and awt / swing?  Does it work? Has anyone gotten this to work or
should I just stick to swing?

Thanks

Greg Pirsig.

P.S. I've already added this issue to the RCP newsgroup, but without any
luck so far. I hope no one minds me adding it here too in an attempt to
seek out anyone who can help... also please let me know if there is a
better place or another website that I should be asking such questions?