-/*\r
- * Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
- *\r
- * This program is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU General Public License\r
- * as published by the Free Software Foundation; either version 2\r
- * of the License, or (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\r
- */\r
-package jalview.jbgui;\r
-\r
-import java.awt.*;\r
-import java.awt.event.*;\r
-import javax.swing.*;\r
-\r
-/**\r
- * DOCUMENT ME!\r
- *\r
- * @author $author$\r
- * @version $Revision$\r
- */\r
-public class GDesktop\r
- extends JFrame\r
-{\r
- protected static JMenu windowMenu = new JMenu();\r
- JMenuBar desktopMenubar = new JMenuBar();\r
- JMenu FileMenu = new JMenu();\r
- JMenu HelpMenu = new JMenu();\r
- protected JMenu VamsasMenu = new JMenu();\r
- JMenuItem inputLocalFileMenuItem = new JMenuItem();\r
- JMenuItem inputURLMenuItem = new JMenuItem();\r
- JMenuItem inputTextboxMenuItem = new JMenuItem();\r
- JMenuItem quit = new JMenuItem();\r
- JMenuItem aboutMenuItem = new JMenuItem();\r
- JMenuItem documentationMenuItem = new JMenuItem();\r
- FlowLayout flowLayout1 = new FlowLayout();\r
- JMenu toolsMenu = new JMenu();\r
- JMenuItem preferences = new JMenuItem();\r
- JMenuItem saveState = new JMenuItem();\r
- JMenuItem loadState = new JMenuItem();\r
- JMenu inputMenu = new JMenu();\r
- protected JMenuItem vamsasLoad = new JMenuItem();\r
- JMenuItem inputSequence = new JMenuItem();\r
- protected JMenuItem vamsasStop = new JMenuItem();\r
- JMenuItem closeAll = new JMenuItem();\r
- JMenuItem raiseRelated = new JMenuItem();\r
- JMenuItem minimizeAssociated = new JMenuItem();\r
-\r
- /**\r
- * Creates a new GDesktop object.\r
- */\r
- public GDesktop()\r
- {\r
- try\r
- {\r
- jbInit();\r
- this.setJMenuBar(desktopMenubar);\r
- }\r
- catch (Exception e)\r
- {\r
- e.printStackTrace();\r
- }\r
-\r
- if (!System.getProperty("os.name").startsWith("Mac"))\r
- {\r
- FileMenu.setMnemonic('F');\r
- inputLocalFileMenuItem.setMnemonic('L');\r
- VamsasMenu.setMnemonic('V');\r
- inputURLMenuItem.setMnemonic('U');\r
- inputTextboxMenuItem.setMnemonic('C');\r
- quit.setMnemonic('Q');\r
- saveState.setMnemonic('S');\r
- loadState.setMnemonic('L');\r
- inputMenu.setMnemonic('I');\r
- }\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @throws Exception DOCUMENT ME!\r
- */\r
- private void jbInit()\r
- throws Exception\r
- {\r
- FileMenu.setText("File");\r
- HelpMenu.setText("Help");\r
- VamsasMenu.setText("Vamsas");\r
- VamsasMenu.setToolTipText("Share data with other vamsas applications.");\r
- inputLocalFileMenuItem.setText("from File");\r
- inputLocalFileMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(\r
- java.awt.event.KeyEvent.VK_O,\r
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));\r
- inputLocalFileMenuItem.addActionListener(new java.awt.event.ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- inputLocalFileMenuItem_actionPerformed(null);\r
- }\r
- });\r
- inputURLMenuItem.setText("from URL");\r
- inputURLMenuItem.addActionListener(new java.awt.event.ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- inputURLMenuItem_actionPerformed(null);\r
- }\r
- });\r
- inputTextboxMenuItem.setText("from Textbox");\r
- inputTextboxMenuItem.addActionListener(new java.awt.event.ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- inputTextboxMenuItem_actionPerformed(null);\r
- }\r
- });\r
- quit.setText("Quit");\r
- quit.addActionListener(new java.awt.event.ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- quit();\r
- }\r
- });\r
- aboutMenuItem.setText("About");\r
- aboutMenuItem.addActionListener(new java.awt.event.ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- aboutMenuItem_actionPerformed(e);\r
- }\r
- });\r
- documentationMenuItem.setText("Documentation");\r
- documentationMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(\r
- java.awt.event.KeyEvent.VK_F1, 0, false));\r
- documentationMenuItem.addActionListener(new java.awt.event.ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- documentationMenuItem_actionPerformed(e);\r
- }\r
- });\r
- this.getContentPane().setLayout(flowLayout1);\r
- windowMenu.setText("Window");\r
- preferences.setText("Preferences...");\r
- preferences.addActionListener(new ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- preferences_actionPerformed(e);\r
- }\r
- });\r
- toolsMenu.setText("Tools");\r
- saveState.setText("Save Project");\r
- saveState.addActionListener(new ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- saveState_actionPerformed(e);\r
- }\r
- });\r
- loadState.setText("Load Project");\r
- loadState.addActionListener(new ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- loadState_actionPerformed(e);\r
- }\r
- });\r
- inputMenu.setText("Input Alignment");\r
- vamsasLoad.setText("Start Vamsas Session...");\r
- vamsasLoad.setVisible(false);\r
- vamsasLoad.addActionListener(new ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- vamsasLoad_actionPerformed(e);\r
- }\r
- });\r
- inputSequence.setText("Fetch Sequence(s)...");\r
- inputSequence.addActionListener(new ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- inputSequence_actionPerformed(e);\r
- }\r
- });\r
- vamsasStop.setText("Stop Vamsas Session");\r
- vamsasStop.setVisible(false);\r
- vamsasStop.addActionListener(new ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- vamsasStop_actionPerformed(e);\r
- }\r
- });\r
- closeAll.setText("Close All");\r
- closeAll.addActionListener(new ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- closeAll_actionPerformed(e);\r
- }\r
- });\r
- raiseRelated.setText("Raise Associated Windows");\r
- raiseRelated.addActionListener(new ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- raiseRelated_actionPerformed(e);\r
- }\r
- });\r
- minimizeAssociated.setText("Minimize Associated Windows");\r
- minimizeAssociated.addActionListener(new ActionListener()\r
- {\r
- public void actionPerformed(ActionEvent e)\r
- {\r
- minimizeAssociated_actionPerformed(e);\r
- }\r
- });\r
- desktopMenubar.add(FileMenu);\r
- desktopMenubar.add(toolsMenu);\r
- VamsasMenu.setVisible(false);\r
- desktopMenubar.add(VamsasMenu);\r
- desktopMenubar.add(HelpMenu);\r
- desktopMenubar.add(windowMenu);\r
- FileMenu.add(inputMenu);\r
- FileMenu.add(inputSequence);\r
- FileMenu.addSeparator();\r
- FileMenu.add(saveState);\r
- FileMenu.add(loadState);\r
- FileMenu.addSeparator();\r
- FileMenu.add(quit);\r
- HelpMenu.add(aboutMenuItem);\r
- HelpMenu.add(documentationMenuItem);\r
- VamsasMenu.add(vamsasLoad);\r
- VamsasMenu.add(vamsasStop);\r
- toolsMenu.add(preferences);\r
- inputMenu.add(inputLocalFileMenuItem);\r
- inputMenu.add(inputURLMenuItem);\r
- inputMenu.add(inputTextboxMenuItem);\r
- windowMenu.add(closeAll);\r
- windowMenu.add(raiseRelated);\r
- windowMenu.add(minimizeAssociated);\r
- windowMenu.addSeparator();\r
- // inputMenu.add(vamsasLoad);\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- protected void inputLocalFileMenuItem_actionPerformed(jalview.gui.\r
- AlignViewport av)\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- protected void inputURLMenuItem_actionPerformed(jalview.gui.AlignViewport av)\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- protected void inputTextboxMenuItem_actionPerformed(jalview.gui.AlignViewport\r
- av)\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- */\r
- protected void quit()\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- protected void aboutMenuItem_actionPerformed(ActionEvent e)\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- protected void documentationMenuItem_actionPerformed(ActionEvent e)\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- public void SaveState_actionPerformed(ActionEvent e)\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- protected void preferences_actionPerformed(ActionEvent e)\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- public void saveState_actionPerformed(ActionEvent e)\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- public void loadState_actionPerformed(ActionEvent e)\r
- {\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param e DOCUMENT ME!\r
- */\r
- public void loadJalviewAlign_actionPerformed(ActionEvent e)\r
- {\r
- }\r
-\r
- public void vamsasLoad_actionPerformed(ActionEvent e)\r
- {\r
-\r
- }\r
-\r
- public void inputSequence_actionPerformed(ActionEvent e)\r
- {\r
-\r
- }\r
-\r
- public void vamsasStop_actionPerformed(ActionEvent e)\r
- {\r
-\r
- }\r
-\r
- public void closeAll_actionPerformed(ActionEvent e)\r
- {\r
-\r
- }\r
-\r
- public void raiseRelated_actionPerformed(ActionEvent e)\r
- {\r
-\r
- }\r
-\r
- public void minimizeAssociated_actionPerformed(ActionEvent e)\r
- {\r
-\r
- }\r
-}\r
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer
+ * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+package jalview.jbgui;
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+
+/**
+ * DOCUMENT ME!
+ *
+ * @author $author$
+ * @version $Revision$
+ */
+public class GDesktop
+ extends JFrame
+{
+ protected static JMenu windowMenu = new JMenu();
+ JMenuBar desktopMenubar = new JMenuBar();
+ JMenu FileMenu = new JMenu();
+ JMenu HelpMenu = new JMenu();
+ protected JMenu VamsasMenu = new JMenu();
+ JMenuItem inputLocalFileMenuItem = new JMenuItem();
+ JMenuItem inputURLMenuItem = new JMenuItem();
+ JMenuItem inputTextboxMenuItem = new JMenuItem();
+ JMenuItem quit = new JMenuItem();
+ JMenuItem aboutMenuItem = new JMenuItem();
+ JMenuItem documentationMenuItem = new JMenuItem();
+ FlowLayout flowLayout1 = new FlowLayout();
+ protected JMenu toolsMenu = new JMenu();
+ JMenuItem preferences = new JMenuItem();
+ JMenuItem saveState = new JMenuItem();
+ JMenuItem loadState = new JMenuItem();
+ JMenu inputMenu = new JMenu();
+ protected JMenuItem vamsasLoad = new JMenuItem();
+ JMenuItem inputSequence = new JMenuItem();
+ protected JMenuItem vamsasStop = new JMenuItem();
+ JMenuItem closeAll = new JMenuItem();
+ JMenuItem raiseRelated = new JMenuItem();
+ JMenuItem minimizeAssociated = new JMenuItem();
+
+ /**
+ * Creates a new GDesktop object.
+ */
+ public GDesktop()
+ {
+ try
+ {
+ jbInit();
+ this.setJMenuBar(desktopMenubar);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ if (!System.getProperty("os.name").startsWith("Mac"))
+ {
+ FileMenu.setMnemonic('F');
+ inputLocalFileMenuItem.setMnemonic('L');
+ VamsasMenu.setMnemonic('V');
+ inputURLMenuItem.setMnemonic('U');
+ inputTextboxMenuItem.setMnemonic('C');
+ quit.setMnemonic('Q');
+ saveState.setMnemonic('S');
+ loadState.setMnemonic('L');
+ inputMenu.setMnemonic('I');
+ }
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @throws Exception DOCUMENT ME!
+ */
+ private void jbInit()
+ throws Exception
+ {
+ FileMenu.setText("File");
+ HelpMenu.setText("Help");
+ VamsasMenu.setText("Vamsas");
+ VamsasMenu.setToolTipText("Share data with other vamsas applications.");
+ inputLocalFileMenuItem.setText("from File");
+ inputLocalFileMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_O,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ inputLocalFileMenuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ inputLocalFileMenuItem_actionPerformed(null);
+ }
+ });
+ inputURLMenuItem.setText("from URL");
+ inputURLMenuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ inputURLMenuItem_actionPerformed(null);
+ }
+ });
+ inputTextboxMenuItem.setText("from Textbox");
+ inputTextboxMenuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ inputTextboxMenuItem_actionPerformed(null);
+ }
+ });
+ quit.setText("Quit");
+ quit.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ quit();
+ }
+ });
+ aboutMenuItem.setText("About");
+ aboutMenuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ aboutMenuItem_actionPerformed(e);
+ }
+ });
+ documentationMenuItem.setText("Documentation");
+ documentationMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_F1, 0, false));
+ documentationMenuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ documentationMenuItem_actionPerformed(e);
+ }
+ });
+ this.getContentPane().setLayout(flowLayout1);
+ windowMenu.setText("Window");
+ preferences.setText("Preferences...");
+ preferences.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ preferences_actionPerformed(e);
+ }
+ });
+ toolsMenu.setText("Tools");
+ saveState.setText("Save Project");
+ saveState.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ saveState_actionPerformed(e);
+ }
+ });
+ loadState.setText("Load Project");
+ loadState.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ loadState_actionPerformed(e);
+ }
+ });
+ inputMenu.setText("Input Alignment");
+ vamsasLoad.setText("Start Vamsas Session...");
+ vamsasLoad.setVisible(false);
+ vamsasLoad.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ vamsasLoad_actionPerformed(e);
+ }
+ });
+ inputSequence.setText("Fetch Sequence(s)...");
+ inputSequence.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ inputSequence_actionPerformed(e);
+ }
+ });
+ vamsasStop.setText("Stop Vamsas Session");
+ vamsasStop.setVisible(false);
+ vamsasStop.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ vamsasStop_actionPerformed(e);
+ }
+ });
+ closeAll.setText("Close All");
+ closeAll.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ closeAll_actionPerformed(e);
+ }
+ });
+ raiseRelated.setText("Raise Associated Windows");
+ raiseRelated.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ raiseRelated_actionPerformed(e);
+ }
+ });
+ minimizeAssociated.setText("Minimize Associated Windows");
+ minimizeAssociated.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ minimizeAssociated_actionPerformed(e);
+ }
+ });
+ desktopMenubar.add(FileMenu);
+ desktopMenubar.add(toolsMenu);
+ VamsasMenu.setVisible(false);
+ desktopMenubar.add(VamsasMenu);
+ desktopMenubar.add(HelpMenu);
+ desktopMenubar.add(windowMenu);
+ FileMenu.add(inputMenu);
+ FileMenu.add(inputSequence);
+ FileMenu.addSeparator();
+ FileMenu.add(saveState);
+ FileMenu.add(loadState);
+ FileMenu.addSeparator();
+ FileMenu.add(quit);
+ HelpMenu.add(aboutMenuItem);
+ HelpMenu.add(documentationMenuItem);
+ VamsasMenu.add(vamsasLoad);
+ VamsasMenu.add(vamsasStop);
+ toolsMenu.add(preferences);
+ inputMenu.add(inputLocalFileMenuItem);
+ inputMenu.add(inputURLMenuItem);
+ inputMenu.add(inputTextboxMenuItem);
+ windowMenu.add(closeAll);
+ windowMenu.add(raiseRelated);
+ windowMenu.add(minimizeAssociated);
+ windowMenu.addSeparator();
+ // inputMenu.add(vamsasLoad);
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ protected void inputLocalFileMenuItem_actionPerformed(jalview.gui.
+ AlignViewport av)
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ protected void inputURLMenuItem_actionPerformed(jalview.gui.AlignViewport av)
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ protected void inputTextboxMenuItem_actionPerformed(jalview.gui.AlignViewport
+ av)
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ */
+ protected void quit()
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ protected void aboutMenuItem_actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ protected void documentationMenuItem_actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ public void SaveState_actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ protected void preferences_actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ public void saveState_actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ public void loadState_actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ public void loadJalviewAlign_actionPerformed(ActionEvent e)
+ {
+ }
+
+ public void vamsasLoad_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void inputSequence_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void vamsasStop_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void closeAll_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void raiseRelated_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void minimizeAssociated_actionPerformed(ActionEvent e)
+ {
+
+ }
+}