-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
hopper
-
generic
-
generic
-
Verified
There is a following case.
You have performed DnD operation wich finished successfully, i.e. in drop method has set via DropTargetDropEvent#dropComplete(boolean) the flag as true. It is possible to check it in the dragDropEnd method in DragSourceListener.
Problem is when next DnD operation is taken, and is performed unsuccessfully, i.e. the drop was made over no drop target, i.e. no drop method was invoked on no DropTarget. Then the in the invoked dragDropEnd method the DragSourceDropEvent#getDropSuccess returns true instead of false.
There is added tescase: (see Attachment)
1) Run the Test class, and look at console.
2) Process DnD operation outside to be unsuccessful, you see in the method the flag is false.
3) Process next DnD operation with successful drop, i.e. to the text area at the right side of frame,
you see the flag is set to true.
4) Process nexrt DnD operation like in step 2), but you see different result, the flag is set to true,
5) Repeating the step 4) gets the same result.
There seems to be necessary in the inside framework always clear the flag when starting new DnD operation.
You have performed DnD operation wich finished successfully, i.e. in drop method has set via DropTargetDropEvent#dropComplete(boolean) the flag as true. It is possible to check it in the dragDropEnd method in DragSourceListener.
Problem is when next DnD operation is taken, and is performed unsuccessfully, i.e. the drop was made over no drop target, i.e. no drop method was invoked on no DropTarget. Then the in the invoked dragDropEnd method the DragSourceDropEvent#getDropSuccess returns true instead of false.
There is added tescase: (see Attachment)
1) Run the Test class, and look at console.
2) Process DnD operation outside to be unsuccessful, you see in the method the flag is false.
3) Process next DnD operation with successful drop, i.e. to the text area at the right side of frame,
you see the flag is set to true.
4) Process nexrt DnD operation like in step 2), but you see different result, the flag is set to true,
5) Repeating the step 4) gets the same result.
There seems to be necessary in the inside framework always clear the flag when starting new DnD operation.
- relates to
-
JDK-4342185 DropSourceListener.dragDropEnd returns incorrect dropSuccess and dropAction
-
- Resolved
-