2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 package jalview.jbgui;
21 import java.awt.event.*;
24 import javax.swing.event.*;
26 import jalview.schemes.*;
28 public class GAlignFrame extends JInternalFrame
30 protected JMenuBar alignFrameMenuBar = new JMenuBar();
32 protected JMenu fileMenu = new JMenu();
34 protected JMenuItem closeMenuItem = new JMenuItem();
36 protected JMenu editMenu = new JMenu();
38 protected JMenu viewMenu = new JMenu();
40 protected JMenu colourMenu = new JMenu();
42 protected JMenu calculateMenu = new JMenu();
44 protected JMenu webService = new JMenu();
46 protected JMenuItem webServiceNoServices;
48 protected JMenuItem selectAllSequenceMenuItem = new JMenuItem();
50 protected JMenuItem deselectAllSequenceMenuItem = new JMenuItem();
52 protected JMenuItem invertSequenceMenuItem = new JMenuItem();
54 protected JMenuItem remove2LeftMenuItem = new JMenuItem();
56 protected JMenuItem remove2RightMenuItem = new JMenuItem();
58 protected JMenuItem removeGappedColumnMenuItem = new JMenuItem();
60 protected JMenuItem removeAllGapsMenuItem = new JMenuItem();
62 public JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
64 public JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
66 protected JMenuItem sortPairwiseMenuItem = new JMenuItem();
68 protected JMenuItem sortIDMenuItem = new JMenuItem();
70 protected JMenuItem sortLengthMenuItem = new JMenuItem();
72 protected JMenuItem sortGroupMenuItem = new JMenuItem();
74 protected JMenu sortByAnnotScore = new JMenu();
76 protected JMenuItem removeRedundancyMenuItem = new JMenuItem();
78 protected JMenuItem pairwiseAlignmentMenuItem = new JMenuItem();
80 protected JMenuItem PCAMenuItem = new JMenuItem();
82 protected JMenuItem averageDistanceTreeMenuItem = new JMenuItem();
84 protected JMenuItem neighbourTreeMenuItem = new JMenuItem();
86 BorderLayout borderLayout1 = new BorderLayout();
88 public JLabel statusBar = new JLabel();
90 protected JMenuItem saveAs = new JMenuItem();
92 protected JMenu outputTextboxMenu = new JMenu();
94 protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem();
96 protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem();
98 protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem();
100 protected JRadioButtonMenuItem hydrophobicityColour = new JRadioButtonMenuItem();
102 protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem();
104 protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem();
106 protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem();
108 protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem();
110 protected JRadioButtonMenuItem userDefinedColour = new JRadioButtonMenuItem();
112 protected JRadioButtonMenuItem PIDColour = new JRadioButtonMenuItem();
114 protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem();
116 protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
118 protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem();
120 // protected JRadioButtonMenuItem covariationColour = new
121 // JRadioButtonMenuItem();
123 JMenuItem njTreeBlosumMenuItem = new JMenuItem();
125 JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem();
127 public JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
129 public JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
131 public JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
133 JMenuItem htmlMenuItem = new JMenuItem();
135 JMenuItem overviewMenuItem = new JMenuItem();
137 protected JMenuItem undoMenuItem = new JMenuItem();
139 protected JMenuItem redoMenuItem = new JMenuItem();
141 public JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
143 JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem();
145 public JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
147 JMenuItem printMenuItem = new JMenuItem();
149 public JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
151 JMenuItem findMenuItem = new JMenuItem();
153 public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem();
155 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
157 public JCheckBoxMenuItem showSeqFeaturesHeight = new JCheckBoxMenuItem();
159 JMenuItem deleteGroups = new JMenuItem();
161 JMenuItem delete = new JMenuItem();
163 JMenuItem copy = new JMenuItem();
165 JMenuItem cut = new JMenuItem();
167 JMenu pasteMenu = new JMenu();
169 JMenuItem pasteNew = new JMenuItem();
171 JMenuItem pasteThis = new JMenuItem();
173 public JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem();
175 JMenuItem createPNG = new JMenuItem();
177 protected JMenuItem font = new JMenuItem();
179 public JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
181 JMenuItem epsFile = new JMenuItem();
183 JMenuItem LoadtreeMenuItem = new JMenuItem();
185 public JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
187 public JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
189 public JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
191 protected JMenuItem modifyPID = new JMenuItem();
193 protected JMenuItem modifyConservation = new JMenuItem();
195 protected JMenu sortByTreeMenu = new JMenu();
197 protected JMenu sort = new JMenu();
199 protected JMenu calculateTree = new JMenu();
201 JMenu jMenu2 = new JMenu();
203 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
207 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
209 protected ButtonGroup colours = new ButtonGroup();
211 JMenuItem vamsasStore = new JMenuItem();
213 protected JMenuItem showTranslation = new JMenuItem();
215 protected JMenuItem extractScores = new JMenuItem();
217 protected JMenu showProducts = new JMenu();
219 public JMenuItem openFeatureSettings = new JMenuItem();
221 JMenuItem fetchSequence = new JMenuItem();
223 JMenuItem annotationColour = new JMenuItem();
225 protected JMenuItem rnahelicesColour = new JMenuItem();
227 JMenuItem associatedData = new JMenuItem();
229 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
231 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
233 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
235 JMenu addSequenceMenu = new JMenu();
237 JMenuItem addFromFile = new JMenuItem();
239 JMenuItem addFromText = new JMenuItem();
241 JMenuItem addFromURL = new JMenuItem();
243 JMenuItem exportAnnotations = new JMenuItem();
245 JMenuItem exportFeatures = new JMenuItem();
247 protected JPanel statusPanel = new JPanel();
249 GridLayout gridLayout1 = new GridLayout();
251 JMenu jMenu3 = new JMenu();
253 JMenuItem showAllSeqs = new JMenuItem();
255 JMenuItem showAllColumns = new JMenuItem();
257 JMenu hideMenu = new JMenu();
259 JMenuItem hideSelSequences = new JMenuItem();
261 JMenuItem hideSelColumns = new JMenuItem();
263 JMenuItem hideAllButSelection = new JMenuItem();
265 JMenuItem hideAllSelection = new JMenuItem();
267 JMenuItem showAllhidden = new JMenuItem();
269 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
271 JMenuItem invertColSel = new JMenuItem();
273 protected JTabbedPane tabbedPane = new JTabbedPane();
275 JMenuItem save = new JMenuItem();
277 protected JMenuItem reload = new JMenuItem();
279 JMenuItem newView = new JMenuItem();
281 JMenuItem textColour = new JMenuItem();
283 JMenu formatMenu = new JMenu();
285 JMenu selectMenu = new JMenu();
287 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
289 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
291 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
293 protected JMenuItem gatherViews = new JMenuItem();
295 protected JMenuItem expandViews = new JMenuItem();
297 JMenuItem pageSetup = new JMenuItem();
299 JMenuItem alignmentProperties = new JMenuItem();
301 JMenu tooltipSettingsMenu = new JMenu();
303 private JMenuItem justifyLeftMenuItem = new JMenuItem();
305 private JMenuItem justifyRightMenuItem = new JMenuItem();
307 JMenu autoAnnMenu = new JMenu();
309 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
311 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
313 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
315 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
317 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
319 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
321 private JMenuItem grpsFromSelection = new JMenuItem();
328 setJMenuBar(alignFrameMenuBar);
330 // dynamically fill save as menu with available formats
331 for (int i = 0; i < jalview.io.FormatAdapter.WRITEABLE_FORMATS.length; i++)
333 JMenuItem item = new JMenuItem(
334 jalview.io.FormatAdapter.WRITEABLE_FORMATS[i]);
336 item.addActionListener(new java.awt.event.ActionListener()
338 public void actionPerformed(ActionEvent e)
340 outputText_actionPerformed(e);
344 outputTextboxMenu.add(item);
346 } catch (Exception e)
350 if (!new jalview.util.Platform().isAMac())
352 closeMenuItem.setMnemonic('C');
353 outputTextboxMenu.setMnemonic('T');
354 undoMenuItem.setMnemonic('Z');
355 redoMenuItem.setMnemonic('0');
356 copy.setMnemonic('C');
357 cut.setMnemonic('U');
358 pasteMenu.setMnemonic('P');
359 reload.setMnemonic('R');
362 if (jalview.gui.UserDefinedColours.getUserColourSchemes() != null)
364 java.util.Enumeration userColours = jalview.gui.UserDefinedColours
365 .getUserColourSchemes().keys();
367 while (userColours.hasMoreElements())
369 final JRadioButtonMenuItem radioItem = new JRadioButtonMenuItem(
370 userColours.nextElement().toString());
371 radioItem.setName("USER_DEFINED");
372 radioItem.addMouseListener(new MouseAdapter()
374 public void mousePressed(MouseEvent evt)
376 if (evt.isControlDown()
377 || SwingUtilities.isRightMouseButton(evt))
379 radioItem.removeActionListener(radioItem.getActionListeners()[0]);
381 int option = JOptionPane.showInternalConfirmDialog(
382 jalview.gui.Desktop.desktop,
383 "Remove from default list?",
384 "Remove user defined colour",
385 JOptionPane.YES_NO_OPTION);
386 if (option == JOptionPane.YES_OPTION)
388 jalview.gui.UserDefinedColours
389 .removeColourFromDefaults(radioItem.getText());
390 colourMenu.remove(radioItem);
394 radioItem.addActionListener(new ActionListener()
396 public void actionPerformed(ActionEvent evt)
398 userDefinedColour_actionPerformed(evt);
405 radioItem.addActionListener(new ActionListener()
407 public void actionPerformed(ActionEvent evt)
409 userDefinedColour_actionPerformed(evt);
412 colourMenu.insert(radioItem, 15);
413 colours.add(radioItem);
416 colours.add(noColourmenuItem);
417 colours.add(clustalColour);
418 colours.add(zappoColour);
419 colours.add(taylorColour);
420 colours.add(hydrophobicityColour);
421 colours.add(helixColour);
422 colours.add(strandColour);
423 colours.add(turnColour);
424 colours.add(buriedColour);
425 colours.add(userDefinedColour);
426 colours.add(PIDColour);
427 colours.add(BLOSUM62Colour);
428 colours.add(nucleotideColour);
429 colours.add(purinePyrimidineColour);
430 // colours.add(covariationColour);
432 setColourSelected(jalview.bin.Cache
433 .getDefault("DEFAULT_COLOUR", "None"));
437 public void setColourSelected(String defaultColour)
440 if (defaultColour != null)
442 int index = ColourSchemeProperty
443 .getColourIndexFromName(defaultColour);
447 case ColourSchemeProperty.CLUSTAL:
448 clustalColour.setSelected(true);
452 case ColourSchemeProperty.BLOSUM:
453 BLOSUM62Colour.setSelected(true);
457 case ColourSchemeProperty.PID:
458 PIDColour.setSelected(true);
462 case ColourSchemeProperty.ZAPPO:
463 zappoColour.setSelected(true);
467 case ColourSchemeProperty.TAYLOR:
468 taylorColour.setSelected(true);
471 case ColourSchemeProperty.HYDROPHOBIC:
472 hydrophobicityColour.setSelected(true);
476 case ColourSchemeProperty.HELIX:
477 helixColour.setSelected(true);
481 case ColourSchemeProperty.STRAND:
482 strandColour.setSelected(true);
486 case ColourSchemeProperty.TURN:
487 turnColour.setSelected(true);
491 case ColourSchemeProperty.BURIED:
492 buriedColour.setSelected(true);
496 case ColourSchemeProperty.NUCLEOTIDE:
497 nucleotideColour.setSelected(true);
501 case ColourSchemeProperty.PURINEPYRIMIDINE:
502 purinePyrimidineColour.setSelected(true);
506 * case ColourSchemeProperty.COVARIATION:
507 * covariationColour.setSelected(true);
511 case ColourSchemeProperty.USER_DEFINED:
512 userDefinedColour.setSelected(true);
515 case ColourSchemeProperty.NONE:
517 noColourmenuItem.setSelected(true);
525 private void jbInit() throws Exception
527 fileMenu.setText("File");
528 saveAs.setText("Save As...");
529 saveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
530 java.awt.event.KeyEvent.VK_S, Toolkit.getDefaultToolkit()
531 .getMenuShortcutKeyMask()
532 | java.awt.event.KeyEvent.SHIFT_MASK, false));
533 saveAs.addActionListener(new ActionListener()
535 public void actionPerformed(ActionEvent e)
537 saveAs_actionPerformed(e);
540 closeMenuItem.setText("Close");
541 closeMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
542 java.awt.event.KeyEvent.VK_W, Toolkit.getDefaultToolkit()
543 .getMenuShortcutKeyMask(), false));
544 closeMenuItem.addActionListener(new java.awt.event.ActionListener()
546 public void actionPerformed(ActionEvent e)
548 closeMenuItem_actionPerformed(false);
551 editMenu.setText("Edit");
552 viewMenu.setText("View");
553 colourMenu.setText("Colour");
554 calculateMenu.setText("Calculate");
555 webService.setText("Web Service");
556 selectAllSequenceMenuItem.setText("Select All");
557 selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke
558 .getKeyStroke(java.awt.event.KeyEvent.VK_A, Toolkit
559 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
560 selectAllSequenceMenuItem
561 .addActionListener(new java.awt.event.ActionListener()
563 public void actionPerformed(ActionEvent e)
565 selectAllSequenceMenuItem_actionPerformed(e);
568 deselectAllSequenceMenuItem.setText("Deselect All");
569 deselectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke
570 .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0, false));
571 deselectAllSequenceMenuItem
572 .addActionListener(new java.awt.event.ActionListener()
574 public void actionPerformed(ActionEvent e)
576 deselectAllSequenceMenuItem_actionPerformed(e);
579 invertSequenceMenuItem.setText("Invert Sequence Selection");
580 invertSequenceMenuItem.setAccelerator(javax.swing.KeyStroke
581 .getKeyStroke(java.awt.event.KeyEvent.VK_I, Toolkit
582 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
583 invertSequenceMenuItem
584 .addActionListener(new java.awt.event.ActionListener()
586 public void actionPerformed(ActionEvent e)
588 invertSequenceMenuItem_actionPerformed(e);
591 grpsFromSelection.setText("Make Groups for selection");
592 grpsFromSelection.addActionListener(new java.awt.event.ActionListener()
594 public void actionPerformed(ActionEvent e)
596 makeGrpsFromSelection_actionPerformed(e);
600 remove2LeftMenuItem.setText("Remove Left");
601 remove2LeftMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
602 java.awt.event.KeyEvent.VK_L, Toolkit.getDefaultToolkit()
603 .getMenuShortcutKeyMask(), false));
605 .addActionListener(new java.awt.event.ActionListener()
607 public void actionPerformed(ActionEvent e)
609 remove2LeftMenuItem_actionPerformed(e);
612 remove2RightMenuItem.setText("Remove Right");
613 remove2RightMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
614 java.awt.event.KeyEvent.VK_R, Toolkit.getDefaultToolkit()
615 .getMenuShortcutKeyMask(), false));
617 .addActionListener(new java.awt.event.ActionListener()
619 public void actionPerformed(ActionEvent e)
621 remove2RightMenuItem_actionPerformed(e);
624 removeGappedColumnMenuItem.setText("Remove Empty Columns");
625 removeGappedColumnMenuItem.setAccelerator(javax.swing.KeyStroke
626 .getKeyStroke(java.awt.event.KeyEvent.VK_E, Toolkit
627 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
628 removeGappedColumnMenuItem
629 .addActionListener(new java.awt.event.ActionListener()
631 public void actionPerformed(ActionEvent e)
633 removeGappedColumnMenuItem_actionPerformed(e);
636 removeAllGapsMenuItem.setText("Remove All Gaps");
637 removeAllGapsMenuItem.setAccelerator(javax.swing.KeyStroke
638 .getKeyStroke(java.awt.event.KeyEvent.VK_E, Toolkit
639 .getDefaultToolkit().getMenuShortcutKeyMask()
640 | java.awt.event.KeyEvent.SHIFT_MASK, false));
641 removeAllGapsMenuItem
642 .addActionListener(new java.awt.event.ActionListener()
644 public void actionPerformed(ActionEvent e)
646 removeAllGapsMenuItem_actionPerformed(e);
649 justifyLeftMenuItem.setText("Left Justify Alignment");
651 .addActionListener(new java.awt.event.ActionListener()
653 public void actionPerformed(ActionEvent e)
655 justifyLeftMenuItem_actionPerformed(e);
658 justifyRightMenuItem.setText("Right Justify Alignment");
660 .addActionListener(new java.awt.event.ActionListener()
662 public void actionPerformed(ActionEvent e)
664 justifyRightMenuItem_actionPerformed(e);
667 viewBoxesMenuItem.setText("Boxes");
668 viewBoxesMenuItem.setState(true);
669 viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener()
671 public void actionPerformed(ActionEvent e)
673 viewBoxesMenuItem_actionPerformed(e);
676 viewTextMenuItem.setText("Text");
677 viewTextMenuItem.setState(true);
678 viewTextMenuItem.addActionListener(new java.awt.event.ActionListener()
680 public void actionPerformed(ActionEvent e)
682 viewTextMenuItem_actionPerformed(e);
685 showNonconservedMenuItem.setText("Show nonconserved");
686 showNonconservedMenuItem.setState(false);
687 showNonconservedMenuItem
688 .addActionListener(new java.awt.event.ActionListener()
690 public void actionPerformed(ActionEvent e)
692 showUnconservedMenuItem_actionPerformed(e);
695 sortPairwiseMenuItem.setText("by Pairwise Identity");
697 .addActionListener(new java.awt.event.ActionListener()
699 public void actionPerformed(ActionEvent e)
701 sortPairwiseMenuItem_actionPerformed(e);
704 sortIDMenuItem.setText("by ID");
705 sortIDMenuItem.addActionListener(new java.awt.event.ActionListener()
707 public void actionPerformed(ActionEvent e)
709 sortIDMenuItem_actionPerformed(e);
712 sortLengthMenuItem.setText("By Length");
714 .addActionListener(new java.awt.event.ActionListener()
716 public void actionPerformed(ActionEvent e)
718 sortLengthMenuItem_actionPerformed(e);
721 sortGroupMenuItem.setText("by Group");
722 sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
724 public void actionPerformed(ActionEvent e)
726 sortGroupMenuItem_actionPerformed(e);
729 removeRedundancyMenuItem.setText("Remove Redundancy...");
730 removeRedundancyMenuItem.setAccelerator(javax.swing.KeyStroke
731 .getKeyStroke(java.awt.event.KeyEvent.VK_D, Toolkit
732 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
733 removeRedundancyMenuItem
734 .addActionListener(new java.awt.event.ActionListener()
736 public void actionPerformed(ActionEvent e)
738 removeRedundancyMenuItem_actionPerformed(e);
741 pairwiseAlignmentMenuItem.setText("Pairwise Alignments...");
742 pairwiseAlignmentMenuItem
743 .addActionListener(new java.awt.event.ActionListener()
745 public void actionPerformed(ActionEvent e)
747 pairwiseAlignmentMenuItem_actionPerformed(e);
750 PCAMenuItem.setText("Principal Component Analysis");
751 PCAMenuItem.addActionListener(new java.awt.event.ActionListener()
753 public void actionPerformed(ActionEvent e)
755 PCAMenuItem_actionPerformed(e);
758 averageDistanceTreeMenuItem
759 .setText("Average Distance Using % Identity");
760 averageDistanceTreeMenuItem
761 .addActionListener(new java.awt.event.ActionListener()
763 public void actionPerformed(ActionEvent e)
765 averageDistanceTreeMenuItem_actionPerformed(e);
768 neighbourTreeMenuItem.setText("Neighbour Joining Using % Identity");
769 neighbourTreeMenuItem
770 .addActionListener(new java.awt.event.ActionListener()
772 public void actionPerformed(ActionEvent e)
774 neighbourTreeMenuItem_actionPerformed(e);
777 this.getContentPane().setLayout(borderLayout1);
778 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
779 statusBar.setBackground(Color.white);
780 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
781 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
782 statusBar.setText("Status bar");
783 outputTextboxMenu.setText("Output to Textbox");
784 clustalColour.setText("Clustalx");
786 clustalColour.addActionListener(new java.awt.event.ActionListener()
788 public void actionPerformed(ActionEvent e)
790 clustalColour_actionPerformed(e);
793 zappoColour.setText("Zappo");
794 zappoColour.addActionListener(new java.awt.event.ActionListener()
796 public void actionPerformed(ActionEvent e)
798 zappoColour_actionPerformed(e);
801 taylorColour.setText("Taylor");
802 taylorColour.addActionListener(new java.awt.event.ActionListener()
804 public void actionPerformed(ActionEvent e)
806 taylorColour_actionPerformed(e);
809 hydrophobicityColour.setText("Hydrophobicity");
811 .addActionListener(new java.awt.event.ActionListener()
813 public void actionPerformed(ActionEvent e)
815 hydrophobicityColour_actionPerformed(e);
818 helixColour.setText("Helix Propensity");
819 helixColour.addActionListener(new java.awt.event.ActionListener()
821 public void actionPerformed(ActionEvent e)
823 helixColour_actionPerformed(e);
826 strandColour.setText("Strand Propensity");
827 strandColour.addActionListener(new java.awt.event.ActionListener()
829 public void actionPerformed(ActionEvent e)
831 strandColour_actionPerformed(e);
834 turnColour.setText("Turn Propensity");
835 turnColour.addActionListener(new java.awt.event.ActionListener()
837 public void actionPerformed(ActionEvent e)
839 turnColour_actionPerformed(e);
842 buriedColour.setText("Buried Index");
843 buriedColour.addActionListener(new java.awt.event.ActionListener()
845 public void actionPerformed(ActionEvent e)
847 buriedColour_actionPerformed(e);
850 userDefinedColour.setText("User Defined...");
851 userDefinedColour.addActionListener(new java.awt.event.ActionListener()
853 public void actionPerformed(ActionEvent e)
855 userDefinedColour_actionPerformed(e);
858 PIDColour.setText("Percentage Identity");
859 PIDColour.addActionListener(new java.awt.event.ActionListener()
861 public void actionPerformed(ActionEvent e)
863 PIDColour_actionPerformed(e);
866 BLOSUM62Colour.setText("BLOSUM62 Score");
867 BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener()
869 public void actionPerformed(ActionEvent e)
871 BLOSUM62Colour_actionPerformed(e);
874 nucleotideColour.setText("Nucleotide");
875 nucleotideColour.addActionListener(new java.awt.event.ActionListener()
877 public void actionPerformed(ActionEvent e)
879 nucleotideColour_actionPerformed(e);
883 purinePyrimidineColour.setText("Purine/Pyrimidine");
884 purinePyrimidineColour
885 .addActionListener(new java.awt.event.ActionListener()
887 public void actionPerformed(ActionEvent e)
889 purinePyrimidineColour_actionPerformed(e);
893 * covariationColour.setText("Covariation");
894 * covariationColour.addActionListener(new java.awt.event.ActionListener() {
895 * public void actionPerformed(ActionEvent e) {
896 * covariationColour_actionPerformed(e); } });
899 avDistanceTreeBlosumMenuItem.setText("Average Distance Using BLOSUM62");
900 avDistanceTreeBlosumMenuItem
901 .addActionListener(new java.awt.event.ActionListener()
903 public void actionPerformed(ActionEvent e)
905 avTreeBlosumMenuItem_actionPerformed(e);
908 njTreeBlosumMenuItem.setText("Neighbour Joining using BLOSUM62");
910 .addActionListener(new java.awt.event.ActionListener()
912 public void actionPerformed(ActionEvent e)
914 njTreeBlosumMenuItem_actionPerformed(e);
917 annotationPanelMenuItem.setActionCommand("");
918 annotationPanelMenuItem.setText("Show Annotations");
919 annotationPanelMenuItem.setState(jalview.bin.Cache.getDefault(
920 "SHOW_ANNOTATIONS", true));
921 annotationPanelMenuItem
922 .addActionListener(new java.awt.event.ActionListener()
924 public void actionPerformed(ActionEvent e)
926 annotationPanelMenuItem_actionPerformed(e);
929 colourTextMenuItem.setText("Colour Text");
931 .addActionListener(new java.awt.event.ActionListener()
933 public void actionPerformed(ActionEvent e)
935 colourTextMenuItem_actionPerformed(e);
938 htmlMenuItem.setText("HTML");
939 htmlMenuItem.addActionListener(new java.awt.event.ActionListener()
941 public void actionPerformed(ActionEvent e)
943 htmlMenuItem_actionPerformed(e);
946 overviewMenuItem.setText("Overview Window");
947 overviewMenuItem.addActionListener(new java.awt.event.ActionListener()
949 public void actionPerformed(ActionEvent e)
951 overviewMenuItem_actionPerformed(e);
954 undoMenuItem.setEnabled(false);
955 undoMenuItem.setText("Undo");
956 undoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
957 java.awt.event.KeyEvent.VK_Z, Toolkit.getDefaultToolkit()
958 .getMenuShortcutKeyMask(), false));
959 undoMenuItem.addActionListener(new java.awt.event.ActionListener()
961 public void actionPerformed(ActionEvent e)
963 undoMenuItem_actionPerformed(e);
966 redoMenuItem.setEnabled(false);
967 redoMenuItem.setText("Redo");
968 redoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
969 java.awt.event.KeyEvent.VK_Y, Toolkit.getDefaultToolkit()
970 .getMenuShortcutKeyMask(), false));
971 redoMenuItem.addActionListener(new java.awt.event.ActionListener()
973 public void actionPerformed(ActionEvent e)
975 redoMenuItem_actionPerformed(e);
978 conservationMenuItem.setText("By Conservation");
980 .addActionListener(new java.awt.event.ActionListener()
982 public void actionPerformed(ActionEvent e)
984 conservationMenuItem_actionPerformed(e);
987 noColourmenuItem.setText("None");
988 noColourmenuItem.addActionListener(new java.awt.event.ActionListener()
990 public void actionPerformed(ActionEvent e)
992 noColourmenuItem_actionPerformed(e);
995 wrapMenuItem.setText("Wrap");
996 wrapMenuItem.addActionListener(new java.awt.event.ActionListener()
998 public void actionPerformed(ActionEvent e)
1000 wrapMenuItem_actionPerformed(e);
1003 printMenuItem.setText("Print ...");
1004 printMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1005 java.awt.event.KeyEvent.VK_P, Toolkit.getDefaultToolkit()
1006 .getMenuShortcutKeyMask(), false));
1007 printMenuItem.addActionListener(new java.awt.event.ActionListener()
1009 public void actionPerformed(ActionEvent e)
1011 printMenuItem_actionPerformed(e);
1014 renderGapsMenuItem.setText("Show Gaps");
1015 renderGapsMenuItem.setState(true);
1017 .addActionListener(new java.awt.event.ActionListener()
1019 public void actionPerformed(ActionEvent e)
1021 renderGapsMenuItem_actionPerformed(e);
1024 findMenuItem.setText("Find...");
1025 findMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1026 java.awt.event.KeyEvent.VK_F, Toolkit.getDefaultToolkit()
1027 .getMenuShortcutKeyMask(), false));
1028 findMenuItem.addActionListener(new java.awt.event.ActionListener()
1030 public void actionPerformed(ActionEvent e)
1032 findMenuItem_actionPerformed(e);
1035 abovePIDThreshold.setText("Above Identity Threshold");
1036 abovePIDThreshold.addActionListener(new java.awt.event.ActionListener()
1038 public void actionPerformed(ActionEvent e)
1040 abovePIDThreshold_actionPerformed(e);
1043 showSeqFeatures.setText("Show Sequence Features");
1044 showSeqFeatures.addActionListener(new ActionListener()
1046 public void actionPerformed(ActionEvent actionEvent)
1048 showSeqFeatures_actionPerformed(actionEvent);
1052 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
1053 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
1054 * void actionPerformed(ActionEvent actionEvent) {
1055 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
1057 showDbRefsMenuitem.setText("Show Database Refs");
1058 showDbRefsMenuitem.addActionListener(new ActionListener()
1061 public void actionPerformed(ActionEvent e)
1063 showDbRefs_actionPerformed(e);
1067 showNpFeatsMenuitem.setText("Show Non-Positional Features");
1068 showNpFeatsMenuitem.addActionListener(new ActionListener()
1071 public void actionPerformed(ActionEvent e)
1073 showNpFeats_actionPerformed(e);
1077 showGroupConservation.setText("Group Conservation");
1078 showGroupConservation.addActionListener(new ActionListener()
1081 public void actionPerformed(ActionEvent e)
1083 showGroupConservation_actionPerformed(e);
1088 showGroupConsensus.setText("Group Consensus");
1089 showGroupConsensus.addActionListener(new ActionListener()
1092 public void actionPerformed(ActionEvent e)
1094 showGroupConsensus_actionPerformed(e);
1098 showConsensusHistogram.setText("Show Consensus Histogram");
1099 showConsensusHistogram.addActionListener(new ActionListener()
1102 public void actionPerformed(ActionEvent e)
1104 showConsensusHistogram_actionPerformed(e);
1108 showSequenceLogo.setText("Show Consensus Logo");
1109 showSequenceLogo.addActionListener(new ActionListener()
1112 public void actionPerformed(ActionEvent e)
1114 showSequenceLogo_actionPerformed(e);
1118 normaliseSequenceLogo.setText("Normalise Consensus Logo");
1119 normaliseSequenceLogo.addActionListener(new ActionListener()
1122 public void actionPerformed(ActionEvent e)
1124 normaliseSequenceLogo_actionPerformed(e);
1128 applyAutoAnnotationSettings.setText("Apply to all groups");
1129 applyAutoAnnotationSettings.setState(false);
1130 applyAutoAnnotationSettings.setVisible(true);
1131 applyAutoAnnotationSettings.addActionListener(new ActionListener()
1134 public void actionPerformed(ActionEvent e)
1136 applyAutoAnnotationSettings_actionPerformed(e);
1141 nucleotideColour.setText("Nucleotide");
1142 nucleotideColour.addActionListener(new java.awt.event.ActionListener()
1144 public void actionPerformed(ActionEvent e)
1146 nucleotideColour_actionPerformed(e);
1149 deleteGroups.setText("Undefine groups");
1150 deleteGroups.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1151 java.awt.event.KeyEvent.VK_U, Toolkit.getDefaultToolkit()
1152 .getMenuShortcutKeyMask(), false));
1153 deleteGroups.addActionListener(new java.awt.event.ActionListener()
1155 public void actionPerformed(ActionEvent e)
1157 deleteGroups_actionPerformed(e);
1160 copy.setText("Copy");
1161 copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1162 java.awt.event.KeyEvent.VK_C, Toolkit.getDefaultToolkit()
1163 .getMenuShortcutKeyMask(), false));
1165 copy.addActionListener(new java.awt.event.ActionListener()
1167 public void actionPerformed(ActionEvent e)
1169 copy_actionPerformed(e);
1173 cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1174 java.awt.event.KeyEvent.VK_X, Toolkit.getDefaultToolkit()
1175 .getMenuShortcutKeyMask(), false));
1176 cut.addActionListener(new java.awt.event.ActionListener()
1178 public void actionPerformed(ActionEvent e)
1180 cut_actionPerformed(e);
1183 delete.setText("Delete");
1184 delete.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1185 java.awt.event.KeyEvent.VK_BACK_SPACE, 0, false));
1186 delete.addActionListener(new java.awt.event.ActionListener()
1188 public void actionPerformed(ActionEvent e)
1190 delete_actionPerformed(e);
1193 pasteMenu.setText("Paste");
1194 pasteNew.setText("To New Alignment");
1195 pasteNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1196 java.awt.event.KeyEvent.VK_V, Toolkit.getDefaultToolkit()
1197 .getMenuShortcutKeyMask()
1198 | java.awt.event.KeyEvent.SHIFT_MASK, false));
1199 pasteNew.addActionListener(new java.awt.event.ActionListener()
1201 public void actionPerformed(ActionEvent e)
1203 pasteNew_actionPerformed(e);
1206 pasteThis.setText("Add To This Alignment");
1207 pasteThis.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1208 java.awt.event.KeyEvent.VK_V, Toolkit.getDefaultToolkit()
1209 .getMenuShortcutKeyMask(), false));
1210 pasteThis.addActionListener(new java.awt.event.ActionListener()
1212 public void actionPerformed(ActionEvent e)
1214 pasteThis_actionPerformed(e);
1217 applyToAllGroups.setText("Apply Colour To All Groups");
1218 applyToAllGroups.addActionListener(new java.awt.event.ActionListener()
1220 public void actionPerformed(ActionEvent e)
1222 applyToAllGroups_actionPerformed(e);
1225 createPNG.addActionListener(new java.awt.event.ActionListener()
1227 public void actionPerformed(ActionEvent e)
1232 createPNG.setActionCommand("Save As PNG Image");
1233 createPNG.setText("PNG");
1234 font.setText("Font...");
1235 font.addActionListener(new java.awt.event.ActionListener()
1237 public void actionPerformed(ActionEvent e)
1239 font_actionPerformed(e);
1243 seqLimits.setText("Show Sequence Limits");
1244 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1245 seqLimits.addActionListener(new java.awt.event.ActionListener()
1247 public void actionPerformed(ActionEvent e)
1249 seqLimit_actionPerformed(e);
1252 epsFile.setText("EPS");
1253 epsFile.addActionListener(new java.awt.event.ActionListener()
1255 public void actionPerformed(ActionEvent e)
1260 LoadtreeMenuItem.setActionCommand("Load a tree for this sequence set");
1261 LoadtreeMenuItem.setText("Load Associated Tree");
1262 LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener()
1264 public void actionPerformed(ActionEvent e)
1266 LoadtreeMenuItem_actionPerformed(e);
1269 scaleAbove.setVisible(false);
1270 scaleAbove.setText("Scale Above");
1271 scaleAbove.addActionListener(new java.awt.event.ActionListener()
1273 public void actionPerformed(ActionEvent e)
1275 scaleAbove_actionPerformed(e);
1278 scaleLeft.setVisible(false);
1279 scaleLeft.setSelected(true);
1280 scaleLeft.setText("Scale Left");
1281 scaleLeft.addActionListener(new java.awt.event.ActionListener()
1283 public void actionPerformed(ActionEvent e)
1285 scaleLeft_actionPerformed(e);
1288 scaleRight.setVisible(false);
1289 scaleRight.setSelected(true);
1290 scaleRight.setText("Scale Right");
1291 scaleRight.addActionListener(new java.awt.event.ActionListener()
1293 public void actionPerformed(ActionEvent e)
1295 scaleRight_actionPerformed(e);
1298 centreColumnLabelsMenuItem.setVisible(true);
1299 centreColumnLabelsMenuItem.setState(false);
1300 centreColumnLabelsMenuItem.setText("Centre Column Labels");
1301 centreColumnLabelsMenuItem
1302 .addActionListener(new java.awt.event.ActionListener()
1304 public void actionPerformed(ActionEvent e)
1306 centreColumnLabels_actionPerformed(e);
1309 followHighlightMenuItem.setVisible(true);
1310 followHighlightMenuItem.setState(true);
1311 followHighlightMenuItem.setText("Automatic Scrolling");
1312 followHighlightMenuItem.addActionListener(new ActionListener()
1315 public void actionPerformed(ActionEvent e)
1317 followHighlight_actionPerformed();
1322 modifyPID.setText("Modify Identity Threshold...");
1323 modifyPID.addActionListener(new java.awt.event.ActionListener()
1325 public void actionPerformed(ActionEvent e)
1327 modifyPID_actionPerformed(e);
1330 modifyConservation.setText("Modify Conservation Threshold...");
1332 .addActionListener(new java.awt.event.ActionListener()
1334 public void actionPerformed(ActionEvent e)
1336 modifyConservation_actionPerformed(e);
1339 sortByTreeMenu.setText("By Tree Order");
1340 sort.setText("Sort");
1341 sort.addMenuListener(new MenuListener()
1343 public void menuSelected(MenuEvent e)
1348 public void menuDeselected(MenuEvent e)
1352 public void menuCanceled(MenuEvent e)
1356 sortByAnnotScore.setText("by Score");
1357 sort.add(sortByAnnotScore);
1358 sortByAnnotScore.addMenuListener(new javax.swing.event.MenuListener()
1361 public void menuCanceled(MenuEvent e)
1365 public void menuDeselected(MenuEvent e)
1369 public void menuSelected(MenuEvent e)
1371 buildSortByAnnotationScoresMenu();
1374 sortByAnnotScore.setVisible(false);
1376 calculateTree.setText("Calculate Tree");
1378 jMenu2.setText("Export Image");
1379 padGapsMenuitem.setText("Pad Gaps");
1380 padGapsMenuitem.setState(jalview.bin.Cache
1381 .getDefault("PAD_GAPS", false));
1382 padGapsMenuitem.addActionListener(new ActionListener()
1384 public void actionPerformed(ActionEvent e)
1386 padGapsMenuitem_actionPerformed(e);
1389 vamsasStore.setVisible(false);
1390 vamsasStore.setText("VAMSAS store");
1391 vamsasStore.addActionListener(new ActionListener()
1393 public void actionPerformed(ActionEvent e)
1395 vamsasStore_actionPerformed(e);
1398 showTranslation.setText("Translate cDNA");
1399 showTranslation.addActionListener(new ActionListener()
1401 public void actionPerformed(ActionEvent e)
1403 showTranslation_actionPerformed(e);
1406 extractScores.setText("Extract Scores...");
1407 extractScores.addActionListener(new ActionListener()
1409 public void actionPerformed(ActionEvent e)
1411 extractScores_actionPerformed(e);
1414 extractScores.setVisible(true); // JBPNote: TODO: make gui for regex based
1416 showProducts.setText("Get Cross References");
1418 * showProducts.addActionListener(new ActionListener() {
1420 * public void actionPerformed(ActionEvent e) {
1421 * showProducts_actionPerformed(e); } });
1423 openFeatureSettings.setText("Feature Settings...");
1424 openFeatureSettings.addActionListener(new ActionListener()
1426 public void actionPerformed(ActionEvent e)
1428 featureSettings_actionPerformed(e);
1431 fetchSequence.setText("Fetch Sequence(s)...");
1432 fetchSequence.addActionListener(new ActionListener()
1434 public void actionPerformed(ActionEvent e)
1436 fetchSequence_actionPerformed(e);
1440 annotationColour.setText("By Annotation...");
1441 annotationColour.addActionListener(new ActionListener()
1443 public void actionPerformed(ActionEvent e)
1445 annotationColour_actionPerformed(e);
1449 rnahelicesColour.setText("By RNA helices");
1450 rnahelicesColour.addActionListener(new ActionListener()
1452 public void actionPerformed(ActionEvent e)
1454 rnahelicesColour_actionPerformed(e);
1458 associatedData.setText("Load Features / Annotations");
1459 associatedData.addActionListener(new ActionListener()
1461 public void actionPerformed(ActionEvent e)
1463 associatedData_actionPerformed(e);
1466 autoCalculate.setText("Autocalculate Consensus");
1467 autoCalculate.setState(jalview.bin.Cache.getDefault(
1468 "AUTO_CALC_CONSENSUS", true));
1469 autoCalculate.addActionListener(new ActionListener()
1471 public void actionPerformed(ActionEvent e)
1473 autoCalculate_actionPerformed(e);
1476 sortByTree.setText("Sort Alignment With New Tree");
1477 sortByTree.setToolTipText("<html>Enable this to automatically sort<br>the alignment when you open<br> a new tree.");
1478 sortByTree.setState(jalview.bin.Cache.getDefault(
1479 "SORT_BY_TREE", false));
1480 sortByTree.addActionListener(new ActionListener()
1482 public void actionPerformed(ActionEvent e)
1484 sortByTreeOption_actionPerformed(e);
1488 listenToViewSelections.setText("Listen for selections");
1489 listenToViewSelections.setToolTipText("<html>When selected, selections in this view will mirror<br>selections made on the same sequences in other views.");
1490 listenToViewSelections.setState(false);
1491 listenToViewSelections.addActionListener(new ActionListener()
1493 public void actionPerformed(ActionEvent e)
1495 listenToViewSelections_actionPerformed(e);
1499 addSequenceMenu.setText("Add Sequences");
1500 addFromFile.setText("From File");
1501 addFromFile.addActionListener(new ActionListener()
1503 public void actionPerformed(ActionEvent e)
1505 addFromFile_actionPerformed(e);
1508 addFromText.setText("From Textbox");
1509 addFromText.addActionListener(new ActionListener()
1511 public void actionPerformed(ActionEvent e)
1513 addFromText_actionPerformed(e);
1516 addFromURL.setText("From URL");
1517 addFromURL.addActionListener(new ActionListener()
1519 public void actionPerformed(ActionEvent e)
1521 addFromURL_actionPerformed(e);
1524 exportFeatures.setText("Export Features...");
1525 exportFeatures.addActionListener(new ActionListener()
1527 public void actionPerformed(ActionEvent e)
1529 exportFeatures_actionPerformed(e);
1532 exportAnnotations.setText("Export Annotations...");
1533 exportAnnotations.addActionListener(new ActionListener()
1535 public void actionPerformed(ActionEvent e)
1537 exportAnnotations_actionPerformed(e);
1540 statusPanel.setLayout(gridLayout1);
1541 jMenu3.setText("Show");
1542 showAllSeqs.setText("All Sequences");
1543 showAllSeqs.setToolTipText("Shift+H toggles sequence visiblity.");
1544 showAllSeqs.addActionListener(new ActionListener()
1546 public void actionPerformed(ActionEvent e)
1548 showAllSeqs_actionPerformed(e);
1551 showAllColumns.setText("All Columns");
1552 showAllColumns.setToolTipText("Ctrl+H toggles column visiblity.");
1553 showAllColumns.addActionListener(new ActionListener()
1555 public void actionPerformed(ActionEvent e)
1557 showAllColumns_actionPerformed(e);
1560 hideMenu.setText("Hide");
1561 hideSelSequences.setText("Selected Sequences");
1562 hideSelSequences.setToolTipText("Shift+H toggles sequence visiblity.");
1563 hideSelSequences.addActionListener(new ActionListener()
1565 public void actionPerformed(ActionEvent e)
1567 hideSelSequences_actionPerformed(e);
1570 hideSelColumns.setText("Selected Columns");
1571 hideSelColumns.setToolTipText("Ctrl+H toggles column visiblity.");
1572 hideSelColumns.addActionListener(new ActionListener()
1574 public void actionPerformed(ActionEvent e)
1576 hideSelColumns_actionPerformed(e);
1579 hideAllSelection.setText("Selected Region");
1580 hideAllSelection.addActionListener(new ActionListener()
1582 public void actionPerformed(ActionEvent e)
1584 hideAllSelection_actionPerformed(e);
1587 // TODO: should be hidden if no selection exists.
1588 hideAllButSelection.setText("All but Selected Region (Shift+Ctrl+H)");
1589 hideAllButSelection.addActionListener(new ActionListener()
1591 public void actionPerformed(ActionEvent e)
1593 hideAllButSelection_actionPerformed(e);
1596 showAllhidden.setText("All Sequences and Columns");
1598 .setToolTipText("H toggles visibility of hidden or selected regions.");
1599 showAllhidden.addActionListener(new ActionListener()
1601 public void actionPerformed(ActionEvent e)
1603 showAllhidden_actionPerformed(e);
1607 hiddenMarkers.setText("Show Hidden Markers");
1608 hiddenMarkers.addActionListener(new ActionListener()
1610 public void actionPerformed(ActionEvent e)
1612 hiddenMarkers_actionPerformed(e);
1615 invertColSel.setText("Invert Column Selection");
1616 invertColSel.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1617 java.awt.event.KeyEvent.VK_I, Toolkit.getDefaultToolkit()
1618 .getMenuShortcutKeyMask()
1619 | java.awt.event.KeyEvent.ALT_MASK, false));
1620 invertColSel.addActionListener(new ActionListener()
1622 public void actionPerformed(ActionEvent e)
1624 invertColSel_actionPerformed(e);
1627 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1629 public void stateChanged(ChangeEvent evt)
1631 JTabbedPane pane = (JTabbedPane) evt.getSource();
1632 int sel = pane.getSelectedIndex();
1633 tabSelectionChanged(sel);
1636 tabbedPane.addMouseListener(new MouseAdapter()
1638 public void mousePressed(MouseEvent e)
1640 tabbedPane_mousePressed(e);
1643 tabbedPane.addFocusListener(new FocusAdapter()
1645 public void focusGained(FocusEvent e)
1647 tabbedPane_focusGained(e);
1650 save.setText("Save");
1651 save.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1652 java.awt.event.KeyEvent.VK_S, Toolkit.getDefaultToolkit()
1653 .getMenuShortcutKeyMask(), false));
1654 save.addActionListener(new ActionListener()
1656 public void actionPerformed(ActionEvent e)
1658 save_actionPerformed(e);
1661 reload.setEnabled(false);
1662 reload.setText("Reload");
1663 reload.addActionListener(new ActionListener()
1665 public void actionPerformed(ActionEvent e)
1667 reload_actionPerformed(e);
1670 newView.setText("New View");
1671 newView.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1672 java.awt.event.KeyEvent.VK_T, Toolkit.getDefaultToolkit()
1673 .getMenuShortcutKeyMask(), false));
1674 newView.addActionListener(new ActionListener()
1676 public void actionPerformed(ActionEvent e)
1678 newView_actionPerformed(e);
1681 tabbedPane.setToolTipText("<html><i> Right-click to rename tab"
1682 + "<br> Press X to eXpand tabs, G to reGroup.</i></html>");
1683 textColour.setText("Colour Text ...");
1684 textColour.addActionListener(new ActionListener()
1686 public void actionPerformed(ActionEvent e)
1688 textColour_actionPerformed(e);
1691 formatMenu.setText("Format");
1692 selectMenu.setText("Select");
1693 idRightAlign.setText("Right Align Sequence Id");
1694 idRightAlign.addActionListener(new ActionListener()
1696 public void actionPerformed(ActionEvent e)
1698 idRightAlign_actionPerformed(e);
1701 gatherViews.setEnabled(false);
1702 gatherViews.setText("Gather Views");
1703 gatherViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1704 java.awt.event.KeyEvent.VK_G, 0, false));
1705 gatherViews.addActionListener(new ActionListener()
1707 public void actionPerformed(ActionEvent e)
1709 gatherViews_actionPerformed(e);
1712 expandViews.setEnabled(false);
1713 expandViews.setText("Expand Views");
1714 expandViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1715 java.awt.event.KeyEvent.VK_X, 0, false));
1716 expandViews.addActionListener(new ActionListener()
1718 public void actionPerformed(ActionEvent e)
1720 expandViews_actionPerformed(e);
1723 pageSetup.setText("Page Setup ...");
1724 pageSetup.addActionListener(new ActionListener()
1726 public void actionPerformed(ActionEvent e)
1728 pageSetup_actionPerformed(e);
1731 alignmentProperties.setText("Alignment Properties...");
1732 alignmentProperties.addActionListener(new ActionListener()
1734 public void actionPerformed(ActionEvent actionEvent)
1736 alignmentProperties();
1739 tooltipSettingsMenu.setText("Sequence ID Tooltip");
1740 autoAnnMenu.setText("Autocalculated Annotation");
1741 alignFrameMenuBar.add(fileMenu);
1742 alignFrameMenuBar.add(editMenu);
1743 alignFrameMenuBar.add(selectMenu);
1744 alignFrameMenuBar.add(viewMenu);
1745 alignFrameMenuBar.add(formatMenu);
1746 alignFrameMenuBar.add(colourMenu);
1747 alignFrameMenuBar.add(calculateMenu);
1748 alignFrameMenuBar.add(webService);
1749 fileMenu.add(fetchSequence);
1750 fileMenu.add(addSequenceMenu);
1751 fileMenu.add(reload);
1752 fileMenu.addSeparator();
1753 fileMenu.add(vamsasStore);
1755 fileMenu.add(saveAs);
1756 fileMenu.add(outputTextboxMenu);
1757 fileMenu.add(pageSetup);
1758 fileMenu.add(printMenuItem);
1759 fileMenu.addSeparator();
1760 fileMenu.add(jMenu2);
1761 fileMenu.add(exportFeatures);
1762 fileMenu.add(exportAnnotations);
1763 fileMenu.add(LoadtreeMenuItem);
1764 fileMenu.add(associatedData);
1765 fileMenu.addSeparator();
1766 fileMenu.add(closeMenuItem);
1767 editMenu.add(undoMenuItem);
1768 editMenu.add(redoMenuItem);
1771 editMenu.add(pasteMenu);
1772 editMenu.add(delete);
1773 editMenu.addSeparator();
1774 editMenu.add(remove2LeftMenuItem);
1775 editMenu.add(remove2RightMenuItem);
1776 editMenu.add(removeGappedColumnMenuItem);
1777 editMenu.add(removeAllGapsMenuItem);
1778 editMenu.add(removeRedundancyMenuItem);
1779 editMenu.addSeparator();
1780 // dont add these yet in the CVS build - they cannot be undone!
1781 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1782 // editMenu.add(justifyLeftMenuItem);
1783 // editMenu.add(justifyRightMenuItem);
1784 // editMenu.addSeparator();
1785 editMenu.add(padGapsMenuitem);
1786 viewMenu.add(newView);
1787 viewMenu.add(expandViews);
1788 viewMenu.add(gatherViews);
1789 viewMenu.addSeparator();
1790 viewMenu.add(jMenu3);
1791 viewMenu.add(hideMenu);
1792 viewMenu.addSeparator();
1793 viewMenu.add(followHighlightMenuItem);
1794 viewMenu.add(annotationPanelMenuItem);
1795 autoAnnMenu.add(applyAutoAnnotationSettings);
1796 autoAnnMenu.add(showConsensusHistogram);
1797 autoAnnMenu.add(showSequenceLogo);
1798 autoAnnMenu.add(normaliseSequenceLogo);
1799 autoAnnMenu.addSeparator();
1800 autoAnnMenu.add(showGroupConservation);
1801 autoAnnMenu.add(showGroupConsensus);
1802 viewMenu.add(autoAnnMenu);
1803 viewMenu.addSeparator();
1804 viewMenu.add(showSeqFeatures);
1805 // viewMenu.add(showSeqFeaturesHeight);
1807 viewMenu.add(openFeatureSettings);
1808 tooltipSettingsMenu.add(showDbRefsMenuitem);
1809 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1810 viewMenu.add(tooltipSettingsMenu);
1811 viewMenu.addSeparator();
1812 viewMenu.add(alignmentProperties);
1813 viewMenu.addSeparator();
1814 viewMenu.add(overviewMenuItem);
1815 colourMenu.add(applyToAllGroups);
1816 colourMenu.add(textColour);
1817 colourMenu.addSeparator();
1818 colourMenu.add(noColourmenuItem);
1819 colourMenu.add(clustalColour);
1820 colourMenu.add(BLOSUM62Colour);
1821 colourMenu.add(PIDColour);
1822 colourMenu.add(zappoColour);
1823 colourMenu.add(taylorColour);
1824 colourMenu.add(hydrophobicityColour);
1825 colourMenu.add(helixColour);
1826 colourMenu.add(strandColour);
1827 colourMenu.add(turnColour);
1828 colourMenu.add(buriedColour);
1829 colourMenu.add(nucleotideColour);
1830 colourMenu.add(purinePyrimidineColour);
1831 // colourMenu.add(covariationColour);
1832 colourMenu.add(userDefinedColour);
1833 colourMenu.addSeparator();
1834 colourMenu.add(conservationMenuItem);
1835 colourMenu.add(modifyConservation);
1836 colourMenu.add(abovePIDThreshold);
1837 colourMenu.add(modifyPID);
1838 colourMenu.add(annotationColour);
1839 colourMenu.add(rnahelicesColour);
1840 calculateMenu.add(sort);
1841 calculateMenu.add(calculateTree);
1842 calculateMenu.addSeparator();
1843 calculateMenu.add(pairwiseAlignmentMenuItem);
1844 calculateMenu.add(PCAMenuItem);
1845 calculateMenu.addSeparator();
1846 calculateMenu.add(showTranslation);
1847 calculateMenu.add(showProducts);
1848 calculateMenu.add(autoCalculate);
1849 calculateMenu.add(sortByTree);
1850 calculateMenu.addSeparator();
1851 calculateMenu.add(extractScores);
1852 webServiceNoServices = new JMenuItem("<No Services>");
1853 webService.add(webServiceNoServices);
1854 pasteMenu.add(pasteNew);
1855 pasteMenu.add(pasteThis);
1856 sort.add(sortIDMenuItem);
1857 sort.add(sortLengthMenuItem);
1858 sort.add(sortGroupMenuItem);
1859 sort.add(sortPairwiseMenuItem);
1860 sort.add(sortByTreeMenu);
1861 calculateTree.add(averageDistanceTreeMenuItem);
1862 calculateTree.add(neighbourTreeMenuItem);
1863 calculateTree.add(avDistanceTreeBlosumMenuItem);
1864 calculateTree.add(njTreeBlosumMenuItem);
1865 jMenu2.add(htmlMenuItem);
1866 jMenu2.add(epsFile);
1867 jMenu2.add(createPNG);
1868 addSequenceMenu.add(addFromFile);
1869 addSequenceMenu.add(addFromText);
1870 addSequenceMenu.add(addFromURL);
1871 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1872 statusPanel.add(statusBar, null);
1873 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1874 jMenu3.add(showAllColumns);
1875 jMenu3.add(showAllSeqs);
1876 jMenu3.add(showAllhidden);
1877 hideMenu.add(hideSelColumns);
1878 hideMenu.add(hideSelSequences);
1879 hideMenu.add(hideAllSelection);
1880 hideMenu.add(hideAllButSelection);
1882 formatMenu.add(font);
1883 formatMenu.addSeparator();
1884 formatMenu.add(wrapMenuItem);
1885 formatMenu.add(scaleAbove);
1886 formatMenu.add(scaleLeft);
1887 formatMenu.add(scaleRight);
1888 formatMenu.add(seqLimits);
1889 formatMenu.add(idRightAlign);
1890 formatMenu.add(hiddenMarkers);
1891 formatMenu.add(viewBoxesMenuItem);
1892 formatMenu.add(viewTextMenuItem);
1893 formatMenu.add(colourTextMenuItem);
1894 formatMenu.add(renderGapsMenuItem);
1895 formatMenu.add(centreColumnLabelsMenuItem);
1896 formatMenu.add(showNonconservedMenuItem);
1897 selectMenu.add(findMenuItem);
1898 selectMenu.addSeparator();
1899 selectMenu.add(selectAllSequenceMenuItem);
1900 selectMenu.add(deselectAllSequenceMenuItem);
1901 selectMenu.add(invertSequenceMenuItem);
1902 selectMenu.add(invertColSel);
1903 selectMenu.add(deleteGroups);
1904 selectMenu.add(grpsFromSelection);
1905 // TODO - determine if the listenToViewSelections button is needed : see bug JAL-574
1906 //selectMenu.addSeparator();
1907 //selectMenu.add(listenToViewSelections);
1910 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
1912 // TODO Auto-generated method stub
1916 protected void listenToViewSelections_actionPerformed(ActionEvent e)
1918 // TODO Auto-generated method stub
1922 protected void showAllhidden_actionPerformed(ActionEvent e)
1924 // TODO Auto-generated method stub
1928 protected void hideAllButSelection_actionPerformed(ActionEvent e)
1930 // TODO Auto-generated method stub
1934 protected void hideAllSelection_actionPerformed(ActionEvent e)
1936 // TODO Auto-generated method stub
1940 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
1942 // TODO Auto-generated method stub
1946 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
1948 // TODO Auto-generated method stub
1952 protected void showSequenceLogo_actionPerformed(ActionEvent e)
1954 // TODO Auto-generated method stub
1958 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
1960 // TODO Auto-generated method stub
1964 protected void showGroupConsensus_actionPerformed(ActionEvent e)
1966 // TODO Auto-generated method stub
1970 protected void showGroupConservation_actionPerformed(ActionEvent e)
1972 // TODO Auto-generated method stub
1976 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
1978 // TODO Auto-generated method stub
1982 protected void showSeqFeaturesHeight_actionPerformed(
1983 ActionEvent actionEvent)
1985 // TODO Auto-generated method stub
1989 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
1991 // TODO Auto-generated method stub
1995 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
1997 // TODO Auto-generated method stub
2001 protected void followHighlight_actionPerformed()
2003 // TODO Auto-generated method stub
2007 protected void showNpFeats_actionPerformed(ActionEvent e)
2009 // TODO Auto-generated method stub
2013 protected void showDbRefs_actionPerformed(ActionEvent e)
2015 // TODO Auto-generated method stub
2019 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2023 protected void showProducts_actionPerformed(ActionEvent e)
2027 protected void buildSortByAnnotationScoresMenu()
2031 protected void extractScores_actionPerformed(ActionEvent e)
2035 protected void outputText_actionPerformed(ActionEvent e)
2039 public void addFromFile_actionPerformed(ActionEvent e)
2044 public void addFromText_actionPerformed(ActionEvent e)
2049 public void addFromURL_actionPerformed(ActionEvent e)
2054 public void exportFeatures_actionPerformed(ActionEvent e)
2059 public void exportAnnotations_actionPerformed(ActionEvent e)
2064 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2068 protected void closeMenuItem_actionPerformed(boolean b)
2072 protected void redoMenuItem_actionPerformed(ActionEvent e)
2076 protected void undoMenuItem_actionPerformed(ActionEvent e)
2080 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2084 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2088 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2092 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2096 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2100 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2104 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2108 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2112 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2116 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2120 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2124 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2128 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2132 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2136 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2140 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2144 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2148 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2152 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2156 protected void PCAMenuItem_actionPerformed(ActionEvent e)
2160 protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e)
2164 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2168 protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e)
2172 protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
2176 protected void clustalColour_actionPerformed(ActionEvent e)
2180 protected void zappoColour_actionPerformed(ActionEvent e)
2184 protected void taylorColour_actionPerformed(ActionEvent e)
2188 protected void hydrophobicityColour_actionPerformed(ActionEvent e)
2192 protected void helixColour_actionPerformed(ActionEvent e)
2196 protected void strandColour_actionPerformed(ActionEvent e)
2200 protected void turnColour_actionPerformed(ActionEvent e)
2204 protected void buriedColour_actionPerformed(ActionEvent e)
2208 protected void userDefinedColour_actionPerformed(ActionEvent e)
2212 protected void PIDColour_actionPerformed(ActionEvent e)
2216 protected void BLOSUM62Colour_actionPerformed(ActionEvent e)
2220 protected void purinePyrimidineColour_actionPerformed(ActionEvent e)
2225 * protected void covariationColour_actionPerformed(ActionEvent e) { }
2228 protected void noColourmenuItem_actionPerformed(ActionEvent e)
2232 protected void conservationMenuItem_actionPerformed(ActionEvent e)
2236 protected void printMenuItem_actionPerformed(ActionEvent e)
2240 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2244 protected void findMenuItem_actionPerformed(ActionEvent e)
2248 protected void abovePIDThreshold_actionPerformed(ActionEvent e)
2252 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2256 protected void nucleotideColour_actionPerformed(ActionEvent e)
2260 protected void deleteGroups_actionPerformed(ActionEvent e)
2264 protected void copy_actionPerformed(ActionEvent e)
2268 protected void cut_actionPerformed(ActionEvent e)
2272 protected void delete_actionPerformed(ActionEvent e)
2276 protected void pasteNew_actionPerformed(ActionEvent e)
2280 protected void pasteThis_actionPerformed(ActionEvent e)
2284 protected void applyToAllGroups_actionPerformed(ActionEvent e)
2288 public void createPNG(java.io.File f)
2292 protected void font_actionPerformed(ActionEvent e)
2296 protected void seqLimit_actionPerformed(ActionEvent e)
2300 public void seqDBRef_actionPerformed(ActionEvent e)
2305 public void createEPS(java.io.File f)
2309 protected void LoadtreeMenuItem_actionPerformed(ActionEvent e)
2313 protected void jpred_actionPerformed(ActionEvent e)
2317 protected void scaleAbove_actionPerformed(ActionEvent e)
2321 protected void scaleLeft_actionPerformed(ActionEvent e)
2325 protected void scaleRight_actionPerformed(ActionEvent e)
2329 protected void modifyPID_actionPerformed(ActionEvent e)
2333 protected void modifyConservation_actionPerformed(ActionEvent e)
2337 protected void saveAs_actionPerformed(ActionEvent e)
2341 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2345 public void vamsasStore_actionPerformed(ActionEvent e)
2350 public void vamsasLoad_actionPerformed(ActionEvent e)
2355 public void showTranslation_actionPerformed(ActionEvent e)
2360 public void featureSettings_actionPerformed(ActionEvent e)
2365 public void fetchSequence_actionPerformed(ActionEvent e)
2370 public void smoothFont_actionPerformed(ActionEvent e)
2375 public void annotationColour_actionPerformed(ActionEvent e)
2380 public void rnahelicesColour_actionPerformed(ActionEvent e)
2385 public void associatedData_actionPerformed(ActionEvent e)
2390 public void autoCalculate_actionPerformed(ActionEvent e)
2395 public void sortByTreeOption_actionPerformed(ActionEvent e)
2400 public void showAllSeqs_actionPerformed(ActionEvent e)
2405 public void showAllColumns_actionPerformed(ActionEvent e)
2410 public void hideSelSequences_actionPerformed(ActionEvent e)
2415 public void hideSelColumns_actionPerformed(ActionEvent e)
2420 public void hiddenMarkers_actionPerformed(ActionEvent e)
2425 public void findPdbId_actionPerformed(ActionEvent e)
2430 public void enterPdbId_actionPerformed(ActionEvent e)
2435 public void pdbFile_actionPerformed(ActionEvent e)
2440 public void invertColSel_actionPerformed(ActionEvent e)
2445 public void tabSelectionChanged(int sel)
2450 public void tabbedPane_mousePressed(MouseEvent e)
2455 public void tabbedPane_focusGained(FocusEvent e)
2460 public void save_actionPerformed(ActionEvent e)
2465 public void reload_actionPerformed(ActionEvent e)
2470 public void newView_actionPerformed(ActionEvent e)
2475 public void textColour_actionPerformed(ActionEvent e)
2480 public void idRightAlign_actionPerformed(ActionEvent e)
2485 public void expandViews_actionPerformed(ActionEvent e)
2490 public void gatherViews_actionPerformed(ActionEvent e)
2495 public void buildTreeMenu()
2500 public void pageSetup_actionPerformed(ActionEvent e)
2505 public void alignmentProperties()