public class ReorderPageImportHandler extends Object implements ImportHandler, com.levigo.jadice.swing.internal.transfer.SelfDescribingImportHandler
ImportHandler
implementation used to support the reordering of Page
s within
the same Document
(but not limited to the same ViewComponent
). The
DataFlavor
used is ReorderDataFlavor
.ReorderDataFlavor
,
ReorderPageExportHandler
Constructor and Description |
---|
ReorderPageImportHandler() |
Modifier and Type | Method and Description |
---|---|
static void |
clearDidPerformImport()
Deprecated.
This method is not part of the public API. Do not use!
|
static boolean |
didPerformImport()
Deprecated.
This method is not part of the public API. Do not use!
|
String |
getImportActionDescription(Transferable data,
int importAction,
ImportParameters parameters)
Return a more precise description of the performed import.
|
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. |
@Deprecated public static boolean didPerformImport()
@Deprecated public static void clearDidPerformImport()
public boolean importData(Transferable t, int dropAction, ImportParameters parameters) throws IOException, UnsupportedFlavorException
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 informationtrue
if the import succeededIOException
UnsupportedFlavorException
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 informationtrue
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 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.ImportHandler.getImportActionForFlavor(java.awt.datatransfer.DataFlavor,
ImportParameters)
public String getImportActionDescription(Transferable data, int importAction, ImportParameters parameters)
com.levigo.jadice.swing.internal.transfer.SelfDescribingImportHandler
null
is returned, the default description will be used.getImportActionDescription
in interface com.levigo.jadice.swing.internal.transfer.SelfDescribingImportHandler
importAction
- TODOnull
Copyright © 2024 levigo holding gmbh. All rights reserved.