public class TransferableImage extends Object implements Serializable, Transferable
| Modifier and Type | Field and Description |
|---|---|
protected BufferedImage |
m_Data
the image to transfer.
|
| Constructor and Description |
|---|
TransferableImage(BufferedImage data)
Initializes the container.
|
| Modifier and Type | Method and Description |
|---|---|
BufferedImage |
getData()
Returns the underlying image.
|
Object |
getTransferData(DataFlavor flavor)
Returns an object which represents the data to be transferred.
|
DataFlavor[] |
getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data
can be provided in.
|
boolean |
isDataFlavorSupported(DataFlavor flavor)
Returns whether or not the specified data flavor is supported for
this object.
|
String |
toString()
Returns a string representation of the underlying image.
|
protected BufferedImage m_Data
public TransferableImage(BufferedImage data)
data - the string to transferpublic DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface Transferablepublic boolean isDataFlavorSupported(DataFlavor flavor)
isDataFlavorSupported in interface Transferableflavor - the requested flavor for the datapublic Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
getTransferData in interface Transferableflavor - the requested flavor for the dataIOException - if the data is no longer available
in the requested flavor.UnsupportedFlavorException - if the requested data flavor is
not supported.DataFlavor.getRepresentationClass()public BufferedImage getData()
Copyright © 2018. All rights reserved.