This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 34773 - Inverse function of ProxyLook.delegateObject needed
Summary: Inverse function of ProxyLook.delegateObject needed
Status: CLOSED FIXED
Alias: None
Product: contrib
Classification: Unclassified
Component: Looks (show other bugs)
Version: 3.x
Hardware: PC All
: P1 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: API
Depends on:
Blocks: 34916
  Show dependency tree
 
Reported: 2003-07-07 13:52 UTC by Vitezslav Stejskal
Modified: 2008-11-18 11:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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