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.analysis.GeneticCodeI;
25 import jalview.analysis.GeneticCodes;
26 import jalview.api.SplitContainerI;
27 import jalview.bin.Cache;
28 import jalview.gui.JvSwingUtils;
29 import jalview.gui.Preferences;
30 import jalview.io.FileFormats;
31 import jalview.schemes.ResidueColourScheme;
32 import jalview.util.MessageManager;
33 import jalview.util.Platform;
35 import java.awt.BorderLayout;
36 import java.awt.Color;
37 import java.awt.GridLayout;
38 import java.awt.event.ActionEvent;
39 import java.awt.event.ActionListener;
40 import java.awt.event.FocusAdapter;
41 import java.awt.event.FocusEvent;
42 import java.awt.event.KeyEvent;
43 import java.awt.event.MouseAdapter;
44 import java.awt.event.MouseEvent;
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 @SuppressWarnings("serial")
65 public class GAlignFrame extends JInternalFrame
67 protected JMenuBar alignFrameMenuBar = new JMenuBar();
69 protected JMenuItem closeMenuItem = new JMenuItem();
71 public JMenu webService = new JMenu();// BH 2019 was protected, but not
72 // sufficient for AlignFrame thread run
74 public JMenuItem webServiceNoServices;// BH 2019 was protected, but not
75 // sufficient for AlignFrame thread run
77 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
79 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
81 protected JMenu sortByAnnotScore = new JMenu();
83 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
85 // AlignFrame.printWriter
87 protected JMenu outputTextboxMenu = new JMenu();
89 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
91 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
93 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
95 protected JMenuItem undoMenuItem = new JMenuItem();
97 protected JMenuItem redoMenuItem = new JMenuItem();
99 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
101 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
103 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
105 JMenuItem copy = new JMenuItem();
107 JMenuItem cut = new JMenuItem();
109 JMenu pasteMenu = new JMenu();
111 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
113 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
115 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
117 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
119 protected JCheckBoxMenuItem applyToAllGroups;
121 protected JMenu colourMenu = new JMenu();
123 protected JMenuItem textColour;
125 protected JCheckBoxMenuItem conservationMenuItem;
127 protected JMenuItem modifyConservation;
129 protected JCheckBoxMenuItem abovePIDThreshold;
131 protected JMenuItem modifyPID;
133 protected JRadioButtonMenuItem annotationColour;
135 protected JMenu sortByTreeMenu = new JMenu();
137 protected JMenu sort = new JMenu();
139 protected JMenuItem calculateTree = new JMenuItem();
141 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
143 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
145 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
147 protected JMenu showTranslation = new JMenu();
149 protected JMenuItem showReverse = new JMenuItem();
151 protected JMenuItem showReverseComplement = new JMenuItem();
153 protected JMenu showProducts = new JMenu();
155 protected JMenuItem runGroovy = new JMenuItem();
157 protected JMenuItem loadVcf;
159 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
161 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
163 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
165 protected JPanel statusPanel = new JPanel();
167 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
169 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
171 protected JMenuItem showAllAlAnnotations = new JMenuItem();
173 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
175 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
177 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
179 protected JTabbedPane tabbedPane = new JTabbedPane();
181 protected JMenuItem reload = new JMenuItem();
183 protected JMenu formatMenu = new JMenu();
185 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
187 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
189 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
191 protected JMenuItem gatherViews = new JMenuItem();
193 protected JMenuItem expandViews = new JMenuItem();
195 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
197 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
201 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
207 protected JMenuItem openFeatureSettings;
209 private SequenceAnnotationOrder annotationSortOrder;
211 private boolean showAutoCalculatedAbove = false;
213 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
215 private SplitContainerI splitFrame;
222 // for Web-page embedding using id=align-frame-div
223 setName("jalview-alignment");
226 setJMenuBar(alignFrameMenuBar);
228 // dynamically fill save as menu with available formats
229 for (String ff : FileFormats.getInstance().getWritableFormats(true))
231 JMenuItem item = new JMenuItem(ff);
233 item.addActionListener(new ActionListener()
236 public void actionPerformed(ActionEvent e)
238 outputText_actionPerformed(e.getActionCommand());
242 outputTextboxMenu.add(item);
244 } catch (Exception e)
246 System.err.println(e.toString());
249 if (Platform.allowMnemonics()) // was "not mac and not JS"
251 closeMenuItem.setMnemonic('C');
252 outputTextboxMenu.setMnemonic('T');
253 undoMenuItem.setMnemonic('Z');
254 redoMenuItem.setMnemonic('0');
255 copy.setMnemonic('C');
256 cut.setMnemonic('U');
257 pasteMenu.setMnemonic('P');
258 reload.setMnemonic('R');
262 private void jbInit() throws Exception
266 JMenuItem saveAs = new JMenuItem(
267 MessageManager.getString("action.save_as"));
268 ActionListener al = new ActionListener()
271 public void actionPerformed(ActionEvent e)
273 saveAs_actionPerformed();
277 // FIXME getDefaultToolkit throws an exception in Headless mode
278 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
279 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
280 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
282 addMenuActionAndAccelerator(keyStroke, saveAs, al);
284 closeMenuItem.setText(MessageManager.getString("action.close"));
285 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
286 jalview.util.ShortcutKeyMaskExWrapper
287 .getMenuShortcutKeyMaskEx(),
289 al = new ActionListener()
292 public void actionPerformed(ActionEvent e)
294 closeMenuItem_actionPerformed(false);
297 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
299 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
300 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
301 JMenu annotationsMenu = new JMenu(
302 MessageManager.getString("action.annotations"));
303 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
304 colourMenu.setText(MessageManager.getString("action.colour"));
305 JMenu calculateMenu = new JMenu(
306 MessageManager.getString("action.calculate"));
307 webService.setText(MessageManager.getString("action.web_service"));
308 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
309 MessageManager.getString("action.select_all"));
310 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
311 jalview.util.ShortcutKeyMaskExWrapper
312 .getMenuShortcutKeyMaskEx(),
314 al = new ActionListener()
317 public void actionPerformed(ActionEvent e)
319 selectAllSequenceMenuItem_actionPerformed(e);
322 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
324 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
325 MessageManager.getString("action.deselect_all"));
326 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
327 al = new ActionListener()
330 public void actionPerformed(ActionEvent e)
332 deselectAllSequenceMenuItem_actionPerformed(e);
335 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
337 JMenuItem invertSequenceMenuItem = new JMenuItem(
338 MessageManager.getString("action.invert_sequence_selection"));
339 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
340 jalview.util.ShortcutKeyMaskExWrapper
341 .getMenuShortcutKeyMaskEx(),
343 al = new ActionListener()
346 public void actionPerformed(ActionEvent e)
348 invertSequenceMenuItem_actionPerformed(e);
351 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
353 JMenuItem grpsFromSelection = new JMenuItem(
354 MessageManager.getString("action.make_groups_selection"));
355 grpsFromSelection.addActionListener(new ActionListener()
358 public void actionPerformed(ActionEvent e)
360 makeGrpsFromSelection_actionPerformed(e);
363 JMenuItem expandAlignment = new JMenuItem(
364 MessageManager.getString("action.view_flanking_regions"));
365 expandAlignment.setToolTipText(
366 MessageManager.getString("label.view_flanking_regions"));
367 expandAlignment.addActionListener(new ActionListener()
370 public void actionPerformed(ActionEvent e)
375 JMenuItem remove2LeftMenuItem = new JMenuItem(
376 MessageManager.getString("action.remove_left"));
377 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
378 jalview.util.ShortcutKeyMaskExWrapper
379 .getMenuShortcutKeyMaskEx(),
381 al = new ActionListener()
384 public void actionPerformed(ActionEvent e)
386 remove2LeftMenuItem_actionPerformed(e);
389 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
391 JMenuItem remove2RightMenuItem = new JMenuItem(
392 MessageManager.getString("action.remove_right"));
393 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
394 jalview.util.ShortcutKeyMaskExWrapper
395 .getMenuShortcutKeyMaskEx(),
397 al = new ActionListener()
400 public void actionPerformed(ActionEvent e)
402 remove2RightMenuItem_actionPerformed(e);
405 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
407 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
408 MessageManager.getString("action.remove_empty_columns"));
409 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
410 jalview.util.ShortcutKeyMaskExWrapper
411 .getMenuShortcutKeyMaskEx(),
413 al = new ActionListener()
416 public void actionPerformed(ActionEvent e)
418 removeGappedColumnMenuItem_actionPerformed(e);
421 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
423 JMenuItem removeAllGapsMenuItem = new JMenuItem(
424 MessageManager.getString("action.remove_all_gaps"));
425 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
426 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
427 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
429 al = new ActionListener()
432 public void actionPerformed(ActionEvent e)
434 removeAllGapsMenuItem_actionPerformed(e);
437 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
439 JMenuItem justifyLeftMenuItem = new JMenuItem(
440 MessageManager.getString("action.left_justify_alignment"));
441 justifyLeftMenuItem.addActionListener(new ActionListener()
444 public void actionPerformed(ActionEvent e)
446 justifyLeftMenuItem_actionPerformed(e);
449 JMenuItem justifyRightMenuItem = new JMenuItem(
450 MessageManager.getString("action.right_justify_alignment"));
451 justifyRightMenuItem.addActionListener(new ActionListener()
454 public void actionPerformed(ActionEvent e)
456 justifyRightMenuItem_actionPerformed(e);
459 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
460 viewBoxesMenuItem.setState(true);
461 viewBoxesMenuItem.addActionListener(new ActionListener()
464 public void actionPerformed(ActionEvent e)
466 viewBoxesMenuItem_actionPerformed(e);
469 viewTextMenuItem.setText(MessageManager.getString("action.text"));
470 viewTextMenuItem.setState(true);
471 viewTextMenuItem.addActionListener(new ActionListener()
474 public void actionPerformed(ActionEvent e)
476 viewTextMenuItem_actionPerformed(e);
479 showNonconservedMenuItem
480 .setText(MessageManager.getString("label.show_non_conserved"));
481 showNonconservedMenuItem.setState(false);
482 showNonconservedMenuItem.addActionListener(new ActionListener()
485 public void actionPerformed(ActionEvent e)
487 showUnconservedMenuItem_actionPerformed(e);
490 JMenuItem sortPairwiseMenuItem = new JMenuItem(
491 MessageManager.getString("action.by_pairwise_id"));
492 sortPairwiseMenuItem.addActionListener(new ActionListener()
495 public void actionPerformed(ActionEvent e)
497 sortPairwiseMenuItem_actionPerformed(e);
500 JMenuItem sortIDMenuItem = new JMenuItem(
501 MessageManager.getString("action.by_id"));
502 sortIDMenuItem.addActionListener(new ActionListener()
505 public void actionPerformed(ActionEvent e)
507 sortIDMenuItem_actionPerformed(e);
510 JMenuItem sortLengthMenuItem = new JMenuItem(
511 MessageManager.getString("action.by_length"));
512 sortLengthMenuItem.addActionListener(new ActionListener()
515 public void actionPerformed(ActionEvent e)
517 sortLengthMenuItem_actionPerformed(e);
520 JMenuItem sortGroupMenuItem = new JMenuItem(
521 MessageManager.getString("action.by_group"));
522 sortGroupMenuItem.addActionListener(new ActionListener()
525 public void actionPerformed(ActionEvent e)
527 sortGroupMenuItem_actionPerformed(e);
531 JMenuItem removeRedundancyMenuItem = new JMenuItem(
532 MessageManager.getString("action.remove_redundancy"));
533 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
534 jalview.util.ShortcutKeyMaskExWrapper
535 .getMenuShortcutKeyMaskEx(),
537 al = new ActionListener()
540 public void actionPerformed(ActionEvent e)
542 removeRedundancyMenuItem_actionPerformed(e);
545 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
547 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
548 MessageManager.getString("action.pairwise_alignment"));
549 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
552 public void actionPerformed(ActionEvent e)
554 pairwiseAlignmentMenuItem_actionPerformed(e);
558 this.getContentPane().setLayout(new BorderLayout());
559 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
560 statusBar.setBackground(Color.white);
561 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
562 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
563 statusBar.setText(MessageManager.getString("label.status_bar"));
565 .setText(MessageManager.getString("label.out_to_textbox"));
567 annotationPanelMenuItem.setActionCommand("");
568 annotationPanelMenuItem
569 .setText(MessageManager.getString("label.show_annotations"));
570 annotationPanelMenuItem
571 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
572 annotationPanelMenuItem.addActionListener(new ActionListener()
575 public void actionPerformed(ActionEvent e)
577 annotationPanelMenuItem_actionPerformed(e);
580 showAllAlAnnotations.setText(
581 MessageManager.getString("label.show_all_al_annotations"));
582 final boolean isAnnotationPanelShown = annotationPanelMenuItem
584 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
585 showAllAlAnnotations.addActionListener(new ActionListener()
588 public void actionPerformed(ActionEvent e)
590 showAllAnnotations_actionPerformed(false, true);
593 hideAllAlAnnotations.setText(
594 MessageManager.getString("label.hide_all_al_annotations"));
595 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
596 hideAllAlAnnotations.addActionListener(new ActionListener()
599 public void actionPerformed(ActionEvent e)
601 hideAllAnnotations_actionPerformed(false, true);
604 showAllSeqAnnotations.setText(
605 MessageManager.getString("label.show_all_seq_annotations"));
606 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
607 showAllSeqAnnotations.addActionListener(new ActionListener()
610 public void actionPerformed(ActionEvent e)
612 showAllAnnotations_actionPerformed(true, false);
615 hideAllSeqAnnotations.setText(
616 MessageManager.getString("label.hide_all_seq_annotations"));
617 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
618 hideAllSeqAnnotations.addActionListener(new ActionListener()
621 public void actionPerformed(ActionEvent e)
623 hideAllAnnotations_actionPerformed(true, false);
626 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
627 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
628 SequenceAnnotationOrder.NONE.name()));
629 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
630 MessageManager.getString("label.sort_annotations_by_sequence"));
631 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
632 MessageManager.getString("label.sort_annotations_by_label"));
634 sortAnnBySequence.setSelected(
635 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
636 sortAnnBySequence.addActionListener(new ActionListener()
639 public void actionPerformed(ActionEvent e)
641 boolean newState = sortAnnBySequence.getState();
642 sortAnnByLabel.setSelected(false);
643 setAnnotationSortOrder(
644 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
645 : SequenceAnnotationOrder.NONE);
646 sortAnnotations_actionPerformed();
649 sortAnnByLabel.setSelected(
650 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
651 sortAnnByLabel.addActionListener(new ActionListener()
654 public void actionPerformed(ActionEvent e)
656 boolean newState = sortAnnByLabel.getState();
657 sortAnnBySequence.setSelected(false);
658 setAnnotationSortOrder(
659 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
660 : SequenceAnnotationOrder.NONE);
661 sortAnnotations_actionPerformed();
664 colourTextMenuItem = new JCheckBoxMenuItem(
665 MessageManager.getString("label.colour_text"));
666 colourTextMenuItem.addActionListener(new ActionListener()
669 public void actionPerformed(ActionEvent e)
671 colourTextMenuItem_actionPerformed(e);
675 JMenuItem htmlMenuItem = new JMenuItem(
676 MessageManager.getString("label.html"));
677 htmlMenuItem.addActionListener(new ActionListener()
680 public void actionPerformed(ActionEvent e)
682 htmlMenuItem_actionPerformed(e);
686 JMenuItem createBioJS = new JMenuItem(
687 MessageManager.getString("label.biojs_html_export"));
688 createBioJS.addActionListener(new java.awt.event.ActionListener()
691 public void actionPerformed(ActionEvent e)
693 bioJSMenuItem_actionPerformed(e);
697 JMenuItem overviewMenuItem = new JMenuItem(
698 MessageManager.getString("label.overview_window"));
699 overviewMenuItem.addActionListener(new ActionListener()
702 public void actionPerformed(ActionEvent e)
704 overviewMenuItem_actionPerformed(e);
708 undoMenuItem.setEnabled(false);
709 undoMenuItem.setText(MessageManager.getString("action.undo"));
710 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
711 jalview.util.ShortcutKeyMaskExWrapper
712 .getMenuShortcutKeyMaskEx(),
714 al = new ActionListener()
717 public void actionPerformed(ActionEvent e)
719 undoMenuItem_actionPerformed(e);
722 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
724 redoMenuItem.setEnabled(false);
725 redoMenuItem.setText(MessageManager.getString("action.redo"));
726 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
727 jalview.util.ShortcutKeyMaskExWrapper
728 .getMenuShortcutKeyMaskEx(),
730 al = new ActionListener()
733 public void actionPerformed(ActionEvent e)
735 redoMenuItem_actionPerformed(e);
738 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
740 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
741 wrapMenuItem.addActionListener(new ActionListener()
744 public void actionPerformed(ActionEvent e)
746 wrapMenuItem_actionPerformed(e);
750 JMenuItem printMenuItem = new JMenuItem(
751 MessageManager.getString("action.print"));
752 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
753 jalview.util.ShortcutKeyMaskExWrapper
754 .getMenuShortcutKeyMaskEx(),
756 al = new ActionListener()
759 public void actionPerformed(ActionEvent e)
761 printMenuItem_actionPerformed(e);
764 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
767 .setText(MessageManager.getString("action.show_gaps"));
768 renderGapsMenuItem.setState(true);
769 renderGapsMenuItem.addActionListener(new ActionListener()
772 public void actionPerformed(ActionEvent e)
774 renderGapsMenuItem_actionPerformed(e);
778 JMenuItem findMenuItem = new JMenuItem(
779 MessageManager.getString("action.find"));
780 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
781 jalview.util.ShortcutKeyMaskExWrapper
782 .getMenuShortcutKeyMaskEx(),
784 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
785 MessageManager.getString("label.find_tip")));
786 al = new ActionListener()
789 public void actionPerformed(ActionEvent e)
791 findMenuItem_actionPerformed(e);
794 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
796 showSeqFeatures.setText(
797 MessageManager.getString("label.show_sequence_features"));
798 showSeqFeatures.addActionListener(new ActionListener()
801 public void actionPerformed(ActionEvent actionEvent)
803 showSeqFeatures_actionPerformed(actionEvent);
807 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
808 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
809 * void actionPerformed(ActionEvent actionEvent) {
810 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
813 .setText(MessageManager.getString("label.show_database_refs"));
814 showDbRefsMenuitem.addActionListener(new ActionListener()
818 public void actionPerformed(ActionEvent e)
820 showDbRefs_actionPerformed(e);
824 showNpFeatsMenuitem.setText(
825 MessageManager.getString("label.show_non_positional_features"));
826 showNpFeatsMenuitem.addActionListener(new ActionListener()
830 public void actionPerformed(ActionEvent e)
832 showNpFeats_actionPerformed(e);
836 showGroupConservation
837 .setText(MessageManager.getString("label.group_conservation"));
838 showGroupConservation.addActionListener(new ActionListener()
842 public void actionPerformed(ActionEvent e)
844 showGroupConservation_actionPerformed(e);
850 .setText(MessageManager.getString("label.group_consensus"));
851 showGroupConsensus.addActionListener(new ActionListener()
855 public void actionPerformed(ActionEvent e)
857 showGroupConsensus_actionPerformed(e);
861 showConsensusHistogram.setText(
862 MessageManager.getString("label.show_consensus_histogram"));
863 showConsensusHistogram.addActionListener(new ActionListener()
867 public void actionPerformed(ActionEvent e)
869 showConsensusHistogram_actionPerformed(e);
874 .setText(MessageManager.getString("label.show_consensus_logo"));
875 showSequenceLogo.addActionListener(new ActionListener()
879 public void actionPerformed(ActionEvent e)
881 showSequenceLogo_actionPerformed(e);
885 normaliseSequenceLogo
886 .setText(MessageManager.getString("label.norm_consensus_logo"));
887 normaliseSequenceLogo.addActionListener(new ActionListener()
891 public void actionPerformed(ActionEvent e)
893 normaliseSequenceLogo_actionPerformed(e);
897 applyAutoAnnotationSettings
898 .setText(MessageManager.getString("label.apply_all_groups"));
899 applyAutoAnnotationSettings.setState(false);
900 applyAutoAnnotationSettings.setVisible(true);
901 applyAutoAnnotationSettings.addActionListener(new ActionListener()
904 public void actionPerformed(ActionEvent e)
906 applyAutoAnnotationSettings_actionPerformed(e);
910 ButtonGroup buttonGroup = new ButtonGroup();
911 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
912 MessageManager.getString("label.show_first"));
913 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
914 MessageManager.getString("label.show_last"));
915 buttonGroup.add(showAutoFirst);
916 buttonGroup.add(showAutoLast);
917 final boolean autoFirst = Cache
918 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
919 showAutoFirst.setSelected(autoFirst);
920 setShowAutoCalculatedAbove(autoFirst);
921 showAutoFirst.addActionListener(new ActionListener()
924 public void actionPerformed(ActionEvent e)
926 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
927 sortAnnotations_actionPerformed();
930 showAutoLast.setSelected(!showAutoFirst.isSelected());
931 showAutoLast.addActionListener(new ActionListener()
934 public void actionPerformed(ActionEvent e)
936 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
937 sortAnnotations_actionPerformed();
941 JMenuItem deleteGroups = new JMenuItem(
942 MessageManager.getString("action.undefine_groups"));
943 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
944 jalview.util.ShortcutKeyMaskExWrapper
945 .getMenuShortcutKeyMaskEx(),
947 al = new ActionListener()
950 public void actionPerformed(ActionEvent e)
952 deleteGroups_actionPerformed(e);
955 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
957 JMenuItem annotationColumn = new JMenuItem(
958 MessageManager.getString("action.select_by_annotation"));
959 annotationColumn.addActionListener(new ActionListener()
962 public void actionPerformed(ActionEvent e)
964 annotationColumn_actionPerformed(e);
968 JMenuItem createGroup = new JMenuItem(
969 MessageManager.getString("action.create_group"));
970 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
971 jalview.util.ShortcutKeyMaskExWrapper
972 .getMenuShortcutKeyMaskEx(),
974 al = new ActionListener()
977 public void actionPerformed(ActionEvent e)
979 createGroup_actionPerformed(e);
982 addMenuActionAndAccelerator(keyStroke, createGroup, al);
984 JMenuItem unGroup = new JMenuItem(
985 MessageManager.getString("action.remove_group"));
986 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
987 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
988 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
990 al = new ActionListener()
993 public void actionPerformed(ActionEvent e)
995 unGroup_actionPerformed(e);
998 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1000 copy.setText(MessageManager.getString("action.copy"));
1001 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1002 jalview.util.ShortcutKeyMaskExWrapper
1003 .getMenuShortcutKeyMaskEx(),
1006 al = new ActionListener()
1009 public void actionPerformed(ActionEvent e)
1011 copy_actionPerformed();
1014 addMenuActionAndAccelerator(keyStroke, copy, al);
1016 cut.setText(MessageManager.getString("action.cut"));
1017 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1018 jalview.util.ShortcutKeyMaskExWrapper
1019 .getMenuShortcutKeyMaskEx(),
1021 al = new ActionListener()
1024 public void actionPerformed(ActionEvent e)
1026 cut_actionPerformed();
1029 addMenuActionAndAccelerator(keyStroke, cut, al);
1031 JMenuItem delete = new JMenuItem(
1032 MessageManager.getString("action.delete"));
1033 delete.addActionListener(new ActionListener()
1036 public void actionPerformed(ActionEvent e)
1038 delete_actionPerformed();
1042 pasteMenu.setText(MessageManager.getString("action.paste"));
1043 JMenuItem pasteNew = new JMenuItem(
1044 MessageManager.getString("label.to_new_alignment"));
1045 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1046 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1047 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1049 al = new ActionListener()
1052 public void actionPerformed(ActionEvent e)
1054 pasteNew_actionPerformed(e);
1057 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1059 JMenuItem pasteThis = new JMenuItem(
1060 MessageManager.getString("label.to_this_alignment"));
1061 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1062 jalview.util.ShortcutKeyMaskExWrapper
1063 .getMenuShortcutKeyMaskEx(),
1065 al = new ActionListener()
1068 public void actionPerformed(ActionEvent e)
1070 pasteThis_actionPerformed(e);
1073 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1075 JMenuItem createPNG = new JMenuItem("PNG");
1076 createPNG.addActionListener(new ActionListener()
1079 public void actionPerformed(ActionEvent e)
1084 createPNG.setActionCommand(
1085 MessageManager.getString("label.save_png_image"));
1087 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1088 font.addActionListener(new ActionListener()
1091 public void actionPerformed(ActionEvent e)
1093 font_actionPerformed(e);
1097 MessageManager.getString("label.show_sequence_limits"));
1098 seqLimits.setState(Cache.getDefault("SHOW_JVSUFFIX", true));
1099 seqLimits.addActionListener(new ActionListener()
1102 public void actionPerformed(ActionEvent e)
1104 seqLimit_actionPerformed(e);
1107 JMenuItem epsFile = new JMenuItem("EPS");
1108 epsFile.addActionListener(new ActionListener()
1111 public void actionPerformed(ActionEvent e)
1117 JMenuItem createSVG = new JMenuItem("SVG");
1118 createSVG.addActionListener(new ActionListener()
1121 public void actionPerformed(ActionEvent e)
1127 JMenuItem loadTreeMenuItem = new JMenuItem(
1128 MessageManager.getString("label.load_associated_tree"));
1129 loadTreeMenuItem.setActionCommand(
1130 MessageManager.getString("label.load_tree_for_sequence_set"));
1131 loadTreeMenuItem.addActionListener(new ActionListener()
1134 public void actionPerformed(ActionEvent e)
1136 loadTreeMenuItem_actionPerformed(e);
1140 scaleAbove.setVisible(false);
1141 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1142 scaleAbove.addActionListener(new ActionListener()
1145 public void actionPerformed(ActionEvent e)
1147 scaleAbove_actionPerformed(e);
1150 scaleLeft.setVisible(false);
1151 scaleLeft.setSelected(true);
1152 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1153 scaleLeft.addActionListener(new ActionListener()
1156 public void actionPerformed(ActionEvent e)
1158 scaleLeft_actionPerformed(e);
1161 scaleRight.setVisible(false);
1162 scaleRight.setSelected(true);
1163 scaleRight.setText(MessageManager.getString("action.scale_right"));
1164 scaleRight.addActionListener(new ActionListener()
1167 public void actionPerformed(ActionEvent e)
1169 scaleRight_actionPerformed(e);
1172 centreColumnLabelsMenuItem.setVisible(true);
1173 centreColumnLabelsMenuItem.setState(false);
1174 centreColumnLabelsMenuItem.setText(
1175 MessageManager.getString("label.centre_column_labels"));
1176 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1179 public void actionPerformed(ActionEvent e)
1181 centreColumnLabels_actionPerformed(e);
1184 followHighlightMenuItem.setVisible(true);
1185 followHighlightMenuItem.setState(true);
1186 followHighlightMenuItem
1187 .setText(MessageManager.getString("label.automatic_scrolling"));
1188 followHighlightMenuItem.addActionListener(new ActionListener()
1192 public void actionPerformed(ActionEvent e)
1194 followHighlight_actionPerformed();
1200 .setText(MessageManager.getString("action.by_tree_order"));
1201 sort.setText(MessageManager.getString("action.sort"));
1202 sort.addMenuListener(new MenuListener()
1205 public void menuSelected(MenuEvent e)
1207 buildTreeSortMenu();
1211 public void menuDeselected(MenuEvent e)
1216 public void menuCanceled(MenuEvent e)
1221 .setText(MessageManager.getString("label.sort_by_score"));
1222 sort.add(sortByAnnotScore);
1223 sort.addMenuListener(new javax.swing.event.MenuListener()
1227 public void menuCanceled(MenuEvent e)
1232 public void menuDeselected(MenuEvent e)
1237 public void menuSelected(MenuEvent e)
1239 buildSortByAnnotationScoresMenu();
1242 sortByAnnotScore.setVisible(false);
1245 .setText(MessageManager.getString("action.calculate_tree_pca"));
1247 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1248 padGapsMenuitem.setState(Cache.getDefault("PAD_GAPS", false));
1249 padGapsMenuitem.addActionListener(new ActionListener()
1252 public void actionPerformed(ActionEvent e)
1254 padGapsMenuitem_actionPerformed(e);
1257 JMenuItem vamsasStore = new JMenuItem(
1258 MessageManager.getString("label.vamsas_store"));
1259 vamsasStore.setVisible(false);
1260 vamsasStore.addActionListener(new ActionListener()
1263 public void actionPerformed(ActionEvent e)
1265 vamsasStore_actionPerformed(e);
1270 * Translate as cDNA with sub-menu of translation tables
1273 .setText(MessageManager.getString("label.translate_cDNA"));
1274 boolean first = true;
1275 for (final GeneticCodeI table : GeneticCodes.getInstance()
1278 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1279 showTranslation.add(item);
1280 item.addActionListener(new ActionListener()
1283 public void actionPerformed(ActionEvent e)
1285 showTranslation_actionPerformed(table);
1290 showTranslation.addSeparator();
1295 showReverse.setText(MessageManager.getString("label.reverse"));
1296 showReverse.addActionListener(new ActionListener()
1299 public void actionPerformed(ActionEvent e)
1301 showReverse_actionPerformed(false);
1304 showReverseComplement
1305 .setText(MessageManager.getString("label.reverse_complement"));
1306 showReverseComplement.addActionListener(new ActionListener()
1309 public void actionPerformed(ActionEvent e)
1311 showReverse_actionPerformed(true);
1315 JMenuItem extractScores = new JMenuItem(
1316 MessageManager.getString("label.extract_scores"));
1317 extractScores.addActionListener(new ActionListener()
1320 public void actionPerformed(ActionEvent e)
1322 extractScores_actionPerformed(e);
1325 extractScores.setVisible(true);
1326 // JBPNote: TODO: make gui for regex based score extraction
1328 // for show products actions see AlignFrame.canShowProducts
1329 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1331 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1332 runGroovy.setToolTipText(
1333 MessageManager.getString("label.run_groovy_tip"));
1334 runGroovy.addActionListener(new ActionListener()
1337 public void actionPerformed(ActionEvent e)
1339 runGroovy_actionPerformed();
1343 openFeatureSettings = new JMenuItem(
1344 MessageManager.getString("action.feature_settings"));
1345 openFeatureSettings.addActionListener(new ActionListener()
1348 public void actionPerformed(ActionEvent e)
1350 featureSettings_actionPerformed(e);
1355 * add sub-menu of database we can fetch from
1357 JMenuItem fetchSequence = new JMenuItem(
1358 MessageManager.getString("label.fetch_sequences"));
1359 fetchSequence.addActionListener(new ActionListener()
1362 public void actionPerformed(ActionEvent e)
1364 fetchSequence_actionPerformed();
1368 JMenuItem associatedData = new JMenuItem(
1369 MessageManager.getString("label.load_features_annotations"));
1370 associatedData.addActionListener(new ActionListener()
1373 public void actionPerformed(ActionEvent e)
1375 associatedData_actionPerformed(e);
1378 loadVcf = new JMenuItem(
1379 MessageManager.getString("label.load_vcf_file"));
1380 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1381 loadVcf.addActionListener(new ActionListener()
1384 public void actionPerformed(ActionEvent e)
1386 loadVcf_actionPerformed();
1389 autoCalculate.setText(
1390 MessageManager.getString("label.autocalculate_consensus"));
1391 autoCalculate.setState(Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1392 autoCalculate.addActionListener(new ActionListener()
1395 public void actionPerformed(ActionEvent e)
1397 autoCalculate_actionPerformed(e);
1401 MessageManager.getString("label.sort_alignment_new_tree"));
1402 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1403 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1404 sortByTree.setState(Cache.getDefault("SORT_BY_TREE", false));
1405 sortByTree.addActionListener(new ActionListener()
1408 public void actionPerformed(ActionEvent e)
1410 sortByTreeOption_actionPerformed(e);
1414 listenToViewSelections.setText(
1415 MessageManager.getString("label.listen_for_selections"));
1416 listenToViewSelections
1417 .setToolTipText("<html>" + MessageManager.getString(
1418 "label.selections_mirror_selections_made_same_sequences_other_views"));
1419 listenToViewSelections.setState(false);
1420 listenToViewSelections.addActionListener(new ActionListener()
1423 public void actionPerformed(ActionEvent e)
1425 listenToViewSelections_actionPerformed(e);
1429 JMenu addSequenceMenu = new JMenu(
1430 MessageManager.getString("label.add_sequences"));
1431 JMenuItem addFromFile = new JMenuItem(
1432 MessageManager.getString("label.from_file"));
1433 addFromFile.addActionListener(new ActionListener()
1436 public void actionPerformed(ActionEvent e)
1438 addFromFile_actionPerformed(e);
1441 JMenuItem addFromText = new JMenuItem(
1442 MessageManager.getString("label.from_textbox"));
1443 addFromText.addActionListener(new ActionListener()
1446 public void actionPerformed(ActionEvent e)
1448 addFromText_actionPerformed(e);
1451 JMenuItem addFromURL = new JMenuItem(
1452 MessageManager.getString("label.from_url"));
1453 addFromURL.addActionListener(new ActionListener()
1456 public void actionPerformed(ActionEvent e)
1458 addFromURL_actionPerformed(e);
1461 JMenuItem exportFeatures = new JMenuItem(
1462 MessageManager.getString("label.export_features"));
1463 exportFeatures.addActionListener(new ActionListener()
1466 public void actionPerformed(ActionEvent e)
1468 exportFeatures_actionPerformed(e);
1471 JMenuItem exportAnnotations = new JMenuItem(
1472 MessageManager.getString("label.export_annotations"));
1473 exportAnnotations.addActionListener(new ActionListener()
1476 public void actionPerformed(ActionEvent e)
1478 exportAnnotations_actionPerformed(e);
1481 statusPanel.setLayout(new GridLayout());
1482 JMenuItem showAllSeqs = new JMenuItem(
1483 MessageManager.getString("label.all_sequences"));
1484 showAllSeqs.setToolTipText(
1485 MessageManager.getString("label.toggle_sequence_visibility"));
1486 showAllSeqs.addActionListener(new ActionListener()
1489 public void actionPerformed(ActionEvent e)
1491 showAllSeqs_actionPerformed(e);
1494 JMenuItem showAllColumns = new JMenuItem(
1495 MessageManager.getString("label.all_columns"));
1496 showAllColumns.setToolTipText(
1497 MessageManager.getString("label.toggle_columns_visibility"));
1498 showAllColumns.addActionListener(new ActionListener()
1501 public void actionPerformed(ActionEvent e)
1503 showAllColumns_actionPerformed(e);
1506 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1507 JMenuItem hideSelSequences = new JMenuItem(
1508 MessageManager.getString("label.selected_sequences"));
1509 hideSelSequences.setToolTipText(
1510 MessageManager.getString("label.toggle_sequence_visibility"));
1511 hideSelSequences.addActionListener(new ActionListener()
1514 public void actionPerformed(ActionEvent e)
1516 hideSelSequences_actionPerformed(e);
1519 JMenuItem hideSelColumns = new JMenuItem(
1520 MessageManager.getString("label.selected_columns"));
1521 hideSelColumns.setToolTipText(
1522 MessageManager.getString("label.toggle_columns_visibility"));
1523 hideSelColumns.addActionListener(new ActionListener()
1526 public void actionPerformed(ActionEvent e)
1528 hideSelColumns_actionPerformed(e);
1531 JMenuItem hideAllSelection = new JMenuItem(
1532 MessageManager.getString("label.selected_region"));
1533 hideAllSelection.addActionListener(new ActionListener()
1536 public void actionPerformed(ActionEvent e)
1538 hideAllSelection_actionPerformed(e);
1541 // TODO: should be hidden if no selection exists.
1542 JMenuItem hideAllButSelection = new JMenuItem(
1543 MessageManager.getString("label.all_but_selected_region"));
1544 hideAllButSelection.addActionListener(new ActionListener()
1547 public void actionPerformed(ActionEvent e)
1549 hideAllButSelection_actionPerformed(e);
1552 JMenuItem showAllhidden = new JMenuItem(
1553 MessageManager.getString("label.all_sequences_columns"));
1554 showAllhidden.setToolTipText(MessageManager
1555 .getString("label.toggles_visibility_hidden_selected_regions"));
1556 showAllhidden.addActionListener(new ActionListener()
1559 public void actionPerformed(ActionEvent e)
1561 showAllhidden_actionPerformed(e);
1564 hiddenMarkers.setText(
1565 MessageManager.getString("action.show_hidden_markers"));
1566 hiddenMarkers.addActionListener(new ActionListener()
1569 public void actionPerformed(ActionEvent e)
1571 hiddenMarkers_actionPerformed(e);
1575 JMenuItem invertColSel = new JMenuItem(
1576 MessageManager.getString("action.invert_column_selection"));
1577 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1578 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1579 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1581 al = new ActionListener()
1584 public void actionPerformed(ActionEvent e)
1586 invertColSel_actionPerformed(e);
1589 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1591 showComplementMenuItem.setVisible(false);
1592 showComplementMenuItem.addActionListener(new ActionListener()
1595 public void actionPerformed(ActionEvent e)
1597 showComplement_actionPerformed(showComplementMenuItem.getState());
1601 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1604 public void stateChanged(ChangeEvent evt)
1606 JTabbedPane pane = (JTabbedPane) evt.getSource();
1607 int sel = pane.getSelectedIndex();
1608 tabSelectionChanged(sel);
1611 tabbedPane.addMouseListener(new MouseAdapter()
1614 public void mousePressed(MouseEvent e)
1616 if (e.isPopupTrigger()) // Mac
1618 tabbedPane_mousePressed(e);
1623 public void mouseReleased(MouseEvent e)
1625 if (e.isPopupTrigger()) // Windows
1627 tabbedPane_mousePressed(e);
1631 tabbedPane.addFocusListener(new FocusAdapter()
1634 public void focusGained(FocusEvent e)
1636 tabbedPane_focusGained(e);
1640 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1641 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1642 jalview.util.ShortcutKeyMaskExWrapper
1643 .getMenuShortcutKeyMaskEx(),
1645 al = new ActionListener()
1648 public void actionPerformed(ActionEvent e)
1650 save_actionPerformed(e);
1653 addMenuActionAndAccelerator(keyStroke, save, al);
1655 reload.setEnabled(false);
1656 reload.setText(MessageManager.getString("action.reload"));
1657 reload.addActionListener(new ActionListener()
1660 public void actionPerformed(ActionEvent e)
1662 reload_actionPerformed(e);
1666 JMenuItem newView = new JMenuItem(
1667 MessageManager.getString("action.new_view"));
1668 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1669 jalview.util.ShortcutKeyMaskExWrapper
1670 .getMenuShortcutKeyMaskEx(),
1672 al = new ActionListener()
1675 public void actionPerformed(ActionEvent e)
1677 newView_actionPerformed(e);
1680 addMenuActionAndAccelerator(keyStroke, newView, al);
1682 tabbedPane.setToolTipText("<html><i>"
1683 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1686 formatMenu.setText(MessageManager.getString("action.format"));
1687 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1689 idRightAlign.setText(
1690 MessageManager.getString("label.right_align_sequence_id"));
1691 idRightAlign.addActionListener(new ActionListener()
1694 public void actionPerformed(ActionEvent e)
1696 idRightAlign_actionPerformed(e);
1700 gatherViews.setEnabled(false);
1701 gatherViews.setText(MessageManager.getString("action.gather_views"));
1702 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1703 al = new ActionListener()
1706 public void actionPerformed(ActionEvent e)
1708 gatherViews_actionPerformed(e);
1711 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1713 expandViews.setEnabled(false);
1714 expandViews.setText(MessageManager.getString("action.expand_views"));
1715 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1716 al = new ActionListener()
1719 public void actionPerformed(ActionEvent e)
1721 expandViews_actionPerformed(e);
1724 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1726 JMenuItem pageSetup = new JMenuItem(
1727 MessageManager.getString("action.page_setup"));
1728 pageSetup.addActionListener(new ActionListener()
1731 public void actionPerformed(ActionEvent e)
1733 pageSetup_actionPerformed(e);
1736 JMenuItem alignmentProperties = new JMenuItem(
1737 MessageManager.getString("label.alignment_props"));
1738 alignmentProperties.addActionListener(new ActionListener()
1741 public void actionPerformed(ActionEvent actionEvent)
1743 alignmentProperties();
1746 JMenuItem selectHighlighted = new JMenuItem(
1747 MessageManager.getString("action.select_highlighted_columns"));
1748 selectHighlighted.setToolTipText(
1749 MessageManager.getString("tooltip.select_highlighted_columns"));
1750 al = new ActionListener()
1753 public void actionPerformed(ActionEvent actionEvent)
1755 selectHighlightedColumns_actionPerformed(actionEvent);
1758 selectHighlighted.addActionListener(al);
1759 JMenu tooltipSettingsMenu = new JMenu(
1760 MessageManager.getString("label.sequence_id_tooltip"));
1761 JMenu autoAnnMenu = new JMenu(
1762 MessageManager.getString("label.autocalculated_annotation"));
1764 JMenu exportImageMenu = new JMenu(
1765 MessageManager.getString("label.export_image"));
1766 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1767 alignFrameMenuBar.add(fileMenu);
1768 alignFrameMenuBar.add(editMenu);
1769 alignFrameMenuBar.add(selectMenu);
1770 alignFrameMenuBar.add(viewMenu);
1771 alignFrameMenuBar.add(annotationsMenu);
1772 alignFrameMenuBar.add(formatMenu);
1773 alignFrameMenuBar.add(colourMenu);
1774 alignFrameMenuBar.add(calculateMenu);
1775 if (!Platform.isJS())
1777 alignFrameMenuBar.add(webService);
1780 fileMenu.add(fetchSequence);
1781 fileMenu.add(addSequenceMenu);
1782 fileMenu.add(reload);
1783 fileMenu.addSeparator();
1784 fileMenu.add(vamsasStore);
1786 fileMenu.add(saveAs);
1787 fileMenu.add(outputTextboxMenu);
1788 fileMenu.add(pageSetup);
1789 fileMenu.add(printMenuItem);
1790 fileMenu.addSeparator();
1791 fileMenu.add(exportImageMenu);
1792 fileMenu.add(exportFeatures);
1793 fileMenu.add(exportAnnotations);
1794 fileMenu.add(loadTreeMenuItem);
1795 fileMenu.add(associatedData);
1796 if (!Platform.isJS())
1798 fileMenu.add(loadVcf);
1800 fileMenu.addSeparator();
1801 fileMenu.add(closeMenuItem);
1803 pasteMenu.add(pasteNew);
1804 pasteMenu.add(pasteThis);
1805 editMenu.add(undoMenuItem);
1806 editMenu.add(redoMenuItem);
1809 editMenu.add(pasteMenu);
1810 editMenu.add(delete);
1811 editMenu.addSeparator();
1812 editMenu.add(remove2LeftMenuItem);
1813 editMenu.add(remove2RightMenuItem);
1814 editMenu.add(removeGappedColumnMenuItem);
1815 editMenu.add(removeAllGapsMenuItem);
1816 editMenu.add(removeRedundancyMenuItem);
1817 editMenu.addSeparator();
1818 // dont add these yet in the CVS build - they cannot be undone!
1819 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1820 // editMenu.add(justifyLeftMenuItem);
1821 // editMenu.add(justifyRightMenuItem);
1822 // editMenu.addSeparator();
1823 editMenu.add(padGapsMenuitem);
1825 showMenu.add(showAllColumns);
1826 showMenu.add(showAllSeqs);
1827 showMenu.add(showAllhidden);
1828 hideMenu.add(hideSelColumns);
1829 hideMenu.add(hideSelSequences);
1830 hideMenu.add(hideAllSelection);
1831 hideMenu.add(hideAllButSelection);
1832 viewMenu.add(newView);
1833 viewMenu.add(expandViews);
1834 viewMenu.add(gatherViews);
1835 viewMenu.addSeparator();
1836 viewMenu.add(showMenu);
1837 viewMenu.add(hideMenu);
1838 viewMenu.add(showComplementMenuItem);
1839 viewMenu.addSeparator();
1840 viewMenu.add(followHighlightMenuItem);
1841 viewMenu.addSeparator();
1842 viewMenu.add(showSeqFeatures);
1843 // viewMenu.add(showSeqFeaturesHeight);
1844 viewMenu.add(openFeatureSettings);
1845 tooltipSettingsMenu.add(showDbRefsMenuitem);
1846 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1847 viewMenu.add(tooltipSettingsMenu);
1848 viewMenu.addSeparator();
1849 viewMenu.add(alignmentProperties);
1850 viewMenu.addSeparator();
1851 viewMenu.add(overviewMenuItem);
1853 annotationsMenu.add(annotationPanelMenuItem);
1854 annotationsMenu.addSeparator();
1855 annotationsMenu.add(showAllAlAnnotations);
1856 annotationsMenu.add(hideAllAlAnnotations);
1857 annotationsMenu.addSeparator();
1858 annotationsMenu.add(showAllSeqAnnotations);
1859 annotationsMenu.add(hideAllSeqAnnotations);
1860 annotationsMenu.add(sortAnnBySequence);
1861 annotationsMenu.add(sortAnnByLabel);
1862 annotationsMenu.addSeparator();
1863 autoAnnMenu.add(showAutoFirst);
1864 autoAnnMenu.add(showAutoLast);
1865 autoAnnMenu.addSeparator();
1866 autoAnnMenu.add(applyAutoAnnotationSettings);
1867 autoAnnMenu.add(showConsensusHistogram);
1868 autoAnnMenu.add(showSequenceLogo);
1869 autoAnnMenu.add(normaliseSequenceLogo);
1870 autoAnnMenu.addSeparator();
1871 autoAnnMenu.add(showGroupConservation);
1872 autoAnnMenu.add(showGroupConsensus);
1873 annotationsMenu.add(autoAnnMenu);
1875 sort.add(sortIDMenuItem);
1876 sort.add(sortLengthMenuItem);
1877 sort.add(sortGroupMenuItem);
1878 sort.add(sortPairwiseMenuItem);
1879 sort.add(sortByTreeMenu);
1880 calculateMenu.add(sort);
1881 calculateMenu.add(calculateTree);
1882 calculateMenu.addSeparator();
1883 calculateMenu.add(pairwiseAlignmentMenuItem);
1884 calculateMenu.addSeparator();
1885 calculateMenu.add(showTranslation);
1886 calculateMenu.add(showReverse);
1887 calculateMenu.add(showReverseComplement);
1888 calculateMenu.add(showProducts);
1889 calculateMenu.add(autoCalculate);
1890 calculateMenu.add(sortByTree);
1891 calculateMenu.addSeparator();
1892 calculateMenu.add(expandAlignment);
1893 calculateMenu.add(extractScores);
1894 if (!Platform.isJS())
1896 calculateMenu.addSeparator();
1897 calculateMenu.add(runGroovy);
1900 webServiceNoServices = new JMenuItem(
1901 MessageManager.getString("label.no_services"));
1902 webService.add(webServiceNoServices);
1903 if (!Platform.isJS())
1905 exportImageMenu.add(htmlMenuItem);
1907 exportImageMenu.add(epsFile);
1908 exportImageMenu.add(createPNG);
1909 if (!Platform.isJS())
1911 exportImageMenu.add(createBioJS);
1912 exportImageMenu.add(createSVG);
1914 addSequenceMenu.add(addFromFile);
1915 addSequenceMenu.add(addFromText);
1916 addSequenceMenu.add(addFromURL);
1917 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1918 statusPanel.add(statusBar, null);
1919 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1921 formatMenu.add(font);
1922 formatMenu.addSeparator();
1923 formatMenu.add(wrapMenuItem);
1924 formatMenu.add(scaleAbove);
1925 formatMenu.add(scaleLeft);
1926 formatMenu.add(scaleRight);
1927 formatMenu.add(seqLimits);
1928 formatMenu.add(idRightAlign);
1929 formatMenu.add(hiddenMarkers);
1930 formatMenu.add(viewBoxesMenuItem);
1931 formatMenu.add(viewTextMenuItem);
1932 formatMenu.add(colourTextMenuItem);
1933 formatMenu.add(renderGapsMenuItem);
1934 formatMenu.add(centreColumnLabelsMenuItem);
1935 formatMenu.add(showNonconservedMenuItem);
1936 selectMenu.add(findMenuItem);
1937 selectMenu.addSeparator();
1938 selectMenu.add(selectAllSequenceMenuItem);
1939 selectMenu.add(deselectAllSequenceMenuItem);
1940 selectMenu.add(invertSequenceMenuItem);
1941 selectMenu.add(invertColSel);
1942 selectMenu.add(createGroup);
1943 selectMenu.add(unGroup);
1944 selectMenu.add(grpsFromSelection);
1945 selectMenu.add(deleteGroups);
1946 selectMenu.add(annotationColumn);
1947 selectMenu.add(selectHighlighted);
1948 // TODO - determine if the listenToViewSelections button is needed : see bug
1950 // selectMenu.addSeparator();
1951 // selectMenu.add(listenToViewSelections);
1954 protected void loadVcf_actionPerformed()
1959 * Constructs the entries on the Colour menu (but does not add them to the
1962 protected void initColourMenu()
1964 applyToAllGroups = new JCheckBoxMenuItem(
1965 MessageManager.getString("label.apply_colour_to_all_groups"));
1966 applyToAllGroups.addActionListener(new ActionListener()
1969 public void actionPerformed(ActionEvent e)
1971 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1975 textColour = new JMenuItem(
1976 MessageManager.getString("label.text_colour"));
1977 textColour.addActionListener(new ActionListener()
1980 public void actionPerformed(ActionEvent e)
1982 textColour_actionPerformed();
1986 conservationMenuItem = new JCheckBoxMenuItem(
1987 MessageManager.getString("action.by_conservation"));
1988 conservationMenuItem.addActionListener(new ActionListener()
1991 public void actionPerformed(ActionEvent e)
1993 conservationMenuItem_actionPerformed(
1994 conservationMenuItem.isSelected());
1998 abovePIDThreshold = new JCheckBoxMenuItem(
1999 MessageManager.getString("label.above_identity_threshold"));
2000 abovePIDThreshold.addActionListener(new ActionListener()
2003 public void actionPerformed(ActionEvent e)
2005 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2008 modifyPID = new JMenuItem(
2009 MessageManager.getString("label.modify_identity_threshold"));
2010 modifyPID.addActionListener(new ActionListener()
2013 public void actionPerformed(ActionEvent e)
2015 modifyPID_actionPerformed();
2018 modifyConservation = new JMenuItem(MessageManager
2019 .getString("label.modify_conservation_threshold"));
2020 modifyConservation.addActionListener(new ActionListener()
2023 public void actionPerformed(ActionEvent e)
2025 modifyConservation_actionPerformed();
2029 annotationColour = new JRadioButtonMenuItem(
2030 MessageManager.getString("action.by_annotation"));
2031 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2032 annotationColour.addActionListener(new ActionListener()
2035 public void actionPerformed(ActionEvent e)
2037 annotationColour_actionPerformed();
2042 protected void selectHighlightedColumns_actionPerformed(
2043 ActionEvent actionEvent)
2045 // TODO Auto-generated method stub
2050 * Generate the reverse sequence (or reverse complement if the flag is true)
2051 * and add it to the alignment
2055 protected void showReverse_actionPerformed(boolean complement)
2060 * Try to run script in a Groovy console, having first ensured that this
2061 * alignframe is set as currentAlignFrame in Desktop
2063 protected void runGroovy_actionPerformed()
2069 * Adds the given action listener and key accelerator to the given menu item.
2070 * Also saves in a lookup table to support lookup of action by key stroke.
2074 * @param actionListener
2076 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2077 JMenuItem menuItem, ActionListener actionListener)
2079 menuItem.setAccelerator(keyStroke);
2080 accelerators.put(keyStroke, menuItem);
2081 menuItem.addActionListener(actionListener);
2085 * Action on clicking sort annotations by type.
2089 protected void sortAnnotations_actionPerformed()
2094 * Action on clicking Show all annotations.
2096 * @param forSequences
2097 * update sequence-related annotations
2098 * @param forAlignment
2099 * update non-sequence-related annotations
2101 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2102 boolean forAlignment)
2104 setAnnotationsVisibility(true, forSequences, forAlignment);
2108 * Action on clicking Hide all annotations.
2110 * @param forSequences
2111 * update sequence-related annotations
2112 * @param forAlignment
2113 * update non-sequence-related annotations
2115 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2116 boolean forAlignment)
2118 setAnnotationsVisibility(false, forSequences, forAlignment);
2122 * Set the visibility of annotations to true or false. Can act on
2123 * sequence-related annotations, or alignment-related, or both.
2126 * @param forSequences
2127 * update sequence-related annotations
2128 * @param forAlignment
2129 * update non-sequence-related annotations
2131 protected void setAnnotationsVisibility(boolean visible,
2132 boolean forSequences, boolean forAlignment)
2137 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2139 // TODO Auto-generated method stub
2143 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2145 // TODO Auto-generated method stub
2149 protected void showAllhidden_actionPerformed(ActionEvent e)
2151 // TODO Auto-generated method stub
2155 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2157 // TODO Auto-generated method stub
2161 protected void hideAllSelection_actionPerformed(ActionEvent e)
2163 // TODO Auto-generated method stub
2167 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2169 // TODO Auto-generated method stub
2173 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2175 // TODO Auto-generated method stub
2179 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2181 // TODO Auto-generated method stub
2185 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2187 // TODO Auto-generated method stub
2191 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2193 // TODO Auto-generated method stub
2197 protected void showGroupConservation_actionPerformed(ActionEvent e)
2199 // TODO Auto-generated method stub
2203 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2205 // TODO Auto-generated method stub
2209 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2211 // TODO Auto-generated method stub
2215 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2217 // TODO Auto-generated method stub
2221 protected void followHighlight_actionPerformed()
2223 // TODO Auto-generated method stub
2227 protected void showNpFeats_actionPerformed(ActionEvent e)
2229 // TODO Auto-generated method stub
2233 protected void showDbRefs_actionPerformed(ActionEvent e)
2235 // TODO Auto-generated method stub
2239 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2243 protected void buildSortByAnnotationScoresMenu()
2247 protected void extractScores_actionPerformed(ActionEvent e)
2251 protected void outputText_actionPerformed(String formatName)
2255 public void addFromFile_actionPerformed(ActionEvent e)
2260 public void addFromText_actionPerformed(ActionEvent e)
2265 public void addFromURL_actionPerformed(ActionEvent e)
2270 public void exportFeatures_actionPerformed(ActionEvent e)
2275 public void exportAnnotations_actionPerformed(ActionEvent e)
2280 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2284 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2289 protected void closeMenuItem_actionPerformed(boolean b)
2293 protected void redoMenuItem_actionPerformed(ActionEvent e)
2297 protected void undoMenuItem_actionPerformed(ActionEvent e)
2301 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2305 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2309 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2313 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2317 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2321 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2325 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2329 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2333 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2337 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2341 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2345 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2349 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2353 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2357 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2361 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2365 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2369 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2373 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2377 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2381 protected void conservationMenuItem_actionPerformed(boolean selected)
2385 protected void printMenuItem_actionPerformed(ActionEvent e)
2389 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2393 protected void findMenuItem_actionPerformed(ActionEvent e)
2397 protected void abovePIDThreshold_actionPerformed(boolean selected)
2401 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2405 protected void deleteGroups_actionPerformed(ActionEvent e)
2409 protected void createGroup_actionPerformed(ActionEvent e)
2413 protected void unGroup_actionPerformed(ActionEvent e)
2417 protected void copy_actionPerformed()
2421 protected void cut_actionPerformed()
2425 protected void delete_actionPerformed()
2429 protected void pasteNew_actionPerformed(ActionEvent e)
2433 protected void pasteThis_actionPerformed(ActionEvent e)
2437 protected void applyToAllGroups_actionPerformed(boolean selected)
2441 public void createPNG(java.io.File f)
2445 protected void font_actionPerformed(ActionEvent e)
2449 protected void seqLimit_actionPerformed(ActionEvent e)
2453 public void seqDBRef_actionPerformed(ActionEvent e)
2458 public void createEPS(java.io.File f)
2462 public void createSVG(java.io.File f)
2467 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2473 * Template method to handle the 'load T-Coffee scores' menu event.
2475 * Subclasses override this method to provide a custom action.
2480 protected void loadScores_actionPerformed(ActionEvent event)
2485 protected void jpred_actionPerformed(ActionEvent e)
2489 protected void scaleAbove_actionPerformed(ActionEvent e)
2493 protected void scaleLeft_actionPerformed(ActionEvent e)
2497 protected void scaleRight_actionPerformed(ActionEvent e)
2501 protected void modifyPID_actionPerformed()
2505 protected void modifyConservation_actionPerformed()
2509 protected void saveAs_actionPerformed()
2513 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2517 public void vamsasStore_actionPerformed(ActionEvent e)
2522 public void vamsasLoad_actionPerformed(ActionEvent e)
2527 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2532 public void featureSettings_actionPerformed(ActionEvent e)
2537 public void fetchSequence_actionPerformed()
2542 public void smoothFont_actionPerformed(ActionEvent e)
2547 public void annotationColour_actionPerformed()
2551 public void annotationColumn_actionPerformed(ActionEvent e)
2555 public void associatedData_actionPerformed(ActionEvent e)
2560 public void autoCalculate_actionPerformed(ActionEvent e)
2565 public void sortByTreeOption_actionPerformed(ActionEvent e)
2570 public void showAllSeqs_actionPerformed(ActionEvent e)
2575 public void showAllColumns_actionPerformed(ActionEvent e)
2580 public void hideSelSequences_actionPerformed(ActionEvent e)
2585 public void hideSelColumns_actionPerformed(ActionEvent e)
2590 public void hiddenMarkers_actionPerformed(ActionEvent e)
2595 public void findPdbId_actionPerformed(ActionEvent e)
2600 public void enterPdbId_actionPerformed(ActionEvent e)
2605 public void pdbFile_actionPerformed(ActionEvent e)
2610 public void invertColSel_actionPerformed(ActionEvent e)
2615 public void tabSelectionChanged(int sel)
2620 public void tabbedPane_mousePressed(MouseEvent e)
2625 public void tabbedPane_focusGained(FocusEvent e)
2630 public void save_actionPerformed(ActionEvent e)
2635 public void reload_actionPerformed(ActionEvent e)
2640 public void newView_actionPerformed(ActionEvent e)
2645 public void textColour_actionPerformed()
2650 public void idRightAlign_actionPerformed(ActionEvent e)
2655 public void expandViews_actionPerformed(ActionEvent e)
2660 public void gatherViews_actionPerformed(ActionEvent e)
2665 public void buildTreeSortMenu()
2670 public void pageSetup_actionPerformed(ActionEvent e)
2675 public void alignmentProperties()
2680 protected void expand_newalign(ActionEvent e)
2682 // TODO Auto-generated method stub
2686 protected boolean isShowAutoCalculatedAbove()
2688 return showAutoCalculatedAbove;
2691 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2693 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2696 protected SequenceAnnotationOrder getAnnotationSortOrder()
2698 return annotationSortOrder;
2701 protected void setAnnotationSortOrder(
2702 SequenceAnnotationOrder annotationSortOrder)
2704 this.annotationSortOrder = annotationSortOrder;
2707 public Map<KeyStroke, JMenuItem> getAccelerators()
2709 return this.accelerators;
2713 * Returns the selected index of the tabbed pane, or -1 if none selected
2714 * (including the case where the tabbed pane has not been made visible).
2718 public int getTabIndex()
2720 return tabbedPane.getSelectedIndex();
2723 public JPanel getStatusPanel()
2729 * Sets a reference to the containing split frame. Also makes the 'toggle
2730 * split view' menu item visible and checked.
2734 public void setSplitFrame(SplitContainerI sf)
2736 this.splitFrame = sf;
2739 this.showComplementMenuItem.setVisible(true);
2740 this.showComplementMenuItem.setState(true);
2744 public SplitContainerI getSplitViewContainer()
2746 return this.splitFrame;
2749 protected void showComplement_actionPerformed(boolean complement)