Package wt.clients.util
Class WTClipboard
java.lang.Object
java.awt.datatransfer.Clipboard
wt.clients.util.WTClipboard
This class holds the clipboard that is currently being used by Windchill
clients to hold Windchill objects. If access to the system clipboard is granted
by the user, a text representation of the Windchill object will placed in the
system clipboard. Untrusted Applets are not allowed access to the system
clipboard unless the user grants permission.
This class also holds the dataflavor that is unique to Windchill.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClipboardGet the Windchill clipboard.getContents(Object requestor) Get the data from the clipboard.voidsetContents(Transferable contents, ClipboardOwner owner) Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents.Methods inherited from class java.awt.datatransfer.Clipboard
addFlavorListener, getAvailableDataFlavors, getData, getFlavorListeners, getName, isDataFlavorAvailable, removeFlavorListener
-
Method Details
-
getClipboard
Get the Windchill clipboard. The Windchill clipboard is kept track of statically by this class. If the Windchill clipboard has not yet been created, this method will create it. This method will also try to get access to the System Clipboard. Currently the jdk does not allow setting any object in the clipboard except strings.
Supported API: true- Returns:
- the Windchill clipboard
-
setContents
Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents. If there is an existing owner registered, that owner is notified that it no longer holds ownership of the clipboard contents.
Supported API: true- Overrides:
setContentsin classClipboard- Parameters:
content- the transferable object representing the clipboard data.owner- the object which owns the clipboard data.
-
getContents
Get the data from the clipboard. If the system clipboard is being used and Windchill does not own it, the data will be obtained from the system clipboard. If the system clipboard is being used and is owned by Windchill, then the data is obtained from the Windchill clipboard. If the system clipboard is not in use, the data is obtained from the Windchill clipboard.
Supported API: true- Overrides:
getContentsin classClipboard- Parameters:
requestor- the object requesting the clipboard data.- Returns:
- the data from the clipboard.
-