org.jhotdraw.gui.datatransfer
Class ImageTransferable

java.lang.Object
  extended by org.jhotdraw.gui.datatransfer.ImageTransferable
All Implemented Interfaces:
java.awt.datatransfer.Transferable

public class ImageTransferable
extends java.lang.Object
implements java.awt.datatransfer.Transferable

A Transferable with an Image as its transfer class.

Version:
$Id: ImageTransferable.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer

Field Summary
private  java.awt.Image image
           
static java.awt.datatransfer.DataFlavor IMAGE_PNG_FLAVOR
           
 
Constructor Summary
ImageTransferable(java.awt.Image image)
          Creates a new instance.
 
Method Summary
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
           
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
           
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

private java.awt.Image image

IMAGE_PNG_FLAVOR

public static final java.awt.datatransfer.DataFlavor IMAGE_PNG_FLAVOR
Constructor Detail

ImageTransferable

public ImageTransferable(java.awt.Image image)
Creates a new instance.

Method Detail

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException,
                                        java.io.IOException
Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Throws:
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable