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(Platform.getAppID("alignment"));
227 setJMenuBar(alignFrameMenuBar);
229 // dynamically fill save as menu with available formats
230 for (String ff : FileFormats.getInstance().getWritableFormats(true))
232 JMenuItem item = new JMenuItem(ff);
234 item.addActionListener(new ActionListener()
237 public void actionPerformed(ActionEvent e)
239 outputText_actionPerformed(e.getActionCommand());
243 outputTextboxMenu.add(item);
245 } catch (Exception e)
247 System.err.println(e.toString());
250 if (Platform.allowMnemonics()) // was "not mac and not JS"
252 closeMenuItem.setMnemonic('C');
253 outputTextboxMenu.setMnemonic('T');
254 undoMenuItem.setMnemonic('Z');
255 redoMenuItem.setMnemonic('0');
256 copy.setMnemonic('C');
257 cut.setMnemonic('U');
258 pasteMenu.setMnemonic('P');
259 reload.setMnemonic('R');
263 private void jbInit() throws Exception
267 JMenuItem saveAs = new JMenuItem(
268 MessageManager.getString("action.save_as"));
269 ActionListener al = new ActionListener()
272 public void actionPerformed(ActionEvent e)
274 saveAs_actionPerformed();
278 // FIXME getDefaultToolkit throws an exception in Headless mode
279 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
280 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
281 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
283 addMenuActionAndAccelerator(keyStroke, saveAs, al);
285 closeMenuItem.setText(MessageManager.getString("action.close"));
286 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
287 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
288 al = new ActionListener()
291 public void actionPerformed(ActionEvent e)
293 closeMenuItem_actionPerformed(false);
296 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
298 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
299 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
300 JMenu annotationsMenu = new JMenu(
301 MessageManager.getString("action.annotations"));
302 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
303 colourMenu.setText(MessageManager.getString("action.colour"));
304 JMenu calculateMenu = new JMenu(
305 MessageManager.getString("action.calculate"));
306 webService.setText(MessageManager.getString("action.web_service"));
307 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
308 MessageManager.getString("action.select_all"));
309 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
310 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
311 al = new ActionListener()
314 public void actionPerformed(ActionEvent e)
316 selectAllSequenceMenuItem_actionPerformed(e);
319 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
321 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
322 MessageManager.getString("action.deselect_all"));
323 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
324 al = new ActionListener()
327 public void actionPerformed(ActionEvent e)
329 deselectAllSequenceMenuItem_actionPerformed(e);
332 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
334 JMenuItem invertSequenceMenuItem = new JMenuItem(
335 MessageManager.getString("action.invert_sequence_selection"));
336 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
337 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
338 al = new ActionListener()
341 public void actionPerformed(ActionEvent e)
343 invertSequenceMenuItem_actionPerformed(e);
346 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
348 JMenuItem grpsFromSelection = new JMenuItem(
349 MessageManager.getString("action.make_groups_selection"));
350 grpsFromSelection.addActionListener(new ActionListener()
353 public void actionPerformed(ActionEvent e)
355 makeGrpsFromSelection_actionPerformed(e);
358 JMenuItem expandAlignment = new JMenuItem(
359 MessageManager.getString("action.view_flanking_regions"));
360 expandAlignment.setToolTipText(
361 MessageManager.getString("label.view_flanking_regions"));
362 expandAlignment.addActionListener(new ActionListener()
365 public void actionPerformed(ActionEvent e)
370 JMenuItem remove2LeftMenuItem = new JMenuItem(
371 MessageManager.getString("action.remove_left"));
372 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
373 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
374 al = new ActionListener()
377 public void actionPerformed(ActionEvent e)
379 remove2LeftMenuItem_actionPerformed(e);
382 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
384 JMenuItem remove2RightMenuItem = new JMenuItem(
385 MessageManager.getString("action.remove_right"));
386 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
387 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
388 al = new ActionListener()
391 public void actionPerformed(ActionEvent e)
393 remove2RightMenuItem_actionPerformed(e);
396 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
398 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
399 MessageManager.getString("action.remove_empty_columns"));
400 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
401 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
402 al = new ActionListener()
405 public void actionPerformed(ActionEvent e)
407 removeGappedColumnMenuItem_actionPerformed(e);
410 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
412 JMenuItem removeAllGapsMenuItem = new JMenuItem(
413 MessageManager.getString("action.remove_all_gaps"));
414 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
415 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
416 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
418 al = new ActionListener()
421 public void actionPerformed(ActionEvent e)
423 removeAllGapsMenuItem_actionPerformed(e);
426 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
428 JMenuItem justifyLeftMenuItem = new JMenuItem(
429 MessageManager.getString("action.left_justify_alignment"));
430 justifyLeftMenuItem.addActionListener(new ActionListener()
433 public void actionPerformed(ActionEvent e)
435 justifyLeftMenuItem_actionPerformed(e);
438 JMenuItem justifyRightMenuItem = new JMenuItem(
439 MessageManager.getString("action.right_justify_alignment"));
440 justifyRightMenuItem.addActionListener(new ActionListener()
443 public void actionPerformed(ActionEvent e)
445 justifyRightMenuItem_actionPerformed(e);
448 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
449 viewBoxesMenuItem.setState(true);
450 viewBoxesMenuItem.addActionListener(new ActionListener()
453 public void actionPerformed(ActionEvent e)
455 viewBoxesMenuItem_actionPerformed(e);
458 viewTextMenuItem.setText(MessageManager.getString("action.text"));
459 viewTextMenuItem.setState(true);
460 viewTextMenuItem.addActionListener(new ActionListener()
463 public void actionPerformed(ActionEvent e)
465 viewTextMenuItem_actionPerformed(e);
468 showNonconservedMenuItem
469 .setText(MessageManager.getString("label.show_non_conserved"));
470 showNonconservedMenuItem.setState(false);
471 showNonconservedMenuItem.addActionListener(new ActionListener()
474 public void actionPerformed(ActionEvent e)
476 showUnconservedMenuItem_actionPerformed(e);
479 JMenuItem sortPairwiseMenuItem = new JMenuItem(
480 MessageManager.getString("action.by_pairwise_id"));
481 sortPairwiseMenuItem.addActionListener(new ActionListener()
484 public void actionPerformed(ActionEvent e)
486 sortPairwiseMenuItem_actionPerformed(e);
489 JMenuItem sortIDMenuItem = new JMenuItem(
490 MessageManager.getString("action.by_id"));
491 sortIDMenuItem.addActionListener(new ActionListener()
494 public void actionPerformed(ActionEvent e)
496 sortIDMenuItem_actionPerformed(e);
499 JMenuItem sortLengthMenuItem = new JMenuItem(
500 MessageManager.getString("action.by_length"));
501 sortLengthMenuItem.addActionListener(new ActionListener()
504 public void actionPerformed(ActionEvent e)
506 sortLengthMenuItem_actionPerformed(e);
509 JMenuItem sortGroupMenuItem = new JMenuItem(
510 MessageManager.getString("action.by_group"));
511 sortGroupMenuItem.addActionListener(new ActionListener()
514 public void actionPerformed(ActionEvent e)
516 sortGroupMenuItem_actionPerformed(e);
520 JMenuItem removeRedundancyMenuItem = new JMenuItem(
521 MessageManager.getString("action.remove_redundancy"));
522 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
523 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
524 al = new ActionListener()
527 public void actionPerformed(ActionEvent e)
529 removeRedundancyMenuItem_actionPerformed(e);
532 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
534 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
535 MessageManager.getString("action.pairwise_alignment"));
536 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
539 public void actionPerformed(ActionEvent e)
541 pairwiseAlignmentMenuItem_actionPerformed(e);
545 this.getContentPane().setLayout(new BorderLayout());
546 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
547 statusBar.setBackground(Color.white);
548 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
549 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
550 statusBar.setText(MessageManager.getString("label.status_bar"));
552 .setText(MessageManager.getString("label.out_to_textbox"));
554 annotationPanelMenuItem.setActionCommand("");
555 annotationPanelMenuItem
556 .setText(MessageManager.getString("label.show_annotations"));
557 annotationPanelMenuItem
558 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
559 annotationPanelMenuItem.addActionListener(new ActionListener()
562 public void actionPerformed(ActionEvent e)
564 annotationPanelMenuItem_actionPerformed(e);
567 showAllAlAnnotations.setText(
568 MessageManager.getString("label.show_all_al_annotations"));
569 final boolean isAnnotationPanelShown = annotationPanelMenuItem
571 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
572 showAllAlAnnotations.addActionListener(new ActionListener()
575 public void actionPerformed(ActionEvent e)
577 showAllAnnotations_actionPerformed(false, true);
580 hideAllAlAnnotations.setText(
581 MessageManager.getString("label.hide_all_al_annotations"));
582 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
583 hideAllAlAnnotations.addActionListener(new ActionListener()
586 public void actionPerformed(ActionEvent e)
588 hideAllAnnotations_actionPerformed(false, true);
591 showAllSeqAnnotations.setText(
592 MessageManager.getString("label.show_all_seq_annotations"));
593 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
594 showAllSeqAnnotations.addActionListener(new ActionListener()
597 public void actionPerformed(ActionEvent e)
599 showAllAnnotations_actionPerformed(true, false);
602 hideAllSeqAnnotations.setText(
603 MessageManager.getString("label.hide_all_seq_annotations"));
604 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
605 hideAllSeqAnnotations.addActionListener(new ActionListener()
608 public void actionPerformed(ActionEvent e)
610 hideAllAnnotations_actionPerformed(true, false);
613 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
614 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
615 SequenceAnnotationOrder.NONE.name()));
616 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
617 MessageManager.getString("label.sort_annotations_by_sequence"));
618 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
619 MessageManager.getString("label.sort_annotations_by_label"));
621 sortAnnBySequence.setSelected(
622 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
623 sortAnnBySequence.addActionListener(new ActionListener()
626 public void actionPerformed(ActionEvent e)
628 boolean newState = sortAnnBySequence.getState();
629 sortAnnByLabel.setSelected(false);
630 setAnnotationSortOrder(
631 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
632 : SequenceAnnotationOrder.NONE);
633 sortAnnotations_actionPerformed();
636 sortAnnByLabel.setSelected(
637 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
638 sortAnnByLabel.addActionListener(new ActionListener()
641 public void actionPerformed(ActionEvent e)
643 boolean newState = sortAnnByLabel.getState();
644 sortAnnBySequence.setSelected(false);
645 setAnnotationSortOrder(
646 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
647 : SequenceAnnotationOrder.NONE);
648 sortAnnotations_actionPerformed();
651 colourTextMenuItem = new JCheckBoxMenuItem(
652 MessageManager.getString("label.colour_text"));
653 colourTextMenuItem.addActionListener(new ActionListener()
656 public void actionPerformed(ActionEvent e)
658 colourTextMenuItem_actionPerformed(e);
662 JMenuItem htmlMenuItem = new JMenuItem(
663 MessageManager.getString("label.html"));
664 htmlMenuItem.addActionListener(new ActionListener()
667 public void actionPerformed(ActionEvent e)
669 htmlMenuItem_actionPerformed(e);
673 JMenuItem createBioJS = new JMenuItem(
674 MessageManager.getString("label.biojs_html_export"));
675 createBioJS.addActionListener(new java.awt.event.ActionListener()
678 public void actionPerformed(ActionEvent e)
680 bioJSMenuItem_actionPerformed(e);
684 JMenuItem overviewMenuItem = new JMenuItem(
685 MessageManager.getString("label.overview_window"));
686 overviewMenuItem.addActionListener(new ActionListener()
689 public void actionPerformed(ActionEvent e)
691 overviewMenuItem_actionPerformed(e);
695 undoMenuItem.setEnabled(false);
696 undoMenuItem.setText(MessageManager.getString("action.undo"));
697 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
698 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
699 al = new ActionListener()
702 public void actionPerformed(ActionEvent e)
704 undoMenuItem_actionPerformed(e);
707 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
709 redoMenuItem.setEnabled(false);
710 redoMenuItem.setText(MessageManager.getString("action.redo"));
711 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
712 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
713 al = new ActionListener()
716 public void actionPerformed(ActionEvent e)
718 redoMenuItem_actionPerformed(e);
721 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
723 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
724 wrapMenuItem.addActionListener(new ActionListener()
727 public void actionPerformed(ActionEvent e)
729 wrapMenuItem_actionPerformed(e);
733 JMenuItem printMenuItem = new JMenuItem(
734 MessageManager.getString("action.print"));
735 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
736 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
737 al = new ActionListener()
740 public void actionPerformed(ActionEvent e)
742 printMenuItem_actionPerformed(e);
745 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
748 .setText(MessageManager.getString("action.show_gaps"));
749 renderGapsMenuItem.setState(true);
750 renderGapsMenuItem.addActionListener(new ActionListener()
753 public void actionPerformed(ActionEvent e)
755 renderGapsMenuItem_actionPerformed(e);
759 JMenuItem findMenuItem = new JMenuItem(
760 MessageManager.getString("action.find"));
761 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
762 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
763 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
764 MessageManager.getString("label.find_tip")));
765 al = new ActionListener()
768 public void actionPerformed(ActionEvent e)
770 findMenuItem_actionPerformed(e);
773 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
775 showSeqFeatures.setText(
776 MessageManager.getString("label.show_sequence_features"));
777 showSeqFeatures.addActionListener(new ActionListener()
780 public void actionPerformed(ActionEvent actionEvent)
782 showSeqFeatures_actionPerformed(actionEvent);
786 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
787 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
788 * void actionPerformed(ActionEvent actionEvent) {
789 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
792 .setText(MessageManager.getString("label.show_database_refs"));
793 showDbRefsMenuitem.addActionListener(new ActionListener()
797 public void actionPerformed(ActionEvent e)
799 showDbRefs_actionPerformed(e);
803 showNpFeatsMenuitem.setText(
804 MessageManager.getString("label.show_non_positional_features"));
805 showNpFeatsMenuitem.addActionListener(new ActionListener()
809 public void actionPerformed(ActionEvent e)
811 showNpFeats_actionPerformed(e);
815 showGroupConservation
816 .setText(MessageManager.getString("label.group_conservation"));
817 showGroupConservation.addActionListener(new ActionListener()
821 public void actionPerformed(ActionEvent e)
823 showGroupConservation_actionPerformed(e);
829 .setText(MessageManager.getString("label.group_consensus"));
830 showGroupConsensus.addActionListener(new ActionListener()
834 public void actionPerformed(ActionEvent e)
836 showGroupConsensus_actionPerformed(e);
840 showConsensusHistogram.setText(
841 MessageManager.getString("label.show_consensus_histogram"));
842 showConsensusHistogram.addActionListener(new ActionListener()
846 public void actionPerformed(ActionEvent e)
848 showConsensusHistogram_actionPerformed(e);
853 .setText(MessageManager.getString("label.show_consensus_logo"));
854 showSequenceLogo.addActionListener(new ActionListener()
858 public void actionPerformed(ActionEvent e)
860 showSequenceLogo_actionPerformed(e);
864 normaliseSequenceLogo
865 .setText(MessageManager.getString("label.norm_consensus_logo"));
866 normaliseSequenceLogo.addActionListener(new ActionListener()
870 public void actionPerformed(ActionEvent e)
872 normaliseSequenceLogo_actionPerformed(e);
876 applyAutoAnnotationSettings
877 .setText(MessageManager.getString("label.apply_all_groups"));
878 applyAutoAnnotationSettings.setState(false);
879 applyAutoAnnotationSettings.setVisible(true);
880 applyAutoAnnotationSettings.addActionListener(new ActionListener()
883 public void actionPerformed(ActionEvent e)
885 applyAutoAnnotationSettings_actionPerformed(e);
889 ButtonGroup buttonGroup = new ButtonGroup();
890 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
891 MessageManager.getString("label.show_first"));
892 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
893 MessageManager.getString("label.show_last"));
894 buttonGroup.add(showAutoFirst);
895 buttonGroup.add(showAutoLast);
896 final boolean autoFirst = Cache
897 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
898 showAutoFirst.setSelected(autoFirst);
899 setShowAutoCalculatedAbove(autoFirst);
900 showAutoFirst.addActionListener(new ActionListener()
903 public void actionPerformed(ActionEvent e)
905 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
906 sortAnnotations_actionPerformed();
909 showAutoLast.setSelected(!showAutoFirst.isSelected());
910 showAutoLast.addActionListener(new ActionListener()
913 public void actionPerformed(ActionEvent e)
915 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
916 sortAnnotations_actionPerformed();
920 JMenuItem deleteGroups = new JMenuItem(
921 MessageManager.getString("action.undefine_groups"));
922 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
923 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
924 al = new ActionListener()
927 public void actionPerformed(ActionEvent e)
929 deleteGroups_actionPerformed(e);
932 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
934 JMenuItem annotationColumn = new JMenuItem(
935 MessageManager.getString("action.select_by_annotation"));
936 annotationColumn.addActionListener(new ActionListener()
939 public void actionPerformed(ActionEvent e)
941 annotationColumn_actionPerformed(e);
945 JMenuItem createGroup = new JMenuItem(
946 MessageManager.getString("action.create_group"));
947 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
948 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
949 al = new ActionListener()
952 public void actionPerformed(ActionEvent e)
954 createGroup_actionPerformed(e);
957 addMenuActionAndAccelerator(keyStroke, createGroup, al);
959 JMenuItem unGroup = new JMenuItem(
960 MessageManager.getString("action.remove_group"));
961 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
962 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
963 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
965 al = new ActionListener()
968 public void actionPerformed(ActionEvent e)
970 unGroup_actionPerformed(e);
973 addMenuActionAndAccelerator(keyStroke, unGroup, al);
975 copy.setText(MessageManager.getString("action.copy"));
976 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
977 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
979 al = new ActionListener()
982 public void actionPerformed(ActionEvent e)
984 copy_actionPerformed();
987 addMenuActionAndAccelerator(keyStroke, copy, al);
989 cut.setText(MessageManager.getString("action.cut"));
990 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
991 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
992 al = new ActionListener()
995 public void actionPerformed(ActionEvent e)
997 cut_actionPerformed();
1000 addMenuActionAndAccelerator(keyStroke, cut, al);
1002 JMenuItem delete = new JMenuItem(
1003 MessageManager.getString("action.delete"));
1004 delete.addActionListener(new ActionListener()
1007 public void actionPerformed(ActionEvent e)
1009 delete_actionPerformed();
1013 pasteMenu.setText(MessageManager.getString("action.paste"));
1014 JMenuItem pasteNew = new JMenuItem(
1015 MessageManager.getString("label.to_new_alignment"));
1016 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1017 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1018 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1020 al = new ActionListener()
1023 public void actionPerformed(ActionEvent e)
1025 pasteNew_actionPerformed(e);
1028 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1030 JMenuItem pasteThis = new JMenuItem(
1031 MessageManager.getString("label.to_this_alignment"));
1032 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1033 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1034 al = new ActionListener()
1037 public void actionPerformed(ActionEvent e)
1039 pasteThis_actionPerformed(e);
1042 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1044 JMenuItem createPNG = new JMenuItem("PNG");
1045 createPNG.addActionListener(new ActionListener()
1048 public void actionPerformed(ActionEvent e)
1053 createPNG.setActionCommand(
1054 MessageManager.getString("label.save_png_image"));
1056 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1057 font.addActionListener(new ActionListener()
1060 public void actionPerformed(ActionEvent e)
1062 font_actionPerformed(e);
1066 MessageManager.getString("label.show_sequence_limits"));
1067 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1068 seqLimits.addActionListener(new ActionListener()
1071 public void actionPerformed(ActionEvent e)
1073 seqLimit_actionPerformed(e);
1076 JMenuItem epsFile = new JMenuItem("EPS");
1077 epsFile.addActionListener(new ActionListener()
1080 public void actionPerformed(ActionEvent e)
1086 JMenuItem createSVG = new JMenuItem("SVG");
1087 createSVG.addActionListener(new ActionListener()
1090 public void actionPerformed(ActionEvent e)
1096 JMenuItem loadTreeMenuItem = new JMenuItem(
1097 MessageManager.getString("label.load_associated_tree"));
1098 loadTreeMenuItem.setActionCommand(
1099 MessageManager.getString("label.load_tree_for_sequence_set"));
1100 loadTreeMenuItem.addActionListener(new ActionListener()
1103 public void actionPerformed(ActionEvent e)
1105 loadTreeMenuItem_actionPerformed(e);
1109 scaleAbove.setVisible(false);
1110 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1111 scaleAbove.addActionListener(new ActionListener()
1114 public void actionPerformed(ActionEvent e)
1116 scaleAbove_actionPerformed(e);
1119 scaleLeft.setVisible(false);
1120 scaleLeft.setSelected(true);
1121 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1122 scaleLeft.addActionListener(new ActionListener()
1125 public void actionPerformed(ActionEvent e)
1127 scaleLeft_actionPerformed(e);
1130 scaleRight.setVisible(false);
1131 scaleRight.setSelected(true);
1132 scaleRight.setText(MessageManager.getString("action.scale_right"));
1133 scaleRight.addActionListener(new ActionListener()
1136 public void actionPerformed(ActionEvent e)
1138 scaleRight_actionPerformed(e);
1141 centreColumnLabelsMenuItem.setVisible(true);
1142 centreColumnLabelsMenuItem.setState(false);
1143 centreColumnLabelsMenuItem.setText(
1144 MessageManager.getString("label.centre_column_labels"));
1145 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1148 public void actionPerformed(ActionEvent e)
1150 centreColumnLabels_actionPerformed(e);
1153 followHighlightMenuItem.setVisible(true);
1154 followHighlightMenuItem.setState(true);
1155 followHighlightMenuItem
1156 .setText(MessageManager.getString("label.automatic_scrolling"));
1157 followHighlightMenuItem.addActionListener(new ActionListener()
1161 public void actionPerformed(ActionEvent e)
1163 followHighlight_actionPerformed();
1169 .setText(MessageManager.getString("action.by_tree_order"));
1170 sort.setText(MessageManager.getString("action.sort"));
1171 sort.addMenuListener(new MenuListener()
1174 public void menuSelected(MenuEvent e)
1176 buildTreeSortMenu();
1180 public void menuDeselected(MenuEvent e)
1185 public void menuCanceled(MenuEvent e)
1190 .setText(MessageManager.getString("label.sort_by_score"));
1191 sort.add(sortByAnnotScore);
1192 sort.addMenuListener(new javax.swing.event.MenuListener()
1196 public void menuCanceled(MenuEvent e)
1201 public void menuDeselected(MenuEvent e)
1206 public void menuSelected(MenuEvent e)
1208 buildSortByAnnotationScoresMenu();
1211 sortByAnnotScore.setVisible(false);
1214 .setText(MessageManager.getString("action.calculate_tree_pca"));
1216 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1218 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1219 padGapsMenuitem.addActionListener(new ActionListener()
1222 public void actionPerformed(ActionEvent e)
1224 padGapsMenuitem_actionPerformed(e);
1227 JMenuItem vamsasStore = new JMenuItem(
1228 MessageManager.getString("label.vamsas_store"));
1229 vamsasStore.setVisible(false);
1230 vamsasStore.addActionListener(new ActionListener()
1233 public void actionPerformed(ActionEvent e)
1235 vamsasStore_actionPerformed(e);
1240 * Translate as cDNA with sub-menu of translation tables
1243 .setText(MessageManager.getString("label.translate_cDNA"));
1244 boolean first = true;
1245 for (final GeneticCodeI table : GeneticCodes.getInstance()
1248 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1249 showTranslation.add(item);
1250 item.addActionListener(new ActionListener()
1253 public void actionPerformed(ActionEvent e)
1255 showTranslation_actionPerformed(table);
1260 showTranslation.addSeparator();
1265 showReverse.setText(MessageManager.getString("label.reverse"));
1266 showReverse.addActionListener(new ActionListener()
1269 public void actionPerformed(ActionEvent e)
1271 showReverse_actionPerformed(false);
1274 showReverseComplement
1275 .setText(MessageManager.getString("label.reverse_complement"));
1276 showReverseComplement.addActionListener(new ActionListener()
1279 public void actionPerformed(ActionEvent e)
1281 showReverse_actionPerformed(true);
1285 JMenuItem extractScores = new JMenuItem(
1286 MessageManager.getString("label.extract_scores"));
1287 extractScores.addActionListener(new ActionListener()
1290 public void actionPerformed(ActionEvent e)
1292 extractScores_actionPerformed(e);
1295 extractScores.setVisible(true);
1296 // JBPNote: TODO: make gui for regex based score extraction
1298 // for show products actions see AlignFrame.canShowProducts
1299 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1301 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1302 runGroovy.setToolTipText(
1303 MessageManager.getString("label.run_groovy_tip"));
1304 runGroovy.addActionListener(new ActionListener()
1307 public void actionPerformed(ActionEvent e)
1309 runGroovy_actionPerformed();
1313 openFeatureSettings = new JMenuItem(
1314 MessageManager.getString("action.feature_settings"));
1315 openFeatureSettings.addActionListener(new ActionListener()
1318 public void actionPerformed(ActionEvent e)
1320 featureSettings_actionPerformed(e);
1325 * add sub-menu of database we can fetch from
1327 JMenuItem fetchSequence = new JMenuItem(
1328 MessageManager.getString("label.fetch_sequences"));
1329 fetchSequence.addActionListener(new ActionListener()
1332 public void actionPerformed(ActionEvent e)
1334 fetchSequence_actionPerformed();
1338 JMenuItem associatedData = new JMenuItem(
1339 MessageManager.getString("label.load_features_annotations"));
1340 associatedData.addActionListener(new ActionListener()
1343 public void actionPerformed(ActionEvent e)
1345 associatedData_actionPerformed(e);
1348 loadVcf = new JMenuItem(
1349 MessageManager.getString("label.load_vcf_file"));
1350 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1351 loadVcf.addActionListener(new ActionListener()
1354 public void actionPerformed(ActionEvent e)
1356 loadVcf_actionPerformed();
1359 autoCalculate.setText(
1360 MessageManager.getString("label.autocalculate_consensus"));
1361 autoCalculate.setState(
1362 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1363 autoCalculate.addActionListener(new ActionListener()
1366 public void actionPerformed(ActionEvent e)
1368 autoCalculate_actionPerformed(e);
1372 MessageManager.getString("label.sort_alignment_new_tree"));
1373 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1374 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1376 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1377 sortByTree.addActionListener(new ActionListener()
1380 public void actionPerformed(ActionEvent e)
1382 sortByTreeOption_actionPerformed(e);
1386 listenToViewSelections.setText(
1387 MessageManager.getString("label.listen_for_selections"));
1388 listenToViewSelections
1389 .setToolTipText("<html>" + MessageManager.getString(
1390 "label.selections_mirror_selections_made_same_sequences_other_views"));
1391 listenToViewSelections.setState(false);
1392 listenToViewSelections.addActionListener(new ActionListener()
1395 public void actionPerformed(ActionEvent e)
1397 listenToViewSelections_actionPerformed(e);
1401 JMenu addSequenceMenu = new JMenu(
1402 MessageManager.getString("label.add_sequences"));
1403 JMenuItem addFromFile = new JMenuItem(
1404 MessageManager.getString("label.from_file"));
1405 addFromFile.addActionListener(new ActionListener()
1408 public void actionPerformed(ActionEvent e)
1410 addFromFile_actionPerformed(e);
1413 JMenuItem addFromText = new JMenuItem(
1414 MessageManager.getString("label.from_textbox"));
1415 addFromText.addActionListener(new ActionListener()
1418 public void actionPerformed(ActionEvent e)
1420 addFromText_actionPerformed(e);
1423 JMenuItem addFromURL = new JMenuItem(
1424 MessageManager.getString("label.from_url"));
1425 addFromURL.addActionListener(new ActionListener()
1428 public void actionPerformed(ActionEvent e)
1430 addFromURL_actionPerformed(e);
1433 JMenuItem exportFeatures = new JMenuItem(
1434 MessageManager.getString("label.export_features"));
1435 exportFeatures.addActionListener(new ActionListener()
1438 public void actionPerformed(ActionEvent e)
1440 exportFeatures_actionPerformed(e);
1443 JMenuItem exportAnnotations = new JMenuItem(
1444 MessageManager.getString("label.export_annotations"));
1445 exportAnnotations.addActionListener(new ActionListener()
1448 public void actionPerformed(ActionEvent e)
1450 exportAnnotations_actionPerformed(e);
1453 statusPanel.setLayout(new GridLayout());
1454 JMenuItem showAllSeqs = new JMenuItem(
1455 MessageManager.getString("label.all_sequences"));
1456 showAllSeqs.setToolTipText(
1457 MessageManager.getString("label.toggle_sequence_visibility"));
1458 showAllSeqs.addActionListener(new ActionListener()
1461 public void actionPerformed(ActionEvent e)
1463 showAllSeqs_actionPerformed(e);
1466 JMenuItem showAllColumns = new JMenuItem(
1467 MessageManager.getString("label.all_columns"));
1468 showAllColumns.setToolTipText(
1469 MessageManager.getString("label.toggle_columns_visibility"));
1470 showAllColumns.addActionListener(new ActionListener()
1473 public void actionPerformed(ActionEvent e)
1475 showAllColumns_actionPerformed(e);
1478 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1479 JMenuItem hideSelSequences = new JMenuItem(
1480 MessageManager.getString("label.selected_sequences"));
1481 hideSelSequences.setToolTipText(
1482 MessageManager.getString("label.toggle_sequence_visibility"));
1483 hideSelSequences.addActionListener(new ActionListener()
1486 public void actionPerformed(ActionEvent e)
1488 hideSelSequences_actionPerformed(e);
1491 JMenuItem hideSelColumns = new JMenuItem(
1492 MessageManager.getString("label.selected_columns"));
1493 hideSelColumns.setToolTipText(
1494 MessageManager.getString("label.toggle_columns_visibility"));
1495 hideSelColumns.addActionListener(new ActionListener()
1498 public void actionPerformed(ActionEvent e)
1500 hideSelColumns_actionPerformed(e);
1503 JMenuItem hideAllSelection = new JMenuItem(
1504 MessageManager.getString("label.selected_region"));
1505 hideAllSelection.addActionListener(new ActionListener()
1508 public void actionPerformed(ActionEvent e)
1510 hideAllSelection_actionPerformed(e);
1513 // TODO: should be hidden if no selection exists.
1514 JMenuItem hideAllButSelection = new JMenuItem(
1515 MessageManager.getString("label.all_but_selected_region"));
1516 hideAllButSelection.addActionListener(new ActionListener()
1519 public void actionPerformed(ActionEvent e)
1521 hideAllButSelection_actionPerformed(e);
1524 JMenuItem showAllhidden = new JMenuItem(
1525 MessageManager.getString("label.all_sequences_columns"));
1526 showAllhidden.setToolTipText(MessageManager
1527 .getString("label.toggles_visibility_hidden_selected_regions"));
1528 showAllhidden.addActionListener(new ActionListener()
1531 public void actionPerformed(ActionEvent e)
1533 showAllhidden_actionPerformed(e);
1536 hiddenMarkers.setText(
1537 MessageManager.getString("action.show_hidden_markers"));
1538 hiddenMarkers.addActionListener(new ActionListener()
1541 public void actionPerformed(ActionEvent e)
1543 hiddenMarkers_actionPerformed(e);
1547 JMenuItem invertColSel = new JMenuItem(
1548 MessageManager.getString("action.invert_column_selection"));
1549 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1550 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1551 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1553 al = new ActionListener()
1556 public void actionPerformed(ActionEvent e)
1558 invertColSel_actionPerformed(e);
1561 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1563 showComplementMenuItem.setVisible(false);
1564 showComplementMenuItem.addActionListener(new ActionListener()
1567 public void actionPerformed(ActionEvent e)
1569 showComplement_actionPerformed(showComplementMenuItem.getState());
1573 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1576 public void stateChanged(ChangeEvent evt)
1578 JTabbedPane pane = (JTabbedPane) evt.getSource();
1579 int sel = pane.getSelectedIndex();
1580 tabSelectionChanged(sel);
1583 tabbedPane.addMouseListener(new MouseAdapter()
1586 public void mousePressed(MouseEvent e)
1588 if (e.isPopupTrigger()) // Mac
1590 tabbedPane_mousePressed(e);
1595 public void mouseReleased(MouseEvent e)
1597 if (e.isPopupTrigger()) // Windows
1599 tabbedPane_mousePressed(e);
1603 tabbedPane.addFocusListener(new FocusAdapter()
1606 public void focusGained(FocusEvent e)
1608 tabbedPane_focusGained(e);
1612 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1613 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1614 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1615 al = new ActionListener()
1618 public void actionPerformed(ActionEvent e)
1620 save_actionPerformed(e);
1623 addMenuActionAndAccelerator(keyStroke, save, al);
1625 reload.setEnabled(false);
1626 reload.setText(MessageManager.getString("action.reload"));
1627 reload.addActionListener(new ActionListener()
1630 public void actionPerformed(ActionEvent e)
1632 reload_actionPerformed(e);
1636 JMenuItem newView = new JMenuItem(
1637 MessageManager.getString("action.new_view"));
1638 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1639 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1640 al = new ActionListener()
1643 public void actionPerformed(ActionEvent e)
1645 newView_actionPerformed(e);
1648 addMenuActionAndAccelerator(keyStroke, newView, al);
1650 tabbedPane.setToolTipText("<html><i>"
1651 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1654 formatMenu.setText(MessageManager.getString("action.format"));
1655 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1657 idRightAlign.setText(
1658 MessageManager.getString("label.right_align_sequence_id"));
1659 idRightAlign.addActionListener(new ActionListener()
1662 public void actionPerformed(ActionEvent e)
1664 idRightAlign_actionPerformed(e);
1668 gatherViews.setEnabled(false);
1669 gatherViews.setText(MessageManager.getString("action.gather_views"));
1670 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1671 al = new ActionListener()
1674 public void actionPerformed(ActionEvent e)
1676 gatherViews_actionPerformed(e);
1679 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1681 expandViews.setEnabled(false);
1682 expandViews.setText(MessageManager.getString("action.expand_views"));
1683 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1684 al = new ActionListener()
1687 public void actionPerformed(ActionEvent e)
1689 expandViews_actionPerformed(e);
1692 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1694 JMenuItem pageSetup = new JMenuItem(
1695 MessageManager.getString("action.page_setup"));
1696 pageSetup.addActionListener(new ActionListener()
1699 public void actionPerformed(ActionEvent e)
1701 pageSetup_actionPerformed(e);
1704 JMenuItem alignmentProperties = new JMenuItem(
1705 MessageManager.getString("label.alignment_props"));
1706 alignmentProperties.addActionListener(new ActionListener()
1709 public void actionPerformed(ActionEvent actionEvent)
1711 alignmentProperties();
1714 JMenuItem selectHighlighted = new JMenuItem(
1715 MessageManager.getString("action.select_highlighted_columns"));
1716 selectHighlighted.setToolTipText(
1717 MessageManager.getString("tooltip.select_highlighted_columns"));
1718 al = new ActionListener()
1721 public void actionPerformed(ActionEvent actionEvent)
1723 selectHighlightedColumns_actionPerformed(actionEvent);
1726 selectHighlighted.addActionListener(al);
1727 JMenu tooltipSettingsMenu = new JMenu(
1728 MessageManager.getString("label.sequence_id_tooltip"));
1729 JMenu autoAnnMenu = new JMenu(
1730 MessageManager.getString("label.autocalculated_annotation"));
1732 JMenu exportImageMenu = new JMenu(
1733 MessageManager.getString("label.export_image"));
1734 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1735 alignFrameMenuBar.add(fileMenu);
1736 alignFrameMenuBar.add(editMenu);
1737 alignFrameMenuBar.add(selectMenu);
1738 alignFrameMenuBar.add(viewMenu);
1739 alignFrameMenuBar.add(annotationsMenu);
1740 alignFrameMenuBar.add(formatMenu);
1741 alignFrameMenuBar.add(colourMenu);
1742 alignFrameMenuBar.add(calculateMenu);
1743 if (!Platform.isJS())
1745 alignFrameMenuBar.add(webService);
1748 fileMenu.add(fetchSequence);
1749 fileMenu.add(addSequenceMenu);
1750 fileMenu.add(reload);
1751 fileMenu.addSeparator();
1752 fileMenu.add(vamsasStore);
1754 fileMenu.add(saveAs);
1755 fileMenu.add(outputTextboxMenu);
1756 fileMenu.add(pageSetup);
1757 fileMenu.add(printMenuItem);
1758 fileMenu.addSeparator();
1759 fileMenu.add(exportImageMenu);
1760 fileMenu.add(exportFeatures);
1761 fileMenu.add(exportAnnotations);
1762 fileMenu.add(loadTreeMenuItem);
1763 fileMenu.add(associatedData);
1764 if (!Platform.isJS())
1766 fileMenu.add(loadVcf);
1768 fileMenu.addSeparator();
1769 fileMenu.add(closeMenuItem);
1771 pasteMenu.add(pasteNew);
1772 pasteMenu.add(pasteThis);
1773 editMenu.add(undoMenuItem);
1774 editMenu.add(redoMenuItem);
1777 editMenu.add(pasteMenu);
1778 editMenu.add(delete);
1779 editMenu.addSeparator();
1780 editMenu.add(remove2LeftMenuItem);
1781 editMenu.add(remove2RightMenuItem);
1782 editMenu.add(removeGappedColumnMenuItem);
1783 editMenu.add(removeAllGapsMenuItem);
1784 editMenu.add(removeRedundancyMenuItem);
1785 editMenu.addSeparator();
1786 // dont add these yet in the CVS build - they cannot be undone!
1787 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1788 // editMenu.add(justifyLeftMenuItem);
1789 // editMenu.add(justifyRightMenuItem);
1790 // editMenu.addSeparator();
1791 editMenu.add(padGapsMenuitem);
1793 showMenu.add(showAllColumns);
1794 showMenu.add(showAllSeqs);
1795 showMenu.add(showAllhidden);
1796 hideMenu.add(hideSelColumns);
1797 hideMenu.add(hideSelSequences);
1798 hideMenu.add(hideAllSelection);
1799 hideMenu.add(hideAllButSelection);
1800 viewMenu.add(newView);
1801 viewMenu.add(expandViews);
1802 viewMenu.add(gatherViews);
1803 viewMenu.addSeparator();
1804 viewMenu.add(showMenu);
1805 viewMenu.add(hideMenu);
1806 viewMenu.add(showComplementMenuItem);
1807 viewMenu.addSeparator();
1808 viewMenu.add(followHighlightMenuItem);
1809 viewMenu.addSeparator();
1810 viewMenu.add(showSeqFeatures);
1811 // viewMenu.add(showSeqFeaturesHeight);
1812 viewMenu.add(openFeatureSettings);
1813 tooltipSettingsMenu.add(showDbRefsMenuitem);
1814 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1815 viewMenu.add(tooltipSettingsMenu);
1816 viewMenu.addSeparator();
1817 viewMenu.add(alignmentProperties);
1818 viewMenu.addSeparator();
1819 viewMenu.add(overviewMenuItem);
1821 annotationsMenu.add(annotationPanelMenuItem);
1822 annotationsMenu.addSeparator();
1823 annotationsMenu.add(showAllAlAnnotations);
1824 annotationsMenu.add(hideAllAlAnnotations);
1825 annotationsMenu.addSeparator();
1826 annotationsMenu.add(showAllSeqAnnotations);
1827 annotationsMenu.add(hideAllSeqAnnotations);
1828 annotationsMenu.add(sortAnnBySequence);
1829 annotationsMenu.add(sortAnnByLabel);
1830 annotationsMenu.addSeparator();
1831 autoAnnMenu.add(showAutoFirst);
1832 autoAnnMenu.add(showAutoLast);
1833 autoAnnMenu.addSeparator();
1834 autoAnnMenu.add(applyAutoAnnotationSettings);
1835 autoAnnMenu.add(showConsensusHistogram);
1836 autoAnnMenu.add(showSequenceLogo);
1837 autoAnnMenu.add(normaliseSequenceLogo);
1838 autoAnnMenu.addSeparator();
1839 autoAnnMenu.add(showGroupConservation);
1840 autoAnnMenu.add(showGroupConsensus);
1841 annotationsMenu.add(autoAnnMenu);
1843 sort.add(sortIDMenuItem);
1844 sort.add(sortLengthMenuItem);
1845 sort.add(sortGroupMenuItem);
1846 sort.add(sortPairwiseMenuItem);
1847 sort.add(sortByTreeMenu);
1848 calculateMenu.add(sort);
1849 calculateMenu.add(calculateTree);
1850 calculateMenu.addSeparator();
1851 calculateMenu.add(pairwiseAlignmentMenuItem);
1852 calculateMenu.addSeparator();
1853 calculateMenu.add(showTranslation);
1854 calculateMenu.add(showReverse);
1855 calculateMenu.add(showReverseComplement);
1856 calculateMenu.add(showProducts);
1857 calculateMenu.add(autoCalculate);
1858 calculateMenu.add(sortByTree);
1859 calculateMenu.addSeparator();
1860 calculateMenu.add(expandAlignment);
1861 calculateMenu.add(extractScores);
1862 if (!Platform.isJS())
1864 calculateMenu.addSeparator();
1865 calculateMenu.add(runGroovy);
1868 webServiceNoServices = new JMenuItem(
1869 MessageManager.getString("label.no_services"));
1870 webService.add(webServiceNoServices);
1871 if (!Platform.isJS())
1873 exportImageMenu.add(htmlMenuItem);
1875 exportImageMenu.add(epsFile);
1876 exportImageMenu.add(createPNG);
1877 if (!Platform.isJS())
1879 exportImageMenu.add(createBioJS);
1880 exportImageMenu.add(createSVG);
1882 addSequenceMenu.add(addFromFile);
1883 addSequenceMenu.add(addFromText);
1884 addSequenceMenu.add(addFromURL);
1885 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1886 statusPanel.add(statusBar, null);
1887 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1889 formatMenu.add(font);
1890 formatMenu.addSeparator();
1891 formatMenu.add(wrapMenuItem);
1892 formatMenu.add(scaleAbove);
1893 formatMenu.add(scaleLeft);
1894 formatMenu.add(scaleRight);
1895 formatMenu.add(seqLimits);
1896 formatMenu.add(idRightAlign);
1897 formatMenu.add(hiddenMarkers);
1898 formatMenu.add(viewBoxesMenuItem);
1899 formatMenu.add(viewTextMenuItem);
1900 formatMenu.add(colourTextMenuItem);
1901 formatMenu.add(renderGapsMenuItem);
1902 formatMenu.add(centreColumnLabelsMenuItem);
1903 formatMenu.add(showNonconservedMenuItem);
1904 selectMenu.add(findMenuItem);
1905 selectMenu.addSeparator();
1906 selectMenu.add(selectAllSequenceMenuItem);
1907 selectMenu.add(deselectAllSequenceMenuItem);
1908 selectMenu.add(invertSequenceMenuItem);
1909 selectMenu.add(invertColSel);
1910 selectMenu.add(createGroup);
1911 selectMenu.add(unGroup);
1912 selectMenu.add(grpsFromSelection);
1913 selectMenu.add(deleteGroups);
1914 selectMenu.add(annotationColumn);
1915 selectMenu.add(selectHighlighted);
1916 // TODO - determine if the listenToViewSelections button is needed : see bug
1918 // selectMenu.addSeparator();
1919 // selectMenu.add(listenToViewSelections);
1922 protected void loadVcf_actionPerformed()
1927 * Constructs the entries on the Colour menu (but does not add them to the
1930 protected void initColourMenu()
1932 applyToAllGroups = new JCheckBoxMenuItem(
1933 MessageManager.getString("label.apply_colour_to_all_groups"));
1934 applyToAllGroups.addActionListener(new ActionListener()
1937 public void actionPerformed(ActionEvent e)
1939 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1943 textColour = new JMenuItem(
1944 MessageManager.getString("label.text_colour"));
1945 textColour.addActionListener(new ActionListener()
1948 public void actionPerformed(ActionEvent e)
1950 textColour_actionPerformed();
1954 conservationMenuItem = new JCheckBoxMenuItem(
1955 MessageManager.getString("action.by_conservation"));
1956 conservationMenuItem.addActionListener(new ActionListener()
1959 public void actionPerformed(ActionEvent e)
1961 conservationMenuItem_actionPerformed(
1962 conservationMenuItem.isSelected());
1966 abovePIDThreshold = new JCheckBoxMenuItem(
1967 MessageManager.getString("label.above_identity_threshold"));
1968 abovePIDThreshold.addActionListener(new ActionListener()
1971 public void actionPerformed(ActionEvent e)
1973 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1976 modifyPID = new JMenuItem(
1977 MessageManager.getString("label.modify_identity_threshold"));
1978 modifyPID.addActionListener(new ActionListener()
1981 public void actionPerformed(ActionEvent e)
1983 modifyPID_actionPerformed();
1986 modifyConservation = new JMenuItem(MessageManager
1987 .getString("label.modify_conservation_threshold"));
1988 modifyConservation.addActionListener(new ActionListener()
1991 public void actionPerformed(ActionEvent e)
1993 modifyConservation_actionPerformed();
1997 annotationColour = new JRadioButtonMenuItem(
1998 MessageManager.getString("action.by_annotation"));
1999 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2000 annotationColour.addActionListener(new ActionListener()
2003 public void actionPerformed(ActionEvent e)
2005 annotationColour_actionPerformed();
2010 protected void selectHighlightedColumns_actionPerformed(
2011 ActionEvent actionEvent)
2013 // TODO Auto-generated method stub
2018 * Generate the reverse sequence (or reverse complement if the flag is true)
2019 * and add it to the alignment
2023 protected void showReverse_actionPerformed(boolean complement)
2028 * Try to run script in a Groovy console, having first ensured that this
2029 * alignframe is set as currentAlignFrame in Desktop
2031 protected void runGroovy_actionPerformed()
2037 * Adds the given action listener and key accelerator to the given menu item.
2038 * Also saves in a lookup table to support lookup of action by key stroke.
2042 * @param actionListener
2044 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2045 JMenuItem menuItem, ActionListener actionListener)
2047 menuItem.setAccelerator(keyStroke);
2048 accelerators.put(keyStroke, menuItem);
2049 menuItem.addActionListener(actionListener);
2053 * Action on clicking sort annotations by type.
2057 protected void sortAnnotations_actionPerformed()
2062 * Action on clicking Show all annotations.
2064 * @param forSequences
2065 * update sequence-related annotations
2066 * @param forAlignment
2067 * update non-sequence-related annotations
2069 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2070 boolean forAlignment)
2072 setAnnotationsVisibility(true, forSequences, forAlignment);
2076 * Action on clicking Hide all annotations.
2078 * @param forSequences
2079 * update sequence-related annotations
2080 * @param forAlignment
2081 * update non-sequence-related annotations
2083 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2084 boolean forAlignment)
2086 setAnnotationsVisibility(false, forSequences, forAlignment);
2090 * Set the visibility of annotations to true or false. Can act on
2091 * sequence-related annotations, or alignment-related, or both.
2094 * @param forSequences
2095 * update sequence-related annotations
2096 * @param forAlignment
2097 * update non-sequence-related annotations
2099 protected void setAnnotationsVisibility(boolean visible,
2100 boolean forSequences, boolean forAlignment)
2105 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2107 // TODO Auto-generated method stub
2111 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2113 // TODO Auto-generated method stub
2117 protected void showAllhidden_actionPerformed(ActionEvent e)
2119 // TODO Auto-generated method stub
2123 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2125 // TODO Auto-generated method stub
2129 protected void hideAllSelection_actionPerformed(ActionEvent e)
2131 // TODO Auto-generated method stub
2135 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2137 // TODO Auto-generated method stub
2141 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2143 // TODO Auto-generated method stub
2147 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2149 // TODO Auto-generated method stub
2153 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2155 // TODO Auto-generated method stub
2159 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2161 // TODO Auto-generated method stub
2165 protected void showGroupConservation_actionPerformed(ActionEvent e)
2167 // TODO Auto-generated method stub
2171 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2173 // TODO Auto-generated method stub
2177 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2179 // TODO Auto-generated method stub
2183 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2185 // TODO Auto-generated method stub
2189 protected void followHighlight_actionPerformed()
2191 // TODO Auto-generated method stub
2195 protected void showNpFeats_actionPerformed(ActionEvent e)
2197 // TODO Auto-generated method stub
2201 protected void showDbRefs_actionPerformed(ActionEvent e)
2203 // TODO Auto-generated method stub
2207 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2211 protected void buildSortByAnnotationScoresMenu()
2215 protected void extractScores_actionPerformed(ActionEvent e)
2219 protected void outputText_actionPerformed(String formatName)
2223 public void addFromFile_actionPerformed(ActionEvent e)
2228 public void addFromText_actionPerformed(ActionEvent e)
2233 public void addFromURL_actionPerformed(ActionEvent e)
2238 public void exportFeatures_actionPerformed(ActionEvent e)
2243 public void exportAnnotations_actionPerformed(ActionEvent e)
2248 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2252 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2257 protected void closeMenuItem_actionPerformed(boolean b)
2261 protected void redoMenuItem_actionPerformed(ActionEvent e)
2265 protected void undoMenuItem_actionPerformed(ActionEvent e)
2269 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2273 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2277 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2281 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2285 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2289 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2293 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2297 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2301 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2305 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2309 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2313 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2317 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2321 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2325 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2329 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2333 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2337 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2341 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2345 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2349 protected void conservationMenuItem_actionPerformed(boolean selected)
2353 protected void printMenuItem_actionPerformed(ActionEvent e)
2357 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2361 protected void findMenuItem_actionPerformed(ActionEvent e)
2365 protected void abovePIDThreshold_actionPerformed(boolean selected)
2369 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2373 protected void deleteGroups_actionPerformed(ActionEvent e)
2377 protected void createGroup_actionPerformed(ActionEvent e)
2381 protected void unGroup_actionPerformed(ActionEvent e)
2385 protected void copy_actionPerformed()
2389 protected void cut_actionPerformed()
2393 protected void delete_actionPerformed()
2397 protected void pasteNew_actionPerformed(ActionEvent e)
2401 protected void pasteThis_actionPerformed(ActionEvent e)
2405 protected void applyToAllGroups_actionPerformed(boolean selected)
2409 public void createPNG(java.io.File f)
2413 protected void font_actionPerformed(ActionEvent e)
2417 protected void seqLimit_actionPerformed(ActionEvent e)
2421 public void seqDBRef_actionPerformed(ActionEvent e)
2426 public void createEPS(java.io.File f)
2430 public void createSVG(java.io.File f)
2435 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2441 * Template method to handle the 'load T-Coffee scores' menu event.
2443 * Subclasses override this method to provide a custom action.
2448 protected void loadScores_actionPerformed(ActionEvent event)
2453 protected void jpred_actionPerformed(ActionEvent e)
2457 protected void scaleAbove_actionPerformed(ActionEvent e)
2461 protected void scaleLeft_actionPerformed(ActionEvent e)
2465 protected void scaleRight_actionPerformed(ActionEvent e)
2469 protected void modifyPID_actionPerformed()
2473 protected void modifyConservation_actionPerformed()
2477 protected void saveAs_actionPerformed()
2481 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2485 public void vamsasStore_actionPerformed(ActionEvent e)
2490 public void vamsasLoad_actionPerformed(ActionEvent e)
2495 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2500 public void featureSettings_actionPerformed(ActionEvent e)
2505 public void fetchSequence_actionPerformed()
2510 public void smoothFont_actionPerformed(ActionEvent e)
2515 public void annotationColour_actionPerformed()
2519 public void annotationColumn_actionPerformed(ActionEvent e)
2523 public void associatedData_actionPerformed(ActionEvent e)
2528 public void autoCalculate_actionPerformed(ActionEvent e)
2533 public void sortByTreeOption_actionPerformed(ActionEvent e)
2538 public void showAllSeqs_actionPerformed(ActionEvent e)
2543 public void showAllColumns_actionPerformed(ActionEvent e)
2548 public void hideSelSequences_actionPerformed(ActionEvent e)
2553 public void hideSelColumns_actionPerformed(ActionEvent e)
2558 public void hiddenMarkers_actionPerformed(ActionEvent e)
2563 public void findPdbId_actionPerformed(ActionEvent e)
2568 public void enterPdbId_actionPerformed(ActionEvent e)
2573 public void pdbFile_actionPerformed(ActionEvent e)
2578 public void invertColSel_actionPerformed(ActionEvent e)
2583 public void tabSelectionChanged(int sel)
2588 public void tabbedPane_mousePressed(MouseEvent e)
2593 public void tabbedPane_focusGained(FocusEvent e)
2598 public void save_actionPerformed(ActionEvent e)
2603 public void reload_actionPerformed(ActionEvent e)
2608 public void newView_actionPerformed(ActionEvent e)
2613 public void textColour_actionPerformed()
2618 public void idRightAlign_actionPerformed(ActionEvent e)
2623 public void expandViews_actionPerformed(ActionEvent e)
2628 public void gatherViews_actionPerformed(ActionEvent e)
2633 public void buildTreeSortMenu()
2638 public void pageSetup_actionPerformed(ActionEvent e)
2643 public void alignmentProperties()
2648 protected void expand_newalign(ActionEvent e)
2650 // TODO Auto-generated method stub
2654 protected boolean isShowAutoCalculatedAbove()
2656 return showAutoCalculatedAbove;
2659 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2661 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2664 protected SequenceAnnotationOrder getAnnotationSortOrder()
2666 return annotationSortOrder;
2669 protected void setAnnotationSortOrder(
2670 SequenceAnnotationOrder annotationSortOrder)
2672 this.annotationSortOrder = annotationSortOrder;
2675 public Map<KeyStroke, JMenuItem> getAccelerators()
2677 return this.accelerators;
2681 * Returns the selected index of the tabbed pane, or -1 if none selected
2682 * (including the case where the tabbed pane has not been made visible).
2686 public int getTabIndex()
2688 return tabbedPane.getSelectedIndex();
2691 public JPanel getStatusPanel()
2697 * Sets a reference to the containing split frame. Also makes the 'toggle
2698 * split view' menu item visible and checked.
2702 public void setSplitFrame(SplitContainerI sf)
2704 this.splitFrame = sf;
2707 this.showComplementMenuItem.setVisible(true);
2708 this.showComplementMenuItem.setState(true);
2712 public SplitContainerI getSplitViewContainer()
2714 return this.splitFrame;
2717 protected void showComplement_actionPerformed(boolean complement)