Contents:
Clipboard
ClipboardOwner
DataFlavor
StringSelection
Transferable
UnsupportedFlavorException
The Clipboard class is a repository for a Transferable object and can be used for cut, copy, and paste operations. The system clipboard can be accessed by calling Toolkit.getDefaultToolkit().getSystemClipboard(). You can use this technique if you are interested in exchanging data between your application and other applications ( Java or non-Java) running on the system. In addition, Clipboard can be instantiated directly, if "private" clipboards are needed.
public class java.awt.datatransfer.Clipboard extends java.lang.Object { // Variables protected Transferable contents; protected ClipboardOwner owner; // Constructors public Clipboard (String name); // Instance Methods public synchronized Transferable getContents (Object requestor); public String getName(); public synchronized void setContents (Transferable contents, ClipboardOwner owner); }
The object that the Clipboard contains, i.e., the object that has been cut or copied.
The object that owns the contents. When something else is placed on the clipboard, owner is notified via lostOwnership().
The name for this Clipboard.
Constructs a Clipboard object with the given name.
The object asking for the contents.
An object that implements the Transferable interface.
Returns the current contents of the Clipboard. You could use this method to paste data from the clipboard into your application.
Clipboard's name.
Returns the name used when this clipboard was constructed. Toolkit.getSystemClipboard() returns a Clipboard named "System".
New contents.
Owner of the new contents.
Changes the contents of the Clipboard. You could use this method to cut or copy data from your application to the clipboard.
ClipboardOwner, Toolkit, Transferable
This HTML Help has been published using the chm2web software. |