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 36293 - Look.isLeaf() should default to true, not false
Summary: Look.isLeaf() should default to true, not false
Status: RESOLVED WONTFIX
Alias: None
Product: contrib
Classification: Unclassified
Component: Looks (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2003-09-26 00:18 UTC by Jesse Glick
Modified: 2008-12-22 13:53 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 Jesse Glick 2003-09-26 00:18:46 UTC
...since Look.getChildObjects() defaults to null.
If you override neither, you should get a
consistent Look - currently you get a bogus expand
handle.

As I think mentioned before, "isLeaf" is actually
a negative name, which contributes to the
confusion surrounding it. "hasChildren" would have
been a better name since it is positive (and the
default for that name should of course be false).
Comment 1 Petr Hrebejk 2003-09-26 11:25:39 UTC
Agree. But hasChildren is a little bit confusing too. In fact it should
be something like canHaveChildren(). But it does not sound that good.
Any other oprions?
Comment 2 Jesse Glick 2003-09-26 17:17:46 UTC
"permitsChildren"? I don't know.
Comment 3 Petr Hrebejk 2003-09-29 09:52:54 UTC
OK permitsChildren sounds reasonable good. I'll definitely change the 
default beahviour and I'll ask some more people to get their opinion
on whether it is better to have the less confusing permitsChildren or the 
negative isLeaf which is more consistent with DefaultTree model.
Comment 4 Petr Hrebejk 2004-07-20 14:58:37 UTC
Changing target milestone on all Looks issues to future
Comment 5 Petr Hrebejk 2007-01-09 14:54:46 UTC
x