public class XMLTransferable
extends java.lang.Object
implements java.awt.datatransfer.Transferable, java.awt.datatransfer.ClipboardOwner
Constructor and Description |
---|
XMLTransferable(byte[] data,
java.lang.String mimeType,
java.lang.String humanPresentableName)
Creates new XMLTransferable
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
Returns an object which represents the data to be transferred.
|
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data
can be provided in.
|
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Returns whether or not the specified data flavor is supported for
this object.
|
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
Notifies this object that it is no longer the owner of
the contents of the clipboard.
|
public XMLTransferable(byte[] data, java.lang.String mimeType, java.lang.String humanPresentableName)
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
clipboard
- the clipboard that is no longer ownedcontents
- the contents which this owner had placed on the clipboardpublic 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 requested flavor for the datajava.io.IOException
- if the data is no longer available
in the requested flavor.java.awt.datatransfer.UnsupportedFlavorException
- if the requested data flavor is
not supported.DataFlavor.getRepresentationClass()
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 requested flavor for the data