JDK-6319916 : Reg. DnD does not work properly in an embedded frame
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2005-09-05
  • Updated: 2011-01-19
  • Resolved: 2005-09-16
Related Reports
Duplicate :  
Description
This is reproducible from mustang b47 onwards on Solaris and Linux.

Attached is an automated testcase to reproduce the issue. The testcase does a dnd from awt list to swt list. It selects an item from the awt list, clicks and drags the item and drops it in the swt list. DnD does not initiate in this case. After selecting the item, if the mouse is moved a bit before starting the drag operation, dnd works properly.

To reproduce:
Run the attached automated testcase

Comments
EVALUATION The bug was closed mistakely as 'Not a deffect'. In fact the problem was in extra MouseEntered event. See CR 6324985.
16-09-2005

EVALUATION It is not a bug because we should take into account drag threshold. The drag threshold's value could be got using getDragThreshold() static method on DragSource. So the test should be rewriten taking into consideration the value. Mouse pointer in the test must glide over our components no less pixels than treshold's value to drag would turn on. Otherwise DragGestureListener.dragGestureRecognized(DragGestureEvent dge) will be not invoked and we cannot start dragndrop using DragGestureEvent.startDrag() method.
13-09-2005

EVALUATION The behavior is reproducible only with embeded frame. I have attached SimplifiedTest.java test which is more simple and should reproduce the problem. In the case DnD does not have enough time to start drag. The issue reproducible always when drag is begun near the border with EmbededFrame. If we begin drag far enough from the border or move mouse pointer slowly enough drag is successful. Independently of drag success there was absent a crossed circle icon as a pointer. It looks strange.
12-09-2005