Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Drag and Drop Between 2 View
Drag and Drop Between 2 View [message #436430] Thu, 08 September 2005 05:56 Go to next message
Eclipse UserFriend
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 #436436 is a reply to message #436430] Thu, 08 September 2005 08:37 Go to previous messageGo to next message
Eclipse UserFriend
Have a butch at

http://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.h tml

or

http://www.eclipse.org/articles/Article-Workbench-DND/drag_d rop.html

depending on whether you're working at the SWT or JFace level, respectively. Given that you mention TableViewer, you'll want the second (JFace) one.
Re: Drag and Drop Between 2 View [message #436440 is a reply to message #436436] Thu, 08 September 2005 09:21 Go to previous messageGo to next message
Eclipse UserFriend
Alex Blewitt wrote:

> Have a butch at
>
> http://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.h tml
>
> or
>
> http://www.eclipse.org/articles/Article-Workbench-DND/drag_d rop.html
>
> depending on whether you're working at the SWT or JFace level, respectively. Given that you mention TableViewer, you'll want the second (JFace) one.
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?
Bye;
Re: Drag and Drop Between 2 View [message #436441 is a reply to message #436440] Thu, 08 September 2005 09:41 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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,
Previous Topic:Communication between viewers in a perspective
Next Topic:missing emf icons for product export
Goto Forum:
  


Current Time: Tue Jun 24 04:36:58 EDT 2025

Powered by FUDForum. Page generated in 0.51645 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top