JDK-8101005 : JFX DnD visual item drag feedback
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: scenegraph
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2011-06-28
  • Updated: 2015-06-16
  • Resolved: 2011-07-01
Related Reports
Duplicate :  
Description
On Mac OS X the way drag and drop works natively is that the cursor itself changes and there is an image underneath the cursor that represents the dragged item.

JFX probably needs to define this as part of the client public API.

The questions here for JFX are then:

#1 Should the icon change to show dragging taking place ? Glass allows the client to set different icon shape, so this can be done as part of DnD API or preferably keep it as Cursor only API as it currently is.

#2 Should there be an image representing the dragged item? And if client does not want to provide such representation - should there be a default image? And if so what should be the default image representation?

Currently, the way drag and drop works, it seems to lack polish and feels half-baked and confusing.

If #2 is to be implemented, then either Glass will need change its APIs to accept such image, or JFX as Glass client can implement this on its own using existing Glass APIs. For example the visual item representation can be implemented as standalone (transparent) window that tracks the cursor position.
Comments
Specific feature request for drag image has been created: RT-14730.
01-07-2011

Drag image (in FX called "DragView") is supported by majority of platforms. We are planning to add this feature, but probably not for this release. There will be API on FX Dragboard, that will allow users to pass the drag image. It cannot be added easily because users will most of the time want to generate the image from some nodes in the scene and we don't have a way to do that right now. Offering an API that accepts a drag image and leaving users with only one option - to pass an icon they have in bitmap somewhere - is more confusing than useful. For now, there will be only the changing cursor. The support for DragView will be added after we introduce a proper "render to image" functionality. And yes, then we'll need an API on Glass that allows us to set the image (we'll have the image on Dragboard, so having the API on TKClipboard would be most convenient.
30-06-2011