ClipboardOwner Interface
Classes that need to place objects on a clipboard must implement the ClipboardOwner
interface. An object becomes the clipboard owner by placing something on a Clipboard
and remains owner as long as that object stays on the clipboard; it loses ownership when someone else writes to the clipboard. The ClipboardOwner
interface provides a way to receive notification when you lose ownership--that is, when the object you placed on the clipboard is replaced by something else. Methods
- public abstract void lostOwnership(Clipboard clipboard, Transferable contents)
- The
lostOwnership()
method tells the owner ofcontents
that it is no longer on the givenclipboard
. It is usually implemented as an empty stub but is available for situations in which you have to know.