16 package net.squiz.cuetree;
19 import java.awt.event.*;
20 import java.awt.datatransfer.*;
26 System.out.println(
"DragAndDropTransferHandler created");
29 public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
31 for (
int i = 0; i < transferFlavors.length; i++) {
32 if (transferFlavors[i].equals(DataFlavor.javaFileListFlavor)) {
33 System.out.println(
"was a file");
37 System.out.println(
"There were no files in the clipboard");
41 public boolean importData(JComponent c, Transferable t) {
43 System.out.println(
"Start of importData");
45 if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
48 files = (List) t.getTransferData(DataFlavor.javaFileListFlavor);
49 }
catch (Exception e) {
52 System.out.println(files);
54 System.out.println(
"Was not a file");
57 System.out.println(
"importing data");