src/share/classes/sun/awt/datatransfer/DataTransferer.java

Print this page

        

*** 647,658 **** * requested when converting to the format. * <p> * The map keys are sorted according to the native formats preference * order. */ ! public SortedMap getFormatsForTransferable(Transferable contents, ! FlavorTable map) { DataFlavor[] flavors = contents.getTransferDataFlavors(); if (flavors == null) { return new TreeMap(); } return getFormatsForFlavors(flavors, map); --- 647,659 ---- * requested when converting to the format. * <p> * The map keys are sorted according to the native formats preference * order. */ ! public SortedMap<Long,DataFlavor> getFormatsForTransferable( ! Transferable contents, FlavorTable map) ! { DataFlavor[] flavors = contents.getTransferDataFlavors(); if (flavors == null) { return new TreeMap(); } return getFormatsForFlavors(flavors, map);
*** 684,696 **** * @param flavors the data flavors * @param map the FlavorTable which contains mappings between * DataFlavors and data formats * @throws NullPointerException if flavors or map is <code>null</code> */ ! public SortedMap getFormatsForFlavors(DataFlavor[] flavors, FlavorTable map) { ! Map formatMap = new HashMap(flavors.length); ! Map textPlainMap = new HashMap(flavors.length); // Maps formats to indices that will be used to sort the formats // according to the preference order. // Larger index value corresponds to the more preferable format. Map indexMap = new HashMap(flavors.length); Map textPlainIndexMap = new HashMap(flavors.length); --- 685,701 ---- * @param flavors the data flavors * @param map the FlavorTable which contains mappings between * DataFlavors and data formats * @throws NullPointerException if flavors or map is <code>null</code> */ ! public SortedMap <Long, DataFlavor> getFormatsForFlavors( ! DataFlavor[] flavors, FlavorTable map) ! { ! Map <Long,DataFlavor> formatMap = ! new HashMap <> (flavors.length); ! Map <Long,DataFlavor> textPlainMap = ! new HashMap <> (flavors.length); // Maps formats to indices that will be used to sort the formats // according to the preference order. // Larger index value corresponds to the more preferable format. Map indexMap = new HashMap(flavors.length); Map textPlainIndexMap = new HashMap(flavors.length);