public class RasterizedSelectionExportHandler extends Object implements ExportHandler<Selection>
ExportHandler
implementation to export the given Selection
as a rasterized image. The DataFlavor
used is
JadiceRasteredImageDataFlavor
.JadiceRasteredImageDataFlavor
Constructor and Description |
---|
RasterizedSelectionExportHandler() |
Modifier and Type | Method and Description |
---|---|
int |
getExportAction(Selection selection,
ExportParameters parameters)
Return the provided DnD actions for given selection.
|
int |
getExportResolution() |
Object |
getTransferData(Selection selection,
DataFlavor flavor,
ExportParameters parameters)
Return the transfer data representation of the given selection.
|
List<? extends DataFlavor> |
populateTransferDataFlavors(Selection selection,
ExportParameters parameters)
Return the list of
DataFlavor (s) supported by this transfer handler. |
void |
setExportResolution(int deviceExportResolution) |
public List<? extends DataFlavor> populateTransferDataFlavors(Selection selection, ExportParameters parameters)
ExportHandler
Return the list of DataFlavor
(s) supported by this transfer handler. The
DataFlavor
(s) supported by this export handler may depend on the selection and the
source ViewComponent
.
If some prerequisites of the specific ExportHandler
are not met, it may return an empty
list.
populateTransferDataFlavors
in interface ExportHandler<Selection>
selection
- the selection of items to exportparameters
- the export parameters containing additional context informationDataFlavor
s.public int getExportAction(Selection selection, ExportParameters parameters)
ExportHandler
getExportAction
in interface ExportHandler<Selection>
selection
- the selection of items to exportparameters
- the export parameters containing additional context informationint
one of the DnDConstants
action constants. Returns which DnD
action will be provided by this export handler for the given flavor. If the flavor is
not supported DnDConstants.ACTION_NONE
will be returned.ExportHandler.getExportAction(Object,
ExportParameters)
public Object getTransferData(Selection selection, DataFlavor flavor, ExportParameters parameters) throws UnsupportedFlavorException
ExportHandler
getTransferData
in interface ExportHandler<Selection>
selection
- the selection of items to exportflavor
- The flavor in which the transfer data shall be exportedparameters
- the export parameters containing additional context informationUnsupportedFlavorException
- if the flavor is not supported by this ExportHandler
public int getExportResolution()
public void setExportResolution(int deviceExportResolution)
Copyright © 2024 levigo holding gmbh. All rights reserved.