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

Get isDropCompleted() in DONE event based on setDropCompleted() in DROP event

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      In the drag DONE event, there is no way to determine whether an underlying file operation was successful or not. Checking with getTransferMode() is not sufficient. For example, you have a JavaFX file browser with two TreeViews and move (drag) files from one TreeView to the other. And then you will update the TreeViews by removing the source TreeItem and adding the target TreeItem when the file operation was successful. But the drag source only knows that the drag was done, not whether the file operation was successful or not. In the DRAG_DROPPED event, you can set setDropCompleted(true) if the file operation was successful and setDropCompleted(false) otherwise. But in the drag DONE event, isDropCompleted() always returns false and TransferMode always returns MOVE, regardless of whether the file operation failed or succeeded.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: