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 28225 - Remove useless expand handles when no children
Summary: Remove useless expand handles when no children
Status: RESOLVED FIXED
Alias: None
Product: contrib
Classification: Unclassified
Component: Looks (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords:
Depends on: 23720
Blocks:
  Show dependency tree
 
Reported: 2002-10-23 16:17 UTC by _ hkrug
Modified: 2008-11-18 11:36 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ hkrug 2002-10-23 16:17:24 UTC
The Node API now allows a node not to be displayed
without expand handles, if it currently has no
children (see #23720). This enhancement is not yet
used in the Looks API (org.netbeans.api.looks),
but IMHO it should.

I've set the priority to P1 because it seems that
this enhancement is necessary for production use
of the Looks API. The handles are too bewildering
for users.
Comment 1 _ hkrug 2002-10-23 17:27:31 UTC
My proposal is:

Add a method "boolean Look.knownToHaveNoChilds(Look.NodeSubstitute)"
(returns "false" in DefaultLook).

The look node calls this method. Whenever the method returns "true",
the handle is not drawn.
Comment 2 Jesse Glick 2003-03-18 15:55:08 UTC
There is already isLeaf(Look.NodeSubstitute); it works fine for most
cases. The only case where you need a special API is when it can be
quickly determined that a parent currently has no children, yet it is
possible that it may later get children.

This is true e.g. of displayed XML files: if you have a DOM tree
already and are showing a node for some element with no content, you
want to suppress the expand handle, yet permit it to be added later if
a subelement is added.
Comment 3 _ hkrug 2003-03-18 16:06:08 UTC
Whay applies to XML applies even more to the MDR explorer and similar
apps. Here the handles on empty nodes are *very* announing !
Comment 4 Petr Hrebejk 2003-05-06 15:02:39 UTC
Implemented in current looks version - openide/looks