ryanqq / macwidgets

Automatically exported from code.google.com/p/macwidgets
0 stars 0 forks source link

SourceList should not auto-expand all nodes #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The SourceList component automatically expands all nodes (categories and items) 
the moment 
they get added. This means that the source list shows a fully expanded tree 
structure when the 
list becomes visible for the first time. I believe that this behaviour should 
be changed so that 
only the category nodes are expanded and the item nodes are all closed. I 
believe this is also the 
standard behaviour of other Mac applications. Actually ... most of these 
applications do not have 
a lot of depth in their source list anyway.

What version of the product are you using? On what operating system?

Trunk on Mac

Please provide any additional information below.

Issue was open for discussion in the project's newsgroup for some time.

Original issue reported on code.google.com by dlemmermann@gmail.com on 27 Feb 2009 at 3:56

GoogleCodeExporter commented 9 years ago
I added the following methods:

SourceList.setExpanded(SourceListCategory, boolean)
SourceList.setExpanded(SourceListItem, boolean)

To collapse all categories, for example, do the following:

for (SourceListCategory category : sourceListModel.getCategories()) {
    sourceList.setExpanded(category, false);
}

Original comment by kenneth....@gmail.com on 2 Mar 2009 at 7:50