NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

[platform-dev] Get expanded paths of an Outline

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
nwb159
Posted via mailing list.





PostPosted: Tue Jun 12, 2012 1:10 pm    Post subject: [platform-dev] Get expanded paths of an Outline Reply with quote

Hello,

I am using the Netbeans platform Outline class. I just so happens that I
am using it without the OutlineView component. However, I don't believe
that it should make any difference for the purposes of this discussion.

I am trying to rebuild the tree model of the outline and preserve the
opened paths. Now, for better or worse, I am completely reconstructing
the tree, even for nodes which will appear in the new tree. To this end,
I need to manually find the expanded paths and translate those into
paths in the new tree. I have tried calling
OutlineModel.getTreePathSupport().getExpandedPaths(new
TreePath(rootNode)) however this appears to always be returning null...
a glance at the documentation suggests that the getTreePathSupport may
be made private in future. I believe this may be because it is not
actually providing the paths which are expanded in the tree, just those
for which it has cached the node information, and for managing the
TreeExpandListeners as mentioned in the documentation.

My question is therefore, is there an API method to return me the tree
paths that I want? Will I have to use Outline.isExpanded(TreePath) to
manually construct these paths?

Thanks for any help,

Nick
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo