X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGDesktop.java;h=722a4082181424c1942c8ef899898d5d77ce0b97;hb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;hp=daea610268b4e1d039001652098f6e5097612f50;hpb=dd74fc4938723fe5ec48d4e5fdcfbe58ac42a48d;p=jalview.git diff --git a/src/jalview/jbgui/GDesktop.java b/src/jalview/jbgui/GDesktop.java index daea610..722a408 100755 --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@ -1,54 +1,53 @@ /* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2006 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 -*/ + * 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 +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(); - JMenu toolsMenu = new JMenu(); - JMenuItem preferences = new JMenuItem(); - JMenuItem saveState = new JMenuItem(); - JMenuItem loadState = new JMenuItem(); - JMenu inputMenu = new JMenu(); + 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(); + 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(); @@ -57,125 +56,127 @@ public class GDesktop extends JFrame JMenuItem minimizeAssociated = new JMenuItem(); /** - * Creates a new GDesktop object. - */ - public GDesktop() + * Creates a new GDesktop object. + */ + public GDesktop() + { + try { - 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'); - } + jbInit(); + this.setJMenuBar(desktopMenubar); + } + catch (Exception e) + { + e.printStackTrace(); } - /** - * DOCUMENT ME! - * - * @throws Exception DOCUMENT ME! - */ - private void jbInit() throws Exception + if (!System.getProperty("os.name").startsWith("Mac")) { - FileMenu.setText("File"); - HelpMenu.setText("Help"); - VamsasMenu.setText("Vamsas"); - VamsasMenu.setToolTipText("Share data with other vamsas applications."); - inputLocalFileMenuItem.setText("from File"); + 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)); + 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"); + { + 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"); + { + 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() @@ -254,102 +255,104 @@ public class GDesktop extends JFrame // 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 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 inputURLMenuItem_actionPerformed(jalview.gui.AlignViewport av) + { + } - /** - * DOCUMENT ME! - * - * @param e DOCUMENT ME! - */ - protected void inputTextboxMenuItem_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! + */ + protected void quit() + { + } - /** - * DOCUMENT ME! - * - * @param e DOCUMENT ME! - */ - protected void aboutMenuItem_actionPerformed(ActionEvent e) - { - } + /** + * 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! + */ + protected void documentationMenuItem_actionPerformed(ActionEvent e) + { + } - /** - * DOCUMENT ME! - * - * @param e DOCUMENT ME! - */ - public void SaveState_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! + */ + 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 saveState_actionPerformed(ActionEvent e) + { + } - /** - * DOCUMENT ME! - * - * @param e DOCUMENT ME! - */ - public void loadState_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) - { - } + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + public void loadJalviewAlign_actionPerformed(ActionEvent e) + { + } public void vamsasLoad_actionPerformed(ActionEvent e) { @@ -360,6 +363,7 @@ public class GDesktop extends JFrame { } + public void vamsasStop_actionPerformed(ActionEvent e) {