public class ChartTransferable
extends java.lang.Object
implements java.awt.datatransfer.Transferable
| Modifier and Type | Field and Description |
|---|---|
(package private) java.awt.datatransfer.DataFlavor |
imageFlavor
The data flavor.
|
| Constructor and Description |
|---|
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.
|
ChartTransferable(JFreeChart chart,
int width,
int height,
int minDrawW,
int minDrawH,
int maxDrawW,
int maxDrawH,
boolean cloneData)
Creates a new chart selection.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
Returns the content for the requested flavor, if it is supported.
|
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
Returns the data flavors supported.
|
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Returns
true if the specified flavor is supported. |
public ChartTransferable(JFreeChart chart, int width, int height)
chart - the chart.width - the chart width.height - the chart height.public ChartTransferable(JFreeChart chart, int width, int height, boolean cloneData)
chart - the chart.width - the chart width.height - the chart height.cloneData - clone the dataset(s)?public ChartTransferable(JFreeChart chart, int width, int height, int minDrawW, int minDrawH, int maxDrawW, int maxDrawH, boolean cloneData)
ChartPanel class.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)?public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface java.awt.datatransfer.Transferablepublic boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
true if the specified flavor is supported.isDataFlavorSupported in interface java.awt.datatransfer.Transferableflavor - the flavor.public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
getTransferData in interface java.awt.datatransfer.Transferableflavor - the requested flavor.java.awt.datatransfer.UnsupportedFlavorException - if the flavor
is not supported.java.io.IOException - if there is an IO problem.