\r
Stack historyList = new Stack();\r
Stack redoList = new Stack();\r
+ JMenuBar jMenuBar1 = new JMenuBar();\r
\r
void updateEditMenuBar()\r
{\r
g.drawString("Clustal Alignment Web Service running", 30,30);\r
}\r
}\r
+ public void jpredMenuItem_actionPerformed(ActionEvent e)\r
+ {\r
+ JInternalFrame frame = new JInternalFrame();\r
+ JPredClient ct = new JPredClient((SequenceI)\r
+ viewport.getAlignment().getSequences().elementAt(0));\r
+ }\r
+\r
+\r
+ protected void LoadtreeMenuItem_actionPerformed(ActionEvent e) {\r
+ // Pick the tree file\r
+ JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache.\r
+ getProperty("LAST_DIRECTORY"));\r
+ chooser.setFileView(new JalviewFileView());\r
+ chooser.setDialogTitle("Select a newick-like tree file");\r
+ chooser.setToolTipText("Load a tree file");\r
+ int value = chooser.showOpenDialog(null);\r
+ if (value == JalviewFileChooser.APPROVE_OPTION)\r
+ {\r
+ String choice = chooser.getSelectedFile().getPath();\r
+ jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice);\r
+ TreePanel treepanel = null;\r
+ try\r
+ {\r
+ jalview.io.NewickFile fin = new jalview.io.NewickFile(choice, "File");\r
+ fin.parse();\r
+\r
+ if (fin.getTree() != null)\r
+ {\r
+ TreePanel tp = null;\r
+ tp = new TreePanel(viewport, viewport.getAlignment().getSequences(),\r
+ fin, "FromFile", choice);\r
+ Desktop.addInternalFrame(tp, title, 600, 500);\r
+ }\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ JOptionPane.showMessageDialog(Desktop.desktop,\r
+ "Problem reading tree file",\r
+ ex.getMessage(),\r
+ JOptionPane.WARNING_MESSAGE);\r
+ ex.printStackTrace();\r
+ }\r
+ }\r
+ }\r
+\r
}\r
else\r
JOptionPane.showInternalMessageDialog(Desktop.desktop, "Couldn't open file.\n"\r
+ "Formats currently supported are\n"\r
- + "Fasta, MSF, Clustal, BLC, PIR, MSP or PFAM"\r
+ + "Fasta, MSF, Clustal, BLC, PIR, MSP or PFAM" // JBPNote - message should be generated through FormatAdapter!\r
,"Error loading file",\r
JOptionPane.WARNING_MESSAGE);\r
\r