2 * Jalview - A Sequence Alignment Editor and Viewer
\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.jbgui;
\r
22 import java.awt.event.*;
\r
23 import javax.swing.*;
\r
24 import javax.swing.event.*;
\r
26 import jalview.schemes.*;
\r
28 public class GAlignFrame
\r
29 extends JInternalFrame
\r
31 protected JMenuBar alignFrameMenuBar = new JMenuBar();
\r
32 protected JMenu fileMenu = new JMenu();
\r
33 protected JMenuItem closeMenuItem = new JMenuItem();
\r
34 protected JMenu editMenu = new JMenu();
\r
35 protected JMenu viewMenu = new JMenu();
\r
36 protected JMenu colourMenu = new JMenu();
\r
37 protected JMenu calculateMenu = new JMenu();
\r
38 protected JMenu webService = new JMenu();
\r
39 protected JMenuItem webServiceNoServices;
\r
40 protected JMenuItem selectAllSequenceMenuItem = new JMenuItem();
\r
41 protected JMenuItem deselectAllSequenceMenuItem = new JMenuItem();
\r
42 protected JMenuItem invertSequenceMenuItem = new JMenuItem();
\r
43 protected JMenuItem remove2LeftMenuItem = new JMenuItem();
\r
44 protected JMenuItem remove2RightMenuItem = new JMenuItem();
\r
45 protected JMenuItem removeGappedColumnMenuItem = new JMenuItem();
\r
46 protected JMenuItem removeAllGapsMenuItem = new JMenuItem();
\r
47 public JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
\r
48 public JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
\r
49 protected JMenuItem sortPairwiseMenuItem = new JMenuItem();
\r
50 protected JMenuItem sortIDMenuItem = new JMenuItem();
\r
51 protected JMenuItem sortGroupMenuItem = new JMenuItem();
\r
52 protected JMenuItem removeRedundancyMenuItem = new JMenuItem();
\r
53 protected JMenuItem pairwiseAlignmentMenuItem = new JMenuItem();
\r
54 protected JMenuItem PCAMenuItem = new JMenuItem();
\r
55 protected JMenuItem averageDistanceTreeMenuItem = new JMenuItem();
\r
56 protected JMenuItem neighbourTreeMenuItem = new JMenuItem();
\r
57 protected JMenuItem clustalAlignMenuItem = new JMenuItem();
\r
58 BorderLayout borderLayout1 = new BorderLayout();
\r
59 public JLabel statusBar = new JLabel();
\r
60 protected JMenuItem saveAlignmentMenu = new JMenuItem();
\r
61 protected JMenu outputTextboxMenu = new JMenu();
\r
62 protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem();
\r
63 protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem();
\r
64 protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem();
\r
65 protected JRadioButtonMenuItem hydrophobicityColour = new
\r
66 JRadioButtonMenuItem();
\r
67 protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem();
\r
68 protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem();
\r
69 protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem();
\r
70 protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem();
\r
71 protected JRadioButtonMenuItem userDefinedColour = new JRadioButtonMenuItem();
\r
72 protected JRadioButtonMenuItem PIDColour = new JRadioButtonMenuItem();
\r
73 protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem();
\r
74 JMenuItem njTreeBlosumMenuItem = new JMenuItem();
\r
75 JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem();
\r
76 public JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
\r
77 public JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
\r
78 JMenuItem htmlMenuItem = new JMenuItem();
\r
79 JMenuItem overviewMenuItem = new JMenuItem();
\r
80 protected JMenuItem undoMenuItem = new JMenuItem();
\r
81 protected JMenuItem redoMenuItem = new JMenuItem();
\r
82 public JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
\r
83 JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem();
\r
84 public JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
\r
85 JMenuItem printMenuItem = new JMenuItem();
\r
86 public JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
\r
87 JMenuItem findMenuItem = new JMenuItem();
\r
88 JMenu searchMenu = new JMenu();
\r
89 public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem();
\r
90 public JCheckBoxMenuItem sequenceFeatures = new JCheckBoxMenuItem();
\r
91 protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
\r
92 JMenuItem deleteGroups = new JMenuItem();
\r
93 JMenuItem delete = new JMenuItem();
\r
94 JMenuItem copy = new JMenuItem();
\r
95 JMenuItem cut = new JMenuItem();
\r
96 JMenu jMenu1 = new JMenu();
\r
97 JMenuItem pasteNew = new JMenuItem();
\r
98 JMenuItem pasteThis = new JMenuItem();
\r
99 public JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem();
\r
100 JMenuItem createPNG = new JMenuItem();
\r
101 protected JMenuItem font = new JMenuItem();
\r
102 public JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
\r
103 JMenuItem epsFile = new JMenuItem();
\r
104 JMenuItem LoadtreeMenuItem = new JMenuItem();
\r
105 public JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
\r
106 public JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
\r
107 public JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
\r
108 protected JMenuItem modifyPID = new JMenuItem();
\r
109 protected JMenuItem modifyConservation = new JMenuItem();
\r
110 protected JMenu sortByTreeMenu = new JMenu();
\r
111 protected JMenu sort = new JMenu();
\r
112 JMenu calculate = new JMenu();
\r
113 JMenu jMenu2 = new JMenu();
\r
114 JMenuItem padGapsMenuitem = new JMenuItem();
\r
115 protected ButtonGroup colours = new ButtonGroup();
\r
116 JMenuItem vamsasStore = new JMenuItem();
\r
117 protected JCheckBoxMenuItem showTranslation = new JCheckBoxMenuItem();
\r
118 protected JTabbedPane tabbedPane = new JTabbedPane();
\r
119 public JMenuItem featureSettings = new JMenuItem();
\r
120 public JCheckBoxMenuItem seqDBRef = new JCheckBoxMenuItem();
\r
121 JMenuItem fetchSequence = new JMenuItem();
\r
123 public GAlignFrame()
\r
130 setJMenuBar(alignFrameMenuBar);
\r
132 // dynamically fill save as menu with available formats
\r
133 for (int i = 0; i < jalview.io.FormatAdapter.formats.size(); i++)
\r
135 JMenuItem item = new JMenuItem( (String) jalview.io.FormatAdapter.formats.
\r
138 item.addActionListener(new java.awt.event.ActionListener()
\r
140 public void actionPerformed(ActionEvent e)
\r
142 outputText_actionPerformed(e);
\r
146 outputTextboxMenu.add(item);
\r
149 catch (Exception e)
\r
154 if(jalview.gui.UserDefinedColours.getUserColourSchemes()!=null)
\r
156 java.util.Enumeration userColours = jalview.gui.UserDefinedColours.
\r
157 getUserColourSchemes().keys();
\r
159 while (userColours.hasMoreElements())
\r
161 final JRadioButtonMenuItem radioItem = new JRadioButtonMenuItem(userColours.
\r
162 nextElement().toString());
\r
163 radioItem.setName("USER_DEFINED");
\r
164 radioItem.addMouseListener(new MouseAdapter()
\r
166 public void mousePressed(MouseEvent evt)
\r
168 if(evt.isControlDown() || SwingUtilities.isRightMouseButton(evt))
\r
170 radioItem.removeActionListener(radioItem.getActionListeners()[0]);
\r
172 int option = JOptionPane.showInternalConfirmDialog(jalview.gui.Desktop.desktop,
\r
173 "Remove from default list?",
\r
174 "Remove user defined colour",
\r
175 JOptionPane.YES_NO_OPTION);
\r
176 if(option == JOptionPane.YES_OPTION)
\r
178 jalview.gui.UserDefinedColours.removeColourFromDefaults(radioItem.getText());
\r
179 colourMenu.remove(radioItem);
\r
182 radioItem.addActionListener(new ActionListener()
\r
184 public void actionPerformed(ActionEvent evt)
\r
186 userDefinedColour_actionPerformed(evt);
\r
192 radioItem.addActionListener(new ActionListener()
\r
194 public void actionPerformed(ActionEvent evt)
\r
196 userDefinedColour_actionPerformed(evt);
\r
199 colourMenu.insert(radioItem, 15);
\r
200 colours.add(radioItem);
\r
203 colours.add(noColourmenuItem);
\r
204 colours.add(clustalColour);
\r
205 colours.add(zappoColour);
\r
206 colours.add(taylorColour);
\r
207 colours.add(hydrophobicityColour);
\r
208 colours.add(helixColour);
\r
209 colours.add(strandColour);
\r
210 colours.add(turnColour);
\r
211 colours.add(buriedColour);
\r
212 colours.add(userDefinedColour);
\r
213 colours.add(PIDColour);
\r
214 colours.add(BLOSUM62Colour);
\r
215 colours.add(nucleotideColour);
\r
217 setColourSelected(jalview.bin.Cache.getDefault("DEFAULT_COLOUR", "None"));
\r
222 public void setColourSelected(String defaultColour)
\r
225 if (defaultColour != null)
\r
227 int index = ColourSchemeProperty.getColourIndexFromName(defaultColour);
\r
231 case ColourSchemeProperty.NONE:
\r
232 noColourmenuItem.setSelected(true);
\r
234 case ColourSchemeProperty.CLUSTAL:
\r
235 clustalColour.setSelected(true);
\r
239 case ColourSchemeProperty.BLOSUM:
\r
240 BLOSUM62Colour.setSelected(true);
\r
244 case ColourSchemeProperty.PID:
\r
245 PIDColour.setSelected(true);
\r
249 case ColourSchemeProperty.ZAPPO:
\r
250 zappoColour.setSelected(true);
\r
254 case ColourSchemeProperty.TAYLOR:
\r
255 taylorColour.setSelected(true);
\r
258 case ColourSchemeProperty.HYDROPHOBIC:
\r
259 hydrophobicityColour.setSelected(true);
\r
263 case ColourSchemeProperty.HELIX:
\r
264 helixColour.setSelected(true);
\r
268 case ColourSchemeProperty.STRAND:
\r
269 strandColour.setSelected(true);
\r
273 case ColourSchemeProperty.TURN:
\r
274 turnColour.setSelected(true);
\r
278 case ColourSchemeProperty.BURIED:
\r
279 buriedColour.setSelected(true);
\r
283 case ColourSchemeProperty.NUCLEOTIDE:
\r
284 nucleotideColour.setSelected(true);
\r
288 case ColourSchemeProperty.USER_DEFINED:
\r
289 userDefinedColour.setSelected(true);
\r
297 private void jbInit()
\r
300 fileMenu.setMnemonic('F');
\r
301 fileMenu.setText("File");
\r
302 saveAlignmentMenu.setMnemonic('L');
\r
303 saveAlignmentMenu.setText("Save As");
\r
304 saveAlignmentMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.
\r
305 awt.event.KeyEvent.VK_S, java.awt.event.KeyEvent.CTRL_MASK, false));
\r
306 saveAlignmentMenu.addActionListener(new ActionListener()
\r
308 public void actionPerformed(ActionEvent e)
\r
310 saveAlignmentMenu_actionPerformed(e);
\r
313 closeMenuItem.setMnemonic('C');
\r
314 closeMenuItem.setText("Close");
\r
315 closeMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
317 public void actionPerformed(ActionEvent e)
\r
319 closeMenuItem_actionPerformed(e);
\r
322 editMenu.setText("Edit");
\r
323 viewMenu.setText("View");
\r
324 colourMenu.setText("Colour");
\r
325 calculateMenu.setText("Calculate");
\r
326 webService.setText("Web Service");
\r
327 selectAllSequenceMenuItem.setText("Select all");
\r
328 selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
329 java.awt.event.KeyEvent.VK_A,
\r
330 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
331 selectAllSequenceMenuItem.addActionListener(new java.awt.event.
\r
334 public void actionPerformed(ActionEvent e)
\r
336 selectAllSequenceMenuItem_actionPerformed(e);
\r
339 deselectAllSequenceMenuItem.setText("Deselect All");
\r
340 deselectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.
\r
342 java.awt.event.KeyEvent.VK_ESCAPE, 0, false));
\r
343 deselectAllSequenceMenuItem.addActionListener(new java.awt.event.
\r
346 public void actionPerformed(ActionEvent e)
\r
348 deselectAllSequenceMenuItem_actionPerformed(e);
\r
351 invertSequenceMenuItem.setText("Invert Selection");
\r
352 invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
354 public void actionPerformed(ActionEvent e)
\r
356 invertSequenceMenuItem_actionPerformed(e);
\r
359 remove2LeftMenuItem.setText("Remove Left");
\r
360 remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
362 public void actionPerformed(ActionEvent e)
\r
364 remove2LeftMenuItem_actionPerformed(e);
\r
367 remove2RightMenuItem.setText("Remove Right");
\r
368 remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
370 public void actionPerformed(ActionEvent e)
\r
372 remove2RightMenuItem_actionPerformed(e);
\r
375 removeGappedColumnMenuItem.setText("Remove Empty Columns");
\r
376 removeGappedColumnMenuItem.addActionListener(new java.awt.event.
\r
379 public void actionPerformed(ActionEvent e)
\r
381 removeGappedColumnMenuItem_actionPerformed(e);
\r
384 removeAllGapsMenuItem.setText("Remove All Gaps");
\r
385 removeAllGapsMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
387 public void actionPerformed(ActionEvent e)
\r
389 removeAllGapsMenuItem_actionPerformed(e);
\r
392 viewBoxesMenuItem.setText("Boxes");
\r
393 viewBoxesMenuItem.setState(true);
\r
394 viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
396 public void actionPerformed(ActionEvent e)
\r
398 viewBoxesMenuItem_actionPerformed(e);
\r
401 viewTextMenuItem.setText("Text");
\r
402 viewTextMenuItem.setState(true);
\r
403 viewTextMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
405 public void actionPerformed(ActionEvent e)
\r
407 viewTextMenuItem_actionPerformed(e);
\r
410 sortPairwiseMenuItem.setText("by Pairwise Identity");
\r
411 sortPairwiseMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
413 public void actionPerformed(ActionEvent e)
\r
415 sortPairwiseMenuItem_actionPerformed(e);
\r
418 sortIDMenuItem.setText("by ID");
\r
419 sortIDMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
421 public void actionPerformed(ActionEvent e)
\r
423 sortIDMenuItem_actionPerformed(e);
\r
426 sortGroupMenuItem.setText("by Group");
\r
427 sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
429 public void actionPerformed(ActionEvent e)
\r
431 sortGroupMenuItem_actionPerformed(e);
\r
434 removeRedundancyMenuItem.setText("Remove Redundancy...");
\r
435 removeRedundancyMenuItem.addActionListener(new java.awt.event.
\r
438 public void actionPerformed(ActionEvent e)
\r
440 removeRedundancyMenuItem_actionPerformed(e);
\r
443 pairwiseAlignmentMenuItem.setText("Pairwise Alignments...");
\r
444 pairwiseAlignmentMenuItem.addActionListener(new java.awt.event.
\r
447 public void actionPerformed(ActionEvent e)
\r
449 pairwiseAlignmentMenuItem_actionPerformed(e);
\r
452 PCAMenuItem.setText("Principal Component Analysis");
\r
453 PCAMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
455 public void actionPerformed(ActionEvent e)
\r
457 PCAMenuItem_actionPerformed(e);
\r
460 averageDistanceTreeMenuItem.setText(
\r
461 "Average Distance Using % Identity");
\r
462 averageDistanceTreeMenuItem.addActionListener(new java.awt.event.
\r
465 public void actionPerformed(ActionEvent e)
\r
467 averageDistanceTreeMenuItem_actionPerformed(e);
\r
470 neighbourTreeMenuItem.setText("Neighbour Joining Using % Identity");
\r
471 neighbourTreeMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
473 public void actionPerformed(ActionEvent e)
\r
475 neighbourTreeMenuItem_actionPerformed(e);
\r
478 this.getContentPane().setLayout(borderLayout1);
\r
479 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
\r
480 alignFrameMenuBar.addAncestorListener(new AncestorListener()
\r
482 public void ancestorAdded(AncestorEvent event)
\r
484 alignFrameMenuBar_ancestorAdded(event);
\r
487 public void ancestorRemoved(AncestorEvent event)
\r
491 public void ancestorMoved(AncestorEvent event)
\r
495 statusBar.setBackground(Color.white);
\r
496 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
\r
497 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
\r
498 statusBar.setText("Status bar");
\r
499 outputTextboxMenu.setMnemonic('T');
\r
500 outputTextboxMenu.setText("Output to Textbox");
\r
501 clustalColour.setText("Clustalx");
\r
503 clustalColour.addActionListener(new java.awt.event.ActionListener()
\r
505 public void actionPerformed(ActionEvent e)
\r
507 clustalColour_actionPerformed(e);
\r
510 zappoColour.setText("Zappo");
\r
511 zappoColour.addActionListener(new java.awt.event.ActionListener()
\r
513 public void actionPerformed(ActionEvent e)
\r
515 zappoColour_actionPerformed(e);
\r
518 taylorColour.setText("Taylor");
\r
519 taylorColour.addActionListener(new java.awt.event.ActionListener()
\r
521 public void actionPerformed(ActionEvent e)
\r
523 taylorColour_actionPerformed(e);
\r
526 hydrophobicityColour.setText("Hydrophobicity");
\r
527 hydrophobicityColour.addActionListener(new java.awt.event.ActionListener()
\r
529 public void actionPerformed(ActionEvent e)
\r
531 hydrophobicityColour_actionPerformed(e);
\r
534 helixColour.setText("Helix Propensity");
\r
535 helixColour.addActionListener(new java.awt.event.ActionListener()
\r
537 public void actionPerformed(ActionEvent e)
\r
539 helixColour_actionPerformed(e);
\r
542 strandColour.setText("Strand Propensity");
\r
543 strandColour.addActionListener(new java.awt.event.ActionListener()
\r
545 public void actionPerformed(ActionEvent e)
\r
547 strandColour_actionPerformed(e);
\r
550 turnColour.setText("Turn Propensity");
\r
551 turnColour.addActionListener(new java.awt.event.ActionListener()
\r
553 public void actionPerformed(ActionEvent e)
\r
555 turnColour_actionPerformed(e);
\r
558 buriedColour.setText("Buried Index");
\r
559 buriedColour.addActionListener(new java.awt.event.ActionListener()
\r
561 public void actionPerformed(ActionEvent e)
\r
563 buriedColour_actionPerformed(e);
\r
566 userDefinedColour.setText("User Defined...");
\r
567 userDefinedColour.addActionListener(new java.awt.event.ActionListener()
\r
569 public void actionPerformed(ActionEvent e)
\r
571 userDefinedColour_actionPerformed(e);
\r
574 PIDColour.setText("Percentage Identity");
\r
575 PIDColour.addActionListener(new java.awt.event.ActionListener()
\r
577 public void actionPerformed(ActionEvent e)
\r
579 PIDColour_actionPerformed(e);
\r
582 BLOSUM62Colour.setText("BLOSUM62 Score");
\r
583 BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener()
\r
585 public void actionPerformed(ActionEvent e)
\r
587 BLOSUM62Colour_actionPerformed(e);
\r
590 avDistanceTreeBlosumMenuItem.setText(
\r
591 "Average Distance Using BLOSUM62");
\r
592 avDistanceTreeBlosumMenuItem.addActionListener(new java.awt.event.
\r
595 public void actionPerformed(ActionEvent e)
\r
597 avTreeBlosumMenuItem_actionPerformed(e);
\r
600 njTreeBlosumMenuItem.setText("Neighbour Joining using BLOSUM62");
\r
601 njTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
603 public void actionPerformed(ActionEvent e)
\r
605 njTreeBlosumMenuItem_actionPerformed(e);
\r
608 annotationPanelMenuItem.setActionCommand("");
\r
609 annotationPanelMenuItem.setText("Show Annotations");
\r
610 annotationPanelMenuItem.setState( jalview.bin.Cache.getDefault("SHOW_ANNOTATIONS",true));
\r
611 annotationPanelMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
613 public void actionPerformed(ActionEvent e)
\r
615 annotationPanelMenuItem_actionPerformed(e);
\r
618 colourTextMenuItem.setText("Colour Text");
\r
619 colourTextMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
621 public void actionPerformed(ActionEvent e)
\r
623 colourTextMenuItem_actionPerformed(e);
\r
626 htmlMenuItem.setText("HTML");
\r
627 htmlMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
629 public void actionPerformed(ActionEvent e)
\r
631 htmlMenuItem_actionPerformed(e);
\r
634 overviewMenuItem.setText("Overview Window");
\r
635 overviewMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
637 public void actionPerformed(ActionEvent e)
\r
639 overviewMenuItem_actionPerformed(e);
\r
642 undoMenuItem.setEnabled(false);
\r
643 undoMenuItem.setMnemonic('Z');
\r
644 undoMenuItem.setText("Undo");
\r
645 undoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
646 java.awt.event.KeyEvent.VK_Z,
\r
647 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
648 undoMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
650 public void actionPerformed(ActionEvent e)
\r
652 undoMenuItem_actionPerformed(e);
\r
655 redoMenuItem.setEnabled(false);
\r
656 redoMenuItem.setMnemonic('0');
\r
657 redoMenuItem.setText("Redo");
\r
658 redoMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
660 public void actionPerformed(ActionEvent e)
\r
662 redoMenuItem_actionPerformed(e);
\r
665 conservationMenuItem.setText("By Conservation");
\r
666 conservationMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
668 public void actionPerformed(ActionEvent e)
\r
670 conservationMenuItem_actionPerformed(e);
\r
673 noColourmenuItem.setText("None");
\r
674 noColourmenuItem.addActionListener(new java.awt.event.ActionListener()
\r
676 public void actionPerformed(ActionEvent e)
\r
678 noColourmenuItem_actionPerformed(e);
\r
681 wrapMenuItem.setText("Wrap");
\r
682 wrapMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
684 public void actionPerformed(ActionEvent e)
\r
686 wrapMenuItem_actionPerformed(e);
\r
689 printMenuItem.setText("Print");
\r
690 printMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
692 public void actionPerformed(ActionEvent e)
\r
694 printMenuItem_actionPerformed(e);
\r
697 renderGapsMenuItem.setText("Show Gaps");
\r
698 renderGapsMenuItem.setState(true);
\r
699 renderGapsMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
701 public void actionPerformed(ActionEvent e)
\r
703 renderGapsMenuItem_actionPerformed(e);
\r
706 findMenuItem.setText("Find...");
\r
707 findMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
708 java.awt.event.KeyEvent.VK_F,
\r
709 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
710 findMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
712 public void actionPerformed(ActionEvent e)
\r
714 findMenuItem_actionPerformed(e);
\r
717 searchMenu.setText("Search");
\r
719 abovePIDThreshold.setText("Above Identity Threshold");
\r
720 abovePIDThreshold.addActionListener(new java.awt.event.ActionListener()
\r
722 public void actionPerformed(ActionEvent e)
\r
724 abovePIDThreshold_actionPerformed(e);
\r
727 sequenceFeatures.setText("Sequence Features");
\r
728 sequenceFeatures.addActionListener(new ActionListener()
\r
730 public void actionPerformed(ActionEvent actionEvent)
\r
732 sequenceFeatures_actionPerformed(actionEvent);
\r
735 nucleotideColour.setText("Nucleotide");
\r
736 nucleotideColour.addActionListener(new java.awt.event.ActionListener()
\r
738 public void actionPerformed(ActionEvent e)
\r
740 nucleotideColour_actionPerformed(e);
\r
743 deleteGroups.setText("Undefine groups");
\r
744 deleteGroups.addActionListener(new java.awt.event.ActionListener()
\r
746 public void actionPerformed(ActionEvent e)
\r
748 deleteGroups_actionPerformed(e);
\r
751 copy.setText("Copy");
\r
752 copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
753 java.awt.event.KeyEvent.VK_C,
\r
754 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
755 copy.setMnemonic(KeyEvent.VK_C);
\r
757 copy.addActionListener(new java.awt.event.ActionListener()
\r
759 public void actionPerformed(ActionEvent e)
\r
761 copy_actionPerformed(e);
\r
764 cut.setText("Cut");
\r
765 cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
766 java.awt.event.KeyEvent.VK_X,
\r
767 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
768 cut.setMnemonic(KeyEvent.VK_X);
\r
769 cut.addActionListener(new java.awt.event.ActionListener()
\r
771 public void actionPerformed(ActionEvent e)
\r
773 cut_actionPerformed(e);
\r
776 delete.setText("Delete");
\r
777 delete.addActionListener(new java.awt.event.ActionListener()
\r
779 public void actionPerformed(ActionEvent e)
\r
781 delete_actionPerformed(e);
\r
784 jMenu1.setMnemonic('V');
\r
785 jMenu1.setText("Paste");
\r
786 pasteNew.setText("To New Alignment");
\r
787 pasteNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
788 java.awt.event.KeyEvent.VK_V,
\r
789 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
790 pasteNew.addActionListener(new java.awt.event.ActionListener()
\r
792 public void actionPerformed(ActionEvent e)
\r
794 pasteNew_actionPerformed(e);
\r
797 pasteThis.setText("Add To This Alignment");
\r
798 pasteThis.addActionListener(new java.awt.event.ActionListener()
\r
800 public void actionPerformed(ActionEvent e)
\r
802 pasteThis_actionPerformed(e);
\r
805 applyToAllGroups.setText("Apply Colour To All Groups");
\r
806 applyToAllGroups.setState(true);
\r
807 applyToAllGroups.addActionListener(new java.awt.event.ActionListener()
\r
809 public void actionPerformed(ActionEvent e)
\r
811 applyToAllGroups_actionPerformed(e);
\r
814 createPNG.addActionListener(new java.awt.event.ActionListener()
\r
816 public void actionPerformed(ActionEvent e)
\r
821 createPNG.setActionCommand("Save As PNG Image");
\r
822 createPNG.setText("PNG");
\r
823 font.setText("Font...");
\r
824 font.addActionListener(new java.awt.event.ActionListener()
\r
826 public void actionPerformed(ActionEvent e)
\r
828 font_actionPerformed(e);
\r
832 seqLimits.setText("Show Sequence Limits");
\r
833 seqLimits.setState( jalview.bin.Cache.getDefault("SHOW_JVSUFFIX",true));
\r
834 seqLimits.addActionListener(new java.awt.event.ActionListener()
\r
836 public void actionPerformed(ActionEvent e)
\r
838 seqLimit_actionPerformed(e);
\r
841 epsFile.setText("EPS");
\r
842 epsFile.addActionListener(new java.awt.event.ActionListener()
\r
844 public void actionPerformed(ActionEvent e)
\r
849 LoadtreeMenuItem.setActionCommand("Load a tree for this sequence set");
\r
850 LoadtreeMenuItem.setText("Load Assocated Tree");
\r
851 LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
853 public void actionPerformed(ActionEvent e)
\r
855 LoadtreeMenuItem_actionPerformed(e);
\r
858 scaleAbove.setVisible(false);
\r
859 scaleAbove.setText("Scale Above");
\r
860 scaleAbove.addActionListener(new java.awt.event.ActionListener()
\r
862 public void actionPerformed(ActionEvent e)
\r
864 scaleAbove_actionPerformed(e);
\r
867 scaleLeft.setVisible(false);
\r
868 scaleLeft.setSelected(true);
\r
869 scaleLeft.setText("Scale Left");
\r
870 scaleLeft.addActionListener(new java.awt.event.ActionListener()
\r
872 public void actionPerformed(ActionEvent e)
\r
874 scaleLeft_actionPerformed(e);
\r
877 scaleRight.setVisible(false);
\r
878 scaleRight.setSelected(true);
\r
879 scaleRight.setText("Scale Right");
\r
880 scaleRight.addActionListener(new java.awt.event.ActionListener()
\r
882 public void actionPerformed(ActionEvent e)
\r
884 scaleRight_actionPerformed(e);
\r
887 modifyPID.setText("Modify Identity Threshold...");
\r
888 modifyPID.addActionListener(new java.awt.event.ActionListener()
\r
890 public void actionPerformed(ActionEvent e)
\r
892 modifyPID_actionPerformed(e);
\r
895 modifyConservation.setText("Modify Conservation Threshold...");
\r
896 modifyConservation.addActionListener(new java.awt.event.ActionListener()
\r
898 public void actionPerformed(ActionEvent e)
\r
900 modifyConservation_actionPerformed(e);
\r
903 sortByTreeMenu.setText("By Tree Order");
\r
904 sort.setText("Sort");
\r
905 calculate.setText("Calculate Tree");
\r
907 jMenu2.setText("Export");
\r
908 padGapsMenuitem.setText("Pad Gaps");
\r
909 padGapsMenuitem.addActionListener(new ActionListener()
\r
911 public void actionPerformed(ActionEvent e)
\r
913 padGapsMenuitem_actionPerformed(e);
\r
916 vamsasStore.setText("VAMSAS store");
\r
917 vamsasStore.addActionListener(new ActionListener()
\r
919 public void actionPerformed(ActionEvent e)
\r
921 vamsasStore_actionPerformed(e);
\r
924 showTranslation.setText("Translate cDNA");
\r
925 showTranslation.addActionListener(new ActionListener()
\r
927 public void actionPerformed(ActionEvent e)
\r
929 showTranslation_actionPerformed(e);
\r
933 tabbedPane.addChangeListener(new ChangeListener()
\r
935 public void stateChanged(ChangeEvent ece)
\r
941 featureSettings.setEnabled(false);
\r
942 featureSettings.setText("Feature Settings...");
\r
943 featureSettings.addActionListener(new ActionListener()
\r
945 public void actionPerformed(ActionEvent e)
\r
947 featureSettings_actionPerformed(e);
\r
950 seqDBRef.setState( jalview.bin.Cache.getDefault("SHOW_DBPREFIX",true));
\r
951 seqDBRef.setText("Show Full Sequence Id");
\r
952 seqDBRef.addActionListener(new ActionListener()
\r
954 public void actionPerformed(ActionEvent e)
\r
956 seqDBRef_actionPerformed(e);
\r
959 fetchSequence.setText("Fetch Sequence...");
\r
960 fetchSequence.addActionListener(new ActionListener()
\r
962 public void actionPerformed(ActionEvent e)
\r
964 fetchSequence_actionPerformed(e);
\r
967 alignFrameMenuBar.add(fileMenu);
\r
968 alignFrameMenuBar.add(editMenu);
\r
969 alignFrameMenuBar.add(searchMenu);
\r
970 alignFrameMenuBar.add(viewMenu);
\r
971 alignFrameMenuBar.add(colourMenu);
\r
972 alignFrameMenuBar.add(calculateMenu);
\r
973 alignFrameMenuBar.add(webService);
\r
974 fileMenu.add(fetchSequence);
\r
975 fileMenu.add(vamsasStore);
\r
976 fileMenu.add(saveAlignmentMenu);
\r
977 fileMenu.add(jMenu2);
\r
978 fileMenu.add(outputTextboxMenu);
\r
979 fileMenu.add(printMenuItem);
\r
980 fileMenu.addSeparator();
\r
981 fileMenu.add(LoadtreeMenuItem);
\r
982 fileMenu.addSeparator();
\r
983 fileMenu.add(closeMenuItem);
\r
984 editMenu.add(undoMenuItem);
\r
985 editMenu.add(redoMenuItem);
\r
987 editMenu.add(copy);
\r
988 editMenu.add(jMenu1);
\r
989 editMenu.add(delete);
\r
990 editMenu.addSeparator();
\r
991 editMenu.add(selectAllSequenceMenuItem);
\r
992 editMenu.add(deselectAllSequenceMenuItem);
\r
993 editMenu.add(invertSequenceMenuItem);
\r
994 editMenu.add(deleteGroups);
\r
995 editMenu.addSeparator();
\r
996 editMenu.add(remove2LeftMenuItem);
\r
997 editMenu.add(remove2RightMenuItem);
\r
998 editMenu.add(removeGappedColumnMenuItem);
\r
999 editMenu.add(removeAllGapsMenuItem);
\r
1000 editMenu.add(removeRedundancyMenuItem);
\r
1001 editMenu.addSeparator();
\r
1002 editMenu.add(padGapsMenuitem);
\r
1003 searchMenu.add(findMenuItem);
\r
1004 viewMenu.add(font);
\r
1005 viewMenu.addSeparator();
\r
1006 viewMenu.add(wrapMenuItem);
\r
1007 viewMenu.add(seqDBRef);
\r
1008 viewMenu.add(seqLimits);
\r
1009 viewMenu.add(scaleAbove);
\r
1010 viewMenu.add(scaleLeft);
\r
1011 viewMenu.add(scaleRight);
\r
1012 viewMenu.add(viewBoxesMenuItem);
\r
1013 viewMenu.add(viewTextMenuItem);
\r
1014 viewMenu.add(colourTextMenuItem);
\r
1015 viewMenu.add(renderGapsMenuItem);
\r
1016 viewMenu.add(annotationPanelMenuItem);
\r
1017 viewMenu.addSeparator();
\r
1018 viewMenu.add(sequenceFeatures);
\r
1019 viewMenu.add(featureSettings);
\r
1020 viewMenu.addSeparator();
\r
1021 viewMenu.add(overviewMenuItem);
\r
1022 colourMenu.add(applyToAllGroups);
\r
1023 colourMenu.addSeparator();
\r
1024 colourMenu.add(noColourmenuItem);
\r
1025 colourMenu.add(clustalColour);
\r
1026 colourMenu.add(BLOSUM62Colour);
\r
1027 colourMenu.add(PIDColour);
\r
1028 colourMenu.add(zappoColour);
\r
1029 colourMenu.add(taylorColour);
\r
1030 colourMenu.add(hydrophobicityColour);
\r
1031 colourMenu.add(helixColour);
\r
1032 colourMenu.add(strandColour);
\r
1033 colourMenu.add(turnColour);
\r
1034 colourMenu.add(buriedColour);
\r
1035 colourMenu.add(nucleotideColour);
\r
1036 colourMenu.add(userDefinedColour);
\r
1037 colourMenu.addSeparator();
\r
1038 colourMenu.add(conservationMenuItem);
\r
1039 colourMenu.add(modifyConservation);
\r
1040 colourMenu.add(abovePIDThreshold);
\r
1041 colourMenu.add(modifyPID);
\r
1042 calculateMenu.add(sort);
\r
1043 calculateMenu.add(calculate);
\r
1044 calculateMenu.addSeparator();
\r
1045 calculateMenu.add(pairwiseAlignmentMenuItem);
\r
1046 calculateMenu.add(PCAMenuItem);
\r
1047 calculateMenu.addSeparator();
\r
1048 calculateMenu.add(showTranslation);
\r
1049 webServiceNoServices=new JMenuItem("<No Services>");
\r
1050 webService.add(webServiceNoServices);
\r
1051 this.getContentPane().add(statusBar, BorderLayout.SOUTH);
\r
1052 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
\r
1053 jMenu1.add(pasteNew);
\r
1054 jMenu1.add(pasteThis);
\r
1055 sort.add(sortIDMenuItem);
\r
1056 sort.add(sortGroupMenuItem);
\r
1057 sort.add(sortPairwiseMenuItem);
\r
1058 calculate.add(averageDistanceTreeMenuItem);
\r
1059 calculate.add(neighbourTreeMenuItem);
\r
1060 calculate.add(avDistanceTreeBlosumMenuItem);
\r
1061 calculate.add(njTreeBlosumMenuItem);
\r
1062 jMenu2.add(htmlMenuItem);
\r
1063 jMenu2.add(epsFile);
\r
1064 jMenu2.add(createPNG);
\r
1067 protected void outputText_actionPerformed(ActionEvent e)
\r
1071 protected void htmlMenuItem_actionPerformed(ActionEvent e)
\r
1075 protected void closeMenuItem_actionPerformed(ActionEvent e)
\r
1079 protected void redoMenuItem_actionPerformed(ActionEvent e)
\r
1083 protected void undoMenuItem_actionPerformed(ActionEvent e)
\r
1087 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
\r
1091 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
\r
1095 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
\r
1099 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
\r
1103 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
\r
1107 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
\r
1111 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
\r
1115 protected void wrapMenuItem_actionPerformed(ActionEvent e)
\r
1119 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
\r
1123 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
\r
1127 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
\r
1131 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
\r
1135 protected void overviewMenuItem_actionPerformed(ActionEvent e)
\r
1139 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
\r
1143 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
\r
1147 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
\r
1151 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
\r
1155 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
\r
1159 protected void PCAMenuItem_actionPerformed(ActionEvent e)
\r
1163 protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e)
\r
1167 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
\r
1171 protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e)
\r
1175 protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
\r
1179 protected void clustalAlignMenuItem_actionPerformed(ActionEvent e)
\r
1183 protected void clustalColour_actionPerformed(ActionEvent e)
\r
1187 protected void zappoColour_actionPerformed(ActionEvent e)
\r
1191 protected void taylorColour_actionPerformed(ActionEvent e)
\r
1195 protected void hydrophobicityColour_actionPerformed(ActionEvent e)
\r
1199 protected void helixColour_actionPerformed(ActionEvent e)
\r
1203 protected void strandColour_actionPerformed(ActionEvent e)
\r
1207 protected void turnColour_actionPerformed(ActionEvent e)
\r
1211 protected void buriedColour_actionPerformed(ActionEvent e)
\r
1215 protected void userDefinedColour_actionPerformed(ActionEvent e)
\r
1219 protected void PIDColour_actionPerformed(ActionEvent e)
\r
1223 protected void BLOSUM62Colour_actionPerformed(ActionEvent e)
\r
1227 protected void noColourmenuItem_actionPerformed(ActionEvent e)
\r
1231 protected void conservationMenuItem_actionPerformed(ActionEvent e)
\r
1235 protected void printMenuItem_actionPerformed(ActionEvent e)
\r
1239 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
\r
1243 protected void findMenuItem_actionPerformed(ActionEvent e)
\r
1247 protected void abovePIDThreshold_actionPerformed(ActionEvent e)
\r
1251 public void sequenceFeatures_actionPerformed(ActionEvent actionEvent)
\r
1255 protected void nucleotideColour_actionPerformed(ActionEvent e)
\r
1259 protected void deleteGroups_actionPerformed(ActionEvent e)
\r
1263 protected void copy_actionPerformed(ActionEvent e)
\r
1267 protected void cut_actionPerformed(ActionEvent e)
\r
1271 protected void delete_actionPerformed(ActionEvent e)
\r
1275 protected void pasteNew_actionPerformed(ActionEvent e)
\r
1279 protected void pasteThis_actionPerformed(ActionEvent e)
\r
1283 protected void applyToAllGroups_actionPerformed(ActionEvent e)
\r
1287 public void createPNG(java.io.File f)
\r
1291 protected void font_actionPerformed(ActionEvent e)
\r
1295 protected void seqLimit_actionPerformed(ActionEvent e)
\r
1299 public void seqDBRef_actionPerformed(ActionEvent e)
\r
1305 public void createEPS(java.io.File f)
\r
1309 protected void LoadtreeMenuItem_actionPerformed(ActionEvent e)
\r
1313 protected void jpred_actionPerformed(ActionEvent e)
\r
1317 protected void scaleAbove_actionPerformed(ActionEvent e)
\r
1321 protected void scaleLeft_actionPerformed(ActionEvent e)
\r
1325 protected void scaleRight_actionPerformed(ActionEvent e)
\r
1329 protected void modifyPID_actionPerformed(ActionEvent e)
\r
1333 protected void modifyConservation_actionPerformed(ActionEvent e)
\r
1337 protected void preferences_actionPerformed(ActionEvent e)
\r
1341 protected void msaAlignMenuItem_actionPerformed(ActionEvent e)
\r
1345 protected void alignFrameMenuBar_ancestorAdded(AncestorEvent event)
\r
1349 protected void saveAlignmentMenu_actionPerformed(ActionEvent e)
\r
1353 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
\r
1357 protected void ClustalRealign_actionPerformed(ActionEvent e)
\r
1361 public void vamsasStore_actionPerformed(ActionEvent e)
\r
1366 public void vamsasLoad_actionPerformed(ActionEvent e)
\r
1371 public void showTranslation_actionPerformed(ActionEvent e)
\r
1376 public void tabSelected()
\r
1381 public void featureSettings_actionPerformed(ActionEvent e)
\r
1386 public void fetchSequence_actionPerformed(ActionEvent e)
\r