jalview.bin.JalviewLite.addFrame(frame,\r
"Alignment output - " + e.getActionCommand(),\r
600, 500);\r
- cap.setText(FormatAdapter.formatSequences(e.getActionCommand(),\r
+ cap.setText(new FormatAdapter().formatSequences(e.getActionCommand(),\r
viewport.getAlignment().\r
getSequences()));\r
}\r
SequenceI[] sequences = null;\r
\r
String format = IdentifyFile.Identify(text, "Paste");\r
- sequences = FormatAdapter.readFile(text, "Paste", format);\r
+ sequences = new FormatAdapter().readFile(text, "Paste", format);\r
\r
if (sequences != null)\r
{\r
}\r
\r
String format = jalview.io.IdentifyFile.Identify(args[0],"File");\r
- SequenceI[] sequences = FormatAdapter.readFile(args[0], "File", format);\r
+ SequenceI[] sequences = new FormatAdapter().readFile(args[0], "File", format);\r
\r
if ( (sequences != null) && (sequences.length > 0))\r
{\r
public void run()\r
{\r
SequenceI[] sequences = null;\r
- sequences = FormatAdapter.readFile(file, protocol, format);\r
+ sequences = new FormatAdapter().readFile(file, protocol, format);\r
\r
if ((sequences != null) && (sequences.length > 0))\r
{\r
}\r
else\r
{\r
- String output = FormatAdapter.formatSequences(format,\r
+ String output = new FormatAdapter().formatSequences(format,\r
viewport.getAlignment().\r
getSequences());\r
if (output == null)\r
Desktop.addInternalFrame(cap,\r
"Alignment output - " + e.getActionCommand(), 600,\r
500);\r
- cap.setText(FormatAdapter.formatSequences(e.getActionCommand(),\r
+ cap.setText(new FormatAdapter().formatSequences(e.getActionCommand(),\r
viewport.getAlignment().\r
getSequences()));\r
}\r
String str = (String) contents.getTransferData(DataFlavor.stringFlavor);\r
\r
String format = IdentifyFile.Identify(str, "Paste");\r
- SequenceI[] sequences = FormatAdapter.readFile(str, "Paste", format);\r
+ SequenceI[] sequences = new FormatAdapter().readFile(str, "Paste", format);\r
\r
\r
if (newAlignment)\r
\r
if (FormatAdapter.formats.contains(format))\r
{\r
- sequences = FormatAdapter.readFile(getText(), "Paste", format);\r
+ sequences = new FormatAdapter().readFile(getText(), "Paste", format);\r
}\r
\r
if (sequences != null)\r
{\r
if (FormatAdapter.formats.contains(format))\r
{\r
- sequences = FormatAdapter.readFile(file, protocol, format);\r
+ sequences = new FormatAdapter().readFile(file, protocol, format);\r
}\r
\r
if ( (sequences != null) && (sequences.length > 0))\r
formats.addElement("PFAM");\r
}\r
\r
+ AlignFile afile = null;\r
+\r
/**\r
* DOCUMENT ME!\r
*\r
*\r
* @return DOCUMENT ME!\r
*/\r
- public static SequenceI[] readFile(String inFile, String type, String format)\r
+ public SequenceI[] readFile(String inFile, String type, String format)\r
{\r
try\r
{\r
- AlignFile afile = null;\r
-\r
if (format.equals("FASTA"))\r
{\r
afile = new FastaFile(inFile, type);\r
return null;\r
}\r
\r
+\r
/**\r
* DOCUMENT ME!\r
*\r
*\r
* @return DOCUMENT ME!\r
*/\r
- public static String formatSequences(String format, Vector seqs)\r
+ public String formatSequences(String format, Vector seqs)\r
{\r
SequenceI[] s = new SequenceI[seqs.size()];\r
\r
public void run()\r
{\r
String str = textfield.getText();\r
- SequenceI[] sequences = FormatAdapter.readFile(str, "Paste", "FASTA");\r
+ SequenceI[] sequences = new FormatAdapter().readFile(str, "Paste", "FASTA");\r
if(sequences!=null && sequences.length>0)\r
{\r
str = jalview.analysis.AlignSeq.extractGaps(\r