IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
 
[Sommaire]  [Top 50]  [F.A.Q.]  [ Java SE ]  [ Java EE ]  [Javadoc standard]  [Contact]
[ 1.4.2 ]  [ 5.0 ]  [ 6.0
Rechercher   
Dans
Options   sensible à la casse
étendre la recherche aux descriptions
Préférences
fr en 
 
Moteurs de recherche
JavaTM 2 Platform Std. Ed. v1.4.2

java.awt.datatransfer
Class Clipboard

java.lang.Object
  extended byjava.awt.datatransfer.Clipboard

public class Clipboard
extends Object

A class which implements a mechanism to transfer data using cut/copy/paste operations.

See Also:
Toolkit.getSystemClipboard()

Field Summary
protected  Transferable contents
           
protected  ClipboardOwner owner
           
 
Constructor Summary
Clipboard(String name)
          Creates a clipboard object.
 
Method Summary
 Transferable getContents(Object requestor)
          Returns a transferable object representing the current contents of the clipboard.
 String getName()
          Returns the name of this clipboard object.
 void setContents(Transferable contents, ClipboardOwner owner)
          Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

protected ClipboardOwner owner

contents

protected Transferable contents
Constructor Detail

Clipboard

public Clipboard(String name)
Creates a clipboard object.

See Also:
Toolkit.getSystemClipboard()
Method Detail

getName

public String getName()
Returns the name of this clipboard object.

See Also:
Toolkit.getSystemClipboard()

setContents

public void setContents(Transferable contents,
                        ClipboardOwner owner)
Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents. If there is an existing owner registered, that owner is notified that it no longer holds ownership of the clipboard contents. The method throws IllegalStateException if the clipboard is currently unavailable. For example, on some platforms, the system clipboard is unavailable while it is accessed by another application.

Parameters:
contents - the transferable object representing the clipboard content
owner - the object which owns the clipboard content
Throws:
IllegalStateException - if the clipboard is currently unavailable
See Also:
Toolkit.getSystemClipboard()

getContents

public Transferable getContents(Object requestor)
Returns a transferable object representing the current contents of the clipboard. If the clipboard currently has no contents, it returns null. The parameter Object requestor is not currently used. The method throws IllegalStateException if the clipboard is currently unavailable. For example, on some platforms, the system clipboard is unavailable while it is accessed by another application.

Parameters:
requestor - the object requesting the clip data (not used)
Returns:
the current transferable object on the clipboard
Throws:
IllegalStateException - if the clipboard is currently unavailable
See Also:
Toolkit.getSystemClipboard()

Copyright 2003 Sun Microsystems, Inc. All rights reserved