views:

56

answers:

2

Hello all,

I am attemping to implement drag and drop that is not just an image being dragged around the screen but has interaction between dragged and droppedon object.

in short what I'm trying to achive is: When i drag one 'source' object and drop it on a 'target' object the 'target' object recieves information about the'source' that was dropped on it

This ( http://rakeshmenonp.wordpress.com/2009/07/20/javafx-drag-and-drop/ ) sample application describes its actions as what I'm looking for however the app doesnt work for me. I was able to build the source (it requires a few modifications, as the yahoo shopping URL no longer works) and with a few alterations get the shopping items to show up. However there is no drag/drop functionality.

Does anyone have any other samples that they could point me toward?

All of my javafx searches for drag and drop come back with apps that just deal with moving an object on the screen, or they use 'canvas' which is no longer supported

thanks, stephanie

+1  A: 

There is no standard Drag and Drop support in JavaFX 1.3.1 in the way you want to use it. There was an alpha preview being worked on, but it did not make it into the release. As JavaFX is being totally rewritten it is hard to say what support for DnD will be in the new release.

JimClarke
definitely not what I wanted to hear but thanks :)
Without Me It Just Aweso
If you are inclined to look under the hood, check out com.sun.javafx.scene.transfer.Dragboard;com.sun.javafx.scene.transfer.DragEvent;com.sun.javafx.scene.transfer.TransferMode;
JimClarke
Also in javafx.scene.Node, there are some hidden functions that support DnD. I believe this works with the Swing toolkit, but probably not with PRISM.
JimClarke
+1  A: 

Check this out I found this after relentless search. the below is a drag and drop example in javafx

http://0divides0.wordpress.com/2010/10/21/image-drag-and-drop/

Evan