Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:56 Go to next message
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
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 12:37 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
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 13:21 Go to previous messageGo to next message
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
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 13:41 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 13:57 Go to previous message
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
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: Mon Dec 09 11:21:47 GMT 2024

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

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

Back to the top