String file = "No file";\r
Button launcher = new Button("Start Jalview");\r
\r
- AlignFrame currentAlignFrame;\r
+ static AlignFrame currentAlignFrame;\r
\r
\r
/**\r
{\r
public void windowClosing(WindowEvent e)\r
{\r
+ if(currentAlignFrame == frame)\r
+ {\r
+ currentAlignFrame = null;\r
+ }\r
lastFrameX -=40;\r
lastFrameY-=40;\r
frame.dispose();\r
}\r
+ public void windowActivated(WindowEvent e)\r
+ {\r
+ if(frame instanceof AlignFrame)\r
+ currentAlignFrame = (AlignFrame)frame;\r
+ }\r
+\r
});\r
frame.setVisible(true);\r
}\r
return reply;\r
}\r
catch (Exception ex)\r
- {ex.printStackTrace();\r
+ {\r
+ ex.printStackTrace();\r
return "Error retrieving alignment in " + format + " format. ";\r
-\r
}\r
}\r
\r
tp = new TreePanel(currentAlignFrame.viewport,\r
currentAlignFrame.viewport.getAlignment().getSequences(),\r
fin, "FromFile", applet.getCodeBase() + treeFile);\r
- jalview.bin.JalviewLite.addFrame(tp, treeFile, 600, 500);\r
+ addFrame(tp, treeFile, 600, 500);\r
currentAlignFrame.addTreeMenuItem(tp, treeFile);\r
}\r
}\r