Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.datatransfer

Class Clipboard

java.lang.Object
|
+--java.awt.datatransfer.Clipboard


public class Clipboard

extends Object

This class allows data to be transferred using a cut and paste type mechanism.

Author:

Field Summary

java.awt.datatransfer.Transferablecontents

The data being transferred.
java.awt.datatransfer.ClipboardOwnerowner

The owner of this clipboard.

Constructor Summary

Clipboard(java.lang.String name)

Initializes a new instance of Clipboard with the specified name.

Method Summary

synchronized java.awt.datatransfer.TransferablegetContents(java.lang.Object requestor)

Returns the contents of the clipboard.
java.lang.StringgetName()

Returns the name of the clipboard.
synchronized voidsetContents(java.awt.datatransfer.Transferable contents, java.awt.datatransfer.ClipboardOwner owner)

Sets the content and owner of this clipboard.

Field Details

contents

protected Transferable contents

The data being transferred.


owner

protected ClipboardOwner owner

The owner of this clipboard.


Constructor Details

Clipboard

public Clipboard(java.lang.String name)

Initializes a new instance of Clipboard with the specified name.

Parameters:


Method Details

getContents

public synchronized Transferable getContents(java.lang.Object requestor)

Returns the contents of the clipboard.

Parameters:

Throws:


getName

public String getName()

Returns the name of the clipboard.


setContents

public synchronized void setContents(java.awt.datatransfer.Transferable contents, java.awt.datatransfer.ClipboardOwner owner)

Sets the content and owner of this clipboard. If the given owner is different from the current owner then lostOwnership is called on the current owner. XXX - is this called with the old or new contents.

Parameters:

Throws: