Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » DragAndDrop between two view
DragAndDrop between two view [message #227777] Mon, 11 December 2006 10:00 Go to next message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 142
Registered: July 2009
Senior Member
Hi,
I have made a editor with to view :
- GraphicalEditorWithFlyoutPalette
- ContentOutlinePage

I have added between these views a drag and drop.
When write the drop ( to move an element from the contentOutlinepage to
the GraphicalEditorWithFlyoutPalette), I have a problem with coordinates.
The DropTargetEvent has an absolutePosition (Display position)
and i cannot succeed to calculate the relative position in the context the
GraphicalEditor.
I try to see coodinate of the graphicalViewer but its position is 0,0 . I
cannot have its absolute coordinate.
Can you say me how to have relative position in the GraphicalEditor?

Thanks
Re: DragAndDrop between two view [message #228168 is a reply to message #227777] Sat, 16 December 2006 21:44 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

You want to convert display-relative coordinates to control-relative? See
Control#toControl(). BTW, this is an SWT question.

"Patrick" <Patrick.Tessier@cea.fr> wrote in message
news:1ce6d4737362660544ac39f7451a463a$1@www.eclipse.org...
> Hi,
> I have made a editor with to view :
> - GraphicalEditorWithFlyoutPalette
> - ContentOutlinePage
>
> I have added between these views a drag and drop.
> When write the drop ( to move an element from the contentOutlinepage to
> the GraphicalEditorWithFlyoutPalette), I have a problem with coordinates.
> The DropTargetEvent has an absolutePosition (Display position)
> and i cannot succeed to calculate the relative position in the context the
> GraphicalEditor.
> I try to see coodinate of the graphicalViewer but its position is 0,0 . I
> cannot have its absolute coordinate.
> Can you say me how to have relative position in the GraphicalEditor?
>
> Thanks
>
>
>
Previous Topic:how to realize a "vertical label" in "Flow Container"
Next Topic:How to change (Target)Anchor dynamicly?
Goto Forum:
  


Current Time: Sat Nov 29 06:41:44 GMT 2014

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

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