Skip to main content



      Home
Home » Eclipse Projects » GEF » DND feedback problem
DND feedback problem [message #163712] Wed, 12 January 2005 11:53 Go to next message
Eclipse UserFriend
Hi all,

i'm trying to add DND functionality to a GEF plugin giving users the
possibility to drag element from an outline tree (made of treeeditpart) to
a GEF EditPartViewer hosted inside an editor.
I'm extending the following GEF classes:
- AbstractTransferDropTargetListener
- AbstractTransferDragSourceListener
I would like to give to user feedback about the ongoing operation, i.e. a
particular treeeditpart could be dropped only on a particular target
editpart in the editor but not on others (or only if some kind of
properties of target and source hold, etc.) changing the cursor type
(using DND.DROP_COPY, DND.DROP_NONE, ...).
What's the best strategy in order to track the selection (=mouse is over
it) of the different editpart present in the viewer during drop activity?
At the moment i'm using the
AbstractTransferDropTargetListener.handleDragOver method (getting the
targeteditpart, checking for relevant condition/properties and setting the
appropriate feedback) but (at least on windows) this method is called
quite often so this is probably not a low cpu cost solution.
Is this the right way to proceed or i'm missing something?

Thank you very much.
Re: DND feedback problem [message #163773 is a reply to message #163712] Wed, 12 January 2005 16:17 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

On windows, the CPU usage will be 100% regardless of what you do. Events
are non-stop.
If the operation is not allowed, your drop adapter should not even be
active, and NONE will be set as the transfer type. The way to disable your
adapter is for editparts to not identify themselves as targets of that
request.

"sf76" <sf76@hotmail.com> wrote in message
news:cs3kma$337$1@www.eclipse.org...
> Hi all,
>
> i'm trying to add DND functionality to a GEF plugin giving users the
> possibility to drag element from an outline tree (made of treeeditpart) to
> a GEF EditPartViewer hosted inside an editor.
> I'm extending the following GEF classes:
> - AbstractTransferDropTargetListener
> - AbstractTransferDragSourceListener
> I would like to give to user feedback about the ongoing operation, i.e. a
> particular treeeditpart could be dropped only on a particular target
> editpart in the editor but not on others (or only if some kind of
> properties of target and source hold, etc.) changing the cursor type
> (using DND.DROP_COPY, DND.DROP_NONE, ...).
> What's the best strategy in order to track the selection (=mouse is over
> it) of the different editpart present in the viewer during drop activity?
> At the moment i'm using the
> AbstractTransferDropTargetListener.handleDragOver method (getting the
> targeteditpart, checking for relevant condition/properties and setting the
> appropriate feedback) but (at least on windows) this method is called
> quite often so this is probably not a low cpu cost solution.
> Is this the right way to proceed or i'm missing something?
>
> Thank you very much.
>
Previous Topic:drag from parent to parent
Next Topic:NPE in flowExample
Goto Forum:
  


Current Time: Thu Jul 10 23:17:56 EDT 2025

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

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

Back to the top