Bug 28225

Summary: Remove useless expand handles when no children
Product: contrib Reporter: _ hkrug <hkrug>
Component: LooksAssignee: Petr Hrebejk <phrebejk>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P1 CC: jglick
Version: 3.x   
Target Milestone: 3.x   
Hardware: PC   
OS: Linux   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:
Bug Depends on: 23720    
Bug Blocks:    

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
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