Version: 1.1.1

ca.ucalgary.seahawk.gui
Class MobyObjectTransferHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by ca.ucalgary.seahawk.gui.FileAndTextTransferHandler
          extended by ca.ucalgary.seahawk.gui.MobyObjectTransferHandler
All Implemented Interfaces:
ClipboardOwner, Serializable

public class MobyObjectTransferHandler
extends FileAndTextTransferHandler
implements ClipboardOwner

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.TransferHandler
TransferHandler.DropLocation, TransferHandler.TransferSupport
 
Field Summary
 
Fields inherited from class javax.swing.TransferHandler
COPY, COPY_OR_MOVE, LINK, MOVE, NONE
 
Method Summary
 void exportToClipboard(JComponent comp, Clipboard clip, int action)
          Drag and copy functiunality.
 Map<String,MobyDataInstance> getDataFromFiles(Map<String,MobyPrimaryData> acceptableData, Iterable<File> files)
           
 Map<String,MobyDataInstance> getDataFromMobyContents(Map<String,MobyPrimaryData> acceptableData, MobyContentInstance mci)
           
 Map<String,MobyDataInstance> getDataFromText(Map<String,MobyPrimaryData> acceptableData, String text)
           
 Map<String,MobyDataInstance> getDataFromURL(Map<String,MobyPrimaryData> acceptableData, URL url)
           
 Map<String,MobyDataInstance> getDataFromURLContents(Map<String,MobyPrimaryData> acceptableData, URL u)
           
static MobyObjectTransferHandler getHandler(MobyClient cl)
          This is how you get an instance of the handler.
 boolean importData(JComponent c, Transferable t)
           
 void lostOwnership(Clipboard clipboard, Transferable contents)
          To satisfy the ClipboardOwner interface.
 void mergeDataMaps(Map<String,MobyDataInstance> keeper, Map<String,MobyDataInstance> newData)
           
 boolean sendDataToReceiver(MobyObjectReceiver receiver, Map<String,MobyPrimaryData> acceptableData, Map<String,MobyDataInstance> dataFound)
           
 
Methods inherited from class ca.ucalgary.seahawk.gui.FileAndTextTransferHandler
canImport, convertToString, exportDone, getSourceActions
 
Methods inherited from class javax.swing.TransferHandler
canImport, exportAsDrag, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHandler

public static MobyObjectTransferHandler getHandler(MobyClient cl)
This is how you get an instance of the handler. Each MobyClient has a singleton handler.


importData

public boolean importData(JComponent c,
                          Transferable t)
Overrides:
importData in class FileAndTextTransferHandler

sendDataToReceiver

public boolean sendDataToReceiver(MobyObjectReceiver receiver,
                                  Map<String,MobyPrimaryData> acceptableData,
                                  Map<String,MobyDataInstance> dataFound)

getDataFromMobyContents

public Map<String,MobyDataInstance> getDataFromMobyContents(Map<String,MobyPrimaryData> acceptableData,
                                                            MobyContentInstance mci)

getDataFromText

public Map<String,MobyDataInstance> getDataFromText(Map<String,MobyPrimaryData> acceptableData,
                                                    String text)

getDataFromURL

public Map<String,MobyDataInstance> getDataFromURL(Map<String,MobyPrimaryData> acceptableData,
                                                   URL url)

getDataFromURLContents

public Map<String,MobyDataInstance> getDataFromURLContents(Map<String,MobyPrimaryData> acceptableData,
                                                           URL u)
                                                    throws Exception
Throws:
Exception

getDataFromFiles

public Map<String,MobyDataInstance> getDataFromFiles(Map<String,MobyPrimaryData> acceptableData,
                                                     Iterable<File> files)
                                              throws Exception
Throws:
Exception

mergeDataMaps

public void mergeDataMaps(Map<String,MobyDataInstance> keeper,
                          Map<String,MobyDataInstance> newData)

exportToClipboard

public void exportToClipboard(JComponent comp,
                              Clipboard clip,
                              int action)
                       throws IllegalStateException
Drag and copy functiunality.

Overrides:
exportToClipboard in class TransferHandler
Throws:
IllegalStateException

lostOwnership

public void lostOwnership(Clipboard clipboard,
                          Transferable contents)
To satisfy the ClipboardOwner interface.

Specified by:
lostOwnership in interface ClipboardOwner

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010