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;
24 import java.awt.BorderLayout;
25 import java.awt.Color;
26 import java.awt.GridLayout;
27 import java.awt.event.ActionEvent;
28 import java.awt.event.ActionListener;
29 import java.awt.event.FocusAdapter;
30 import java.awt.event.FocusEvent;
31 import java.awt.event.InputEvent;
32 import java.awt.event.KeyEvent;
33 import java.awt.event.MouseAdapter;
34 import java.awt.event.MouseEvent;
35 import java.io.IOException;
36 import java.util.HashMap;
39 import javax.swing.BorderFactory;
40 import javax.swing.ButtonGroup;
41 import javax.swing.JCheckBoxMenuItem;
42 import javax.swing.JInternalFrame;
43 import javax.swing.JLabel;
44 import javax.swing.JMenu;
45 import javax.swing.JMenuBar;
46 import javax.swing.JMenuItem;
47 import javax.swing.JPanel;
48 import javax.swing.JRadioButtonMenuItem;
49 import javax.swing.JTabbedPane;
50 import javax.swing.KeyStroke;
51 import javax.swing.event.ChangeEvent;
52 import javax.swing.event.MenuEvent;
53 import javax.swing.event.MenuListener;
55 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
56 import jalview.analysis.GeneticCodeI;
57 import jalview.analysis.GeneticCodes;
58 import jalview.api.SplitContainerI;
59 import jalview.bin.Cache;
60 import jalview.gui.JvSwingUtils;
61 import jalview.gui.Preferences;
62 import jalview.hmmer.HmmerCommand;
63 import jalview.io.FileFormatException;
64 import jalview.io.FileFormats;
65 import jalview.schemes.ResidueColourScheme;
66 import jalview.util.MessageManager;
67 import jalview.util.Platform;
68 @SuppressWarnings("serial")
69 public class GAlignFrame extends JInternalFrame
71 protected JMenuBar alignFrameMenuBar = new JMenuBar();
73 protected JMenuItem closeMenuItem = new JMenuItem();
75 public JMenu webService = new JMenu();// BH 2019 was protected, but not
76 // sufficient for AlignFrame thread run
77 // JBP - followed suite for these other service related GUI elements.
78 // TODO: check we really need these to be public
79 public JMenu hmmerMenu = new JMenu();
81 public JMenuItem webServiceNoServices;
83 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
85 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
87 protected JMenu sortByAnnotScore = new JMenu();
89 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
91 // AlignFrame.printWriter
93 protected JMenu outputTextboxMenu = new JMenu();
95 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
97 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
99 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
101 protected JMenuItem undoMenuItem = new JMenuItem();
103 protected JMenuItem redoMenuItem = new JMenuItem();
105 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
107 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
109 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
111 JMenuItem copy = new JMenuItem();
113 JMenuItem cut = new JMenuItem();
115 JMenu pasteMenu = new JMenu();
117 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
119 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
121 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
123 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
125 protected JCheckBoxMenuItem applyToAllGroups;
127 protected JMenu colourMenu = new JMenu();
129 protected JMenuItem textColour;
131 protected JCheckBoxMenuItem conservationMenuItem;
133 protected JMenuItem modifyConservation;
135 protected JCheckBoxMenuItem abovePIDThreshold;
137 protected JMenuItem modifyPID;
139 protected JRadioButtonMenuItem annotationColour;
141 protected JMenu sortByTreeMenu = new JMenu();
143 protected JMenu sort = new JMenu();
145 protected JMenuItem calculateTree = new JMenuItem();
147 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
149 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
151 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
153 protected JMenu showTranslation = new JMenu();
155 protected JMenuItem showReverse = new JMenuItem();
157 protected JMenuItem showReverseComplement = new JMenuItem();
159 protected JMenu showProducts = new JMenu();
161 protected JMenuItem runGroovy = new JMenuItem();
163 protected JMenuItem loadVcf;
165 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
167 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
169 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
171 protected JPanel statusPanel = new JPanel();
173 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
175 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
177 protected JMenuItem showAllAlAnnotations = new JMenuItem();
179 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
181 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
183 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
185 protected JTabbedPane tabbedPane = new JTabbedPane();
187 protected JMenuItem reload = new JMenuItem();
189 protected JMenu formatMenu = new JMenu();
191 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
193 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
195 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
197 protected JMenuItem gatherViews = new JMenuItem();
199 protected JMenuItem expandViews = new JMenuItem();
201 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
207 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
209 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
211 protected JCheckBoxMenuItem showInformationHistogram = new JCheckBoxMenuItem();
213 protected JCheckBoxMenuItem showHMMSequenceLogo = new JCheckBoxMenuItem();
215 protected JCheckBoxMenuItem normaliseHMMSequenceLogo = new JCheckBoxMenuItem();
216 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
218 protected JMenuItem openFeatureSettings;
220 private SequenceAnnotationOrder annotationSortOrder;
222 private boolean showAutoCalculatedAbove = false;
224 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
226 private SplitContainerI splitFrame;
233 // for Web-page embedding using id=align-frame-div
234 setName(Platform.getAppID("alignment"));
237 setJMenuBar(alignFrameMenuBar);
239 // dynamically fill save as menu with available formats
240 for (String ff : FileFormats.getInstance().getWritableFormats(true))
242 JMenuItem item = new JMenuItem(ff);
244 item.addActionListener(new ActionListener()
247 public void actionPerformed(ActionEvent e)
249 outputText_actionPerformed(e.getActionCommand());
253 outputTextboxMenu.add(item);
255 } catch (Exception e)
257 System.err.println(e.toString());
260 if (Platform.allowMnemonics()) // was "not mac and not JS"
262 closeMenuItem.setMnemonic('C');
263 outputTextboxMenu.setMnemonic('T');
264 undoMenuItem.setMnemonic('Z');
265 redoMenuItem.setMnemonic('0');
266 copy.setMnemonic('C');
267 cut.setMnemonic('U');
268 pasteMenu.setMnemonic('P');
269 reload.setMnemonic('R');
273 private void jbInit() throws Exception
278 JMenuItem saveAs = new JMenuItem(
279 MessageManager.getString("action.save_as"));
280 ActionListener al = new ActionListener()
283 public void actionPerformed(ActionEvent e)
285 saveAs_actionPerformed();
290 // FIXME getDefaultToolkit throws an exception in Headless mode
291 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Platform.SHORTCUT_KEY_MASK | InputEvent.SHIFT_DOWN_MASK,
293 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);
309 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
310 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
311 JMenu annotationsMenu = new JMenu(
312 MessageManager.getString("action.annotations"));
313 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
314 colourMenu.setText(MessageManager.getString("action.colour"));
315 JMenu calculateMenu = new JMenu(
316 MessageManager.getString("action.calculate"));
317 webService.setText(MessageManager.getString("action.web_service"));
319 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
320 MessageManager.getString("action.select_all"));
321 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
322 Platform.SHORTCUT_KEY_MASK, false);
323 al = new ActionListener()
326 public void actionPerformed(ActionEvent e)
328 selectAllSequenceMenuItem_actionPerformed(e);
331 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);
348 JMenuItem invertSequenceMenuItem = new JMenuItem(
349 MessageManager.getString("action.invert_sequence_selection"));
350 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
351 Platform.SHORTCUT_KEY_MASK, false);
352 al = new ActionListener()
355 public void actionPerformed(ActionEvent e)
357 invertSequenceMenuItem_actionPerformed(e);
360 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
363 JMenuItem grpsFromSelection = new JMenuItem(
364 MessageManager.getString("action.make_groups_selection"));
365 grpsFromSelection.addActionListener(new ActionListener()
368 public void actionPerformed(ActionEvent e)
370 makeGrpsFromSelection_actionPerformed(e);
373 JMenuItem expandAlignment = new JMenuItem(
374 MessageManager.getString("action.view_flanking_regions"));
375 expandAlignment.setToolTipText(
376 MessageManager.getString("label.view_flanking_regions"));
377 expandAlignment.addActionListener(new ActionListener()
380 public void actionPerformed(ActionEvent e)
385 JMenuItem remove2LeftMenuItem = new JMenuItem(
386 MessageManager.getString("action.remove_left"));
387 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
388 Platform.SHORTCUT_KEY_MASK, false);
389 al = new ActionListener()
392 public void actionPerformed(ActionEvent e)
394 remove2LeftMenuItem_actionPerformed(e);
397 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
400 JMenuItem remove2RightMenuItem = new JMenuItem(
401 MessageManager.getString("action.remove_right"));
402 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
403 Platform.SHORTCUT_KEY_MASK, false);
404 al = new ActionListener()
407 public void actionPerformed(ActionEvent e)
409 remove2RightMenuItem_actionPerformed(e);
412 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
415 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
416 MessageManager.getString("action.remove_empty_columns"));
417 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
418 Platform.SHORTCUT_KEY_MASK, false);
419 al = new ActionListener()
422 public void actionPerformed(ActionEvent e)
424 removeGappedColumnMenuItem_actionPerformed(e);
427 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
430 JMenuItem removeAllGapsMenuItem = new JMenuItem(
431 MessageManager.getString("action.remove_all_gaps"));
432 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
433 Platform.SHORTCUT_KEY_MASK
434 | InputEvent.SHIFT_DOWN_MASK,
436 al = new ActionListener()
439 public void actionPerformed(ActionEvent e)
441 removeAllGapsMenuItem_actionPerformed(e);
444 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
447 JMenuItem justifyLeftMenuItem = new JMenuItem(
448 MessageManager.getString("action.left_justify_alignment"));
449 justifyLeftMenuItem.addActionListener(new ActionListener()
452 public void actionPerformed(ActionEvent e)
454 justifyLeftMenuItem_actionPerformed(e);
457 JMenuItem justifyRightMenuItem = new JMenuItem(
458 MessageManager.getString("action.right_justify_alignment"));
459 justifyRightMenuItem.addActionListener(new ActionListener()
462 public void actionPerformed(ActionEvent e)
464 justifyRightMenuItem_actionPerformed(e);
467 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
468 viewBoxesMenuItem.setState(true);
469 viewBoxesMenuItem.addActionListener(new ActionListener()
472 public void actionPerformed(ActionEvent e)
474 viewBoxesMenuItem_actionPerformed(e);
477 viewTextMenuItem.setText(MessageManager.getString("action.text"));
478 viewTextMenuItem.setState(true);
479 viewTextMenuItem.addActionListener(new ActionListener()
482 public void actionPerformed(ActionEvent e)
484 viewTextMenuItem_actionPerformed(e);
487 showNonconservedMenuItem
488 .setText(MessageManager.getString("label.show_non_conserved"));
489 showNonconservedMenuItem.setState(false);
490 showNonconservedMenuItem.addActionListener(new ActionListener()
493 public void actionPerformed(ActionEvent e)
495 showUnconservedMenuItem_actionPerformed(e);
498 JMenuItem sortPairwiseMenuItem = new JMenuItem(
499 MessageManager.getString("action.by_pairwise_id"));
500 sortPairwiseMenuItem.addActionListener(new ActionListener()
503 public void actionPerformed(ActionEvent e)
505 sortPairwiseMenuItem_actionPerformed(e);
508 JMenuItem sortIDMenuItem = new JMenuItem(
509 MessageManager.getString("action.by_id"));
510 sortIDMenuItem.addActionListener(new ActionListener()
513 public void actionPerformed(ActionEvent e)
515 sortIDMenuItem_actionPerformed(e);
518 JMenuItem sortLengthMenuItem = new JMenuItem(
519 MessageManager.getString("action.by_length"));
520 sortLengthMenuItem.addActionListener(new ActionListener()
523 public void actionPerformed(ActionEvent e)
525 sortLengthMenuItem_actionPerformed(e);
528 JMenuItem sortGroupMenuItem = new JMenuItem(
529 MessageManager.getString("action.by_group"));
530 sortGroupMenuItem.addActionListener(new ActionListener()
533 public void actionPerformed(ActionEvent e)
535 sortGroupMenuItem_actionPerformed(e);
539 JMenuItem sortEValueMenuItem = new JMenuItem(
540 MessageManager.getString("action.by_evalue"));
541 sortEValueMenuItem.addActionListener(new ActionListener()
544 public void actionPerformed(ActionEvent e)
546 sortEValueMenuItem_actionPerformed(e);
549 JMenuItem sortBitScoreMenuItem = new JMenuItem(
550 MessageManager.getString("action.by_bit_score"));
551 sortBitScoreMenuItem.addActionListener(new ActionListener()
554 public void actionPerformed(ActionEvent e)
556 sortBitScoreMenuItem_actionPerformed(e);
560 JMenuItem removeRedundancyMenuItem = new JMenuItem(
561 MessageManager.getString("action.remove_redundancy"));
562 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
563 Platform.SHORTCUT_KEY_MASK, false);
564 al = new ActionListener()
567 public void actionPerformed(ActionEvent e)
569 removeRedundancyMenuItem_actionPerformed(e);
572 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
574 JMenuItem filterByEValue = new JMenuItem(
575 MessageManager.getString("action.filter_by_evalue"));
576 filterByEValue.addActionListener(new ActionListener()
579 public void actionPerformed(ActionEvent e)
581 filterByEValue_actionPerformed();
586 JMenuItem filterByScore = new JMenuItem(
587 MessageManager.getString("action.filter_by_score"));
588 filterByScore.addActionListener(new ActionListener()
591 public void actionPerformed(ActionEvent e)
593 filterByScore_actionPerformed();
598 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
599 MessageManager.getString("action.pairwise_alignment"));
600 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
603 public void actionPerformed(ActionEvent e)
605 pairwiseAlignmentMenuItem_actionPerformed(e);
610 this.getContentPane().setLayout(new BorderLayout());
611 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
612 statusBar.setBackground(Color.white);
613 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
614 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
615 statusBar.setText(MessageManager.getString("label.status_bar"));
617 .setText(MessageManager.getString("label.out_to_textbox"));
619 annotationPanelMenuItem.setActionCommand("");
620 annotationPanelMenuItem
621 .setText(MessageManager.getString("label.show_annotations"));
622 annotationPanelMenuItem
623 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
624 annotationPanelMenuItem.addActionListener(new ActionListener()
627 public void actionPerformed(ActionEvent e)
629 annotationPanelMenuItem_actionPerformed(e);
632 showAllAlAnnotations.setText(
633 MessageManager.getString("label.show_all_al_annotations"));
634 final boolean isAnnotationPanelShown = annotationPanelMenuItem
636 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
637 showAllAlAnnotations.addActionListener(new ActionListener()
640 public void actionPerformed(ActionEvent e)
642 showAllAnnotations_actionPerformed(false, true);
645 hideAllAlAnnotations.setText(
646 MessageManager.getString("label.hide_all_al_annotations"));
647 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
648 hideAllAlAnnotations.addActionListener(new ActionListener()
651 public void actionPerformed(ActionEvent e)
653 hideAllAnnotations_actionPerformed(false, true);
656 showAllSeqAnnotations.setText(
657 MessageManager.getString("label.show_all_seq_annotations"));
658 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
659 showAllSeqAnnotations.addActionListener(new ActionListener()
662 public void actionPerformed(ActionEvent e)
664 showAllAnnotations_actionPerformed(true, false);
667 hideAllSeqAnnotations.setText(
668 MessageManager.getString("label.hide_all_seq_annotations"));
669 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
670 hideAllSeqAnnotations.addActionListener(new ActionListener()
673 public void actionPerformed(ActionEvent e)
675 hideAllAnnotations_actionPerformed(true, false);
678 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
679 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
680 SequenceAnnotationOrder.NONE.name()));
681 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
682 MessageManager.getString("label.sort_annotations_by_sequence"));
683 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
684 MessageManager.getString("label.sort_annotations_by_label"));
686 sortAnnBySequence.setSelected(
687 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
688 sortAnnBySequence.addActionListener(new ActionListener()
691 public void actionPerformed(ActionEvent e)
693 boolean newState = sortAnnBySequence.getState();
694 sortAnnByLabel.setSelected(false);
695 setAnnotationSortOrder(
696 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
697 : SequenceAnnotationOrder.NONE);
698 sortAnnotations_actionPerformed();
701 sortAnnByLabel.setSelected(
702 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
703 sortAnnByLabel.addActionListener(new ActionListener()
706 public void actionPerformed(ActionEvent e)
708 boolean newState = sortAnnByLabel.getState();
709 sortAnnBySequence.setSelected(false);
710 setAnnotationSortOrder(
711 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
712 : SequenceAnnotationOrder.NONE);
713 sortAnnotations_actionPerformed();
716 colourTextMenuItem = new JCheckBoxMenuItem(
717 MessageManager.getString("label.colour_text"));
718 colourTextMenuItem.addActionListener(new ActionListener()
721 public void actionPerformed(ActionEvent e)
723 colourTextMenuItem_actionPerformed(e);
728 JMenuItem htmlMenuItem = new JMenuItem(
729 MessageManager.getString("label.html"));
730 htmlMenuItem.addActionListener(new ActionListener()
733 public void actionPerformed(ActionEvent e)
735 htmlMenuItem_actionPerformed(e);
740 JMenuItem createBioJS = new JMenuItem(
741 MessageManager.getString("label.biojs_html_export"));
742 createBioJS.addActionListener(new java.awt.event.ActionListener()
745 public void actionPerformed(ActionEvent e)
747 bioJSMenuItem_actionPerformed(e);
752 JMenuItem overviewMenuItem = new JMenuItem(
753 MessageManager.getString("label.overview_window"));
754 overviewMenuItem.addActionListener(new ActionListener()
757 public void actionPerformed(ActionEvent e)
759 overviewMenuItem_actionPerformed(e);
764 undoMenuItem.setEnabled(false);
765 undoMenuItem.setText(MessageManager.getString("action.undo"));
766 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
767 Platform.SHORTCUT_KEY_MASK, false);
768 al = new ActionListener()
771 public void actionPerformed(ActionEvent e)
773 undoMenuItem_actionPerformed(e);
776 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
779 redoMenuItem.setEnabled(false);
780 redoMenuItem.setText(MessageManager.getString("action.redo"));
781 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
782 Platform.SHORTCUT_KEY_MASK, false);
783 al = new ActionListener()
786 public void actionPerformed(ActionEvent e)
788 redoMenuItem_actionPerformed(e);
791 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
794 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
795 wrapMenuItem.addActionListener(new ActionListener()
798 public void actionPerformed(ActionEvent e)
800 wrapMenuItem_actionPerformed(e);
805 JMenuItem printMenuItem = new JMenuItem(
806 MessageManager.getString("action.print"));
807 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
808 Platform.SHORTCUT_KEY_MASK, false);
809 al = new ActionListener()
812 public void actionPerformed(ActionEvent e)
814 printMenuItem_actionPerformed(e);
817 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
821 .setText(MessageManager.getString("action.show_gaps"));
822 renderGapsMenuItem.setState(true);
823 renderGapsMenuItem.addActionListener(new ActionListener()
826 public void actionPerformed(ActionEvent e)
828 renderGapsMenuItem_actionPerformed(e);
833 JMenuItem findMenuItem = new JMenuItem(
834 MessageManager.getString("action.find"));
835 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
836 Platform.SHORTCUT_KEY_MASK, false);
837 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
838 MessageManager.getString("label.find_tip")));
839 al = new ActionListener()
842 public void actionPerformed(ActionEvent e)
844 findMenuItem_actionPerformed(e);
847 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
849 showSeqFeatures.setText(
850 MessageManager.getString("label.show_sequence_features"));
851 showSeqFeatures.addActionListener(new ActionListener()
854 public void actionPerformed(ActionEvent actionEvent)
856 showSeqFeatures_actionPerformed(actionEvent);
860 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
861 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
862 * void actionPerformed(ActionEvent actionEvent) {
863 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
866 .setText(MessageManager.getString("label.show_database_refs"));
867 showDbRefsMenuitem.addActionListener(new ActionListener()
872 public void actionPerformed(ActionEvent e)
874 showDbRefs_actionPerformed(e);
879 showNpFeatsMenuitem.setText(
880 MessageManager.getString("label.show_non_positional_features"));
881 showNpFeatsMenuitem.addActionListener(new ActionListener()
886 public void actionPerformed(ActionEvent e)
888 showNpFeats_actionPerformed(e);
893 showGroupConservation
894 .setText(MessageManager.getString("label.group_conservation"));
895 showGroupConservation.addActionListener(new ActionListener()
900 public void actionPerformed(ActionEvent e)
902 showGroupConservation_actionPerformed(e);
909 .setText(MessageManager.getString("label.group_consensus"));
910 showGroupConsensus.addActionListener(new ActionListener()
915 public void actionPerformed(ActionEvent e)
917 showGroupConsensus_actionPerformed(e);
922 showConsensusHistogram.setText(
923 MessageManager.getString("label.show_consensus_histogram"));
924 showConsensusHistogram.addActionListener(new ActionListener()
929 public void actionPerformed(ActionEvent e)
931 showConsensusHistogram_actionPerformed(e);
937 .setText(MessageManager.getString("label.show_consensus_logo"));
938 showSequenceLogo.addActionListener(new ActionListener()
943 public void actionPerformed(ActionEvent e)
945 showSequenceLogo_actionPerformed(e);
950 normaliseSequenceLogo
951 .setText(MessageManager.getString("label.norm_consensus_logo"));
952 normaliseSequenceLogo.addActionListener(new ActionListener()
957 public void actionPerformed(ActionEvent e)
959 normaliseSequenceLogo_actionPerformed(e);
964 applyAutoAnnotationSettings
965 .setText(MessageManager.getString("label.apply_all_groups"));
966 applyAutoAnnotationSettings.setState(false);
967 applyAutoAnnotationSettings.setVisible(true);
968 applyAutoAnnotationSettings.addActionListener(new ActionListener()
971 public void actionPerformed(ActionEvent e)
973 applyAutoAnnotationSettings_actionPerformed(e);
978 ButtonGroup buttonGroup = new ButtonGroup();
979 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
980 MessageManager.getString("label.show_first"));
981 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
982 MessageManager.getString("label.show_last"));
983 buttonGroup.add(showAutoFirst);
984 buttonGroup.add(showAutoLast);
985 final boolean autoFirst = Cache
986 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
987 showAutoFirst.setSelected(autoFirst);
988 setShowAutoCalculatedAbove(autoFirst);
989 showAutoFirst.addActionListener(new ActionListener()
992 public void actionPerformed(ActionEvent e)
994 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
995 sortAnnotations_actionPerformed();
998 showAutoLast.setSelected(!showAutoFirst.isSelected());
999 showAutoLast.addActionListener(new ActionListener()
1002 public void actionPerformed(ActionEvent e)
1004 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
1005 sortAnnotations_actionPerformed();
1010 JMenuItem deleteGroups = new JMenuItem(
1011 MessageManager.getString("action.undefine_groups"));
1012 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
1013 Platform.SHORTCUT_KEY_MASK, false);
1014 al = new ActionListener()
1017 public void actionPerformed(ActionEvent e)
1019 deleteGroups_actionPerformed(e);
1022 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
1025 JMenuItem annotationColumn = new JMenuItem(
1026 MessageManager.getString("action.select_by_annotation"));
1027 annotationColumn.addActionListener(new ActionListener()
1030 public void actionPerformed(ActionEvent e)
1032 annotationColumn_actionPerformed(e);
1037 JMenuItem createGroup = new JMenuItem(
1038 MessageManager.getString("action.create_group"));
1039 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
1040 Platform.SHORTCUT_KEY_MASK, false);
1041 al = new ActionListener()
1044 public void actionPerformed(ActionEvent e)
1046 createGroup_actionPerformed(e);
1049 addMenuActionAndAccelerator(keyStroke, createGroup, al);
1052 JMenuItem unGroup = new JMenuItem(
1053 MessageManager.getString("action.remove_group"));
1054 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
1055 Platform.SHORTCUT_KEY_MASK
1056 | InputEvent.SHIFT_DOWN_MASK,
1058 al = new ActionListener()
1061 public void actionPerformed(ActionEvent e)
1063 unGroup_actionPerformed(e);
1066 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1069 copy.setText(MessageManager.getString("action.copy"));
1070 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1071 Platform.SHORTCUT_KEY_MASK, false);
1073 al = new ActionListener()
1076 public void actionPerformed(ActionEvent e)
1078 copy_actionPerformed();
1081 addMenuActionAndAccelerator(keyStroke, copy, al);
1084 cut.setText(MessageManager.getString("action.cut"));
1085 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1086 Platform.SHORTCUT_KEY_MASK, false);
1087 al = new ActionListener()
1090 public void actionPerformed(ActionEvent e)
1092 cut_actionPerformed();
1095 addMenuActionAndAccelerator(keyStroke, cut, al);
1098 JMenuItem delete = new JMenuItem(
1099 MessageManager.getString("action.delete"));
1100 delete.addActionListener(new ActionListener()
1103 public void actionPerformed(ActionEvent e)
1105 delete_actionPerformed();
1110 pasteMenu.setText(MessageManager.getString("action.paste"));
1111 JMenuItem pasteNew = new JMenuItem(
1112 MessageManager.getString("label.to_new_alignment"));
1113 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1114 Platform.SHORTCUT_KEY_MASK
1115 | InputEvent.SHIFT_DOWN_MASK,
1117 al = new ActionListener()
1120 public void actionPerformed(ActionEvent e)
1124 pasteNew_actionPerformed(e);
1125 } catch (IOException | InterruptedException e1)
1127 // TODO Auto-generated catch block
1128 e1.printStackTrace();
1132 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1135 JMenuItem pasteThis = new JMenuItem(
1136 MessageManager.getString("label.to_this_alignment"));
1137 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1138 Platform.SHORTCUT_KEY_MASK, false);
1139 al = new ActionListener()
1142 public void actionPerformed(ActionEvent e)
1146 pasteThis_actionPerformed(e);
1147 } catch (IOException | InterruptedException e1)
1149 // TODO Auto-generated catch block
1150 e1.printStackTrace();
1154 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1157 JMenuItem createPNG = new JMenuItem("PNG");
1158 createPNG.addActionListener(new ActionListener()
1161 public void actionPerformed(ActionEvent e)
1166 createPNG.setActionCommand(
1167 MessageManager.getString("label.save_png_image"));
1169 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1170 font.addActionListener(new ActionListener()
1173 public void actionPerformed(ActionEvent e)
1175 font_actionPerformed(e);
1179 MessageManager.getString("label.show_sequence_limits"));
1180 seqLimits.setState(Cache.getDefault("SHOW_JVSUFFIX", true));
1181 seqLimits.addActionListener(new ActionListener()
1184 public void actionPerformed(ActionEvent e)
1186 seqLimit_actionPerformed(e);
1189 JMenuItem epsFile = new JMenuItem("EPS");
1190 epsFile.addActionListener(new ActionListener()
1193 public void actionPerformed(ActionEvent e)
1200 JMenuItem createSVG = new JMenuItem("SVG");
1201 createSVG.addActionListener(new ActionListener()
1204 public void actionPerformed(ActionEvent e)
1211 JMenuItem loadTreeMenuItem = new JMenuItem(
1212 MessageManager.getString("label.load_associated_tree"));
1213 loadTreeMenuItem.setActionCommand(
1214 MessageManager.getString("label.load_tree_for_sequence_set"));
1215 loadTreeMenuItem.addActionListener(new ActionListener()
1218 public void actionPerformed(ActionEvent e)
1220 loadTreeMenuItem_actionPerformed(e);
1225 scaleAbove.setVisible(false);
1226 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1227 scaleAbove.addActionListener(new ActionListener()
1230 public void actionPerformed(ActionEvent e)
1232 scaleAbove_actionPerformed(e);
1235 scaleLeft.setVisible(false);
1236 scaleLeft.setSelected(true);
1237 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1238 scaleLeft.addActionListener(new ActionListener()
1241 public void actionPerformed(ActionEvent e)
1243 scaleLeft_actionPerformed(e);
1246 scaleRight.setVisible(false);
1247 scaleRight.setSelected(true);
1248 scaleRight.setText(MessageManager.getString("action.scale_right"));
1249 scaleRight.addActionListener(new ActionListener()
1252 public void actionPerformed(ActionEvent e)
1254 scaleRight_actionPerformed(e);
1257 centreColumnLabelsMenuItem.setVisible(true);
1258 centreColumnLabelsMenuItem.setState(false);
1259 centreColumnLabelsMenuItem.setText(
1260 MessageManager.getString("label.centre_column_labels"));
1261 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1264 public void actionPerformed(ActionEvent e)
1266 centreColumnLabels_actionPerformed(e);
1269 followHighlightMenuItem.setVisible(true);
1270 followHighlightMenuItem.setState(true);
1271 followHighlightMenuItem
1272 .setText(MessageManager.getString("label.automatic_scrolling"));
1273 followHighlightMenuItem.addActionListener(new ActionListener()
1278 public void actionPerformed(ActionEvent e)
1280 followHighlight_actionPerformed();
1288 .setText(MessageManager.getString("action.by_tree_order"));
1289 sort.setText(MessageManager.getString("action.sort"));
1290 sort.addMenuListener(new MenuListener()
1293 public void menuSelected(MenuEvent e)
1295 enableSortMenuOptions();
1299 public void menuDeselected(MenuEvent e)
1304 public void menuCanceled(MenuEvent e)
1308 sortByTreeMenu.addMenuListener(new MenuListener()
1311 public void menuSelected(MenuEvent e)
1313 buildTreeSortMenu();
1317 public void menuDeselected(MenuEvent e)
1322 public void menuCanceled(MenuEvent e)
1327 .setText(MessageManager.getString("label.sort_by_score"));
1328 sort.add(sortByAnnotScore);
1329 sort.addMenuListener(new javax.swing.event.MenuListener()
1334 public void menuCanceled(MenuEvent e)
1340 public void menuDeselected(MenuEvent e)
1346 public void menuSelected(MenuEvent e)
1348 buildSortByAnnotationScoresMenu();
1351 sortByAnnotScore.setVisible(false);
1354 .setText(MessageManager.getString("action.calculate_tree_pca"));
1356 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1357 padGapsMenuitem.setState(Cache.getDefault("PAD_GAPS", false));
1358 padGapsMenuitem.addActionListener(new ActionListener()
1361 public void actionPerformed(ActionEvent e)
1363 padGapsMenuitem_actionPerformed(e);
1366 JMenuItem vamsasStore = new JMenuItem(
1367 MessageManager.getString("label.vamsas_store"));
1368 vamsasStore.setVisible(false);
1369 vamsasStore.addActionListener(new ActionListener()
1372 public void actionPerformed(ActionEvent e)
1374 vamsasStore_actionPerformed(e);
1379 * Translate as cDNA with sub-menu of translation tables
1382 .setText(MessageManager.getString("label.translate_cDNA"));
1383 boolean first = true;
1384 for (final GeneticCodeI table : GeneticCodes.getInstance()
1387 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1388 showTranslation.add(item);
1389 item.addActionListener(new ActionListener()
1392 public void actionPerformed(ActionEvent e)
1394 showTranslation_actionPerformed(table);
1399 showTranslation.addSeparator();
1404 showReverse.setText(MessageManager.getString("label.reverse"));
1405 showReverse.addActionListener(new ActionListener()
1408 public void actionPerformed(ActionEvent e)
1410 showReverse_actionPerformed(false);
1413 showReverseComplement
1414 .setText(MessageManager.getString("label.reverse_complement"));
1415 showReverseComplement.addActionListener(new ActionListener()
1418 public void actionPerformed(ActionEvent e)
1420 showReverse_actionPerformed(true);
1425 JMenuItem extractScores = new JMenuItem(
1426 MessageManager.getString("label.extract_scores"));
1427 extractScores.addActionListener(new ActionListener()
1430 public void actionPerformed(ActionEvent e)
1432 extractScores_actionPerformed(e);
1435 extractScores.setVisible(true);
1436 // JBPNote: TODO: make gui for regex based score extraction
1439 // for show products actions see AlignFrame.canShowProducts
1440 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1443 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1444 runGroovy.setToolTipText(
1445 MessageManager.getString("label.run_groovy_tip"));
1446 runGroovy.addActionListener(new ActionListener()
1449 public void actionPerformed(ActionEvent e)
1451 runGroovy_actionPerformed();
1455 openFeatureSettings = new JMenuItem(
1456 MessageManager.getString("action.feature_settings"));
1457 openFeatureSettings.addActionListener(new ActionListener()
1460 public void actionPerformed(ActionEvent e)
1462 featureSettings_actionPerformed(e);
1467 * add sub-menu of database we can fetch from
1469 JMenuItem fetchSequence = new JMenuItem(
1470 MessageManager.getString("label.fetch_sequences"));
1471 fetchSequence.addActionListener(new ActionListener()
1474 public void actionPerformed(ActionEvent e)
1476 fetchSequence_actionPerformed();
1481 JMenuItem associatedData = new JMenuItem(
1482 MessageManager.getString("label.load_features_annotations"));
1483 associatedData.addActionListener(new ActionListener()
1486 public void actionPerformed(ActionEvent e)
1490 associatedData_actionPerformed(e);
1491 } catch (IOException | InterruptedException e1)
1493 // TODO Auto-generated catch block
1494 e1.printStackTrace();
1498 loadVcf = new JMenuItem(
1499 MessageManager.getString("label.load_vcf_file"));
1500 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1501 loadVcf.addActionListener(new ActionListener()
1504 public void actionPerformed(ActionEvent e)
1506 loadVcf_actionPerformed();
1509 autoCalculate.setText(
1510 MessageManager.getString("label.autocalculate_consensus"));
1511 autoCalculate.setState(Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1512 autoCalculate.addActionListener(new ActionListener()
1515 public void actionPerformed(ActionEvent e)
1517 autoCalculate_actionPerformed(e);
1521 MessageManager.getString("label.sort_alignment_new_tree"));
1522 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1523 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1524 sortByTree.setState(Cache.getDefault("SORT_BY_TREE", false));
1525 sortByTree.addActionListener(new ActionListener()
1528 public void actionPerformed(ActionEvent e)
1530 sortByTreeOption_actionPerformed(e);
1534 listenToViewSelections.setText(
1535 MessageManager.getString("label.listen_for_selections"));
1536 listenToViewSelections
1537 .setToolTipText("<html>" + MessageManager.getString(
1538 "label.selections_mirror_selections_made_same_sequences_other_views"));
1539 listenToViewSelections.setState(false);
1540 listenToViewSelections.addActionListener(new ActionListener()
1543 public void actionPerformed(ActionEvent e)
1545 listenToViewSelections_actionPerformed(e);
1550 JMenu addSequenceMenu = new JMenu(
1551 MessageManager.getString("label.add_sequences"));
1552 JMenuItem addFromFile = new JMenuItem(
1553 MessageManager.getString("label.from_file"));
1554 addFromFile.addActionListener(new ActionListener()
1557 public void actionPerformed(ActionEvent e)
1559 addFromFile_actionPerformed(e);
1562 JMenuItem addFromText = new JMenuItem(
1563 MessageManager.getString("label.from_textbox"));
1564 addFromText.addActionListener(new ActionListener()
1567 public void actionPerformed(ActionEvent e)
1569 addFromText_actionPerformed(e);
1572 JMenuItem addFromURL = new JMenuItem(
1573 MessageManager.getString("label.from_url"));
1574 addFromURL.addActionListener(new ActionListener()
1577 public void actionPerformed(ActionEvent e)
1579 addFromURL_actionPerformed(e);
1582 JMenuItem exportFeatures = new JMenuItem(
1583 MessageManager.getString("label.export_features"));
1584 exportFeatures.addActionListener(new ActionListener()
1587 public void actionPerformed(ActionEvent e)
1589 exportFeatures_actionPerformed(e);
1592 JMenuItem exportAnnotations = new JMenuItem(
1593 MessageManager.getString("label.export_annotations"));
1594 exportAnnotations.addActionListener(new ActionListener()
1597 public void actionPerformed(ActionEvent e)
1599 exportAnnotations_actionPerformed(e);
1602 statusPanel.setLayout(new GridLayout());
1603 JMenuItem showAllSeqs = new JMenuItem(
1604 MessageManager.getString("label.all_sequences"));
1605 showAllSeqs.setToolTipText(
1606 MessageManager.getString("label.toggle_sequence_visibility"));
1607 showAllSeqs.addActionListener(new ActionListener()
1610 public void actionPerformed(ActionEvent e)
1612 showAllSeqs_actionPerformed(e);
1615 JMenuItem showAllColumns = new JMenuItem(
1616 MessageManager.getString("label.all_columns"));
1617 showAllColumns.setToolTipText(
1618 MessageManager.getString("label.toggle_columns_visibility"));
1619 showAllColumns.addActionListener(new ActionListener()
1622 public void actionPerformed(ActionEvent e)
1624 showAllColumns_actionPerformed(e);
1627 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1628 JMenuItem hideSelSequences = new JMenuItem(
1629 MessageManager.getString("label.selected_sequences"));
1630 hideSelSequences.setToolTipText(
1631 MessageManager.getString("label.toggle_sequence_visibility"));
1632 hideSelSequences.addActionListener(new ActionListener()
1635 public void actionPerformed(ActionEvent e)
1637 hideSelSequences_actionPerformed(e);
1640 JMenuItem hideSelColumns = new JMenuItem(
1641 MessageManager.getString("label.selected_columns"));
1642 hideSelColumns.setToolTipText(
1643 MessageManager.getString("label.toggle_columns_visibility"));
1644 hideSelColumns.addActionListener(new ActionListener()
1647 public void actionPerformed(ActionEvent e)
1649 hideSelColumns_actionPerformed(e);
1652 JMenuItem hideAllSelection = new JMenuItem(
1653 MessageManager.getString("label.selected_region"));
1654 hideAllSelection.addActionListener(new ActionListener()
1657 public void actionPerformed(ActionEvent e)
1659 hideAllSelection_actionPerformed(e);
1662 // TODO: should be hidden if no selection exists.
1663 JMenuItem hideAllButSelection = new JMenuItem(
1664 MessageManager.getString("label.all_but_selected_region"));
1665 hideAllButSelection.addActionListener(new ActionListener()
1668 public void actionPerformed(ActionEvent e)
1670 hideAllButSelection_actionPerformed(e);
1673 JMenuItem showAllhidden = new JMenuItem(
1674 MessageManager.getString("label.all_sequences_columns"));
1675 showAllhidden.setToolTipText(MessageManager
1676 .getString("label.toggles_visibility_hidden_selected_regions"));
1677 showAllhidden.addActionListener(new ActionListener()
1680 public void actionPerformed(ActionEvent e)
1682 showAllhidden_actionPerformed(e);
1685 hiddenMarkers.setText(
1686 MessageManager.getString("action.show_hidden_markers"));
1687 hiddenMarkers.addActionListener(new ActionListener()
1690 public void actionPerformed(ActionEvent e)
1692 hiddenMarkers_actionPerformed(e);
1697 JMenuItem invertColSel = new JMenuItem(
1698 MessageManager.getString("action.invert_column_selection"));
1699 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1700 Platform.SHORTCUT_KEY_MASK
1701 | InputEvent.ALT_DOWN_MASK,
1703 al = new ActionListener()
1706 public void actionPerformed(ActionEvent e)
1708 invertColSel_actionPerformed(e);
1711 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1714 showComplementMenuItem.setVisible(false);
1715 showComplementMenuItem.addActionListener(new ActionListener()
1718 public void actionPerformed(ActionEvent e)
1720 showComplement_actionPerformed(showComplementMenuItem.getState());
1725 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1728 public void stateChanged(ChangeEvent evt)
1730 JTabbedPane pane = (JTabbedPane) evt.getSource();
1731 int sel = pane.getSelectedIndex();
1732 tabSelectionChanged(sel);
1735 tabbedPane.addMouseListener(new MouseAdapter()
1738 public void mousePressed(MouseEvent e)
1740 if (e.isPopupTrigger()) // Mac
1742 tabbedPane_mousePressed(e);
1748 public void mouseReleased(MouseEvent e)
1750 if (e.isPopupTrigger()) // Windows
1752 tabbedPane_mousePressed(e);
1756 tabbedPane.addFocusListener(new FocusAdapter()
1759 public void focusGained(FocusEvent e)
1761 tabbedPane_focusGained(e);
1766 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1767 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1768 Platform.SHORTCUT_KEY_MASK, false);
1769 al = new ActionListener()
1772 public void actionPerformed(ActionEvent e)
1774 save_actionPerformed(e);
1777 addMenuActionAndAccelerator(keyStroke, save, al);
1780 reload.setEnabled(false);
1781 reload.setText(MessageManager.getString("action.reload"));
1782 reload.addActionListener(new ActionListener()
1785 public void actionPerformed(ActionEvent e)
1787 reload_actionPerformed(e);
1792 JMenuItem newView = new JMenuItem(
1793 MessageManager.getString("action.new_view"));
1794 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1795 Platform.SHORTCUT_KEY_MASK, false);
1796 al = new ActionListener()
1799 public void actionPerformed(ActionEvent e)
1801 newView_actionPerformed(e);
1804 addMenuActionAndAccelerator(keyStroke, newView, al);
1807 tabbedPane.setToolTipText("<html><i>"
1808 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1812 formatMenu.setText(MessageManager.getString("action.format"));
1813 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1815 idRightAlign.setText(
1816 MessageManager.getString("label.right_align_sequence_id"));
1817 idRightAlign.addActionListener(new ActionListener()
1820 public void actionPerformed(ActionEvent e)
1822 idRightAlign_actionPerformed(e);
1827 gatherViews.setEnabled(false);
1828 gatherViews.setText(MessageManager.getString("action.gather_views"));
1829 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1830 al = new ActionListener()
1833 public void actionPerformed(ActionEvent e)
1835 gatherViews_actionPerformed(e);
1838 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1841 expandViews.setEnabled(false);
1842 expandViews.setText(MessageManager.getString("action.expand_views"));
1843 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1844 al = new ActionListener()
1847 public void actionPerformed(ActionEvent e)
1849 expandViews_actionPerformed(e);
1852 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1855 JMenuItem pageSetup = new JMenuItem(
1856 MessageManager.getString("action.page_setup"));
1857 pageSetup.addActionListener(new ActionListener()
1860 public void actionPerformed(ActionEvent e)
1862 pageSetup_actionPerformed(e);
1865 JMenuItem alignmentProperties = new JMenuItem(
1866 MessageManager.getString("label.alignment_props"));
1867 alignmentProperties.addActionListener(new ActionListener()
1870 public void actionPerformed(ActionEvent actionEvent)
1872 alignmentProperties();
1875 JMenuItem selectHighlighted = new JMenuItem(
1876 MessageManager.getString("action.select_highlighted_columns"));
1877 selectHighlighted.setToolTipText(JvSwingUtils.wrapTooltip(true,
1878 MessageManager.getString("tooltip.select_highlighted_columns")));
1879 al = new ActionListener()
1882 public void actionPerformed(ActionEvent actionEvent)
1884 selectHighlightedColumns_actionPerformed(actionEvent);
1887 JMenuItem Filter = new JMenuItem(
1888 MessageManager.getString("action.select_highlighted_columns"));
1889 selectHighlighted.setToolTipText(
1890 MessageManager.getString("tooltip.select_highlighted_columns"));
1891 al = new ActionListener()
1894 public void actionPerformed(ActionEvent actionEvent)
1896 selectHighlightedColumns_actionPerformed(actionEvent);
1899 selectHighlighted.addActionListener(al);
1900 JMenu tooltipSettingsMenu = new JMenu(
1901 MessageManager.getString("label.sequence_id_tooltip"));
1902 JMenu autoAnnMenu = new JMenu(
1903 MessageManager.getString("label.autocalculated_annotation"));
1906 JMenu exportImageMenu = new JMenu(
1907 MessageManager.getString("label.export_image"));
1908 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1909 alignFrameMenuBar.add(fileMenu);
1910 alignFrameMenuBar.add(editMenu);
1911 alignFrameMenuBar.add(selectMenu);
1912 alignFrameMenuBar.add(viewMenu);
1913 alignFrameMenuBar.add(annotationsMenu);
1914 alignFrameMenuBar.add(formatMenu);
1915 alignFrameMenuBar.add(colourMenu);
1916 alignFrameMenuBar.add(calculateMenu);
1917 alignFrameMenuBar.add(webService);
1918 if (!Platform.isJS())
1920 alignFrameMenuBar.add(hmmerMenu);
1924 fileMenu.add(fetchSequence);
1925 fileMenu.add(addSequenceMenu);
1926 fileMenu.add(reload);
1927 fileMenu.addSeparator();
1928 fileMenu.add(vamsasStore);
1930 fileMenu.add(saveAs);
1931 fileMenu.add(outputTextboxMenu);
1932 fileMenu.add(pageSetup);
1933 fileMenu.add(printMenuItem);
1934 fileMenu.addSeparator();
1935 fileMenu.add(exportImageMenu);
1936 fileMenu.add(exportFeatures);
1937 fileMenu.add(exportAnnotations);
1938 fileMenu.add(loadTreeMenuItem);
1939 fileMenu.add(associatedData);
1940 if (!Platform.isJS())
1942 fileMenu.add(loadVcf);
1944 fileMenu.addSeparator();
1945 fileMenu.add(closeMenuItem);
1948 pasteMenu.add(pasteNew);
1949 pasteMenu.add(pasteThis);
1950 editMenu.add(undoMenuItem);
1951 editMenu.add(redoMenuItem);
1954 editMenu.add(pasteMenu);
1955 editMenu.add(delete);
1956 editMenu.addSeparator();
1957 editMenu.add(remove2LeftMenuItem);
1958 editMenu.add(remove2RightMenuItem);
1959 editMenu.add(removeGappedColumnMenuItem);
1960 editMenu.add(removeAllGapsMenuItem);
1961 editMenu.add(removeRedundancyMenuItem);
1962 editMenu.addSeparator();
1963 // dont add these yet in the CVS build - they cannot be undone!
1964 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1965 // editMenu.add(justifyLeftMenuItem);
1966 // editMenu.add(justifyRightMenuItem);
1967 // editMenu.addSeparator();
1968 editMenu.add(padGapsMenuitem);
1970 editMenu.addSeparator();
1971 editMenu.add(filterByEValue);
1972 editMenu.add(filterByScore);
1974 showMenu.add(showAllColumns);
1975 showMenu.add(showAllSeqs);
1976 showMenu.add(showAllhidden);
1977 hideMenu.add(hideSelColumns);
1978 hideMenu.add(hideSelSequences);
1979 hideMenu.add(hideAllSelection);
1980 hideMenu.add(hideAllButSelection);
1981 viewMenu.add(newView);
1982 viewMenu.add(expandViews);
1983 viewMenu.add(gatherViews);
1984 viewMenu.addSeparator();
1985 viewMenu.add(showMenu);
1986 viewMenu.add(hideMenu);
1987 viewMenu.add(showComplementMenuItem);
1988 viewMenu.addSeparator();
1989 viewMenu.add(followHighlightMenuItem);
1990 viewMenu.addSeparator();
1991 viewMenu.add(showSeqFeatures);
1992 // viewMenu.add(showSeqFeaturesHeight);
1993 viewMenu.add(openFeatureSettings);
1994 tooltipSettingsMenu.add(showDbRefsMenuitem);
1995 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1996 viewMenu.add(tooltipSettingsMenu);
1997 viewMenu.addSeparator();
1998 viewMenu.add(alignmentProperties);
1999 viewMenu.addSeparator();
2000 viewMenu.add(overviewMenuItem);
2003 annotationsMenu.add(annotationPanelMenuItem);
2004 annotationsMenu.addSeparator();
2005 annotationsMenu.add(showAllAlAnnotations);
2006 annotationsMenu.add(hideAllAlAnnotations);
2007 annotationsMenu.addSeparator();
2008 annotationsMenu.add(showAllSeqAnnotations);
2009 annotationsMenu.add(hideAllSeqAnnotations);
2010 annotationsMenu.add(sortAnnBySequence);
2011 annotationsMenu.add(sortAnnByLabel);
2012 annotationsMenu.addSeparator();
2013 autoAnnMenu.add(showAutoFirst);
2014 autoAnnMenu.add(showAutoLast);
2015 autoAnnMenu.addSeparator();
2016 autoAnnMenu.add(applyAutoAnnotationSettings);
2017 autoAnnMenu.add(showConsensusHistogram);
2018 autoAnnMenu.add(showSequenceLogo);
2019 autoAnnMenu.add(normaliseSequenceLogo);
2020 autoAnnMenu.addSeparator();
2021 autoAnnMenu.add(showGroupConservation);
2022 autoAnnMenu.add(showGroupConsensus);
2023 annotationsMenu.add(autoAnnMenu);
2025 sort.add(sortIDMenuItem);
2026 sort.add(sortLengthMenuItem);
2027 sort.add(sortGroupMenuItem);
2028 sort.add(sortPairwiseMenuItem);
2029 sort.add(sortEValueMenuItem);
2030 sort.add(sortBitScoreMenuItem);
2031 sort.add(sortByTreeMenu);
2032 calculateMenu.add(sort);
2033 calculateMenu.add(calculateTree);
2034 calculateMenu.addSeparator();
2035 calculateMenu.add(pairwiseAlignmentMenuItem);
2036 calculateMenu.addSeparator();
2037 calculateMenu.add(showTranslation);
2038 calculateMenu.add(showReverse);
2039 calculateMenu.add(showReverseComplement);
2040 calculateMenu.add(showProducts);
2041 calculateMenu.add(autoCalculate);
2042 calculateMenu.add(sortByTree);
2043 calculateMenu.addSeparator();
2044 calculateMenu.add(expandAlignment);
2045 calculateMenu.add(extractScores);
2046 if (!Platform.isJS())
2048 calculateMenu.addSeparator();
2049 calculateMenu.add(runGroovy);
2052 webServiceNoServices = new JMenuItem(
2053 MessageManager.getString("label.no_services"));
2054 webService.add(webServiceNoServices);
2055 if (!Platform.isJS())
2057 exportImageMenu.add(htmlMenuItem);
2059 exportImageMenu.add(epsFile);
2060 exportImageMenu.add(createPNG);
2061 if (!Platform.isJS())
2063 exportImageMenu.add(createBioJS);
2064 exportImageMenu.add(createSVG);
2066 addSequenceMenu.add(addFromFile);
2067 addSequenceMenu.add(addFromText);
2068 addSequenceMenu.add(addFromURL);
2069 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
2070 statusPanel.add(statusBar, null);
2071 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
2074 formatMenu.add(font);
2075 formatMenu.addSeparator();
2076 formatMenu.add(wrapMenuItem);
2077 formatMenu.add(scaleAbove);
2078 formatMenu.add(scaleLeft);
2079 formatMenu.add(scaleRight);
2080 formatMenu.add(seqLimits);
2081 formatMenu.add(idRightAlign);
2082 formatMenu.add(hiddenMarkers);
2083 formatMenu.add(viewBoxesMenuItem);
2084 formatMenu.add(viewTextMenuItem);
2085 formatMenu.add(colourTextMenuItem);
2086 formatMenu.add(renderGapsMenuItem);
2087 formatMenu.add(centreColumnLabelsMenuItem);
2088 formatMenu.add(showNonconservedMenuItem);
2089 selectMenu.add(findMenuItem);
2090 selectMenu.addSeparator();
2091 selectMenu.add(selectAllSequenceMenuItem);
2092 selectMenu.add(deselectAllSequenceMenuItem);
2093 selectMenu.add(invertSequenceMenuItem);
2094 selectMenu.add(invertColSel);
2095 selectMenu.add(createGroup);
2096 selectMenu.add(unGroup);
2097 selectMenu.add(grpsFromSelection);
2098 selectMenu.add(deleteGroups);
2099 selectMenu.add(annotationColumn);
2100 selectMenu.add(selectHighlighted);
2101 // TODO - determine if the listenToViewSelections button is needed : see bug
2103 // selectMenu.addSeparator();
2104 // selectMenu.add(listenToViewSelections);
2108 * Constructs the entries on the HMMER menu
2110 protected void initHMMERMenu()
2115 JMenu hmmBuild = new JMenu(MessageManager.getString("label.hmmbuild"));
2116 JMenuItem hmmBuildSettings = new JMenuItem(
2117 MessageManager.getString("label.edit_settings_and_run"));
2118 hmmBuildSettings.addActionListener(new ActionListener()
2121 public void actionPerformed(ActionEvent e)
2123 hmmBuild_actionPerformed(false);
2126 JMenuItem hmmBuildRun = new JMenuItem(MessageManager.formatMessage(
2127 "label.action_with_default_settings", "hmmbuild"));
2128 hmmBuildRun.addActionListener(new ActionListener()
2131 public void actionPerformed(ActionEvent e)
2133 hmmBuild_actionPerformed(true);
2136 hmmBuild.add(hmmBuildRun);
2137 hmmBuild.add(hmmBuildSettings);
2142 JMenu hmmAlign = new JMenu(MessageManager.getString("label.hmmalign"));
2143 JMenuItem hmmAlignRun = new JMenuItem(MessageManager.formatMessage(
2144 "label.action_with_default_settings", "hmmalign"));
2145 hmmAlignRun.addActionListener(new ActionListener()
2148 public void actionPerformed(ActionEvent e)
2150 hmmAlign_actionPerformed(true);
2153 JMenuItem hmmAlignSettings = new JMenuItem(
2154 MessageManager.getString("label.edit_settings_and_run"));
2155 hmmAlignSettings.addActionListener(new ActionListener()
2158 public void actionPerformed(ActionEvent e)
2160 hmmAlign_actionPerformed(false);
2163 hmmAlign.add(hmmAlignRun);
2164 hmmAlign.add(hmmAlignSettings);
2169 JMenu hmmSearch = new JMenu(
2170 MessageManager.getString("label.hmmsearch"));
2171 JMenuItem hmmSearchSettings = new JMenuItem(
2172 MessageManager.getString("label.edit_settings_and_run"));
2173 hmmSearchSettings.addActionListener(new ActionListener()
2176 public void actionPerformed(ActionEvent e)
2178 hmmSearch_actionPerformed(false);
2181 JMenuItem hmmSearchRun = new JMenuItem(MessageManager.formatMessage(
2182 "label.action_with_default_settings", "hmmsearch"));
2183 hmmSearchRun.addActionListener(new ActionListener()
2186 public void actionPerformed(ActionEvent e)
2188 hmmSearch_actionPerformed(true);
2191 JMenuItem addDatabase = new JMenuItem(
2192 MessageManager.getString("label.add_database"));
2193 addDatabase.addActionListener(new ActionListener()
2196 public void actionPerformed(ActionEvent e)
2200 addDatabase_actionPerformed();
2201 } catch (IOException e1)
2203 e1.printStackTrace();
2207 hmmSearch.add(hmmSearchRun);
2208 hmmSearch.add(hmmSearchSettings);
2209 // hmmSearch.add(addDatabase);
2214 JMenu jackhmmer = new JMenu(
2215 MessageManager.getString("label.jackhmmer"));
2216 JMenuItem jackhmmerSettings = new JMenuItem(
2217 MessageManager.getString("label.edit_settings_and_run"));
2218 jackhmmerSettings.addActionListener(new ActionListener()
2221 public void actionPerformed(ActionEvent e)
2223 jackhmmer_actionPerformed(false);
2226 JMenuItem jackhmmerRun = new JMenuItem(MessageManager.formatMessage(
2227 "label.action_with_default_settings", "jackhmmer"));
2228 jackhmmerRun.addActionListener(new ActionListener()
2231 public void actionPerformed(ActionEvent e)
2233 jackhmmer_actionPerformed(true);
2238 JMenuItem addDatabase = new JMenuItem(
2239 MessageManager.getString("label.add_database"));
2240 addDatabase.addActionListener(new ActionListener()
2243 public void actionPerformed(ActionEvent e)
2247 addDatabase_actionPerformed();
2248 } catch (IOException e1)
2250 e1.printStackTrace();
2255 jackhmmer.add(jackhmmerRun);
2256 jackhmmer.add(jackhmmerSettings);
2257 // hmmSearch.add(addDatabase);
2262 hmmerMenu.setText(MessageManager.getString("action.hmmer"));
2263 hmmerMenu.setEnabled(HmmerCommand.isHmmerAvailable());
2264 hmmerMenu.add(hmmBuild);
2265 hmmerMenu.add(hmmAlign);
2266 hmmerMenu.add(hmmSearch);
2267 hmmerMenu.add(jackhmmer);
2271 protected void enableSortMenuOptions()
2275 protected void loadVcf_actionPerformed()
2280 * Constructs the entries on the Colour menu (but does not add them to the
2283 protected void initColourMenu()
2285 applyToAllGroups = new JCheckBoxMenuItem(
2286 MessageManager.getString("label.apply_colour_to_all_groups"));
2287 applyToAllGroups.addActionListener(new ActionListener()
2290 public void actionPerformed(ActionEvent e)
2292 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
2296 textColour = new JMenuItem(
2297 MessageManager.getString("label.text_colour"));
2298 textColour.addActionListener(new ActionListener()
2301 public void actionPerformed(ActionEvent e)
2303 textColour_actionPerformed();
2307 conservationMenuItem = new JCheckBoxMenuItem(
2308 MessageManager.getString("action.by_conservation"));
2309 conservationMenuItem.addActionListener(new ActionListener()
2312 public void actionPerformed(ActionEvent e)
2314 conservationMenuItem_actionPerformed(
2315 conservationMenuItem.isSelected());
2319 abovePIDThreshold = new JCheckBoxMenuItem(
2320 MessageManager.getString("label.above_identity_threshold"));
2321 abovePIDThreshold.addActionListener(new ActionListener()
2324 public void actionPerformed(ActionEvent e)
2326 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2329 modifyPID = new JMenuItem(
2330 MessageManager.getString("label.modify_identity_threshold"));
2331 modifyPID.addActionListener(new ActionListener()
2334 public void actionPerformed(ActionEvent e)
2336 modifyPID_actionPerformed();
2339 modifyConservation = new JMenuItem(MessageManager
2340 .getString("label.modify_conservation_threshold"));
2341 modifyConservation.addActionListener(new ActionListener()
2344 public void actionPerformed(ActionEvent e)
2346 modifyConservation_actionPerformed();
2350 annotationColour = new JRadioButtonMenuItem(
2351 MessageManager.getString("action.by_annotation"));
2352 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2353 annotationColour.addActionListener(new ActionListener()
2356 public void actionPerformed(ActionEvent e)
2358 annotationColour_actionPerformed();
2363 protected void selectHighlightedColumns_actionPerformed(
2364 ActionEvent actionEvent)
2366 // TODO Auto-generated method stub
2371 * Generate the reverse sequence (or reverse complement if the flag is true)
2372 * and add it to the alignment
2376 protected void showReverse_actionPerformed(boolean complement)
2381 * Try to run script in a Groovy console, having first ensured that this
2382 * alignframe is set as currentAlignFrame in Desktop
2384 protected void runGroovy_actionPerformed()
2390 * Adds the given action listener and key accelerator to the given menu item.
2391 * Also saves in a lookup table to support lookup of action by key stroke.
2395 * @param actionListener
2397 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2398 JMenuItem menuItem, ActionListener actionListener)
2400 menuItem.setAccelerator(keyStroke);
2401 accelerators.put(keyStroke, menuItem);
2402 menuItem.addActionListener(actionListener);
2406 * Action on clicking sort annotations by type.
2410 protected void sortAnnotations_actionPerformed()
2415 * Action on clicking Show all annotations.
2417 * @param forSequences
2418 * update sequence-related annotations
2419 * @param forAlignment
2420 * update non-sequence-related annotations
2422 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2423 boolean forAlignment)
2425 setAnnotationsVisibility(true, forSequences, forAlignment);
2429 * Action on clicking Hide all annotations.
2431 * @param forSequences
2432 * update sequence-related annotations
2433 * @param forAlignment
2434 * update non-sequence-related annotations
2436 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2437 boolean forAlignment)
2439 setAnnotationsVisibility(false, forSequences, forAlignment);
2443 * Set the visibility of annotations to true or false. Can act on
2444 * sequence-related annotations, or alignment-related, or both.
2447 * @param forSequences
2448 * update sequence-related annotations
2449 * @param forAlignment
2450 * update non-sequence-related annotations
2452 protected void setAnnotationsVisibility(boolean visible,
2453 boolean forSequences, boolean forAlignment)
2458 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2460 // TODO Auto-generated method stub
2464 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2466 // TODO Auto-generated method stub
2470 protected void showAllhidden_actionPerformed(ActionEvent e)
2472 // TODO Auto-generated method stub
2476 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2478 // TODO Auto-generated method stub
2482 protected void hideAllSelection_actionPerformed(ActionEvent e)
2484 // TODO Auto-generated method stub
2488 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2490 // TODO Auto-generated method stub
2494 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2496 // TODO Auto-generated method stub
2500 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2502 // TODO Auto-generated method stub
2506 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2508 // TODO Auto-generated method stub
2512 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2514 // TODO Auto-generated method stub
2518 protected void showGroupConservation_actionPerformed(ActionEvent e)
2520 // TODO Auto-generated method stub
2524 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2526 // TODO Auto-generated method stub
2530 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2532 // TODO Auto-generated method stub
2536 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2538 // TODO Auto-generated method stub
2542 protected void followHighlight_actionPerformed()
2544 // TODO Auto-generated method stub
2548 protected void showNpFeats_actionPerformed(ActionEvent e)
2550 // TODO Auto-generated method stub
2554 protected void showDbRefs_actionPerformed(ActionEvent e)
2556 // TODO Auto-generated method stub
2560 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2564 protected void buildSortByAnnotationScoresMenu()
2568 protected void extractScores_actionPerformed(ActionEvent e)
2572 protected void outputText_actionPerformed(String formatName)
2576 public void addFromFile_actionPerformed(ActionEvent e)
2581 public void addFromText_actionPerformed(ActionEvent e)
2586 public void addFromURL_actionPerformed(ActionEvent e)
2591 public void exportFeatures_actionPerformed(ActionEvent e)
2596 public void exportAnnotations_actionPerformed(ActionEvent e)
2601 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2605 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2610 protected void closeMenuItem_actionPerformed(boolean b)
2614 protected void redoMenuItem_actionPerformed(ActionEvent e)
2618 protected void undoMenuItem_actionPerformed(ActionEvent e)
2622 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2626 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2630 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2634 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2638 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2642 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2646 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2650 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2654 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2658 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2662 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2666 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2670 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2674 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2678 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2682 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2686 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2690 protected void sortEValueMenuItem_actionPerformed(ActionEvent e)
2694 protected void sortBitScoreMenuItem_actionPerformed(ActionEvent e)
2697 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2701 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2705 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2709 protected void conservationMenuItem_actionPerformed(boolean selected)
2713 protected void printMenuItem_actionPerformed(ActionEvent e)
2717 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2721 protected void findMenuItem_actionPerformed(ActionEvent e)
2725 protected void abovePIDThreshold_actionPerformed(boolean selected)
2729 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2733 protected void deleteGroups_actionPerformed(ActionEvent e)
2737 protected void createGroup_actionPerformed(ActionEvent e)
2741 protected void unGroup_actionPerformed(ActionEvent e)
2745 protected void copy_actionPerformed()
2749 protected void cut_actionPerformed()
2753 protected void delete_actionPerformed()
2757 protected void pasteNew_actionPerformed(ActionEvent e)
2758 throws IOException, InterruptedException
2762 protected void pasteThis_actionPerformed(ActionEvent e)
2763 throws IOException, InterruptedException
2767 protected void applyToAllGroups_actionPerformed(boolean selected)
2771 protected void hmmBuild_actionPerformed(boolean withDefaults)
2775 protected void hmmSearch_actionPerformed(boolean withDefaults)
2779 protected void jackhmmer_actionPerformed(boolean b)
2783 protected void addDatabase_actionPerformed()
2784 throws FileFormatException, IOException
2788 protected void hmmAlign_actionPerformed(boolean withDefaults)
2791 public void createPNG(java.io.File f)
2795 protected void font_actionPerformed(ActionEvent e)
2799 protected void seqLimit_actionPerformed(ActionEvent e)
2803 public void seqDBRef_actionPerformed(ActionEvent e)
2808 public void createEPS(java.io.File f)
2812 public void createSVG(java.io.File f)
2817 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2823 * Template method to handle the 'load T-Coffee scores' menu event.
2825 * Subclasses override this method to provide a custom action.
2830 protected void loadScores_actionPerformed(ActionEvent event)
2835 protected void jpred_actionPerformed(ActionEvent e)
2839 protected void scaleAbove_actionPerformed(ActionEvent e)
2843 protected void scaleLeft_actionPerformed(ActionEvent e)
2847 protected void filterByEValue_actionPerformed()
2851 protected void filterByScore_actionPerformed()
2854 protected void scaleRight_actionPerformed(ActionEvent e)
2858 protected void modifyPID_actionPerformed()
2862 protected void modifyConservation_actionPerformed()
2866 protected void saveAs_actionPerformed()
2870 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2874 public void vamsasStore_actionPerformed(ActionEvent e)
2879 public void vamsasLoad_actionPerformed(ActionEvent e)
2884 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2889 public void featureSettings_actionPerformed(ActionEvent e)
2894 public void fetchSequence_actionPerformed()
2899 public void smoothFont_actionPerformed(ActionEvent e)
2904 public void annotationColour_actionPerformed()
2908 public void annotationColumn_actionPerformed(ActionEvent e)
2912 public void associatedData_actionPerformed(ActionEvent e)
2913 throws IOException, InterruptedException
2918 public void autoCalculate_actionPerformed(ActionEvent e)
2923 public void sortByTreeOption_actionPerformed(ActionEvent e)
2928 public void showAllSeqs_actionPerformed(ActionEvent e)
2933 public void showAllColumns_actionPerformed(ActionEvent e)
2938 public void hideSelSequences_actionPerformed(ActionEvent e)
2943 public void hideSelColumns_actionPerformed(ActionEvent e)
2948 public void hiddenMarkers_actionPerformed(ActionEvent e)
2953 public void findPdbId_actionPerformed(ActionEvent e)
2958 public void enterPdbId_actionPerformed(ActionEvent e)
2963 public void pdbFile_actionPerformed(ActionEvent e)
2968 public void invertColSel_actionPerformed(ActionEvent e)
2973 public void tabSelectionChanged(int sel)
2978 public void tabbedPane_mousePressed(MouseEvent e)
2983 public void tabbedPane_focusGained(FocusEvent e)
2988 public void save_actionPerformed(ActionEvent e)
2993 public void reload_actionPerformed(ActionEvent e)
2998 public void newView_actionPerformed(ActionEvent e)
3003 public void textColour_actionPerformed()
3008 public void idRightAlign_actionPerformed(ActionEvent e)
3013 public void expandViews_actionPerformed(ActionEvent e)
3018 public void gatherViews_actionPerformed(ActionEvent e)
3023 public void buildTreeSortMenu()
3028 public void pageSetup_actionPerformed(ActionEvent e)
3033 public void alignmentProperties()
3038 protected void expand_newalign(ActionEvent e)
3040 // TODO Auto-generated method stub
3044 protected boolean isShowAutoCalculatedAbove()
3046 return showAutoCalculatedAbove;
3049 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
3051 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
3054 protected SequenceAnnotationOrder getAnnotationSortOrder()
3056 return annotationSortOrder;
3059 protected void setAnnotationSortOrder(
3060 SequenceAnnotationOrder annotationSortOrder)
3062 this.annotationSortOrder = annotationSortOrder;
3065 public Map<KeyStroke, JMenuItem> getAccelerators()
3067 return this.accelerators;
3071 * Returns the selected index of the tabbed pane, or -1 if none selected
3072 * (including the case where the tabbed pane has not been made visible).
3076 public int getTabIndex()
3078 return tabbedPane.getSelectedIndex();
3081 public JPanel getStatusPanel()
3087 * Sets a reference to the containing split frame. Also makes the 'toggle
3088 * split view' menu item visible and checked.
3092 public void setSplitFrame(SplitContainerI sf)
3094 this.splitFrame = sf;
3097 this.showComplementMenuItem.setVisible(true);
3098 this.showComplementMenuItem.setState(true);
3102 public SplitContainerI getSplitViewContainer()
3104 return this.splitFrame;
3107 protected void showComplement_actionPerformed(boolean complement)