Button launcher = new Button("Start Jalview");\r
public static boolean AWT1 = false;\r
\r
+ AlignFrame currentAlignFrame;\r
+\r
\r
/**\r
* init method for Jalview Applet\r
frame.setVisible(true);\r
}\r
\r
+ public String getAlignment(String format)\r
+ {\r
+ return getAlignment(format, "true");\r
+ }\r
+\r
+ public String getAlignment(String format, String suffix)\r
+ {\r
+ try\r
+ {\r
+ boolean seqlimits = suffix.equalsIgnoreCase("true");\r
+\r
+ String reply = new AppletFormatAdapter().formatSequences(format,\r
+ currentAlignFrame.viewport.getAlignment().getSequences(),\r
+ true, seqlimits);\r
+ return reply;\r
+ }\r
+ catch (Exception ex)\r
+ {ex.printStackTrace();\r
+ return "Error retrieving alignment in " + format + " format. ";\r
+\r
+ }\r
+ }\r
+\r
/**\r
* This paints the background surrounding the "Launch Jalview button"\r
* <br>\r
\r
if ((sequences != null) && (sequences.length > 0))\r
{\r
- AlignFrame af = new AlignFrame(new Alignment(sequences),\r
+ currentAlignFrame = new AlignFrame(new Alignment(sequences),\r
applet, file);\r
- af.statusBar.setText("Successfully loaded file " + file);\r
+ currentAlignFrame.statusBar.setText("Successfully loaded file " + file);\r
\r
if(featuresFile!=null)\r
- af.parseFeaturesFile(featuresFile);\r
+ currentAlignFrame.parseFeaturesFile(featuresFile);\r
}\r
else\r
{\r