Class com.symantec.itools.vcafe.openapi.datatransfer.TransferableProxy
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.symantec.itools.vcafe.openapi.datatransfer.TransferableProxy

Object
   |
   +----StringSelection
           |
           +----com.symantec.itools.vcafe.openapi.datatransfer.TransferableProxy

public class TransferableProxy
extends StringSelection
Adds StringSelection functionality to any Transferable object.

The system clipboard essentially ignores non StringSelection transferables, so we wrap them in order to force the system clipboard to freshen/clear Visual Cafe's clipboard.

Version:
1.0
Author:
Symantec Internet Tools Division
Since:
VCafe 3.0
See Also:
VisualCafeClipboard, getClipboard

Constructor Index

 o com.symantec.itools.vcafe.openapi.datatransfer.TransferableProxy(Transferable)
Constructs a TransferableProxy, wrapping the given Transferable in one with string flavors as well.

Method Index

 o getProxiedTransferable()
Gets the original Transferable object that this TransferableProxy wraps.
 o getTransferData(DataFlavor)
Gets an object which represents the data to be transferred.
 o getTransferDataFlavors()
Gets an array of DataFlavor objects indicating the formats the data can be provided in.
 o isDataFlavorSupported(DataFlavor)
Determines whether the specified data flavor is supported for this object.

Constructors

 o TransferableProxy
public TransferableProxy(Transferable t)
Constructs a TransferableProxy, wrapping the given Transferable in one with string flavors as well.

Parameters:
t - the Transferable object to wrap.

Methods

 o getProxiedTransferable
public java.awt.datatransfer.Transferable getProxiedTransferable()
Gets the original Transferable object that this TransferableProxy wraps.

Returns:
the user's Transferable object.
 o getTransferData
public synchronized java.lang.Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
Gets an object which represents the data to be transferred. The class of the object returned is defined by the representation class (DataFlavor.getRepresentationClass()) of the flavor.

Parameters:
flavor - the requested flavor for the data.
Returns:
The data to be transferred.
Throws: IOException
if the data is no longer available in the requested flavor.
Throws: UnsupportedFlavorException
if the requested data flavor is not supported.
Overrides:
getTransferData in class StringSelection
See Also:
getRepresentationClass
 o getTransferDataFlavors
public synchronized java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Gets an array of DataFlavor objects indicating the formats 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).

The StringSelection flavors are at the end of the array.

Returns:
an array of data flavors in which this data can be transferred
Overrides:
getTransferDataFlavors in class StringSelection
 o isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
Determines whether the specified data flavor is supported for this object.

Parameters:
flavor - the requested flavor for the data.
Returns:
true if the DataFlavor is supported, false otherwise.
Overrides:
isDataFlavorSupported in class StringSelection

All Packages  Class Hierarchy  This Package  Previous  Next  Index