e.printStackTrace();\r
}\r
\r
- for (int i = 0; i < jalview.io.AppletFormatAdapter.formats.size()-1; i++)\r
+ for (int i = 0; i < jalview.io.AppletFormatAdapter.formats.size()-2; i++)\r
{\r
MenuItem item = new MenuItem( (String) jalview.io.AppletFormatAdapter.formats.\r
elementAt(\r
MenuItem item;\r
\r
// dynamically fill save as menu with available formats\r
- for (int i = 0; i < jalview.io.AppletFormatAdapter.formats.size(); i++)\r
+ for (int i = 0; i < jalview.io.AppletFormatAdapter.formats.size()-2; i++)\r
{\r
\r
item = new MenuItem( (String) jalview.io.AppletFormatAdapter.formats.\r
colours.add(PIDColour);\r
colours.add(BLOSUM62Colour);\r
\r
- for (int i = 0; i < jalview.io.FormatAdapter.formats.size()-1; i++)\r
+ for (int i = 0; i < jalview.io.FormatAdapter.formats.size()-2; i++)\r
{\r
JMenuItem item = new JMenuItem( (String) jalview.io.FormatAdapter.formats.\r
elementAt(\r
formats.addElement("PileUp");\r
formats.addElement("PIR");\r
formats.addElement("PFAM");\r
+ formats.addElement("STH");\r
formats.addElement("PDB");\r
}\r
\r
public static String PASTE = "Paste";\r
public static String CLASSLOADER = "ClassLoader";\r
\r
+\r
AlignFile afile = null;\r
String inFile;\r
\r
{\r
afile = new MCview.PDBfile(inFile, type);\r
}\r
+ else if (format.equals("STH"))\r
+ {\r
+ afile = new StockholmFile(inFile, type);\r
+ }\r
+\r
\r
return afile.getSeqsAsArray();\r
}\r
{\r
afile = new PfamFile();\r
}\r
+ else if (format.equalsIgnoreCase("STH"))\r
+ {\r
+ afile = new StockholmFile();\r
+ }\r
+\r
\r
afile.addJVSuffix(jvsuffix);\r
\r
{\r
data = data.toUpperCase();\r
\r
+ if ( (data.indexOf("# STOCKHOLM") > -1))\r
+ {\r
+ reply = "STH";\r
+\r
+ break;\r
+ }\r
+\r
if ((data.indexOf("#") == 0) || (data.length() < 1))\r
{\r
continue;\r
setJMenuBar(alignFrameMenuBar);\r
\r
// dynamically fill save as menu with available formats\r
- for (int i = 0; i < jalview.io.FormatAdapter.formats.size()-1; i++)\r
+ for (int i = 0; i < jalview.io.FormatAdapter.formats.size()-2; i++)\r
{\r
JMenuItem item = new JMenuItem( (String) jalview.io.FormatAdapter.formats.\r
elementAt(\r