Re: What is TransferSupport Class in Java?
I think that you are now familiar with the TransferSupport utility methods, so you can use the following example :
Code:
public boolean canImport(TransferSupport transup) {
if (!transup.isDataFlavorSupported(stringFlavor)) {
return false;
}
DropLocation loc = transup.getDropLocation();
return shouldAcceptDropLocation(loc);
}
public boolean importData(TransferSupport transup) {
if (!canImport(sup)) {
return false;
}
Transferable t = transup.getTransferable();
String data = t.getTransferData(stringFlavor);
DropLocation loc = transup.getDropLocation();
insertAt(loc, data);
return true;
}
I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.
Bookmarks