Path: blob/master/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java
41159 views
/*1* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.awt.datatransfer;2627/**28* Defines the interface for classes that will provide data to a clipboard. An29* instance of this interface becomes the owner of the contents of a clipboard30* (clipboard owner) if it is passed as an argument to31* {@link Clipboard#setContents} method of the clipboard and this method returns32* successfully. The instance remains the clipboard owner until another33* application or another object within this application asserts ownership of34* this clipboard.35*36* @author Amy Fowler37* @see Clipboard38* @since 1.139*/40public interface ClipboardOwner {4142/**43* Notifies this object that it is no longer the clipboard owner. This44* method will be called when another application or another object within45* this application asserts ownership of the clipboard.46*47* @param clipboard the clipboard that is no longer owned48* @param contents the contents which this owner had placed on the49* {@code clipboard}50*/51public void lostOwnership(Clipboard clipboard, Transferable contents);52}535455