jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java
changeset 45655 02c95aa8a53a
parent 45434 4582657c7260
equal deleted inserted replaced
45654:5ff2edfa03fc 45655:02c95aa8a53a
     1 /*
     1 /*
     2  * Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    24  */
    24  */
    25 
    25 
    26 package java.awt.datatransfer;
    26 package java.awt.datatransfer;
    27 
    27 
    28 /**
    28 /**
    29  * Defines the interface for classes that will provide data to
    29  * Defines the interface for classes that will provide data to a clipboard. An
    30  * a clipboard. An instance of this interface becomes the owner
    30  * instance of this interface becomes the owner of the contents of a clipboard
    31  * of the contents of a clipboard (clipboard owner) if it is
    31  * (clipboard owner) if it is passed as an argument to
    32  * passed as an argument to
    32  * {@link Clipboard#setContents} method of the clipboard and this method returns
    33  * {@link java.awt.datatransfer.Clipboard#setContents} method of
    33  * successfully. The instance remains the clipboard owner until another
    34  * the clipboard and this method returns successfully.
    34  * application or another object within this application asserts ownership of
    35  * The instance remains the clipboard owner until another application
    35  * this clipboard.
    36  * or another object within this application asserts ownership
       
    37  * of this clipboard.
       
    38  *
    36  *
    39  * @see java.awt.datatransfer.Clipboard
    37  * @author Amy Fowler
    40  *
    38  * @see Clipboard
    41  * @author      Amy Fowler
       
    42  * @since 1.1
    39  * @since 1.1
    43  */
    40  */
    44 
       
    45 public interface ClipboardOwner {
    41 public interface ClipboardOwner {
    46 
    42 
    47     /**
    43     /**
    48      * Notifies this object that it is no longer the clipboard owner.
    44      * Notifies this object that it is no longer the clipboard owner. This
    49      * This method will be called when another application or another
    45      * method will be called when another application or another object within
    50      * object within this application asserts ownership of the clipboard.
    46      * this application asserts ownership of the clipboard.
    51      *
    47      *
    52      * @param clipboard the clipboard that is no longer owned
    48      * @param  clipboard the clipboard that is no longer owned
    53      * @param contents the contents which this owner had placed on the clipboard
    49      * @param  contents the contents which this owner had placed on the
       
    50      *         {@code clipboard}
    54      */
    51      */
    55     public void lostOwnership(Clipboard clipboard, Transferable contents);
    52     public void lostOwnership(Clipboard clipboard, Transferable contents);
    56 
       
    57 }
    53 }