+ currentAlignFrame = new AlignFrame(new Alignment(sequences),\r
+ applet,\r
+ file,\r
+ embedded);\r
+\r
+\r
+ initialAlignFrame = currentAlignFrame;\r
+\r
+ currentAlignFrame.statusBar.setText("Successfully loaded file " + file);\r
+\r
+\r
+ String treeFile = applet.getParameter("tree");\r
+ if(treeFile==null)\r
+ applet.getParameter("treeFile");\r
+ if (treeFile != null)\r
+ {\r
+ try\r
+ {\r
+ if(inArchive(treeFile))\r
+ protocol = AppletFormatAdapter.CLASSLOADER;\r
+ else\r
+ {\r
+ protocol = AppletFormatAdapter.URL;\r
+ treeFile = addProtocol(treeFile);\r
+ }\r
+\r
+ jalview.io.NewickFile fin = new jalview.io.NewickFile(treeFile, protocol);\r
+\r
+ fin.parse();\r
+\r
+ if (fin.getTree() != null)\r
+ {\r
+ currentAlignFrame.loadTree(fin, treeFile);\r
+ }\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ ex.printStackTrace();\r
+ }\r
+ }\r
+\r
+ String param = getParameter("features");\r
+ if (param != null)\r
+ {\r
+ if( !inArchive(param) )\r
+ param = addProtocol( param );\r
+\r
+ currentAlignFrame.parseFeaturesFile(param, protocol);\r
+ }\r
+\r
+ param = getParameter("showFeatureSettings");\r
+ if(param !=null && param.equalsIgnoreCase("true"))\r
+ {\r
+ currentAlignFrame.featureSettings_actionPerformed();\r
+ }\r
+\r
+ param = getParameter("annotations");\r
+ if (param != null)\r
+ {\r
+ if( !inArchive(param) )\r
+ param = addProtocol( param );\r
+\r
+ new AnnotationFile().readAnnotationFile(\r
+ currentAlignFrame.viewport.getAlignment(),\r
+ param);\r
+\r
+ currentAlignFrame.alignPanel.fontChanged();\r
+ currentAlignFrame.alignPanel.setScrollValues(0,0);\r
+\r
+ }\r
+\r
+ param = getParameter("jnetfile");\r
+ if (param != null)\r
+ {\r
+ try\r
+ {\r
+ if (inArchive(param))\r
+ protocol = AppletFormatAdapter.CLASSLOADER;\r
+ else\r
+ {\r
+ protocol = AppletFormatAdapter.URL;\r
+ param = addProtocol(param);\r
+ }\r
+\r
+ jalview.io.JPredFile predictions = new jalview.io.JPredFile(\r
+ param, protocol);\r
+ new JnetAnnotationMaker().add_annotation(predictions,\r
+ currentAlignFrame.viewport.getAlignment(),\r
+ 0,false); // do not add sequence profile from concise output\r
+ currentAlignFrame.alignPanel.fontChanged();\r
+ currentAlignFrame.alignPanel.setScrollValues(0, 0);\r
+ } catch (Exception ex) {\r
+ ex.printStackTrace();\r
+ }\r
+ }\r
+\r
+\r
+ String pdbfile = applet.getParameter("PDBFILE");\r
+ if(pdbfile!=null)\r
+ {\r
+ if( inArchive(pdbfile) )\r
+ protocol = AppletFormatAdapter.CLASSLOADER;\r
+ else\r
+ {\r
+ protocol = AppletFormatAdapter.URL;\r
+ pdbfile = addProtocol(pdbfile);\r
+ }\r
+\r
+ String sequence = applet.getParameter("PDBSEQ");\r
+\r
+ if(sequence!=null)\r
+ {\r
+ new MCview.AppletPDBViewer(pdbfile, protocol,\r
+ (Sequence)currentAlignFrame.getAlignViewport().getAlignment().findName(sequence),\r
+ currentAlignFrame.getSeqcanvas());\r
+ }\r
+\r
+ }\r