Top Description Fields Constructors Methods
sun.awt.datatransfer

public Class TransferableProxy

Additional top-level classes in compilation unit: ClassLoaderObjectOutputStream, ClassLoaderObjectInputStream.

extends Object
implements Transferable
Class Inheritance
All Implemented Interfaces
java.awt.datatransfer.Transferable
Imports
java.awt.datatransfer.DataFlavor, .Transferable, .UnsupportedFlavorException, java.io.ByteArrayInputStream, .ByteArrayOutputStream, .InputStream, .IOException, .ObjectInputStream, .ObjectOutputStream, .ObjectStreamClass, .OutputStream, java.lang.reflect.Modifier, .Proxy, java.security.AccessController, .PrivilegedAction, java.util.HashMap, .HashSet, .Map, .Set

Proxies for another Transferable so that Serializable objects are never returned directly by DnD or the Clipboard. Instead, a new instance of the object is returned.
Authors
Lawrence P.G. Cable, David Mendenhall
Since
1.4

Field Summary

Modifier and TypeField and Description
protected final boolean
protected final Transferable

Constructor Summary

AccessConstructor and Description
public
TransferableProxy(Transferable t, boolean local)

Method Summary

Modifier and TypeMethod and Description
public Object
getTransferData(DataFlavor
the requested flavor for the data
df
)

Implements java.awt.datatransfer.Transferable.getTransferData.

Returns an object which represents the data to be transferred.

public DataFlavor[]
getTransferDataFlavors()

Implements java.awt.datatransfer.Transferable.getTransferDataFlavors.

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).

public boolean
isDataFlavorSupported(DataFlavor
the requested flavor for the data
flavor
)

Implements java.awt.datatransfer.Transferable.isDataFlavorSupported.

Returns whether or not the specified data flavor is supported for this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isLocalback to summary
protected final boolean isLocal
transferableback to summary
protected final Transferable transferable

Constructor Detail

TransferableProxyback to summary
public TransferableProxy(Transferable t, boolean local)

Method Detail

getTransferDataback to summary
public Object getTransferData(DataFlavor df) throws UnsupportedFlavorException, IOException

Implements java.awt.datatransfer.Transferable.getTransferData.

Doc from java.awt.datatransfer.Transferable.getTransferData.

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
df:DataFlavor

the requested flavor for the data

Returns:Object

an object which represents the data to be transferred

Exceptions
UnsupportedFlavorException:
if the requested data flavor is not supported
IOException:
if the data is no longer available in the requested flavor
getTransferDataFlavorsback to summary
public DataFlavor[] getTransferDataFlavors()

Implements java.awt.datatransfer.Transferable.getTransferDataFlavors.

Doc from java.awt.datatransfer.Transferable.getTransferDataFlavors.

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:DataFlavor[]

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

isDataFlavorSupportedback to summary
public boolean isDataFlavorSupported(DataFlavor flavor)

Implements java.awt.datatransfer.Transferable.isDataFlavorSupported.

Doc from java.awt.datatransfer.Transferable.isDataFlavorSupported.

Returns whether or not the specified data flavor is supported for this object.

Parameters
flavor:DataFlavor

the requested flavor for the data

Returns:boolean

boolean indicating whether or not the data flavor is supported