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.Modifier and Type | Method and Description |
---|---|
java.awt.datatransfer.Transferable |
getContents()
Returns a
Transferable object representing
the current contents of the clipboard. |
void |
setContents(java.awt.datatransfer.Transferable contents)
Sets the current contents of the clipboard to the specified
Transferable object. |
java.awt.datatransfer.Transferable getContents()
Transferable
object representing
the current contents of the clipboard. If the clipboard
currently has no contents, it returns null.Transferable
object on
the clipboard.void setContents(java.awt.datatransfer.Transferable contents)
Transferable
object.contents
- The Transferable
object
representing clipboard content.Copyright © 1998, 2017, Oracle and/or its affiliates. All rights reserved.