Bean Builder

com.adventnet.beans.probeans
Class AdventNetTreeDropSource

java.lang.Object
  |
  +--com.adventnet.beans.probeans.AdventNetTreeDropSource

public class AdventNetTreeDropSource
extends java.lang.Object
implements java.awt.dnd.DropTargetListener

The class AdventNetTreeDragSource handles the Dropping process of the TreeNode in the ProAdventNetTree.

During the Dragging process a Transferable object is created, so that all the reference of the Dragged TreeNode is converted to DataFlavours using the ConvertTreePathToTransferable() class .

From this Transferable Object the data flavours are retained back to the TreeNode object and after proper validational process the drop is allowed to add as TreeNode in the ProAdventNeTree.

Since:
1.0
Version:
1.0
Author:
See Also:
DropTargetListener

Constructor Summary
AdventNetTreeDropSource(javax.swing.JTree tree)
          Creates a new AdventNetTreeDropSource instance.The constructor takes in the source tree as the argument.
 
Method Summary
 void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
          It is used for internal purpose.
 void dragExit(java.awt.dnd.DropTargetEvent dte)
          It is used for internal purpose.
 void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
          when the TreeNode is dragged over the ProAdventNetTree, the closest TreeNode is set selected to indicate that the drag is in over head of the TreeNode.
 void drop(java.awt.dnd.DropTargetDropEvent dtde)
          While dropping the DropTarget the validation for a valid drop is performed so that If the drop is invalid the Drop is rejected.
 void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
          It is used for internal purpose.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdventNetTreeDropSource

public AdventNetTreeDropSource(javax.swing.JTree tree)
Creates a new AdventNetTreeDropSource instance.The constructor takes in the source tree as the argument.
Parameters:
tree - a JTree value
Method Detail

dragEnter

public void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
It is used for internal purpose.
Specified by:
dragEnter in interface java.awt.dnd.DropTargetListener
Parameters:
dtde - a DropTargetDragEvent value

dragOver

public void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
when the TreeNode is dragged over the ProAdventNetTree, the closest TreeNode is set selected to indicate that the drag is in over head of the TreeNode.
Specified by:
dragOver in interface java.awt.dnd.DropTargetListener
Parameters:
dtde - a DropTargetDragEvent value

dragExit

public void dragExit(java.awt.dnd.DropTargetEvent dte)
It is used for internal purpose.
Specified by:
dragExit in interface java.awt.dnd.DropTargetListener
Parameters:
dte - a DropTargetEvent value

dropActionChanged

public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
It is used for internal purpose.
Specified by:
dropActionChanged in interface java.awt.dnd.DropTargetListener
Parameters:
dtde - a DropTargetDragEvent value

drop

public void drop(java.awt.dnd.DropTargetDropEvent dtde)
While dropping the DropTarget the validation for a valid drop is performed so that If the drop is invalid the Drop is rejected.
Specified by:
drop in interface java.awt.dnd.DropTargetListener
Parameters:
dtde - a DropTargetDropEvent value

Bean Builder

© 2001 - 2002 AdventNet Inc. Visit us at: http://www.adventnet.com