Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4658741

Wrong success flag in dragDropEnd of DragSourceListner, in next DnD operations.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.1
    • 1.4.0
    • client-libs
    • 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.

            dassunw Das Das (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: