JDK-6218261 : Support custom drag images
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2005-01-17
  • Updated: 2006-04-07
  • Resolved: 2005-01-18
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
DragSource.isDragImageSupported() returns false on Windows, Solaris and Linux.  And, correspondingly, passing an Image to a startDrag method has no effect.  However, all of these platforms do support a custom image in their drag and drop protocols.  It would be useful if support for drag images were made available.

JUSTIFICATION :
Applications that use a drag image look more professional, and closer to native applications.  (For instance, observe the effect of dragging files in Windows Explorer.)  Plus, a drag image can result in a clearer user interface idiom by letting the user know exactly what he is dragging.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expect the DragSource.isDragImageSupported method to return true if the platform supports drag images.
ACTUAL -
The DragSource.isDragImageSupported method always returns false.

CUSTOMER SUBMITTED WORKAROUND :
If the drag is within a single application, the application can track the drag and do the drawing itself.

It may be possible to use a custom drag Cursor to emulate a drag image, but I believe Cursors tend to have limits on their size and sometimes their color depth.  Plus, there is no reliable way to include the system's own drag Cursor in the image, since that would require reading the image data associated with the Cursor.  Assuming a particular Cursor image for a system isn't much better, since it would contradict any non-default desktop theme.
###@###.### 2005-1-17 22:44:45 GMT

Comments
EVALUATION Duplicate of 4874070. ###@###.### 2005-1-18 08:32:15 GMT
18-01-2005

WORK AROUND See 4874070. ###@###.### 2005-1-18 08:32:15 GMT
18-01-2005