|
|||||||||
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.ImageImportHandler
public class ImageImportHandler
An ImportHandler
implementation supporting the import of images. The supported
DataFlavor
is DataFlavor.imageFlavor
, but not its specialization
JadiceRasteredImageDataFlavor
.
See JadiceRasteredImageDataFlavor
Constructor Summary | |
---|---|
ImageImportHandler()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageImportHandler()
Method Detail |
---|
public boolean importData(Transferable t, int dropAction, ImportParameters parameters) throws UnsupportedFlavorException, IOException
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
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |