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

Document Swing Drag and Drop support

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 5.0, 6
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • Understanding:
      Cause Known
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp

      Description

      TransferHandler provides double duty. You need to subclass it to provide custom dnd/copy-paste support, but it's also a concrete class that can be used out of the box. This is confusing because for someone wishing to provide their own implementation not using the built in support it isn't clear what methods to override. It would be good if the class doc provided an example showing the proper way to create a subclass that does not use the built in support. A good example of this is getSourceActions. Anyone not using the built in support needs to override this method but it isn't that obvious that you need to.
      A similar comment applies to canImport. The docs should mention this isn't invoked for paste, only when doing a drag-drop session, or if someone calls it outside of Swing.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                svioletsunw Scott Violet (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: