Open GoogleCodeExporter opened 9 years ago
This could be achieved by a combination of things:
1) add a property boolean isAlwaysExpanded to SourceListCategory (and perhaps
add an interface
ExpansionControlProvider for the DefaultMutableTreeNode use case)
2) overwrite boolean shouldPaintExpandControl in SourceListTreeUI, so that it
somehow checks for isAlwaysExpanded in potential nodes
3) make sure that the always expanded nodes are always expanded - maybe when
you add them to the model
4) prevent the clickable space where the ExpandControl would be from firing an
expansion/contraction event.
this can be done by adding a TreeWillExpandListener to the JTree, that throws
an ExpandVetoException, if the
clicked on node corresponds to a SourceListCategory with isAlwaysExpanded ==
true
What's not solved in this approach, is that the always expanded categories are
indented by the amount of
space the little triangle would have taken up (and they shouldn't be).
Original comment by hendrik....@gmail.com
on 7 Apr 2010 at 3:52
Original issue reported on code.google.com by
hendrik....@gmail.com
on 7 Apr 2010 at 11:09Attachments: