org.jfree.chart

Class ChartTransferable

public class ChartTransferable extends Object implements Transferable

A class used to represent a chart on the clipboard.

Since: 1.0.13

Constructor Summary
ChartTransferable(JFreeChart chart, int width, int height)
Creates a new chart selection.
ChartTransferable(JFreeChart chart, int width, int height, boolean cloneData)
Creates a new chart selection.
Method Summary
ObjectgetTransferData(DataFlavor flavor)
Returns the content for the requested flavor, if it is supported.
DataFlavor[]getTransferDataFlavors()
Returns the data flavors supported.
booleanisDataFlavorSupported(DataFlavor flavor)
Returns true if the specified flavor is supported.

Constructor Detail

ChartTransferable

public ChartTransferable(JFreeChart chart, int width, int height)
Creates a new chart selection.

Parameters: chart the chart. width the chart width. height the chart height.

ChartTransferable

public ChartTransferable(JFreeChart chart, int width, int height, boolean cloneData)
Creates a new chart selection.

Parameters: chart the chart. width the chart width. height the chart height. cloneData clone the dataset(s)?

Method Detail

getTransferData

public Object getTransferData(DataFlavor flavor)
Returns the content for the requested flavor, if it is supported.

Parameters: flavor the requested flavor.

Returns: The content.

Throws: java.awt.datatransfer.UnsupportedFlavorException java.io.IOException

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Returns the data flavors supported.

Returns: The data flavors supported.

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Returns true if the specified flavor is supported.

Parameters: flavor the flavor.

Returns: A boolean.

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.