Libraries and Components for Software Developers  

OutlDD: Java Drag&Drop for Microsoft Outlook

OutlDD enables Java programs to make use of the special Micosoft Outlook drag&drop data format. It can be used with Java 5.0 to 8.0 on Microsoft Windows XP, 2003, Vista, 2008 and 7 and Microsoft Outlook 2003 to 2013.

On Microsoft Windows, drag&drop information is passed in an IDataObject from the sender to the receiver. This object can contain several data types like bitmap, text, file name etc. Many of this types are known by the Java AWT/SWT/Swing/JavaFX. But the format used by Microsoft Outlook when dragging mails is not implemented.

Because the AWT does not provide access to the underlying IDataObject, there is no way to add this functionality in pure Java. Thus, JNI code is required, to achieve mail drag&drop.

OutlDD intercepts the IDataObject of the drag&drop operation and either replaces the IDataObject by a "simpler" one or gives the Java program access to its contents by means of JNI function calls.

In the former case, the dragged mails are copied into the temporary directory and a new IDataObject with file-drop information for this temporary files is passed to the AWT. From the view of the AWT, it seems to be an ordinary file-drop operation and existing Java drag&drop logic does not need to be changed. This operation mode is called MODE_TEMP_FILES.

In the latter case, which is called MODE_MEMORY_STREAM, OutlDD functions allow Java code to access the underlying IDataObject directly. This allows the programmer e.g. to receive the mail data as an java.io.InputStream or display a hourglass when many files are dropped.