20. java.awt.datatransfer Reference
Contents:
ClipboardNameClipboard
DescriptionThe 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. Class Definition
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); } Variablescontentsprotected Transferable contentsThe object that the Clipboard contains, i.e., the object that has been cut or copied. ownerprotected ClipboardOwner ownerThe object that owns the contents. When something else is placed on the clipboard, owner is notified via lostOwnership(). ConstructorsClipboardpublic Clipboard (String name)
Instance MethodsgetContentspublic synchronized Transferable getContents (Object requestor)
getNamepublic String getName()
setContentspublic synchronized void setContents (Transferable contents, ClipboardOwner owner)
See AlsoClipboardOwner, Toolkit, Transferable |
|