java.awt.datatransfer

Interface Transferable

public interface Transferable

This interface is implemented by classes that can transfer data.

Since: 1.1

UNKNOWN: updated to 1.4

Method Summary
ObjectgetTransferData(DataFlavor flavor)
Returns the data in the specified DataFlavor.
DataFlavor[]getTransferDataFlavors()
This method returns a list of available data flavors for the data being transferred.
booleanisDataFlavorSupported(DataFlavor flavor)
Tests whether or not this data can be delivered in the specified data flavor.

Method Detail

getTransferData

public Object getTransferData(DataFlavor flavor)
Returns the data in the specified DataFlavor.

Parameters: flavor the data flavor to return

Returns: the data in the appropriate flavor

Throws: UnsupportedFlavorException if the flavor is not supported IOException if the data is not available

See Also: DataFlavor

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
This method returns a list of available data flavors for the data being transferred. The array returned will be sorted from most preferred flavor at the beginning to least preferred at the end.

Returns: adA list of data flavors for this data

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Tests whether or not this data can be delivered in the specified data flavor.

Parameters: flavor the data flavor to test

Returns: true if the data flavor is supported