// update distance/bootstrap visibility at the same time\r
showBootstrap(newtree.HasBootstrap());\r
showDistances(newtree.HasDistances());\r
+ showPlaceholders(true);\r
}\r
}\r
\r
\r
treeCanvas.repaint();\r
\r
+\r
+ fullid.setState(treeCanvas.av.showDBPrefix);\r
+ if(!treeCanvas.av.showDBPrefix)\r
+ {\r
+ fullid_actionPerformed(null);\r
+ }\r
}\r
+\r
}\r
\r
public void showDistances(boolean b)\r
treeCanvas.setMarkPlaceholders(placeholdersMenu.isSelected());\r
}\r
\r
+\r
+ public void fullid_actionPerformed(ActionEvent e)\r
+ {\r
+ tree.findHeight(tree.getTopNode());\r
+\r
+ // Now have to calculate longest name based on the leaves\r
+ Vector leaves = tree.findLeaves(tree.getTopNode(), new Vector());\r
+\r
+ treeCanvas.longestName="";\r
+ for (int i = 0; i < leaves.size(); i++)\r
+ {\r
+ SequenceNode lf = (SequenceNode) leaves.elementAt(i);\r
+ Sequence seq = (Sequence) lf.element();\r
+ lf.setName(seq.getDisplayId(fullid.getState(), false));\r
+ if(lf.getName().length() > treeCanvas.longestName.length())\r
+ treeCanvas.longestName = lf.getName();\r
+ }\r
+\r
+ treeCanvas.repaint();\r
+ }\r
+\r
+\r
/**\r
* DOCUMENT ME!\r
*\r
JMenuItem epsTree = new JMenuItem();\r
JMenu saveAsMenu = new JMenu();\r
JMenuItem textbox = new JMenuItem();\r
+ protected JCheckBoxMenuItem fullid = new JCheckBoxMenuItem();\r
\r
public GTreePanel()\r
{\r
textbox_actionPerformed(e);\r
}\r
});\r
+ fullid.setText("Show Full Sequence Id");\r
+ fullid.addActionListener(new ActionListener()\r
+ {\r
+ public void actionPerformed(ActionEvent e)\r
+ {\r
+ fullid_actionPerformed(e);\r
+ }\r
+ });\r
this.getContentPane().add(scrollPane, BorderLayout.CENTER);\r
jMenuBar1.add(jMenu1);\r
jMenuBar1.add(jMenu2);\r
jMenu2.add(distanceMenu);\r
jMenu2.add(bootstrapMenu);\r
jMenu2.add(placeholdersMenu);\r
+ jMenu2.add(fullid);\r
saveAsMenu.add(saveAsNewick);\r
saveAsMenu.add(epsTree);\r
saveAsMenu.add(pngTree);\r
public void textbox_actionPerformed(ActionEvent e)\r
{\r
}\r
+\r
+ public void fullid_actionPerformed(ActionEvent e)\r
+ {\r
+\r
+ }\r
}\r