ini.trakem2.tree
Class TransferableNode

java.lang.Object
  extended by ini.trakem2.tree.TransferableNode
All Implemented Interfaces:
java.awt.datatransfer.Transferable

public class TransferableNode
extends java.lang.Object
implements java.awt.datatransfer.Transferable

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


Field Summary
static java.awt.datatransfer.DataFlavor NODE_FLAVOR
           
 
Constructor Summary
TransferableNode(javax.swing.tree.DefaultMutableTreeNode nd)
           
 
Method Summary
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
           
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
           
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE_FLAVOR

public static final java.awt.datatransfer.DataFlavor NODE_FLAVOR
Constructor Detail

TransferableNode

public TransferableNode(javax.swing.tree.DefaultMutableTreeNode nd)
Method Detail

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException
Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Throws:
java.awt.datatransfer.UnsupportedFlavorException

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable