2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import java.awt.BorderLayout;
24 import java.awt.Color;
25 import java.awt.GridLayout;
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.KeyEvent;
32 import java.awt.event.MouseAdapter;
33 import java.awt.event.MouseEvent;
34 import java.util.HashMap;
35 import java.util.List;
38 import javax.swing.BorderFactory;
39 import javax.swing.ButtonGroup;
40 import javax.swing.JCheckBoxMenuItem;
41 import javax.swing.JInternalFrame;
42 import javax.swing.JLabel;
43 import javax.swing.JMenu;
44 import javax.swing.JMenuBar;
45 import javax.swing.JMenuItem;
46 import javax.swing.JPanel;
47 import javax.swing.JRadioButtonMenuItem;
48 import javax.swing.JTabbedPane;
49 import javax.swing.KeyStroke;
50 import javax.swing.event.ChangeEvent;
51 import javax.swing.event.MenuEvent;
52 import javax.swing.event.MenuListener;
54 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
55 import jalview.analysis.GeneticCodeI;
56 import jalview.analysis.GeneticCodes;
57 import jalview.api.SplitContainerI;
58 import jalview.bin.Cache;
59 import jalview.bin.Console;
60 import jalview.gui.JvSwingUtils;
61 import jalview.gui.Preferences;
62 import jalview.io.FileFormats;
63 import jalview.log.JLoggerLog4j;
64 import jalview.schemes.ResidueColourScheme;
65 import jalview.util.Log4j;
66 import jalview.util.MessageManager;
67 import jalview.util.Platform;
69 @SuppressWarnings("serial")
70 public class GAlignFrame extends JInternalFrame
72 protected JMenuBar alignFrameMenuBar = new JMenuBar();
74 protected JMenuItem closeMenuItem = new JMenuItem();
76 public JMenu webService = new JMenu();// BH 2019 was protected, but not
77 // sufficient for AlignFrame thread run
79 public JMenuItem webServiceNoServices;// BH 2019 was protected, but not
80 // sufficient for AlignFrame thread run
82 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
84 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
86 protected JMenu sortByAnnotScore = new JMenu();
88 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
90 // AlignFrame.printWriter
92 protected JMenu outputTextboxMenu = new JMenu();
94 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
96 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
98 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
100 protected JMenuItem undoMenuItem = new JMenuItem();
102 protected JMenuItem redoMenuItem = new JMenuItem();
104 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
106 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
108 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
110 JMenuItem copy = new JMenuItem();
112 JMenuItem copyHighlighted = new JMenuItem();
114 JMenuItem cut = new JMenuItem();
116 JMenu pasteMenu = new JMenu();
118 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
120 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
122 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
124 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
126 protected JCheckBoxMenuItem applyToAllGroups;
128 protected JMenu colourMenu = new JMenu();
130 protected JMenuItem textColour;
132 protected JCheckBoxMenuItem conservationMenuItem;
134 protected JMenuItem modifyConservation;
136 protected JCheckBoxMenuItem abovePIDThreshold;
138 protected JMenuItem modifyPID;
140 protected JRadioButtonMenuItem annotationColour;
142 protected JMenu sortByTreeMenu = new JMenu();
144 protected JMenu sort = new JMenu();
146 protected JMenuItem calculateTree = new JMenuItem();
148 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
150 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
152 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
154 protected JMenu showTranslation = new JMenu();
156 protected JMenuItem showReverse = new JMenuItem();
158 protected JMenuItem showReverseComplement = new JMenuItem();
160 protected JMenu showProducts = new JMenu();
162 protected JMenuItem runGroovy = new JMenuItem();
164 protected JMenuItem loadVcf;
166 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
168 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
170 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
172 protected JPanel statusPanel = new JPanel();
174 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
176 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
178 protected JMenuItem showAllAlAnnotations = new JMenuItem();
180 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
182 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
184 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
186 protected JTabbedPane tabbedPane = new JTabbedPane();
188 protected JMenuItem reload = new JMenuItem();
190 protected JMenu formatMenu = new JMenu();
192 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
194 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
196 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
198 protected JMenuItem gatherViews = new JMenuItem();
200 protected JMenuItem expandViews = new JMenuItem();
202 protected JCheckBoxMenuItem threeDStructure = new JCheckBoxMenuItem();
204 protected JCheckBoxMenuItem jPred = new JCheckBoxMenuItem();
206 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
208 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
210 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
212 protected JCheckBoxMenuItem showSSConsensusHistogram = new JCheckBoxMenuItem();
214 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
216 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
218 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
220 protected JMenuItem openFeatureSettings;
222 private SequenceAnnotationOrder annotationSortOrder;
224 private boolean showAutoCalculatedAbove = false;
226 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
228 private SplitContainerI splitFrame;
236 // for Web-page embedding using id=align-frame-div
237 setName("jalview-alignment");
240 setJMenuBar(alignFrameMenuBar);
242 // dynamically fill save as menu with available formats
243 for (String ff : FileFormats.getInstance().getWritableFormats(true))
245 JMenuItem item = new JMenuItem(ff);
247 item.addActionListener(new ActionListener()
250 public void actionPerformed(ActionEvent e)
252 outputText_actionPerformed(e.getActionCommand());
256 outputTextboxMenu.add(item);
258 } catch (Exception e)
260 jalview.bin.Console.errPrintln(e.toString());
263 if (Platform.allowMnemonics()) // was "not mac and not JS"
265 closeMenuItem.setMnemonic('C');
266 outputTextboxMenu.setMnemonic('T');
267 undoMenuItem.setMnemonic('Z');
268 redoMenuItem.setMnemonic('0');
269 copy.setMnemonic('C');
270 cut.setMnemonic('U');
271 pasteMenu.setMnemonic('P');
272 reload.setMnemonic('R');
276 private void jbInit() throws Exception
281 JMenuItem saveAs = new JMenuItem(
282 MessageManager.getString("action.save_as"));
283 ActionListener al = new ActionListener()
286 public void actionPerformed(ActionEvent e)
288 saveAs_actionPerformed();
292 // FIXME getDefaultToolkit throws an exception in Headless mode
293 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
294 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
295 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
297 addMenuActionAndAccelerator(keyStroke, saveAs, al);
299 closeMenuItem.setText(MessageManager.getString("action.close"));
300 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
301 jalview.util.ShortcutKeyMaskExWrapper
302 .getMenuShortcutKeyMaskEx(),
304 al = new ActionListener()
307 public void actionPerformed(ActionEvent e)
309 closeMenuItem_actionPerformed(false);
312 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
314 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
315 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
316 JMenu annotationsMenu = new JMenu(
317 MessageManager.getString("action.annotations"));
318 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
319 colourMenu.setText(MessageManager.getString("action.colour"));
320 JMenu calculateMenu = new JMenu(
321 MessageManager.getString("action.calculate"));
322 webService.setText(MessageManager.getString("action.web_service"));
323 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
324 MessageManager.getString("action.select_all"));
325 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
326 jalview.util.ShortcutKeyMaskExWrapper
327 .getMenuShortcutKeyMaskEx(),
329 al = new ActionListener()
332 public void actionPerformed(ActionEvent e)
334 selectAllSequenceMenuItem_actionPerformed(e);
337 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
339 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
340 MessageManager.getString("action.deselect_all"));
341 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
342 al = new ActionListener()
345 public void actionPerformed(ActionEvent e)
347 deselectAllSequenceMenuItem_actionPerformed(e);
350 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
352 JMenuItem invertSequenceMenuItem = new JMenuItem(
353 MessageManager.getString("action.invert_sequence_selection"));
354 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
355 jalview.util.ShortcutKeyMaskExWrapper
356 .getMenuShortcutKeyMaskEx(),
358 al = new ActionListener()
361 public void actionPerformed(ActionEvent e)
363 invertSequenceMenuItem_actionPerformed(e);
366 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
368 JMenuItem grpsFromSelection = new JMenuItem(
369 MessageManager.getString("action.make_groups_selection"));
370 grpsFromSelection.addActionListener(new ActionListener()
373 public void actionPerformed(ActionEvent e)
375 makeGrpsFromSelection_actionPerformed(e);
378 JMenuItem expandAlignment = new JMenuItem(
379 MessageManager.getString("action.view_flanking_regions"));
380 expandAlignment.setToolTipText(
381 MessageManager.getString("label.view_flanking_regions"));
382 expandAlignment.addActionListener(new ActionListener()
385 public void actionPerformed(ActionEvent e)
390 JMenuItem remove2LeftMenuItem = new JMenuItem(
391 MessageManager.getString("action.remove_left"));
392 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
393 jalview.util.ShortcutKeyMaskExWrapper
394 .getMenuShortcutKeyMaskEx(),
396 al = new ActionListener()
399 public void actionPerformed(ActionEvent e)
401 remove2LeftMenuItem_actionPerformed(e);
404 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
406 JMenuItem remove2RightMenuItem = new JMenuItem(
407 MessageManager.getString("action.remove_right"));
408 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
409 jalview.util.ShortcutKeyMaskExWrapper
410 .getMenuShortcutKeyMaskEx(),
412 al = new ActionListener()
415 public void actionPerformed(ActionEvent e)
417 remove2RightMenuItem_actionPerformed(e);
420 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
422 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
423 MessageManager.getString("action.remove_empty_columns"));
424 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
425 jalview.util.ShortcutKeyMaskExWrapper
426 .getMenuShortcutKeyMaskEx(),
428 al = new ActionListener()
431 public void actionPerformed(ActionEvent e)
433 removeGappedColumnMenuItem_actionPerformed(e);
436 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
438 JMenuItem removeAllGapsMenuItem = new JMenuItem(
439 MessageManager.getString("action.remove_all_gaps"));
440 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
441 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
442 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
444 al = new ActionListener()
447 public void actionPerformed(ActionEvent e)
449 removeAllGapsMenuItem_actionPerformed(e);
452 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
454 JMenuItem justifyLeftMenuItem = new JMenuItem(
455 MessageManager.getString("action.left_justify"));
456 justifyLeftMenuItem.setToolTipText(
457 MessageManager.getString("tooltip.left_justify"));
458 justifyLeftMenuItem.addActionListener(new ActionListener()
461 public void actionPerformed(ActionEvent e)
463 justifyLeftMenuItem_actionPerformed(e);
466 JMenuItem justifyRightMenuItem = new JMenuItem(
467 MessageManager.getString("action.right_justify"));
468 justifyRightMenuItem.setToolTipText(
469 MessageManager.getString("action.left_justify"));
471 justifyRightMenuItem.addActionListener(new ActionListener()
474 public void actionPerformed(ActionEvent e)
476 justifyRightMenuItem_actionPerformed(e);
479 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
480 viewBoxesMenuItem.setState(true);
481 viewBoxesMenuItem.addActionListener(new ActionListener()
484 public void actionPerformed(ActionEvent e)
486 viewBoxesMenuItem_actionPerformed(e);
489 viewTextMenuItem.setText(MessageManager.getString("action.text"));
490 viewTextMenuItem.setState(true);
491 viewTextMenuItem.addActionListener(new ActionListener()
494 public void actionPerformed(ActionEvent e)
496 viewTextMenuItem_actionPerformed(e);
499 showNonconservedMenuItem
500 .setText(MessageManager.getString("label.show_non_conserved"));
501 showNonconservedMenuItem.setState(false);
502 showNonconservedMenuItem.addActionListener(new ActionListener()
505 public void actionPerformed(ActionEvent e)
507 showUnconservedMenuItem_actionPerformed(e);
510 JMenuItem sortPairwiseMenuItem = new JMenuItem(
511 MessageManager.getString("action.by_pairwise_id"));
512 sortPairwiseMenuItem.addActionListener(new ActionListener()
515 public void actionPerformed(ActionEvent e)
517 sortPairwiseMenuItem_actionPerformed(e);
520 JMenuItem sortIDMenuItem = new JMenuItem(
521 MessageManager.getString("action.by_id"));
522 sortIDMenuItem.addActionListener(new ActionListener()
525 public void actionPerformed(ActionEvent e)
527 sortIDMenuItem_actionPerformed(e);
530 JMenuItem sortLengthMenuItem = new JMenuItem(
531 MessageManager.getString("action.by_length"));
532 sortLengthMenuItem.addActionListener(new ActionListener()
535 public void actionPerformed(ActionEvent e)
537 sortLengthMenuItem_actionPerformed(e);
540 JMenuItem sortGroupMenuItem = new JMenuItem(
541 MessageManager.getString("action.by_group"));
542 sortGroupMenuItem.addActionListener(new ActionListener()
545 public void actionPerformed(ActionEvent e)
547 sortGroupMenuItem_actionPerformed(e);
551 JMenuItem removeRedundancyMenuItem = new JMenuItem(
552 MessageManager.getString("action.remove_redundancy"));
553 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
554 jalview.util.ShortcutKeyMaskExWrapper
555 .getMenuShortcutKeyMaskEx(),
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"));
585 .setText(MessageManager.getString("label.out_to_textbox"));
587 annotationPanelMenuItem.setActionCommand("");
588 annotationPanelMenuItem
589 .setText(MessageManager.getString("label.show_annotations"));
590 annotationPanelMenuItem
591 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
592 annotationPanelMenuItem.addActionListener(new ActionListener()
595 public void actionPerformed(ActionEvent e)
597 annotationPanelMenuItem_actionPerformed(e);
600 showAllAlAnnotations.setText(
601 MessageManager.getString("label.show_all_al_annotations"));
602 final boolean isAnnotationPanelShown = annotationPanelMenuItem
604 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
605 showAllAlAnnotations.addActionListener(new ActionListener()
608 public void actionPerformed(ActionEvent e)
610 showAllAnnotations_actionPerformed(false, true);
613 hideAllAlAnnotations.setText(
614 MessageManager.getString("label.hide_all_al_annotations"));
615 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
616 hideAllAlAnnotations.addActionListener(new ActionListener()
619 public void actionPerformed(ActionEvent e)
621 hideAllAnnotations_actionPerformed(false, true);
624 showAllSeqAnnotations.setText(
625 MessageManager.getString("label.show_all_seq_annotations"));
626 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
627 showAllSeqAnnotations.addActionListener(new ActionListener()
630 public void actionPerformed(ActionEvent e)
632 showAllAnnotations_actionPerformed(true, false);
635 hideAllSeqAnnotations.setText(
636 MessageManager.getString("label.hide_all_seq_annotations"));
637 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
638 hideAllSeqAnnotations.addActionListener(new ActionListener()
641 public void actionPerformed(ActionEvent e)
643 hideAllAnnotations_actionPerformed(true, false);
646 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
647 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
648 SequenceAnnotationOrder.NONE.name()));
649 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
650 MessageManager.getString("label.sort_annotations_by_sequence"));
651 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
652 MessageManager.getString("label.sort_annotations_by_label"));
654 sortAnnBySequence.setSelected(
655 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
656 sortAnnBySequence.addActionListener(new ActionListener()
659 public void actionPerformed(ActionEvent e)
661 boolean newState = sortAnnBySequence.getState();
662 sortAnnByLabel.setSelected(false);
663 setAnnotationSortOrder(
664 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
665 : SequenceAnnotationOrder.NONE);
666 sortAnnotations_actionPerformed();
669 sortAnnByLabel.setSelected(
670 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
671 sortAnnByLabel.addActionListener(new ActionListener()
674 public void actionPerformed(ActionEvent e)
676 boolean newState = sortAnnByLabel.getState();
677 sortAnnBySequence.setSelected(false);
678 setAnnotationSortOrder(
679 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
680 : SequenceAnnotationOrder.NONE);
681 sortAnnotations_actionPerformed();
684 colourTextMenuItem = new JCheckBoxMenuItem(
685 MessageManager.getString("label.colour_text"));
686 colourTextMenuItem.addActionListener(new ActionListener()
689 public void actionPerformed(ActionEvent e)
691 colourTextMenuItem_actionPerformed(e);
695 JMenuItem htmlMenuItem = new JMenuItem(
696 MessageManager.getString("label.html"));
697 htmlMenuItem.addActionListener(new ActionListener()
700 public void actionPerformed(ActionEvent e)
702 htmlMenuItem_actionPerformed(e);
706 JMenuItem createBioJS = new JMenuItem(
707 MessageManager.getString("label.biojs_html_export"));
708 createBioJS.addActionListener(new java.awt.event.ActionListener()
711 public void actionPerformed(ActionEvent e)
713 bioJSMenuItem_actionPerformed(e);
717 JMenuItem overviewMenuItem = new JMenuItem(
718 MessageManager.getString("label.overview_window"));
719 overviewMenuItem.addActionListener(new ActionListener()
722 public void actionPerformed(ActionEvent e)
724 overviewMenuItem_actionPerformed(e);
728 undoMenuItem.setEnabled(false);
729 undoMenuItem.setText(MessageManager.getString("action.undo"));
730 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
731 jalview.util.ShortcutKeyMaskExWrapper
732 .getMenuShortcutKeyMaskEx(),
734 al = new ActionListener()
737 public void actionPerformed(ActionEvent e)
739 undoMenuItem_actionPerformed(e);
742 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
744 redoMenuItem.setEnabled(false);
745 redoMenuItem.setText(MessageManager.getString("action.redo"));
746 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
747 jalview.util.ShortcutKeyMaskExWrapper
748 .getMenuShortcutKeyMaskEx(),
750 al = new ActionListener()
753 public void actionPerformed(ActionEvent e)
755 redoMenuItem_actionPerformed(e);
758 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
760 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
761 wrapMenuItem.addActionListener(new ActionListener()
764 public void actionPerformed(ActionEvent e)
766 wrapMenuItem_actionPerformed(e);
770 JMenuItem printMenuItem = new JMenuItem(
771 MessageManager.getString("action.print"));
772 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
773 jalview.util.ShortcutKeyMaskExWrapper
774 .getMenuShortcutKeyMaskEx(),
776 al = new ActionListener()
779 public void actionPerformed(ActionEvent e)
781 printMenuItem_actionPerformed(e);
784 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
787 .setText(MessageManager.getString("action.show_gaps"));
788 renderGapsMenuItem.setState(true);
789 renderGapsMenuItem.addActionListener(new ActionListener()
792 public void actionPerformed(ActionEvent e)
794 renderGapsMenuItem_actionPerformed(e);
798 JMenuItem findMenuItem = new JMenuItem(
799 MessageManager.getString("action.find"));
800 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
801 jalview.util.ShortcutKeyMaskExWrapper
802 .getMenuShortcutKeyMaskEx(),
804 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
805 MessageManager.getString("label.find_tip")));
806 al = new ActionListener()
809 public void actionPerformed(ActionEvent e)
811 findMenuItem_actionPerformed(e);
814 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
816 showSeqFeatures.setText(
817 MessageManager.getString("label.show_sequence_features"));
818 showSeqFeatures.addActionListener(new ActionListener()
821 public void actionPerformed(ActionEvent actionEvent)
823 showSeqFeatures_actionPerformed(actionEvent);
827 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
828 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
829 * void actionPerformed(ActionEvent actionEvent) {
830 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
833 .setText(MessageManager.getString("label.show_database_refs"));
834 showDbRefsMenuitem.addActionListener(new ActionListener()
838 public void actionPerformed(ActionEvent e)
840 showDbRefs_actionPerformed(e);
844 showNpFeatsMenuitem.setText(
845 MessageManager.getString("label.show_non_positional_features"));
846 showNpFeatsMenuitem.addActionListener(new ActionListener()
850 public void actionPerformed(ActionEvent e)
852 showNpFeats_actionPerformed(e);
856 showGroupConservation
857 .setText(MessageManager.getString("label.group_conservation"));
858 showGroupConservation.addActionListener(new ActionListener()
862 public void actionPerformed(ActionEvent e)
864 showGroupConservation_actionPerformed(e);
870 .setText(MessageManager.getString("label.group_consensus"));
871 showGroupConsensus.addActionListener(new ActionListener()
875 public void actionPerformed(ActionEvent e)
877 showGroupConsensus_actionPerformed(e);
881 showConsensusHistogram.setText(
882 MessageManager.getString("label.show_consensus_histogram"));
883 showConsensusHistogram.addActionListener(new ActionListener()
887 public void actionPerformed(ActionEvent e)
889 showConsensusHistogram_actionPerformed(e);
893 showSSConsensusHistogram.setText(
894 MessageManager.getString("label.show_ssconsensus_histogram"));
895 showSSConsensusHistogram.addActionListener(new ActionListener()
899 public void actionPerformed(ActionEvent e)
901 showConsensusHistogram_actionPerformed(e);
906 .setText(MessageManager.getString("label.show_consensus_logo"));
907 showSequenceLogo.addActionListener(new ActionListener()
911 public void actionPerformed(ActionEvent e)
913 showSequenceLogo_actionPerformed(e);
917 normaliseSequenceLogo
918 .setText(MessageManager.getString("label.norm_consensus_logo"));
919 normaliseSequenceLogo.addActionListener(new ActionListener()
923 public void actionPerformed(ActionEvent e)
925 normaliseSequenceLogo_actionPerformed(e);
929 applyAutoAnnotationSettings
930 .setText(MessageManager.getString("label.apply_all_groups"));
931 applyAutoAnnotationSettings.setState(false);
932 applyAutoAnnotationSettings.setVisible(true);
933 applyAutoAnnotationSettings.addActionListener(new ActionListener()
936 public void actionPerformed(ActionEvent e)
938 applyAutoAnnotationSettings_actionPerformed(e);
942 ButtonGroup buttonGroup = new ButtonGroup();
943 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
944 MessageManager.getString("label.show_first"));
945 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
946 MessageManager.getString("label.show_last"));
947 buttonGroup.add(showAutoFirst);
948 buttonGroup.add(showAutoLast);
949 final boolean autoFirst = Cache
950 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
951 showAutoFirst.setSelected(autoFirst);
952 setShowAutoCalculatedAbove(autoFirst);
953 showAutoFirst.addActionListener(new ActionListener()
956 public void actionPerformed(ActionEvent e)
958 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
959 sortAnnotations_actionPerformed();
962 showAutoLast.setSelected(!showAutoFirst.isSelected());
963 showAutoLast.addActionListener(new ActionListener()
966 public void actionPerformed(ActionEvent e)
968 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
969 sortAnnotations_actionPerformed();
973 JMenuItem deleteGroups = new JMenuItem(
974 MessageManager.getString("action.undefine_groups"));
975 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
976 jalview.util.ShortcutKeyMaskExWrapper
977 .getMenuShortcutKeyMaskEx(),
979 al = new ActionListener()
982 public void actionPerformed(ActionEvent e)
984 deleteGroups_actionPerformed(e);
987 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
989 JMenuItem annotationColumn = new JMenuItem(
990 MessageManager.getString("action.select_by_annotation"));
991 annotationColumn.addActionListener(new ActionListener()
994 public void actionPerformed(ActionEvent e)
996 annotationColumn_actionPerformed(e);
1000 JMenuItem createGroup = new JMenuItem(
1001 MessageManager.getString("action.create_group"));
1002 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
1003 jalview.util.ShortcutKeyMaskExWrapper
1004 .getMenuShortcutKeyMaskEx(),
1006 al = new ActionListener()
1009 public void actionPerformed(ActionEvent e)
1011 createGroup_actionPerformed(e);
1014 addMenuActionAndAccelerator(keyStroke, createGroup, al);
1016 JMenuItem unGroup = new JMenuItem(
1017 MessageManager.getString("action.remove_group"));
1018 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
1019 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1020 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1022 al = new ActionListener()
1025 public void actionPerformed(ActionEvent e)
1027 unGroup_actionPerformed(e);
1030 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1032 copy.setText(MessageManager.getString("action.copy"));
1033 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1034 jalview.util.ShortcutKeyMaskExWrapper
1035 .getMenuShortcutKeyMaskEx(),
1038 al = new ActionListener()
1041 public void actionPerformed(ActionEvent e)
1043 copy_actionPerformed();
1046 addMenuActionAndAccelerator(keyStroke, copy, al);
1048 cut.setText(MessageManager.getString("action.cut"));
1049 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1050 jalview.util.ShortcutKeyMaskExWrapper
1051 .getMenuShortcutKeyMaskEx(),
1053 al = new ActionListener()
1056 public void actionPerformed(ActionEvent e)
1058 cut_actionPerformed();
1061 addMenuActionAndAccelerator(keyStroke, cut, al);
1063 JMenuItem delete = new JMenuItem(
1064 MessageManager.getString("action.delete"));
1065 delete.addActionListener(new ActionListener()
1068 public void actionPerformed(ActionEvent e)
1070 delete_actionPerformed();
1074 pasteMenu.setText(MessageManager.getString("action.paste"));
1075 JMenuItem pasteNew = new JMenuItem(
1076 MessageManager.getString("label.to_new_alignment"));
1077 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1078 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1079 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1081 al = new ActionListener()
1084 public void actionPerformed(ActionEvent e)
1086 pasteNew_actionPerformed(e);
1089 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1091 JMenuItem pasteThis = new JMenuItem(
1092 MessageManager.getString("label.to_this_alignment"));
1093 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1094 jalview.util.ShortcutKeyMaskExWrapper
1095 .getMenuShortcutKeyMaskEx(),
1097 al = new ActionListener()
1100 public void actionPerformed(ActionEvent e)
1102 pasteThis_actionPerformed(e);
1105 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1107 JMenuItem createPNG = new JMenuItem("PNG");
1108 createPNG.addActionListener(new ActionListener()
1111 public void actionPerformed(ActionEvent e)
1113 createPNG_actionPerformed(e);
1116 createPNG.setActionCommand(
1117 MessageManager.getString("label.save_png_image"));
1119 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1120 font.addActionListener(new ActionListener()
1123 public void actionPerformed(ActionEvent e)
1125 font_actionPerformed(e);
1129 MessageManager.getString("label.show_sequence_limits"));
1130 seqLimits.setState(Cache.getDefault("SHOW_JVSUFFIX", true));
1131 seqLimits.addActionListener(new ActionListener()
1134 public void actionPerformed(ActionEvent e)
1136 seqLimit_actionPerformed(e);
1139 JMenuItem epsFile = new JMenuItem("EPS");
1140 epsFile.addActionListener(new ActionListener()
1143 public void actionPerformed(ActionEvent e)
1145 createEPS_actionPerformed(e);
1149 JMenuItem createSVG = new JMenuItem("SVG");
1150 createSVG.addActionListener(new ActionListener()
1153 public void actionPerformed(ActionEvent e)
1155 createSVG_actionPerformed(e);
1159 JMenuItem loadTreeMenuItem = new JMenuItem(
1160 MessageManager.getString("label.load_associated_tree"));
1161 loadTreeMenuItem.setActionCommand(
1162 MessageManager.getString("label.load_tree_for_sequence_set"));
1163 loadTreeMenuItem.addActionListener(new ActionListener()
1166 public void actionPerformed(ActionEvent e)
1168 loadTreeMenuItem_actionPerformed(e);
1172 scaleAbove.setVisible(false);
1173 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1174 scaleAbove.addActionListener(new ActionListener()
1177 public void actionPerformed(ActionEvent e)
1179 scaleAbove_actionPerformed(e);
1182 scaleLeft.setVisible(false);
1183 scaleLeft.setSelected(true);
1184 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1185 scaleLeft.addActionListener(new ActionListener()
1188 public void actionPerformed(ActionEvent e)
1190 scaleLeft_actionPerformed(e);
1193 scaleRight.setVisible(false);
1194 scaleRight.setSelected(true);
1195 scaleRight.setText(MessageManager.getString("action.scale_right"));
1196 scaleRight.addActionListener(new ActionListener()
1199 public void actionPerformed(ActionEvent e)
1201 scaleRight_actionPerformed(e);
1204 centreColumnLabelsMenuItem.setVisible(true);
1205 centreColumnLabelsMenuItem.setState(false);
1206 centreColumnLabelsMenuItem.setText(
1207 MessageManager.getString("label.centre_column_labels"));
1208 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1211 public void actionPerformed(ActionEvent e)
1213 centreColumnLabels_actionPerformed(e);
1216 followHighlightMenuItem.setVisible(true);
1217 followHighlightMenuItem.setState(true);
1218 followHighlightMenuItem
1219 .setText(MessageManager.getString("label.automatic_scrolling"));
1220 followHighlightMenuItem.addActionListener(new ActionListener()
1224 public void actionPerformed(ActionEvent e)
1226 followHighlight_actionPerformed();
1232 .setText(MessageManager.getString("action.by_tree_order"));
1233 sort.setText(MessageManager.getString("action.sort"));
1234 sort.addMenuListener(new MenuListener()
1237 public void menuSelected(MenuEvent e)
1239 buildTreeSortMenu();
1243 public void menuDeselected(MenuEvent e)
1248 public void menuCanceled(MenuEvent e)
1253 .setText(MessageManager.getString("label.sort_by_score"));
1254 sort.add(sortByAnnotScore);
1255 sort.addMenuListener(new javax.swing.event.MenuListener()
1259 public void menuCanceled(MenuEvent e)
1264 public void menuDeselected(MenuEvent e)
1269 public void menuSelected(MenuEvent e)
1271 buildSortByAnnotationScoresMenu();
1274 sortByAnnotScore.setVisible(false);
1277 .setText(MessageManager.getString("action.calculate_tree_pca"));
1279 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1280 padGapsMenuitem.setState(Cache.getDefault("PAD_GAPS", false));
1281 padGapsMenuitem.addActionListener(new ActionListener()
1284 public void actionPerformed(ActionEvent e)
1286 padGapsMenuitem_actionPerformed(e);
1289 JMenuItem vamsasStore = new JMenuItem(
1290 MessageManager.getString("label.vamsas_store"));
1291 vamsasStore.setVisible(false);
1292 vamsasStore.addActionListener(new ActionListener()
1295 public void actionPerformed(ActionEvent e)
1297 vamsasStore_actionPerformed(e);
1302 * Translate as cDNA with sub-menu of translation tables
1305 .setText(MessageManager.getString("label.translate_cDNA"));
1306 boolean first = true;
1307 for (final GeneticCodeI table : GeneticCodes.getInstance()
1310 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1311 showTranslation.add(item);
1312 item.addActionListener(new ActionListener()
1315 public void actionPerformed(ActionEvent e)
1317 showTranslation_actionPerformed(table);
1322 showTranslation.addSeparator();
1327 showReverse.setText(MessageManager.getString("label.reverse"));
1328 showReverse.addActionListener(new ActionListener()
1331 public void actionPerformed(ActionEvent e)
1333 showReverse_actionPerformed(false);
1336 showReverseComplement
1337 .setText(MessageManager.getString("label.reverse_complement"));
1338 showReverseComplement.addActionListener(new ActionListener()
1341 public void actionPerformed(ActionEvent e)
1343 showReverse_actionPerformed(true);
1347 JMenuItem extractScores = new JMenuItem(
1348 MessageManager.getString("label.extract_scores"));
1349 extractScores.addActionListener(new ActionListener()
1352 public void actionPerformed(ActionEvent e)
1354 extractScores_actionPerformed(e);
1357 extractScores.setVisible(true);
1358 // JBPNote: TODO: make gui for regex based score extraction
1360 // for show products actions see AlignFrame.canShowProducts
1361 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1363 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1364 runGroovy.setToolTipText(
1365 MessageManager.getString("label.run_groovy_tip"));
1366 runGroovy.addActionListener(new ActionListener()
1369 public void actionPerformed(ActionEvent e)
1371 runGroovy_actionPerformed();
1375 openFeatureSettings = new JMenuItem(
1376 MessageManager.getString("action.feature_settings"));
1377 openFeatureSettings.addActionListener(new ActionListener()
1380 public void actionPerformed(ActionEvent e)
1382 featureSettings_actionPerformed(e);
1387 * add sub-menu of database we can fetch from
1389 JMenuItem fetchSequence = new JMenuItem(
1390 MessageManager.getString("label.fetch_sequences"));
1391 fetchSequence.addActionListener(new ActionListener()
1394 public void actionPerformed(ActionEvent e)
1396 fetchSequence_actionPerformed();
1400 JMenuItem associatedData = new JMenuItem(
1401 MessageManager.getString("label.load_features_annotations"));
1402 associatedData.addActionListener(new ActionListener()
1405 public void actionPerformed(ActionEvent e)
1407 associatedData_actionPerformed(e);
1410 loadVcf = new JMenuItem(
1411 MessageManager.getString("label.load_vcf_file"));
1412 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1413 loadVcf.addActionListener(new ActionListener()
1416 public void actionPerformed(ActionEvent e)
1418 loadVcf_actionPerformed();
1421 autoCalculate.setText(
1422 MessageManager.getString("label.autocalculate_consensus"));
1423 autoCalculate.setState(Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1424 autoCalculate.addActionListener(new ActionListener()
1427 public void actionPerformed(ActionEvent e)
1429 autoCalculate_actionPerformed(e);
1433 MessageManager.getString("label.sort_alignment_new_tree"));
1434 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1435 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1436 sortByTree.setState(Cache.getDefault("SORT_BY_TREE", false));
1437 sortByTree.addActionListener(new ActionListener()
1440 public void actionPerformed(ActionEvent e)
1442 sortByTreeOption_actionPerformed(e);
1446 listenToViewSelections.setText(
1447 MessageManager.getString("label.listen_for_selections"));
1448 listenToViewSelections
1449 .setToolTipText("<html>" + MessageManager.getString(
1450 "label.selections_mirror_selections_made_same_sequences_other_views"));
1451 listenToViewSelections.setState(false);
1452 listenToViewSelections.addActionListener(new ActionListener()
1455 public void actionPerformed(ActionEvent e)
1457 listenToViewSelections_actionPerformed(e);
1461 JMenu addSequenceMenu = new JMenu(
1462 MessageManager.getString("label.add_sequences"));
1463 JMenuItem addFromFile = new JMenuItem(
1464 MessageManager.getString("label.from_file"));
1465 addFromFile.addActionListener(new ActionListener()
1468 public void actionPerformed(ActionEvent e)
1470 addFromFile_actionPerformed(e);
1473 JMenuItem addFromText = new JMenuItem(
1474 MessageManager.getString("label.from_textbox"));
1475 addFromText.addActionListener(new ActionListener()
1478 public void actionPerformed(ActionEvent e)
1480 addFromText_actionPerformed(e);
1483 JMenuItem addFromURL = new JMenuItem(
1484 MessageManager.getString("label.from_url"));
1485 addFromURL.addActionListener(new ActionListener()
1488 public void actionPerformed(ActionEvent e)
1490 addFromURL_actionPerformed(e);
1493 JMenuItem exportFeatures = new JMenuItem(
1494 MessageManager.getString("label.export_features"));
1495 exportFeatures.addActionListener(new ActionListener()
1498 public void actionPerformed(ActionEvent e)
1500 exportFeatures_actionPerformed(e);
1503 JMenuItem exportAnnotations = new JMenuItem(
1504 MessageManager.getString("label.export_annotations"));
1505 exportAnnotations.addActionListener(new ActionListener()
1508 public void actionPerformed(ActionEvent e)
1510 exportAnnotations_actionPerformed(e);
1513 statusPanel.setLayout(new GridLayout());
1514 JMenuItem showAllSeqs = new JMenuItem(
1515 MessageManager.getString("label.all_sequences"));
1516 showAllSeqs.setToolTipText(
1517 MessageManager.getString("label.toggle_sequence_visibility"));
1518 showAllSeqs.addActionListener(new ActionListener()
1521 public void actionPerformed(ActionEvent e)
1523 showAllSeqs_actionPerformed(e);
1526 JMenuItem showAllColumns = new JMenuItem(
1527 MessageManager.getString("label.all_columns"));
1528 showAllColumns.setToolTipText(
1529 MessageManager.getString("label.toggle_columns_visibility"));
1530 showAllColumns.addActionListener(new ActionListener()
1533 public void actionPerformed(ActionEvent e)
1535 showAllColumns_actionPerformed(e);
1538 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1539 JMenuItem hideSelSequences = new JMenuItem(
1540 MessageManager.getString("label.selected_sequences"));
1541 hideSelSequences.setToolTipText(
1542 MessageManager.getString("label.toggle_sequence_visibility"));
1543 hideSelSequences.addActionListener(new ActionListener()
1546 public void actionPerformed(ActionEvent e)
1548 hideSelSequences_actionPerformed(e);
1551 JMenuItem hideSelColumns = new JMenuItem(
1552 MessageManager.getString("label.selected_columns"));
1553 hideSelColumns.setToolTipText(
1554 MessageManager.getString("label.toggle_columns_visibility"));
1555 hideSelColumns.addActionListener(new ActionListener()
1558 public void actionPerformed(ActionEvent e)
1560 hideSelColumns_actionPerformed(e);
1563 JMenuItem hideAllSelection = new JMenuItem(
1564 MessageManager.getString("label.selected_region"));
1565 hideAllSelection.addActionListener(new ActionListener()
1568 public void actionPerformed(ActionEvent e)
1570 hideAllSelection_actionPerformed(e);
1573 // TODO: should be hidden if no selection exists.
1574 JMenuItem hideAllButSelection = new JMenuItem(
1575 MessageManager.getString("label.all_but_selected_region"));
1576 hideAllButSelection.addActionListener(new ActionListener()
1579 public void actionPerformed(ActionEvent e)
1581 hideAllButSelection_actionPerformed(e);
1584 JMenuItem showAllhidden = new JMenuItem(
1585 MessageManager.getString("label.all_sequences_columns"));
1586 showAllhidden.setToolTipText(MessageManager
1587 .getString("label.toggles_visibility_hidden_selected_regions"));
1588 showAllhidden.addActionListener(new ActionListener()
1591 public void actionPerformed(ActionEvent e)
1593 showAllhidden_actionPerformed(e);
1596 hiddenMarkers.setText(
1597 MessageManager.getString("action.show_hidden_markers"));
1598 hiddenMarkers.addActionListener(new ActionListener()
1601 public void actionPerformed(ActionEvent e)
1603 hiddenMarkers_actionPerformed(e);
1607 JMenuItem invertColSel = new JMenuItem(
1608 MessageManager.getString("action.invert_column_selection"));
1609 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1610 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1611 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1613 al = new ActionListener()
1616 public void actionPerformed(ActionEvent e)
1618 invertColSel_actionPerformed(e);
1621 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1623 showComplementMenuItem.setVisible(false);
1624 showComplementMenuItem.addActionListener(new ActionListener()
1627 public void actionPerformed(ActionEvent e)
1629 showComplement_actionPerformed(showComplementMenuItem.getState());
1633 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1636 public void stateChanged(ChangeEvent evt)
1638 JTabbedPane pane = (JTabbedPane) evt.getSource();
1639 int sel = pane.getSelectedIndex();
1640 tabSelectionChanged(sel);
1643 tabbedPane.addMouseListener(new MouseAdapter()
1646 public void mousePressed(MouseEvent e)
1648 if (e.isPopupTrigger()) // Mac
1650 tabbedPane_mousePressed(e);
1655 public void mouseReleased(MouseEvent e)
1657 if (e.isPopupTrigger()) // Windows
1659 tabbedPane_mousePressed(e);
1663 tabbedPane.addFocusListener(new FocusAdapter()
1666 public void focusGained(FocusEvent e)
1668 tabbedPane_focusGained(e);
1672 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1673 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1674 jalview.util.ShortcutKeyMaskExWrapper
1675 .getMenuShortcutKeyMaskEx(),
1677 al = new ActionListener()
1680 public void actionPerformed(ActionEvent e)
1682 save_actionPerformed(e);
1685 addMenuActionAndAccelerator(keyStroke, save, al);
1687 reload.setEnabled(false);
1688 reload.setText(MessageManager.getString("action.reload"));
1689 reload.addActionListener(new ActionListener()
1692 public void actionPerformed(ActionEvent e)
1694 reload_actionPerformed(e);
1698 JMenuItem newView = new JMenuItem(
1699 MessageManager.getString("action.new_view"));
1700 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1701 jalview.util.ShortcutKeyMaskExWrapper
1702 .getMenuShortcutKeyMaskEx(),
1704 al = new ActionListener()
1707 public void actionPerformed(ActionEvent e)
1709 newView_actionPerformed(e);
1712 addMenuActionAndAccelerator(keyStroke, newView, al);
1714 tabbedPane.setToolTipText("<html><i>"
1715 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1718 formatMenu.setText(MessageManager.getString("action.format"));
1719 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1721 idRightAlign.setText(
1722 MessageManager.getString("label.right_align_sequence_id"));
1723 idRightAlign.addActionListener(new ActionListener()
1726 public void actionPerformed(ActionEvent e)
1728 idRightAlign_actionPerformed(e);
1732 gatherViews.setEnabled(false);
1733 gatherViews.setText(MessageManager.getString("action.gather_views"));
1734 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1735 al = new ActionListener()
1738 public void actionPerformed(ActionEvent e)
1740 gatherViews_actionPerformed(e);
1743 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1745 expandViews.setEnabled(false);
1746 expandViews.setText(MessageManager.getString("action.expand_views"));
1747 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1748 al = new ActionListener()
1751 public void actionPerformed(ActionEvent e)
1753 expandViews_actionPerformed(e);
1756 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1758 JMenuItem pageSetup = new JMenuItem(
1759 MessageManager.getString("action.page_setup"));
1760 pageSetup.addActionListener(new ActionListener()
1763 public void actionPerformed(ActionEvent e)
1765 pageSetup_actionPerformed(e);
1768 JMenuItem alignmentProperties = new JMenuItem(
1769 MessageManager.getString("label.alignment_props"));
1770 alignmentProperties.addActionListener(new ActionListener()
1773 public void actionPerformed(ActionEvent actionEvent)
1775 alignmentProperties();
1778 JMenuItem selectHighlighted = new JMenuItem(
1779 MessageManager.getString("action.select_highlighted_columns"));
1780 selectHighlighted.setToolTipText(
1781 MessageManager.getString("tooltip.select_highlighted_columns"));
1782 al = new ActionListener()
1785 public void actionPerformed(ActionEvent actionEvent)
1787 selectHighlightedColumns_actionPerformed(actionEvent);
1790 selectHighlighted.addActionListener(al);
1792 copyHighlighted = new JMenuItem(
1793 MessageManager.getString("action.copy_highlighted_regions"));
1794 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1795 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1796 + jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1798 copyHighlighted.setToolTipText(
1799 MessageManager.getString("tooltip.copy_highlighted_regions"));
1800 al = new ActionListener()
1803 public void actionPerformed(ActionEvent actionEvent)
1805 copyHighlightedColumns_actionPerformed(actionEvent);
1808 addMenuActionAndAccelerator(keyStroke, copyHighlighted, al);
1809 copyHighlighted.addActionListener(al);
1813 ButtonGroup ssButtonGroup = new ButtonGroup();
1814 final JRadioButtonMenuItem showAll = new JRadioButtonMenuItem(
1815 MessageManager.getString("label.show_first"));
1816 final JRadioButtonMenuItem showjPred = new JRadioButtonMenuItem(
1817 MessageManager.getString("label.show_last"));
1818 final JRadioButtonMenuItem show3DSS = new JRadioButtonMenuItem(
1819 MessageManager.getString("label.show_last"));
1820 ssButtonGroup.add(showAll);
1821 ssButtonGroup.add(showjPred);
1822 ssButtonGroup.add(show3DSS);
1823 final boolean autoFirst1 = Cache
1824 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
1825 showAll.setSelected(autoFirst1);
1826 setShowAutoCalculatedAbove(autoFirst);
1827 showAutoFirst.addActionListener(new ActionListener()
1830 public void actionPerformed(ActionEvent e)
1832 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
1833 sortAnnotations_actionPerformed();
1836 showAutoLast.setSelected(!showAutoFirst.isSelected());
1837 showAutoLast.addActionListener(new ActionListener()
1840 public void actionPerformed(ActionEvent e)
1842 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
1843 sortAnnotations_actionPerformed();
1847 JMenu tooltipSettingsMenu = new JMenu(
1848 MessageManager.getString("label.sequence_id_tooltip"));
1849 JMenu autoAnnMenu = new JMenu(
1850 MessageManager.getString("label.autocalculated_annotation"));
1852 JMenu showSS = new JMenu(
1853 MessageManager.getString("label.show_secondary_structure"));
1855 showSS.addMouseListener(new MouseAdapter() {
1858 public void mouseEntered(MouseEvent e) {
1860 updateShowSSRadioButtons(showSS, ssButtonGroup); // Update radio buttons every time the menu is clicked
1865 JMenu exportImageMenu = new JMenu(
1866 MessageManager.getString("label.export_image"));
1867 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1868 alignFrameMenuBar.add(fileMenu);
1869 alignFrameMenuBar.add(editMenu);
1870 alignFrameMenuBar.add(selectMenu);
1871 alignFrameMenuBar.add(viewMenu);
1872 alignFrameMenuBar.add(annotationsMenu);
1873 alignFrameMenuBar.add(formatMenu);
1874 alignFrameMenuBar.add(colourMenu);
1875 alignFrameMenuBar.add(calculateMenu);
1876 if (!Platform.isJS())
1878 alignFrameMenuBar.add(webService);
1881 fileMenu.add(fetchSequence);
1882 fileMenu.add(addSequenceMenu);
1883 fileMenu.add(reload);
1884 fileMenu.addSeparator();
1885 fileMenu.add(vamsasStore);
1887 fileMenu.add(saveAs);
1888 fileMenu.add(outputTextboxMenu);
1889 fileMenu.add(pageSetup);
1890 fileMenu.add(printMenuItem);
1891 fileMenu.addSeparator();
1892 fileMenu.add(exportImageMenu);
1893 fileMenu.add(exportFeatures);
1894 fileMenu.add(exportAnnotations);
1895 fileMenu.add(loadTreeMenuItem);
1896 fileMenu.add(associatedData);
1897 if (!Platform.isJS())
1899 fileMenu.add(loadVcf);
1901 fileMenu.addSeparator();
1902 fileMenu.add(closeMenuItem);
1904 pasteMenu.add(pasteNew);
1905 pasteMenu.add(pasteThis);
1906 editMenu.add(undoMenuItem);
1907 editMenu.add(redoMenuItem);
1910 editMenu.add(copyHighlighted);
1911 editMenu.add(pasteMenu);
1912 editMenu.add(delete);
1913 editMenu.addSeparator();
1914 editMenu.add(remove2LeftMenuItem);
1915 editMenu.add(remove2RightMenuItem);
1916 editMenu.add(removeGappedColumnMenuItem);
1917 editMenu.add(removeAllGapsMenuItem);
1918 editMenu.add(removeRedundancyMenuItem);
1919 editMenu.addSeparator();
1921 editMenu.add(justifyLeftMenuItem);
1922 editMenu.add(justifyRightMenuItem);
1924 editMenu.addSeparator();
1925 editMenu.add(padGapsMenuitem);
1927 showMenu.add(showAllColumns);
1928 showMenu.add(showAllSeqs);
1929 showMenu.add(showAllhidden);
1930 hideMenu.add(hideSelColumns);
1931 hideMenu.add(hideSelSequences);
1932 hideMenu.add(hideAllSelection);
1933 hideMenu.add(hideAllButSelection);
1934 viewMenu.add(newView);
1935 viewMenu.add(expandViews);
1936 viewMenu.add(gatherViews);
1937 viewMenu.addSeparator();
1938 viewMenu.add(showMenu);
1939 viewMenu.add(hideMenu);
1940 viewMenu.add(showComplementMenuItem);
1941 viewMenu.addSeparator();
1942 viewMenu.add(followHighlightMenuItem);
1943 viewMenu.addSeparator();
1944 viewMenu.add(showSeqFeatures);
1945 // viewMenu.add(showSeqFeaturesHeight);
1946 viewMenu.add(openFeatureSettings);
1947 tooltipSettingsMenu.add(showDbRefsMenuitem);
1948 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1949 viewMenu.add(tooltipSettingsMenu);
1950 viewMenu.addSeparator();
1951 viewMenu.add(alignmentProperties);
1952 viewMenu.addSeparator();
1953 viewMenu.add(overviewMenuItem);
1955 annotationsMenu.add(annotationPanelMenuItem);
1956 annotationsMenu.addSeparator();
1957 annotationsMenu.add(showAllAlAnnotations);
1958 annotationsMenu.add(hideAllAlAnnotations);
1959 annotationsMenu.addSeparator();
1960 annotationsMenu.add(showAllSeqAnnotations);
1961 annotationsMenu.add(hideAllSeqAnnotations);
1962 annotationsMenu.add(sortAnnBySequence);
1963 annotationsMenu.add(sortAnnByLabel);
1964 annotationsMenu.addSeparator();
1965 annotationsMenu.add(showSS);
1966 annotationsMenu.addSeparator();
1967 autoAnnMenu.add(showAutoFirst);
1968 autoAnnMenu.add(showAutoLast);
1969 autoAnnMenu.addSeparator();
1970 autoAnnMenu.add(applyAutoAnnotationSettings);
1971 autoAnnMenu.add(showConsensusHistogram);
1972 autoAnnMenu.add(showSSConsensusHistogram);
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 if (!Platform.isJS())
2001 calculateMenu.addSeparator();
2002 calculateMenu.add(runGroovy);
2005 webServiceNoServices = new JMenuItem(
2006 MessageManager.getString("label.no_services"));
2007 webService.add(webServiceNoServices);
2008 if (!Platform.isJS())
2010 exportImageMenu.add(htmlMenuItem);
2012 exportImageMenu.add(epsFile);
2013 exportImageMenu.add(createPNG);
2014 if (!Platform.isJS())
2016 exportImageMenu.add(createBioJS);
2017 exportImageMenu.add(createSVG);
2019 addSequenceMenu.add(addFromFile);
2020 addSequenceMenu.add(addFromText);
2021 addSequenceMenu.add(addFromURL);
2022 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
2023 statusPanel.add(statusBar, null);
2024 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
2026 formatMenu.add(font);
2027 formatMenu.addSeparator();
2028 formatMenu.add(wrapMenuItem);
2029 formatMenu.add(scaleAbove);
2030 formatMenu.add(scaleLeft);
2031 formatMenu.add(scaleRight);
2032 formatMenu.add(seqLimits);
2033 formatMenu.add(idRightAlign);
2034 formatMenu.add(hiddenMarkers);
2035 formatMenu.add(viewBoxesMenuItem);
2036 formatMenu.add(viewTextMenuItem);
2037 formatMenu.add(colourTextMenuItem);
2038 formatMenu.add(renderGapsMenuItem);
2039 formatMenu.add(centreColumnLabelsMenuItem);
2040 formatMenu.add(showNonconservedMenuItem);
2041 selectMenu.add(findMenuItem);
2042 selectMenu.addSeparator();
2043 selectMenu.add(selectAllSequenceMenuItem);
2044 selectMenu.add(deselectAllSequenceMenuItem);
2045 selectMenu.add(invertSequenceMenuItem);
2046 selectMenu.add(invertColSel);
2047 selectMenu.add(createGroup);
2048 selectMenu.add(unGroup);
2049 selectMenu.add(grpsFromSelection);
2050 selectMenu.add(deleteGroups);
2051 selectMenu.add(annotationColumn);
2052 selectMenu.add(selectHighlighted);
2053 // TODO - determine if the listenToViewSelections button is needed : see bug
2055 // selectMenu.addSeparator();
2056 // selectMenu.add(listenToViewSelections);
2059 protected void createPNG_actionPerformed(ActionEvent object)
2061 // TODO Auto-generated method stub
2065 protected void createEPS_actionPerformed(ActionEvent object)
2067 // TODO Auto-generated method stub
2071 protected void createSVG_actionPerformed(ActionEvent object)
2073 // TODO Auto-generated method stub
2077 protected void copyHighlightedColumns_actionPerformed(
2078 ActionEvent actionEvent)
2083 protected void loadVcf_actionPerformed()
2088 * Constructs the entries on the Colour menu (but does not add them to the
2091 protected void initColourMenu()
2093 applyToAllGroups = new JCheckBoxMenuItem(
2094 MessageManager.getString("label.apply_colour_to_all_groups"));
2095 applyToAllGroups.addActionListener(new ActionListener()
2098 public void actionPerformed(ActionEvent e)
2100 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
2104 textColour = new JMenuItem(
2105 MessageManager.getString("label.text_colour"));
2106 textColour.addActionListener(new ActionListener()
2109 public void actionPerformed(ActionEvent e)
2111 textColour_actionPerformed();
2115 conservationMenuItem = new JCheckBoxMenuItem(
2116 MessageManager.getString("action.by_conservation"));
2117 conservationMenuItem.addActionListener(new ActionListener()
2120 public void actionPerformed(ActionEvent e)
2122 conservationMenuItem_actionPerformed(
2123 conservationMenuItem.isSelected());
2127 abovePIDThreshold = new JCheckBoxMenuItem(
2128 MessageManager.getString("label.above_identity_threshold"));
2129 abovePIDThreshold.addActionListener(new ActionListener()
2132 public void actionPerformed(ActionEvent e)
2134 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2137 modifyPID = new JMenuItem(
2138 MessageManager.getString("label.modify_identity_threshold"));
2139 modifyPID.addActionListener(new ActionListener()
2142 public void actionPerformed(ActionEvent e)
2144 modifyPID_actionPerformed();
2147 modifyConservation = new JMenuItem(MessageManager
2148 .getString("label.modify_conservation_threshold"));
2149 modifyConservation.addActionListener(new ActionListener()
2152 public void actionPerformed(ActionEvent e)
2154 modifyConservation_actionPerformed();
2158 annotationColour = new JRadioButtonMenuItem(
2159 MessageManager.getString("action.by_annotation"));
2160 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2161 annotationColour.addActionListener(new ActionListener()
2164 public void actionPerformed(ActionEvent e)
2166 annotationColour_actionPerformed();
2171 protected void selectHighlightedColumns_actionPerformed(
2172 ActionEvent actionEvent)
2174 // TODO Auto-generated method stub
2179 * Generate the reverse sequence (or reverse complement if the flag is true)
2180 * and add it to the alignment
2184 protected void showReverse_actionPerformed(boolean complement)
2189 * Try to run script in a Groovy console, having first ensured that this
2190 * alignframe is set as currentAlignFrame in Desktop
2192 protected void runGroovy_actionPerformed()
2198 * Adds the given action listener and key accelerator to the given menu item.
2199 * Also saves in a lookup table to support lookup of action by key stroke.
2203 * @param actionListener
2205 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2206 JMenuItem menuItem, ActionListener actionListener)
2208 menuItem.setAccelerator(keyStroke);
2209 accelerators.put(keyStroke, menuItem);
2210 menuItem.addActionListener(actionListener);
2214 * Action on clicking sort annotations by type.
2218 protected void sortAnnotations_actionPerformed()
2223 * Action on clicking Show all annotations.
2225 * @param forSequences
2226 * update sequence-related annotations
2227 * @param forAlignment
2228 * update non-sequence-related annotations
2230 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2231 boolean forAlignment)
2233 setAnnotationsVisibility(true, forSequences, forAlignment);
2237 * Action on clicking Hide all annotations.
2239 * @param forSequences
2240 * update sequence-related annotations
2241 * @param forAlignment
2242 * update non-sequence-related annotations
2244 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2245 boolean forAlignment)
2247 setAnnotationsVisibility(false, forSequences, forAlignment);
2251 * Set the visibility of annotations to true or false. Can act on
2252 * sequence-related annotations, or alignment-related, or both.
2255 * @param forSequences
2256 * update sequence-related annotations
2257 * @param forAlignment
2258 * update non-sequence-related annotations
2260 public void setAnnotationsVisibility(boolean visible,
2261 boolean forSequences, boolean forAlignment)
2266 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2268 // TODO Auto-generated method stub
2272 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2274 // TODO Auto-generated method stub
2278 protected void showAllhidden_actionPerformed(ActionEvent e)
2280 // TODO Auto-generated method stub
2284 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2286 // TODO Auto-generated method stub
2290 protected void hideAllSelection_actionPerformed(ActionEvent e)
2292 // TODO Auto-generated method stub
2296 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2298 // TODO Auto-generated method stub
2302 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2304 // TODO Auto-generated method stub
2308 protected void showSSConsensusHistogram_actionPerformed(ActionEvent e)
2310 // TODO Auto-generated method stub
2314 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2316 // TODO Auto-generated method stub
2320 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2322 // TODO Auto-generated method stub
2326 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2328 // TODO Auto-generated method stub
2332 protected void showGroupConservation_actionPerformed(ActionEvent e)
2334 // TODO Auto-generated method stub
2338 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2340 // TODO Auto-generated method stub
2344 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2346 // TODO Auto-generated method stub
2350 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2352 // TODO Auto-generated method stub
2356 protected void followHighlight_actionPerformed()
2358 // TODO Auto-generated method stub
2362 protected void showNpFeats_actionPerformed(ActionEvent e)
2364 // TODO Auto-generated method stub
2368 protected void showDbRefs_actionPerformed(ActionEvent e)
2370 // TODO Auto-generated method stub
2374 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2378 protected void buildSortByAnnotationScoresMenu()
2382 protected void extractScores_actionPerformed(ActionEvent e)
2386 protected void outputText_actionPerformed(String formatName)
2390 public void addFromFile_actionPerformed(ActionEvent e)
2395 public void addFromText_actionPerformed(ActionEvent e)
2400 public void addFromURL_actionPerformed(ActionEvent e)
2405 public void exportFeatures_actionPerformed(ActionEvent e)
2410 public void exportAnnotations_actionPerformed(ActionEvent e)
2415 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2419 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2424 protected void closeMenuItem_actionPerformed(boolean b)
2428 protected void redoMenuItem_actionPerformed(ActionEvent e)
2432 protected void undoMenuItem_actionPerformed(ActionEvent e)
2436 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2440 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2444 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2448 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2452 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2456 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2460 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2464 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2468 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2472 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2476 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2480 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2484 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2488 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2492 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2496 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2500 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2504 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2508 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2512 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2516 protected void conservationMenuItem_actionPerformed(boolean selected)
2520 protected void printMenuItem_actionPerformed(ActionEvent e)
2524 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2528 protected void findMenuItem_actionPerformed(ActionEvent e)
2532 protected void abovePIDThreshold_actionPerformed(boolean selected)
2536 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2540 protected void deleteGroups_actionPerformed(ActionEvent e)
2544 protected void createGroup_actionPerformed(ActionEvent e)
2548 protected void unGroup_actionPerformed(ActionEvent e)
2552 protected void copy_actionPerformed()
2556 protected void cut_actionPerformed()
2560 protected void delete_actionPerformed()
2564 protected void pasteNew_actionPerformed(ActionEvent e)
2568 protected void pasteThis_actionPerformed(ActionEvent e)
2572 protected void applyToAllGroups_actionPerformed(boolean selected)
2576 protected void font_actionPerformed(ActionEvent e)
2580 protected void seqLimit_actionPerformed(ActionEvent e)
2584 public void seqDBRef_actionPerformed(ActionEvent e)
2589 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2595 * Template method to handle the 'load T-Coffee scores' menu event.
2597 * Subclasses override this method to provide a custom action.
2602 protected void loadScores_actionPerformed(ActionEvent event)
2607 protected void jpred_actionPerformed(ActionEvent e)
2611 protected void scaleAbove_actionPerformed(ActionEvent e)
2615 protected void scaleLeft_actionPerformed(ActionEvent e)
2619 protected void scaleRight_actionPerformed(ActionEvent e)
2623 protected void modifyPID_actionPerformed()
2627 protected void modifyConservation_actionPerformed()
2631 protected void saveAs_actionPerformed()
2635 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2639 public void vamsasStore_actionPerformed(ActionEvent e)
2644 public void vamsasLoad_actionPerformed(ActionEvent e)
2649 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2654 public void featureSettings_actionPerformed(ActionEvent e)
2659 public void fetchSequence_actionPerformed()
2664 public void smoothFont_actionPerformed(ActionEvent e)
2669 public void annotationColour_actionPerformed()
2673 public void annotationColumn_actionPerformed(ActionEvent e)
2677 public void associatedData_actionPerformed(ActionEvent e)
2682 public void autoCalculate_actionPerformed(ActionEvent e)
2687 public void sortByTreeOption_actionPerformed(ActionEvent e)
2692 public void showAllSeqs_actionPerformed(ActionEvent e)
2697 public void showAllColumns_actionPerformed(ActionEvent e)
2702 public void hideSelSequences_actionPerformed(ActionEvent e)
2707 public void hideSelColumns_actionPerformed(ActionEvent e)
2712 public void hiddenMarkers_actionPerformed(ActionEvent e)
2717 public void findPdbId_actionPerformed(ActionEvent e)
2722 public void enterPdbId_actionPerformed(ActionEvent e)
2727 public void pdbFile_actionPerformed(ActionEvent e)
2732 public void invertColSel_actionPerformed(ActionEvent e)
2737 public void tabSelectionChanged(int sel)
2742 public void tabbedPane_mousePressed(MouseEvent e)
2747 public void tabbedPane_focusGained(FocusEvent e)
2752 public void save_actionPerformed(ActionEvent e)
2757 public void reload_actionPerformed(ActionEvent e)
2762 public void newView_actionPerformed(ActionEvent e)
2767 public void textColour_actionPerformed()
2772 public void idRightAlign_actionPerformed(ActionEvent e)
2777 public void expandViews_actionPerformed(ActionEvent e)
2782 public void gatherViews_actionPerformed(ActionEvent e)
2787 public void buildTreeSortMenu()
2792 public void pageSetup_actionPerformed(ActionEvent e)
2797 public void alignmentProperties()
2802 protected void expand_newalign(ActionEvent e)
2804 // TODO Auto-generated method stub
2808 protected boolean isShowAutoCalculatedAbove()
2810 return showAutoCalculatedAbove;
2813 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2815 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2818 protected SequenceAnnotationOrder getAnnotationSortOrder()
2820 return annotationSortOrder;
2823 protected void setAnnotationSortOrder(
2824 SequenceAnnotationOrder annotationSortOrder)
2826 this.annotationSortOrder = annotationSortOrder;
2829 public Map<KeyStroke, JMenuItem> getAccelerators()
2831 return this.accelerators;
2835 * Returns the selected index of the tabbed pane, or -1 if none selected
2836 * (including the case where the tabbed pane has not been made visible).
2840 public int getTabIndex()
2842 return tabbedPane.getSelectedIndex();
2845 public JPanel getStatusPanel()
2851 * Sets a reference to the containing split frame. Also makes the 'toggle
2852 * split view' menu item visible and checked.
2856 public void setSplitFrame(SplitContainerI sf)
2858 this.splitFrame = sf;
2861 this.showComplementMenuItem.setVisible(true);
2862 this.showComplementMenuItem.setState(true);
2866 public SplitContainerI getSplitViewContainer()
2868 return this.splitFrame;
2871 protected void showComplement_actionPerformed(boolean complement)
2875 protected List<String> updateShowSSRadioButtons()
2877 // TODO Auto-generated method stub
2881 protected void updateShowSSRadioButtons(JMenu showSS,
2882 ButtonGroup ssButtonGroup)
2884 // TODO Auto-generated method stub
2887 protected void showSS_actionPerformed(String ssSourceSelection)
2889 // TODO Auto-generated method stub