1 package org.feistymeow.dragdrop;
3 import java.awt.datatransfer.DataFlavor;
4 import java.awt.datatransfer.Transferable;
7 import javax.swing.JComponent;
8 import javax.swing.TransferHandler;
10 import org.apache.commons.logging.Log;
11 import org.apache.commons.logging.LogFactory;
23 @SuppressWarnings(
"serial")
31 c_provider = provider;
37 if (support ==
null)
return false;
38 if (!support.isDrop())
40 logger.debug(
"canImport: base just saying okay.");
47 logger.debug(
"createTransferable: at base, returning ListTransferable.");
52 protected void exportDone(JComponent source, Transferable data,
int action)
54 logger.debug(
"exportDone: base got event for component " + source.toString());
66 if (support ==
null)
return false;
67 logger.debug(
"importData: at base...");
69 if (support.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
70 logger.debug(
"importing data with java files flavor");
78 logger.debug(
"importing data with uri list flavor");
85 logger.warn(
"passing importData request to superclass, which will probably fail.");
86 return super.importData(support);
Transferable createTransferable(JComponent c)
void exportDone(JComponent source, Transferable data, int action)
int getSourceActions(JComponent c)
boolean importData(TransferSupport support)
DragonTransferHandler(IDragonDropDataProvider provider)
boolean canImport(TransferSupport support)
static DataFlavor getURIListFlavor1()
static List< Object > extractData(Transferable tran)
static DataFlavor getURIListFlavor2()
boolean consumeDropList(List< Object > dropSet, Point cursor)
List< Object > provideDragList()