Class WTClipboard


public class WTClipboard extends Clipboard
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
  • Method Details

    • getClipboard

      public static Clipboard 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

      public void setContents(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. 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:
      setContents in class Clipboard
      Parameters:
      content - the transferable object representing the clipboard data.
      owner - the object which owns the clipboard data.
    • getContents

      public Transferable getContents(Object requestor)
      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:
      getContents in class Clipboard
      Parameters:
      requestor - the object requesting the clipboard data.
      Returns:
      the data from the clipboard.