java.awt.datatransfer
Interface Transferable

All Known Implementing Classes:
javax.swing.TransferHandler.PropertyTransferable, StringSelection, java.awt.dnd.DropTargetContext.TransferableProxy

public interface Transferable

Safe: Defines the interface for classes that can be used to provide data for a transfer operation.

Version:
1.10, 12/03/01
Author:
Amy Fowler

Method Summary
 Object getTransferData(DataFlavor flavor)
          Enabled: Returns an object which represents the data to be transferred.
 DataFlavor[] getTransferDataFlavors()
          Enabled: Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
 boolean isDataFlavorSupported(DataFlavor flavor)
          Enabled: Returns whether or not the specified data flavor is supported for this object.
 

Method Detail

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Enabled: Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).

Returns:
an array of data flavors in which this data can be transferred

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Enabled: Returns whether or not the specified data flavor is supported for this object.

Parameters:
flavor - the requested flavor for the data
Returns:
boolean indicating whether or not the data flavor is supported

getTransferData

public Object getTransferData(DataFlavor flavor)
                       throws UnsupportedFlavorException,
                              IOException
Enabled: Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.

Parameters:
flavor - the requested flavor for the data
UnsupportedFlavorException
IOException
See Also:
DataFlavor.getRepresentationClass()


comments?