ini.trakem2.tree
Class AbstractTreeTransferHandler

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

public abstract class AbstractTreeTransferHandler
extends java.lang.Object
implements java.awt.dnd.DragGestureListener, java.awt.dnd.DragSourceListener, java.awt.dnd.DropTargetListener

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


Constructor Summary
protected AbstractTreeTransferHandler(DNDTree tree, int action, boolean drawIcon)
           
 
Method Summary
abstract  boolean canPerformAction(DNDTree target, javax.swing.tree.DefaultMutableTreeNode draggedNode, int action, java.awt.Point location)
           
protected  void destroy()
           
 void dragDropEnd(java.awt.dnd.DragSourceDropEvent dsde)
           
 void dragEnter(java.awt.dnd.DragSourceDragEvent dsde)
           
 void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
           
 void dragExit(java.awt.dnd.DragSourceEvent dse)
           
 void dragExit(java.awt.dnd.DropTargetEvent dte)
           
 void dragGestureRecognized(java.awt.dnd.DragGestureEvent dge)
           
 void dragOver(java.awt.dnd.DragSourceDragEvent dsde)
           
 void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
           
 void drop(java.awt.dnd.DropTargetDropEvent dtde)
           
 void dropActionChanged(java.awt.dnd.DragSourceDragEvent dsde)
           
 void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
           
abstract  boolean executeDrop(DNDTree tree, javax.swing.tree.DefaultMutableTreeNode draggedNode, javax.swing.tree.DefaultMutableTreeNode newParentNode, int action)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTreeTransferHandler

protected AbstractTreeTransferHandler(DNDTree tree,
                                      int action,
                                      boolean drawIcon)
Method Detail

destroy

protected void destroy()

dragDropEnd

public void dragDropEnd(java.awt.dnd.DragSourceDropEvent dsde)
Specified by:
dragDropEnd in interface java.awt.dnd.DragSourceListener

dragEnter

public final void dragEnter(java.awt.dnd.DragSourceDragEvent dsde)
Specified by:
dragEnter in interface java.awt.dnd.DragSourceListener

dragOver

public final void dragOver(java.awt.dnd.DragSourceDragEvent dsde)
Specified by:
dragOver in interface java.awt.dnd.DragSourceListener

dropActionChanged

public final void dropActionChanged(java.awt.dnd.DragSourceDragEvent dsde)
Specified by:
dropActionChanged in interface java.awt.dnd.DragSourceListener

dragExit

public final void dragExit(java.awt.dnd.DragSourceEvent dse)
Specified by:
dragExit in interface java.awt.dnd.DragSourceListener

dragGestureRecognized

public final void dragGestureRecognized(java.awt.dnd.DragGestureEvent dge)
Specified by:
dragGestureRecognized in interface java.awt.dnd.DragGestureListener

dragEnter

public final void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
Specified by:
dragEnter in interface java.awt.dnd.DropTargetListener

dragExit

public final void dragExit(java.awt.dnd.DropTargetEvent dte)
Specified by:
dragExit in interface java.awt.dnd.DropTargetListener

dragOver

public final void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
Specified by:
dragOver in interface java.awt.dnd.DropTargetListener

dropActionChanged

public final void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
Specified by:
dropActionChanged in interface java.awt.dnd.DropTargetListener

drop

public final void drop(java.awt.dnd.DropTargetDropEvent dtde)
Specified by:
drop in interface java.awt.dnd.DropTargetListener

canPerformAction

public abstract boolean canPerformAction(DNDTree target,
                                         javax.swing.tree.DefaultMutableTreeNode draggedNode,
                                         int action,
                                         java.awt.Point location)

executeDrop

public abstract boolean executeDrop(DNDTree tree,
                                    javax.swing.tree.DefaultMutableTreeNode draggedNode,
                                    javax.swing.tree.DefaultMutableTreeNode newParentNode,
                                    int action)