org.xnap.commons.gui.dnd
Class FileTransferable

java.lang.Object
  extended by org.xnap.commons.gui.dnd.FileTransferable
All Implemented Interfaces:
Transferable

public class FileTransferable
extends Object
implements Transferable

Implements the Transferable interface for files thereby supporting the flavors DataFlavor.javaFileListFlavor and AbstractFileTransferHandler.linuxURIFlavor.

Author:
Felix Berger

Constructor Summary
FileTransferable(List<File> files)
          Constructs a transferable for a list of files.
 
Method Summary
 Object getTransferData(DataFlavor flavor)
           
 DataFlavor[] getTransferDataFlavors()
           
 boolean isDataFlavorSupported(DataFlavor flavor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTransferable

public FileTransferable(List<File> files)
Constructs a transferable for a list of files.

The list is not copied, so it should not be modified from the outside.

Parameters:
files - list of files to be transferred, must not be null
Throws:
NullPointerException - if files is null
Method Detail

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Specified by:
getTransferDataFlavors in interface Transferable

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Specified by:
isDataFlavorSupported in interface Transferable

getTransferData

public Object getTransferData(DataFlavor flavor)
                       throws UnsupportedFlavorException,
                              IOException
Specified by:
getTransferData in interface Transferable
Throws:
UnsupportedFlavorException
IOException


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.