Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Persistent Expanded Tree
Persistent Expanded Tree [message #463203] Sun, 30 October 2005 13:26 Go to next message
Ken Ryall is currently offline Ken Ryall
Messages: 5
Registered: July 2009
Junior Member
Hi,

I'd like to be able to persist the expanded state of a Tree. This is so when
you expand portions of it to see the parts you are interested in you don't
have to do it all over again the next time. Of course if the data
represented by the tree changes a lot this won't work, but when it is fairly
static this would be very useful.

Before I start writing code to do this I'm wondering if there is already a
built-in way to persist the expanded state of a Tree.

Thanks - Ken
Re: Persistent Expanded Tree [message #463204 is a reply to message #463203] Sun, 30 October 2005 18:43 Go to previous message
Sebastian Machhausen is currently offline Sebastian Machhausen
Messages: 6
Registered: July 2009
Junior Member
Hi Ken,

taking a deep look at the jface api docs tells me that there's no built-in way to achieve this task. You could solve this by mapping the tree structure to xml and vice versa. The <i> org.eclipse.jface.viewers.AbstractTreeViewer.getExpandedStat e(Object element)</i> method should be consulted here. I also plan to address this feature in my newsfeed reader application by using an extended opml structure. Shouldn't be that hard anyway.

Greetings
Sebastian
Previous Topic:Disposal of used (Tree-)Editor edit-controls
Next Topic:SWT Table
Goto Forum:
  


Current Time: Thu Oct 23 09:37:41 GMT 2014

Powered by FUDForum. Page generated in 0.09679 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software