wt.clients.util
Class WTObjectSelection

java.lang.Object
  extended by wt.clients.util.WTObjectSelection
All Implemented Interfaces:
ClipboardOwner, Transferable

public class WTObjectSelection
extends Object
implements Transferable, ClipboardOwner

A class which implements the capability required to transfer an array of WTObjects.

Supported API: true

Extendable: false


Constructor Summary
WTObjectSelection(WTObject wt_object)
          Creates a transferable object capable of transfering the specified WTObject.
WTObjectSelection(WTObject[] wt_object_array)
          Creates a transferable object capable of transfering the specified array of WTObjects.
 
Method Summary
 Object getTransferData(DataFlavor flavor)
          Get the data in the requested format.
 DataFlavor[] getTransferDataFlavors()
          Determines the array of flavors in which this class can provide data.
 boolean isDataFlavorSupported(DataFlavor flavor)
          Determines whether the requested flavor is supported by this object.
 void lostOwnership(Clipboard clipboard, Transferable contents)
          Notifies this object that it is no longer the owner of the contents of the clipboard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WTObjectSelection

public WTObjectSelection(WTObject[] wt_object_array)
Creates a transferable object capable of transfering the specified array of WTObjects.

Supported API: true

Parameters:
wt_object_array - an array of WTObjects to transfer.

WTObjectSelection

public WTObjectSelection(WTObject wt_object)
Creates a transferable object capable of transfering the specified WTObject.

Supported API: true

Parameters:
wt_object - the WTObject to transfer.
Method Detail

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Determines the array of flavors in which this class can provide data.

Supported API: true

Specified by:
getTransferDataFlavors in interface Transferable
Returns:
the array of flavors in which this class can provide data.
See Also:
DataFlavor, WTClipboard

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Determines whether the requested flavor is supported by this object.

Supported API: true

Specified by:
isDataFlavorSupported in interface Transferable
Parameters:
flavor - the requested data flavor.
Returns:
true if the flavor is supported, otherwise false.

getTransferData

public Object getTransferData(DataFlavor flavor)
                       throws UnsupportedFlavorException,
                              IOException
Get the data in the requested format.

Supported API: true

Specified by:
getTransferData in interface Transferable
Parameters:
flavor - the requested data flavor.
Throws:
UnsupportedFlavorException - if the requested data flavor is not supported.
IOException

lostOwnership

public void lostOwnership(Clipboard clipboard,
                          Transferable contents)
Notifies this object that it is no longer the owner of the contents of the clipboard.

Supported API: true

Specified by:
lostOwnership in interface ClipboardOwner
Parameters:
clipboard - the clipboard that is no longer owned
contents - the contents which this owner had placed on the clipboard