org.openide.util.datatransfer
Interface MultiTransferObject

All Known Implementing Classes:
ExTransferable.Multi.TransferObjectImpl

public interface MultiTransferObject

Interface for transferring multiple objects at once.

Version:
0.12 Dec 16, 1997
Author:
Jaroslav Tulach

Method Summary
 boolean areDataFlavorsSupported(java.awt.datatransfer.DataFlavor[] array)
          Test whether each transferred item supports at least one of these flavors.
 int getCount()
          Get the number of transferred elements.
 java.awt.datatransfer.Transferable getTransferableAt(int index)
          Get the transferable at some index.
 java.lang.Object getTransferData(int indx, java.awt.datatransfer.DataFlavor flavor)
          Get transfer data for the item at some index.
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors(int i)
          Get list of all supported flavors for the item at an index.
 boolean isDataFlavorSupported(int index, java.awt.datatransfer.DataFlavor flavor)
          Test whether a given data flavor is supported by the item at index.
 

Method Detail

getCount

int getCount()
Get the number of transferred elements.

Returns:
the count

getTransferableAt

java.awt.datatransfer.Transferable getTransferableAt(int index)
Get the transferable at some index.

Parameters:
index - the index
Returns:
the transferable

isDataFlavorSupported

boolean isDataFlavorSupported(int index,
                              java.awt.datatransfer.DataFlavor flavor)
Test whether a given data flavor is supported by the item at index.

Parameters:
index - the index
flavor - the flavor to test
Returns:
true if the flavor is supported

areDataFlavorsSupported

boolean areDataFlavorsSupported(java.awt.datatransfer.DataFlavor[] array)
Test whether each transferred item supports at least one of these flavors. Different items may support different flavors, however.

Parameters:
array - array of flavors
Returns:
true if all items support one or more flavors

getTransferDataFlavors

java.awt.datatransfer.DataFlavor[] getTransferDataFlavors(int i)
Get list of all supported flavors for the item at an index.

Parameters:
i - the index
Returns:
array of supported flavors

getTransferData

java.lang.Object getTransferData(int indx,
                                 java.awt.datatransfer.DataFlavor flavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException,
                                        java.io.IOException
Get transfer data for the item at some index.

Parameters:
indx - the index
flavor - the flavor desired
Returns:
transfer data for item at that index
Throws:
java.io.IOException - if there is an I/O problem
java.awt.datatransfer.UnsupportedFlavorException - if that flavor is not supported