java.awt.datatransfer
public class Clipboard extends Object
| Field Summary | |
|---|---|
| protected Transferable | contents
The data currently on this clipboard. |
| protected ClipboardOwner | owner
The owner of this clipboard. |
| Constructor Summary | |
|---|---|
| Clipboard(String name)
Initializes a new instance of Clipboard with the
specified name.
| |
| Method Summary | |
|---|---|
| void | addFlavorListener(FlavorListener listener) |
| DataFlavor[] | getAvailableDataFlavors() |
| Transferable | getContents(Object requestor)
Returns the contents of the clipboard.
|
| Object | getData(DataFlavor flavor) |
| FlavorListener[] | getFlavorListeners() |
| String | getName()
Returns the name of the clipboard. |
| boolean | isDataFlavorAvailable(DataFlavor flavor) |
| void | removeFlavorListener(FlavorListener listener) |
| void | setContents(Transferable contents, ClipboardOwner owner)
Sets the content and owner of this clipboard. |
Clipboard with the
specified name.
Parameters: name The clipboard name.
Parameters: requestor The object requesting the contents. This implementation ignores this parameter.
Throws: IllegalStateException If the clipboard is currently unavailable
lostOwnership()
is called on the current owner with the old contents of the given
clipboard.
Parameters: contents The new clipboard contents. owner The new clipboard owner
Throws: IllegalStateException If the clipboard is currently unavailable