BioLegato 0.7.3 GDE plugin

org.biolegato.gdesupport.canvas
Class ClipboardWrapper

java.lang.Object
  extended by org.biolegato.gdesupport.canvas.ClipboardWrapper
All Implemented Interfaces:
java.awt.datatransfer.Transferable

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

Author:
alvare

Field Summary
static java.awt.datatransfer.DataFlavor sequenceArrayFlavour
          A data flavour representing the raw Cell data type.
 
Constructor Summary
ClipboardWrapper(Cell[] cellArray)
          Creates a new instance of ClipboardWrapper
 
Method Summary
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavour)
          Translates the Dataset to the given format
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
          Dictates what formats the Dataset can be converted to.
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavour)
          Dictates whether a given format is supported for conversion
 Cell[] toArray()
          Dumps the data contained within the clipboard wrapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sequenceArrayFlavour

public static final java.awt.datatransfer.DataFlavor sequenceArrayFlavour
A data flavour representing the raw Cell data type.

Constructor Detail

ClipboardWrapper

public ClipboardWrapper(Cell[] cellArray)
Creates a new instance of ClipboardWrapper

Parameters:
cellArray - the data to store in the wrapper
Method Detail

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Dictates what formats the Dataset can be converted to.

Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable
Returns:
an array of supported formats

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavour)
Dictates whether a given format is supported for conversion

Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
Parameters:
flavour - the flavour to test for compatability
Returns:
true if the format is supported

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavour)
                                 throws java.awt.datatransfer.UnsupportedFlavorException,
                                        java.io.IOException
Translates the Dataset to the given format

Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Parameters:
flavour - the data flavour to use for translation
Returns:
the translated object
Throws:
java.awt.datatransfer.UnsupportedFlavorException - if the SeqDatasetnnot be translated into the requested data flavour
java.io.IOException - if there is a problem with I/O during the translation

toArray

public Cell[] toArray()
Dumps the data contained within the clipboard wrapper

Returns:
the data contained within the wrapper

BioLegato 0.7.3 GDE plugin

Copyright © 2008-2010 University of Manitoba.