org.openide.util.datatransfer
Class ExTransferable.Multi

java.lang.Object
  extended by org.openide.util.datatransfer.ExTransferable.Multi
All Implemented Interfaces:
java.awt.datatransfer.Transferable
Enclosing class:
ExTransferable

public static class ExTransferable.Multi
extends java.lang.Object
implements java.awt.datatransfer.Transferable

Transferable object for multiple transfer. It allows several types of data to be combined into one clipboard element.

Author:
Jaroslav Tulach

Nested Class Summary
(package private) static class ExTransferable.Multi.TransferObjectImpl
          Class implementing MultiTransferObject interface.
 
Constructor Summary
ExTransferable.Multi(java.awt.datatransfer.Transferable[] trans)
          Constructor taking a list of Transferable objects.
 
Method Summary
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
          Get transfer data.
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
          Get supported flavors.
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
          Is this flavor supported?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExTransferable.Multi

public ExTransferable.Multi(java.awt.datatransfer.Transferable[] trans)
Constructor taking a list of Transferable objects.

Parameters:
trans - array of transferable objects
Method Detail

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Get supported flavors.

Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable
Returns:
only one flavor, ExTransferable.multiFlavor

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Is this flavor supported?

Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
Parameters:
flavor - the flavor
Returns:
true only if the flavor is ExTransferable.multiFlavor

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException,
                                        java.io.IOException
Get transfer data.

Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Parameters:
flavor - the flavor (ExTransferable.multiFlavor)
Returns:
MultiTransferObject that represents data in this object
Throws:
java.awt.datatransfer.UnsupportedFlavorException - when the flavor is not supported
java.io.IOException - when it is not possible to read data