|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.utils.drag.FileTransferable
public class FileTransferable
Custom transferable that represents File flavors in a few different ways. This is made to support files drop into system file managers like Windows Explorer, Mac OS X Finder and others.
Field Summary | |
---|---|
protected java.util.List<java.io.File> |
files
Transfered files. |
static java.awt.datatransfer.DataFlavor[] |
flavors
FileTransferable data flavors. |
Constructor Summary | |
---|---|
FileTransferable(java.io.File file)
Constructs new FileTransferable for a single file. |
|
FileTransferable(java.util.List<java.io.File> files)
Constructs new FileTransferable for a list of files. |
Method Summary | |
---|---|
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
|
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
|
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.awt.datatransfer.DataFlavor[] flavors
protected final java.util.List<java.io.File> files
Constructor Detail |
---|
public FileTransferable(java.io.File file)
file
- transferred filepublic FileTransferable(java.util.List<java.io.File> files)
files
- transferred files listMethod Detail |
---|
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
getTransferData
in interface java.awt.datatransfer.Transferable
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |