Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » setDragDetect method(Something to replace this method?)
setDragDetect method [message #647975] Mon, 10 January 2011 16:14 Go to next message
Opfermann C is currently offline Opfermann CFriend
Messages: 53
Registered: July 2009
Location: Annecy
Member
Hi,

I was using the Treeviewer#setDragDetect method in an RCP application and wanted to use it in the RAP application.
But this method doesn't exists.

Is there a descent way to have the same behaviour ? (ie. remove the drag feature from a component).

Thanks,
Re: setDragDetect method [message #648011 is a reply to message #647975] Mon, 10 January 2011 18:36 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 335
Registered: July 2009
Senior Member
Cedric,

setDragDetect is a method on Control and currently not available in RAP.
The recommended way to enable DND in JFace viewers is by using
StructuredViewer#addDragSupport and addDropSupport.

You may open an enhancement request if you think that you have a valid
use case for setDragDetect.

BTW, are you aware of these two articles?
http://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.h tml
http://www.eclipse.org/articles/Article-Workbench-DND/drag_d rop.html

HTH
Rüdiger

On 10.01.2011 17:14, Opfermann C wrote:
> Hi,
>
> I was using the Treeviewer#setDragDetect method in an RCP application
> and wanted to use it in the RAP application.
> But this method doesn't exists.
>
> Is there a descent way to have the same behaviour ? (ie. remove the drag
> feature from a component).
>
> Thanks,
Re: setDragDetect method [message #648101 is a reply to message #648011] Tue, 11 January 2011 09:06 Go to previous messageGo to next message
Opfermann C is currently offline Opfermann CFriend
Messages: 53
Registered: July 2009
Location: Annecy
Member
Thank you for your response.

Actually, the setDragDetect method was used with a "false" parameter. This is used in some cases to disable the drag behaviour from a control.

So, in RAP, there is a method to add the drag (addDragSupport), there is nothing to remove the drag feature. (like removeDragSupport).
Re: setDragDetect method [message #648133 is a reply to message #648101] Tue, 11 January 2011 11:25 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 335
Registered: July 2009
Senior Member
On 11.01.2011 10:06, Opfermann C wrote:
> Thank you for your response.
>
> Actually, the setDragDetect method was used with a "false" parameter.
> This is used in some cases to disable the drag behaviour from a control.
Feel free to open an enhancement request if you need a way to 'globally'
disable DND.
In the meanwhile you can use the DragSourceListener#dragStart() event to
prevent dragging.

>
> So, in RAP, there is a method to add the drag (addDragSupport), there is
> nothing to remove the drag feature. (like removeDragSupport).
These APIs aren't specific to RAP, they are provided by JFace.

>
Previous Topic:Phase Listener Error
Next Topic:IProgressService not updating UI
Goto Forum:
  


Current Time: Fri Apr 26 02:27:03 GMT 2024

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

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

Back to the top