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

Document Swing Drag and Drop support

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 5.0, 6
    • client-libs
    • Cause Known
    • generic, x86
    • generic, windows_xp

      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.

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

              Created:
              Updated:
              Imported:
              Indexed: