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 24067 - Looks API doesn't support writing looks for containers
Summary: Looks API doesn't support writing looks for containers
Status: VERIFIED WONTFIX
Alias: None
Product: contrib
Classification: Unclassified
Component: Looks (show other bugs)
Version: 3.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords:
Depends on:
Blocks: 23270
  Show dependency tree
 
Reported: 2002-05-27 12:36 UTC by Vitezslav Stejskal
Modified: 2008-11-18 11:33 UTC (History)
2 users (show)

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 2002-05-27 12:36:34 UTC
Container like Group of DataObjects usually needs to customize look of its children, e.g. it 
needs to add Remove action to context menu of each child. This can't be done by customizing 
look registered for the child's class, because that would add Remove action to all instances and 
not to only those which are childs of the Group.

There is no way how to write looks for such container using current Looks API.
Comment 1 Vitezslav Stejskal 2002-05-27 13:10:55 UTC
See also requirement A3 in http://projects.netbeans.org/proposals/looks/index.html
Comment 2 Vitezslav Stejskal 2002-06-06 14:14:21 UTC
The supported way is to create wrappers for all child object of the container, return those wrappers as 
children of container, register Look for the wrapper's class and within this Look to delegate to the Look 
of wrapped object (and to add Remove action or do whatever is needed). This seems to be sufficient for 
projects, so marking as FIXED.
Comment 3 Vitezslav Stejskal 2002-06-11 11:16:54 UTC
Reopening, the way described in my last comment doesn't work in general, because the wrapper's 
Look needs to get availableLooks for original represented object (in order to wrap all Looks 
registered for this represented object). So, the wrapper's Look needs to know the baseLook in 
order to ask it for availableLooks.
Comment 4 Petr Hrebejk 2002-06-24 11:12:12 UTC
Moving Looks issues to dev 4.0
Comment 5 Marian Mirilovic 2003-01-29 12:54:43 UTC
added keyword PROJECTS, because we need to distinguish 
issues against NB4.0 and S1Sx.y
Comment 6 Petr Hrebejk 2003-05-19 12:49:40 UTC
Should be done by creating own LookSelector. I.e. the selector will
return decorated looks for object with given property set and 
undecorated for those where the property is not set.
Comment 7 Marian Mirilovic 2003-07-25 18:40:48 UTC
verifying.