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

Allow drag and drop of references to non-serializable objects within local JVM

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 7u15
    • Fix Version/s: tbd
    • Component/s: javafx

      Description

      It appears that only Serializable objects can be placed on a Clipboard or Dragboard. While this seems necessary for copying or moving data between applications, it is a major limitation for drag and drop within the same Java application. It is natural to want the data to be represented by model objects, and JavaFX model objects typically use bound properties which are not Serializable. A discussion (mostly monolog) appears at https://forums.oracle.com/forums/thread.jspa?threadID=2511382&tstart=30

      The javadocs for javafx.scene.input.Clipboard appear to hint that this may be possible: "In addition to the common or built in types, you may put any arbitrary data onto the clipboard (assuming it is either a reference, or serializable. See more about references later)." However, this is at best incomplete (there is no "later" discussion of references) and seems to be misleading (I can find no way to put a reference to a non-serializable object onto a Clipboard). The documentation here needs clarifying, even if no changes are made to the functionality.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jdenvirjfx James Denvir (Inactive)
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported: