com.levigo.jadice.swing.dnd
Class RasterizedSelectionExportHandler

java.lang.Object
  extended by com.levigo.jadice.swing.dnd.RasterizedSelectionExportHandler
All Implemented Interfaces:
ExportHandler<Selection>

public class RasterizedSelectionExportHandler
extends Object
implements ExportHandler<Selection>

An ExportHandler implementation to export the given Selection as a rasterized image. The DataFlavor used is JadiceRasteredImageDataFlavor.

See Also:
JadiceRasteredImageDataFlavor

Constructor Summary
RasterizedSelectionExportHandler()
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RasterizedSelectionExportHandler

public RasterizedSelectionExportHandler()
Method Detail

populateTransferDataFlavors

public List<? extends DataFlavor> populateTransferDataFlavors(Selection selection,
                                                              ExportParameters parameters)
Description copied from interface: 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.

Specified by:
populateTransferDataFlavors in interface ExportHandler<Selection>
Parameters:
selection - the selection of items to export
parameters - the export parameters containing additional context information
Returns:
the (possibly empty) list of DataFlavors.

getExportAction

public int getExportAction(Selection selection,
                           ExportParameters parameters)
Description copied from interface: ExportHandler
Return the provided DnD actions for given selection.

Specified by:
getExportAction in interface ExportHandler<Selection>
Parameters:
selection - the selection of items to export
parameters - the export parameters containing additional context information
Returns:
int 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.
See Also:
ExportHandler.getExportAction(Object, ExportParameters)

getTransferData

public Object getTransferData(Selection selection,
                              DataFlavor flavor,
                              ExportParameters parameters)
                       throws UnsupportedFlavorException
Description copied from interface: ExportHandler
Return the transfer data representation of the given selection.

Specified by:
getTransferData in interface ExportHandler<Selection>
Parameters:
selection - the selection of items to export
flavor - The flavor in which the transfer data shall be exported
parameters - the export parameters containing additional context information
Returns:
the transfer data representation
Throws:
UnsupportedFlavorException - if the flavor is not supported by this ExportHandler

getExportResolution

public int getExportResolution()

setExportResolution

public void setExportResolution(int deviceExportResolution)


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.