NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
nwb159 Posted via mailing list.
|
Posted: Tue Jun 12, 2012 1:10 pm Post subject: [platform-dev] Get expanded paths of an Outline |
|
|
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 |
|
 |
|
|
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
|
|