org.tentackle.util
Class FileTransferable
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<File>
org.tentackle.util.FileTransferable
- All Implemented Interfaces:
- Transferable, Serializable, Cloneable, Iterable<File>, Collection<File>, List<File>, RandomAccess
public class FileTransferable
- extends Vector<File>
- implements Transferable
A transferable for files.
Returned to the drop target (if we are the drag source)
and if the dragged object is a document (either File or Directory).
- See Also:
- Serialized Form
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
FileTransferable
public FileTransferable(File file)
- Creates a FileTransferable.
- Parameters:
file - the file
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- Description copied from interface:
java.awt.datatransfer.Transferable
- Returns an array of DataFlavor objects indicating the flavors 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).
- Specified by:
getTransferDataFlavors in interface Transferable
- Returns:
- an array of data flavors in which this data can be transferred
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
- Description copied from interface:
java.awt.datatransfer.Transferable
- Returns whether or not the specified data flavor is supported for
this object.
- Specified by:
isDataFlavorSupported in interface Transferable
- Parameters:
flavor - the requested flavor for the data
- Returns:
- boolean indicating whether or not the data flavor is supported
getTransferData
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
- Description copied from interface:
java.awt.datatransfer.Transferable
- Returns an object which represents the data to be transferred. The class
of the object returned is defined by the representation class of the flavor.
- Specified by:
getTransferData in interface Transferable
- Parameters:
flavor - the requested flavor for the data
- Throws:
UnsupportedFlavorException - if the requested data flavor is
not supported.
IOException - if the data is no longer available
in the requested flavor.- See Also:
DataFlavor.getRepresentationClass()
Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de