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 jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
24 import jalview.api.SplitContainerI;
25 import jalview.bin.Cache;
26 import jalview.gui.JvSwingUtils;
27 import jalview.gui.Preferences;
28 import jalview.io.FileFormatException;
29 import jalview.io.FileFormats;
30 import jalview.util.MessageManager;
31 import jalview.util.Platform;
33 import java.awt.BorderLayout;
34 import java.awt.Color;
35 import java.awt.GridLayout;
36 import java.awt.Toolkit;
37 import java.awt.event.ActionEvent;
38 import java.awt.event.ActionListener;
39 import java.awt.event.FocusAdapter;
40 import java.awt.event.FocusEvent;
41 import java.awt.event.KeyEvent;
42 import java.awt.event.MouseAdapter;
43 import java.awt.event.MouseEvent;
44 import java.io.IOException;
45 import java.util.HashMap;
48 import javax.swing.BorderFactory;
49 import javax.swing.ButtonGroup;
50 import javax.swing.JCheckBoxMenuItem;
51 import javax.swing.JInternalFrame;
52 import javax.swing.JLabel;
53 import javax.swing.JMenu;
54 import javax.swing.JMenuBar;
55 import javax.swing.JMenuItem;
56 import javax.swing.JPanel;
57 import javax.swing.JRadioButtonMenuItem;
58 import javax.swing.JTabbedPane;
59 import javax.swing.KeyStroke;
60 import javax.swing.event.ChangeEvent;
61 import javax.swing.event.MenuEvent;
62 import javax.swing.event.MenuListener;
64 public class GAlignFrame extends JInternalFrame
66 protected JMenuBar alignFrameMenuBar = new JMenuBar();
68 protected JMenuItem closeMenuItem = new JMenuItem();
70 protected JMenu webService = new JMenu();
72 protected JMenu hmmerMenu = new JMenu();
74 protected JMenu hmmAlign = new JMenu();
76 protected JMenuItem hmmAlignRun = new JMenuItem();
78 protected JMenuItem hmmAlignSettings = new JMenuItem();
80 protected JMenu hmmSearch = new JMenu();
82 protected JMenuItem hmmSearchRun = new JMenuItem();
84 protected JMenuItem hmmSearchSettings = new JMenuItem();
86 protected JMenuItem addDatabase = new JMenuItem();
88 protected JMenu hmmBuild = new JMenu();
90 protected JMenuItem hmmBuildRun = new JMenuItem();
92 protected JMenuItem hmmBuildSettings = new JMenuItem();
94 protected JMenuItem webServiceNoServices;
96 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
98 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
100 protected JMenu sortByAnnotScore = new JMenu();
102 public JLabel statusBar = new JLabel();
104 protected JMenu outputTextboxMenu = new JMenu();
106 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
108 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
110 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
112 protected JMenuItem undoMenuItem = new JMenuItem();
114 protected JMenuItem redoMenuItem = new JMenuItem();
116 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
118 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
120 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
122 JMenuItem copy = new JMenuItem();
124 JMenuItem cut = new JMenuItem();
126 JMenu pasteMenu = new JMenu();
128 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
130 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
132 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
134 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
136 protected JCheckBoxMenuItem applyToAllGroups;
138 protected JMenu colourMenu = new JMenu();
140 protected JMenuItem textColour;
142 protected JCheckBoxMenuItem conservationMenuItem;
144 protected JMenuItem modifyConservation;
146 protected JCheckBoxMenuItem abovePIDThreshold;
148 protected JMenuItem modifyPID;
150 protected JMenuItem annotationColour;
152 protected JMenu sortByTreeMenu = new JMenu();
154 protected JMenu sort = new JMenu();
156 protected JMenuItem calculateTree = new JMenuItem();
158 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
160 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
162 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
164 protected JMenuItem showTranslation = new JMenuItem();
166 protected JMenuItem showReverse = new JMenuItem();
168 protected JMenuItem showReverseComplement = new JMenuItem();
170 protected JMenu showProducts = new JMenu();
172 protected JMenuItem runGroovy = new JMenuItem();
174 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
176 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
178 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
180 protected JPanel statusPanel = new JPanel();
182 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
184 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
186 protected JMenuItem showAllAlAnnotations = new JMenuItem();
188 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
190 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
192 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
194 protected JTabbedPane tabbedPane = new JTabbedPane();
196 protected JMenuItem reload = new JMenuItem();
198 protected JMenu formatMenu = new JMenu();
200 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
202 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
204 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
206 protected JMenuItem gatherViews = new JMenuItem();
208 protected JMenuItem expandViews = new JMenuItem();
210 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
212 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
214 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
216 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
218 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
220 protected JCheckBoxMenuItem showInformationHistogram = new JCheckBoxMenuItem();
222 protected JCheckBoxMenuItem showHMMSequenceLogo = new JCheckBoxMenuItem();
224 protected JCheckBoxMenuItem normaliseHMMSequenceLogo = new JCheckBoxMenuItem();
226 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
228 private SequenceAnnotationOrder annotationSortOrder;
230 private boolean showAutoCalculatedAbove = false;
232 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
234 private SplitContainerI splitFrame;
241 setJMenuBar(alignFrameMenuBar);
243 // dynamically fill save as menu with available formats
244 for (String ff : FileFormats.getInstance().getWritableFormats(true))
246 JMenuItem item = new JMenuItem(ff);
248 item.addActionListener(new ActionListener()
251 public void actionPerformed(ActionEvent e)
253 outputText_actionPerformed(e);
257 outputTextboxMenu.add(item);
259 } catch (Exception e)
261 System.err.println(e.toString());
264 if (!Platform.isAMac())
266 closeMenuItem.setMnemonic('C');
267 outputTextboxMenu.setMnemonic('T');
268 undoMenuItem.setMnemonic('Z');
269 redoMenuItem.setMnemonic('0');
270 copy.setMnemonic('C');
271 cut.setMnemonic('U');
272 pasteMenu.setMnemonic('P');
273 reload.setMnemonic('R');
277 private void jbInit() throws Exception
282 JMenuItem saveAs = new JMenuItem(
283 MessageManager.getString("action.save_as"));
284 ActionListener al = new ActionListener()
287 public void actionPerformed(ActionEvent e)
289 saveAs_actionPerformed(e);
293 // FIXME getDefaultToolkit throws an exception in Headless mode
294 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
295 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
296 | KeyEvent.SHIFT_MASK,
298 addMenuActionAndAccelerator(keyStroke, saveAs, al);
300 closeMenuItem.setText(MessageManager.getString("action.close"));
301 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
302 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
303 al = new ActionListener()
306 public void actionPerformed(ActionEvent e)
308 closeMenuItem_actionPerformed(false);
311 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
313 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
314 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
315 JMenu annotationsMenu = new JMenu(
316 MessageManager.getString("action.annotations"));
317 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
318 colourMenu.setText(MessageManager.getString("action.colour"));
319 JMenu calculateMenu = new JMenu(
320 MessageManager.getString("action.calculate"));
321 webService.setText(MessageManager.getString("action.web_service"));
322 hmmerMenu.setText(MessageManager.getString("action.hmmer"));
323 String status = Cache.getProperty("HMMER_FUNCTIONING");
324 if ("false".equals(status) || status == null)
326 hmmerMenu.setEnabled(false);
330 hmmerMenu.setEnabled(true);
332 hmmerMenu.addActionListener(new ActionListener()
335 public void actionPerformed(ActionEvent e)
337 hmmerMenu_actionPerformed(e);
340 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
341 MessageManager.getString("action.select_all"));
342 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
343 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
344 al = new ActionListener()
347 public void actionPerformed(ActionEvent e)
349 selectAllSequenceMenuItem_actionPerformed(e);
352 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
354 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
355 MessageManager.getString("action.deselect_all"));
356 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
357 al = new ActionListener()
360 public void actionPerformed(ActionEvent e)
362 deselectAllSequenceMenuItem_actionPerformed(e);
365 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
367 JMenuItem invertSequenceMenuItem = new JMenuItem(
368 MessageManager.getString("action.invert_sequence_selection"));
369 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
370 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
371 al = new ActionListener()
374 public void actionPerformed(ActionEvent e)
376 invertSequenceMenuItem_actionPerformed(e);
379 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
381 JMenuItem grpsFromSelection = new JMenuItem(
382 MessageManager.getString("action.make_groups_selection"));
383 grpsFromSelection.addActionListener(new ActionListener()
386 public void actionPerformed(ActionEvent e)
388 makeGrpsFromSelection_actionPerformed(e);
391 JMenuItem expandAlignment = new JMenuItem(
392 MessageManager.getString("action.view_flanking_regions"));
393 expandAlignment.setToolTipText(
394 MessageManager.getString("label.view_flanking_regions"));
395 expandAlignment.addActionListener(new ActionListener()
398 public void actionPerformed(ActionEvent e)
403 JMenuItem remove2LeftMenuItem = new JMenuItem(
404 MessageManager.getString("action.remove_left"));
405 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
406 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
407 al = new ActionListener()
410 public void actionPerformed(ActionEvent e)
412 remove2LeftMenuItem_actionPerformed(e);
415 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
417 JMenuItem remove2RightMenuItem = new JMenuItem(
418 MessageManager.getString("action.remove_right"));
419 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
420 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
421 al = new ActionListener()
424 public void actionPerformed(ActionEvent e)
426 remove2RightMenuItem_actionPerformed(e);
429 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
431 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
432 MessageManager.getString("action.remove_empty_columns"));
433 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
434 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
435 al = new ActionListener()
438 public void actionPerformed(ActionEvent e)
440 removeGappedColumnMenuItem_actionPerformed(e);
443 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
445 JMenuItem removeAllGapsMenuItem = new JMenuItem(
446 MessageManager.getString("action.remove_all_gaps"));
447 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
448 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
449 | KeyEvent.SHIFT_MASK,
451 al = new ActionListener()
454 public void actionPerformed(ActionEvent e)
456 removeAllGapsMenuItem_actionPerformed(e);
459 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
461 JMenuItem justifyLeftMenuItem = new JMenuItem(
462 MessageManager.getString("action.left_justify_alignment"));
463 justifyLeftMenuItem.addActionListener(new ActionListener()
466 public void actionPerformed(ActionEvent e)
468 justifyLeftMenuItem_actionPerformed(e);
471 JMenuItem justifyRightMenuItem = new JMenuItem(
472 MessageManager.getString("action.right_justify_alignment"));
473 justifyRightMenuItem.addActionListener(new ActionListener()
476 public void actionPerformed(ActionEvent e)
478 justifyRightMenuItem_actionPerformed(e);
481 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
482 viewBoxesMenuItem.setState(true);
483 viewBoxesMenuItem.addActionListener(new ActionListener()
486 public void actionPerformed(ActionEvent e)
488 viewBoxesMenuItem_actionPerformed(e);
491 viewTextMenuItem.setText(MessageManager.getString("action.text"));
492 viewTextMenuItem.setState(true);
493 viewTextMenuItem.addActionListener(new ActionListener()
496 public void actionPerformed(ActionEvent e)
498 viewTextMenuItem_actionPerformed(e);
501 showNonconservedMenuItem
502 .setText(MessageManager.getString("label.show_non_conserved"));
503 showNonconservedMenuItem.setState(false);
504 showNonconservedMenuItem.addActionListener(new ActionListener()
507 public void actionPerformed(ActionEvent e)
509 showUnconservedMenuItem_actionPerformed(e);
512 JMenuItem sortPairwiseMenuItem = new JMenuItem(
513 MessageManager.getString("action.by_pairwise_id"));
514 sortPairwiseMenuItem.addActionListener(new ActionListener()
517 public void actionPerformed(ActionEvent e)
519 sortPairwiseMenuItem_actionPerformed(e);
522 JMenuItem sortIDMenuItem = new JMenuItem(
523 MessageManager.getString("action.by_id"));
524 sortIDMenuItem.addActionListener(new ActionListener()
527 public void actionPerformed(ActionEvent e)
529 sortIDMenuItem_actionPerformed(e);
532 JMenuItem sortLengthMenuItem = new JMenuItem(
533 MessageManager.getString("action.by_length"));
534 sortLengthMenuItem.addActionListener(new ActionListener()
537 public void actionPerformed(ActionEvent e)
539 sortLengthMenuItem_actionPerformed(e);
542 JMenuItem sortGroupMenuItem = new JMenuItem(
543 MessageManager.getString("action.by_group"));
544 sortGroupMenuItem.addActionListener(new ActionListener()
547 public void actionPerformed(ActionEvent e)
549 sortGroupMenuItem_actionPerformed(e);
553 JMenuItem removeRedundancyMenuItem = new JMenuItem(
554 MessageManager.getString("action.remove_redundancy"));
555 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
556 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
557 al = new ActionListener()
560 public void actionPerformed(ActionEvent e)
562 removeRedundancyMenuItem_actionPerformed(e);
565 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
567 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
568 MessageManager.getString("action.pairwise_alignment"));
569 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
572 public void actionPerformed(ActionEvent e)
574 pairwiseAlignmentMenuItem_actionPerformed(e);
578 this.getContentPane().setLayout(new BorderLayout());
579 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
580 statusBar.setBackground(Color.white);
581 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
582 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
583 statusBar.setText(MessageManager.getString("label.status_bar"));
586 .setText(MessageManager.getString("label.out_to_textbox"));
589 annotationPanelMenuItem.setActionCommand("");
590 annotationPanelMenuItem
591 .setText(MessageManager.getString("label.show_annotations"));
592 annotationPanelMenuItem
593 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
594 annotationPanelMenuItem.addActionListener(new ActionListener()
597 public void actionPerformed(ActionEvent e)
599 annotationPanelMenuItem_actionPerformed(e);
602 showAllAlAnnotations.setText(
603 MessageManager.getString("label.show_all_al_annotations"));
604 final boolean isAnnotationPanelShown = annotationPanelMenuItem
606 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
607 showAllAlAnnotations.addActionListener(new ActionListener()
610 public void actionPerformed(ActionEvent e)
612 showAllAnnotations_actionPerformed(false, true);
615 hideAllAlAnnotations.setText(
616 MessageManager.getString("label.hide_all_al_annotations"));
617 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
618 hideAllAlAnnotations.addActionListener(new ActionListener()
621 public void actionPerformed(ActionEvent e)
623 hideAllAnnotations_actionPerformed(false, true);
626 showAllSeqAnnotations.setText(
627 MessageManager.getString("label.show_all_seq_annotations"));
628 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
629 showAllSeqAnnotations.addActionListener(new ActionListener()
632 public void actionPerformed(ActionEvent e)
634 showAllAnnotations_actionPerformed(true, false);
637 hideAllSeqAnnotations.setText(
638 MessageManager.getString("label.hide_all_seq_annotations"));
639 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
640 hideAllSeqAnnotations.addActionListener(new ActionListener()
643 public void actionPerformed(ActionEvent e)
645 hideAllAnnotations_actionPerformed(true, false);
648 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
649 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
650 SequenceAnnotationOrder.NONE.name()));
651 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
652 MessageManager.getString("label.sort_annotations_by_sequence"));
653 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
654 MessageManager.getString("label.sort_annotations_by_label"));
657 sortAnnBySequence.setSelected(
658 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
659 sortAnnBySequence.addActionListener(new ActionListener()
662 public void actionPerformed(ActionEvent e)
664 boolean newState = sortAnnBySequence.getState();
665 sortAnnByLabel.setSelected(false);
666 setAnnotationSortOrder(
667 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
668 : SequenceAnnotationOrder.NONE);
669 sortAnnotations_actionPerformed();
672 sortAnnByLabel.setSelected(
673 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
674 sortAnnByLabel.addActionListener(new ActionListener()
677 public void actionPerformed(ActionEvent e)
679 boolean newState = sortAnnByLabel.getState();
680 sortAnnBySequence.setSelected(false);
681 setAnnotationSortOrder(
682 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
683 : SequenceAnnotationOrder.NONE);
684 sortAnnotations_actionPerformed();
687 colourTextMenuItem = new JCheckBoxMenuItem(
688 MessageManager.getString("label.colour_text"));
689 colourTextMenuItem.addActionListener(new ActionListener()
692 public void actionPerformed(ActionEvent e)
694 colourTextMenuItem_actionPerformed(e);
698 JMenuItem htmlMenuItem = new JMenuItem(
699 MessageManager.getString("label.html"));
700 htmlMenuItem.addActionListener(new ActionListener()
703 public void actionPerformed(ActionEvent e)
705 htmlMenuItem_actionPerformed(e);
709 JMenuItem createBioJS = new JMenuItem(
710 MessageManager.getString("label.biojs_html_export"));
711 createBioJS.addActionListener(new java.awt.event.ActionListener()
714 public void actionPerformed(ActionEvent e)
716 bioJSMenuItem_actionPerformed(e);
720 JMenuItem overviewMenuItem = new JMenuItem(
721 MessageManager.getString("label.overview_window"));
722 overviewMenuItem.addActionListener(new ActionListener()
725 public void actionPerformed(ActionEvent e)
727 overviewMenuItem_actionPerformed(e);
731 undoMenuItem.setEnabled(false);
732 undoMenuItem.setText(MessageManager.getString("action.undo"));
733 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
734 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
735 al = new ActionListener()
738 public void actionPerformed(ActionEvent e)
740 undoMenuItem_actionPerformed(e);
743 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
745 redoMenuItem.setEnabled(false);
746 redoMenuItem.setText(MessageManager.getString("action.redo"));
747 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
748 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
749 al = new ActionListener()
752 public void actionPerformed(ActionEvent e)
754 redoMenuItem_actionPerformed(e);
757 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
759 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
760 wrapMenuItem.addActionListener(new ActionListener()
763 public void actionPerformed(ActionEvent e)
765 wrapMenuItem_actionPerformed(e);
769 JMenuItem printMenuItem = new JMenuItem(
770 MessageManager.getString("action.print"));
771 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
772 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
773 al = new ActionListener()
776 public void actionPerformed(ActionEvent e)
778 printMenuItem_actionPerformed(e);
781 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
784 .setText(MessageManager.getString("action.show_gaps"));
785 renderGapsMenuItem.setState(true);
786 renderGapsMenuItem.addActionListener(new ActionListener()
789 public void actionPerformed(ActionEvent e)
791 renderGapsMenuItem_actionPerformed(e);
795 JMenuItem findMenuItem = new JMenuItem(
796 MessageManager.getString("action.find"));
797 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
798 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
799 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
800 MessageManager.getString("label.find_tip")));
801 al = new ActionListener()
804 public void actionPerformed(ActionEvent e)
806 findMenuItem_actionPerformed(e);
809 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
811 showSeqFeatures.setText(
812 MessageManager.getString("label.show_sequence_features"));
814 showSeqFeatures.addActionListener(new ActionListener()
817 public void actionPerformed(ActionEvent actionEvent)
819 showSeqFeatures_actionPerformed(actionEvent);
823 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
824 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
825 * void actionPerformed(ActionEvent actionEvent) {
826 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
829 .setText(MessageManager.getString("label.show_database_refs"));
830 showDbRefsMenuitem.addActionListener(new ActionListener()
834 public void actionPerformed(ActionEvent e)
836 showDbRefs_actionPerformed(e);
840 showNpFeatsMenuitem.setText(
841 MessageManager.getString("label.show_non_positional_features"));
842 showNpFeatsMenuitem.addActionListener(new ActionListener()
846 public void actionPerformed(ActionEvent e)
848 showNpFeats_actionPerformed(e);
852 showGroupConservation
853 .setText(MessageManager.getString("label.group_conservation"));
854 showGroupConservation.addActionListener(new ActionListener()
858 public void actionPerformed(ActionEvent e)
860 showGroupConservation_actionPerformed(e);
866 .setText(MessageManager.getString("label.group_consensus"));
867 showGroupConsensus.addActionListener(new ActionListener()
871 public void actionPerformed(ActionEvent e)
873 showGroupConsensus_actionPerformed(e);
877 showConsensusHistogram.setText(
878 MessageManager.getString("label.show_consensus_histogram"));
879 showConsensusHistogram.addActionListener(new ActionListener()
883 public void actionPerformed(ActionEvent e)
885 showConsensusHistogram_actionPerformed(e);
890 .setText(MessageManager.getString("label.show_consensus_logo"));
891 showSequenceLogo.addActionListener(new ActionListener()
895 public void actionPerformed(ActionEvent e)
897 showSequenceLogo_actionPerformed(e);
901 normaliseSequenceLogo
902 .setText(MessageManager.getString("label.norm_consensus_logo"));
903 normaliseSequenceLogo.addActionListener(new ActionListener()
907 public void actionPerformed(ActionEvent e)
909 normaliseSequenceLogo_actionPerformed(e);
913 applyAutoAnnotationSettings
914 .setText(MessageManager.getString("label.apply_all_groups"));
915 applyAutoAnnotationSettings.setState(false);
916 applyAutoAnnotationSettings.setVisible(true);
917 applyAutoAnnotationSettings.addActionListener(new ActionListener()
920 public void actionPerformed(ActionEvent e)
922 applyAutoAnnotationSettings_actionPerformed(e);
926 ButtonGroup buttonGroup = new ButtonGroup();
927 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
928 MessageManager.getString("label.show_first"));
929 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
930 MessageManager.getString("label.show_last"));
931 buttonGroup.add(showAutoFirst);
932 buttonGroup.add(showAutoLast);
933 final boolean autoFirst = Cache
934 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
935 showAutoFirst.setSelected(autoFirst);
936 setShowAutoCalculatedAbove(autoFirst);
937 showAutoFirst.addActionListener(new ActionListener()
940 public void actionPerformed(ActionEvent e)
942 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
943 sortAnnotations_actionPerformed();
946 showAutoLast.setSelected(!showAutoFirst.isSelected());
947 showAutoLast.addActionListener(new ActionListener()
950 public void actionPerformed(ActionEvent e)
952 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
953 sortAnnotations_actionPerformed();
957 JMenuItem deleteGroups = new JMenuItem(
958 MessageManager.getString("action.undefine_groups"));
959 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
960 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
961 al = new ActionListener()
964 public void actionPerformed(ActionEvent e)
966 deleteGroups_actionPerformed(e);
969 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
971 JMenuItem annotationColumn = new JMenuItem(
972 MessageManager.getString("action.select_by_annotation"));
973 annotationColumn.addActionListener(new ActionListener()
976 public void actionPerformed(ActionEvent e)
978 annotationColumn_actionPerformed(e);
982 JMenuItem createGroup = new JMenuItem(
983 MessageManager.getString("action.create_group"));
984 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
985 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
986 al = new ActionListener()
989 public void actionPerformed(ActionEvent e)
991 createGroup_actionPerformed(e);
994 addMenuActionAndAccelerator(keyStroke, createGroup, al);
996 JMenuItem unGroup = new JMenuItem(
997 MessageManager.getString("action.remove_group"));
998 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
999 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1000 | KeyEvent.SHIFT_MASK,
1002 al = new ActionListener()
1005 public void actionPerformed(ActionEvent e)
1007 unGroup_actionPerformed(e);
1010 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1012 copy.setText(MessageManager.getString("action.copy"));
1013 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1014 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1016 al = new ActionListener()
1019 public void actionPerformed(ActionEvent e)
1021 copy_actionPerformed(e);
1024 addMenuActionAndAccelerator(keyStroke, copy, al);
1026 cut.setText(MessageManager.getString("action.cut"));
1027 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1028 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1029 al = new ActionListener()
1032 public void actionPerformed(ActionEvent e)
1034 cut_actionPerformed(e);
1037 addMenuActionAndAccelerator(keyStroke, cut, al);
1039 JMenuItem delete = new JMenuItem(
1040 MessageManager.getString("action.delete"));
1041 delete.addActionListener(new ActionListener()
1044 public void actionPerformed(ActionEvent e)
1046 delete_actionPerformed(e);
1050 pasteMenu.setText(MessageManager.getString("action.paste"));
1051 JMenuItem pasteNew = new JMenuItem(
1052 MessageManager.getString("label.to_new_alignment"));
1053 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1054 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1055 | KeyEvent.SHIFT_MASK,
1057 al = new ActionListener()
1060 public void actionPerformed(ActionEvent e)
1064 pasteNew_actionPerformed(e);
1065 } catch (IOException | InterruptedException e1)
1067 // TODO Auto-generated catch block
1068 e1.printStackTrace();
1072 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1074 JMenuItem pasteThis = new JMenuItem(
1075 MessageManager.getString("label.to_this_alignment"));
1076 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1077 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1078 al = new ActionListener()
1081 public void actionPerformed(ActionEvent e)
1085 pasteThis_actionPerformed(e);
1086 } catch (IOException | InterruptedException e1)
1088 // TODO Auto-generated catch block
1089 e1.printStackTrace();
1093 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1095 JMenuItem createPNG = new JMenuItem("PNG");
1096 createPNG.addActionListener(new ActionListener()
1099 public void actionPerformed(ActionEvent e)
1104 createPNG.setActionCommand(
1105 MessageManager.getString("label.save_png_image"));
1106 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1107 font.addActionListener(new ActionListener()
1110 public void actionPerformed(ActionEvent e)
1112 font_actionPerformed(e);
1116 MessageManager.getString("label.show_sequence_limits"));
1117 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1118 seqLimits.addActionListener(new ActionListener()
1121 public void actionPerformed(ActionEvent e)
1123 seqLimit_actionPerformed(e);
1126 JMenuItem epsFile = new JMenuItem("EPS");
1127 epsFile.addActionListener(new ActionListener()
1130 public void actionPerformed(ActionEvent e)
1136 JMenuItem createSVG = new JMenuItem("SVG");
1137 createSVG.addActionListener(new ActionListener()
1140 public void actionPerformed(ActionEvent e)
1146 JMenuItem loadTreeMenuItem = new JMenuItem(
1147 MessageManager.getString("label.load_associated_tree"));
1148 loadTreeMenuItem.setActionCommand(
1149 MessageManager.getString("label.load_tree_for_sequence_set"));
1150 loadTreeMenuItem.addActionListener(new ActionListener()
1153 public void actionPerformed(ActionEvent e)
1155 loadTreeMenuItem_actionPerformed(e);
1159 scaleAbove.setVisible(false);
1160 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1161 scaleAbove.addActionListener(new ActionListener()
1164 public void actionPerformed(ActionEvent e)
1166 scaleAbove_actionPerformed(e);
1169 scaleLeft.setVisible(false);
1170 scaleLeft.setSelected(true);
1171 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1172 scaleLeft.addActionListener(new ActionListener()
1175 public void actionPerformed(ActionEvent e)
1177 scaleLeft_actionPerformed(e);
1180 scaleRight.setVisible(false);
1181 scaleRight.setSelected(true);
1182 scaleRight.setText(MessageManager.getString("action.scale_right"));
1183 scaleRight.addActionListener(new ActionListener()
1186 public void actionPerformed(ActionEvent e)
1188 scaleRight_actionPerformed(e);
1191 centreColumnLabelsMenuItem.setVisible(true);
1192 centreColumnLabelsMenuItem.setState(false);
1193 centreColumnLabelsMenuItem.setText(
1194 MessageManager.getString("label.centre_column_labels"));
1195 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1198 public void actionPerformed(ActionEvent e)
1200 centreColumnLabels_actionPerformed(e);
1203 followHighlightMenuItem.setVisible(true);
1204 followHighlightMenuItem.setState(true);
1205 followHighlightMenuItem
1206 .setText(MessageManager.getString("label.automatic_scrolling"));
1207 followHighlightMenuItem.addActionListener(new ActionListener()
1211 public void actionPerformed(ActionEvent e)
1213 followHighlight_actionPerformed();
1219 .setText(MessageManager.getString("action.by_tree_order"));
1220 sort.setText(MessageManager.getString("action.sort"));
1221 sort.addMenuListener(new MenuListener()
1224 public void menuSelected(MenuEvent e)
1226 buildTreeSortMenu();
1230 public void menuDeselected(MenuEvent e)
1235 public void menuCanceled(MenuEvent e)
1240 .setText(MessageManager.getString("label.sort_by_score"));
1241 sort.add(sortByAnnotScore);
1242 sort.addMenuListener(new javax.swing.event.MenuListener()
1246 public void menuCanceled(MenuEvent e)
1251 public void menuDeselected(MenuEvent e)
1256 public void menuSelected(MenuEvent e)
1258 buildSortByAnnotationScoresMenu();
1261 sortByAnnotScore.setVisible(false);
1264 .setText(MessageManager.getString("action.calculate_tree_pca"));
1266 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1268 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1269 padGapsMenuitem.addActionListener(new ActionListener()
1272 public void actionPerformed(ActionEvent e)
1274 padGapsMenuitem_actionPerformed(e);
1277 JMenuItem vamsasStore = new JMenuItem(
1278 MessageManager.getString("label.vamsas_store"));
1279 vamsasStore.setVisible(false);
1280 vamsasStore.addActionListener(new ActionListener()
1283 public void actionPerformed(ActionEvent e)
1285 vamsasStore_actionPerformed(e);
1289 .setText(MessageManager.getString("label.translate_cDNA"));
1290 showTranslation.addActionListener(new ActionListener()
1293 public void actionPerformed(ActionEvent e)
1295 showTranslation_actionPerformed(e);
1298 showReverse.setText(MessageManager.getString("label.reverse"));
1299 showReverse.addActionListener(new ActionListener()
1302 public void actionPerformed(ActionEvent e)
1304 showReverse_actionPerformed(false);
1307 showReverseComplement
1308 .setText(MessageManager.getString("label.reverse_complement"));
1309 showReverseComplement.addActionListener(new ActionListener()
1312 public void actionPerformed(ActionEvent e)
1314 showReverse_actionPerformed(true);
1318 JMenuItem extractScores = new JMenuItem(
1319 MessageManager.getString("label.extract_scores"));
1320 extractScores.addActionListener(new ActionListener()
1323 public void actionPerformed(ActionEvent e)
1325 extractScores_actionPerformed(e);
1328 extractScores.setVisible(true);
1329 // JBPNote: TODO: make gui for regex based score extraction
1331 // for show products actions see AlignFrame.canShowProducts
1332 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1334 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1335 runGroovy.setToolTipText(
1336 MessageManager.getString("label.run_groovy_tip"));
1337 runGroovy.addActionListener(new ActionListener()
1340 public void actionPerformed(ActionEvent e)
1342 runGroovy_actionPerformed();
1346 JMenuItem openFeatureSettings = new JMenuItem(
1347 MessageManager.getString("action.feature_settings"));
1348 openFeatureSettings.addActionListener(new ActionListener()
1351 public void actionPerformed(ActionEvent e)
1353 featureSettings_actionPerformed(e);
1356 JMenuItem fetchSequence = new JMenuItem(
1357 MessageManager.getString("label.fetch_sequences"));
1358 fetchSequence.addActionListener(new ActionListener()
1361 public void actionPerformed(ActionEvent e)
1363 fetchSequence_actionPerformed(e);
1367 JMenuItem associatedData = new JMenuItem(
1368 MessageManager.getString("label.load_features_annotations"));
1369 associatedData.addActionListener(new ActionListener()
1372 public void actionPerformed(ActionEvent e)
1376 associatedData_actionPerformed(e);
1377 } catch (IOException | InterruptedException e1)
1379 // TODO Auto-generated catch block
1380 e1.printStackTrace();
1384 autoCalculate.setText(
1385 MessageManager.getString("label.autocalculate_consensus"));
1386 autoCalculate.setState(
1387 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1388 autoCalculate.addActionListener(new ActionListener()
1391 public void actionPerformed(ActionEvent e)
1393 autoCalculate_actionPerformed(e);
1397 MessageManager.getString("label.sort_alignment_new_tree"));
1398 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1399 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1401 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1402 sortByTree.addActionListener(new ActionListener()
1405 public void actionPerformed(ActionEvent e)
1407 sortByTreeOption_actionPerformed(e);
1411 listenToViewSelections.setText(
1412 MessageManager.getString("label.listen_for_selections"));
1413 listenToViewSelections
1414 .setToolTipText("<html>" + MessageManager.getString(
1415 "label.selections_mirror_selections_made_same_sequences_other_views"));
1416 listenToViewSelections.setState(false);
1417 listenToViewSelections.addActionListener(new ActionListener()
1420 public void actionPerformed(ActionEvent e)
1422 listenToViewSelections_actionPerformed(e);
1426 JMenu addSequenceMenu = new JMenu(
1427 MessageManager.getString("label.add_sequences"));
1428 JMenuItem addFromFile = new JMenuItem(
1429 MessageManager.getString("label.from_file"));
1430 addFromFile.addActionListener(new ActionListener()
1433 public void actionPerformed(ActionEvent e)
1435 addFromFile_actionPerformed(e);
1438 JMenuItem addFromText = new JMenuItem(
1439 MessageManager.getString("label.from_textbox"));
1440 addFromText.addActionListener(new ActionListener()
1443 public void actionPerformed(ActionEvent e)
1445 addFromText_actionPerformed(e);
1448 JMenuItem addFromURL = new JMenuItem(
1449 MessageManager.getString("label.from_url"));
1450 addFromURL.addActionListener(new ActionListener()
1453 public void actionPerformed(ActionEvent e)
1455 addFromURL_actionPerformed(e);
1458 JMenuItem exportFeatures = new JMenuItem(
1459 MessageManager.getString("label.export_features"));
1460 exportFeatures.addActionListener(new ActionListener()
1463 public void actionPerformed(ActionEvent e)
1465 exportFeatures_actionPerformed(e);
1468 JMenuItem exportAnnotations = new JMenuItem(
1469 MessageManager.getString("label.export_annotations"));
1470 exportAnnotations.addActionListener(new ActionListener()
1473 public void actionPerformed(ActionEvent e)
1475 exportAnnotations_actionPerformed(e);
1478 statusPanel.setLayout(new GridLayout());
1479 JMenuItem showAllSeqs = new JMenuItem(
1480 MessageManager.getString("label.all_sequences"));
1481 showAllSeqs.setToolTipText(
1482 MessageManager.getString("label.toggle_sequence_visibility"));
1483 showAllSeqs.addActionListener(new ActionListener()
1486 public void actionPerformed(ActionEvent e)
1488 showAllSeqs_actionPerformed(e);
1491 JMenuItem showAllColumns = new JMenuItem(
1492 MessageManager.getString("label.all_columns"));
1493 showAllColumns.setToolTipText(
1494 MessageManager.getString("label.toggle_columns_visibility"));
1495 showAllColumns.addActionListener(new ActionListener()
1498 public void actionPerformed(ActionEvent e)
1500 showAllColumns_actionPerformed(e);
1503 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1504 JMenuItem hideSelSequences = new JMenuItem(
1505 MessageManager.getString("label.selected_sequences"));
1506 hideSelSequences.setToolTipText(
1507 MessageManager.getString("label.toggle_sequence_visibility"));
1508 hideSelSequences.addActionListener(new ActionListener()
1511 public void actionPerformed(ActionEvent e)
1513 hideSelSequences_actionPerformed(e);
1516 JMenuItem hideSelColumns = new JMenuItem(
1517 MessageManager.getString("label.selected_columns"));
1518 hideSelColumns.setToolTipText(
1519 MessageManager.getString("label.toggle_columns_visibility"));
1520 hideSelColumns.addActionListener(new ActionListener()
1523 public void actionPerformed(ActionEvent e)
1525 hideSelColumns_actionPerformed(e);
1528 JMenuItem hideAllSelection = new JMenuItem(
1529 MessageManager.getString("label.selected_region"));
1530 hideAllSelection.addActionListener(new ActionListener()
1533 public void actionPerformed(ActionEvent e)
1535 hideAllSelection_actionPerformed(e);
1538 // TODO: should be hidden if no selection exists.
1539 JMenuItem hideAllButSelection = new JMenuItem(
1540 MessageManager.getString("label.all_but_selected_region"));
1541 hideAllButSelection.addActionListener(new ActionListener()
1544 public void actionPerformed(ActionEvent e)
1546 hideAllButSelection_actionPerformed(e);
1549 JMenuItem showAllhidden = new JMenuItem(
1550 MessageManager.getString("label.all_sequences_columns"));
1551 showAllhidden.setToolTipText(MessageManager
1552 .getString("label.toggles_visibility_hidden_selected_regions"));
1553 showAllhidden.addActionListener(new ActionListener()
1556 public void actionPerformed(ActionEvent e)
1558 showAllhidden_actionPerformed(e);
1561 hiddenMarkers.setText(
1562 MessageManager.getString("action.show_hidden_markers"));
1563 hiddenMarkers.addActionListener(new ActionListener()
1566 public void actionPerformed(ActionEvent e)
1568 hiddenMarkers_actionPerformed(e);
1572 JMenuItem invertColSel = new JMenuItem(
1573 MessageManager.getString("action.invert_column_selection"));
1574 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1575 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1576 | KeyEvent.ALT_MASK,
1578 al = new ActionListener()
1581 public void actionPerformed(ActionEvent e)
1583 invertColSel_actionPerformed(e);
1586 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1588 showComplementMenuItem.setVisible(false);
1589 showComplementMenuItem.addActionListener(new ActionListener()
1592 public void actionPerformed(ActionEvent e)
1594 showComplement_actionPerformed(showComplementMenuItem.getState());
1598 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1601 public void stateChanged(ChangeEvent evt)
1603 JTabbedPane pane = (JTabbedPane) evt.getSource();
1604 int sel = pane.getSelectedIndex();
1605 tabSelectionChanged(sel);
1608 tabbedPane.addMouseListener(new MouseAdapter()
1611 public void mousePressed(MouseEvent e)
1613 if (e.isPopupTrigger()) // Mac
1615 tabbedPane_mousePressed(e);
1620 public void mouseReleased(MouseEvent e)
1622 if (e.isPopupTrigger()) // Windows
1624 tabbedPane_mousePressed(e);
1628 tabbedPane.addFocusListener(new FocusAdapter()
1631 public void focusGained(FocusEvent e)
1633 tabbedPane_focusGained(e);
1637 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1638 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1639 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1640 al = new ActionListener()
1643 public void actionPerformed(ActionEvent e)
1645 save_actionPerformed(e);
1648 addMenuActionAndAccelerator(keyStroke, save, al);
1650 reload.setEnabled(false);
1651 reload.setText(MessageManager.getString("action.reload"));
1652 reload.addActionListener(new ActionListener()
1655 public void actionPerformed(ActionEvent e)
1657 reload_actionPerformed(e);
1661 JMenuItem newView = new JMenuItem(
1662 MessageManager.getString("action.new_view"));
1663 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1664 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1665 al = new ActionListener()
1668 public void actionPerformed(ActionEvent e)
1670 newView_actionPerformed(e);
1673 addMenuActionAndAccelerator(keyStroke, newView, al);
1675 tabbedPane.setToolTipText("<html><i>"
1676 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1679 formatMenu.setText(MessageManager.getString("action.format"));
1680 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1682 idRightAlign.setText(
1683 MessageManager.getString("label.right_align_sequence_id"));
1684 idRightAlign.addActionListener(new ActionListener()
1687 public void actionPerformed(ActionEvent e)
1689 idRightAlign_actionPerformed(e);
1693 gatherViews.setEnabled(false);
1694 gatherViews.setText(MessageManager.getString("action.gather_views"));
1695 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1696 al = new ActionListener()
1699 public void actionPerformed(ActionEvent e)
1701 gatherViews_actionPerformed(e);
1704 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1706 expandViews.setEnabled(false);
1707 expandViews.setText(MessageManager.getString("action.expand_views"));
1708 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1709 al = new ActionListener()
1712 public void actionPerformed(ActionEvent e)
1714 expandViews_actionPerformed(e);
1717 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1719 JMenuItem pageSetup = new JMenuItem(
1720 MessageManager.getString("action.page_setup"));
1721 pageSetup.addActionListener(new ActionListener()
1724 public void actionPerformed(ActionEvent e)
1726 pageSetup_actionPerformed(e);
1729 JMenuItem alignmentProperties = new JMenuItem(
1730 MessageManager.getString("label.alignment_props"));
1731 alignmentProperties.addActionListener(new ActionListener()
1734 public void actionPerformed(ActionEvent actionEvent)
1736 alignmentProperties();
1739 JMenuItem selectHighlighted = new JMenuItem(
1740 MessageManager.getString("action.select_highlighted_columns"));
1741 selectHighlighted.setToolTipText(
1742 MessageManager.getString("tooltip.select_highlighted_columns"));
1743 al = new ActionListener()
1746 public void actionPerformed(ActionEvent actionEvent)
1748 selectHighlightedColumns_actionPerformed(actionEvent);
1751 hmmBuildRun.setText(MessageManager.formatMessage(
1752 "label.action_with_default_settings", "hmmbuild"));
1753 hmmBuildRun.addActionListener(new ActionListener()
1757 public void actionPerformed(ActionEvent e)
1761 hmmBuildRun_actionPerformed(e);
1762 } catch (IOException | InterruptedException e1)
1764 // TODO Auto-generated catch block
1765 e1.printStackTrace();
1770 hmmBuildSettings.setText(
1771 MessageManager.getString("label.edit_settings_and_run"));
1772 hmmBuildSettings.addActionListener(new ActionListener()
1776 public void actionPerformed(ActionEvent e)
1780 hmmBuildSettings_actionPerformed(e);
1781 } catch (IOException | InterruptedException e1)
1783 // TODO Auto-generated catch block
1784 e1.printStackTrace();
1789 hmmAlignRun.setText(MessageManager.formatMessage(
1790 "label.action_with_default_settings", "hmmalign"));
1791 hmmAlignRun.addActionListener(new ActionListener()
1795 public void actionPerformed(ActionEvent e)
1799 hmmAlignRun_actionPerformed(e);
1800 } catch (IOException | InterruptedException e1)
1802 // TODO Auto-generated catch block
1803 e1.printStackTrace();
1808 hmmAlignSettings.setText(
1809 MessageManager.getString("label.edit_settings_and_run"));
1810 hmmAlignSettings.addActionListener(new ActionListener()
1814 public void actionPerformed(ActionEvent e)
1818 hmmAlignSettings_actionPerformed(e);
1819 } catch (IOException | InterruptedException e1)
1821 // TODO Auto-generated catch block
1822 e1.printStackTrace();
1827 hmmSearchRun.setText(MessageManager.formatMessage(
1828 "label.action_with_default_settings", "hmmsearch"));
1829 hmmSearchRun.addActionListener(new ActionListener()
1833 public void actionPerformed(ActionEvent e)
1835 hmmSearchRun_actionPerformed(e);
1839 addDatabase.setText(MessageManager.getString("label.add_database"));
1840 addDatabase.addActionListener(new ActionListener()
1844 public void actionPerformed(ActionEvent e)
1848 addDatabase_actionPerformed(e);
1849 } catch (IOException e1)
1851 // TODO Auto-generated catch block
1852 e1.printStackTrace();
1857 hmmSearchSettings.setText(
1858 MessageManager.getString("label.edit_settings_and_run"));
1859 hmmSearchSettings.addActionListener(new ActionListener()
1863 public void actionPerformed(ActionEvent e)
1865 hmmSearchSettings_actionPerformed(e);
1869 selectHighlighted.addActionListener(al);
1870 JMenu tooltipSettingsMenu = new JMenu(
1871 MessageManager.getString("label.sequence_id_tooltip"));
1872 JMenu autoAnnMenu = new JMenu(
1873 MessageManager.getString("label.autocalculated_annotation"));
1875 JMenu exportImageMenu = new JMenu(
1876 MessageManager.getString("label.export_image"));
1877 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1878 alignFrameMenuBar.add(fileMenu);
1879 alignFrameMenuBar.add(editMenu);
1880 alignFrameMenuBar.add(selectMenu);
1881 alignFrameMenuBar.add(viewMenu);
1882 alignFrameMenuBar.add(annotationsMenu);
1883 alignFrameMenuBar.add(formatMenu);
1884 alignFrameMenuBar.add(colourMenu);
1885 alignFrameMenuBar.add(calculateMenu);
1886 alignFrameMenuBar.add(webService);
1887 alignFrameMenuBar.add(hmmerMenu);
1889 fileMenu.add(fetchSequence);
1890 fileMenu.add(addSequenceMenu);
1891 fileMenu.add(reload);
1892 fileMenu.addSeparator();
1893 fileMenu.add(vamsasStore);
1895 fileMenu.add(saveAs);
1896 fileMenu.add(outputTextboxMenu);
1897 fileMenu.add(pageSetup);
1898 fileMenu.add(printMenuItem);
1899 fileMenu.addSeparator();
1900 fileMenu.add(exportImageMenu);
1901 fileMenu.add(exportFeatures);
1902 fileMenu.add(exportAnnotations);
1903 fileMenu.add(loadTreeMenuItem);
1904 fileMenu.add(associatedData);
1905 fileMenu.addSeparator();
1906 fileMenu.add(closeMenuItem);
1908 pasteMenu.add(pasteNew);
1909 pasteMenu.add(pasteThis);
1910 editMenu.add(undoMenuItem);
1911 editMenu.add(redoMenuItem);
1914 editMenu.add(pasteMenu);
1915 editMenu.add(delete);
1916 editMenu.addSeparator();
1917 editMenu.add(remove2LeftMenuItem);
1918 editMenu.add(remove2RightMenuItem);
1919 editMenu.add(removeGappedColumnMenuItem);
1920 editMenu.add(removeAllGapsMenuItem);
1921 editMenu.add(removeRedundancyMenuItem);
1922 editMenu.addSeparator();
1923 // dont add these yet in the CVS build - they cannot be undone!
1924 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1925 // editMenu.add(justifyLeftMenuItem);
1926 // editMenu.add(justifyRightMenuItem);
1927 // editMenu.addSeparator();
1928 editMenu.add(padGapsMenuitem);
1930 showMenu.add(showAllColumns);
1931 showMenu.add(showAllSeqs);
1932 showMenu.add(showAllhidden);
1933 hideMenu.add(hideSelColumns);
1934 hideMenu.add(hideSelSequences);
1935 hideMenu.add(hideAllSelection);
1936 hideMenu.add(hideAllButSelection);
1937 viewMenu.add(newView);
1938 viewMenu.add(expandViews);
1939 viewMenu.add(gatherViews);
1940 viewMenu.addSeparator();
1941 viewMenu.add(showMenu);
1942 viewMenu.add(hideMenu);
1943 viewMenu.add(showComplementMenuItem);
1944 viewMenu.addSeparator();
1945 viewMenu.add(followHighlightMenuItem);
1946 viewMenu.addSeparator();
1947 viewMenu.add(showSeqFeatures);
1948 // viewMenu.add(showSeqFeaturesHeight);
1949 viewMenu.add(openFeatureSettings);
1950 tooltipSettingsMenu.add(showDbRefsMenuitem);
1951 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1952 viewMenu.add(tooltipSettingsMenu);
1953 viewMenu.addSeparator();
1954 viewMenu.add(alignmentProperties);
1955 viewMenu.addSeparator();
1956 viewMenu.add(overviewMenuItem);
1958 annotationsMenu.add(annotationPanelMenuItem);
1959 annotationsMenu.addSeparator();
1960 annotationsMenu.add(showAllAlAnnotations);
1961 annotationsMenu.add(hideAllAlAnnotations);
1962 annotationsMenu.addSeparator();
1963 annotationsMenu.add(showAllSeqAnnotations);
1964 annotationsMenu.add(hideAllSeqAnnotations);
1965 annotationsMenu.add(sortAnnBySequence);
1966 annotationsMenu.add(sortAnnByLabel);
1967 annotationsMenu.addSeparator();
1968 autoAnnMenu.add(showAutoFirst);
1969 autoAnnMenu.add(showAutoLast);
1970 autoAnnMenu.addSeparator();
1971 autoAnnMenu.add(applyAutoAnnotationSettings);
1972 autoAnnMenu.add(showConsensusHistogram);
1973 autoAnnMenu.add(showSequenceLogo);
1974 autoAnnMenu.add(normaliseSequenceLogo);
1975 autoAnnMenu.addSeparator();
1976 autoAnnMenu.add(showGroupConservation);
1977 autoAnnMenu.add(showGroupConsensus);
1978 annotationsMenu.add(autoAnnMenu);
1980 sort.add(sortIDMenuItem);
1981 sort.add(sortLengthMenuItem);
1982 sort.add(sortGroupMenuItem);
1983 sort.add(sortPairwiseMenuItem);
1984 sort.add(sortByTreeMenu);
1985 calculateMenu.add(sort);
1986 calculateMenu.add(calculateTree);
1987 calculateMenu.addSeparator();
1988 calculateMenu.add(pairwiseAlignmentMenuItem);
1989 calculateMenu.addSeparator();
1990 calculateMenu.add(showTranslation);
1991 calculateMenu.add(showReverse);
1992 calculateMenu.add(showReverseComplement);
1993 calculateMenu.add(showProducts);
1994 calculateMenu.add(autoCalculate);
1995 calculateMenu.add(sortByTree);
1996 calculateMenu.addSeparator();
1997 calculateMenu.add(expandAlignment);
1998 calculateMenu.add(extractScores);
1999 calculateMenu.addSeparator();
2000 calculateMenu.add(runGroovy);
2002 webServiceNoServices = new JMenuItem(
2003 MessageManager.getString("label.no_services"));
2004 webService.add(webServiceNoServices);
2005 exportImageMenu.add(htmlMenuItem);
2006 exportImageMenu.add(epsFile);
2007 exportImageMenu.add(createPNG);
2008 exportImageMenu.add(createBioJS);
2009 exportImageMenu.add(createSVG);
2010 addSequenceMenu.add(addFromFile);
2011 addSequenceMenu.add(addFromText);
2012 addSequenceMenu.add(addFromURL);
2013 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
2014 statusPanel.add(statusBar, null);
2015 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
2017 formatMenu.add(font);
2018 formatMenu.addSeparator();
2019 formatMenu.add(wrapMenuItem);
2020 formatMenu.add(scaleAbove);
2021 formatMenu.add(scaleLeft);
2022 formatMenu.add(scaleRight);
2023 formatMenu.add(seqLimits);
2024 formatMenu.add(idRightAlign);
2025 formatMenu.add(hiddenMarkers);
2026 formatMenu.add(viewBoxesMenuItem);
2027 formatMenu.add(viewTextMenuItem);
2028 formatMenu.add(colourTextMenuItem);
2029 formatMenu.add(renderGapsMenuItem);
2030 formatMenu.add(centreColumnLabelsMenuItem);
2031 formatMenu.add(showNonconservedMenuItem);
2032 selectMenu.add(findMenuItem);
2033 selectMenu.addSeparator();
2034 selectMenu.add(selectAllSequenceMenuItem);
2035 selectMenu.add(deselectAllSequenceMenuItem);
2036 selectMenu.add(invertSequenceMenuItem);
2037 selectMenu.add(invertColSel);
2038 selectMenu.add(createGroup);
2039 selectMenu.add(unGroup);
2040 selectMenu.add(grpsFromSelection);
2041 selectMenu.add(deleteGroups);
2042 selectMenu.add(annotationColumn);
2043 selectMenu.add(selectHighlighted);
2044 // TODO - determine if the listenToViewSelections button is needed : see bug
2046 // selectMenu.addSeparator();
2047 // selectMenu.add(listenToViewSelections);
2050 public void hmmerMenu_actionPerformed(ActionEvent e)
2056 * Constructs the entries on the HMMER menu (does not add them to the menu).
2058 protected void initHMMERMenu()
2060 hmmAlign = new JMenu(MessageManager.getString("label.hmmalign"));
2061 hmmAlignSettings = new JMenuItem(
2062 MessageManager.getString("label.edit_settings_and_run"));
2063 hmmAlignRun = new JMenuItem(MessageManager.formatMessage(
2064 "label.action_with_default_settings", "hmmalign"));
2065 hmmAlign.add(hmmAlignSettings);
2066 hmmAlign.add(hmmAlignRun);
2067 hmmBuild = new JMenu(MessageManager.getString("label.hmmbuild"));
2068 hmmBuildSettings = new JMenuItem(
2069 MessageManager.getString("label.edit_settings_and_run"));
2070 hmmBuildRun = new JMenuItem(MessageManager.formatMessage(
2071 "label.action_with_default_settings", "hmmbuild"));
2072 hmmBuild.add(hmmBuildSettings);
2073 hmmBuild.add(hmmBuildRun);
2074 hmmSearch = new JMenu(MessageManager.getString("label.hmmsearch"));
2075 hmmSearchSettings = new JMenuItem(
2076 MessageManager.getString("label.edit_settings_and_run"));
2077 hmmSearchRun = new JMenuItem(MessageManager.formatMessage(
2078 "label.action_with_default_settings", "hmmsearch"));
2079 addDatabase = new JMenuItem(
2080 MessageManager.getString("label.add_database"));
2081 hmmSearch.add(hmmSearchSettings);
2082 hmmSearch.add(hmmSearchRun);
2083 hmmSearch.add(addDatabase);
2087 * Constructs the entries on the Colour menu (but does not add them to the
2090 protected void initColourMenu()
2092 applyToAllGroups = new JCheckBoxMenuItem(
2093 MessageManager.getString("label.apply_colour_to_all_groups"));
2094 applyToAllGroups.addActionListener(new ActionListener()
2097 public void actionPerformed(ActionEvent e)
2099 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
2103 textColour = new JMenuItem(
2104 MessageManager.getString("label.text_colour"));
2105 textColour.addActionListener(new ActionListener()
2108 public void actionPerformed(ActionEvent e)
2110 textColour_actionPerformed();
2114 conservationMenuItem = new JCheckBoxMenuItem(
2115 MessageManager.getString("action.by_conservation"));
2116 conservationMenuItem.addActionListener(new ActionListener()
2119 public void actionPerformed(ActionEvent e)
2121 conservationMenuItem_actionPerformed(
2122 conservationMenuItem.isSelected());
2126 abovePIDThreshold = new JCheckBoxMenuItem(
2127 MessageManager.getString("label.above_identity_threshold"));
2128 abovePIDThreshold.addActionListener(new ActionListener()
2131 public void actionPerformed(ActionEvent e)
2133 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2136 modifyPID = new JMenuItem(
2137 MessageManager.getString("label.modify_identity_threshold"));
2138 modifyPID.addActionListener(new ActionListener()
2141 public void actionPerformed(ActionEvent e)
2143 modifyPID_actionPerformed();
2146 modifyConservation = new JMenuItem(MessageManager
2147 .getString("label.modify_conservation_threshold"));
2148 modifyConservation.addActionListener(new ActionListener()
2151 public void actionPerformed(ActionEvent e)
2153 modifyConservation_actionPerformed();
2157 annotationColour = new JMenuItem(
2158 MessageManager.getString("action.by_annotation"));
2159 annotationColour.addActionListener(new ActionListener()
2162 public void actionPerformed(ActionEvent e)
2164 annotationColour_actionPerformed();
2169 protected void selectHighlightedColumns_actionPerformed(
2170 ActionEvent actionEvent)
2172 // TODO Auto-generated method stub
2177 * Generate the reverse sequence (or reverse complement if the flag is true)
2178 * and add it to the alignment
2182 protected void showReverse_actionPerformed(boolean complement)
2187 * Try to run script in a Groovy console, having first ensured that this
2188 * alignframe is set as currentAlignFrame in Desktop
2190 protected void runGroovy_actionPerformed()
2196 * Adds the given action listener and key accelerator to the given menu item.
2197 * Also saves in a lookup table to support lookup of action by key stroke.
2201 * @param actionListener
2203 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2204 JMenuItem menuItem, ActionListener actionListener)
2206 menuItem.setAccelerator(keyStroke);
2207 accelerators.put(keyStroke, menuItem);
2208 menuItem.addActionListener(actionListener);
2212 * Action on clicking sort annotations by type.
2216 protected void sortAnnotations_actionPerformed()
2221 * Action on clicking Show all annotations.
2223 * @param forSequences
2224 * update sequence-related annotations
2225 * @param forAlignment
2226 * update non-sequence-related annotations
2228 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2229 boolean forAlignment)
2231 setAnnotationsVisibility(true, forSequences, forAlignment);
2235 * Action on clicking Hide all annotations.
2237 * @param forSequences
2238 * update sequence-related annotations
2239 * @param forAlignment
2240 * update non-sequence-related annotations
2242 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2243 boolean forAlignment)
2245 setAnnotationsVisibility(false, forSequences, forAlignment);
2249 * Set the visibility of annotations to true or false. Can act on
2250 * sequence-related annotations, or alignment-related, or both.
2253 * @param forSequences
2254 * update sequence-related annotations
2255 * @param forAlignment
2256 * update non-sequence-related annotations
2258 protected void setAnnotationsVisibility(boolean visible,
2259 boolean forSequences, boolean forAlignment)
2264 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2266 // TODO Auto-generated method stub
2270 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2272 // TODO Auto-generated method stub
2276 protected void showAllhidden_actionPerformed(ActionEvent e)
2278 // TODO Auto-generated method stub
2282 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2284 // TODO Auto-generated method stub
2288 protected void hideAllSelection_actionPerformed(ActionEvent e)
2290 // TODO Auto-generated method stub
2294 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2296 // TODO Auto-generated method stub
2300 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2302 // TODO Auto-generated method stub
2306 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2308 // TODO Auto-generated method stub
2312 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2314 // TODO Auto-generated method stub
2318 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2320 // TODO Auto-generated method stub
2324 protected void showGroupConservation_actionPerformed(ActionEvent e)
2326 // TODO Auto-generated method stub
2330 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2332 // TODO Auto-generated method stub
2336 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2338 // TODO Auto-generated method stub
2342 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2344 // TODO Auto-generated method stub
2348 protected void followHighlight_actionPerformed()
2350 // TODO Auto-generated method stub
2354 protected void showNpFeats_actionPerformed(ActionEvent e)
2356 // TODO Auto-generated method stub
2360 protected void showDbRefs_actionPerformed(ActionEvent e)
2362 // TODO Auto-generated method stub
2366 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2370 protected void buildSortByAnnotationScoresMenu()
2374 protected void extractScores_actionPerformed(ActionEvent e)
2378 protected void outputText_actionPerformed(ActionEvent e)
2382 public void addFromFile_actionPerformed(ActionEvent e)
2387 public void addFromText_actionPerformed(ActionEvent e)
2392 public void addFromURL_actionPerformed(ActionEvent e)
2397 public void exportFeatures_actionPerformed(ActionEvent e)
2402 public void exportAnnotations_actionPerformed(ActionEvent e)
2407 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2411 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2416 protected void closeMenuItem_actionPerformed(boolean b)
2420 protected void redoMenuItem_actionPerformed(ActionEvent e)
2424 protected void undoMenuItem_actionPerformed(ActionEvent e)
2428 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2432 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2436 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2440 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2444 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2448 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2452 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2456 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2460 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2464 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2468 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2472 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2476 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2480 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2484 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2488 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2492 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2496 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2500 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2504 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2508 protected void conservationMenuItem_actionPerformed(boolean selected)
2512 protected void printMenuItem_actionPerformed(ActionEvent e)
2516 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2520 protected void findMenuItem_actionPerformed(ActionEvent e)
2524 protected void abovePIDThreshold_actionPerformed(boolean selected)
2528 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2532 protected void deleteGroups_actionPerformed(ActionEvent e)
2536 protected void createGroup_actionPerformed(ActionEvent e)
2540 protected void unGroup_actionPerformed(ActionEvent e)
2544 protected void copy_actionPerformed(ActionEvent e)
2548 protected void cut_actionPerformed(ActionEvent e)
2552 protected void delete_actionPerformed(ActionEvent e)
2556 protected void pasteNew_actionPerformed(ActionEvent e)
2557 throws IOException, InterruptedException
2561 protected void pasteThis_actionPerformed(ActionEvent e)
2562 throws IOException, InterruptedException
2566 protected void applyToAllGroups_actionPerformed(boolean selected)
2570 protected void hmmBuildRun_actionPerformed(ActionEvent e)
2571 throws IOException, InterruptedException
2575 protected void hmmSearchRun_actionPerformed(ActionEvent e)
2579 protected void addDatabase_actionPerformed(ActionEvent e)
2580 throws FileFormatException, IOException
2584 protected void hmmAlignRun_actionPerformed(ActionEvent e)
2585 throws IOException, InterruptedException
2589 protected void hmmBuildSettings_actionPerformed(ActionEvent e)
2590 throws IOException, InterruptedException
2594 protected void hmmSearchSettings_actionPerformed(ActionEvent e)
2598 protected void hmmAlignSettings_actionPerformed(ActionEvent e)
2599 throws IOException, InterruptedException
2603 public void createPNG(java.io.File f)
2607 protected void font_actionPerformed(ActionEvent e)
2611 protected void seqLimit_actionPerformed(ActionEvent e)
2615 public void seqDBRef_actionPerformed(ActionEvent e)
2620 public void createEPS(java.io.File f)
2624 public void createSVG(java.io.File f)
2629 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2635 * Template method to handle the 'load T-Coffee scores' menu event.
2637 * Subclasses override this method to provide a custom action.
2642 protected void loadScores_actionPerformed(ActionEvent event)
2647 protected void jpred_actionPerformed(ActionEvent e)
2651 protected void scaleAbove_actionPerformed(ActionEvent e)
2655 protected void scaleLeft_actionPerformed(ActionEvent e)
2659 protected void scaleRight_actionPerformed(ActionEvent e)
2663 protected void modifyPID_actionPerformed()
2667 protected void modifyConservation_actionPerformed()
2671 protected void saveAs_actionPerformed(ActionEvent e)
2675 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2679 public void vamsasStore_actionPerformed(ActionEvent e)
2684 public void vamsasLoad_actionPerformed(ActionEvent e)
2689 public void showTranslation_actionPerformed(ActionEvent e)
2694 public void featureSettings_actionPerformed(ActionEvent e)
2699 public void fetchSequence_actionPerformed(ActionEvent e)
2704 public void smoothFont_actionPerformed(ActionEvent e)
2709 public void annotationColour_actionPerformed()
2713 public void annotationColumn_actionPerformed(ActionEvent e)
2717 public void associatedData_actionPerformed(ActionEvent e)
2718 throws IOException, InterruptedException
2723 public void autoCalculate_actionPerformed(ActionEvent e)
2728 public void sortByTreeOption_actionPerformed(ActionEvent e)
2733 public void showAllSeqs_actionPerformed(ActionEvent e)
2738 public void showAllColumns_actionPerformed(ActionEvent e)
2743 public void hideSelSequences_actionPerformed(ActionEvent e)
2748 public void hideSelColumns_actionPerformed(ActionEvent e)
2753 public void hiddenMarkers_actionPerformed(ActionEvent e)
2758 public void findPdbId_actionPerformed(ActionEvent e)
2763 public void enterPdbId_actionPerformed(ActionEvent e)
2768 public void pdbFile_actionPerformed(ActionEvent e)
2773 public void invertColSel_actionPerformed(ActionEvent e)
2778 public void tabSelectionChanged(int sel)
2783 public void tabbedPane_mousePressed(MouseEvent e)
2788 public void tabbedPane_focusGained(FocusEvent e)
2793 public void save_actionPerformed(ActionEvent e)
2798 public void reload_actionPerformed(ActionEvent e)
2803 public void newView_actionPerformed(ActionEvent e)
2808 public void textColour_actionPerformed()
2813 public void idRightAlign_actionPerformed(ActionEvent e)
2818 public void expandViews_actionPerformed(ActionEvent e)
2823 public void gatherViews_actionPerformed(ActionEvent e)
2828 public void buildTreeSortMenu()
2833 public void pageSetup_actionPerformed(ActionEvent e)
2838 public void alignmentProperties()
2843 protected void expand_newalign(ActionEvent e)
2845 // TODO Auto-generated method stub
2849 protected boolean isShowAutoCalculatedAbove()
2851 return showAutoCalculatedAbove;
2854 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2856 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2859 protected SequenceAnnotationOrder getAnnotationSortOrder()
2861 return annotationSortOrder;
2864 protected void setAnnotationSortOrder(
2865 SequenceAnnotationOrder annotationSortOrder)
2867 this.annotationSortOrder = annotationSortOrder;
2870 public Map<KeyStroke, JMenuItem> getAccelerators()
2872 return this.accelerators;
2876 * Returns the selected index of the tabbed pane, or -1 if none selected
2877 * (including the case where the tabbed pane has not been made visible).
2881 public int getTabIndex()
2883 return tabbedPane.getSelectedIndex();
2886 public JPanel getStatusPanel()
2892 * Sets a reference to the containing split frame. Also makes the 'toggle
2893 * split view' menu item visible and checked.
2897 public void setSplitFrame(SplitContainerI sf)
2899 this.splitFrame = sf;
2902 this.showComplementMenuItem.setVisible(true);
2903 this.showComplementMenuItem.setState(true);
2907 public SplitContainerI getSplitViewContainer()
2909 return this.splitFrame;
2912 protected void showComplement_actionPerformed(boolean complement)
2916 protected void showInformationHistogram_actionPerformed(ActionEvent e)
2918 // TODO Auto-generated method stub
2922 protected void showHMMSequenceLogo_actionPerformed(ActionEvent e)
2927 protected void normaliseHMMSequenceLogo_actionPerformed(ActionEvent e)