Hi,

I have been working on this task during this week. The task was to just to display the important nodes of the sbml document tree. Previously, when an sbml document is imported, all the nodes like list of compartments, XML tokens, annotations,list of parameters,list of species and list of reactions are shown. Refer: previous post

The important nodes to be shown in the side pane are the Model Name, Reactions, Compartments and Species. I thought it was a piece of cake but it was not. Because, earlier I simply passed the imported document to a JTree and  added a JScrollpane which made the entire nodes to appear without any customization.Refer: earlier commit

Now to accomplish the task, I tried many workarounds on the JTree but was unsuccessful. Then I wrote a separate java file called NavigationTree.java in which I used DefaultTreeModel and the DefaultMutableTreeNode to retrieve the list of contents[compartments, reactions and species] of the imported document and  added them to the TreeModel. Refer: NavigationTree.java and DocumentPanel.java

Now when an sbml model is imported the elements in the side panel look like the following:

customizedelementstree

Note: The sbml file is taken from http://www.ebi.ac.uk/biomodels-main/BIOMD0000000005

Cheers,

Sri Harsha.P

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required