Re: FilterNode.Children no expansion icon on leaf nodes
Eirik Bakke <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <D375FD1D.572CC%[email protected]> |
You can call setChildren(Children.LEAF) in the Node implementation in the case where there are no children, and then set it back to a regular Children object whenever the expansion handle should appear again. -- Eirik On 6/1/16, 3:13 PM, "XavierM" <[email protected]> wrote: >Hello, > >I'm creating a logical view for a projet and filtering files in some >directories. Following this tutorial it is quite easy to do so: >http://wiki.netbeans.org/DevFaqNodesDecorating > >But then all files have the expansion handle ("+") in the tree. It's only >when you click on it that it disappears. > >Is there a way to force it to LEAF or otherwise to have an eager >evaluation of the children? > >In the tutorial above, this problem is also present but the link to the >solution is broken: >"Note that if you're showing the filtered nodes in a tree view according >to the code above, you might find expansion handles on leaf nodes. This >thread from the dev@openide list discusses some solutions to this >problem." >=> http://openide.netbeans.org/servlets/ReadMsg?listName=dev&msgNo=11595 > >Thanks > > > > >Attachments: >http://forums.netbeans.org//files/netbeans_filternode_110.png >