java.lang.Object
org.jfree.chart.ChartTransferable
- All Implemented Interfaces:
Transferable
A class used to represent a chart on the clipboard.
-
Constructor Summary
ConstructorDescriptionChartTransferable
(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.ChartTransferable
(JFreeChart chart, int width, int height, int minDrawW, int minDrawH, int maxDrawW, int maxDrawH, boolean cloneData) Creates a new chart selection. -
Method Summary
Modifier and TypeMethodDescriptiongetTransferData
(DataFlavor flavor) Returns the content for the requested flavor, if it is supported.Returns the data flavors supported.boolean
isDataFlavorSupported
(DataFlavor flavor) Returnstrue
if the specified flavor is supported.
-
Constructor Details
-
ChartTransferable
Creates a new chart selection.- Parameters:
chart
- the chart.width
- the chart width.height
- the chart height.
-
ChartTransferable
Creates a new chart selection.- Parameters:
chart
- the chart.width
- the chart width.height
- the chart height.cloneData
- clone the dataset(s)?
-
ChartTransferable
public ChartTransferable(JFreeChart chart, int width, int height, int minDrawW, int minDrawH, int maxDrawW, int maxDrawH, boolean cloneData) Creates a new chart selection. The minimum and maximum drawing dimensions are used to match the scaling behaviour in theChartPanel
class.- Parameters:
chart
- the chart.width
- the chart width.height
- the chart height.minDrawW
- the minimum drawing width.minDrawH
- the minimum drawing height.maxDrawW
- the maximum drawing width.maxDrawH
- the maximum drawing height.cloneData
- clone the dataset(s)?
-
-
Method Details
-
getTransferDataFlavors
Returns the data flavors supported.- Specified by:
getTransferDataFlavors
in interfaceTransferable
- Returns:
- The data flavors supported.
-
isDataFlavorSupported
Returnstrue
if the specified flavor is supported.- Specified by:
isDataFlavorSupported
in interfaceTransferable
- Parameters:
flavor
- the flavor.- Returns:
- A boolean.
-
getTransferData
Returns the content for the requested flavor, if it is supported.- Specified by:
getTransferData
in interfaceTransferable
- Parameters:
flavor
- the requested flavor.- Returns:
- The content.
- Throws:
UnsupportedFlavorException
- if the flavor is not supported.IOException
- if there is an IO problem.
-