Please refer to http://java.sun.com/j2se/1.5.0/docs/api/java/awt/datatransfer/package-summary.html for general information on AWT data transfer. See the drag-and-drop specification and tutorial at http://java.sun.com/j2se/1.5.0/docs/guide/dragndrop/index.html.
The mapping between the Java type and content type is the SystemFlavorMap
. The mapping between content type and native format is hard-coded as long as each native format needs some code to perform the conversion. Harmony implementation does the data conversion is performed in two steps: from Java to intermediate format (which is platform-independent, and is one of content types listed above), then from intermediate format to the platform-dependent native format. The conversion from native format to Java is performed also in two steps: from native to intermediate, then from intermediate to Java.
The table below shows the mapping of data flavors to supported native Windows formats.
Java type |
Content type |
Native format on Windows |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="462cc79c-16e5-4959-9cc5-b9dfff248a40"><ac:plain-text-body><![CDATA[ |
|
text/plain |
|
]]></ac:plain-text-body></ac:structured-macro> |
|
image/x-java-image |
|
||
|
application/x-java-url |
|
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9fe6cf40-8e4f-4f4e-ba63-88d8a7311419"><ac:plain-text-body><![CDATA[ |
|
text/html |
"HTML Format" |
]]></ac:plain-text-body></ac:structured-macro> |
|
application/x-java-file-list |
|
||
|
application/x-java-serialized-object |
|
The picture below illustrates the structure of the intermediate data.
The diagram below shows the relationship between public API and implementation classes. The classes that have “Win” prefix are for Windows platform, on other platforms there should be similar platform-specific classes.
The following figure gives an overview of the message routing and thread interaction in Harmony implementation on Windows.
Support system selection
Selections are
Support drag-and-drop (Xdnd)
Please refer to http://www.freedesktop.org/wiki/Standards for X11-related standards and specifications.
java.awt.dnd.DragSource
java.awt.dnd.DragSourceDragEvent
org.apache.harmony.awt.datatransfer.DataSnapshot
org.apache.harmony.awt.datatransfer.windows.WinClipboard
org.apache.harmony.awt.datatransfer.windows.WinDragSource
org.apache.harmony.awt.datatransfer.windows.WinDropTarget
java.awt.dnd.DropTarget
java.awt.dnd.DragGestureRecognizer
java.awt.dnd.Autoscroll
javax.swing.TransferHandler
.