Package org.jmol.awt
Class AwtClipboard
java.lang.Object
org.jmol.awt.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 String
Get the String residing on the clipboard.getTransferData
(DataFlavor flavor) boolean
isDataFlavorSupported
(DataFlavor flavor) static void
setClipboard
(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:
getTransferDataFlavors
in interfaceTransferable
-
isDataFlavorSupported
- Specified by:
isDataFlavorSupported
in interfaceTransferable
-
getTransferData
- Specified by:
getTransferData
in interfaceTransferable
- Throws:
UnsupportedFlavorException
IOException
-
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.
-