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 public class GAlignFrame extends JInternalFrame
66 protected JMenuBar alignFrameMenuBar = new JMenuBar();
68 protected JMenuItem closeMenuItem = new JMenuItem();
70 protected JMenu webService = new JMenu();
72 protected JMenuItem webServiceNoServices;
74 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
76 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
78 protected JMenu sortByAnnotScore = new JMenu();
80 protected JLabel statusBar = new JLabel();
82 protected JMenu outputTextboxMenu = new JMenu();
84 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
86 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
88 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
90 protected JMenuItem undoMenuItem = new JMenuItem();
92 protected JMenuItem redoMenuItem = new JMenuItem();
94 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
96 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
98 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
100 JMenuItem copy = new JMenuItem();
102 JMenuItem cut = new JMenuItem();
104 JMenu pasteMenu = new JMenu();
106 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
108 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
110 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
112 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
114 protected JCheckBoxMenuItem applyToAllGroups;
116 protected JMenu colourMenu = new JMenu();
118 protected JMenuItem textColour;
120 protected JCheckBoxMenuItem conservationMenuItem;
122 protected JMenuItem modifyConservation;
124 protected JCheckBoxMenuItem abovePIDThreshold;
126 protected JMenuItem modifyPID;
128 protected JRadioButtonMenuItem annotationColour;
130 protected JMenu sortByTreeMenu = new JMenu();
132 protected JMenu sort = new JMenu();
134 protected JMenuItem calculateTree = new JMenuItem();
136 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
138 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
140 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
142 protected JMenu showTranslation = new JMenu();
144 protected JMenuItem showReverse = new JMenuItem();
146 protected JMenuItem showReverseComplement = new JMenuItem();
148 protected JMenu showProducts = new JMenu();
150 protected JMenuItem runGroovy = new JMenuItem();
152 protected JMenuItem loadVcf;
154 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
156 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
158 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
160 protected JPanel statusPanel = new JPanel();
162 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
164 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
166 protected JMenuItem showAllAlAnnotations = new JMenuItem();
168 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
170 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
172 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
174 protected JTabbedPane tabbedPane = new JTabbedPane();
176 protected JMenuItem reload = new JMenuItem();
178 protected JMenu formatMenu = new JMenu();
180 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
182 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
184 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
186 protected JMenuItem gatherViews = new JMenuItem();
188 protected JMenuItem expandViews = new JMenuItem();
190 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
192 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
194 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
196 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
198 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
200 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
202 private SequenceAnnotationOrder annotationSortOrder;
204 private boolean showAutoCalculatedAbove = false;
206 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
208 private SplitContainerI splitFrame;
210 protected JMenu autoAnnMenu;
212 protected JRadioButtonMenuItem showAutoFirst;
214 protected JRadioButtonMenuItem showAutoLast;
221 setJMenuBar(alignFrameMenuBar);
223 // dynamically fill save as menu with available formats
224 for (String ff : FileFormats.getInstance().getWritableFormats(true))
226 JMenuItem item = new JMenuItem(ff);
228 item.addActionListener(new ActionListener()
231 public void actionPerformed(ActionEvent e)
233 outputText_actionPerformed(e);
237 outputTextboxMenu.add(item);
239 } catch (Exception e)
241 System.err.println(e.toString());
244 if (!Platform.isAMac())
246 closeMenuItem.setMnemonic('C');
247 outputTextboxMenu.setMnemonic('T');
248 undoMenuItem.setMnemonic('Z');
249 redoMenuItem.setMnemonic('0');
250 copy.setMnemonic('C');
251 cut.setMnemonic('U');
252 pasteMenu.setMnemonic('P');
253 reload.setMnemonic('R');
257 private void jbInit() throws Exception
261 JMenuItem saveAs = new JMenuItem(
262 MessageManager.getString("action.save_as"));
263 ActionListener al = new ActionListener()
266 public void actionPerformed(ActionEvent e)
268 saveAs_actionPerformed(e);
272 // FIXME getDefaultToolkit throws an exception in Headless mode
273 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
274 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
275 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
277 addMenuActionAndAccelerator(keyStroke, saveAs, al);
279 closeMenuItem.setText(MessageManager.getString("action.close"));
280 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
281 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
282 al = new ActionListener()
285 public void actionPerformed(ActionEvent e)
287 closeMenuItem_actionPerformed(false);
290 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
292 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
293 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
294 JMenu annotationsMenu = new JMenu(
295 MessageManager.getString("action.annotations"));
296 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
297 colourMenu.setText(MessageManager.getString("action.colour"));
298 JMenu calculateMenu = new JMenu(
299 MessageManager.getString("action.calculate"));
300 webService.setText(MessageManager.getString("action.web_service"));
301 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
302 MessageManager.getString("action.select_all"));
303 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
304 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
305 al = new ActionListener()
308 public void actionPerformed(ActionEvent e)
310 selectAllSequenceMenuItem_actionPerformed(e);
313 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
315 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
316 MessageManager.getString("action.deselect_all"));
317 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
318 al = new ActionListener()
321 public void actionPerformed(ActionEvent e)
323 deselectAllSequenceMenuItem_actionPerformed(e);
326 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
328 JMenuItem invertSequenceMenuItem = new JMenuItem(
329 MessageManager.getString("action.invert_sequence_selection"));
330 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
331 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
332 al = new ActionListener()
335 public void actionPerformed(ActionEvent e)
337 invertSequenceMenuItem_actionPerformed(e);
340 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
342 JMenuItem grpsFromSelection = new JMenuItem(
343 MessageManager.getString("action.make_groups_selection"));
344 grpsFromSelection.addActionListener(new ActionListener()
347 public void actionPerformed(ActionEvent e)
349 makeGrpsFromSelection_actionPerformed(e);
352 JMenuItem expandAlignment = new JMenuItem(
353 MessageManager.getString("action.view_flanking_regions"));
354 expandAlignment.setToolTipText(
355 MessageManager.getString("label.view_flanking_regions"));
356 expandAlignment.addActionListener(new ActionListener()
359 public void actionPerformed(ActionEvent e)
364 JMenuItem remove2LeftMenuItem = new JMenuItem(
365 MessageManager.getString("action.remove_left"));
366 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
367 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
368 al = new ActionListener()
371 public void actionPerformed(ActionEvent e)
373 remove2LeftMenuItem_actionPerformed(e);
376 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
378 JMenuItem remove2RightMenuItem = new JMenuItem(
379 MessageManager.getString("action.remove_right"));
380 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
381 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
382 al = new ActionListener()
385 public void actionPerformed(ActionEvent e)
387 remove2RightMenuItem_actionPerformed(e);
390 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
392 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
393 MessageManager.getString("action.remove_empty_columns"));
394 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
395 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
396 al = new ActionListener()
399 public void actionPerformed(ActionEvent e)
401 removeGappedColumnMenuItem_actionPerformed(e);
404 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
406 JMenuItem removeAllGapsMenuItem = new JMenuItem(
407 MessageManager.getString("action.remove_all_gaps"));
408 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
409 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
410 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
412 al = new ActionListener()
415 public void actionPerformed(ActionEvent e)
417 removeAllGapsMenuItem_actionPerformed(e);
420 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
422 JMenuItem justifyLeftMenuItem = new JMenuItem(
423 MessageManager.getString("action.left_justify_alignment"));
424 justifyLeftMenuItem.addActionListener(new ActionListener()
427 public void actionPerformed(ActionEvent e)
429 justifyLeftMenuItem_actionPerformed(e);
432 JMenuItem justifyRightMenuItem = new JMenuItem(
433 MessageManager.getString("action.right_justify_alignment"));
434 justifyRightMenuItem.addActionListener(new ActionListener()
437 public void actionPerformed(ActionEvent e)
439 justifyRightMenuItem_actionPerformed(e);
442 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
443 viewBoxesMenuItem.setState(true);
444 viewBoxesMenuItem.addActionListener(new ActionListener()
447 public void actionPerformed(ActionEvent e)
449 viewBoxesMenuItem_actionPerformed(e);
452 viewTextMenuItem.setText(MessageManager.getString("action.text"));
453 viewTextMenuItem.setState(true);
454 viewTextMenuItem.addActionListener(new ActionListener()
457 public void actionPerformed(ActionEvent e)
459 viewTextMenuItem_actionPerformed(e);
462 showNonconservedMenuItem
463 .setText(MessageManager.getString("label.show_non_conserved"));
464 showNonconservedMenuItem.setState(false);
465 showNonconservedMenuItem.addActionListener(new ActionListener()
468 public void actionPerformed(ActionEvent e)
470 showUnconservedMenuItem_actionPerformed(e);
473 JMenuItem sortPairwiseMenuItem = new JMenuItem(
474 MessageManager.getString("action.by_pairwise_id"));
475 sortPairwiseMenuItem.addActionListener(new ActionListener()
478 public void actionPerformed(ActionEvent e)
480 sortPairwiseMenuItem_actionPerformed(e);
483 JMenuItem sortIDMenuItem = new JMenuItem(
484 MessageManager.getString("action.by_id"));
485 sortIDMenuItem.addActionListener(new ActionListener()
488 public void actionPerformed(ActionEvent e)
490 sortIDMenuItem_actionPerformed(e);
493 JMenuItem sortLengthMenuItem = new JMenuItem(
494 MessageManager.getString("action.by_length"));
495 sortLengthMenuItem.addActionListener(new ActionListener()
498 public void actionPerformed(ActionEvent e)
500 sortLengthMenuItem_actionPerformed(e);
503 JMenuItem sortGroupMenuItem = new JMenuItem(
504 MessageManager.getString("action.by_group"));
505 sortGroupMenuItem.addActionListener(new ActionListener()
508 public void actionPerformed(ActionEvent e)
510 sortGroupMenuItem_actionPerformed(e);
514 JMenuItem removeRedundancyMenuItem = new JMenuItem(
515 MessageManager.getString("action.remove_redundancy"));
516 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
517 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
518 al = new ActionListener()
521 public void actionPerformed(ActionEvent e)
523 removeRedundancyMenuItem_actionPerformed(e);
526 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
528 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
529 MessageManager.getString("action.pairwise_alignment"));
530 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
533 public void actionPerformed(ActionEvent e)
535 pairwiseAlignmentMenuItem_actionPerformed(e);
539 this.getContentPane().setLayout(new BorderLayout());
540 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
541 statusBar.setBackground(Color.white);
542 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
543 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
544 statusBar.setText(MessageManager.getString("label.status_bar"));
546 .setText(MessageManager.getString("label.out_to_textbox"));
548 annotationPanelMenuItem.setActionCommand("");
549 annotationPanelMenuItem
550 .setText(MessageManager.getString("label.show_annotations"));
551 annotationPanelMenuItem
552 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
553 annotationPanelMenuItem.addActionListener(new ActionListener()
556 public void actionPerformed(ActionEvent e)
558 annotationPanelMenuItem_actionPerformed(e);
561 showAllAlAnnotations.setText(
562 MessageManager.getString("label.show_all_al_annotations"));
563 final boolean isAnnotationPanelShown = annotationPanelMenuItem
565 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
566 showAllAlAnnotations.addActionListener(new ActionListener()
569 public void actionPerformed(ActionEvent e)
571 showAllAnnotations_actionPerformed(false, true);
574 hideAllAlAnnotations.setText(
575 MessageManager.getString("label.hide_all_al_annotations"));
576 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
577 hideAllAlAnnotations.addActionListener(new ActionListener()
580 public void actionPerformed(ActionEvent e)
582 hideAllAnnotations_actionPerformed(false, true);
585 showAllSeqAnnotations.setText(
586 MessageManager.getString("label.show_all_seq_annotations"));
587 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
588 showAllSeqAnnotations.addActionListener(new ActionListener()
591 public void actionPerformed(ActionEvent e)
593 showAllAnnotations_actionPerformed(true, false);
596 hideAllSeqAnnotations.setText(
597 MessageManager.getString("label.hide_all_seq_annotations"));
598 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
599 hideAllSeqAnnotations.addActionListener(new ActionListener()
602 public void actionPerformed(ActionEvent e)
604 hideAllAnnotations_actionPerformed(true, false);
607 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
608 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
609 SequenceAnnotationOrder.NONE.name()));
610 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
611 MessageManager.getString("label.sort_annotations_by_sequence"));
612 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
613 MessageManager.getString("label.sort_annotations_by_label"));
615 sortAnnBySequence.setSelected(
616 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
617 sortAnnBySequence.addActionListener(new ActionListener()
620 public void actionPerformed(ActionEvent e)
622 boolean newState = sortAnnBySequence.getState();
623 sortAnnByLabel.setSelected(false);
624 setAnnotationSortOrder(
625 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
626 : SequenceAnnotationOrder.NONE);
627 sortAnnotations_actionPerformed();
630 sortAnnByLabel.setSelected(
631 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
632 sortAnnByLabel.addActionListener(new ActionListener()
635 public void actionPerformed(ActionEvent e)
637 boolean newState = sortAnnByLabel.getState();
638 sortAnnBySequence.setSelected(false);
639 setAnnotationSortOrder(
640 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
641 : SequenceAnnotationOrder.NONE);
642 sortAnnotations_actionPerformed();
645 colourTextMenuItem = new JCheckBoxMenuItem(
646 MessageManager.getString("label.colour_text"));
647 colourTextMenuItem.addActionListener(new ActionListener()
650 public void actionPerformed(ActionEvent e)
652 colourTextMenuItem_actionPerformed(e);
656 JMenuItem htmlMenuItem = new JMenuItem(
657 MessageManager.getString("label.html"));
658 htmlMenuItem.addActionListener(new ActionListener()
661 public void actionPerformed(ActionEvent e)
663 htmlMenuItem_actionPerformed(e);
667 JMenuItem createBioJS = new JMenuItem(
668 MessageManager.getString("label.biojs_html_export"));
669 createBioJS.addActionListener(new java.awt.event.ActionListener()
672 public void actionPerformed(ActionEvent e)
674 bioJSMenuItem_actionPerformed(e);
678 JMenuItem overviewMenuItem = new JMenuItem(
679 MessageManager.getString("label.overview_window"));
680 overviewMenuItem.addActionListener(new ActionListener()
683 public void actionPerformed(ActionEvent e)
685 overviewMenuItem_actionPerformed(e);
689 undoMenuItem.setEnabled(false);
690 undoMenuItem.setText(MessageManager.getString("action.undo"));
691 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
692 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
693 al = new ActionListener()
696 public void actionPerformed(ActionEvent e)
698 undoMenuItem_actionPerformed(e);
701 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
703 redoMenuItem.setEnabled(false);
704 redoMenuItem.setText(MessageManager.getString("action.redo"));
705 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
706 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
707 al = new ActionListener()
710 public void actionPerformed(ActionEvent e)
712 redoMenuItem_actionPerformed(e);
715 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
717 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
718 wrapMenuItem.addActionListener(new ActionListener()
721 public void actionPerformed(ActionEvent e)
723 wrapMenuItem_actionPerformed(e);
727 JMenuItem printMenuItem = new JMenuItem(
728 MessageManager.getString("action.print"));
729 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
730 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
731 al = new ActionListener()
734 public void actionPerformed(ActionEvent e)
736 printMenuItem_actionPerformed(e);
739 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
742 .setText(MessageManager.getString("action.show_gaps"));
743 renderGapsMenuItem.setState(true);
744 renderGapsMenuItem.addActionListener(new ActionListener()
747 public void actionPerformed(ActionEvent e)
749 renderGapsMenuItem_actionPerformed(e);
753 JMenuItem findMenuItem = new JMenuItem(
754 MessageManager.getString("action.find"));
755 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
756 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
757 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
758 MessageManager.getString("label.find_tip")));
759 al = new ActionListener()
762 public void actionPerformed(ActionEvent e)
764 findMenuItem_actionPerformed(e);
767 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
769 showSeqFeatures.setText(
770 MessageManager.getString("label.show_sequence_features"));
771 showSeqFeatures.addActionListener(new ActionListener()
774 public void actionPerformed(ActionEvent actionEvent)
776 showSeqFeatures_actionPerformed(actionEvent);
780 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
781 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
782 * void actionPerformed(ActionEvent actionEvent) {
783 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
786 .setText(MessageManager.getString("label.show_database_refs"));
787 showDbRefsMenuitem.addActionListener(new ActionListener()
791 public void actionPerformed(ActionEvent e)
793 showDbRefs_actionPerformed(e);
797 showNpFeatsMenuitem.setText(
798 MessageManager.getString("label.show_non_positional_features"));
799 showNpFeatsMenuitem.addActionListener(new ActionListener()
803 public void actionPerformed(ActionEvent e)
805 showNpFeats_actionPerformed(e);
809 showGroupConservation
810 .setText(MessageManager.getString("label.group_conservation"));
811 showGroupConservation.addActionListener(new ActionListener()
815 public void actionPerformed(ActionEvent e)
817 showGroupConservation_actionPerformed(e);
823 .setText(MessageManager.getString("label.group_consensus"));
824 showGroupConsensus.addActionListener(new ActionListener()
828 public void actionPerformed(ActionEvent e)
830 showGroupConsensus_actionPerformed(e);
834 showConsensusHistogram.setText(
835 MessageManager.getString("label.show_consensus_histogram"));
836 showConsensusHistogram.addActionListener(new ActionListener()
840 public void actionPerformed(ActionEvent e)
842 showConsensusHistogram_actionPerformed(e);
847 .setText(MessageManager.getString("label.show_consensus_logo"));
848 showSequenceLogo.addActionListener(new ActionListener()
852 public void actionPerformed(ActionEvent e)
854 showSequenceLogo_actionPerformed(e);
858 normaliseSequenceLogo
859 .setText(MessageManager.getString("label.norm_consensus_logo"));
860 normaliseSequenceLogo.addActionListener(new ActionListener()
864 public void actionPerformed(ActionEvent e)
866 normaliseSequenceLogo_actionPerformed(e);
870 applyAutoAnnotationSettings
871 .setText(MessageManager.getString("label.apply_all_groups"));
872 applyAutoAnnotationSettings.setState(false);
873 applyAutoAnnotationSettings.setVisible(true);
874 applyAutoAnnotationSettings.addActionListener(new ActionListener()
877 public void actionPerformed(ActionEvent e)
879 applyAutoAnnotationSettings_actionPerformed(e);
883 ButtonGroup buttonGroup = new ButtonGroup();
884 showAutoFirst = new JRadioButtonMenuItem(
885 MessageManager.getString("label.show_first"));
886 showAutoLast = new JRadioButtonMenuItem(
887 MessageManager.getString("label.show_last"));
888 buttonGroup.add(showAutoFirst);
889 buttonGroup.add(showAutoLast);
890 final boolean autoFirst = Cache
891 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
892 showAutoFirst.setSelected(autoFirst);
893 setShowAutoCalculatedAbove(autoFirst);
894 showAutoFirst.addActionListener(new ActionListener()
897 public void actionPerformed(ActionEvent e)
899 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
900 sortAnnotations_actionPerformed();
903 showAutoLast.setSelected(!showAutoFirst.isSelected());
904 showAutoLast.addActionListener(new ActionListener()
907 public void actionPerformed(ActionEvent e)
909 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
910 sortAnnotations_actionPerformed();
914 JMenuItem deleteGroups = new JMenuItem(
915 MessageManager.getString("action.undefine_groups"));
916 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
917 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
918 al = new ActionListener()
921 public void actionPerformed(ActionEvent e)
923 deleteGroups_actionPerformed(e);
926 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
928 JMenuItem annotationColumn = new JMenuItem(
929 MessageManager.getString("action.select_by_annotation"));
930 annotationColumn.addActionListener(new ActionListener()
933 public void actionPerformed(ActionEvent e)
935 annotationColumn_actionPerformed(e);
939 JMenuItem createGroup = new JMenuItem(
940 MessageManager.getString("action.create_group"));
941 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
942 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
943 al = new ActionListener()
946 public void actionPerformed(ActionEvent e)
948 createGroup_actionPerformed(e);
951 addMenuActionAndAccelerator(keyStroke, createGroup, al);
953 JMenuItem unGroup = new JMenuItem(
954 MessageManager.getString("action.remove_group"));
955 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
956 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
957 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
959 al = new ActionListener()
962 public void actionPerformed(ActionEvent e)
964 unGroup_actionPerformed(e);
967 addMenuActionAndAccelerator(keyStroke, unGroup, al);
969 copy.setText(MessageManager.getString("action.copy"));
970 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
971 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
973 al = new ActionListener()
976 public void actionPerformed(ActionEvent e)
978 copy_actionPerformed(e);
981 addMenuActionAndAccelerator(keyStroke, copy, al);
983 cut.setText(MessageManager.getString("action.cut"));
984 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
985 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
986 al = new ActionListener()
989 public void actionPerformed(ActionEvent e)
991 cut_actionPerformed(e);
994 addMenuActionAndAccelerator(keyStroke, cut, al);
996 JMenuItem delete = new JMenuItem(
997 MessageManager.getString("action.delete"));
998 delete.addActionListener(new ActionListener()
1001 public void actionPerformed(ActionEvent e)
1003 delete_actionPerformed(e);
1007 pasteMenu.setText(MessageManager.getString("action.paste"));
1008 JMenuItem pasteNew = new JMenuItem(
1009 MessageManager.getString("label.to_new_alignment"));
1010 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1011 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1012 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1014 al = new ActionListener()
1017 public void actionPerformed(ActionEvent e)
1019 pasteNew_actionPerformed(e);
1022 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1024 JMenuItem pasteThis = new JMenuItem(
1025 MessageManager.getString("label.to_this_alignment"));
1026 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1027 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1028 al = new ActionListener()
1031 public void actionPerformed(ActionEvent e)
1033 pasteThis_actionPerformed(e);
1036 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1038 JMenuItem createPNG = new JMenuItem("PNG");
1039 createPNG.addActionListener(new ActionListener()
1042 public void actionPerformed(ActionEvent e)
1047 createPNG.setActionCommand(
1048 MessageManager.getString("label.save_png_image"));
1050 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1051 font.addActionListener(new ActionListener()
1054 public void actionPerformed(ActionEvent e)
1056 font_actionPerformed(e);
1060 MessageManager.getString("label.show_sequence_limits"));
1061 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1062 seqLimits.addActionListener(new ActionListener()
1065 public void actionPerformed(ActionEvent e)
1067 seqLimit_actionPerformed(e);
1070 JMenuItem epsFile = new JMenuItem("EPS");
1071 epsFile.addActionListener(new ActionListener()
1074 public void actionPerformed(ActionEvent e)
1080 JMenuItem createSVG = new JMenuItem("SVG");
1081 createSVG.addActionListener(new ActionListener()
1084 public void actionPerformed(ActionEvent e)
1090 JMenuItem loadTreeMenuItem = new JMenuItem(
1091 MessageManager.getString("label.load_associated_tree"));
1092 loadTreeMenuItem.setActionCommand(
1093 MessageManager.getString("label.load_tree_for_sequence_set"));
1094 loadTreeMenuItem.addActionListener(new ActionListener()
1097 public void actionPerformed(ActionEvent e)
1099 loadTreeMenuItem_actionPerformed(e);
1103 scaleAbove.setVisible(false);
1104 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1105 scaleAbove.addActionListener(new ActionListener()
1108 public void actionPerformed(ActionEvent e)
1110 scaleAbove_actionPerformed(e);
1113 scaleLeft.setVisible(false);
1114 scaleLeft.setSelected(true);
1115 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1116 scaleLeft.addActionListener(new ActionListener()
1119 public void actionPerformed(ActionEvent e)
1121 scaleLeft_actionPerformed(e);
1124 scaleRight.setVisible(false);
1125 scaleRight.setSelected(true);
1126 scaleRight.setText(MessageManager.getString("action.scale_right"));
1127 scaleRight.addActionListener(new ActionListener()
1130 public void actionPerformed(ActionEvent e)
1132 scaleRight_actionPerformed(e);
1135 centreColumnLabelsMenuItem.setVisible(true);
1136 centreColumnLabelsMenuItem.setState(false);
1137 centreColumnLabelsMenuItem.setText(
1138 MessageManager.getString("label.centre_column_labels"));
1139 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1142 public void actionPerformed(ActionEvent e)
1144 centreColumnLabels_actionPerformed(e);
1147 followHighlightMenuItem.setVisible(true);
1148 followHighlightMenuItem.setState(true);
1149 followHighlightMenuItem
1150 .setText(MessageManager.getString("label.automatic_scrolling"));
1151 followHighlightMenuItem.addActionListener(new ActionListener()
1155 public void actionPerformed(ActionEvent e)
1157 followHighlight_actionPerformed();
1163 .setText(MessageManager.getString("action.by_tree_order"));
1164 sort.setText(MessageManager.getString("action.sort"));
1165 sort.addMenuListener(new MenuListener()
1168 public void menuSelected(MenuEvent e)
1170 buildTreeSortMenu();
1174 public void menuDeselected(MenuEvent e)
1179 public void menuCanceled(MenuEvent e)
1184 .setText(MessageManager.getString("label.sort_by_score"));
1185 sort.add(sortByAnnotScore);
1186 sort.addMenuListener(new javax.swing.event.MenuListener()
1190 public void menuCanceled(MenuEvent e)
1195 public void menuDeselected(MenuEvent e)
1200 public void menuSelected(MenuEvent e)
1202 buildSortByAnnotationScoresMenu();
1205 sortByAnnotScore.setVisible(false);
1208 .setText(MessageManager.getString("action.calculate_tree_pca"));
1210 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1212 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1213 padGapsMenuitem.addActionListener(new ActionListener()
1216 public void actionPerformed(ActionEvent e)
1218 padGapsMenuitem_actionPerformed(e);
1221 JMenuItem vamsasStore = new JMenuItem(
1222 MessageManager.getString("label.vamsas_store"));
1223 vamsasStore.setVisible(false);
1224 vamsasStore.addActionListener(new ActionListener()
1227 public void actionPerformed(ActionEvent e)
1229 vamsasStore_actionPerformed(e);
1234 * Translate as cDNA with sub-menu of translation tables
1236 showTranslation.setText(MessageManager
1237 .getString("label.translate_cDNA"));
1238 boolean first = true;
1239 for (final GeneticCodeI table : GeneticCodes.getInstance()
1242 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1243 showTranslation.add(item);
1244 item.addActionListener(new ActionListener()
1247 public void actionPerformed(ActionEvent e)
1249 showTranslation_actionPerformed(table);
1254 showTranslation.addSeparator();
1259 showReverse.setText(MessageManager.getString("label.reverse"));
1260 showReverse.addActionListener(new ActionListener()
1263 public void actionPerformed(ActionEvent e)
1265 showReverse_actionPerformed(false);
1268 showReverseComplement
1269 .setText(MessageManager.getString("label.reverse_complement"));
1270 showReverseComplement.addActionListener(new ActionListener()
1273 public void actionPerformed(ActionEvent e)
1275 showReverse_actionPerformed(true);
1279 JMenuItem extractScores = new JMenuItem(
1280 MessageManager.getString("label.extract_scores"));
1281 extractScores.addActionListener(new ActionListener()
1284 public void actionPerformed(ActionEvent e)
1286 extractScores_actionPerformed(e);
1289 extractScores.setVisible(true);
1290 // JBPNote: TODO: make gui for regex based score extraction
1292 // for show products actions see AlignFrame.canShowProducts
1293 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1295 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1296 runGroovy.setToolTipText(
1297 MessageManager.getString("label.run_groovy_tip"));
1298 runGroovy.addActionListener(new ActionListener()
1301 public void actionPerformed(ActionEvent e)
1303 runGroovy_actionPerformed();
1307 JMenuItem openFeatureSettings = new JMenuItem(
1308 MessageManager.getString("action.feature_settings"));
1309 openFeatureSettings.addActionListener(new ActionListener()
1312 public void actionPerformed(ActionEvent e)
1314 featureSettings_actionPerformed(e);
1317 JMenuItem fetchSequence = new JMenuItem(
1318 MessageManager.getString("label.fetch_sequences"));
1319 fetchSequence.addActionListener(new ActionListener()
1322 public void actionPerformed(ActionEvent e)
1324 fetchSequence_actionPerformed(e);
1328 JMenuItem associatedData = new JMenuItem(
1329 MessageManager.getString("label.load_features_annotations"));
1330 associatedData.addActionListener(new ActionListener()
1333 public void actionPerformed(ActionEvent e)
1335 associatedData_actionPerformed(e);
1338 loadVcf = new JMenuItem(MessageManager.getString("label.load_vcf_file"));
1339 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1340 loadVcf.addActionListener(new ActionListener()
1343 public void actionPerformed(ActionEvent e)
1345 loadVcf_actionPerformed();
1348 autoCalculate.setText(
1349 MessageManager.getString("label.autocalculate_consensus"));
1350 autoCalculate.setState(
1351 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1352 autoCalculate.addActionListener(new ActionListener()
1355 public void actionPerformed(ActionEvent e)
1357 autoCalculate_actionPerformed(e);
1361 MessageManager.getString("label.sort_alignment_new_tree"));
1362 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1363 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1365 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1366 sortByTree.addActionListener(new ActionListener()
1369 public void actionPerformed(ActionEvent e)
1371 sortByTreeOption_actionPerformed(e);
1375 listenToViewSelections.setText(
1376 MessageManager.getString("label.listen_for_selections"));
1377 listenToViewSelections
1378 .setToolTipText("<html>" + MessageManager.getString(
1379 "label.selections_mirror_selections_made_same_sequences_other_views"));
1380 listenToViewSelections.setState(false);
1381 listenToViewSelections.addActionListener(new ActionListener()
1384 public void actionPerformed(ActionEvent e)
1386 listenToViewSelections_actionPerformed(e);
1390 JMenu addSequenceMenu = new JMenu(
1391 MessageManager.getString("label.add_sequences"));
1392 JMenuItem addFromFile = new JMenuItem(
1393 MessageManager.getString("label.from_file"));
1394 addFromFile.addActionListener(new ActionListener()
1397 public void actionPerformed(ActionEvent e)
1399 addFromFile_actionPerformed(e);
1402 JMenuItem addFromText = new JMenuItem(
1403 MessageManager.getString("label.from_textbox"));
1404 addFromText.addActionListener(new ActionListener()
1407 public void actionPerformed(ActionEvent e)
1409 addFromText_actionPerformed(e);
1412 JMenuItem addFromURL = new JMenuItem(
1413 MessageManager.getString("label.from_url"));
1414 addFromURL.addActionListener(new ActionListener()
1417 public void actionPerformed(ActionEvent e)
1419 addFromURL_actionPerformed(e);
1422 JMenuItem exportFeatures = new JMenuItem(
1423 MessageManager.getString("label.export_features"));
1424 exportFeatures.addActionListener(new ActionListener()
1427 public void actionPerformed(ActionEvent e)
1429 exportFeatures_actionPerformed(e);
1432 JMenuItem exportAnnotations = new JMenuItem(
1433 MessageManager.getString("label.export_annotations"));
1434 exportAnnotations.addActionListener(new ActionListener()
1437 public void actionPerformed(ActionEvent e)
1439 exportAnnotations_actionPerformed(e);
1442 statusPanel.setLayout(new GridLayout());
1443 JMenuItem showAllSeqs = new JMenuItem(
1444 MessageManager.getString("label.all_sequences"));
1445 showAllSeqs.setToolTipText(
1446 MessageManager.getString("label.toggle_sequence_visibility"));
1447 showAllSeqs.addActionListener(new ActionListener()
1450 public void actionPerformed(ActionEvent e)
1452 showAllSeqs_actionPerformed(e);
1455 JMenuItem showAllColumns = new JMenuItem(
1456 MessageManager.getString("label.all_columns"));
1457 showAllColumns.setToolTipText(
1458 MessageManager.getString("label.toggle_columns_visibility"));
1459 showAllColumns.addActionListener(new ActionListener()
1462 public void actionPerformed(ActionEvent e)
1464 showAllColumns_actionPerformed(e);
1467 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1468 JMenuItem hideSelSequences = new JMenuItem(
1469 MessageManager.getString("label.selected_sequences"));
1470 hideSelSequences.setToolTipText(
1471 MessageManager.getString("label.toggle_sequence_visibility"));
1472 hideSelSequences.addActionListener(new ActionListener()
1475 public void actionPerformed(ActionEvent e)
1477 hideSelSequences_actionPerformed(e);
1480 JMenuItem hideSelColumns = new JMenuItem(
1481 MessageManager.getString("label.selected_columns"));
1482 hideSelColumns.setToolTipText(
1483 MessageManager.getString("label.toggle_columns_visibility"));
1484 hideSelColumns.addActionListener(new ActionListener()
1487 public void actionPerformed(ActionEvent e)
1489 hideSelColumns_actionPerformed(e);
1492 JMenuItem hideAllSelection = new JMenuItem(
1493 MessageManager.getString("label.selected_region"));
1494 hideAllSelection.addActionListener(new ActionListener()
1497 public void actionPerformed(ActionEvent e)
1499 hideAllSelection_actionPerformed(e);
1502 // TODO: should be hidden if no selection exists.
1503 JMenuItem hideAllButSelection = new JMenuItem(
1504 MessageManager.getString("label.all_but_selected_region"));
1505 hideAllButSelection.addActionListener(new ActionListener()
1508 public void actionPerformed(ActionEvent e)
1510 hideAllButSelection_actionPerformed(e);
1513 JMenuItem showAllhidden = new JMenuItem(
1514 MessageManager.getString("label.all_sequences_columns"));
1515 showAllhidden.setToolTipText(MessageManager
1516 .getString("label.toggles_visibility_hidden_selected_regions"));
1517 showAllhidden.addActionListener(new ActionListener()
1520 public void actionPerformed(ActionEvent e)
1522 showAllhidden_actionPerformed(e);
1525 hiddenMarkers.setText(
1526 MessageManager.getString("action.show_hidden_markers"));
1527 hiddenMarkers.addActionListener(new ActionListener()
1530 public void actionPerformed(ActionEvent e)
1532 hiddenMarkers_actionPerformed(e);
1536 JMenuItem invertColSel = new JMenuItem(
1537 MessageManager.getString("action.invert_column_selection"));
1538 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1539 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1540 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1542 al = new ActionListener()
1545 public void actionPerformed(ActionEvent e)
1547 invertColSel_actionPerformed(e);
1550 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1552 showComplementMenuItem.setVisible(false);
1553 showComplementMenuItem.addActionListener(new ActionListener()
1556 public void actionPerformed(ActionEvent e)
1558 showComplement_actionPerformed(showComplementMenuItem.getState());
1562 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1565 public void stateChanged(ChangeEvent evt)
1567 JTabbedPane pane = (JTabbedPane) evt.getSource();
1568 int sel = pane.getSelectedIndex();
1569 tabSelectionChanged(sel);
1572 tabbedPane.addMouseListener(new MouseAdapter()
1575 public void mousePressed(MouseEvent e)
1577 if (e.isPopupTrigger()) // Mac
1579 tabbedPane_mousePressed(e);
1584 public void mouseReleased(MouseEvent e)
1586 if (e.isPopupTrigger()) // Windows
1588 tabbedPane_mousePressed(e);
1592 tabbedPane.addFocusListener(new FocusAdapter()
1595 public void focusGained(FocusEvent e)
1597 tabbedPane_focusGained(e);
1601 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1602 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1603 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1604 al = new ActionListener()
1607 public void actionPerformed(ActionEvent e)
1609 save_actionPerformed(e);
1612 addMenuActionAndAccelerator(keyStroke, save, al);
1614 reload.setEnabled(false);
1615 reload.setText(MessageManager.getString("action.reload"));
1616 reload.addActionListener(new ActionListener()
1619 public void actionPerformed(ActionEvent e)
1621 reload_actionPerformed(e);
1625 JMenuItem newView = new JMenuItem(
1626 MessageManager.getString("action.new_view"));
1627 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1628 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1629 al = new ActionListener()
1632 public void actionPerformed(ActionEvent e)
1634 newView_actionPerformed(e);
1637 addMenuActionAndAccelerator(keyStroke, newView, al);
1639 tabbedPane.setToolTipText("<html><i>"
1640 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1643 formatMenu.setText(MessageManager.getString("action.format"));
1644 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1646 idRightAlign.setText(
1647 MessageManager.getString("label.right_align_sequence_id"));
1648 idRightAlign.addActionListener(new ActionListener()
1651 public void actionPerformed(ActionEvent e)
1653 idRightAlign_actionPerformed(e);
1657 gatherViews.setEnabled(false);
1658 gatherViews.setText(MessageManager.getString("action.gather_views"));
1659 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1660 al = new ActionListener()
1663 public void actionPerformed(ActionEvent e)
1665 gatherViews_actionPerformed(e);
1668 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1670 expandViews.setEnabled(false);
1671 expandViews.setText(MessageManager.getString("action.expand_views"));
1672 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1673 al = new ActionListener()
1676 public void actionPerformed(ActionEvent e)
1678 expandViews_actionPerformed(e);
1681 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1683 JMenuItem pageSetup = new JMenuItem(
1684 MessageManager.getString("action.page_setup"));
1685 pageSetup.addActionListener(new ActionListener()
1688 public void actionPerformed(ActionEvent e)
1690 pageSetup_actionPerformed(e);
1693 JMenuItem alignmentProperties = new JMenuItem(
1694 MessageManager.getString("label.alignment_props"));
1695 alignmentProperties.addActionListener(new ActionListener()
1698 public void actionPerformed(ActionEvent actionEvent)
1700 alignmentProperties();
1703 JMenuItem selectHighlighted = new JMenuItem(
1704 MessageManager.getString("action.select_highlighted_columns"));
1705 selectHighlighted.setToolTipText(
1706 MessageManager.getString("tooltip.select_highlighted_columns"));
1707 al = new ActionListener()
1710 public void actionPerformed(ActionEvent actionEvent)
1712 selectHighlightedColumns_actionPerformed(actionEvent);
1715 selectHighlighted.addActionListener(al);
1716 JMenu tooltipSettingsMenu = new JMenu(
1717 MessageManager.getString("label.sequence_id_tooltip"));
1718 autoAnnMenu = new JMenu(
1719 MessageManager.getString("label.autocalculated_annotation"));
1721 JMenu exportImageMenu = new JMenu(
1722 MessageManager.getString("label.export_image"));
1723 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1724 alignFrameMenuBar.add(fileMenu);
1725 alignFrameMenuBar.add(editMenu);
1726 alignFrameMenuBar.add(selectMenu);
1727 alignFrameMenuBar.add(viewMenu);
1728 alignFrameMenuBar.add(annotationsMenu);
1729 alignFrameMenuBar.add(formatMenu);
1730 alignFrameMenuBar.add(colourMenu);
1731 alignFrameMenuBar.add(calculateMenu);
1732 alignFrameMenuBar.add(webService);
1734 fileMenu.add(fetchSequence);
1735 fileMenu.add(addSequenceMenu);
1736 fileMenu.add(reload);
1737 fileMenu.addSeparator();
1738 fileMenu.add(vamsasStore);
1740 fileMenu.add(saveAs);
1741 fileMenu.add(outputTextboxMenu);
1742 fileMenu.add(pageSetup);
1743 fileMenu.add(printMenuItem);
1744 fileMenu.addSeparator();
1745 fileMenu.add(exportImageMenu);
1746 fileMenu.add(exportFeatures);
1747 fileMenu.add(exportAnnotations);
1748 fileMenu.add(loadTreeMenuItem);
1749 fileMenu.add(associatedData);
1750 fileMenu.add(loadVcf);
1751 fileMenu.addSeparator();
1752 fileMenu.add(closeMenuItem);
1754 pasteMenu.add(pasteNew);
1755 pasteMenu.add(pasteThis);
1756 editMenu.add(undoMenuItem);
1757 editMenu.add(redoMenuItem);
1760 editMenu.add(pasteMenu);
1761 editMenu.add(delete);
1762 editMenu.addSeparator();
1763 editMenu.add(remove2LeftMenuItem);
1764 editMenu.add(remove2RightMenuItem);
1765 editMenu.add(removeGappedColumnMenuItem);
1766 editMenu.add(removeAllGapsMenuItem);
1767 editMenu.add(removeRedundancyMenuItem);
1768 editMenu.addSeparator();
1769 // dont add these yet in the CVS build - they cannot be undone!
1770 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1771 // editMenu.add(justifyLeftMenuItem);
1772 // editMenu.add(justifyRightMenuItem);
1773 // editMenu.addSeparator();
1774 editMenu.add(padGapsMenuitem);
1776 showMenu.add(showAllColumns);
1777 showMenu.add(showAllSeqs);
1778 showMenu.add(showAllhidden);
1779 hideMenu.add(hideSelColumns);
1780 hideMenu.add(hideSelSequences);
1781 hideMenu.add(hideAllSelection);
1782 hideMenu.add(hideAllButSelection);
1783 viewMenu.add(newView);
1784 viewMenu.add(expandViews);
1785 viewMenu.add(gatherViews);
1786 viewMenu.addSeparator();
1787 viewMenu.add(showMenu);
1788 viewMenu.add(hideMenu);
1789 viewMenu.add(showComplementMenuItem);
1790 viewMenu.addSeparator();
1791 viewMenu.add(followHighlightMenuItem);
1792 viewMenu.addSeparator();
1793 viewMenu.add(showSeqFeatures);
1794 // viewMenu.add(showSeqFeaturesHeight);
1795 viewMenu.add(openFeatureSettings);
1796 tooltipSettingsMenu.add(showDbRefsMenuitem);
1797 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1798 viewMenu.add(tooltipSettingsMenu);
1799 viewMenu.addSeparator();
1800 viewMenu.add(alignmentProperties);
1801 viewMenu.addSeparator();
1802 viewMenu.add(overviewMenuItem);
1804 annotationsMenu.add(annotationPanelMenuItem);
1805 annotationsMenu.addSeparator();
1806 annotationsMenu.add(showAllAlAnnotations);
1807 annotationsMenu.add(hideAllAlAnnotations);
1808 annotationsMenu.addSeparator();
1809 annotationsMenu.add(showAllSeqAnnotations);
1810 annotationsMenu.add(hideAllSeqAnnotations);
1811 annotationsMenu.add(sortAnnBySequence);
1812 annotationsMenu.add(sortAnnByLabel);
1813 annotationsMenu.addSeparator();
1814 annotationsMenu.add(autoAnnMenu); // autoAnnMenu is populated later
1816 sort.add(sortIDMenuItem);
1817 sort.add(sortLengthMenuItem);
1818 sort.add(sortGroupMenuItem);
1819 sort.add(sortPairwiseMenuItem);
1820 sort.add(sortByTreeMenu);
1821 calculateMenu.add(sort);
1822 calculateMenu.add(calculateTree);
1823 calculateMenu.addSeparator();
1824 calculateMenu.add(pairwiseAlignmentMenuItem);
1825 calculateMenu.addSeparator();
1826 calculateMenu.add(showTranslation);
1827 calculateMenu.add(showReverse);
1828 calculateMenu.add(showReverseComplement);
1829 calculateMenu.add(showProducts);
1830 calculateMenu.add(autoCalculate);
1831 calculateMenu.add(sortByTree);
1832 calculateMenu.addSeparator();
1833 calculateMenu.add(expandAlignment);
1834 calculateMenu.add(extractScores);
1835 calculateMenu.addSeparator();
1836 calculateMenu.add(runGroovy);
1838 webServiceNoServices = new JMenuItem(
1839 MessageManager.getString("label.no_services"));
1840 webService.add(webServiceNoServices);
1841 exportImageMenu.add(htmlMenuItem);
1842 exportImageMenu.add(epsFile);
1843 exportImageMenu.add(createPNG);
1844 exportImageMenu.add(createBioJS);
1845 exportImageMenu.add(createSVG);
1846 addSequenceMenu.add(addFromFile);
1847 addSequenceMenu.add(addFromText);
1848 addSequenceMenu.add(addFromURL);
1849 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1850 statusPanel.add(statusBar, null);
1851 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1853 formatMenu.add(font);
1854 formatMenu.addSeparator();
1855 formatMenu.add(wrapMenuItem);
1856 formatMenu.add(scaleAbove);
1857 formatMenu.add(scaleLeft);
1858 formatMenu.add(scaleRight);
1859 formatMenu.add(seqLimits);
1860 formatMenu.add(idRightAlign);
1861 formatMenu.add(hiddenMarkers);
1862 formatMenu.add(viewBoxesMenuItem);
1863 formatMenu.add(viewTextMenuItem);
1864 formatMenu.add(colourTextMenuItem);
1865 formatMenu.add(renderGapsMenuItem);
1866 formatMenu.add(centreColumnLabelsMenuItem);
1867 formatMenu.add(showNonconservedMenuItem);
1868 selectMenu.add(findMenuItem);
1869 selectMenu.addSeparator();
1870 selectMenu.add(selectAllSequenceMenuItem);
1871 selectMenu.add(deselectAllSequenceMenuItem);
1872 selectMenu.add(invertSequenceMenuItem);
1873 selectMenu.add(invertColSel);
1874 selectMenu.add(createGroup);
1875 selectMenu.add(unGroup);
1876 selectMenu.add(grpsFromSelection);
1877 selectMenu.add(deleteGroups);
1878 selectMenu.add(annotationColumn);
1879 selectMenu.add(selectHighlighted);
1880 // TODO - determine if the listenToViewSelections button is needed : see bug
1882 // selectMenu.addSeparator();
1883 // selectMenu.add(listenToViewSelections);
1886 protected void loadVcf_actionPerformed()
1891 * Constructs the entries on the Colour menu (but does not add them to the
1894 protected void initColourMenu()
1896 applyToAllGroups = new JCheckBoxMenuItem(
1897 MessageManager.getString("label.apply_colour_to_all_groups"));
1898 applyToAllGroups.addActionListener(new ActionListener()
1901 public void actionPerformed(ActionEvent e)
1903 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1907 textColour = new JMenuItem(
1908 MessageManager.getString("label.text_colour"));
1909 textColour.addActionListener(new ActionListener()
1912 public void actionPerformed(ActionEvent e)
1914 textColour_actionPerformed();
1918 conservationMenuItem = new JCheckBoxMenuItem(
1919 MessageManager.getString("action.by_conservation"));
1920 conservationMenuItem.addActionListener(new ActionListener()
1923 public void actionPerformed(ActionEvent e)
1925 conservationMenuItem_actionPerformed(
1926 conservationMenuItem.isSelected());
1930 abovePIDThreshold = new JCheckBoxMenuItem(
1931 MessageManager.getString("label.above_identity_threshold"));
1932 abovePIDThreshold.addActionListener(new ActionListener()
1935 public void actionPerformed(ActionEvent e)
1937 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1940 modifyPID = new JMenuItem(
1941 MessageManager.getString("label.modify_identity_threshold"));
1942 modifyPID.addActionListener(new ActionListener()
1945 public void actionPerformed(ActionEvent e)
1947 modifyPID_actionPerformed();
1950 modifyConservation = new JMenuItem(MessageManager
1951 .getString("label.modify_conservation_threshold"));
1952 modifyConservation.addActionListener(new ActionListener()
1955 public void actionPerformed(ActionEvent e)
1957 modifyConservation_actionPerformed();
1961 annotationColour = new JRadioButtonMenuItem(
1962 MessageManager.getString("action.by_annotation"));
1963 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
1964 annotationColour.addActionListener(new ActionListener()
1967 public void actionPerformed(ActionEvent e)
1969 annotationColour_actionPerformed();
1974 protected void selectHighlightedColumns_actionPerformed(
1975 ActionEvent actionEvent)
1977 // TODO Auto-generated method stub
1982 * Generate the reverse sequence (or reverse complement if the flag is true)
1983 * and add it to the alignment
1987 protected void showReverse_actionPerformed(boolean complement)
1992 * Try to run script in a Groovy console, having first ensured that this
1993 * alignframe is set as currentAlignFrame in Desktop
1995 protected void runGroovy_actionPerformed()
2001 * Adds the given action listener and key accelerator to the given menu item.
2002 * Also saves in a lookup table to support lookup of action by key stroke.
2006 * @param actionListener
2008 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2009 JMenuItem menuItem, ActionListener actionListener)
2011 menuItem.setAccelerator(keyStroke);
2012 accelerators.put(keyStroke, menuItem);
2013 menuItem.addActionListener(actionListener);
2017 * Action on clicking sort annotations by type.
2021 protected void sortAnnotations_actionPerformed()
2026 * Action on clicking Show all annotations.
2028 * @param forSequences
2029 * update sequence-related annotations
2030 * @param forAlignment
2031 * update non-sequence-related annotations
2033 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2034 boolean forAlignment)
2036 setAnnotationsVisibility(true, forSequences, forAlignment);
2040 * Action on clicking Hide all annotations.
2042 * @param forSequences
2043 * update sequence-related annotations
2044 * @param forAlignment
2045 * update non-sequence-related annotations
2047 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2048 boolean forAlignment)
2050 setAnnotationsVisibility(false, forSequences, forAlignment);
2054 * Set the visibility of annotations to true or false. Can act on
2055 * sequence-related annotations, or alignment-related, or both.
2058 * @param forSequences
2059 * update sequence-related annotations
2060 * @param forAlignment
2061 * update non-sequence-related annotations
2063 protected void setAnnotationsVisibility(boolean visible,
2064 boolean forSequences, boolean forAlignment)
2069 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2071 // TODO Auto-generated method stub
2075 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2077 // TODO Auto-generated method stub
2081 protected void showAllhidden_actionPerformed(ActionEvent e)
2083 // TODO Auto-generated method stub
2087 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2089 // TODO Auto-generated method stub
2093 protected void hideAllSelection_actionPerformed(ActionEvent e)
2095 // TODO Auto-generated method stub
2099 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2101 // TODO Auto-generated method stub
2105 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2107 // TODO Auto-generated method stub
2111 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2113 // TODO Auto-generated method stub
2117 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2119 // TODO Auto-generated method stub
2123 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2125 // TODO Auto-generated method stub
2129 protected void showGroupConservation_actionPerformed(ActionEvent e)
2131 // TODO Auto-generated method stub
2135 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2137 // TODO Auto-generated method stub
2141 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2143 // TODO Auto-generated method stub
2147 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2149 // TODO Auto-generated method stub
2153 protected void followHighlight_actionPerformed()
2155 // TODO Auto-generated method stub
2159 protected void showNpFeats_actionPerformed(ActionEvent e)
2161 // TODO Auto-generated method stub
2165 protected void showDbRefs_actionPerformed(ActionEvent e)
2167 // TODO Auto-generated method stub
2171 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2175 protected void buildSortByAnnotationScoresMenu()
2179 protected void extractScores_actionPerformed(ActionEvent e)
2183 protected void outputText_actionPerformed(ActionEvent e)
2187 public void addFromFile_actionPerformed(ActionEvent e)
2192 public void addFromText_actionPerformed(ActionEvent e)
2197 public void addFromURL_actionPerformed(ActionEvent e)
2202 public void exportFeatures_actionPerformed(ActionEvent e)
2207 public void exportAnnotations_actionPerformed(ActionEvent e)
2212 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2216 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2221 protected void closeMenuItem_actionPerformed(boolean b)
2225 protected void redoMenuItem_actionPerformed(ActionEvent e)
2229 protected void undoMenuItem_actionPerformed(ActionEvent e)
2233 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2237 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2241 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2245 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2249 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2253 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2257 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2261 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2265 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2269 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2273 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2277 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2281 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2285 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2289 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2293 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2297 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2301 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2305 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2309 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2313 protected void conservationMenuItem_actionPerformed(boolean selected)
2317 protected void printMenuItem_actionPerformed(ActionEvent e)
2321 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2325 protected void findMenuItem_actionPerformed(ActionEvent e)
2329 protected void abovePIDThreshold_actionPerformed(boolean selected)
2333 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2337 protected void deleteGroups_actionPerformed(ActionEvent e)
2341 protected void createGroup_actionPerformed(ActionEvent e)
2345 protected void unGroup_actionPerformed(ActionEvent e)
2349 protected void copy_actionPerformed(ActionEvent e)
2353 protected void cut_actionPerformed(ActionEvent e)
2357 protected void delete_actionPerformed(ActionEvent e)
2361 protected void pasteNew_actionPerformed(ActionEvent e)
2365 protected void pasteThis_actionPerformed(ActionEvent e)
2369 protected void applyToAllGroups_actionPerformed(boolean selected)
2373 public void createPNG(java.io.File f)
2377 protected void font_actionPerformed(ActionEvent e)
2381 protected void seqLimit_actionPerformed(ActionEvent e)
2385 public void seqDBRef_actionPerformed(ActionEvent e)
2390 public void createEPS(java.io.File f)
2394 public void createSVG(java.io.File f)
2399 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2405 * Template method to handle the 'load T-Coffee scores' menu event.
2407 * Subclasses override this method to provide a custom action.
2412 protected void loadScores_actionPerformed(ActionEvent event)
2417 protected void jpred_actionPerformed(ActionEvent e)
2421 protected void scaleAbove_actionPerformed(ActionEvent e)
2425 protected void scaleLeft_actionPerformed(ActionEvent e)
2429 protected void scaleRight_actionPerformed(ActionEvent e)
2433 protected void modifyPID_actionPerformed()
2437 protected void modifyConservation_actionPerformed()
2441 protected void saveAs_actionPerformed(ActionEvent e)
2445 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2449 public void vamsasStore_actionPerformed(ActionEvent e)
2454 public void vamsasLoad_actionPerformed(ActionEvent e)
2459 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2464 public void featureSettings_actionPerformed(ActionEvent e)
2469 public void fetchSequence_actionPerformed(ActionEvent e)
2474 public void smoothFont_actionPerformed(ActionEvent e)
2479 public void annotationColour_actionPerformed()
2483 public void annotationColumn_actionPerformed(ActionEvent e)
2487 public void associatedData_actionPerformed(ActionEvent e)
2492 public void autoCalculate_actionPerformed(ActionEvent e)
2497 public void sortByTreeOption_actionPerformed(ActionEvent e)
2502 public void showAllSeqs_actionPerformed(ActionEvent e)
2507 public void showAllColumns_actionPerformed(ActionEvent e)
2512 public void hideSelSequences_actionPerformed(ActionEvent e)
2517 public void hideSelColumns_actionPerformed(ActionEvent e)
2522 public void hiddenMarkers_actionPerformed(ActionEvent e)
2527 public void findPdbId_actionPerformed(ActionEvent e)
2532 public void enterPdbId_actionPerformed(ActionEvent e)
2537 public void pdbFile_actionPerformed(ActionEvent e)
2542 public void invertColSel_actionPerformed(ActionEvent e)
2547 public void tabSelectionChanged(int sel)
2552 public void tabbedPane_mousePressed(MouseEvent e)
2557 public void tabbedPane_focusGained(FocusEvent e)
2562 public void save_actionPerformed(ActionEvent e)
2567 public void reload_actionPerformed(ActionEvent e)
2572 public void newView_actionPerformed(ActionEvent e)
2577 public void textColour_actionPerformed()
2582 public void idRightAlign_actionPerformed(ActionEvent e)
2587 public void expandViews_actionPerformed(ActionEvent e)
2592 public void gatherViews_actionPerformed(ActionEvent e)
2597 public void buildTreeSortMenu()
2602 public void pageSetup_actionPerformed(ActionEvent e)
2607 public void alignmentProperties()
2612 protected void expand_newalign(ActionEvent e)
2614 // TODO Auto-generated method stub
2618 protected boolean isShowAutoCalculatedAbove()
2620 return showAutoCalculatedAbove;
2623 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2625 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2628 protected SequenceAnnotationOrder getAnnotationSortOrder()
2630 return annotationSortOrder;
2633 protected void setAnnotationSortOrder(
2634 SequenceAnnotationOrder annotationSortOrder)
2636 this.annotationSortOrder = annotationSortOrder;
2639 public Map<KeyStroke, JMenuItem> getAccelerators()
2641 return this.accelerators;
2645 * Returns the selected index of the tabbed pane, or -1 if none selected
2646 * (including the case where the tabbed pane has not been made visible).
2650 public int getTabIndex()
2652 return tabbedPane.getSelectedIndex();
2655 public JPanel getStatusPanel()
2661 * Sets a reference to the containing split frame. Also makes the 'toggle
2662 * split view' menu item visible and checked.
2666 public void setSplitFrame(SplitContainerI sf)
2668 this.splitFrame = sf;
2671 this.showComplementMenuItem.setVisible(true);
2672 this.showComplementMenuItem.setState(true);
2676 public SplitContainerI getSplitViewContainer()
2678 return this.splitFrame;
2681 protected void showComplement_actionPerformed(boolean complement)