|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.swing.dnd.CompositeImportHandler
public class CompositeImportHandler
An ImportHandler
encompassing a set of delegate ImportHandler
s. The data flavors
supported by this handler are the union of all supported data flavors of the element handlers.
The encompassed handlers will be called in the same order as the were given in the constructors. Hence integrators are advised to order the handlers from the most specific to the most general one.
CompositeExportHandler
Constructor Summary | |
---|---|
CompositeImportHandler(ImportHandler... delegates)
Create a CompositeImportHandler using the given array of delegate handlers. |
|
CompositeImportHandler(List<? extends ImportHandler> delegates)
Create a CompositeImportHandler using the given list of delegate handlers. |
Method Summary | |
---|---|
String |
getImportActionDescription(Transferable data,
int importAction,
ImportParameters parameters)
|
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 CompositeImportHandler(ImportHandler... delegates)
CompositeImportHandler
using the given array of delegate handlers.
delegates
- The delegate ImportHandler
spublic CompositeImportHandler(List<? extends ImportHandler> delegates)
CompositeImportHandler
using the given list of delegate handlers.
delegates
- The delegate ImportHandler
sMethod Detail |
---|
public boolean importData(Transferable t, int dropAction, ImportParameters parameters) throws IOException, UnsupportedFlavorException, 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
IOException
UnsupportedFlavorException
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)
public String getImportActionDescription(Transferable data, int importAction, ImportParameters parameters)
getImportActionDescription
in interface com.levigo.jadice.swing.internal.transfer.SelfDescribingImportHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |