Class SingleFileDragInTransferHandler

java.lang.Object
javax.swing.TransferHandler
org.jjazz.uiutilities.api.SingleFileDragInTransferHandler
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MixConsoleTopComponent.TcTransferHandler

public abstract class SingleFileDragInTransferHandler extends TransferHandler
A drag'n drop support to accept a single file via drag & drop.

This class takes into account OS specific "glitches" of the Swing drag & drop support : behaviour is different on MacOS, getSourceActions(), createTransferable(), exportDone() can be called several times during a drag operation, but only once for Win/Linux. Also on MacOS the support parameter is not always fully initialized on canImport(), it is fully initialized only when importData() is called.

See Also:
  • Field Details

    • DRAG_MIDI_FILE_ICON

      public static final ImageIcon DRAG_MIDI_FILE_ICON
  • Constructor Details

    • SingleFileDragInTransferHandler

      public SingleFileDragInTransferHandler()
  • Method Details