API proposal: drag view

Alexey Utkin alexey.utkin at oracle.com
Wed Jan 16 00:40:58 PST 2013


Can I clarify the drag image implementation details as API author?

The DnD/Clipboard API was initially design to be compatible with any OS.
That means that OS can provide all or nothing for DnD/Clipboard support.
Any part of API could be implemented by Java itself or be delegated to
standard OS API.

To organize pictured drag (let's make a difference with "drag image" 
term that mostly
means image transfer as data) two staff mime types were introduced:
      "application/x-java-drag-image"
      "application/x-java-drag-image-offset".
I would like specialty emphasize here that image-for-drag is the same 
sort of transfer data
as the other parts (means that data is accessible for reading on the 
target side). That is the
platform specific implementation who would be responsible for drag image 
drawing.
On Windows platform there is the API that can extract the image-for-drag 
and paint it
over the most of drag-target applications.
BUT we can organize pictured drag over the JavaFX applications even for 
OS that has no
pictured drag API (by "application/x-java-drag-image" data extraction 
and mouse event treatment).

Please, ask me a question if something is not clear for you.

Regards,
-uta







More information about the openjfx-dev mailing list