public class PtolemyTransferable
extends java.lang.Object
implements java.awt.datatransfer.Transferable, java.io.Serializable
Red (johnr) |
Red (eal) |
Modifier and Type | Field and Description |
---|---|
static java.awt.datatransfer.DataFlavor |
namedObjFlavor
The flavor that requests a local virtual machine
reference to the contained object.
|
Constructor and Description |
---|
PtolemyTransferable()
Create a new transferable object that contains no objects.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
_getMoML()
Return a string with a MoML description of all the objects in
the list.
|
void |
addObject(NamedObj object)
Add the given named object to the objects contained in this
transferable.
|
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
Return an object that represents the data contained within this
transferable with the given flavor.
|
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
Return the data flavors that this transferable supports.
|
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Return true if the given data flavor is supported.
|
void |
removeObject(NamedObj object)
Remove the given object from this transferable.
|
public static final java.awt.datatransfer.DataFlavor namedObjFlavor
public PtolemyTransferable()
public void addObject(NamedObj object)
object
- The object to be added to this transferable.public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
flavor
- The data flavor that is searched for.public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
getTransferData
in interface java.awt.datatransfer.Transferable
flavor
- The data flavor.java.awt.datatransfer.UnsupportedFlavorException
- If the given flavor is
not supported.java.io.IOException
- If thrown while creating the MoML.public void removeObject(NamedObj object)
object
- The object to be removed.public java.lang.String _getMoML() throws java.io.IOException
java.io.IOException
- If thrown while creating the MoML.