SWT.Browser - Drag and Drop problem [message #548345] |
Wed, 21 July 2010 10:27  |
Eclipse User |
|
|
|
I'm using SWT.Browser instance, created using xulrunner, (SWT.MOZILLA flag in constructor). If the file is dragged and dropped in it, native (I suppose xulrunner's) save as dialog appears. DropTargetEvent cannot be catched using standard swt DND classes, it looks like no event is generated.
Is there any solution for overriding default xulrunner behavior?
This is the code I've used:
final Browser browser = new Browser(getShell(), SWT.MOZILLA);
int operations = DND.DROP_DEFAULT | DND.DROP_MOVE | DND.DROP_COPY;
DropTarget dt = new DropTarget(browser, operations);
Transfer[] types = new Transfer[] { FileTransfer.getInstance() };
dt.setTransfer(types);
dt.addDropListener(new DropTargetListener() {
//.. all functions from this interface are implemented, and none is executed
}
|
|
|
Re: SWT.Browser - Drag and Drop problem [message #549401 is a reply to message #548345] |
Mon, 26 July 2010 10:52  |
Eclipse User |
|
|
|
Hi,
There isn't currently a way to override the natively-provided drop behaviour
for Browsers. This seems like a good request, but I couldn't find an
existing bug for it, so if you want you can log one with swt at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT&bug_severity=enhancement .
Grant
"vstevanovic" <vstevanovic@emisia.net> wrote in message
news:i27058$b77$1@build.eclipse.org...
> I'm using SWT.Browser instance, created using xulrunner, (SWT.MOZILLA flag
> in constructor). If the file is dragged and dropped in it, native (I
> suppose xulrunner's) save as dialog appears. DropTargetEvent cannot be
> catched using standard swt DND classes, it looks like no event is
> generated.
> Is there any solution for overriding default xulrunner behavior?
>
> This is the code I've used:
>
> final Browser browser = new Browser(getShell(), SWT.MOZILLA);
> int operations = DND.DROP_DEFAULT | DND.DROP_MOVE | DND.DROP_COPY;
> DropTarget dt = new DropTarget(browser, operations);
> Transfer[] types = new Transfer[] { FileTransfer.getInstance() };
> dt.setTransfer(types);
> dt.addDropListener(new DropTargetListener() {
> //.. all functions from this interface are implemented, and none is
> executed
> }
|
|
|
Powered by
FUDForum. Page generated in 0.23882 seconds