2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import java.awt.BorderLayout;
24 import java.awt.Color;
25 import java.awt.GridLayout;
26 import java.awt.event.ActionEvent;
27 import java.awt.event.ActionListener;
28 import java.awt.event.FocusAdapter;
29 import java.awt.event.FocusEvent;
30 import java.awt.event.InputEvent;
31 import java.awt.event.KeyEvent;
32 import java.awt.event.MouseAdapter;
33 import java.awt.event.MouseEvent;
34 import java.io.IOException;
35 import java.util.HashMap;
38 import javax.swing.BorderFactory;
39 import javax.swing.ButtonGroup;
40 import javax.swing.JCheckBoxMenuItem;
41 import javax.swing.JInternalFrame;
42 import javax.swing.JLabel;
43 import javax.swing.JMenu;
44 import javax.swing.JMenuBar;
45 import javax.swing.JMenuItem;
46 import javax.swing.JPanel;
47 import javax.swing.JRadioButtonMenuItem;
48 import javax.swing.JTabbedPane;
49 import javax.swing.KeyStroke;
50 import javax.swing.event.ChangeEvent;
51 import javax.swing.event.MenuEvent;
52 import javax.swing.event.MenuListener;
54 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
55 import jalview.analysis.GeneticCodeI;
56 import jalview.analysis.GeneticCodes;
57 import jalview.api.SplitContainerI;
58 import jalview.bin.Cache;
59 import jalview.gui.JvSwingUtils;
60 import jalview.gui.Preferences;
61 import jalview.hmmer.HmmerCommand;
62 import jalview.io.FileFormatException;
63 import jalview.io.FileFormats;
64 import jalview.schemes.ResidueColourScheme;
65 import jalview.util.MessageManager;
66 import jalview.util.Platform;
69 @SuppressWarnings("serial")
70 public class GAlignFrame extends JInternalFrame
72 protected JMenuBar alignFrameMenuBar = new JMenuBar();
74 protected JMenuItem closeMenuItem = new JMenuItem();
76 public JMenu webService = new JMenu();// BH 2019 was protected, but not
77 // sufficient for AlignFrame thread run
78 // JBP - followed suite for these other service related GUI elements.
79 // TODO: check we really need these to be public
80 public JMenu hmmerMenu = new JMenu();
82 public JMenuItem webServiceNoServices;
84 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
86 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
88 protected JMenu sortByAnnotScore = new JMenu();
90 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
92 // AlignFrame.printWriter
94 protected JMenu outputTextboxMenu = new JMenu();
96 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
98 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
100 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
102 protected JMenuItem undoMenuItem = new JMenuItem();
104 protected JMenuItem redoMenuItem = new JMenuItem();
106 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
108 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
110 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
112 JMenuItem copy = new JMenuItem();
114 JMenuItem cut = new JMenuItem();
116 JMenu pasteMenu = new JMenu();
118 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
120 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
122 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
124 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
126 protected JCheckBoxMenuItem applyToAllGroups;
128 protected JMenu colourMenu = new JMenu();
130 protected JMenuItem textColour;
132 protected JCheckBoxMenuItem conservationMenuItem;
134 protected JMenuItem modifyConservation;
136 protected JCheckBoxMenuItem abovePIDThreshold;
138 protected JMenuItem modifyPID;
140 protected JRadioButtonMenuItem annotationColour;
142 protected JMenu sortByTreeMenu = new JMenu();
144 protected JMenu sort = new JMenu();
146 protected JMenuItem calculateTree = new JMenuItem();
148 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
150 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
152 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
154 protected JMenu showTranslation = new JMenu();
156 protected JMenuItem showReverse = new JMenuItem();
158 protected JMenuItem showReverseComplement = new JMenuItem();
160 protected JMenu showProducts = new JMenu();
162 protected JMenuItem runGroovy = new JMenuItem();
164 protected JMenuItem loadVcf;
166 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
168 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
170 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
172 protected JPanel statusPanel = new JPanel();
174 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
176 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
178 protected JMenuItem showAllAlAnnotations = new JMenuItem();
180 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
182 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
184 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
186 protected JTabbedPane tabbedPane = new JTabbedPane();
188 protected JMenuItem reload = new JMenuItem();
190 protected JMenu formatMenu = new JMenu();
192 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
194 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
196 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
198 protected JMenuItem gatherViews = new JMenuItem();
200 protected JMenuItem expandViews = new JMenuItem();
202 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
204 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
206 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
208 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
210 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
212 protected JCheckBoxMenuItem showInformationHistogram = new JCheckBoxMenuItem();
214 protected JCheckBoxMenuItem showHMMSequenceLogo = new JCheckBoxMenuItem();
216 protected JCheckBoxMenuItem normaliseHMMSequenceLogo = new JCheckBoxMenuItem();
218 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
220 protected JMenuItem openFeatureSettings;
222 private SequenceAnnotationOrder annotationSortOrder;
224 private boolean showAutoCalculatedAbove = false;
226 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
228 private SplitContainerI splitFrame;
235 // for Web-page embedding using id=align-frame-div
236 setName(Platform.getAppID("alignment"));
240 setJMenuBar(alignFrameMenuBar);
242 // dynamically fill save as menu with available formats
243 for (String ff : FileFormats.getInstance().getWritableFormats(true))
245 JMenuItem item = new JMenuItem(ff);
247 item.addActionListener(new ActionListener()
250 public void actionPerformed(ActionEvent e)
252 outputText_actionPerformed(e.getActionCommand());
256 outputTextboxMenu.add(item);
258 } catch (Exception e)
260 System.err.println(e.toString());
263 if (Platform.allowMnemonics()) // was "not mac and not JS"
265 closeMenuItem.setMnemonic('C');
266 outputTextboxMenu.setMnemonic('T');
267 undoMenuItem.setMnemonic('Z');
268 redoMenuItem.setMnemonic('0');
269 copy.setMnemonic('C');
270 cut.setMnemonic('U');
271 pasteMenu.setMnemonic('P');
272 reload.setMnemonic('R');
276 private void jbInit() throws Exception
280 JMenuItem saveAs = new JMenuItem(
281 MessageManager.getString("action.save_as"));
282 ActionListener al = new ActionListener()
285 public void actionPerformed(ActionEvent e)
287 saveAs_actionPerformed();
291 // FIXME getDefaultToolkit throws an exception in Headless mode
292 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Platform.SHORTCUT_KEY_MASK | InputEvent.SHIFT_DOWN_MASK,
294 addMenuActionAndAccelerator(keyStroke, saveAs, al);
296 closeMenuItem.setText(MessageManager.getString("action.close"));
297 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W, Platform.SHORTCUT_KEY_MASK, false);
298 al = new ActionListener()
301 public void actionPerformed(ActionEvent e)
303 closeMenuItem_actionPerformed(false);
306 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
308 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
309 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
310 JMenu annotationsMenu = new JMenu(
311 MessageManager.getString("action.annotations"));
312 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
313 colourMenu.setText(MessageManager.getString("action.colour"));
314 JMenu calculateMenu = new JMenu(
315 MessageManager.getString("action.calculate"));
316 webService.setText(MessageManager.getString("action.web_service"));
320 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
321 MessageManager.getString("action.select_all"));
322 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
323 Platform.SHORTCUT_KEY_MASK, false);
324 al = new ActionListener()
327 public void actionPerformed(ActionEvent e)
329 selectAllSequenceMenuItem_actionPerformed(e);
332 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
334 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
335 MessageManager.getString("action.deselect_all"));
336 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
337 al = new ActionListener()
340 public void actionPerformed(ActionEvent e)
342 deselectAllSequenceMenuItem_actionPerformed(e);
345 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
347 JMenuItem invertSequenceMenuItem = new JMenuItem(
348 MessageManager.getString("action.invert_sequence_selection"));
349 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
350 Platform.SHORTCUT_KEY_MASK, false);
351 al = new ActionListener()
354 public void actionPerformed(ActionEvent e)
356 invertSequenceMenuItem_actionPerformed(e);
359 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
361 JMenuItem grpsFromSelection = new JMenuItem(
362 MessageManager.getString("action.make_groups_selection"));
363 grpsFromSelection.addActionListener(new ActionListener()
366 public void actionPerformed(ActionEvent e)
368 makeGrpsFromSelection_actionPerformed(e);
371 JMenuItem expandAlignment = new JMenuItem(
372 MessageManager.getString("action.view_flanking_regions"));
373 expandAlignment.setToolTipText(
374 MessageManager.getString("label.view_flanking_regions"));
375 expandAlignment.addActionListener(new ActionListener()
378 public void actionPerformed(ActionEvent e)
383 JMenuItem remove2LeftMenuItem = new JMenuItem(
384 MessageManager.getString("action.remove_left"));
385 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
386 Platform.SHORTCUT_KEY_MASK, false);
387 al = new ActionListener()
390 public void actionPerformed(ActionEvent e)
392 remove2LeftMenuItem_actionPerformed(e);
395 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
397 JMenuItem remove2RightMenuItem = new JMenuItem(
398 MessageManager.getString("action.remove_right"));
399 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
400 Platform.SHORTCUT_KEY_MASK, false);
401 al = new ActionListener()
404 public void actionPerformed(ActionEvent e)
406 remove2RightMenuItem_actionPerformed(e);
409 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
411 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
412 MessageManager.getString("action.remove_empty_columns"));
413 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
414 Platform.SHORTCUT_KEY_MASK, false);
415 al = new ActionListener()
418 public void actionPerformed(ActionEvent e)
420 removeGappedColumnMenuItem_actionPerformed(e);
423 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
425 JMenuItem removeAllGapsMenuItem = new JMenuItem(
426 MessageManager.getString("action.remove_all_gaps"));
427 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
428 Platform.SHORTCUT_KEY_MASK
429 | InputEvent.SHIFT_DOWN_MASK,
431 al = new ActionListener()
434 public void actionPerformed(ActionEvent e)
436 removeAllGapsMenuItem_actionPerformed(e);
439 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
441 JMenuItem justifyLeftMenuItem = new JMenuItem(
442 MessageManager.getString("action.left_justify_alignment"));
443 justifyLeftMenuItem.addActionListener(new ActionListener()
446 public void actionPerformed(ActionEvent e)
448 justifyLeftMenuItem_actionPerformed(e);
451 JMenuItem justifyRightMenuItem = new JMenuItem(
452 MessageManager.getString("action.right_justify_alignment"));
453 justifyRightMenuItem.addActionListener(new ActionListener()
456 public void actionPerformed(ActionEvent e)
458 justifyRightMenuItem_actionPerformed(e);
461 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
462 viewBoxesMenuItem.setState(true);
463 viewBoxesMenuItem.addActionListener(new ActionListener()
466 public void actionPerformed(ActionEvent e)
468 viewBoxesMenuItem_actionPerformed(e);
471 viewTextMenuItem.setText(MessageManager.getString("action.text"));
472 viewTextMenuItem.setState(true);
473 viewTextMenuItem.addActionListener(new ActionListener()
476 public void actionPerformed(ActionEvent e)
478 viewTextMenuItem_actionPerformed(e);
481 showNonconservedMenuItem
482 .setText(MessageManager.getString("label.show_non_conserved"));
483 showNonconservedMenuItem.setState(false);
484 showNonconservedMenuItem.addActionListener(new ActionListener()
487 public void actionPerformed(ActionEvent e)
489 showUnconservedMenuItem_actionPerformed(e);
492 JMenuItem sortPairwiseMenuItem = new JMenuItem(
493 MessageManager.getString("action.by_pairwise_id"));
494 sortPairwiseMenuItem.addActionListener(new ActionListener()
497 public void actionPerformed(ActionEvent e)
499 sortPairwiseMenuItem_actionPerformed(e);
502 JMenuItem sortIDMenuItem = new JMenuItem(
503 MessageManager.getString("action.by_id"));
504 sortIDMenuItem.addActionListener(new ActionListener()
507 public void actionPerformed(ActionEvent e)
509 sortIDMenuItem_actionPerformed(e);
512 JMenuItem sortLengthMenuItem = new JMenuItem(
513 MessageManager.getString("action.by_length"));
514 sortLengthMenuItem.addActionListener(new ActionListener()
517 public void actionPerformed(ActionEvent e)
519 sortLengthMenuItem_actionPerformed(e);
522 JMenuItem sortGroupMenuItem = new JMenuItem(
523 MessageManager.getString("action.by_group"));
524 sortGroupMenuItem.addActionListener(new ActionListener()
527 public void actionPerformed(ActionEvent e)
529 sortGroupMenuItem_actionPerformed(e);
532 JMenuItem sortEValueMenuItem = new JMenuItem(
533 MessageManager.getString("action.by_evalue"));
534 sortEValueMenuItem.addActionListener(new ActionListener()
537 public void actionPerformed(ActionEvent e)
539 sortEValueMenuItem_actionPerformed(e);
542 JMenuItem sortBitScoreMenuItem = new JMenuItem(
543 MessageManager.getString("action.by_bit_score"));
544 sortBitScoreMenuItem.addActionListener(new ActionListener()
547 public void actionPerformed(ActionEvent e)
549 sortBitScoreMenuItem_actionPerformed(e);
553 JMenuItem removeRedundancyMenuItem = new JMenuItem(
554 MessageManager.getString("action.remove_redundancy"));
555 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
556 Platform.SHORTCUT_KEY_MASK, false);
557 al = new ActionListener()
560 public void actionPerformed(ActionEvent e)
562 removeRedundancyMenuItem_actionPerformed(e);
565 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
567 JMenuItem filterByEValue = new JMenuItem(
568 MessageManager.getString("action.filter_by_evalue"));
569 filterByEValue.addActionListener(new ActionListener()
572 public void actionPerformed(ActionEvent e)
574 filterByEValue_actionPerformed();
579 JMenuItem filterByScore = new JMenuItem(
580 MessageManager.getString("action.filter_by_score"));
581 filterByScore.addActionListener(new ActionListener()
584 public void actionPerformed(ActionEvent e)
586 filterByScore_actionPerformed();
591 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
592 MessageManager.getString("action.pairwise_alignment"));
593 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
596 public void actionPerformed(ActionEvent e)
598 pairwiseAlignmentMenuItem_actionPerformed(e);
602 this.getContentPane().setLayout(new BorderLayout());
603 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
604 statusBar.setBackground(Color.white);
605 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
606 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
607 statusBar.setText(MessageManager.getString("label.status_bar"));
610 .setText(MessageManager.getString("label.out_to_textbox"));
613 annotationPanelMenuItem.setActionCommand("");
614 annotationPanelMenuItem
615 .setText(MessageManager.getString("label.show_annotations"));
616 annotationPanelMenuItem
617 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
618 annotationPanelMenuItem.addActionListener(new ActionListener()
621 public void actionPerformed(ActionEvent e)
623 annotationPanelMenuItem_actionPerformed(e);
626 showAllAlAnnotations.setText(
627 MessageManager.getString("label.show_all_al_annotations"));
628 final boolean isAnnotationPanelShown = annotationPanelMenuItem
630 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
631 showAllAlAnnotations.addActionListener(new ActionListener()
634 public void actionPerformed(ActionEvent e)
636 showAllAnnotations_actionPerformed(false, true);
639 hideAllAlAnnotations.setText(
640 MessageManager.getString("label.hide_all_al_annotations"));
641 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
642 hideAllAlAnnotations.addActionListener(new ActionListener()
645 public void actionPerformed(ActionEvent e)
647 hideAllAnnotations_actionPerformed(false, true);
650 showAllSeqAnnotations.setText(
651 MessageManager.getString("label.show_all_seq_annotations"));
652 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
653 showAllSeqAnnotations.addActionListener(new ActionListener()
656 public void actionPerformed(ActionEvent e)
658 showAllAnnotations_actionPerformed(true, false);
661 hideAllSeqAnnotations.setText(
662 MessageManager.getString("label.hide_all_seq_annotations"));
663 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
664 hideAllSeqAnnotations.addActionListener(new ActionListener()
667 public void actionPerformed(ActionEvent e)
669 hideAllAnnotations_actionPerformed(true, false);
672 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
673 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
674 SequenceAnnotationOrder.NONE.name()));
675 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
676 MessageManager.getString("label.sort_annotations_by_sequence"));
677 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
678 MessageManager.getString("label.sort_annotations_by_label"));
681 sortAnnBySequence.setSelected(
682 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
683 sortAnnBySequence.addActionListener(new ActionListener()
686 public void actionPerformed(ActionEvent e)
688 boolean newState = sortAnnBySequence.getState();
689 sortAnnByLabel.setSelected(false);
690 setAnnotationSortOrder(
691 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
692 : SequenceAnnotationOrder.NONE);
693 sortAnnotations_actionPerformed();
696 sortAnnByLabel.setSelected(
697 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
698 sortAnnByLabel.addActionListener(new ActionListener()
701 public void actionPerformed(ActionEvent e)
703 boolean newState = sortAnnByLabel.getState();
704 sortAnnBySequence.setSelected(false);
705 setAnnotationSortOrder(
706 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
707 : SequenceAnnotationOrder.NONE);
708 sortAnnotations_actionPerformed();
711 colourTextMenuItem = new JCheckBoxMenuItem(
712 MessageManager.getString("label.colour_text"));
713 colourTextMenuItem.addActionListener(new ActionListener()
716 public void actionPerformed(ActionEvent e)
718 colourTextMenuItem_actionPerformed(e);
722 JMenuItem htmlMenuItem = new JMenuItem(
723 MessageManager.getString("label.html"));
724 htmlMenuItem.addActionListener(new ActionListener()
727 public void actionPerformed(ActionEvent e)
729 htmlMenuItem_actionPerformed(e);
733 JMenuItem createBioJS = new JMenuItem(
734 MessageManager.getString("label.biojs_html_export"));
735 createBioJS.addActionListener(new java.awt.event.ActionListener()
738 public void actionPerformed(ActionEvent e)
740 bioJSMenuItem_actionPerformed(e);
744 JMenuItem overviewMenuItem = new JMenuItem(
745 MessageManager.getString("label.overview_window"));
746 overviewMenuItem.addActionListener(new ActionListener()
749 public void actionPerformed(ActionEvent e)
751 overviewMenuItem_actionPerformed(e);
755 undoMenuItem.setEnabled(false);
756 undoMenuItem.setText(MessageManager.getString("action.undo"));
757 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
758 Platform.SHORTCUT_KEY_MASK, false);
759 al = new ActionListener()
762 public void actionPerformed(ActionEvent e)
764 undoMenuItem_actionPerformed(e);
767 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
769 redoMenuItem.setEnabled(false);
770 redoMenuItem.setText(MessageManager.getString("action.redo"));
771 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
772 Platform.SHORTCUT_KEY_MASK, false);
773 al = new ActionListener()
776 public void actionPerformed(ActionEvent e)
778 redoMenuItem_actionPerformed(e);
781 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
783 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
784 wrapMenuItem.addActionListener(new ActionListener()
787 public void actionPerformed(ActionEvent e)
789 wrapMenuItem_actionPerformed(e);
793 JMenuItem printMenuItem = new JMenuItem(
794 MessageManager.getString("action.print"));
795 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
796 Platform.SHORTCUT_KEY_MASK, false);
797 al = new ActionListener()
800 public void actionPerformed(ActionEvent e)
802 printMenuItem_actionPerformed(e);
805 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
808 .setText(MessageManager.getString("action.show_gaps"));
809 renderGapsMenuItem.setState(true);
810 renderGapsMenuItem.addActionListener(new ActionListener()
813 public void actionPerformed(ActionEvent e)
815 renderGapsMenuItem_actionPerformed(e);
819 JMenuItem findMenuItem = new JMenuItem(
820 MessageManager.getString("action.find"));
821 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
822 Platform.SHORTCUT_KEY_MASK, false);
823 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
824 MessageManager.getString("label.find_tip")));
825 al = new ActionListener()
828 public void actionPerformed(ActionEvent e)
830 findMenuItem_actionPerformed(e);
833 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
835 showSeqFeatures.setText(
836 MessageManager.getString("label.show_sequence_features"));
838 showSeqFeatures.addActionListener(new ActionListener()
841 public void actionPerformed(ActionEvent actionEvent)
843 showSeqFeatures_actionPerformed(actionEvent);
847 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
848 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
849 * void actionPerformed(ActionEvent actionEvent) {
850 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
853 .setText(MessageManager.getString("label.show_database_refs"));
854 showDbRefsMenuitem.addActionListener(new ActionListener()
858 public void actionPerformed(ActionEvent e)
860 showDbRefs_actionPerformed(e);
864 showNpFeatsMenuitem.setText(
865 MessageManager.getString("label.show_non_positional_features"));
866 showNpFeatsMenuitem.addActionListener(new ActionListener()
870 public void actionPerformed(ActionEvent e)
872 showNpFeats_actionPerformed(e);
876 showGroupConservation
877 .setText(MessageManager.getString("label.group_conservation"));
878 showGroupConservation.addActionListener(new ActionListener()
882 public void actionPerformed(ActionEvent e)
884 showGroupConservation_actionPerformed(e);
890 .setText(MessageManager.getString("label.group_consensus"));
891 showGroupConsensus.addActionListener(new ActionListener()
895 public void actionPerformed(ActionEvent e)
897 showGroupConsensus_actionPerformed(e);
901 showConsensusHistogram.setText(
902 MessageManager.getString("label.show_consensus_histogram"));
903 showConsensusHistogram.addActionListener(new ActionListener()
907 public void actionPerformed(ActionEvent e)
909 showConsensusHistogram_actionPerformed(e);
914 .setText(MessageManager.getString("label.show_consensus_logo"));
915 showSequenceLogo.addActionListener(new ActionListener()
919 public void actionPerformed(ActionEvent e)
921 showSequenceLogo_actionPerformed(e);
925 normaliseSequenceLogo
926 .setText(MessageManager.getString("label.norm_consensus_logo"));
927 normaliseSequenceLogo.addActionListener(new ActionListener()
931 public void actionPerformed(ActionEvent e)
933 normaliseSequenceLogo_actionPerformed(e);
937 applyAutoAnnotationSettings
938 .setText(MessageManager.getString("label.apply_all_groups"));
939 applyAutoAnnotationSettings.setState(false);
940 applyAutoAnnotationSettings.setVisible(true);
941 applyAutoAnnotationSettings.addActionListener(new ActionListener()
944 public void actionPerformed(ActionEvent e)
946 applyAutoAnnotationSettings_actionPerformed(e);
950 ButtonGroup buttonGroup = new ButtonGroup();
951 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
952 MessageManager.getString("label.show_first"));
953 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
954 MessageManager.getString("label.show_last"));
955 buttonGroup.add(showAutoFirst);
956 buttonGroup.add(showAutoLast);
957 final boolean autoFirst = Cache
958 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
959 showAutoFirst.setSelected(autoFirst);
960 setShowAutoCalculatedAbove(autoFirst);
961 showAutoFirst.addActionListener(new ActionListener()
964 public void actionPerformed(ActionEvent e)
966 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
967 sortAnnotations_actionPerformed();
970 showAutoLast.setSelected(!showAutoFirst.isSelected());
971 showAutoLast.addActionListener(new ActionListener()
974 public void actionPerformed(ActionEvent e)
976 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
977 sortAnnotations_actionPerformed();
981 JMenuItem deleteGroups = new JMenuItem(
982 MessageManager.getString("action.undefine_groups"));
983 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
984 Platform.SHORTCUT_KEY_MASK, false);
985 al = new ActionListener()
988 public void actionPerformed(ActionEvent e)
990 deleteGroups_actionPerformed(e);
993 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
995 JMenuItem annotationColumn = new JMenuItem(
996 MessageManager.getString("action.select_by_annotation"));
997 annotationColumn.addActionListener(new ActionListener()
1000 public void actionPerformed(ActionEvent e)
1002 annotationColumn_actionPerformed(e);
1006 JMenuItem createGroup = new JMenuItem(
1007 MessageManager.getString("action.create_group"));
1008 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
1009 Platform.SHORTCUT_KEY_MASK, false);
1010 al = new ActionListener()
1013 public void actionPerformed(ActionEvent e)
1015 createGroup_actionPerformed(e);
1018 addMenuActionAndAccelerator(keyStroke, createGroup, al);
1020 JMenuItem unGroup = new JMenuItem(
1021 MessageManager.getString("action.remove_group"));
1022 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
1023 Platform.SHORTCUT_KEY_MASK
1024 | InputEvent.SHIFT_DOWN_MASK,
1026 al = new ActionListener()
1029 public void actionPerformed(ActionEvent e)
1031 unGroup_actionPerformed(e);
1034 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1036 copy.setText(MessageManager.getString("action.copy"));
1037 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1038 Platform.SHORTCUT_KEY_MASK, false);
1040 al = new ActionListener()
1043 public void actionPerformed(ActionEvent e)
1045 copy_actionPerformed();
1048 addMenuActionAndAccelerator(keyStroke, copy, al);
1050 cut.setText(MessageManager.getString("action.cut"));
1051 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1052 Platform.SHORTCUT_KEY_MASK, false);
1053 al = new ActionListener()
1056 public void actionPerformed(ActionEvent e)
1058 cut_actionPerformed();
1061 addMenuActionAndAccelerator(keyStroke, cut, al);
1063 JMenuItem delete = new JMenuItem(
1064 MessageManager.getString("action.delete"));
1065 delete.addActionListener(new ActionListener()
1068 public void actionPerformed(ActionEvent e)
1070 delete_actionPerformed();
1074 pasteMenu.setText(MessageManager.getString("action.paste"));
1075 JMenuItem pasteNew = new JMenuItem(
1076 MessageManager.getString("label.to_new_alignment"));
1077 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1078 Platform.SHORTCUT_KEY_MASK
1079 | InputEvent.SHIFT_DOWN_MASK,
1081 al = new ActionListener()
1084 public void actionPerformed(ActionEvent e)
1088 pasteNew_actionPerformed(e);
1089 } catch (IOException | InterruptedException e1)
1091 // TODO Auto-generated catch block
1092 e1.printStackTrace();
1096 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1098 JMenuItem pasteThis = new JMenuItem(
1099 MessageManager.getString("label.to_this_alignment"));
1100 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1101 Platform.SHORTCUT_KEY_MASK, false);
1102 al = new ActionListener()
1105 public void actionPerformed(ActionEvent e)
1109 pasteThis_actionPerformed(e);
1110 } catch (IOException | InterruptedException e1)
1112 // TODO Auto-generated catch block
1113 e1.printStackTrace();
1117 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1119 JMenuItem createPNG = new JMenuItem("PNG");
1120 createPNG.addActionListener(new ActionListener()
1123 public void actionPerformed(ActionEvent e)
1128 createPNG.setActionCommand(
1129 MessageManager.getString("label.save_png_image"));
1130 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1131 font.addActionListener(new ActionListener()
1134 public void actionPerformed(ActionEvent e)
1136 font_actionPerformed(e);
1140 MessageManager.getString("label.show_sequence_limits"));
1141 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1142 seqLimits.addActionListener(new ActionListener()
1145 public void actionPerformed(ActionEvent e)
1147 seqLimit_actionPerformed(e);
1150 JMenuItem epsFile = new JMenuItem("EPS");
1151 epsFile.addActionListener(new ActionListener()
1154 public void actionPerformed(ActionEvent e)
1160 JMenuItem createSVG = new JMenuItem("SVG");
1161 createSVG.addActionListener(new ActionListener()
1164 public void actionPerformed(ActionEvent e)
1170 JMenuItem loadTreeMenuItem = new JMenuItem(
1171 MessageManager.getString("label.load_associated_tree"));
1172 loadTreeMenuItem.setActionCommand(
1173 MessageManager.getString("label.load_tree_for_sequence_set"));
1174 loadTreeMenuItem.addActionListener(new ActionListener()
1177 public void actionPerformed(ActionEvent e)
1179 loadTreeMenuItem_actionPerformed(e);
1183 scaleAbove.setVisible(false);
1184 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1185 scaleAbove.addActionListener(new ActionListener()
1188 public void actionPerformed(ActionEvent e)
1190 scaleAbove_actionPerformed(e);
1193 scaleLeft.setVisible(false);
1194 scaleLeft.setSelected(true);
1195 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1196 scaleLeft.addActionListener(new ActionListener()
1199 public void actionPerformed(ActionEvent e)
1201 scaleLeft_actionPerformed(e);
1204 scaleRight.setVisible(false);
1205 scaleRight.setSelected(true);
1206 scaleRight.setText(MessageManager.getString("action.scale_right"));
1207 scaleRight.addActionListener(new ActionListener()
1210 public void actionPerformed(ActionEvent e)
1212 scaleRight_actionPerformed(e);
1215 centreColumnLabelsMenuItem.setVisible(true);
1216 centreColumnLabelsMenuItem.setState(false);
1217 centreColumnLabelsMenuItem.setText(
1218 MessageManager.getString("label.centre_column_labels"));
1219 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1222 public void actionPerformed(ActionEvent e)
1224 centreColumnLabels_actionPerformed(e);
1227 followHighlightMenuItem.setVisible(true);
1228 followHighlightMenuItem.setState(true);
1229 followHighlightMenuItem
1230 .setText(MessageManager.getString("label.automatic_scrolling"));
1231 followHighlightMenuItem.addActionListener(new ActionListener()
1235 public void actionPerformed(ActionEvent e)
1237 followHighlight_actionPerformed();
1243 .setText(MessageManager.getString("action.by_tree_order"));
1244 sort.setText(MessageManager.getString("action.sort"));
1245 sort.addMenuListener(new MenuListener()
1248 public void menuSelected(MenuEvent e)
1250 enableSortMenuOptions();
1254 public void menuDeselected(MenuEvent e)
1259 public void menuCanceled(MenuEvent e)
1263 sortByTreeMenu.addMenuListener(new MenuListener()
1266 public void menuSelected(MenuEvent e)
1268 buildTreeSortMenu();
1272 public void menuDeselected(MenuEvent e)
1277 public void menuCanceled(MenuEvent e)
1282 .setText(MessageManager.getString("label.sort_by_score"));
1283 sort.add(sortByAnnotScore);
1284 sort.addMenuListener(new javax.swing.event.MenuListener()
1288 public void menuCanceled(MenuEvent e)
1293 public void menuDeselected(MenuEvent e)
1298 public void menuSelected(MenuEvent e)
1300 buildSortByAnnotationScoresMenu();
1303 sortByAnnotScore.setVisible(false);
1306 .setText(MessageManager.getString("action.calculate_tree_pca"));
1308 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1310 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1311 padGapsMenuitem.addActionListener(new ActionListener()
1314 public void actionPerformed(ActionEvent e)
1316 padGapsMenuitem_actionPerformed(e);
1319 JMenuItem vamsasStore = new JMenuItem(
1320 MessageManager.getString("label.vamsas_store"));
1321 vamsasStore.setVisible(false);
1322 vamsasStore.addActionListener(new ActionListener()
1325 public void actionPerformed(ActionEvent e)
1327 vamsasStore_actionPerformed(e);
1332 * Translate as cDNA with sub-menu of translation tables
1335 .setText(MessageManager.getString("label.translate_cDNA"));
1336 boolean first = true;
1337 for (final GeneticCodeI table : GeneticCodes.getInstance()
1340 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1341 showTranslation.add(item);
1342 item.addActionListener(new ActionListener()
1345 public void actionPerformed(ActionEvent e)
1347 showTranslation_actionPerformed(table);
1352 showTranslation.addSeparator();
1357 showReverse.setText(MessageManager.getString("label.reverse"));
1358 showReverse.addActionListener(new ActionListener()
1361 public void actionPerformed(ActionEvent e)
1363 showReverse_actionPerformed(false);
1366 showReverseComplement
1367 .setText(MessageManager.getString("label.reverse_complement"));
1368 showReverseComplement.addActionListener(new ActionListener()
1371 public void actionPerformed(ActionEvent e)
1373 showReverse_actionPerformed(true);
1377 JMenuItem extractScores = new JMenuItem(
1378 MessageManager.getString("label.extract_scores"));
1379 extractScores.addActionListener(new ActionListener()
1382 public void actionPerformed(ActionEvent e)
1384 extractScores_actionPerformed(e);
1387 extractScores.setVisible(true);
1388 // JBPNote: TODO: make gui for regex based score extraction
1390 // for show products actions see AlignFrame.canShowProducts
1391 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1393 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1394 runGroovy.setToolTipText(
1395 MessageManager.getString("label.run_groovy_tip"));
1396 runGroovy.addActionListener(new ActionListener()
1399 public void actionPerformed(ActionEvent e)
1401 runGroovy_actionPerformed();
1405 openFeatureSettings = new JMenuItem(
1406 MessageManager.getString("action.feature_settings"));
1407 openFeatureSettings.addActionListener(new ActionListener()
1410 public void actionPerformed(ActionEvent e)
1412 featureSettings_actionPerformed(e);
1417 * add sub-menu of database we can fetch from
1419 JMenuItem fetchSequence = new JMenuItem(
1420 MessageManager.getString("label.fetch_sequences"));
1421 fetchSequence.addActionListener(new ActionListener()
1424 public void actionPerformed(ActionEvent e)
1426 fetchSequence_actionPerformed();
1430 JMenuItem associatedData = new JMenuItem(
1431 MessageManager.getString("label.load_features_annotations"));
1432 associatedData.addActionListener(new ActionListener()
1435 public void actionPerformed(ActionEvent e)
1439 associatedData_actionPerformed(e);
1440 } catch (IOException | InterruptedException e1)
1442 // TODO Auto-generated catch block
1443 e1.printStackTrace();
1447 loadVcf = new JMenuItem(
1448 MessageManager.getString("label.load_vcf_file"));
1449 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1450 loadVcf.addActionListener(new ActionListener()
1453 public void actionPerformed(ActionEvent e)
1455 loadVcf_actionPerformed();
1458 autoCalculate.setText(
1459 MessageManager.getString("label.autocalculate_consensus"));
1460 autoCalculate.setState(
1461 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1462 autoCalculate.addActionListener(new ActionListener()
1465 public void actionPerformed(ActionEvent e)
1467 autoCalculate_actionPerformed(e);
1471 MessageManager.getString("label.sort_alignment_new_tree"));
1472 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1473 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1475 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1476 sortByTree.addActionListener(new ActionListener()
1479 public void actionPerformed(ActionEvent e)
1481 sortByTreeOption_actionPerformed(e);
1485 listenToViewSelections.setText(
1486 MessageManager.getString("label.listen_for_selections"));
1487 listenToViewSelections
1488 .setToolTipText("<html>" + MessageManager.getString(
1489 "label.selections_mirror_selections_made_same_sequences_other_views"));
1490 listenToViewSelections.setState(false);
1491 listenToViewSelections.addActionListener(new ActionListener()
1494 public void actionPerformed(ActionEvent e)
1496 listenToViewSelections_actionPerformed(e);
1500 JMenu addSequenceMenu = new JMenu(
1501 MessageManager.getString("label.add_sequences"));
1502 JMenuItem addFromFile = new JMenuItem(
1503 MessageManager.getString("label.from_file"));
1504 addFromFile.addActionListener(new ActionListener()
1507 public void actionPerformed(ActionEvent e)
1509 addFromFile_actionPerformed(e);
1512 JMenuItem addFromText = new JMenuItem(
1513 MessageManager.getString("label.from_textbox"));
1514 addFromText.addActionListener(new ActionListener()
1517 public void actionPerformed(ActionEvent e)
1519 addFromText_actionPerformed(e);
1522 JMenuItem addFromURL = new JMenuItem(
1523 MessageManager.getString("label.from_url"));
1524 addFromURL.addActionListener(new ActionListener()
1527 public void actionPerformed(ActionEvent e)
1529 addFromURL_actionPerformed(e);
1532 JMenuItem exportFeatures = new JMenuItem(
1533 MessageManager.getString("label.export_features"));
1534 exportFeatures.addActionListener(new ActionListener()
1537 public void actionPerformed(ActionEvent e)
1539 exportFeatures_actionPerformed(e);
1542 JMenuItem exportAnnotations = new JMenuItem(
1543 MessageManager.getString("label.export_annotations"));
1544 exportAnnotations.addActionListener(new ActionListener()
1547 public void actionPerformed(ActionEvent e)
1549 exportAnnotations_actionPerformed(e);
1552 statusPanel.setLayout(new GridLayout());
1553 JMenuItem showAllSeqs = new JMenuItem(
1554 MessageManager.getString("label.all_sequences"));
1555 showAllSeqs.setToolTipText(
1556 MessageManager.getString("label.toggle_sequence_visibility"));
1557 showAllSeqs.addActionListener(new ActionListener()
1560 public void actionPerformed(ActionEvent e)
1562 showAllSeqs_actionPerformed(e);
1565 JMenuItem showAllColumns = new JMenuItem(
1566 MessageManager.getString("label.all_columns"));
1567 showAllColumns.setToolTipText(
1568 MessageManager.getString("label.toggle_columns_visibility"));
1569 showAllColumns.addActionListener(new ActionListener()
1572 public void actionPerformed(ActionEvent e)
1574 showAllColumns_actionPerformed(e);
1577 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1578 JMenuItem hideSelSequences = new JMenuItem(
1579 MessageManager.getString("label.selected_sequences"));
1580 hideSelSequences.setToolTipText(
1581 MessageManager.getString("label.toggle_sequence_visibility"));
1582 hideSelSequences.addActionListener(new ActionListener()
1585 public void actionPerformed(ActionEvent e)
1587 hideSelSequences_actionPerformed(e);
1590 JMenuItem hideSelColumns = new JMenuItem(
1591 MessageManager.getString("label.selected_columns"));
1592 hideSelColumns.setToolTipText(
1593 MessageManager.getString("label.toggle_columns_visibility"));
1594 hideSelColumns.addActionListener(new ActionListener()
1597 public void actionPerformed(ActionEvent e)
1599 hideSelColumns_actionPerformed(e);
1602 JMenuItem hideAllSelection = new JMenuItem(
1603 MessageManager.getString("label.selected_region"));
1604 hideAllSelection.addActionListener(new ActionListener()
1607 public void actionPerformed(ActionEvent e)
1609 hideAllSelection_actionPerformed(e);
1612 // TODO: should be hidden if no selection exists.
1613 JMenuItem hideAllButSelection = new JMenuItem(
1614 MessageManager.getString("label.all_but_selected_region"));
1615 hideAllButSelection.addActionListener(new ActionListener()
1618 public void actionPerformed(ActionEvent e)
1620 hideAllButSelection_actionPerformed(e);
1623 JMenuItem showAllhidden = new JMenuItem(
1624 MessageManager.getString("label.all_sequences_columns"));
1625 showAllhidden.setToolTipText(MessageManager
1626 .getString("label.toggles_visibility_hidden_selected_regions"));
1627 showAllhidden.addActionListener(new ActionListener()
1630 public void actionPerformed(ActionEvent e)
1632 showAllhidden_actionPerformed(e);
1635 hiddenMarkers.setText(
1636 MessageManager.getString("action.show_hidden_markers"));
1637 hiddenMarkers.addActionListener(new ActionListener()
1640 public void actionPerformed(ActionEvent e)
1642 hiddenMarkers_actionPerformed(e);
1646 JMenuItem invertColSel = new JMenuItem(
1647 MessageManager.getString("action.invert_column_selection"));
1648 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1649 Platform.SHORTCUT_KEY_MASK
1650 | InputEvent.ALT_DOWN_MASK,
1652 al = new ActionListener()
1655 public void actionPerformed(ActionEvent e)
1657 invertColSel_actionPerformed(e);
1660 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1662 showComplementMenuItem.setVisible(false);
1663 showComplementMenuItem.addActionListener(new ActionListener()
1666 public void actionPerformed(ActionEvent e)
1668 showComplement_actionPerformed(showComplementMenuItem.getState());
1672 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1675 public void stateChanged(ChangeEvent evt)
1677 JTabbedPane pane = (JTabbedPane) evt.getSource();
1678 int sel = pane.getSelectedIndex();
1679 tabSelectionChanged(sel);
1682 tabbedPane.addMouseListener(new MouseAdapter()
1685 public void mousePressed(MouseEvent e)
1687 if (e.isPopupTrigger()) // Mac
1689 tabbedPane_mousePressed(e);
1694 public void mouseReleased(MouseEvent e)
1696 if (e.isPopupTrigger()) // Windows
1698 tabbedPane_mousePressed(e);
1702 tabbedPane.addFocusListener(new FocusAdapter()
1705 public void focusGained(FocusEvent e)
1707 tabbedPane_focusGained(e);
1711 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1712 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1713 Platform.SHORTCUT_KEY_MASK, false);
1714 al = new ActionListener()
1717 public void actionPerformed(ActionEvent e)
1719 save_actionPerformed(e);
1722 addMenuActionAndAccelerator(keyStroke, save, al);
1724 reload.setEnabled(false);
1725 reload.setText(MessageManager.getString("action.reload"));
1726 reload.addActionListener(new ActionListener()
1729 public void actionPerformed(ActionEvent e)
1731 reload_actionPerformed(e);
1735 JMenuItem newView = new JMenuItem(
1736 MessageManager.getString("action.new_view"));
1737 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1738 Platform.SHORTCUT_KEY_MASK, false);
1739 al = new ActionListener()
1742 public void actionPerformed(ActionEvent e)
1744 newView_actionPerformed(e);
1747 addMenuActionAndAccelerator(keyStroke, newView, al);
1749 tabbedPane.setToolTipText("<html><i>"
1750 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1753 formatMenu.setText(MessageManager.getString("action.format"));
1754 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1756 idRightAlign.setText(
1757 MessageManager.getString("label.right_align_sequence_id"));
1758 idRightAlign.addActionListener(new ActionListener()
1761 public void actionPerformed(ActionEvent e)
1763 idRightAlign_actionPerformed(e);
1767 gatherViews.setEnabled(false);
1768 gatherViews.setText(MessageManager.getString("action.gather_views"));
1769 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1770 al = new ActionListener()
1773 public void actionPerformed(ActionEvent e)
1775 gatherViews_actionPerformed(e);
1778 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1780 expandViews.setEnabled(false);
1781 expandViews.setText(MessageManager.getString("action.expand_views"));
1782 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1783 al = new ActionListener()
1786 public void actionPerformed(ActionEvent e)
1788 expandViews_actionPerformed(e);
1791 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1793 JMenuItem pageSetup = new JMenuItem(
1794 MessageManager.getString("action.page_setup"));
1795 pageSetup.addActionListener(new ActionListener()
1798 public void actionPerformed(ActionEvent e)
1800 pageSetup_actionPerformed(e);
1803 JMenuItem alignmentProperties = new JMenuItem(
1804 MessageManager.getString("label.alignment_props"));
1805 alignmentProperties.addActionListener(new ActionListener()
1808 public void actionPerformed(ActionEvent actionEvent)
1810 alignmentProperties();
1813 JMenuItem selectHighlighted = new JMenuItem(
1814 MessageManager.getString("action.select_highlighted_columns"));
1815 selectHighlighted.setToolTipText(JvSwingUtils.wrapTooltip(true,
1816 MessageManager.getString("tooltip.select_highlighted_columns")));
1817 al = new ActionListener()
1820 public void actionPerformed(ActionEvent actionEvent)
1822 selectHighlightedColumns_actionPerformed(actionEvent);
1825 JMenuItem Filter = new JMenuItem(
1826 MessageManager.getString("action.select_highlighted_columns"));
1827 selectHighlighted.setToolTipText(
1828 MessageManager.getString("tooltip.select_highlighted_columns"));
1829 al = new ActionListener()
1832 public void actionPerformed(ActionEvent actionEvent)
1834 selectHighlightedColumns_actionPerformed(actionEvent);
1837 selectHighlighted.addActionListener(al);
1838 JMenu tooltipSettingsMenu = new JMenu(
1839 MessageManager.getString("label.sequence_id_tooltip"));
1840 JMenu autoAnnMenu = new JMenu(
1841 MessageManager.getString("label.autocalculated_annotation"));
1843 JMenu exportImageMenu = new JMenu(
1844 MessageManager.getString("label.export_image"));
1845 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1846 alignFrameMenuBar.add(fileMenu);
1847 alignFrameMenuBar.add(editMenu);
1848 alignFrameMenuBar.add(selectMenu);
1849 alignFrameMenuBar.add(viewMenu);
1850 alignFrameMenuBar.add(annotationsMenu);
1851 alignFrameMenuBar.add(formatMenu);
1852 alignFrameMenuBar.add(colourMenu);
1853 alignFrameMenuBar.add(calculateMenu);
1854 alignFrameMenuBar.add(webService);
1855 if (!Platform.isJS())
1857 alignFrameMenuBar.add(hmmerMenu);
1860 fileMenu.add(fetchSequence);
1861 fileMenu.add(addSequenceMenu);
1862 fileMenu.add(reload);
1863 fileMenu.addSeparator();
1864 fileMenu.add(vamsasStore);
1866 fileMenu.add(saveAs);
1867 fileMenu.add(outputTextboxMenu);
1868 fileMenu.add(pageSetup);
1869 fileMenu.add(printMenuItem);
1870 fileMenu.addSeparator();
1871 fileMenu.add(exportImageMenu);
1872 fileMenu.add(exportFeatures);
1873 fileMenu.add(exportAnnotations);
1874 fileMenu.add(loadTreeMenuItem);
1875 fileMenu.add(associatedData);
1876 if (!Platform.isJS())
1878 fileMenu.add(loadVcf);
1880 fileMenu.addSeparator();
1881 fileMenu.add(closeMenuItem);
1883 pasteMenu.add(pasteNew);
1884 pasteMenu.add(pasteThis);
1885 editMenu.add(undoMenuItem);
1886 editMenu.add(redoMenuItem);
1889 editMenu.add(pasteMenu);
1890 editMenu.add(delete);
1891 editMenu.addSeparator();
1892 editMenu.add(remove2LeftMenuItem);
1893 editMenu.add(remove2RightMenuItem);
1894 editMenu.add(removeGappedColumnMenuItem);
1895 editMenu.add(removeAllGapsMenuItem);
1896 editMenu.add(removeRedundancyMenuItem);
1897 editMenu.addSeparator();
1898 // dont add these yet in the CVS build - they cannot be undone!
1899 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1900 // editMenu.add(justifyLeftMenuItem);
1901 // editMenu.add(justifyRightMenuItem);
1902 // editMenu.addSeparator();
1903 editMenu.add(padGapsMenuitem);
1904 editMenu.addSeparator();
1905 editMenu.add(filterByEValue);
1906 editMenu.add(filterByScore);
1908 showMenu.add(showAllColumns);
1909 showMenu.add(showAllSeqs);
1910 showMenu.add(showAllhidden);
1911 hideMenu.add(hideSelColumns);
1912 hideMenu.add(hideSelSequences);
1913 hideMenu.add(hideAllSelection);
1914 hideMenu.add(hideAllButSelection);
1915 viewMenu.add(newView);
1916 viewMenu.add(expandViews);
1917 viewMenu.add(gatherViews);
1918 viewMenu.addSeparator();
1919 viewMenu.add(showMenu);
1920 viewMenu.add(hideMenu);
1921 viewMenu.add(showComplementMenuItem);
1922 viewMenu.addSeparator();
1923 viewMenu.add(followHighlightMenuItem);
1924 viewMenu.addSeparator();
1925 viewMenu.add(showSeqFeatures);
1926 // viewMenu.add(showSeqFeaturesHeight);
1927 viewMenu.add(openFeatureSettings);
1928 tooltipSettingsMenu.add(showDbRefsMenuitem);
1929 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1930 viewMenu.add(tooltipSettingsMenu);
1931 viewMenu.addSeparator();
1932 viewMenu.add(alignmentProperties);
1933 viewMenu.addSeparator();
1934 viewMenu.add(overviewMenuItem);
1936 annotationsMenu.add(annotationPanelMenuItem);
1937 annotationsMenu.addSeparator();
1938 annotationsMenu.add(showAllAlAnnotations);
1939 annotationsMenu.add(hideAllAlAnnotations);
1940 annotationsMenu.addSeparator();
1941 annotationsMenu.add(showAllSeqAnnotations);
1942 annotationsMenu.add(hideAllSeqAnnotations);
1943 annotationsMenu.add(sortAnnBySequence);
1944 annotationsMenu.add(sortAnnByLabel);
1945 annotationsMenu.addSeparator();
1946 autoAnnMenu.add(showAutoFirst);
1947 autoAnnMenu.add(showAutoLast);
1948 autoAnnMenu.addSeparator();
1949 autoAnnMenu.add(applyAutoAnnotationSettings);
1950 autoAnnMenu.add(showConsensusHistogram);
1951 autoAnnMenu.add(showSequenceLogo);
1952 autoAnnMenu.add(normaliseSequenceLogo);
1953 autoAnnMenu.addSeparator();
1954 autoAnnMenu.add(showGroupConservation);
1955 autoAnnMenu.add(showGroupConsensus);
1956 annotationsMenu.add(autoAnnMenu);
1958 sort.add(sortIDMenuItem);
1959 sort.add(sortLengthMenuItem);
1960 sort.add(sortGroupMenuItem);
1961 sort.add(sortPairwiseMenuItem);
1962 sort.add(sortEValueMenuItem);
1963 sort.add(sortBitScoreMenuItem);
1964 sort.add(sortByTreeMenu);
1965 calculateMenu.add(sort);
1966 calculateMenu.add(calculateTree);
1967 calculateMenu.addSeparator();
1968 calculateMenu.add(pairwiseAlignmentMenuItem);
1969 calculateMenu.addSeparator();
1970 calculateMenu.add(showTranslation);
1971 calculateMenu.add(showReverse);
1972 calculateMenu.add(showReverseComplement);
1973 calculateMenu.add(showProducts);
1974 calculateMenu.add(autoCalculate);
1975 calculateMenu.add(sortByTree);
1976 calculateMenu.addSeparator();
1977 calculateMenu.add(expandAlignment);
1978 calculateMenu.add(extractScores);
1979 if (!Platform.isJS())
1981 calculateMenu.addSeparator();
1982 calculateMenu.add(runGroovy);
1984 webServiceNoServices = new JMenuItem(
1985 MessageManager.getString("label.no_services"));
1986 webService.add(webServiceNoServices);
1987 if (!Platform.isJS())
1989 exportImageMenu.add(htmlMenuItem);
1991 exportImageMenu.add(epsFile);
1992 exportImageMenu.add(createPNG);
1993 if (!Platform.isJS())
1995 exportImageMenu.add(createBioJS);
1996 exportImageMenu.add(createSVG);
1998 addSequenceMenu.add(addFromFile);
1999 addSequenceMenu.add(addFromText);
2000 addSequenceMenu.add(addFromURL);
2001 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
2002 statusPanel.add(statusBar, null);
2003 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
2005 formatMenu.add(font);
2006 formatMenu.addSeparator();
2007 formatMenu.add(wrapMenuItem);
2008 formatMenu.add(scaleAbove);
2009 formatMenu.add(scaleLeft);
2010 formatMenu.add(scaleRight);
2011 formatMenu.add(seqLimits);
2012 formatMenu.add(idRightAlign);
2013 formatMenu.add(hiddenMarkers);
2014 formatMenu.add(viewBoxesMenuItem);
2015 formatMenu.add(viewTextMenuItem);
2016 formatMenu.add(colourTextMenuItem);
2017 formatMenu.add(renderGapsMenuItem);
2018 formatMenu.add(centreColumnLabelsMenuItem);
2019 formatMenu.add(showNonconservedMenuItem);
2020 selectMenu.add(findMenuItem);
2021 selectMenu.addSeparator();
2022 selectMenu.add(selectAllSequenceMenuItem);
2023 selectMenu.add(deselectAllSequenceMenuItem);
2024 selectMenu.add(invertSequenceMenuItem);
2025 selectMenu.add(invertColSel);
2026 selectMenu.add(createGroup);
2027 selectMenu.add(unGroup);
2028 selectMenu.add(grpsFromSelection);
2029 selectMenu.add(deleteGroups);
2030 selectMenu.add(annotationColumn);
2031 selectMenu.add(selectHighlighted);
2032 // TODO - determine if the listenToViewSelections button is needed : see bug
2034 // selectMenu.addSeparator();
2035 // selectMenu.add(listenToViewSelections);
2039 * Constructs the entries on the HMMER menu
2041 protected void initHMMERMenu()
2046 JMenu hmmBuild = new JMenu(MessageManager.getString("label.hmmbuild"));
2047 JMenuItem hmmBuildSettings = new JMenuItem(
2048 MessageManager.getString("label.edit_settings_and_run"));
2049 hmmBuildSettings.addActionListener(new ActionListener()
2052 public void actionPerformed(ActionEvent e)
2054 hmmBuild_actionPerformed(false);
2057 JMenuItem hmmBuildRun = new JMenuItem(MessageManager.formatMessage(
2058 "label.action_with_default_settings", "hmmbuild"));
2059 hmmBuildRun.addActionListener(new ActionListener()
2062 public void actionPerformed(ActionEvent e)
2064 hmmBuild_actionPerformed(true);
2067 hmmBuild.add(hmmBuildRun);
2068 hmmBuild.add(hmmBuildSettings);
2073 JMenu hmmAlign = new JMenu(MessageManager.getString("label.hmmalign"));
2074 JMenuItem hmmAlignRun = new JMenuItem(MessageManager.formatMessage(
2075 "label.action_with_default_settings", "hmmalign"));
2076 hmmAlignRun.addActionListener(new ActionListener()
2079 public void actionPerformed(ActionEvent e)
2081 hmmAlign_actionPerformed(true);
2084 JMenuItem hmmAlignSettings = new JMenuItem(
2085 MessageManager.getString("label.edit_settings_and_run"));
2086 hmmAlignSettings.addActionListener(new ActionListener()
2089 public void actionPerformed(ActionEvent e)
2091 hmmAlign_actionPerformed(false);
2094 hmmAlign.add(hmmAlignRun);
2095 hmmAlign.add(hmmAlignSettings);
2100 JMenu hmmSearch = new JMenu(
2101 MessageManager.getString("label.hmmsearch"));
2102 JMenuItem hmmSearchSettings = new JMenuItem(
2103 MessageManager.getString("label.edit_settings_and_run"));
2104 hmmSearchSettings.addActionListener(new ActionListener()
2107 public void actionPerformed(ActionEvent e)
2109 hmmSearch_actionPerformed(false);
2112 JMenuItem hmmSearchRun = new JMenuItem(MessageManager.formatMessage(
2113 "label.action_with_default_settings", "hmmsearch"));
2114 hmmSearchRun.addActionListener(new ActionListener()
2117 public void actionPerformed(ActionEvent e)
2119 hmmSearch_actionPerformed(true);
2122 JMenuItem addDatabase = new JMenuItem(
2123 MessageManager.getString("label.add_database"));
2124 addDatabase.addActionListener(new ActionListener()
2127 public void actionPerformed(ActionEvent e)
2131 addDatabase_actionPerformed();
2132 } catch (IOException e1)
2134 e1.printStackTrace();
2138 hmmSearch.add(hmmSearchRun);
2139 hmmSearch.add(hmmSearchSettings);
2140 // hmmSearch.add(addDatabase);
2145 JMenu jackhmmer = new JMenu(
2146 MessageManager.getString("label.jackhmmer"));
2147 JMenuItem jackhmmerSettings = new JMenuItem(
2148 MessageManager.getString("label.edit_settings_and_run"));
2149 jackhmmerSettings.addActionListener(new ActionListener()
2152 public void actionPerformed(ActionEvent e)
2154 jackhmmer_actionPerformed(false);
2157 JMenuItem jackhmmerRun = new JMenuItem(MessageManager.formatMessage(
2158 "label.action_with_default_settings", "jackhmmer"));
2159 jackhmmerRun.addActionListener(new ActionListener()
2162 public void actionPerformed(ActionEvent e)
2164 jackhmmer_actionPerformed(true);
2169 JMenuItem addDatabase = new JMenuItem(
2170 MessageManager.getString("label.add_database"));
2171 addDatabase.addActionListener(new ActionListener()
2174 public void actionPerformed(ActionEvent e)
2178 addDatabase_actionPerformed();
2179 } catch (IOException e1)
2181 e1.printStackTrace();
2186 jackhmmer.add(jackhmmerRun);
2187 jackhmmer.add(jackhmmerSettings);
2188 // hmmSearch.add(addDatabase);
2193 hmmerMenu.setText(MessageManager.getString("action.hmmer"));
2194 hmmerMenu.setEnabled(HmmerCommand.isHmmerAvailable());
2195 hmmerMenu.add(hmmBuild);
2196 hmmerMenu.add(hmmAlign);
2197 hmmerMenu.add(hmmSearch);
2198 hmmerMenu.add(jackhmmer);
2202 protected void enableSortMenuOptions()
2206 protected void loadVcf_actionPerformed()
2211 * Constructs the entries on the Colour menu (but does not add them to the
2214 protected void initColourMenu()
2216 applyToAllGroups = new JCheckBoxMenuItem(
2217 MessageManager.getString("label.apply_colour_to_all_groups"));
2218 applyToAllGroups.addActionListener(new ActionListener()
2221 public void actionPerformed(ActionEvent e)
2223 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
2227 textColour = new JMenuItem(
2228 MessageManager.getString("label.text_colour"));
2229 textColour.addActionListener(new ActionListener()
2232 public void actionPerformed(ActionEvent e)
2234 textColour_actionPerformed();
2238 conservationMenuItem = new JCheckBoxMenuItem(
2239 MessageManager.getString("action.by_conservation"));
2240 conservationMenuItem.addActionListener(new ActionListener()
2243 public void actionPerformed(ActionEvent e)
2245 conservationMenuItem_actionPerformed(
2246 conservationMenuItem.isSelected());
2250 abovePIDThreshold = new JCheckBoxMenuItem(
2251 MessageManager.getString("label.above_identity_threshold"));
2252 abovePIDThreshold.addActionListener(new ActionListener()
2255 public void actionPerformed(ActionEvent e)
2257 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2260 modifyPID = new JMenuItem(
2261 MessageManager.getString("label.modify_identity_threshold"));
2262 modifyPID.addActionListener(new ActionListener()
2265 public void actionPerformed(ActionEvent e)
2267 modifyPID_actionPerformed();
2270 modifyConservation = new JMenuItem(MessageManager
2271 .getString("label.modify_conservation_threshold"));
2272 modifyConservation.addActionListener(new ActionListener()
2275 public void actionPerformed(ActionEvent e)
2277 modifyConservation_actionPerformed();
2281 annotationColour = new JRadioButtonMenuItem(
2282 MessageManager.getString("action.by_annotation"));
2283 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2284 annotationColour.addActionListener(new ActionListener()
2287 public void actionPerformed(ActionEvent e)
2289 annotationColour_actionPerformed();
2294 protected void selectHighlightedColumns_actionPerformed(
2295 ActionEvent actionEvent)
2297 // TODO Auto-generated method stub
2302 * Generate the reverse sequence (or reverse complement if the flag is true)
2303 * and add it to the alignment
2307 protected void showReverse_actionPerformed(boolean complement)
2312 * Try to run script in a Groovy console, having first ensured that this
2313 * alignframe is set as currentAlignFrame in Desktop
2315 protected void runGroovy_actionPerformed()
2321 * Adds the given action listener and key accelerator to the given menu item.
2322 * Also saves in a lookup table to support lookup of action by key stroke.
2326 * @param actionListener
2328 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2329 JMenuItem menuItem, ActionListener actionListener)
2331 menuItem.setAccelerator(keyStroke);
2332 accelerators.put(keyStroke, menuItem);
2333 menuItem.addActionListener(actionListener);
2337 * Action on clicking sort annotations by type.
2341 protected void sortAnnotations_actionPerformed()
2346 * Action on clicking Show all annotations.
2348 * @param forSequences
2349 * update sequence-related annotations
2350 * @param forAlignment
2351 * update non-sequence-related annotations
2353 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2354 boolean forAlignment)
2356 setAnnotationsVisibility(true, forSequences, forAlignment);
2360 * Action on clicking Hide all annotations.
2362 * @param forSequences
2363 * update sequence-related annotations
2364 * @param forAlignment
2365 * update non-sequence-related annotations
2367 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2368 boolean forAlignment)
2370 setAnnotationsVisibility(false, forSequences, forAlignment);
2374 * Set the visibility of annotations to true or false. Can act on
2375 * sequence-related annotations, or alignment-related, or both.
2378 * @param forSequences
2379 * update sequence-related annotations
2380 * @param forAlignment
2381 * update non-sequence-related annotations
2383 protected void setAnnotationsVisibility(boolean visible,
2384 boolean forSequences, boolean forAlignment)
2389 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2391 // TODO Auto-generated method stub
2395 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2397 // TODO Auto-generated method stub
2401 protected void showAllhidden_actionPerformed(ActionEvent e)
2403 // TODO Auto-generated method stub
2407 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2409 // TODO Auto-generated method stub
2413 protected void hideAllSelection_actionPerformed(ActionEvent e)
2415 // TODO Auto-generated method stub
2419 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2421 // TODO Auto-generated method stub
2425 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2427 // TODO Auto-generated method stub
2431 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2433 // TODO Auto-generated method stub
2437 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2439 // TODO Auto-generated method stub
2443 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2445 // TODO Auto-generated method stub
2449 protected void showGroupConservation_actionPerformed(ActionEvent e)
2451 // TODO Auto-generated method stub
2455 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2457 // TODO Auto-generated method stub
2461 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2463 // TODO Auto-generated method stub
2467 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2469 // TODO Auto-generated method stub
2473 protected void followHighlight_actionPerformed()
2475 // TODO Auto-generated method stub
2479 protected void showNpFeats_actionPerformed(ActionEvent e)
2481 // TODO Auto-generated method stub
2485 protected void showDbRefs_actionPerformed(ActionEvent e)
2487 // TODO Auto-generated method stub
2491 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2495 protected void buildSortByAnnotationScoresMenu()
2499 protected void extractScores_actionPerformed(ActionEvent e)
2503 protected void outputText_actionPerformed(String formatName)
2507 public void addFromFile_actionPerformed(ActionEvent e)
2512 public void addFromText_actionPerformed(ActionEvent e)
2517 public void addFromURL_actionPerformed(ActionEvent e)
2522 public void exportFeatures_actionPerformed(ActionEvent e)
2527 public void exportAnnotations_actionPerformed(ActionEvent e)
2532 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2536 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2541 protected void closeMenuItem_actionPerformed(boolean b)
2545 protected void redoMenuItem_actionPerformed(ActionEvent e)
2549 protected void undoMenuItem_actionPerformed(ActionEvent e)
2553 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2557 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2561 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2565 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2569 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2573 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2577 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2581 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2585 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2589 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2593 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2597 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2601 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2605 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2609 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2613 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2617 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2621 protected void sortEValueMenuItem_actionPerformed(ActionEvent e)
2625 protected void sortBitScoreMenuItem_actionPerformed(ActionEvent e)
2629 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2633 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2637 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2641 protected void conservationMenuItem_actionPerformed(boolean selected)
2645 protected void printMenuItem_actionPerformed(ActionEvent e)
2649 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2653 protected void findMenuItem_actionPerformed(ActionEvent e)
2657 protected void abovePIDThreshold_actionPerformed(boolean selected)
2661 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2665 protected void deleteGroups_actionPerformed(ActionEvent e)
2669 protected void createGroup_actionPerformed(ActionEvent e)
2673 protected void unGroup_actionPerformed(ActionEvent e)
2677 protected void copy_actionPerformed()
2681 protected void cut_actionPerformed()
2685 protected void delete_actionPerformed()
2689 protected void pasteNew_actionPerformed(ActionEvent e)
2690 throws IOException, InterruptedException
2694 protected void pasteThis_actionPerformed(ActionEvent e)
2695 throws IOException, InterruptedException
2699 protected void applyToAllGroups_actionPerformed(boolean selected)
2703 protected void hmmBuild_actionPerformed(boolean withDefaults)
2707 protected void hmmSearch_actionPerformed(boolean withDefaults)
2711 protected void jackhmmer_actionPerformed(boolean b)
2715 protected void addDatabase_actionPerformed()
2716 throws FileFormatException, IOException
2720 protected void hmmAlign_actionPerformed(boolean withDefaults)
2724 public void createPNG(java.io.File f)
2728 protected void font_actionPerformed(ActionEvent e)
2732 protected void seqLimit_actionPerformed(ActionEvent e)
2736 public void seqDBRef_actionPerformed(ActionEvent e)
2741 public void createEPS(java.io.File f)
2745 public void createSVG(java.io.File f)
2750 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2756 * Template method to handle the 'load T-Coffee scores' menu event.
2758 * Subclasses override this method to provide a custom action.
2763 protected void loadScores_actionPerformed(ActionEvent event)
2768 protected void jpred_actionPerformed(ActionEvent e)
2772 protected void scaleAbove_actionPerformed(ActionEvent e)
2776 protected void scaleLeft_actionPerformed(ActionEvent e)
2780 protected void filterByEValue_actionPerformed()
2784 protected void filterByScore_actionPerformed()
2788 protected void scaleRight_actionPerformed(ActionEvent e)
2792 protected void modifyPID_actionPerformed()
2796 protected void modifyConservation_actionPerformed()
2800 protected void saveAs_actionPerformed()
2804 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2808 public void vamsasStore_actionPerformed(ActionEvent e)
2813 public void vamsasLoad_actionPerformed(ActionEvent e)
2818 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2823 public void featureSettings_actionPerformed(ActionEvent e)
2828 public void fetchSequence_actionPerformed()
2833 public void smoothFont_actionPerformed(ActionEvent e)
2838 public void annotationColour_actionPerformed()
2842 public void annotationColumn_actionPerformed(ActionEvent e)
2846 public void associatedData_actionPerformed(ActionEvent e)
2847 throws IOException, InterruptedException
2852 public void autoCalculate_actionPerformed(ActionEvent e)
2857 public void sortByTreeOption_actionPerformed(ActionEvent e)
2862 public void showAllSeqs_actionPerformed(ActionEvent e)
2867 public void showAllColumns_actionPerformed(ActionEvent e)
2872 public void hideSelSequences_actionPerformed(ActionEvent e)
2877 public void hideSelColumns_actionPerformed(ActionEvent e)
2882 public void hiddenMarkers_actionPerformed(ActionEvent e)
2887 public void findPdbId_actionPerformed(ActionEvent e)
2892 public void enterPdbId_actionPerformed(ActionEvent e)
2897 public void pdbFile_actionPerformed(ActionEvent e)
2902 public void invertColSel_actionPerformed(ActionEvent e)
2907 public void tabSelectionChanged(int sel)
2912 public void tabbedPane_mousePressed(MouseEvent e)
2917 public void tabbedPane_focusGained(FocusEvent e)
2922 public void save_actionPerformed(ActionEvent e)
2927 public void reload_actionPerformed(ActionEvent e)
2932 public void newView_actionPerformed(ActionEvent e)
2937 public void textColour_actionPerformed()
2942 public void idRightAlign_actionPerformed(ActionEvent e)
2947 public void expandViews_actionPerformed(ActionEvent e)
2952 public void gatherViews_actionPerformed(ActionEvent e)
2957 public void buildTreeSortMenu()
2962 public void pageSetup_actionPerformed(ActionEvent e)
2967 public void alignmentProperties()
2972 protected void expand_newalign(ActionEvent e)
2974 // TODO Auto-generated method stub
2978 protected boolean isShowAutoCalculatedAbove()
2980 return showAutoCalculatedAbove;
2983 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2985 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2988 protected SequenceAnnotationOrder getAnnotationSortOrder()
2990 return annotationSortOrder;
2993 protected void setAnnotationSortOrder(
2994 SequenceAnnotationOrder annotationSortOrder)
2996 this.annotationSortOrder = annotationSortOrder;
2999 public Map<KeyStroke, JMenuItem> getAccelerators()
3001 return this.accelerators;
3005 * Returns the selected index of the tabbed pane, or -1 if none selected
3006 * (including the case where the tabbed pane has not been made visible).
3010 public int getTabIndex()
3012 return tabbedPane.getSelectedIndex();
3015 public JPanel getStatusPanel()
3021 * Sets a reference to the containing split frame. Also makes the 'toggle
3022 * split view' menu item visible and checked.
3026 public void setSplitFrame(SplitContainerI sf)
3028 this.splitFrame = sf;
3031 this.showComplementMenuItem.setVisible(true);
3032 this.showComplementMenuItem.setState(true);
3036 public SplitContainerI getSplitViewContainer()
3038 return this.splitFrame;
3041 protected void showComplement_actionPerformed(boolean complement)