public class

TransferableProxy

extends Object
implements Transferable
java.lang.Object
   ↳ sun.awt.datatransfer.TransferableProxy

Class Overview

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.

Summary

Fields
protected final boolean isLocal
protected final Transferable transferable
Public Constructors
TransferableProxy(Transferable t, boolean local)
Public Methods
Object getTransferData(DataFlavor df)
Returns an object which represents the data to be transferred.
DataFlavor[] getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
boolean isDataFlavorSupported(DataFlavor flavor)
Returns whether or not the specified data flavor is supported for this object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.awt.datatransfer.Transferable

Fields

protected final boolean isLocal

protected final Transferable transferable

Public Constructors

public TransferableProxy (Transferable t, boolean local)

Public Methods

public Object getTransferData (DataFlavor df)

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 the requested flavor for the data

public DataFlavor[] 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
  • an array of data flavors in which this data can be transferred

public boolean isDataFlavorSupported (DataFlavor flavor)

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