2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
3 * Copyright (C) 2010 J Procter, AM Waterhouse, 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 JMenuItem njTreeBlosumMenuItem = new JMenuItem();
118 JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem();
120 public JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
122 public JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
124 public JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
126 JMenuItem htmlMenuItem = new JMenuItem();
128 JMenuItem overviewMenuItem = new JMenuItem();
130 protected JMenuItem undoMenuItem = new JMenuItem();
132 protected JMenuItem redoMenuItem = new JMenuItem();
134 public JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
136 JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem();
138 public JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
140 JMenuItem printMenuItem = new JMenuItem();
142 public JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
144 JMenuItem findMenuItem = new JMenuItem();
146 public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem();
148 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
150 public JCheckBoxMenuItem showSeqFeaturesHeight = new JCheckBoxMenuItem();
152 protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
154 JMenuItem deleteGroups = new JMenuItem();
156 JMenuItem delete = new JMenuItem();
158 JMenuItem copy = new JMenuItem();
160 JMenuItem cut = new JMenuItem();
162 JMenu pasteMenu = new JMenu();
164 JMenuItem pasteNew = new JMenuItem();
166 JMenuItem pasteThis = new JMenuItem();
168 public JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem();
170 JMenuItem createPNG = new JMenuItem();
172 protected JMenuItem font = new JMenuItem();
174 public JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
176 JMenuItem epsFile = new JMenuItem();
178 JMenuItem LoadtreeMenuItem = new JMenuItem();
180 public JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
182 public JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
184 public JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
186 protected JMenuItem modifyPID = new JMenuItem();
188 protected JMenuItem modifyConservation = new JMenuItem();
190 protected JMenu sortByTreeMenu = new JMenu();
192 protected JMenu sort = new JMenu();
194 protected JMenu calculateTree = new JMenu();
196 JMenu jMenu2 = new JMenu();
198 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
200 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
202 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
204 protected ButtonGroup colours = new ButtonGroup();
206 JMenuItem vamsasStore = new JMenuItem();
208 protected JMenuItem showTranslation = new JMenuItem();
210 protected JMenuItem extractScores = new JMenuItem();
212 protected JMenu showProducts = new JMenu();
214 public JMenuItem featureSettings = new JMenuItem();
216 JMenuItem fetchSequence = new JMenuItem();
218 JMenuItem annotationColour = new JMenuItem();
220 JMenuItem associatedData = new JMenuItem();
222 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
224 JMenu addSequenceMenu = new JMenu();
226 JMenuItem addFromFile = new JMenuItem();
228 JMenuItem addFromText = new JMenuItem();
230 JMenuItem addFromURL = new JMenuItem();
232 JMenuItem exportAnnotations = new JMenuItem();
234 JMenuItem exportFeatures = new JMenuItem();
236 protected JPanel statusPanel = new JPanel();
238 GridLayout gridLayout1 = new GridLayout();
240 JMenu jMenu3 = new JMenu();
242 JMenuItem showAllSeqs = new JMenuItem();
244 JMenuItem showAllColumns = new JMenuItem();
246 JMenu hideMenu = new JMenu();
248 JMenuItem hideSelSequences = new JMenuItem();
250 JMenuItem hideSelColumns = new JMenuItem();
252 JMenuItem hideAllButSelection = new JMenuItem();
254 JMenuItem hideAllSelection = new JMenuItem();
256 JMenuItem showAllhidden = new JMenuItem();
258 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
260 JMenuItem invertColSel = new JMenuItem();
262 protected JTabbedPane tabbedPane = new JTabbedPane();
264 JMenuItem save = new JMenuItem();
266 protected JMenuItem reload = new JMenuItem();
268 JMenuItem newView = new JMenuItem();
270 JMenuItem textColour = new JMenuItem();
272 JMenu formatMenu = new JMenu();
274 JMenu selectMenu = new JMenu();
276 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
278 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
280 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
282 protected JMenuItem gatherViews = new JMenuItem();
284 protected JMenuItem expandViews = new JMenuItem();
286 JMenuItem pageSetup = new JMenuItem();
288 JMenuItem alignmentProperties = new JMenuItem();
290 JMenu tooltipSettingsMenu = new JMenu();
292 private JMenuItem justifyLeftMenuItem = new JMenuItem();
294 private JMenuItem justifyRightMenuItem = new JMenuItem();
296 JMenu autoAnnMenu = new JMenu();
298 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
300 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
302 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
304 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
306 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
308 private JMenuItem grpsFromSelection = new JMenuItem();
315 setJMenuBar(alignFrameMenuBar);
317 // dynamically fill save as menu with available formats
318 for (int i = 0; i < jalview.io.FormatAdapter.WRITEABLE_FORMATS.length; i++)
320 JMenuItem item = new JMenuItem(
321 jalview.io.FormatAdapter.WRITEABLE_FORMATS[i]);
323 item.addActionListener(new java.awt.event.ActionListener()
325 public void actionPerformed(ActionEvent e)
327 outputText_actionPerformed(e);
331 outputTextboxMenu.add(item);
333 } catch (Exception e)
337 if (!new jalview.util.Platform().isAMac())
339 closeMenuItem.setMnemonic('C');
340 outputTextboxMenu.setMnemonic('T');
341 undoMenuItem.setMnemonic('Z');
342 redoMenuItem.setMnemonic('0');
343 copy.setMnemonic('C');
344 cut.setMnemonic('U');
345 pasteMenu.setMnemonic('P');
346 reload.setMnemonic('R');
349 if (jalview.gui.UserDefinedColours.getUserColourSchemes() != null)
351 java.util.Enumeration userColours = jalview.gui.UserDefinedColours
352 .getUserColourSchemes().keys();
354 while (userColours.hasMoreElements())
356 final JRadioButtonMenuItem radioItem = new JRadioButtonMenuItem(
357 userColours.nextElement().toString());
358 radioItem.setName("USER_DEFINED");
359 radioItem.addMouseListener(new MouseAdapter()
361 public void mousePressed(MouseEvent evt)
363 if (evt.isControlDown()
364 || SwingUtilities.isRightMouseButton(evt))
367 .removeActionListener(radioItem.getActionListeners()[0]);
369 int option = JOptionPane.showInternalConfirmDialog(
370 jalview.gui.Desktop.desktop,
371 "Remove from default list?",
372 "Remove user defined colour",
373 JOptionPane.YES_NO_OPTION);
374 if (option == JOptionPane.YES_OPTION)
376 jalview.gui.UserDefinedColours
377 .removeColourFromDefaults(radioItem.getText());
378 colourMenu.remove(radioItem);
382 radioItem.addActionListener(new ActionListener()
384 public void actionPerformed(ActionEvent evt)
386 userDefinedColour_actionPerformed(evt);
393 radioItem.addActionListener(new ActionListener()
395 public void actionPerformed(ActionEvent evt)
397 userDefinedColour_actionPerformed(evt);
400 colourMenu.insert(radioItem, 15);
401 colours.add(radioItem);
404 colours.add(noColourmenuItem);
405 colours.add(clustalColour);
406 colours.add(zappoColour);
407 colours.add(taylorColour);
408 colours.add(hydrophobicityColour);
409 colours.add(helixColour);
410 colours.add(strandColour);
411 colours.add(turnColour);
412 colours.add(buriedColour);
413 colours.add(userDefinedColour);
414 colours.add(PIDColour);
415 colours.add(BLOSUM62Colour);
416 colours.add(nucleotideColour);
418 setColourSelected(jalview.bin.Cache
419 .getDefault("DEFAULT_COLOUR", "None"));
423 public void setColourSelected(String defaultColour)
426 if (defaultColour != null)
428 int index = ColourSchemeProperty
429 .getColourIndexFromName(defaultColour);
433 case ColourSchemeProperty.CLUSTAL:
434 clustalColour.setSelected(true);
438 case ColourSchemeProperty.BLOSUM:
439 BLOSUM62Colour.setSelected(true);
443 case ColourSchemeProperty.PID:
444 PIDColour.setSelected(true);
448 case ColourSchemeProperty.ZAPPO:
449 zappoColour.setSelected(true);
453 case ColourSchemeProperty.TAYLOR:
454 taylorColour.setSelected(true);
457 case ColourSchemeProperty.HYDROPHOBIC:
458 hydrophobicityColour.setSelected(true);
462 case ColourSchemeProperty.HELIX:
463 helixColour.setSelected(true);
467 case ColourSchemeProperty.STRAND:
468 strandColour.setSelected(true);
472 case ColourSchemeProperty.TURN:
473 turnColour.setSelected(true);
477 case ColourSchemeProperty.BURIED:
478 buriedColour.setSelected(true);
482 case ColourSchemeProperty.NUCLEOTIDE:
483 nucleotideColour.setSelected(true);
487 case ColourSchemeProperty.USER_DEFINED:
488 userDefinedColour.setSelected(true);
491 case ColourSchemeProperty.NONE:
493 noColourmenuItem.setSelected(true);
501 private void jbInit() throws Exception
503 fileMenu.setText("File");
504 saveAs.setText("Save As...");
505 saveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
506 java.awt.event.KeyEvent.VK_S, Toolkit.getDefaultToolkit()
507 .getMenuShortcutKeyMask()
508 | java.awt.event.KeyEvent.SHIFT_MASK, false));
509 saveAs.addActionListener(new ActionListener()
511 public void actionPerformed(ActionEvent e)
513 saveAs_actionPerformed(e);
516 closeMenuItem.setText("Close");
517 closeMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
518 java.awt.event.KeyEvent.VK_W, Toolkit.getDefaultToolkit()
519 .getMenuShortcutKeyMask(), false));
520 closeMenuItem.addActionListener(new java.awt.event.ActionListener()
522 public void actionPerformed(ActionEvent e)
524 closeMenuItem_actionPerformed(false);
527 editMenu.setText("Edit");
528 viewMenu.setText("View");
529 colourMenu.setText("Colour");
530 calculateMenu.setText("Calculate");
531 webService.setText("Web Service");
532 selectAllSequenceMenuItem.setText("Select All");
533 selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke
534 .getKeyStroke(java.awt.event.KeyEvent.VK_A, Toolkit
535 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
536 selectAllSequenceMenuItem
537 .addActionListener(new java.awt.event.ActionListener()
539 public void actionPerformed(ActionEvent e)
541 selectAllSequenceMenuItem_actionPerformed(e);
544 deselectAllSequenceMenuItem.setText("Deselect All");
545 deselectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke
546 .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0, false));
547 deselectAllSequenceMenuItem
548 .addActionListener(new java.awt.event.ActionListener()
550 public void actionPerformed(ActionEvent e)
552 deselectAllSequenceMenuItem_actionPerformed(e);
555 invertSequenceMenuItem.setText("Invert Sequence Selection");
556 invertSequenceMenuItem.setAccelerator(javax.swing.KeyStroke
557 .getKeyStroke(java.awt.event.KeyEvent.VK_I, Toolkit
558 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
559 invertSequenceMenuItem
560 .addActionListener(new java.awt.event.ActionListener()
562 public void actionPerformed(ActionEvent e)
564 invertSequenceMenuItem_actionPerformed(e);
567 grpsFromSelection.setText("Make Groups for selection");
568 grpsFromSelection.addActionListener(new java.awt.event.ActionListener()
570 public void actionPerformed(ActionEvent e)
572 makeGrpsFromSelection_actionPerformed(e);
576 remove2LeftMenuItem.setText("Remove Left");
577 remove2LeftMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
578 java.awt.event.KeyEvent.VK_L, Toolkit.getDefaultToolkit()
579 .getMenuShortcutKeyMask(), false));
581 .addActionListener(new java.awt.event.ActionListener()
583 public void actionPerformed(ActionEvent e)
585 remove2LeftMenuItem_actionPerformed(e);
588 remove2RightMenuItem.setText("Remove Right");
589 remove2RightMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
590 java.awt.event.KeyEvent.VK_R, Toolkit.getDefaultToolkit()
591 .getMenuShortcutKeyMask(), false));
593 .addActionListener(new java.awt.event.ActionListener()
595 public void actionPerformed(ActionEvent e)
597 remove2RightMenuItem_actionPerformed(e);
600 removeGappedColumnMenuItem.setText("Remove Empty Columns");
601 removeGappedColumnMenuItem.setAccelerator(javax.swing.KeyStroke
602 .getKeyStroke(java.awt.event.KeyEvent.VK_E, Toolkit
603 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
604 removeGappedColumnMenuItem
605 .addActionListener(new java.awt.event.ActionListener()
607 public void actionPerformed(ActionEvent e)
609 removeGappedColumnMenuItem_actionPerformed(e);
612 removeAllGapsMenuItem.setText("Remove All Gaps");
613 removeAllGapsMenuItem.setAccelerator(javax.swing.KeyStroke
614 .getKeyStroke(java.awt.event.KeyEvent.VK_E, Toolkit
615 .getDefaultToolkit().getMenuShortcutKeyMask()
616 | java.awt.event.KeyEvent.SHIFT_MASK, false));
617 removeAllGapsMenuItem
618 .addActionListener(new java.awt.event.ActionListener()
620 public void actionPerformed(ActionEvent e)
622 removeAllGapsMenuItem_actionPerformed(e);
625 justifyLeftMenuItem.setText("Left Justify Alignment");
627 .addActionListener(new java.awt.event.ActionListener()
629 public void actionPerformed(ActionEvent e)
631 justifyLeftMenuItem_actionPerformed(e);
634 justifyRightMenuItem.setText("Right Justify Alignment");
636 .addActionListener(new java.awt.event.ActionListener()
638 public void actionPerformed(ActionEvent e)
640 justifyRightMenuItem_actionPerformed(e);
643 viewBoxesMenuItem.setText("Boxes");
644 viewBoxesMenuItem.setState(true);
645 viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener()
647 public void actionPerformed(ActionEvent e)
649 viewBoxesMenuItem_actionPerformed(e);
652 viewTextMenuItem.setText("Text");
653 viewTextMenuItem.setState(true);
654 viewTextMenuItem.addActionListener(new java.awt.event.ActionListener()
656 public void actionPerformed(ActionEvent e)
658 viewTextMenuItem_actionPerformed(e);
661 showNonconservedMenuItem.setText("Show nonconserved");
662 showNonconservedMenuItem.setState(false);
663 showNonconservedMenuItem
664 .addActionListener(new java.awt.event.ActionListener()
666 public void actionPerformed(ActionEvent e)
668 showUnconservedMenuItem_actionPerformed(e);
671 sortPairwiseMenuItem.setText("by Pairwise Identity");
673 .addActionListener(new java.awt.event.ActionListener()
675 public void actionPerformed(ActionEvent e)
677 sortPairwiseMenuItem_actionPerformed(e);
680 sortIDMenuItem.setText("by ID");
681 sortIDMenuItem.addActionListener(new java.awt.event.ActionListener()
683 public void actionPerformed(ActionEvent e)
685 sortIDMenuItem_actionPerformed(e);
688 sortLengthMenuItem.setText("By Length");
690 .addActionListener(new java.awt.event.ActionListener()
692 public void actionPerformed(ActionEvent e)
694 sortLengthMenuItem_actionPerformed(e);
697 sortGroupMenuItem.setText("by Group");
698 sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
700 public void actionPerformed(ActionEvent e)
702 sortGroupMenuItem_actionPerformed(e);
705 removeRedundancyMenuItem.setText("Remove Redundancy...");
706 removeRedundancyMenuItem.setAccelerator(javax.swing.KeyStroke
707 .getKeyStroke(java.awt.event.KeyEvent.VK_D, Toolkit
708 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
709 removeRedundancyMenuItem
710 .addActionListener(new java.awt.event.ActionListener()
712 public void actionPerformed(ActionEvent e)
714 removeRedundancyMenuItem_actionPerformed(e);
717 pairwiseAlignmentMenuItem.setText("Pairwise Alignments...");
718 pairwiseAlignmentMenuItem
719 .addActionListener(new java.awt.event.ActionListener()
721 public void actionPerformed(ActionEvent e)
723 pairwiseAlignmentMenuItem_actionPerformed(e);
726 PCAMenuItem.setText("Principal Component Analysis");
727 PCAMenuItem.addActionListener(new java.awt.event.ActionListener()
729 public void actionPerformed(ActionEvent e)
731 PCAMenuItem_actionPerformed(e);
734 averageDistanceTreeMenuItem
735 .setText("Average Distance Using % Identity");
736 averageDistanceTreeMenuItem
737 .addActionListener(new java.awt.event.ActionListener()
739 public void actionPerformed(ActionEvent e)
741 averageDistanceTreeMenuItem_actionPerformed(e);
744 neighbourTreeMenuItem.setText("Neighbour Joining Using % Identity");
745 neighbourTreeMenuItem
746 .addActionListener(new java.awt.event.ActionListener()
748 public void actionPerformed(ActionEvent e)
750 neighbourTreeMenuItem_actionPerformed(e);
753 this.getContentPane().setLayout(borderLayout1);
754 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
755 statusBar.setBackground(Color.white);
756 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
757 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
758 statusBar.setText("Status bar");
759 outputTextboxMenu.setText("Output to Textbox");
760 clustalColour.setText("Clustalx");
762 clustalColour.addActionListener(new java.awt.event.ActionListener()
764 public void actionPerformed(ActionEvent e)
766 clustalColour_actionPerformed(e);
769 zappoColour.setText("Zappo");
770 zappoColour.addActionListener(new java.awt.event.ActionListener()
772 public void actionPerformed(ActionEvent e)
774 zappoColour_actionPerformed(e);
777 taylorColour.setText("Taylor");
778 taylorColour.addActionListener(new java.awt.event.ActionListener()
780 public void actionPerformed(ActionEvent e)
782 taylorColour_actionPerformed(e);
785 hydrophobicityColour.setText("Hydrophobicity");
787 .addActionListener(new java.awt.event.ActionListener()
789 public void actionPerformed(ActionEvent e)
791 hydrophobicityColour_actionPerformed(e);
794 helixColour.setText("Helix Propensity");
795 helixColour.addActionListener(new java.awt.event.ActionListener()
797 public void actionPerformed(ActionEvent e)
799 helixColour_actionPerformed(e);
802 strandColour.setText("Strand Propensity");
803 strandColour.addActionListener(new java.awt.event.ActionListener()
805 public void actionPerformed(ActionEvent e)
807 strandColour_actionPerformed(e);
810 turnColour.setText("Turn Propensity");
811 turnColour.addActionListener(new java.awt.event.ActionListener()
813 public void actionPerformed(ActionEvent e)
815 turnColour_actionPerformed(e);
818 buriedColour.setText("Buried Index");
819 buriedColour.addActionListener(new java.awt.event.ActionListener()
821 public void actionPerformed(ActionEvent e)
823 buriedColour_actionPerformed(e);
826 userDefinedColour.setText("User Defined...");
827 userDefinedColour.addActionListener(new java.awt.event.ActionListener()
829 public void actionPerformed(ActionEvent e)
831 userDefinedColour_actionPerformed(e);
834 PIDColour.setText("Percentage Identity");
835 PIDColour.addActionListener(new java.awt.event.ActionListener()
837 public void actionPerformed(ActionEvent e)
839 PIDColour_actionPerformed(e);
842 BLOSUM62Colour.setText("BLOSUM62 Score");
843 BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener()
845 public void actionPerformed(ActionEvent e)
847 BLOSUM62Colour_actionPerformed(e);
850 avDistanceTreeBlosumMenuItem.setText("Average Distance Using BLOSUM62");
851 avDistanceTreeBlosumMenuItem
852 .addActionListener(new java.awt.event.ActionListener()
854 public void actionPerformed(ActionEvent e)
856 avTreeBlosumMenuItem_actionPerformed(e);
859 njTreeBlosumMenuItem.setText("Neighbour Joining using BLOSUM62");
861 .addActionListener(new java.awt.event.ActionListener()
863 public void actionPerformed(ActionEvent e)
865 njTreeBlosumMenuItem_actionPerformed(e);
868 annotationPanelMenuItem.setActionCommand("");
869 annotationPanelMenuItem.setText("Show Annotations");
870 annotationPanelMenuItem.setState(jalview.bin.Cache.getDefault(
871 "SHOW_ANNOTATIONS", true));
872 annotationPanelMenuItem
873 .addActionListener(new java.awt.event.ActionListener()
875 public void actionPerformed(ActionEvent e)
877 annotationPanelMenuItem_actionPerformed(e);
880 colourTextMenuItem.setText("Colour Text");
882 .addActionListener(new java.awt.event.ActionListener()
884 public void actionPerformed(ActionEvent e)
886 colourTextMenuItem_actionPerformed(e);
889 htmlMenuItem.setText("HTML");
890 htmlMenuItem.addActionListener(new java.awt.event.ActionListener()
892 public void actionPerformed(ActionEvent e)
894 htmlMenuItem_actionPerformed(e);
897 overviewMenuItem.setText("Overview Window");
898 overviewMenuItem.addActionListener(new java.awt.event.ActionListener()
900 public void actionPerformed(ActionEvent e)
902 overviewMenuItem_actionPerformed(e);
905 undoMenuItem.setEnabled(false);
906 undoMenuItem.setText("Undo");
907 undoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
908 java.awt.event.KeyEvent.VK_Z, Toolkit.getDefaultToolkit()
909 .getMenuShortcutKeyMask(), false));
910 undoMenuItem.addActionListener(new java.awt.event.ActionListener()
912 public void actionPerformed(ActionEvent e)
914 undoMenuItem_actionPerformed(e);
917 redoMenuItem.setEnabled(false);
918 redoMenuItem.setText("Redo");
919 redoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
920 java.awt.event.KeyEvent.VK_Y, Toolkit.getDefaultToolkit()
921 .getMenuShortcutKeyMask(), false));
922 redoMenuItem.addActionListener(new java.awt.event.ActionListener()
924 public void actionPerformed(ActionEvent e)
926 redoMenuItem_actionPerformed(e);
929 conservationMenuItem.setText("By Conservation");
931 .addActionListener(new java.awt.event.ActionListener()
933 public void actionPerformed(ActionEvent e)
935 conservationMenuItem_actionPerformed(e);
938 noColourmenuItem.setText("None");
939 noColourmenuItem.addActionListener(new java.awt.event.ActionListener()
941 public void actionPerformed(ActionEvent e)
943 noColourmenuItem_actionPerformed(e);
946 wrapMenuItem.setText("Wrap");
947 wrapMenuItem.addActionListener(new java.awt.event.ActionListener()
949 public void actionPerformed(ActionEvent e)
951 wrapMenuItem_actionPerformed(e);
954 printMenuItem.setText("Print ...");
955 printMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
956 java.awt.event.KeyEvent.VK_P, Toolkit.getDefaultToolkit()
957 .getMenuShortcutKeyMask(), false));
958 printMenuItem.addActionListener(new java.awt.event.ActionListener()
960 public void actionPerformed(ActionEvent e)
962 printMenuItem_actionPerformed(e);
965 renderGapsMenuItem.setText("Show Gaps");
966 renderGapsMenuItem.setState(true);
968 .addActionListener(new java.awt.event.ActionListener()
970 public void actionPerformed(ActionEvent e)
972 renderGapsMenuItem_actionPerformed(e);
975 findMenuItem.setText("Find...");
976 findMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
977 java.awt.event.KeyEvent.VK_F, Toolkit.getDefaultToolkit()
978 .getMenuShortcutKeyMask(), false));
979 findMenuItem.addActionListener(new java.awt.event.ActionListener()
981 public void actionPerformed(ActionEvent e)
983 findMenuItem_actionPerformed(e);
986 abovePIDThreshold.setText("Above Identity Threshold");
987 abovePIDThreshold.addActionListener(new java.awt.event.ActionListener()
989 public void actionPerformed(ActionEvent e)
991 abovePIDThreshold_actionPerformed(e);
994 showSeqFeatures.setText("Show Sequence Features");
995 showSeqFeatures.addActionListener(new ActionListener()
997 public void actionPerformed(ActionEvent actionEvent)
999 showSeqFeatures_actionPerformed(actionEvent);
1003 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
1004 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
1005 * void actionPerformed(ActionEvent actionEvent) {
1006 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
1008 showDbRefsMenuitem.setText("Show Database Refs");
1009 showDbRefsMenuitem.addActionListener(new ActionListener()
1012 public void actionPerformed(ActionEvent e)
1014 showDbRefs_actionPerformed(e);
1018 showNpFeatsMenuitem.setText("Show Non-Positional Features");
1019 showNpFeatsMenuitem.addActionListener(new ActionListener()
1022 public void actionPerformed(ActionEvent e)
1024 showNpFeats_actionPerformed(e);
1028 showGroupConservation.setText("Group Conservation");
1029 showGroupConservation.addActionListener(new ActionListener()
1032 public void actionPerformed(ActionEvent e)
1034 showGroupConservation_actionPerformed(e);
1039 showGroupConsensus.setText("Group Consensus");
1040 showGroupConsensus.addActionListener(new ActionListener()
1043 public void actionPerformed(ActionEvent e)
1045 showGroupConsensus_actionPerformed(e);
1049 showConsensusHistogram.setText("Show Consensus Histogram");
1050 showConsensusHistogram.addActionListener(new ActionListener()
1053 public void actionPerformed(ActionEvent e)
1055 showConsensusHistogram_actionPerformed(e);
1059 showSequenceLogo.setText("Show Consensus Logo");
1060 showSequenceLogo.addActionListener(new ActionListener()
1063 public void actionPerformed(ActionEvent e)
1065 showSequenceLogo_actionPerformed(e);
1069 applyAutoAnnotationSettings.setText("Apply to all groups");
1070 applyAutoAnnotationSettings.setState(false);
1071 applyAutoAnnotationSettings.setVisible(true);
1072 applyAutoAnnotationSettings.addActionListener(new ActionListener()
1075 public void actionPerformed(ActionEvent e)
1077 applyAutoAnnotationSettings_actionPerformed(e);
1082 nucleotideColour.setText("Nucleotide");
1083 nucleotideColour.addActionListener(new java.awt.event.ActionListener()
1085 public void actionPerformed(ActionEvent e)
1087 nucleotideColour_actionPerformed(e);
1090 deleteGroups.setText("Undefine groups");
1091 deleteGroups.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1092 java.awt.event.KeyEvent.VK_U, Toolkit.getDefaultToolkit()
1093 .getMenuShortcutKeyMask(), false));
1094 deleteGroups.addActionListener(new java.awt.event.ActionListener()
1096 public void actionPerformed(ActionEvent e)
1098 deleteGroups_actionPerformed(e);
1101 copy.setText("Copy");
1102 copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1103 java.awt.event.KeyEvent.VK_C, Toolkit.getDefaultToolkit()
1104 .getMenuShortcutKeyMask(), false));
1106 copy.addActionListener(new java.awt.event.ActionListener()
1108 public void actionPerformed(ActionEvent e)
1110 copy_actionPerformed(e);
1114 cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1115 java.awt.event.KeyEvent.VK_X, Toolkit.getDefaultToolkit()
1116 .getMenuShortcutKeyMask(), false));
1117 cut.addActionListener(new java.awt.event.ActionListener()
1119 public void actionPerformed(ActionEvent e)
1121 cut_actionPerformed(e);
1124 delete.setText("Delete");
1125 delete.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1126 java.awt.event.KeyEvent.VK_BACK_SPACE, 0, false));
1127 delete.addActionListener(new java.awt.event.ActionListener()
1129 public void actionPerformed(ActionEvent e)
1131 delete_actionPerformed(e);
1134 pasteMenu.setText("Paste");
1135 pasteNew.setText("To New Alignment");
1136 pasteNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1137 java.awt.event.KeyEvent.VK_V, Toolkit.getDefaultToolkit()
1138 .getMenuShortcutKeyMask()
1139 | java.awt.event.KeyEvent.SHIFT_MASK, false));
1140 pasteNew.addActionListener(new java.awt.event.ActionListener()
1142 public void actionPerformed(ActionEvent e)
1144 pasteNew_actionPerformed(e);
1147 pasteThis.setText("Add To This Alignment");
1148 pasteThis.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1149 java.awt.event.KeyEvent.VK_V, Toolkit.getDefaultToolkit()
1150 .getMenuShortcutKeyMask(), false));
1151 pasteThis.addActionListener(new java.awt.event.ActionListener()
1153 public void actionPerformed(ActionEvent e)
1155 pasteThis_actionPerformed(e);
1158 applyToAllGroups.setText("Apply Colour To All Groups");
1159 applyToAllGroups.addActionListener(new java.awt.event.ActionListener()
1161 public void actionPerformed(ActionEvent e)
1163 applyToAllGroups_actionPerformed(e);
1166 createPNG.addActionListener(new java.awt.event.ActionListener()
1168 public void actionPerformed(ActionEvent e)
1173 createPNG.setActionCommand("Save As PNG Image");
1174 createPNG.setText("PNG");
1175 font.setText("Font...");
1176 font.addActionListener(new java.awt.event.ActionListener()
1178 public void actionPerformed(ActionEvent e)
1180 font_actionPerformed(e);
1184 seqLimits.setText("Show Sequence Limits");
1185 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1186 seqLimits.addActionListener(new java.awt.event.ActionListener()
1188 public void actionPerformed(ActionEvent e)
1190 seqLimit_actionPerformed(e);
1193 epsFile.setText("EPS");
1194 epsFile.addActionListener(new java.awt.event.ActionListener()
1196 public void actionPerformed(ActionEvent e)
1201 LoadtreeMenuItem.setActionCommand("Load a tree for this sequence set");
1202 LoadtreeMenuItem.setText("Load Associated Tree");
1203 LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener()
1205 public void actionPerformed(ActionEvent e)
1207 LoadtreeMenuItem_actionPerformed(e);
1210 scaleAbove.setVisible(false);
1211 scaleAbove.setText("Scale Above");
1212 scaleAbove.addActionListener(new java.awt.event.ActionListener()
1214 public void actionPerformed(ActionEvent e)
1216 scaleAbove_actionPerformed(e);
1219 scaleLeft.setVisible(false);
1220 scaleLeft.setSelected(true);
1221 scaleLeft.setText("Scale Left");
1222 scaleLeft.addActionListener(new java.awt.event.ActionListener()
1224 public void actionPerformed(ActionEvent e)
1226 scaleLeft_actionPerformed(e);
1229 scaleRight.setVisible(false);
1230 scaleRight.setSelected(true);
1231 scaleRight.setText("Scale Right");
1232 scaleRight.addActionListener(new java.awt.event.ActionListener()
1234 public void actionPerformed(ActionEvent e)
1236 scaleRight_actionPerformed(e);
1239 centreColumnLabelsMenuItem.setVisible(true);
1240 centreColumnLabelsMenuItem.setState(false);
1241 centreColumnLabelsMenuItem.setText("Centre Column Labels");
1242 centreColumnLabelsMenuItem
1243 .addActionListener(new java.awt.event.ActionListener()
1245 public void actionPerformed(ActionEvent e)
1247 centreColumnLabels_actionPerformed(e);
1250 followHighlightMenuItem.setVisible(true);
1251 followHighlightMenuItem.setState(true);
1252 followHighlightMenuItem.setText("Automatic Scrolling");
1253 followHighlightMenuItem.addActionListener(new ActionListener()
1256 public void actionPerformed(ActionEvent e)
1258 followHighlight_actionPerformed();
1263 modifyPID.setText("Modify Identity Threshold...");
1264 modifyPID.addActionListener(new java.awt.event.ActionListener()
1266 public void actionPerformed(ActionEvent e)
1268 modifyPID_actionPerformed(e);
1271 modifyConservation.setText("Modify Conservation Threshold...");
1273 .addActionListener(new java.awt.event.ActionListener()
1275 public void actionPerformed(ActionEvent e)
1277 modifyConservation_actionPerformed(e);
1280 sortByTreeMenu.setText("By Tree Order");
1281 sort.setText("Sort");
1282 sort.addMenuListener(new MenuListener()
1284 public void menuSelected(MenuEvent e)
1289 public void menuDeselected(MenuEvent e)
1293 public void menuCanceled(MenuEvent e)
1297 sortByAnnotScore.setText("by Score");
1298 sort.add(sortByAnnotScore);
1299 sortByAnnotScore.addMenuListener(new javax.swing.event.MenuListener()
1302 public void menuCanceled(MenuEvent e)
1306 public void menuDeselected(MenuEvent e)
1310 public void menuSelected(MenuEvent e)
1312 buildSortByAnnotationScoresMenu();
1315 sortByAnnotScore.setVisible(false);
1317 calculateTree.setText("Calculate Tree");
1319 jMenu2.setText("Export Image");
1320 padGapsMenuitem.setText("Pad Gaps");
1321 padGapsMenuitem.setState(jalview.bin.Cache
1322 .getDefault("PAD_GAPS", false));
1323 padGapsMenuitem.addActionListener(new ActionListener()
1325 public void actionPerformed(ActionEvent e)
1327 padGapsMenuitem_actionPerformed(e);
1330 vamsasStore.setVisible(false);
1331 vamsasStore.setText("VAMSAS store");
1332 vamsasStore.addActionListener(new ActionListener()
1334 public void actionPerformed(ActionEvent e)
1336 vamsasStore_actionPerformed(e);
1339 showTranslation.setText("Translate cDNA");
1340 showTranslation.addActionListener(new ActionListener()
1342 public void actionPerformed(ActionEvent e)
1344 showTranslation_actionPerformed(e);
1347 extractScores.setText("Extract Scores...");
1348 extractScores.addActionListener(new ActionListener()
1350 public void actionPerformed(ActionEvent e)
1352 extractScores_actionPerformed(e);
1355 extractScores.setVisible(true); // JBPNote: TODO: make gui for regex based
1357 showProducts.setText("Get Cross References");
1359 * showProducts.addActionListener(new ActionListener() {
1361 * public void actionPerformed(ActionEvent e) {
1362 * showProducts_actionPerformed(e); } });
1364 featureSettings.setText("Feature Settings...");
1365 featureSettings.addActionListener(new ActionListener()
1367 public void actionPerformed(ActionEvent e)
1369 featureSettings_actionPerformed(e);
1372 fetchSequence.setText("Fetch Sequence(s)...");
1373 fetchSequence.addActionListener(new ActionListener()
1375 public void actionPerformed(ActionEvent e)
1377 fetchSequence_actionPerformed(e);
1381 annotationColour.setText("By Annotation...");
1382 annotationColour.addActionListener(new ActionListener()
1384 public void actionPerformed(ActionEvent e)
1386 annotationColour_actionPerformed(e);
1389 associatedData.setText("Load Features / Annotations");
1390 associatedData.addActionListener(new ActionListener()
1392 public void actionPerformed(ActionEvent e)
1394 associatedData_actionPerformed(e);
1397 autoCalculate.setText("Autocalculate Consensus");
1398 autoCalculate.setState(jalview.bin.Cache.getDefault(
1399 "AUTO_CALC_CONSENSUS", true));
1400 autoCalculate.addActionListener(new ActionListener()
1402 public void actionPerformed(ActionEvent e)
1404 autoCalculate_actionPerformed(e);
1407 addSequenceMenu.setText("Add Sequences");
1408 addFromFile.setText("From File");
1409 addFromFile.addActionListener(new ActionListener()
1411 public void actionPerformed(ActionEvent e)
1413 addFromFile_actionPerformed(e);
1416 addFromText.setText("From Textbox");
1417 addFromText.addActionListener(new ActionListener()
1419 public void actionPerformed(ActionEvent e)
1421 addFromText_actionPerformed(e);
1424 addFromURL.setText("From URL");
1425 addFromURL.addActionListener(new ActionListener()
1427 public void actionPerformed(ActionEvent e)
1429 addFromURL_actionPerformed(e);
1432 exportFeatures.setText("Export Features...");
1433 exportFeatures.addActionListener(new ActionListener()
1435 public void actionPerformed(ActionEvent e)
1437 exportFeatures_actionPerformed(e);
1440 exportAnnotations.setText("Export Annotations...");
1441 exportAnnotations.addActionListener(new ActionListener()
1443 public void actionPerformed(ActionEvent e)
1445 exportAnnotations_actionPerformed(e);
1448 statusPanel.setLayout(gridLayout1);
1449 jMenu3.setText("Show");
1450 showAllSeqs.setText("All Sequences");
1451 showAllSeqs.setToolTipText("Shift+H toggles sequence visiblity.");
1452 showAllSeqs.addActionListener(new ActionListener()
1454 public void actionPerformed(ActionEvent e)
1456 showAllSeqs_actionPerformed(e);
1459 showAllColumns.setText("All Columns");
1460 showAllColumns.setToolTipText("Ctrl+H toggles column visiblity.");
1461 showAllColumns.addActionListener(new ActionListener()
1463 public void actionPerformed(ActionEvent e)
1465 showAllColumns_actionPerformed(e);
1468 hideMenu.setText("Hide");
1469 hideSelSequences.setText("Selected Sequences");
1470 hideSelSequences.setToolTipText("Shift+H toggles sequence visiblity.");
1471 hideSelSequences.addActionListener(new ActionListener()
1473 public void actionPerformed(ActionEvent e)
1475 hideSelSequences_actionPerformed(e);
1478 hideSelColumns.setText("Selected Columns");
1479 hideSelColumns.setToolTipText("Ctrl+H toggles column visiblity.");
1480 hideSelColumns.addActionListener(new ActionListener()
1482 public void actionPerformed(ActionEvent e)
1484 hideSelColumns_actionPerformed(e);
1487 hideAllSelection.setText("Selected Region");
1488 hideAllSelection.addActionListener(new ActionListener()
1490 public void actionPerformed(ActionEvent e)
1492 hideAllSelection_actionPerformed(e);
1495 // TODO: should be hidden if no selection exists.
1496 hideAllButSelection.setText("All but Selected Region (Shift+Ctrl+H)");
1497 hideAllButSelection.addActionListener(new ActionListener()
1499 public void actionPerformed(ActionEvent e)
1501 hideAllButSelection_actionPerformed(e);
1504 showAllhidden.setText("All Sequences and Columns");
1506 .setToolTipText("H toggles visibility of hidden or selected regions.");
1507 showAllhidden.addActionListener(new ActionListener()
1509 public void actionPerformed(ActionEvent e)
1511 showAllhidden_actionPerformed(e);
1515 hiddenMarkers.setText("Show Hidden Markers");
1516 hiddenMarkers.addActionListener(new ActionListener()
1518 public void actionPerformed(ActionEvent e)
1520 hiddenMarkers_actionPerformed(e);
1523 invertColSel.setText("Invert Column Selection");
1524 invertColSel.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1525 java.awt.event.KeyEvent.VK_I, Toolkit.getDefaultToolkit()
1526 .getMenuShortcutKeyMask()
1527 | java.awt.event.KeyEvent.ALT_MASK, false));
1528 invertColSel.addActionListener(new ActionListener()
1530 public void actionPerformed(ActionEvent e)
1532 invertColSel_actionPerformed(e);
1535 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1537 public void stateChanged(ChangeEvent evt)
1539 JTabbedPane pane = (JTabbedPane) evt.getSource();
1540 int sel = pane.getSelectedIndex();
1541 tabSelectionChanged(sel);
1544 tabbedPane.addMouseListener(new MouseAdapter()
1546 public void mousePressed(MouseEvent e)
1548 tabbedPane_mousePressed(e);
1551 tabbedPane.addFocusListener(new FocusAdapter()
1553 public void focusGained(FocusEvent e)
1555 tabbedPane_focusGained(e);
1558 save.setText("Save");
1559 save.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1560 java.awt.event.KeyEvent.VK_S, Toolkit.getDefaultToolkit()
1561 .getMenuShortcutKeyMask(), false));
1562 save.addActionListener(new ActionListener()
1564 public void actionPerformed(ActionEvent e)
1566 save_actionPerformed(e);
1569 reload.setEnabled(false);
1570 reload.setText("Reload");
1571 reload.addActionListener(new ActionListener()
1573 public void actionPerformed(ActionEvent e)
1575 reload_actionPerformed(e);
1578 newView.setText("New View");
1579 newView.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1580 java.awt.event.KeyEvent.VK_T, Toolkit.getDefaultToolkit()
1581 .getMenuShortcutKeyMask(), false));
1582 newView.addActionListener(new ActionListener()
1584 public void actionPerformed(ActionEvent e)
1586 newView_actionPerformed(e);
1589 tabbedPane.setToolTipText("<html><i> Right-click to rename tab"
1590 + "<br> Press X to eXpand tabs, G to reGroup.</i></html>");
1591 textColour.setText("Colour Text ...");
1592 textColour.addActionListener(new ActionListener()
1594 public void actionPerformed(ActionEvent e)
1596 textColour_actionPerformed(e);
1599 formatMenu.setText("Format");
1600 selectMenu.setText("Select");
1601 idRightAlign.setText("Right Align Sequence Id");
1602 idRightAlign.addActionListener(new ActionListener()
1604 public void actionPerformed(ActionEvent e)
1606 idRightAlign_actionPerformed(e);
1609 gatherViews.setEnabled(false);
1610 gatherViews.setText("Gather Views");
1611 gatherViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1612 java.awt.event.KeyEvent.VK_G, 0, false));
1613 gatherViews.addActionListener(new ActionListener()
1615 public void actionPerformed(ActionEvent e)
1617 gatherViews_actionPerformed(e);
1620 expandViews.setEnabled(false);
1621 expandViews.setText("Expand Views");
1622 expandViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1623 java.awt.event.KeyEvent.VK_X, 0, false));
1624 expandViews.addActionListener(new ActionListener()
1626 public void actionPerformed(ActionEvent e)
1628 expandViews_actionPerformed(e);
1631 pageSetup.setText("Page Setup ...");
1632 pageSetup.addActionListener(new ActionListener()
1634 public void actionPerformed(ActionEvent e)
1636 pageSetup_actionPerformed(e);
1639 alignmentProperties.setText("Alignment Properties...");
1640 alignmentProperties.addActionListener(new ActionListener()
1642 public void actionPerformed(ActionEvent actionEvent)
1644 alignmentProperties();
1647 tooltipSettingsMenu.setText("Sequence ID Tooltip");
1648 autoAnnMenu.setText("Autocalculated Annotation");
1649 alignFrameMenuBar.add(fileMenu);
1650 alignFrameMenuBar.add(editMenu);
1651 alignFrameMenuBar.add(selectMenu);
1652 alignFrameMenuBar.add(viewMenu);
1653 alignFrameMenuBar.add(formatMenu);
1654 alignFrameMenuBar.add(colourMenu);
1655 alignFrameMenuBar.add(calculateMenu);
1656 alignFrameMenuBar.add(webService);
1657 fileMenu.add(fetchSequence);
1658 fileMenu.add(addSequenceMenu);
1659 fileMenu.add(reload);
1660 fileMenu.addSeparator();
1661 fileMenu.add(vamsasStore);
1663 fileMenu.add(saveAs);
1664 fileMenu.add(outputTextboxMenu);
1665 fileMenu.add(pageSetup);
1666 fileMenu.add(printMenuItem);
1667 fileMenu.addSeparator();
1668 fileMenu.add(jMenu2);
1669 fileMenu.add(exportFeatures);
1670 fileMenu.add(exportAnnotations);
1671 fileMenu.add(LoadtreeMenuItem);
1672 fileMenu.add(associatedData);
1673 fileMenu.addSeparator();
1674 fileMenu.add(closeMenuItem);
1675 editMenu.add(undoMenuItem);
1676 editMenu.add(redoMenuItem);
1679 editMenu.add(pasteMenu);
1680 editMenu.add(delete);
1681 editMenu.addSeparator();
1682 editMenu.add(remove2LeftMenuItem);
1683 editMenu.add(remove2RightMenuItem);
1684 editMenu.add(removeGappedColumnMenuItem);
1685 editMenu.add(removeAllGapsMenuItem);
1686 editMenu.add(removeRedundancyMenuItem);
1687 editMenu.addSeparator();
1688 // dont add these yet in the CVS build - they cannot be undone!
1689 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1690 // editMenu.add(justifyLeftMenuItem);
1691 // editMenu.add(justifyRightMenuItem);
1692 // editMenu.addSeparator();
1693 editMenu.add(padGapsMenuitem);
1694 viewMenu.add(newView);
1695 viewMenu.add(expandViews);
1696 viewMenu.add(gatherViews);
1697 viewMenu.addSeparator();
1698 viewMenu.add(jMenu3);
1699 viewMenu.add(hideMenu);
1700 viewMenu.addSeparator();
1701 viewMenu.add(followHighlightMenuItem);
1702 viewMenu.add(annotationPanelMenuItem);
1703 autoAnnMenu.add(applyAutoAnnotationSettings);
1704 autoAnnMenu.add(showConsensusHistogram);
1705 autoAnnMenu.add(showSequenceLogo);
1706 autoAnnMenu.addSeparator();
1707 autoAnnMenu.add(showGroupConservation);
1708 autoAnnMenu.add(showGroupConsensus);
1709 viewMenu.add(autoAnnMenu);
1710 viewMenu.addSeparator();
1711 viewMenu.add(showSeqFeatures);
1712 // viewMenu.add(showSeqFeaturesHeight);
1714 viewMenu.add(featureSettings);
1715 tooltipSettingsMenu.add(showDbRefsMenuitem);
1716 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1717 viewMenu.add(tooltipSettingsMenu);
1718 viewMenu.addSeparator();
1719 viewMenu.add(alignmentProperties);
1720 viewMenu.addSeparator();
1721 viewMenu.add(overviewMenuItem);
1722 colourMenu.add(applyToAllGroups);
1723 colourMenu.add(textColour);
1724 colourMenu.addSeparator();
1725 colourMenu.add(noColourmenuItem);
1726 colourMenu.add(clustalColour);
1727 colourMenu.add(BLOSUM62Colour);
1728 colourMenu.add(PIDColour);
1729 colourMenu.add(zappoColour);
1730 colourMenu.add(taylorColour);
1731 colourMenu.add(hydrophobicityColour);
1732 colourMenu.add(helixColour);
1733 colourMenu.add(strandColour);
1734 colourMenu.add(turnColour);
1735 colourMenu.add(buriedColour);
1736 colourMenu.add(nucleotideColour);
1737 colourMenu.add(userDefinedColour);
1738 colourMenu.addSeparator();
1739 colourMenu.add(conservationMenuItem);
1740 colourMenu.add(modifyConservation);
1741 colourMenu.add(abovePIDThreshold);
1742 colourMenu.add(modifyPID);
1743 colourMenu.add(annotationColour);
1744 calculateMenu.add(sort);
1745 calculateMenu.add(calculateTree);
1746 calculateMenu.addSeparator();
1747 calculateMenu.add(pairwiseAlignmentMenuItem);
1748 calculateMenu.add(PCAMenuItem);
1749 calculateMenu.addSeparator();
1750 calculateMenu.add(showTranslation);
1751 calculateMenu.add(showProducts);
1752 calculateMenu.add(autoCalculate);
1753 calculateMenu.addSeparator();
1754 calculateMenu.add(extractScores);
1755 webServiceNoServices = new JMenuItem("<No Services>");
1756 webService.add(webServiceNoServices);
1757 pasteMenu.add(pasteNew);
1758 pasteMenu.add(pasteThis);
1759 sort.add(sortIDMenuItem);
1760 sort.add(sortLengthMenuItem);
1761 sort.add(sortGroupMenuItem);
1762 sort.add(sortPairwiseMenuItem);
1763 sort.add(sortByTreeMenu);
1764 calculateTree.add(averageDistanceTreeMenuItem);
1765 calculateTree.add(neighbourTreeMenuItem);
1766 calculateTree.add(avDistanceTreeBlosumMenuItem);
1767 calculateTree.add(njTreeBlosumMenuItem);
1768 jMenu2.add(htmlMenuItem);
1769 jMenu2.add(epsFile);
1770 jMenu2.add(createPNG);
1771 addSequenceMenu.add(addFromFile);
1772 addSequenceMenu.add(addFromText);
1773 addSequenceMenu.add(addFromURL);
1774 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1775 statusPanel.add(statusBar, null);
1776 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1777 jMenu3.add(showAllColumns);
1778 jMenu3.add(showAllSeqs);
1779 jMenu3.add(showAllhidden);
1780 hideMenu.add(hideSelColumns);
1781 hideMenu.add(hideSelSequences);
1782 hideMenu.add(hideAllSelection);
1783 hideMenu.add(hideAllButSelection);
1785 formatMenu.add(font);
1786 formatMenu.addSeparator();
1787 formatMenu.add(wrapMenuItem);
1788 formatMenu.add(scaleAbove);
1789 formatMenu.add(scaleLeft);
1790 formatMenu.add(scaleRight);
1791 formatMenu.add(seqLimits);
1792 formatMenu.add(idRightAlign);
1793 formatMenu.add(hiddenMarkers);
1794 formatMenu.add(viewBoxesMenuItem);
1795 formatMenu.add(viewTextMenuItem);
1796 formatMenu.add(colourTextMenuItem);
1797 formatMenu.add(renderGapsMenuItem);
1798 formatMenu.add(centreColumnLabelsMenuItem);
1799 formatMenu.add(showNonconservedMenuItem);
1800 selectMenu.add(findMenuItem);
1801 selectMenu.addSeparator();
1802 selectMenu.add(selectAllSequenceMenuItem);
1803 selectMenu.add(deselectAllSequenceMenuItem);
1804 selectMenu.add(invertSequenceMenuItem);
1805 selectMenu.add(invertColSel);
1806 selectMenu.add(deleteGroups);
1807 selectMenu.add(grpsFromSelection);
1810 protected void showAllhidden_actionPerformed(ActionEvent e)
1812 // TODO Auto-generated method stub
1816 protected void hideAllButSelection_actionPerformed(ActionEvent e)
1818 // TODO Auto-generated method stub
1822 protected void hideAllSelection_actionPerformed(ActionEvent e)
1824 // TODO Auto-generated method stub
1828 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
1830 // TODO Auto-generated method stub
1834 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
1836 // TODO Auto-generated method stub
1840 protected void showSequenceLogo_actionPerformed(ActionEvent e)
1842 // TODO Auto-generated method stub
1846 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
1848 // TODO Auto-generated method stub
1852 protected void showGroupConsensus_actionPerformed(ActionEvent e)
1854 // TODO Auto-generated method stub
1858 protected void showGroupConservation_actionPerformed(ActionEvent e)
1860 // TODO Auto-generated method stub
1864 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
1866 // TODO Auto-generated method stub
1870 protected void showSeqFeaturesHeight_actionPerformed(
1871 ActionEvent actionEvent)
1873 // TODO Auto-generated method stub
1877 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
1879 // TODO Auto-generated method stub
1883 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
1885 // TODO Auto-generated method stub
1889 protected void followHighlight_actionPerformed()
1891 // TODO Auto-generated method stub
1895 protected void showNpFeats_actionPerformed(ActionEvent e)
1897 // TODO Auto-generated method stub
1901 protected void showDbRefs_actionPerformed(ActionEvent e)
1903 // TODO Auto-generated method stub
1907 protected void centreColumnLabels_actionPerformed(ActionEvent e)
1911 protected void showProducts_actionPerformed(ActionEvent e)
1915 protected void buildSortByAnnotationScoresMenu()
1919 protected void extractScores_actionPerformed(ActionEvent e)
1923 protected void outputText_actionPerformed(ActionEvent e)
1927 public void addFromFile_actionPerformed(ActionEvent e)
1932 public void addFromText_actionPerformed(ActionEvent e)
1937 public void addFromURL_actionPerformed(ActionEvent e)
1942 public void exportFeatures_actionPerformed(ActionEvent e)
1947 public void exportAnnotations_actionPerformed(ActionEvent e)
1952 protected void htmlMenuItem_actionPerformed(ActionEvent e)
1956 protected void closeMenuItem_actionPerformed(boolean b)
1960 protected void redoMenuItem_actionPerformed(ActionEvent e)
1964 protected void undoMenuItem_actionPerformed(ActionEvent e)
1968 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
1972 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
1976 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
1980 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
1984 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
1988 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
1992 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
1996 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2000 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2004 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2008 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2012 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2016 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2020 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2024 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2028 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2032 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2036 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2040 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2044 protected void PCAMenuItem_actionPerformed(ActionEvent e)
2048 protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e)
2052 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2056 protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e)
2060 protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
2064 protected void clustalColour_actionPerformed(ActionEvent e)
2068 protected void zappoColour_actionPerformed(ActionEvent e)
2072 protected void taylorColour_actionPerformed(ActionEvent e)
2076 protected void hydrophobicityColour_actionPerformed(ActionEvent e)
2080 protected void helixColour_actionPerformed(ActionEvent e)
2084 protected void strandColour_actionPerformed(ActionEvent e)
2088 protected void turnColour_actionPerformed(ActionEvent e)
2092 protected void buriedColour_actionPerformed(ActionEvent e)
2096 protected void userDefinedColour_actionPerformed(ActionEvent e)
2100 protected void PIDColour_actionPerformed(ActionEvent e)
2104 protected void BLOSUM62Colour_actionPerformed(ActionEvent e)
2108 protected void noColourmenuItem_actionPerformed(ActionEvent e)
2112 protected void conservationMenuItem_actionPerformed(ActionEvent e)
2116 protected void printMenuItem_actionPerformed(ActionEvent e)
2120 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2124 protected void findMenuItem_actionPerformed(ActionEvent e)
2128 protected void abovePIDThreshold_actionPerformed(ActionEvent e)
2132 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2136 protected void nucleotideColour_actionPerformed(ActionEvent e)
2140 protected void deleteGroups_actionPerformed(ActionEvent e)
2144 protected void copy_actionPerformed(ActionEvent e)
2148 protected void cut_actionPerformed(ActionEvent e)
2152 protected void delete_actionPerformed(ActionEvent e)
2156 protected void pasteNew_actionPerformed(ActionEvent e)
2160 protected void pasteThis_actionPerformed(ActionEvent e)
2164 protected void applyToAllGroups_actionPerformed(ActionEvent e)
2168 public void createPNG(java.io.File f)
2172 protected void font_actionPerformed(ActionEvent e)
2176 protected void seqLimit_actionPerformed(ActionEvent e)
2180 public void seqDBRef_actionPerformed(ActionEvent e)
2185 public void createEPS(java.io.File f)
2189 protected void LoadtreeMenuItem_actionPerformed(ActionEvent e)
2193 protected void jpred_actionPerformed(ActionEvent e)
2197 protected void scaleAbove_actionPerformed(ActionEvent e)
2201 protected void scaleLeft_actionPerformed(ActionEvent e)
2205 protected void scaleRight_actionPerformed(ActionEvent e)
2209 protected void modifyPID_actionPerformed(ActionEvent e)
2213 protected void modifyConservation_actionPerformed(ActionEvent e)
2217 protected void saveAs_actionPerformed(ActionEvent e)
2221 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2225 public void vamsasStore_actionPerformed(ActionEvent e)
2230 public void vamsasLoad_actionPerformed(ActionEvent e)
2235 public void showTranslation_actionPerformed(ActionEvent e)
2240 public void featureSettings_actionPerformed(ActionEvent e)
2245 public void fetchSequence_actionPerformed(ActionEvent e)
2250 public void smoothFont_actionPerformed(ActionEvent e)
2255 public void annotationColour_actionPerformed(ActionEvent e)
2260 public void associatedData_actionPerformed(ActionEvent e)
2265 public void autoCalculate_actionPerformed(ActionEvent e)
2270 public void showAllSeqs_actionPerformed(ActionEvent e)
2275 public void showAllColumns_actionPerformed(ActionEvent e)
2280 public void hideSelSequences_actionPerformed(ActionEvent e)
2285 public void hideSelColumns_actionPerformed(ActionEvent e)
2290 public void hiddenMarkers_actionPerformed(ActionEvent e)
2295 public void findPdbId_actionPerformed(ActionEvent e)
2300 public void enterPdbId_actionPerformed(ActionEvent e)
2305 public void pdbFile_actionPerformed(ActionEvent e)
2310 public void invertColSel_actionPerformed(ActionEvent e)
2315 public void tabSelectionChanged(int sel)
2320 public void tabbedPane_mousePressed(MouseEvent e)
2325 public void tabbedPane_focusGained(FocusEvent e)
2330 public void save_actionPerformed(ActionEvent e)
2335 public void reload_actionPerformed(ActionEvent e)
2340 public void newView_actionPerformed(ActionEvent e)
2345 public void textColour_actionPerformed(ActionEvent e)
2350 public void idRightAlign_actionPerformed(ActionEvent e)
2355 public void expandViews_actionPerformed(ActionEvent e)
2360 public void gatherViews_actionPerformed(ActionEvent e)
2365 public void buildTreeMenu()
2370 public void pageSetup_actionPerformed(ActionEvent e)
2375 public void alignmentProperties()