Home » Archived » Albireo » Re: Drag and drop and cut, copy, paste between awt / swing and swt.
Re: Drag and drop and cut, copy, paste between awt / swing and swt. [message #10952] |
Tue, 28 April 2009 11:07  |
Eclipse User |
|
|
|
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@gmail.com> wrote in message
> news:80422c4a99c27545a8814a26dd94a875$1@www.eclipse.org...
>> 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?
>>
>
>
|
|
|
Re: Drag and drop and cut, copy, paste between awt / swing and swt. [message #10963 is a reply to message #10952] |
Mon, 04 May 2009 21:34   |
Eclipse User |
|
|
|
Originally posted by: stephan.nagy.gmail.com
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@gmail.com> wrote in message
>> news:80422c4a99c27545a8814a26dd94a875$1@www.eclipse.org...
>>> 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?
>>>
>>
|
|
| | | | | | |
Re: Drag and drop and cut, copy, paste between awt / swing and swt. [message #575080 is a reply to message #10952] |
Mon, 04 May 2009 21:34  |
Eclipse User |
|
|
|
Originally posted by: stephan.nagy.gmail.com
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@gmail.com> wrote in message
>> news:80422c4a99c27545a8814a26dd94a875$1@www.eclipse.org...
>>> 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?
>>>
>>
|
|
| |
Re: Drag and drop and cut, copy, paste between awt / swing and swt. [message #575196 is a reply to message #11028] |
Sun, 14 June 2009 06:28  |
Eclipse User |
|
|
|
I'm stuck on this too! If anyone has any information about how to resolve
the incompatibility between custom SWT ByteArrayTransfer and custom Swing
DataFlavors, please help us out? My am required to provide a solution to
this very soon and unfortunately I'm also stuck! It's just so tricky to
debug because it either all works or it doesn't... I just keep getting
java.awt.datatransfer.UnsupportedFlavorException also.
Does anyone have a code snippet on how to do this, or know how to declare
a DataFlavor to be compatible with a custom SWT ByteArrayTransfer type? It
sounds like this is causing more than a few people some grief.
Help, please, anyone!
Chris.
|
|
| | | | |
Goto Forum:
Current Time: Tue May 13 10:59:42 EDT 2025
Powered by FUDForum. Page generated in 0.04287 seconds
|