use of cbit.vcell.xml.gui.MiriamTreeModel.LinkNode in project vcell by virtualcell.
the class BioModelTreePanel method getJTree2.
/**
* Return the JTree2 property value.
* @return cbit.gui.JTreeFancy
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private JTree getJTree2() {
if (ivjJTree2 == null) {
try {
javax.swing.tree.DefaultTreeSelectionModel ivjLocalSelectionModel;
ivjLocalSelectionModel = new javax.swing.tree.DefaultTreeSelectionModel();
ivjLocalSelectionModel.setRowMapper(getLocalSelectionModelVariableHeightLayoutCache());
ivjJTree2 = new JTree();
ivjJTree2.setName("JTree2");
ivjJTree2.setModel(new DefaultTreeModel(new DefaultMutableTreeNode("loading", false)));
ivjJTree2.setBounds(0, 0, 78, 72);
ivjJTree2.setRootVisible(true);
ivjJTree2.setSelectionModel(ivjLocalSelectionModel);
MouseListener mouseListener = new MouseAdapter() {
public void mousePressed(MouseEvent e) {
if (e.getClickCount() == 2) {
Object node = ivjJTree2.getLastSelectedPathComponent();
if (node instanceof LinkNode) {
String link = ((LinkNode) node).getLink();
if (link != null) {
DialogUtils.browserLauncher(ivjJTree2, link, "failed to launch");
}
}
}
}
};
ivjJTree2.addMouseListener(mouseListener);
// user code begin {1}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {2}
// user code end
handleException(ivjExc);
}
}
return ivjJTree2;
}
Aggregations