org.rosuda.util
Class ImageSelection
java.lang.Object
org.rosuda.util.ImageSelection
- All Implemented Interfaces:
- Transferable
public class ImageSelection
- extends Object
- implements Transferable
Represents an image stored on the clipboard - also provides some useful static functions for putting iamges on the clipbpard.
|
Constructor Summary |
ImageSelection(Image image)
creates a transferable conatining the supplied image |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageSelection
public ImageSelection(Image image)
- creates a transferable conatining the supplied image
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- Specified by:
getTransferDataFlavors in interface Transferable
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
- Specified by:
isDataFlavorSupported in interface Transferable
getTransferData
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
- Specified by:
getTransferData in interface Transferable
- Throws:
UnsupportedFlavorException
IOException
setClipboard
public static ImageSelection setClipboard(Image image)
- puts an image on the (system) clipboard - implicitly creates an instance of ImageSelection
copyComponent
public static ImageSelection copyComponent(Component c,
boolean whiteBg,
boolean antiAliased)