Module java.jnlp
Package javax.jnlp

Interface ClipboardService


  • public interface ClipboardService
    ClipboardService provides methods for accessing the shared system-wide clipboard, even for applications that are running in the untrusted execution environment. Implementors should warn the user of the potential security risk of letting an untrusted application have access to potentially confidential information stored in the clipboard, or overwriting the contents of the clipboard.
    Since:
    1.4.2
    • Method Detail

      • getContents

        Transferable getContents()
        Returns a Transferable object representing the current contents of the clipboard. If the clipboard currently has no contents, it returns null.
        Returns:
        The current Transferable object on the clipboard.
      • setContents

        void setContents​(Transferable contents)
        Sets the current contents of the clipboard to the specified Transferable object.
        Parameters:
        contents - The Transferable object representing clipboard content.