Bug 34773

Summary: Inverse function of ProxyLook.delegateObject needed
Product: contrib Reporter: Vitezslav Stejskal <vstejskal>
Component: LooksAssignee: Petr Hrebejk <phrebejk>
Status: CLOSED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P1 Keywords: API
Version: 3.x   
Target Milestone: 3.x   
Hardware: PC   
OS: All   
Whiteboard: projects
Issue Type: DEFECT Exception Report:
Bug Depends on:    
Bug Blocks: 34916    

Description Vitezslav Stejskal 2003-07-07 13:52:48 UTC
The ProxyLook allows subclasses to change the
represented object for Looks it is delegating to,
however, it doesn't allow to provide inverse
conversion for represented object carried by
events fired from those delegates.

Shortly, the events fired from ProxyLook don't
work when the subclass translates represented object.

The off-line discussion with Hrebejk showed that
there are basicaly two situation: (1) the subclass
can easily do the inverse translation, because the
translated represented object keeps the reference
to the original represeneted object and (2) the #1
doesn't hold and subclass has to keep the map of
translated and original represented objects.

Tha API should be extended to support for both
these situations and encourage people to provide
inverse translation implementation whenever possible.
Comment 1 Petr Hrebejk 2003-07-09 17:00:30 UTC
Added failing test. ProxyLookEventsWithDelegateObjectTest
Comment 2 Petr Hrebejk 2003-07-30 17:08:04 UTC
undelegateObject method added into the ProxyLook.
The method has to be implemented correctly. There is no fallback for 
an insufficient data model where there is no way back from delegate
to original object yet. This might be implemented later when really
necessary but I don't want to motivate people not to override the
method,
Comment 3 Marian Mirilovic 2004-02-24 16:13:09 UTC
closed
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo