List of usage examples for java.awt.datatransfer DataFlavor isRepresentationClassReader
public boolean isRepresentationClassReader()
From source file:Main.java
public static void main(String[] args) { DataFlavor df = DataFlavor.stringFlavor; System.out.println(df.isRepresentationClassReader()); }
From source file:org.orbisgis.sif.components.fstree.TreeNodeFolder.java
@Override public boolean importData(TransferSupport ts) { if (ts.isDataFlavorSupported(TransferableNodePaths.PATHS_FLAVOR)) { // Move Nodes and Move Files new DropTransferable(ts.getTransferable(), this).execute(); return true; } else {/*from ww w . j a v a2 s .c o m*/ DataFlavor[] flavors = ts.getDataFlavors(); for (DataFlavor flavor : flavors) { if (flavor.isRepresentationClassReader()) { new DropTransferable(ts.getTransferable(), this).execute(); return true; } } return false; } }
From source file:org.orbisgis.view.components.fstree.TreeNodeFolder.java
@Override public boolean importData(TransferSupport ts) { BackgroundManager bm = Services.getService(BackgroundManager.class); if (ts.isDataFlavorSupported(TransferableNodePaths.PATHS_FLAVOR)) { // Move Nodes and Move Files bm.nonBlockingBackgroundOperation(new DropTransferable(ts.getTransferable(), this)); return true; } else {//from w w w. j a v a2 s .c om DataFlavor[] flavors = ts.getDataFlavors(); for (DataFlavor flavor : flavors) { if (flavor.isRepresentationClassReader()) { bm.nonBlockingBackgroundOperation(new DropTransferable(ts.getTransferable(), this)); return true; } } return false; } }