ca.ucalgary.seahawk.gui
Class MobyObjectTransferHandler
java.lang.Object
javax.swing.TransferHandler
ca.ucalgary.seahawk.gui.FileAndTextTransferHandler
ca.ucalgary.seahawk.gui.MobyObjectTransferHandler
- All Implemented Interfaces:
- ClipboardOwner, Serializable
public class MobyObjectTransferHandler
- extends FileAndTextTransferHandler
- implements ClipboardOwner
- See Also:
- Serialized Form
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)
|
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
Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010