Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsSWT.Browser - Drag and Drop problem
https://www.eclipse.org/forums/index.php/mv/msg/172358/548345/#msg_548345
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
}]]>Vladimir Stevanovic2010-07-21T14:27:51-00:00Re: SWT.Browser - Drag and Drop problem
https://www.eclipse.org/forums/index.php/mv/msg/172358/549401/#msg_549401
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
> }]]>Grant Gayed2010-07-26T14:52:31-00:00