instrument/JTree API Documentation

Class DefaultTransferable

All Implemented Interfaces:

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

This is the default transferable that is used for transfering node data around. It contains some black magic that needs a bit of memory jogging to properly document. This will happen in due time. Feel free to nag about it if you really need/want it.

Field Summary
static java.awt.datatransfer.DataFlavor DEFAULT_NODE_INFO_FLAVOUR
          Our very own custom data flavour, useful for transferring between instrumenters.
Constructor Summary
DefaultTransferable(javax.swing.tree.DefaultMutableTreeNode[] nodes, DndId dndId)
DefaultTransferable(javax.swing.tree.DefaultMutableTreeNode node, DndId dndId)
Method Summary
protected static void addMimeType(java.util.Vector v, java.lang.String mimetype)
          Utility method to add data flavours to a vector.
 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


public static final java.awt.datatransfer.DataFlavor DEFAULT_NODE_INFO_FLAVOUR
Our very own custom data flavour, useful for transferring between instrumenters. Not useful for transferring data to other software.
Constructor Detail


public DefaultTransferable(javax.swing.tree.DefaultMutableTreeNode node,
                           DndId dndId)


public DefaultTransferable(javax.swing.tree.DefaultMutableTreeNode[] nodes,
                           DndId dndId)
Method Detail


protected static void addMimeType(java.util.Vector v,
                                  java.lang.String mimetype)
Utility method to add data flavours to a vector. Will not add them if they turn out to be invalid.
v - Vector to add to
mimetype - name of mime type to add


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


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


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

instrument/JTree API Documentation