import jalview.datamodel.*;\r
import jalview.analysis.*;\r
import jalview.io.*;\r
+import jalview.ws.*;\r
import MCview.*;\r
import java.awt.*;\r
import java.awt.event.*;\r
import javax.swing.*;\r
import javax.swing.event.*;\r
import java.util.*;\r
+import jalview.datamodel.SequenceI;\r
\r
public class AlignFrame extends GAlignFrame\r
{\r
}\r
\r
\r
- public void clustalColour_actionPerformed(ActionEvent e)\r
+ public void Colour_actionPerformed(ActionEvent e)\r
{\r
viewport.setGlobalColourScheme(new ClustalxColourScheme( ));\r
conservationMenuItem.setSelected(false);\r
\r
public void clustalAlignMenuItem_actionPerformed(ActionEvent e)\r
{\r
- JOptionPane.showInternalMessageDialog(this, "Jalview is currently being reengineered"\r
- +"\nwithin the Barton Group, Dundee University."\r
- +"\nThis will be available as a web service 2005",\r
- "Web service", JOptionPane.INFORMATION_MESSAGE);\r
+ // JBPNote\r
+ // Should check to see if the server settings are valid\r
+ // Need visual-delay indication here.\r
+ Jemboss jemboss = new Jemboss();\r
+\r
+ Vector sv = viewport.getAlignment().getSequences();\r
+ SequenceI[] seqs = new SequenceI[sv.size()];\r
+\r
+ int i=0;\r
+ do\r
+ {\r
+ seqs[i] = (SequenceI) sv.elementAt(i);\r
+ } while (++i<sv.size());\r
+\r
+ SequenceI[] alignment = jemboss.clustalW(seqs); // gaps removed within method\r
+\r
+ if (alignment != null)\r
+ {\r
+ AlignFrame af = new AlignFrame(new Alignment(alignment));\r
+ Desktop.addInternalFrame(af, getTitle().concat(" - ClustalW Alignment"), \r
+ 700, 500); // JBPNote - is there a new window geom. property ?\r
+ }\r
}\r
\r
public void pdbTest_actionPerformed(ActionEvent e)\r
{\r
- String reply = JOptionPane.showInternalInputDialog(this, "Enter pdb code", "PDB test viewer", JOptionPane.QUESTION_MESSAGE);\r
+ String reply = \r
+ JOptionPane.showInternalInputDialog(this, "Enter pdb code", \r
+ "PDB test viewer", JOptionPane.QUESTION_MESSAGE);\r
\r
String url = "http://www.ebi.ac.uk/cgi-bin/pdbfetch?id=1a4u";\r
if (reply.length()>1)\r