antsnest.datatransfer
Class AntNodeTransferable

java.lang.Object
  extended by antsnest.datatransfer.AntsNestTransferable
      extended by antsnest.datatransfer.AntNodeTransferable
All Implemented Interfaces:
Transferable

public class AntNodeTransferable
extends AntsNestTransferable

Defines how an Ant node is transfered

Author:
Chris Clohosy

Field Summary
 
Fields inherited from class antsnest.datatransfer.AntsNestTransferable
flavor, flavorList, flavors
 
Constructor Summary
AntNodeTransferable(AntNode node)
          Constructs the new transferable
 
Method Summary
static DataFlavor getFlavor()
          Gets the data flavor used in this transferable
 Object getTransferData(DataFlavor usedFlavor)
          Gets an object to be used in the transfer
 
Methods inherited from class antsnest.datatransfer.AntsNestTransferable
getTransferDataFlavors, isDataFlavorSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntNodeTransferable

public AntNodeTransferable(AntNode node)
Constructs the new transferable

Parameters:
node - the node to transfer
Method Detail

getTransferData

public Object getTransferData(DataFlavor usedFlavor)
                       throws UnsupportedFlavorException
Gets an object to be used in the transfer

Specified by:
getTransferData in interface Transferable
Specified by:
getTransferData in class AntsNestTransferable
Parameters:
usedFlavor - the flavor being used
Returns:
an Object, the object to transfer
Throws:
UnsupportedFlavorException - if an unsupported flavor is used

getFlavor

public static DataFlavor getFlavor()
Gets the data flavor used in this transferable

Returns:
a DataFlavor the data flavor used