try {
if (drawImage) {
clearImage();
}
int action = dtde.getDropAction();
Transferable transferable = dtde.getTransferable();
Point pt = dtde.getLocation();
if (transferable
.isDataFlavorSupported(NODE_FLAVOR)
&& controller.canPerformAction(tree, draggedNode, action, pt)) {
TreePath pathTarget = tree.getPathForLocation(pt.x, pt.y);
Object node = transferable.getTransferData(NODE_FLAVOR);
Object newParentNode = pathTarget.getLastPathComponent();
if (controller.executeDrop(tree, node, newParentNode, action)) {
dtde.acceptDrop(action);
dtde.dropComplete(true);
return;