Package org.jmol.awt
Class AwtClipboard
- java.lang.Object
-
- org.jmol.awt.AwtClipboard
-
- All Implemented Interfaces:
Transferable
public class AwtClipboard extends Object implements 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
-
-
Constructor Summary
Constructors Modifier Constructor Description privateAwtClipboard(Object image)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringgetClipboardText()Get the String residing on the clipboard.ObjectgetTransferData(DataFlavor flavor)DataFlavor[]getTransferDataFlavors()booleanisDataFlavorSupported(DataFlavor flavor)static voidsetClipboard(Object textOrImage)Transfers text or image into the clipboard.
-
-
-
Constructor Detail
-
AwtClipboard
private AwtClipboard(Object image)
-
-
Method Detail
-
setClipboard
public static void setClipboard(Object textOrImage)
Transfers text or image into the clipboard.- Parameters:
textOrImage- to transfer into the clipboard.
-
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- Specified by:
getTransferDataFlavorsin interfaceTransferable
-
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
- Specified by:
isDataFlavorSupportedin interfaceTransferable
-
getTransferData
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
- Specified by:
getTransferDatain interfaceTransferable- Throws:
UnsupportedFlavorExceptionIOException
-
getClipboardText
public static String 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.
-
-