Class AwtClipboard
java.lang.Object
jspecview.java.AwtClipboard
- All Implemented Interfaces:
Transferable
This class is used to transfer text or an image into the clipboard and to get tet from the clipboard.
Simplified by Bob Hanson
- Author:
- Nicolas Vervelle
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet the String residing on the clipboard.getTransferData(DataFlavor flavor) booleanisDataFlavorSupported(DataFlavor flavor) static voidsetClipboard(Object textOrImage) Transfers text or image into the clipboard.
-
Method Details
-
setClipboard
Transfers text or image into the clipboard.- Parameters:
textOrImage- to transfer into the clipboard.
-
getTransferDataFlavors
- Specified by:
getTransferDataFlavorsin interfaceTransferable
-
isDataFlavorSupported
- Specified by:
isDataFlavorSupportedin interfaceTransferable
-
getTransferData
- Specified by:
getTransferDatain interfaceTransferable- Throws:
UnsupportedFlavorExceptionIOException
-
getClipboardText
Get the String residing on the clipboard. Or, if it is a file list, get the load command associated with that. from http://www.javapractices.com/Topic82.cjp- Returns:
- any text found on the Clipboard; if none found, return an empty String.
-