ini.trakem2.tree
Class DefaultTreeTransferHandler

java.lang.Object
  extended by ini.trakem2.tree.AbstractTreeTransferHandler
      extended by ini.trakem2.tree.DefaultTreeTransferHandler
All Implemented Interfaces:
java.awt.dnd.DragGestureListener, java.awt.dnd.DragSourceListener, java.awt.dnd.DropTargetListener, java.util.EventListener

public class DefaultTreeTransferHandler
extends AbstractTreeTransferHandler

Adapted from freely available code by DeuDeu from http://forum.java.sun.com/thread.jspa?threadID=296255&start=0&tstart=0


Constructor Summary
DefaultTreeTransferHandler(Project project, DNDTree tree, int action)
           
 
Method Summary
 boolean canPerformAction(DNDTree target, javax.swing.tree.DefaultMutableTreeNode dragged_node, int action, java.awt.Point location)
           
 void destroy()
           
 boolean executeDrop(DNDTree target, javax.swing.tree.DefaultMutableTreeNode dragged_node, javax.swing.tree.DefaultMutableTreeNode new_parent_node, int action)
           
 
Methods inherited from class ini.trakem2.tree.AbstractTreeTransferHandler
dragDropEnd, dragEnter, dragEnter, dragExit, dragExit, dragGestureRecognized, dragOver, dragOver, drop, dropActionChanged, dropActionChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTreeTransferHandler

public DefaultTreeTransferHandler(Project project,
                                  DNDTree tree,
                                  int action)
Method Detail

canPerformAction

public boolean canPerformAction(DNDTree target,
                                javax.swing.tree.DefaultMutableTreeNode dragged_node,
                                int action,
                                java.awt.Point location)
Specified by:
canPerformAction in class AbstractTreeTransferHandler

executeDrop

public boolean executeDrop(DNDTree target,
                           javax.swing.tree.DefaultMutableTreeNode dragged_node,
                           javax.swing.tree.DefaultMutableTreeNode new_parent_node,
                           int action)
Specified by:
executeDrop in class AbstractTreeTransferHandler

destroy

public void destroy()
Overrides:
destroy in class AbstractTreeTransferHandler