|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.swing.thumbnailview.dnd.FileImportHandler
public class FileImportHandler
An ImportHandler
implementation supporting the import of files residing on a local file
system. The supported DataFlavor
is DataFlavor.javaFileListFlavor
and (on Linux
systems only) the URI list flavor with MIME type text/uri-list.
Constructor Summary | |
---|---|
FileImportHandler()
|
Method Summary | |
---|---|
int |
getImportActionForFlavor(DataFlavor flavor,
ImportParameters parameters)
Returns the accepted DnD action for the given DataFlavor by this import handler. |
boolean |
importData(Transferable t,
int dropAction,
ImportParameters parameters)
Import from the given Transferable into the given ViewComponent . |
boolean |
isDataFlavorSupported(DataFlavor flavor,
ImportParameters parameters)
Check whether the given DataFlavor is supported by this import handler. |
protected static List<File> |
textURIListToFileList(String data)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileImportHandler()
Method Detail |
---|
public boolean importData(Transferable t, int dropAction, ImportParameters parameters) throws UnsupportedFlavorException, IOException, JadiceException
ImportHandler
Transferable
into the given ViewComponent
.
importData
in interface ImportHandler
t
- The Transferable
to importdropAction
- the user drop action
of the
importparameters
- the import parameters containing additional context information
true
if the import succeeded
UnsupportedFlavorException
IOException
JadiceException
public boolean isDataFlavorSupported(DataFlavor flavor, ImportParameters parameters)
ImportHandler
DataFlavor
is supported by this import handler.
isDataFlavorSupported
in interface ImportHandler
flavor
- The flavor in which the transfer bundle will be provided when supported.parameters
- the import parameters containing additional context information
true
if the given flavor is supported.public int getImportActionForFlavor(DataFlavor flavor, ImportParameters parameters)
ImportHandler
DataFlavor
by this import handler.
getImportActionForFlavor
in interface ImportHandler
flavor
- The flavor in which the transfer bundle will be provided when supported.parameters
- the import parameters containing additional context information
int
one of the DnDConstants
action constants. Returns which DnD
action will be accepted by this import handler for the given flavor. If the flavor is
not supported DnDConstants.ACTION_NONE
will be returned.ImportHandler.getImportActionForFlavor(java.awt.datatransfer.DataFlavor,
ImportParameters)
protected static List<File> textURIListToFileList(String data)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |