Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » OSX Drag and Drop
OSX Drag and Drop [message #168348] Tue, 15 February 2005 12:36
Eclipse UserFriend
Originally posted by: venu.thachappilly.gmail.com

Hi All,
In our Eclipse/GEF application we need to implement dragging from a
table into a GEF graphical viewer. This works well on Windows and Linux,
but not on OSX.

On the Table Viewer we initilize the drag source listener with

DragSourceListener dragSourceListener = new DragSourceListener(){

public void dragStart(DragSourceEvent event) {
IStructuredSelection selection =
(IStructuredSelection) tableViewer.getSelection();
if (selection.size() == 0) {
event.doit = false;
}

LocalSelectionTransfer.getInstance().setSelection(selection) ;
}

public void dragSetData(DragSourceEvent event) {
dragStart(event);
}

public void dragFinished(DragSourceEvent event) {
tableViewer.refresh();
}
};

int operations = DND.DROP_COPY;
Transfer[] types = new Transfer[]
{LocalSelectionTransfer.getInstance()};
tableViewer.addDragSupport(operations, types, dragSourceListener);

On the GEF viewer we have :

ScrollingGraphicalViewer viewer =
ScrollingGraphicalViewer)getGraphicalViewer();

viewer.addDropTargetListener(new MyDropTargetListener(viewer));


public class MyDropTargetListener extends
AbstractTransferDropTargetListener {
// various methods
}

The drag does get initiated but none of the methods in
MyDropTargetListener get called.

We do set data inside dragSetData as per the post:
http://dev.eclipse.org/newslists/news.eclipse.platform.swt/m sg15397.html

Any help is greatly appreciated
thanks
Venu
Previous Topic:can use CompoundDirectedGraphLayout in this case?
Next Topic:Alignment Retarget Actions
Goto Forum:
  


Current Time: Thu Apr 25 01:39:49 GMT 2024

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

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

Back to the top