Drag and Drop Between 2 View [message #436430] |
Thu, 08 September 2005 05:56  |
Eclipse User |
|
|
|
Hello All!
I would like to make a drag and drop of an object which is in a
TableViewer(in the first View) to a Browser in the second View
How can i dot it ?
Thank you for your help
|
|
|
|
|
Re: Drag and Drop Between 2 View [message #436441 is a reply to message #436440] |
Thu, 08 September 2005 09:41   |
Eclipse User |
|
|
|
user@domain.invalid wrote:
> Thank you ,
> But it does not work , i made a class which implements
> DragSourceListener and dragSetData with a String(for the TableViewer)
> Then i add DropTarget to my Browser(which is a swt component and not
> JFace) and in the drop methed , i do
> that:myBrowser.setUrl((String)event.data));
> But it does not work,why?
Which transfers did you set up? TextTransfer?
1. post the code snippets for setting up your drag source and drop
target. Based on the information that you gave in this email, I can
only assume some setup is missing.
2. Change the drop() method to do something like a System.out.println(),
or set breakpoints in the dragSetData() and drop() methods, and re-run
your application. When dragSetData() was called, what was put into
event.data? When drop was called, what was available in event.data?
Later,
PW
|
|
|
Re: Drag and Drop Between 2 View [message #436442 is a reply to message #436441] |
Thu, 08 September 2005 09:57  |
Eclipse User |
|
|
|
Paul Webster wrote:
> user@domain.invalid wrote:
>
>> Thank you ,
>> But it does not work , i made a class which implements
>> DragSourceListener and dragSetData with a String(for the TableViewer)
>> Then i add DropTarget to my Browser(which is a swt component and not
>> JFace) and in the drop methed , i do
>> that:myBrowser.setUrl((String)event.data));
>> But it does not work,why?
>
>
> Which transfers did you set up? TextTransfer?
>
> 1. post the code snippets for setting up your drag source and drop
> target. Based on the information that you gave in this email, I can
> only assume some setup is missing.
>
> 2. Change the drop() method to do something like a System.out.println(),
> or set breakpoints in the dragSetData() and drop() methods, and re-run
> your application. When dragSetData() was called, what was put into
> event.data? When drop was called, what was available in event.data?
>
> Later,
> PW
I made a lot of test and it did work on a lot of component (Button ,
TableViewer) But i think that it is impossible to make a Browser DropTarget!
Do you know if it is possible with the component Browser(swt)?
Thank you,
Sob,
|
|
|
Powered by
FUDForum. Page generated in 0.51645 seconds