Abstract Interface ClipboardOwner in Java

digitization, transformation, binary

Abstract Interface ClipboardOwner in Java

ClipboardOwner interface defines the single method that an object that places data on a Clipboard must implement. This method is used to notify the object when its data on the clipboard is replaced by other, more recent, data. An object that places data on a clipboard must remain ready to satisfy requests for that data until lostOwnership() is called.

In short, ClipboardOwner is implemented by classes that want to be notified when someone else sets the contents of a clipboard.

Ads code goes here

The interface structure of ClipboardOwner in Java is given as

public abstract interface ClipboardOwner {
// Public Instance Methods
public abstract void lostOwnership(Clipboard clipboard, Transferable contents);
}

The details of the class structure are given as follows:

public abstract void lostOwnership(Clipboard clipboard, Transferable contents);

public abstract void lostOwnership(Clipboard clipboard, Transferable contents) method instructs the ClipboardOwner that the contents it placed on the given clipboard are no longer there.

Parameter
clipboard – The clipboard whose contents have changed.
contents – The contents that this owner originally put on the clipboard.

Share and Enjoy !

READ  Class DatagramPacket in Java

1 thought on “Abstract Interface ClipboardOwner in Java”

Leave a Comment

Your email address will not be published. Required fields are marked *