예제 #1
0
        /// <summary>
        /// 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.
        /// <para>
        /// If there is an existing owner different from the argument
        /// <code>owner</code>, that owner is notified that it no longer
        /// holds ownership of the clipboard contents via an invocation
        /// of <code>ClipboardOwner.lostOwnership()</code> on that owner.
        /// An implementation of <code>setContents()</code> is free not
        /// to invoke <code>lostOwnership()</code> directly from this method.
        /// For example, <code>lostOwnership()</code> may be invoked later on
        /// a different thread. The same applies to <code>FlavorListener</code>s
        /// registered on this clipboard.
        /// </para>
        /// <para>
        /// The method throws <code>IllegalStateException</code> if the clipboard
        /// is currently unavailable. For example, on some platforms, the system
        /// clipboard is unavailable while it is accessed by another application.
        ///
        /// </para>
        /// </summary>
        /// <param name="contents"> the transferable object representing the
        ///                 clipboard content </param>
        /// <param name="owner"> the object which owns the clipboard content </param>
        /// <exception cref="IllegalStateException"> if the clipboard is currently unavailable </exception>
        /// <seealso cref= java.awt.Toolkit#getSystemClipboard </seealso>
        public virtual void SetContents(Transferable contents, ClipboardOwner owner)
        {
            lock (this)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final ClipboardOwner oldOwner = this.owner;
                ClipboardOwner oldOwner = this.Owner;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Transferable oldContents = this.contents;
                Transferable oldContents = this.Contents;

                this.Owner    = owner;
                this.Contents = contents;

                if (oldOwner != null && oldOwner != owner)
                {
                    EventQueue.InvokeLater(new RunnableAnonymousInnerClassHelper(this, oldOwner, oldContents));
                }
                FireFlavorsChanged();
            }
        }
예제 #2
0
		/// <summary>
		/// 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.
		/// </summary>
		public void setContents(Transferable @contents, ClipboardOwner @owner)
		{
		}
예제 #3
0
 public void SetContents(StringSelection var1, ClipboardOwner clipboardOwner)
 {
     throw new System.NotImplementedException();
 }
예제 #4
0
 /// <summary>
 /// 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.
 /// </summary>
 public void setContents(Transferable @contents, ClipboardOwner @owner)
 {
 }