List of usage examples for java.awt.datatransfer SystemFlavorMap addUnencodedNativeForFlavor
public synchronized void addUnencodedNativeForFlavor(DataFlavor flav, String nat)
From source file:ec.util.chart.swing.Charts.java
private static DataFlavor registerSystemFlavor(String nat, String mimeType, String humanPresentableName) { DataFlavor result = null;//from w ww . j a v a 2s. 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; }