JDK-4473507 : Clipboard.getContents should return exact same Transferable for ClipboardOwner
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2001-06-22
  • Updated: 2003-07-29
  • Resolved: 2003-07-29
Related Reports
Duplicate :  
Description
Currently only the person that supplied data to the clipboard gets notified when a new owner becomes active. It would be nice if there was a way for more than one person, especially some one other than the supplier, to listen for changes in status of the owner. It is also rather unsettling that the ClipboardOwner is passed a different Transferable than it supplied.

Comments
EVALUATION Clipboard notification is already covered under BugID 4259272. However, I am going to keep this bug open because it also suggests an interesting revision to Clipboard.getContents(Object). It seems reasonable to me that if the current ClipboardOwner calls getContents and passes a reference to itself that we return the exact same Transferable passed in setContents. david.mendenhall@east 2001-06-22 Name: agR10216 Date: 07/16/2003 The submitter of this bug is satisfied with the functionality provided by the implementation of the RFE 4259272 (Support Notifications of Clipboard Contents Changes). So I'm going to close this RFE as a duplicate of 4259272. >> ... >> You submitted the rfe with the following description: >> >> "Currently only the person that supplied data to the clipboard >> gets notified when a new owner becomes active. It would be nice >> if there was a way for more than one person, especially some one >> other than the supplier, to listen for changes in status of the >> owner. It is also rather unsettling that the ClipboardOwner is >> passed a different Transferable than it supplied." >> >> The evaluation says: >> "Clipboard notification is already covered under BugID 4259272. >> However, I am going to keep this bug open because it also >> suggests an interesting revision to >> Clipboard.getContents(Object). It seems reasonable to me that if >> the current ClipboardOwner calls getContents and passes a >> reference to itself that we return the exact same Transferable >> passed in setContents." >> >> Since the rfe 4259272 (Support Notifications of Clipboard >> Contents Changes) added the possibility of notifications on >> changes of DataFlavors available on the clipboard, it doesn't >> resolve the first issue: notifiactions about changes of owners. >> >> But could you please give me some vital examples of how to use >> notifiactions about changes of owners? >> >> The same question about the second issue: supplying >> ClipboardOwner.lostOwnership(Clipboard clipboard, Transferable >> contents) with the same contents as it was set in >> Clipboard.setContents(Transferable contents, ClipboardOwner >> owner) with that owner. > It's been a while, but I believe 4259272 will address the first part > of what I wanted. I just needed a way to be able to determine when the > flavors changed, so that I could update menu items and other widgets > that dependanded upon what was on the clipboard. For the second issue > rather than tracking if I was the clipboard owner I was going to test > the Transferable, but as I get back another Transferable I can't do > this and resorted to tracking it with a separate boolean. This isn't a > big issue and I wouldn't worry about it. ###@###.### 2003-07-16 ======================================================================
16-07-2003