-/*\r
-* Exit the program\r
-*/\r
- public void quit_actionPerformed(ActionEvent e)\r
- {\r
- this.setVisible(false);\r
- System.exit(0);\r
- }\r
-\r
-\r
- protected void colourIndexMenuItem_actionPerformed(ActionEvent e)\r
- {\r
- ColourKey colourKey = new ColourKey(null);\r
- addInternalFrame(colourKey, "Colour scheme key", 400, 320);\r
- }\r
-\r
-\r
- public void aboutMenuItem_actionPerformed(ActionEvent e)\r
- {\r
- JOptionPane.showInternalMessageDialog(desktop,\r
- "JalView 2005"\r
- +"\nAuthors: Michele Clamp, James Cuff, Steve Searle, Andrew Waterhouse and Geoff Barton."\r
- +"\nCurrent development managed by Andrew Waterhouse; Barton Group, University of Dundee."\r
- +"\nIf you use JalView, please cite: \"Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004), The Jalview Java Alignment Editor\"",\r
- "About Jalview",\r
- JOptionPane.INFORMATION_MESSAGE);\r
- }\r
-\r
- public void documentationMenuItem_actionPerformed(ActionEvent e)\r
- {\r
- try{\r
- jalview.util.BrowserLauncher.openURL("http://jalview.org/documentation.html");\r
- }catch(Exception ex){}\r
- }\r
+ if (format.equals("URL NOT FOUND"))\r
+ {\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Couldn't locate " + url,\r
+ "URL not found",\r
+ JOptionPane.WARNING_MESSAGE);\r
+\r
+ return;\r
+ }\r
+\r
+ LoadFile(url, "URL", format);\r
+ }\r
+\r
+ public void inputTextboxMenuItem_actionPerformed(ActionEvent e)\r
+ {\r
+ CutAndPasteTransfer cap = new CutAndPasteTransfer();\r
+ cap.setForInput();\r
+ Desktop.addInternalFrame(cap, "Cut & Paste Alignment File", 600, 500);\r
+ }\r
+\r
+ /*\r
+ * Exit the program\r
+ */\r
+ public void quit_actionPerformed(ActionEvent e)\r
+ {\r
+ if (jalview.bin.Jalview.applet != null)\r
+ {\r
+ jalview.bin.Jalview.applet.destroy();\r
+ }\r
+ else\r
+ {\r
+ System.exit(0);\r
+ }\r
+ }\r
+\r
+ public void aboutMenuItem_actionPerformed(ActionEvent e)\r
+ {\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "JalView 2005 version " +\r
+ jalview.bin.Cache.VERSION +\r
+ "; last updated: " +\r
+ jalview.bin.Cache.BUILD_DATE +\r
+ "\nAuthors: Michele Clamp, James Cuff, Steve Searle, Andrew Waterhouse, Jim Procter & Geoff Barton." +\r
+ "\nCurrent development managed by Andrew Waterhouse; Barton Group, University of Dundee." +\r
+ "\nFor all issues relating to Jalview, email help@jalview.org" +\r
+ "\n\nIf you use JalView, please cite:" +\r
+ "\n\"Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004), The Jalview Java Alignment Editor\"" +\r
+ "\nBioinformatics, 2004 12;426-7.",\r
+ "About Jalview",\r
+ JOptionPane.INFORMATION_MESSAGE);\r
+ }\r
+\r
+ public void documentationMenuItem_actionPerformed(ActionEvent e)\r
+ {\r
+ try\r
+ {\r
+ ClassLoader cl = jalview.gui.Desktop.class.getClassLoader();\r
+ java.net.URL url = javax.help.HelpSet.findHelpSet(cl, "help/help");\r
+ javax.help.HelpSet hs = new javax.help.HelpSet(cl, url);\r
+\r
+ javax.help.HelpBroker hb = hs.createHelpBroker();\r
+ hb.setLocation(new Point(200, 50));\r
+ hb.setSize(new Dimension(800, 700));\r
+ hb.setCurrentID("home");\r
+ hb.setDisplayed(true);\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ ex.printStackTrace();\r
+ }\r
+ }\r
+\r
+ protected void preferences_actionPerformed(ActionEvent e)\r
+ {\r
+ Preferences pref = new Preferences();\r
+ }\r
+\r
+ public void saveState_actionPerformed(ActionEvent e)\r
+ {\r
+ JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache.\r
+ getProperty(\r
+ "LAST_DIRECTORY"), new String[]\r
+ {"jar"},\r
+ new String[]\r
+ {"Jalview Project"}, "Jalview Project");\r
+\r
+ chooser.setFileView(new JalviewFileView());\r
+ chooser.setDialogTitle("Save State");\r