org.embl.ebi.escience.scuflui.dnd
Class SpecFragmentTransferable

java.lang.Object
  extended by org.embl.ebi.escience.scuflui.dnd.SpecFragmentTransferable
All Implemented Interfaces:
java.awt.datatransfer.Transferable

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

This transferable data type encapsulates a SpecFragment object, and is used for drag and drop of the processor spec fragments used to instantiate both Processor and ProcessorFactory classes.

Author:
Tom Oinn

Field Summary
static java.awt.datatransfer.DataFlavor factorySpecFragmentFlavor
           
static java.awt.datatransfer.DataFlavor processorSpecFragmentFlavor
           
static java.awt.datatransfer.DataFlavor specFragmentFlavor
           
 
Constructor Summary
SpecFragmentTransferable(org.jdom.Element specElement)
          Construct a transferable directly from the spec element, using the constructor in the SpecFragment class to build the internal data
SpecFragmentTransferable(SpecFragment fragment)
          Construct a transferable from the spec fragment object
 
Method Summary
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
          Return the spec fragment if requested
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
          Return the single local flavor
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
          True if the supplied flavor is equal to the supported one
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

specFragmentFlavor

public static java.awt.datatransfer.DataFlavor specFragmentFlavor

processorSpecFragmentFlavor

public static java.awt.datatransfer.DataFlavor processorSpecFragmentFlavor

factorySpecFragmentFlavor

public static java.awt.datatransfer.DataFlavor factorySpecFragmentFlavor
Constructor Detail

SpecFragmentTransferable

public SpecFragmentTransferable(org.jdom.Element specElement)
Construct a transferable directly from the spec element, using the constructor in the SpecFragment class to build the internal data


SpecFragmentTransferable

public SpecFragmentTransferable(SpecFragment fragment)
Construct a transferable from the spec fragment object

Method Detail

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Return the single local flavor

Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
True if the supplied flavor is equal to the supported one

Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException
Return the spec fragment if requested

Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Throws:
java.awt.datatransfer.UnsupportedFlavorException