public interface ImportHandler
ImportHandler
s are responsible for the import of transfer data from representations
suitable for Drag&Drop or Copy/Cut&Paste transfer.Modifier and Type | Method and Description |
---|---|
int |
getImportActionForFlavor(DataFlavor flavor,
ImportParameters parameters)
Returns the accepted DnD action for the given
DataFlavor by this import handler. |
boolean |
importData(Transferable data,
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. |
boolean importData(Transferable data, int dropAction, ImportParameters parameters) throws IOException, UnsupportedFlavorException, JadiceException
Transferable
into the given ViewComponent
.data
- The Transferable
to importdropAction
- the user drop action
of the
importparameters
- the import parameters containing additional context informationtrue
if the import succeededIOException
UnsupportedFlavorException
JadiceException
boolean isDataFlavorSupported(DataFlavor flavor, ImportParameters parameters)
DataFlavor
is supported by this import handler.flavor
- The flavor in which the transfer bundle will be provided when supported.parameters
- the import parameters containing additional context informationtrue
if the given flavor is supported.int getImportActionForFlavor(DataFlavor flavor, ImportParameters parameters)
DataFlavor
by this import handler.flavor
- The flavor in which the transfer bundle will be provided when supported.parameters
- the import parameters containing additional context informationint
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.DnDConstants.ACTION_COPY
,
DnDConstants.ACTION_COPY_OR_MOVE
,
DnDConstants.ACTION_LINK
,
DnDConstants.ACTION_MOVE
,
DnDConstants.ACTION_NONE
Copyright © 2024 levigo holding gmbh. All rights reserved.