<AWT Dev>  Request for review: 7075105: WIN: Provide a way to format HTML on drop
Denis S. Fokin
denis.fokin at oracle.com
Wed Feb 27 09:47:09 PST 2013
Please take a look at the next fix.
Webrev can be found at: http://cr.openjdk.java.net/~denis/7075105/webrev.03/
I have executed a number of data transfer and drag and drop tests. No
new failures have been found.
The fix intended to introduce three data flavors to represent
transferred via clipboard and drag and drop HTML data.
The flavors are presented as fields in the DataFlavor class. The flavors
are distinguishable by their mime-type parameters. So I have updated
We lazily build mapping between the native data transfer formats and
java flavors in the SystemFlavorMap class. Before we stored values in
flavorToNative and nativeToFlavor
maps in a type independent way as objects and handled special cases
for text flavors latter in the SystemFlavorMap.getFlavorsForNative
method. This way we stored both strings and flavors in the same
container. I have slightly refactored our code to generify it and
introduce froeach loops. I also replaced (Set + LinkedList) approach
with LinkedHashSet one which should work the same way.
Conversion from java Transferable to the native data is enabled in
To be able to use a foreach approach instaed of (for + iterator) in
convertMimeTypeToDataFlavors method I have changed
DataTransferer.standardEncodings() return type.
To be consistent with jdk7 model I have put some AutoCloseable instances
in try clauses.
I have also created a pair of tests. One is manual and another is
More information about the awt-dev