ryanqq / macwidgets

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

Add a "categoryItemIsExpanded" #121

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Is it possible to add a way to know if a SourceListCategory is expanded?

SourceList has the method "setExpanded(SourceListCategory, boolean)" but 
there's not a method 
"isExpanded(SourceListCategory)" or similar. I think it would be useful. Thanks!

Original issue reported on code.google.com by alex.co...@gmail.com on 16 Aug 2009 at 12:06

GoogleCodeExporter commented 9 years ago
Hi Alex,

What would you do in response to that notification?

-Ken

Original comment by kenneth....@gmail.com on 16 Aug 2009 at 7:25

GoogleCodeExporter commented 9 years ago
Hi! I try to explain.

When the user closes my application (jCodeCollector, http://tinyurl.com/lmtz72 
) I'd want to save the "expanded 
state" of all SourceListCategories. In this way when he'll relaunch the 
application, the "expanded state" of all 
categories will be restored.

Original comment by alex.co...@gmail.com on 16 Aug 2009 at 8:23

GoogleCodeExporter commented 9 years ago
So you don't need to really track it, you just need to be able to get the 
expanded state of everything at once?

Original comment by kenneth....@gmail.com on 17 Aug 2009 at 12:31

GoogleCodeExporter commented 9 years ago
Exactly!

Original comment by alex.co...@gmail.com on 17 Aug 2009 at 7:33

GoogleCodeExporter commented 9 years ago
I plan to add a method called getExpandedState, which will return a list of 
expanded states in a depth first 
traversal of the nodes. I'll also add a method that lets you supply this list 
of expanded states in order to install 
them on startup.

Does this sound reasonable?

Original comment by kenneth....@gmail.com on 19 Aug 2009 at 11:17

GoogleCodeExporter commented 9 years ago
Yes, it does!
Thank you so much :)

Original comment by alex.co...@gmail.com on 19 Aug 2009 at 1:27