Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Detect drop-location on system
Detect drop-location on system [message #482512] Wed, 26 August 2009 20:29 Go to next message
Eclipse UserFriend
Originally posted by: juerphen.gmail.com

Hi,

I am able to drag/drop a file from a tableviewer (shows a list of files)
to the windows explorer (desktop or some other folder) using a
FileTransfer.

How is it possible to get the location where the file is dropped? What I
do is very basic:

DragSource source = new DragSource(table, DND.DROP_MOVE);
source.setTransfer(new Transfer[] { FileTransfer.getInstance() });

source.addDragListener(new DragSourceListener() {
@Override
public void dragFinished(DragSourceEvent event) {
}

@Override
public void dragSetData(DragSourceEvent event) {
}

@Override
public void dragStart(DragSourceEvent event) {
event.image = imageForFile;
event.data = pathToDraggedFile;
}
}

But even in the dragFinished()-method I do not get where the file is
dropped. So, must do something conceptually different, I guess.

Thanks already,
J├╝rgen
Re: Detect drop-location on system [message #546042 is a reply to message #482512] Sat, 10 July 2010 08:49 Go to previous messageGo to next message
Parvez Ahmad Hakim is currently offline Parvez Ahmad HakimFriend
Messages: 31
Registered: May 2010
Member
Hi
I too am facing the same problem. I am trying to locate it in event in
public void dragFinished(DragSourceEvent event) {
System.out.println("dragFinished");
}

Re: Detect drop-location on system [message #546610 is a reply to message #546042] Tue, 13 July 2010 14:27 Go to previous messageGo to next message
Lakshmi ShanmugamFriend
Messages: 276
Registered: July 2009
Location: India
Senior Member
Hi,

This is currently not supported in SWT. There is an enhancement request for this -- https://bugs.eclipse.org/bugs/show_bug.cgi?id=288222
You can add yourself to the bug and vote for it if you are interested in the feature.


Lakshmi P Shanmugam
icon2.gif  Re: Detect drop-location on system [message #640154 is a reply to message #546610] Fri, 19 November 2010 11:13 Go to previous message
Parvez Ahmad Hakim is currently offline Parvez Ahmad HakimFriend
Messages: 31
Registered: May 2010
Member
is there any other turn around for windows hook programming using JNI stuff
Previous Topic:Nesting SWT Tables
Next Topic:Put an embeddable frame (contained by a ViewPart) into full screen mode
Goto Forum:
  


Current Time: Wed Apr 01 05:08:27 GMT 2020

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

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

Back to the top