List of usage examples for java.awt.datatransfer SystemFlavorMap decodeDataFlavor
public static DataFlavor decodeDataFlavor(String nat) throws ClassNotFoundException
From source file:ec.util.chart.swing.Charts.java
private static DataFlavor registerSystemFlavor(String nat, String mimeType, String humanPresentableName) { DataFlavor result = null;/*from w w w. ja v a 2 s .c om*/ try { result = SystemFlavorMap.decodeDataFlavor(nat); } catch (ClassNotFoundException ex) { } if (result == null) { result = new DataFlavor(mimeType, humanPresentableName); SystemFlavorMap map = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap(); map.addUnencodedNativeForFlavor(result, nat); map.addFlavorForUnencodedNative(nat, result); return result; } return result; }