Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Drag and Drop from outside RAP
Drag and Drop from outside RAP [message #1166273] Fri, 01 November 2013 22:24 Go to next message
Bruno Sinou is currently offline Bruno SinouFriend
Messages: 22
Registered: December 2010
Location: Berlin
Junior Member
Hello,

I would like to be able to drop images or text file from another browser window to my application.

Label image = toolkit.createLabel(header, "", SWT.NO_FOCUS);
image.setImage(DEFAULT_IMAGE);

int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_DEFAULT | DND.DROP_LINK;
Transfer[] tt = new Transfer[] { TextTransfer.getInstance(), FileTransfer.getInstance(), ImageTransfer.getInstance(), URLTransfer.getInstance()};
DropTarget target = new DropTarget(image, operations);
target.setTransfer(tt);
// ImageDropListener only implements DropListener methods by loggin its name. 
target.addDropListener(new ImageDropListener());


The ImageDropListener implements DropTargetListener and is correctly called when drag and dropping from within the RAP application, but when I'm draging an image from the web, i get the "DROP_LINK" decoration but that's all.
I'm using Rap 2.1.0

Do I miss something ? Is there an entry point to register somewhere or is this functionality not yet implemented ?

I was full of hope until I found this message http://www.eclipse.org/forums/index.php/mv/msg/204387/653628/#msg_653628 and no bug / enhencement request in the bug tracker...

Thanks,

Bruno
Re: Drag and Drop from outside RAP [message #1169796 is a reply to message #1166273] Mon, 04 November 2013 07:39 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Bruno,
drag and drop is currently possible only inside RAP application.
Best,
Ivan

On 11/2/2013 12:24 AM, Bruno Sinou wrote:
> Hello,
> I would like to be able to drop images or text file from another
> browser window to my application.
>
> Label image = toolkit.createLabel(header, "", SWT.NO_FOCUS);
> image.setImage(DEFAULT_IMAGE);
>
> int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_DEFAULT |
> DND.DROP_LINK;
> Transfer[] tt = new Transfer[] { TextTransfer.getInstance(),
> FileTransfer.getInstance(), ImageTransfer.getInstance(),
> URLTransfer.getInstance()};
> DropTarget target = new DropTarget(image, operations);
> target.setTransfer(tt);
> // ImageDropListener only implements DropListener methods by loggin
> its name. target.addDropListener(new ImageDropListener());
>
>
> The ImageDropListener implements DropTargetListener and is correctly
> called when drag and dropping from within the RAP application, but
> when I'm draging an image from the web, i get the "DROP_LINK"
> decoration but that's all.
> I'm using Rap 2.1.0
>
> Do I miss something ? Is there an entry point to register somewhere or
> is this functionality not yet implemented ?
>
> I was full of hope until I found this message
> http://www.eclipse.org/forums/index.php/mv/msg/204387/653628/#msg_653628
> and no bug / enhencement request in the bug tracker...
>
> Thanks,
> Bruno

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Drag and Drop from outside RAP [message #1171961 is a reply to message #1169796] Tue, 05 November 2013 15:58 Go to previous message
Bruno Sinou is currently offline Bruno SinouFriend
Messages: 22
Registered: December 2010
Location: Berlin
Junior Member
Thanks Ivan,

I've open an enhancement request: https://bugs.eclipse.org/bugs/show_bug.cgi?id=421081
Previous Topic:resourcemanager resource order
Next Topic:RAP 2.2M2 FileUpload: Filter specific extension
Goto Forum:
  


Current Time: Tue Apr 16 06:09:24 GMT 2024

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

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

Back to the top