public class AwtClipboard extends Object implements Transferable
| Modifier and Type | Field and Description |
|---|---|
private Image |
image
The image to transfer into the clipboard.
|
private String |
text |
| Modifier | Constructor and Description |
|---|---|
private |
AwtClipboard(Object image) |
| Modifier and Type | Method and Description |
|---|---|
static String |
getClipboardText()
Get the String residing on the clipboard.
|
Object |
getTransferData(DataFlavor flavor) |
DataFlavor[] |
getTransferDataFlavors() |
boolean |
isDataFlavorSupported(DataFlavor flavor) |
static void |
setClipboard(Object textOrImage)
Transfers text or image into the clipboard.
|
private Image image
private String text
private AwtClipboard(Object image)
public static void setClipboard(Object textOrImage)
textOrImage - to transfer into the clipboard.public DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface Transferablepublic boolean isDataFlavorSupported(DataFlavor flavor)
isDataFlavorSupported in interface Transferablepublic Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
getTransferData in interface TransferableUnsupportedFlavorExceptionIOExceptionpublic static String getClipboardText()