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.Toolkit;
39 import java.awt.event.ActionEvent;
40 import java.awt.event.ActionListener;
41 import java.awt.event.FocusAdapter;
42 import java.awt.event.FocusEvent;
43 import java.awt.event.KeyEvent;
44 import java.awt.event.MouseAdapter;
45 import java.awt.event.MouseEvent;
46 import java.util.HashMap;
49 import javax.swing.BorderFactory;
50 import javax.swing.ButtonGroup;
51 import javax.swing.JCheckBoxMenuItem;
52 import javax.swing.JInternalFrame;
53 import javax.swing.JLabel;
54 import javax.swing.JMenu;
55 import javax.swing.JMenuBar;
56 import javax.swing.JMenuItem;
57 import javax.swing.JPanel;
58 import javax.swing.JRadioButtonMenuItem;
59 import javax.swing.JTabbedPane;
60 import javax.swing.KeyStroke;
61 import javax.swing.event.ChangeEvent;
62 import javax.swing.event.MenuEvent;
63 import javax.swing.event.MenuListener;
65 public class GAlignFrame extends JInternalFrame
67 protected JMenuBar alignFrameMenuBar = new JMenuBar();
69 protected JMenuItem closeMenuItem = new JMenuItem();
71 protected JMenu webService = new JMenu();
73 protected JMenuItem webServiceNoServices;
75 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
77 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
79 protected JMenu sortByAnnotScore = new JMenu();
81 protected JLabel statusBar = new JLabel();
83 protected JMenu outputTextboxMenu = new JMenu();
85 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
87 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
89 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
91 protected JMenuItem undoMenuItem = new JMenuItem();
93 protected JMenuItem redoMenuItem = new JMenuItem();
95 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
97 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
99 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
101 JMenuItem copy = new JMenuItem();
103 JMenuItem cut = new JMenuItem();
105 JMenu pasteMenu = new JMenu();
107 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
109 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
111 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
113 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
115 protected JCheckBoxMenuItem applyToAllGroups;
117 protected JMenu colourMenu = new JMenu();
119 protected JMenuItem textColour;
121 protected JCheckBoxMenuItem conservationMenuItem;
123 protected JMenuItem modifyConservation;
125 protected JCheckBoxMenuItem abovePIDThreshold;
127 protected JMenuItem modifyPID;
129 protected JRadioButtonMenuItem annotationColour;
131 protected JMenu sortByTreeMenu = new JMenu();
133 protected JMenu sort = new JMenu();
135 protected JMenuItem calculateTree = new JMenuItem();
137 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
139 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
141 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
143 protected JMenu showTranslation = new JMenu();
145 protected JMenuItem showReverse = new JMenuItem();
147 protected JMenuItem showReverseComplement = new JMenuItem();
149 protected JMenu showProducts = new JMenu();
151 protected JMenuItem runGroovy = new JMenuItem();
153 protected JMenuItem loadVcf;
155 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
157 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
159 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
161 protected JPanel statusPanel = new JPanel();
163 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
165 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
167 protected JMenuItem showAllAlAnnotations = new JMenuItem();
169 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
171 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
173 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
175 protected JTabbedPane tabbedPane = jalview.jbgui.GDesktop.createTabbedPane();
177 protected JMenuItem reload = new JMenuItem();
179 protected JMenu formatMenu = new JMenu();
181 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
183 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
185 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
187 protected JMenuItem gatherViews = new JMenuItem();
189 protected JMenuItem expandViews = new JMenuItem();
191 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
193 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
195 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
197 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
201 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
203 protected JMenuItem openFeatureSettings;
205 private SequenceAnnotationOrder annotationSortOrder;
207 private boolean showAutoCalculatedAbove = false;
209 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
211 private SplitContainerI splitFrame;
218 setJMenuBar(alignFrameMenuBar);
220 // dynamically fill save as menu with available formats
221 for (String ff : FileFormats.getInstance().getWritableFormats(true))
223 JMenuItem item = new JMenuItem(ff);
225 item.addActionListener(new ActionListener()
228 public void actionPerformed(ActionEvent e)
230 outputText_actionPerformed(e.getActionCommand());
234 outputTextboxMenu.add(item);
236 } catch (Exception e)
238 System.err.println(e.toString());
241 if (Platform.allowMnemonics()) // was "not mac and not JS"
243 closeMenuItem.setMnemonic('C');
244 outputTextboxMenu.setMnemonic('T');
245 undoMenuItem.setMnemonic('Z');
246 redoMenuItem.setMnemonic('0');
247 copy.setMnemonic('C');
248 cut.setMnemonic('U');
249 pasteMenu.setMnemonic('P');
250 reload.setMnemonic('R');
254 private void jbInit() throws Exception
258 JMenuItem saveAs = new JMenuItem(
259 MessageManager.getString("action.save_as"));
260 ActionListener al = new ActionListener()
263 public void actionPerformed(ActionEvent e)
265 saveAs_actionPerformed();
269 // FIXME getDefaultToolkit throws an exception in Headless mode
270 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
271 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
272 | KeyEvent.SHIFT_MASK,
274 addMenuActionAndAccelerator(keyStroke, saveAs, al);
276 closeMenuItem.setText(MessageManager.getString("action.close"));
277 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
278 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
279 al = new ActionListener()
282 public void actionPerformed(ActionEvent e)
284 closeMenuItem_actionPerformed(false);
287 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
289 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
290 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
291 JMenu annotationsMenu = new JMenu(
292 MessageManager.getString("action.annotations"));
293 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
294 colourMenu.setText(MessageManager.getString("action.colour"));
295 JMenu calculateMenu = new JMenu(
296 MessageManager.getString("action.calculate"));
297 webService.setText(MessageManager.getString("action.web_service"));
298 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
299 MessageManager.getString("action.select_all"));
300 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
301 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
302 al = new ActionListener()
305 public void actionPerformed(ActionEvent e)
307 selectAllSequenceMenuItem_actionPerformed(e);
310 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
312 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
313 MessageManager.getString("action.deselect_all"));
314 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
315 al = new ActionListener()
318 public void actionPerformed(ActionEvent e)
320 deselectAllSequenceMenuItem_actionPerformed(e);
323 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
325 JMenuItem invertSequenceMenuItem = new JMenuItem(
326 MessageManager.getString("action.invert_sequence_selection"));
327 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
328 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
329 al = new ActionListener()
332 public void actionPerformed(ActionEvent e)
334 invertSequenceMenuItem_actionPerformed(e);
337 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
339 JMenuItem grpsFromSelection = new JMenuItem(
340 MessageManager.getString("action.make_groups_selection"));
341 grpsFromSelection.addActionListener(new ActionListener()
344 public void actionPerformed(ActionEvent e)
346 makeGrpsFromSelection_actionPerformed(e);
349 JMenuItem expandAlignment = new JMenuItem(
350 MessageManager.getString("action.view_flanking_regions"));
351 expandAlignment.setToolTipText(
352 MessageManager.getString("label.view_flanking_regions"));
353 expandAlignment.addActionListener(new ActionListener()
356 public void actionPerformed(ActionEvent e)
361 JMenuItem remove2LeftMenuItem = new JMenuItem(
362 MessageManager.getString("action.remove_left"));
363 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
364 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
365 al = new ActionListener()
368 public void actionPerformed(ActionEvent e)
370 remove2LeftMenuItem_actionPerformed(e);
373 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
375 JMenuItem remove2RightMenuItem = new JMenuItem(
376 MessageManager.getString("action.remove_right"));
377 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
378 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
379 al = new ActionListener()
382 public void actionPerformed(ActionEvent e)
384 remove2RightMenuItem_actionPerformed(e);
387 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
389 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
390 MessageManager.getString("action.remove_empty_columns"));
391 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
392 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
393 al = new ActionListener()
396 public void actionPerformed(ActionEvent e)
398 removeGappedColumnMenuItem_actionPerformed(e);
401 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
403 JMenuItem removeAllGapsMenuItem = new JMenuItem(
404 MessageManager.getString("action.remove_all_gaps"));
405 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
406 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
407 | KeyEvent.SHIFT_MASK,
409 al = new ActionListener()
412 public void actionPerformed(ActionEvent e)
414 removeAllGapsMenuItem_actionPerformed(e);
417 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
419 JMenuItem justifyLeftMenuItem = new JMenuItem(
420 MessageManager.getString("action.left_justify_alignment"));
421 justifyLeftMenuItem.addActionListener(new ActionListener()
424 public void actionPerformed(ActionEvent e)
426 justifyLeftMenuItem_actionPerformed(e);
429 JMenuItem justifyRightMenuItem = new JMenuItem(
430 MessageManager.getString("action.right_justify_alignment"));
431 justifyRightMenuItem.addActionListener(new ActionListener()
434 public void actionPerformed(ActionEvent e)
436 justifyRightMenuItem_actionPerformed(e);
439 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
440 viewBoxesMenuItem.setState(true);
441 viewBoxesMenuItem.addActionListener(new ActionListener()
444 public void actionPerformed(ActionEvent e)
446 viewBoxesMenuItem_actionPerformed(e);
449 viewTextMenuItem.setText(MessageManager.getString("action.text"));
450 viewTextMenuItem.setState(true);
451 viewTextMenuItem.addActionListener(new ActionListener()
454 public void actionPerformed(ActionEvent e)
456 viewTextMenuItem_actionPerformed(e);
459 showNonconservedMenuItem
460 .setText(MessageManager.getString("label.show_non_conserved"));
461 showNonconservedMenuItem.setState(false);
462 showNonconservedMenuItem.addActionListener(new ActionListener()
465 public void actionPerformed(ActionEvent e)
467 showUnconservedMenuItem_actionPerformed(e);
470 JMenuItem sortPairwiseMenuItem = new JMenuItem(
471 MessageManager.getString("action.by_pairwise_id"));
472 sortPairwiseMenuItem.addActionListener(new ActionListener()
475 public void actionPerformed(ActionEvent e)
477 sortPairwiseMenuItem_actionPerformed(e);
480 JMenuItem sortIDMenuItem = new JMenuItem(
481 MessageManager.getString("action.by_id"));
482 sortIDMenuItem.addActionListener(new ActionListener()
485 public void actionPerformed(ActionEvent e)
487 sortIDMenuItem_actionPerformed(e);
490 JMenuItem sortLengthMenuItem = new JMenuItem(
491 MessageManager.getString("action.by_length"));
492 sortLengthMenuItem.addActionListener(new ActionListener()
495 public void actionPerformed(ActionEvent e)
497 sortLengthMenuItem_actionPerformed(e);
500 JMenuItem sortGroupMenuItem = new JMenuItem(
501 MessageManager.getString("action.by_group"));
502 sortGroupMenuItem.addActionListener(new ActionListener()
505 public void actionPerformed(ActionEvent e)
507 sortGroupMenuItem_actionPerformed(e);
511 JMenuItem removeRedundancyMenuItem = new JMenuItem(
512 MessageManager.getString("action.remove_redundancy"));
513 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
514 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
515 al = new ActionListener()
518 public void actionPerformed(ActionEvent e)
520 removeRedundancyMenuItem_actionPerformed(e);
523 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
525 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
526 MessageManager.getString("action.pairwise_alignment"));
527 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
530 public void actionPerformed(ActionEvent e)
532 pairwiseAlignmentMenuItem_actionPerformed(e);
536 this.getContentPane().setLayout(new BorderLayout());
537 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
538 statusBar.setBackground(Color.white);
539 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
540 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
541 statusBar.setText(MessageManager.getString("label.status_bar"));
543 .setText(MessageManager.getString("label.out_to_textbox"));
545 annotationPanelMenuItem.setActionCommand("");
546 annotationPanelMenuItem
547 .setText(MessageManager.getString("label.show_annotations"));
548 annotationPanelMenuItem
549 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
550 annotationPanelMenuItem.addActionListener(new ActionListener()
553 public void actionPerformed(ActionEvent e)
555 annotationPanelMenuItem_actionPerformed(e);
558 showAllAlAnnotations.setText(
559 MessageManager.getString("label.show_all_al_annotations"));
560 final boolean isAnnotationPanelShown = annotationPanelMenuItem
562 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
563 showAllAlAnnotations.addActionListener(new ActionListener()
566 public void actionPerformed(ActionEvent e)
568 showAllAnnotations_actionPerformed(false, true);
571 hideAllAlAnnotations.setText(
572 MessageManager.getString("label.hide_all_al_annotations"));
573 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
574 hideAllAlAnnotations.addActionListener(new ActionListener()
577 public void actionPerformed(ActionEvent e)
579 hideAllAnnotations_actionPerformed(false, true);
582 showAllSeqAnnotations.setText(
583 MessageManager.getString("label.show_all_seq_annotations"));
584 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
585 showAllSeqAnnotations.addActionListener(new ActionListener()
588 public void actionPerformed(ActionEvent e)
590 showAllAnnotations_actionPerformed(true, false);
593 hideAllSeqAnnotations.setText(
594 MessageManager.getString("label.hide_all_seq_annotations"));
595 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
596 hideAllSeqAnnotations.addActionListener(new ActionListener()
599 public void actionPerformed(ActionEvent e)
601 hideAllAnnotations_actionPerformed(true, false);
604 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
605 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
606 SequenceAnnotationOrder.NONE.name()));
607 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
608 MessageManager.getString("label.sort_annotations_by_sequence"));
609 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
610 MessageManager.getString("label.sort_annotations_by_label"));
612 sortAnnBySequence.setSelected(
613 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
614 sortAnnBySequence.addActionListener(new ActionListener()
617 public void actionPerformed(ActionEvent e)
619 boolean newState = sortAnnBySequence.getState();
620 sortAnnByLabel.setSelected(false);
621 setAnnotationSortOrder(
622 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
623 : SequenceAnnotationOrder.NONE);
624 sortAnnotations_actionPerformed();
627 sortAnnByLabel.setSelected(
628 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
629 sortAnnByLabel.addActionListener(new ActionListener()
632 public void actionPerformed(ActionEvent e)
634 boolean newState = sortAnnByLabel.getState();
635 sortAnnBySequence.setSelected(false);
636 setAnnotationSortOrder(
637 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
638 : SequenceAnnotationOrder.NONE);
639 sortAnnotations_actionPerformed();
642 colourTextMenuItem = new JCheckBoxMenuItem(
643 MessageManager.getString("label.colour_text"));
644 colourTextMenuItem.addActionListener(new ActionListener()
647 public void actionPerformed(ActionEvent e)
649 colourTextMenuItem_actionPerformed(e);
653 JMenuItem htmlMenuItem = new JMenuItem(
654 MessageManager.getString("label.html"));
655 htmlMenuItem.addActionListener(new ActionListener()
658 public void actionPerformed(ActionEvent e)
660 htmlMenuItem_actionPerformed(e);
664 JMenuItem createBioJS = new JMenuItem(
665 MessageManager.getString("label.biojs_html_export"));
666 createBioJS.addActionListener(new java.awt.event.ActionListener()
669 public void actionPerformed(ActionEvent e)
671 bioJSMenuItem_actionPerformed(e);
675 JMenuItem overviewMenuItem = new JMenuItem(
676 MessageManager.getString("label.overview_window"));
677 overviewMenuItem.addActionListener(new ActionListener()
680 public void actionPerformed(ActionEvent e)
682 overviewMenuItem_actionPerformed(e);
686 undoMenuItem.setEnabled(false);
687 undoMenuItem.setText(MessageManager.getString("action.undo"));
688 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
689 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
690 al = new ActionListener()
693 public void actionPerformed(ActionEvent e)
695 undoMenuItem_actionPerformed(e);
698 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
700 redoMenuItem.setEnabled(false);
701 redoMenuItem.setText(MessageManager.getString("action.redo"));
702 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
703 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
704 al = new ActionListener()
707 public void actionPerformed(ActionEvent e)
709 redoMenuItem_actionPerformed(e);
712 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
714 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
715 wrapMenuItem.addActionListener(new ActionListener()
718 public void actionPerformed(ActionEvent e)
720 wrapMenuItem_actionPerformed(e);
724 JMenuItem printMenuItem = new JMenuItem(
725 MessageManager.getString("action.print"));
726 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
727 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
728 al = new ActionListener()
731 public void actionPerformed(ActionEvent e)
733 printMenuItem_actionPerformed(e);
736 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
739 .setText(MessageManager.getString("action.show_gaps"));
740 renderGapsMenuItem.setState(true);
741 renderGapsMenuItem.addActionListener(new ActionListener()
744 public void actionPerformed(ActionEvent e)
746 renderGapsMenuItem_actionPerformed(e);
750 JMenuItem findMenuItem = new JMenuItem(
751 MessageManager.getString("action.find"));
752 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
753 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
754 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
755 MessageManager.getString("label.find_tip")));
756 al = new ActionListener()
759 public void actionPerformed(ActionEvent e)
761 findMenuItem_actionPerformed(e);
764 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
766 showSeqFeatures.setText(
767 MessageManager.getString("label.show_sequence_features"));
768 showSeqFeatures.addActionListener(new ActionListener()
771 public void actionPerformed(ActionEvent actionEvent)
773 showSeqFeatures_actionPerformed(actionEvent);
777 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
778 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
779 * void actionPerformed(ActionEvent actionEvent) {
780 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
783 .setText(MessageManager.getString("label.show_database_refs"));
784 showDbRefsMenuitem.addActionListener(new ActionListener()
788 public void actionPerformed(ActionEvent e)
790 showDbRefs_actionPerformed(e);
794 showNpFeatsMenuitem.setText(
795 MessageManager.getString("label.show_non_positional_features"));
796 showNpFeatsMenuitem.addActionListener(new ActionListener()
800 public void actionPerformed(ActionEvent e)
802 showNpFeats_actionPerformed(e);
806 showGroupConservation
807 .setText(MessageManager.getString("label.group_conservation"));
808 showGroupConservation.addActionListener(new ActionListener()
812 public void actionPerformed(ActionEvent e)
814 showGroupConservation_actionPerformed(e);
820 .setText(MessageManager.getString("label.group_consensus"));
821 showGroupConsensus.addActionListener(new ActionListener()
825 public void actionPerformed(ActionEvent e)
827 showGroupConsensus_actionPerformed(e);
831 showConsensusHistogram.setText(
832 MessageManager.getString("label.show_consensus_histogram"));
833 showConsensusHistogram.addActionListener(new ActionListener()
837 public void actionPerformed(ActionEvent e)
839 showConsensusHistogram_actionPerformed(e);
844 .setText(MessageManager.getString("label.show_consensus_logo"));
845 showSequenceLogo.addActionListener(new ActionListener()
849 public void actionPerformed(ActionEvent e)
851 showSequenceLogo_actionPerformed(e);
855 normaliseSequenceLogo
856 .setText(MessageManager.getString("label.norm_consensus_logo"));
857 normaliseSequenceLogo.addActionListener(new ActionListener()
861 public void actionPerformed(ActionEvent e)
863 normaliseSequenceLogo_actionPerformed(e);
867 applyAutoAnnotationSettings
868 .setText(MessageManager.getString("label.apply_all_groups"));
869 applyAutoAnnotationSettings.setState(false);
870 applyAutoAnnotationSettings.setVisible(true);
871 applyAutoAnnotationSettings.addActionListener(new ActionListener()
874 public void actionPerformed(ActionEvent e)
876 applyAutoAnnotationSettings_actionPerformed(e);
880 ButtonGroup buttonGroup = new ButtonGroup();
881 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
882 MessageManager.getString("label.show_first"));
883 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
884 MessageManager.getString("label.show_last"));
885 buttonGroup.add(showAutoFirst);
886 buttonGroup.add(showAutoLast);
887 final boolean autoFirst = Cache
888 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
889 showAutoFirst.setSelected(autoFirst);
890 setShowAutoCalculatedAbove(autoFirst);
891 showAutoFirst.addActionListener(new ActionListener()
894 public void actionPerformed(ActionEvent e)
896 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
897 sortAnnotations_actionPerformed();
900 showAutoLast.setSelected(!showAutoFirst.isSelected());
901 showAutoLast.addActionListener(new ActionListener()
904 public void actionPerformed(ActionEvent e)
906 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
907 sortAnnotations_actionPerformed();
911 JMenuItem deleteGroups = new JMenuItem(
912 MessageManager.getString("action.undefine_groups"));
913 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
914 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
915 al = new ActionListener()
918 public void actionPerformed(ActionEvent e)
920 deleteGroups_actionPerformed(e);
923 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
925 JMenuItem annotationColumn = new JMenuItem(
926 MessageManager.getString("action.select_by_annotation"));
927 annotationColumn.addActionListener(new ActionListener()
930 public void actionPerformed(ActionEvent e)
932 annotationColumn_actionPerformed(e);
936 JMenuItem createGroup = new JMenuItem(
937 MessageManager.getString("action.create_group"));
938 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
939 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
940 al = new ActionListener()
943 public void actionPerformed(ActionEvent e)
945 createGroup_actionPerformed(e);
948 addMenuActionAndAccelerator(keyStroke, createGroup, al);
950 JMenuItem unGroup = new JMenuItem(
951 MessageManager.getString("action.remove_group"));
952 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
953 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
954 | KeyEvent.SHIFT_MASK,
956 al = new ActionListener()
959 public void actionPerformed(ActionEvent e)
961 unGroup_actionPerformed(e);
964 addMenuActionAndAccelerator(keyStroke, unGroup, al);
966 copy.setText(MessageManager.getString("action.copy"));
967 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
968 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
970 al = new ActionListener()
973 public void actionPerformed(ActionEvent e)
975 copy_actionPerformed();
978 addMenuActionAndAccelerator(keyStroke, copy, al);
980 cut.setText(MessageManager.getString("action.cut"));
981 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
982 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
983 al = new ActionListener()
986 public void actionPerformed(ActionEvent e)
988 cut_actionPerformed();
991 addMenuActionAndAccelerator(keyStroke, cut, al);
993 JMenuItem delete = new JMenuItem(
994 MessageManager.getString("action.delete"));
995 delete.addActionListener(new ActionListener()
998 public void actionPerformed(ActionEvent e)
1000 delete_actionPerformed();
1004 pasteMenu.setText(MessageManager.getString("action.paste"));
1005 JMenuItem pasteNew = new JMenuItem(
1006 MessageManager.getString("label.to_new_alignment"));
1007 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1008 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1009 | KeyEvent.SHIFT_MASK,
1011 al = new ActionListener()
1014 public void actionPerformed(ActionEvent e)
1016 pasteNew_actionPerformed(e);
1019 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1021 JMenuItem pasteThis = new JMenuItem(
1022 MessageManager.getString("label.to_this_alignment"));
1023 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1024 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1025 al = new ActionListener()
1028 public void actionPerformed(ActionEvent e)
1030 pasteThis_actionPerformed(e);
1033 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1035 JMenuItem createPNG = new JMenuItem("PNG");
1036 createPNG.addActionListener(new ActionListener()
1039 public void actionPerformed(ActionEvent e)
1044 createPNG.setActionCommand(
1045 MessageManager.getString("label.save_png_image"));
1047 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1048 font.addActionListener(new ActionListener()
1051 public void actionPerformed(ActionEvent e)
1053 font_actionPerformed(e);
1057 MessageManager.getString("label.show_sequence_limits"));
1058 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1059 seqLimits.addActionListener(new ActionListener()
1062 public void actionPerformed(ActionEvent e)
1064 seqLimit_actionPerformed(e);
1067 JMenuItem epsFile = new JMenuItem("EPS");
1068 epsFile.addActionListener(new ActionListener()
1071 public void actionPerformed(ActionEvent e)
1077 JMenuItem createSVG = new JMenuItem("SVG");
1078 createSVG.addActionListener(new ActionListener()
1081 public void actionPerformed(ActionEvent e)
1087 JMenuItem loadTreeMenuItem = new JMenuItem(
1088 MessageManager.getString("label.load_associated_tree"));
1089 loadTreeMenuItem.setActionCommand(
1090 MessageManager.getString("label.load_tree_for_sequence_set"));
1091 loadTreeMenuItem.addActionListener(new ActionListener()
1094 public void actionPerformed(ActionEvent e)
1096 loadTreeMenuItem_actionPerformed(e);
1100 scaleAbove.setVisible(false);
1101 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1102 scaleAbove.addActionListener(new ActionListener()
1105 public void actionPerformed(ActionEvent e)
1107 scaleAbove_actionPerformed(e);
1110 scaleLeft.setVisible(false);
1111 scaleLeft.setSelected(true);
1112 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1113 scaleLeft.addActionListener(new ActionListener()
1116 public void actionPerformed(ActionEvent e)
1118 scaleLeft_actionPerformed(e);
1121 scaleRight.setVisible(false);
1122 scaleRight.setSelected(true);
1123 scaleRight.setText(MessageManager.getString("action.scale_right"));
1124 scaleRight.addActionListener(new ActionListener()
1127 public void actionPerformed(ActionEvent e)
1129 scaleRight_actionPerformed(e);
1132 centreColumnLabelsMenuItem.setVisible(true);
1133 centreColumnLabelsMenuItem.setState(false);
1134 centreColumnLabelsMenuItem.setText(
1135 MessageManager.getString("label.centre_column_labels"));
1136 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1139 public void actionPerformed(ActionEvent e)
1141 centreColumnLabels_actionPerformed(e);
1144 followHighlightMenuItem.setVisible(true);
1145 followHighlightMenuItem.setState(true);
1146 followHighlightMenuItem
1147 .setText(MessageManager.getString("label.automatic_scrolling"));
1148 followHighlightMenuItem.addActionListener(new ActionListener()
1152 public void actionPerformed(ActionEvent e)
1154 followHighlight_actionPerformed();
1160 .setText(MessageManager.getString("action.by_tree_order"));
1161 sort.setText(MessageManager.getString("action.sort"));
1162 sort.addMenuListener(new MenuListener()
1165 public void menuSelected(MenuEvent e)
1167 buildTreeSortMenu();
1171 public void menuDeselected(MenuEvent e)
1176 public void menuCanceled(MenuEvent e)
1181 .setText(MessageManager.getString("label.sort_by_score"));
1182 sort.add(sortByAnnotScore);
1183 sort.addMenuListener(new javax.swing.event.MenuListener()
1187 public void menuCanceled(MenuEvent e)
1192 public void menuDeselected(MenuEvent e)
1197 public void menuSelected(MenuEvent e)
1199 buildSortByAnnotationScoresMenu();
1202 sortByAnnotScore.setVisible(false);
1205 .setText(MessageManager.getString("action.calculate_tree_pca"));
1207 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1209 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1210 padGapsMenuitem.addActionListener(new ActionListener()
1213 public void actionPerformed(ActionEvent e)
1215 padGapsMenuitem_actionPerformed(e);
1218 JMenuItem vamsasStore = new JMenuItem(
1219 MessageManager.getString("label.vamsas_store"));
1220 vamsasStore.setVisible(false);
1221 vamsasStore.addActionListener(new ActionListener()
1224 public void actionPerformed(ActionEvent e)
1226 vamsasStore_actionPerformed(e);
1231 * Translate as cDNA with sub-menu of translation tables
1233 showTranslation.setText(MessageManager
1234 .getString("label.translate_cDNA"));
1235 boolean first = true;
1236 for (final GeneticCodeI table : GeneticCodes.getInstance()
1239 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1240 showTranslation.add(item);
1241 item.addActionListener(new ActionListener()
1244 public void actionPerformed(ActionEvent e)
1246 showTranslation_actionPerformed(table);
1251 showTranslation.addSeparator();
1256 showReverse.setText(MessageManager.getString("label.reverse"));
1257 showReverse.addActionListener(new ActionListener()
1260 public void actionPerformed(ActionEvent e)
1262 showReverse_actionPerformed(false);
1265 showReverseComplement
1266 .setText(MessageManager.getString("label.reverse_complement"));
1267 showReverseComplement.addActionListener(new ActionListener()
1270 public void actionPerformed(ActionEvent e)
1272 showReverse_actionPerformed(true);
1276 JMenuItem extractScores = new JMenuItem(
1277 MessageManager.getString("label.extract_scores"));
1278 extractScores.addActionListener(new ActionListener()
1281 public void actionPerformed(ActionEvent e)
1283 extractScores_actionPerformed(e);
1286 extractScores.setVisible(true);
1287 // JBPNote: TODO: make gui for regex based score extraction
1289 // for show products actions see AlignFrame.canShowProducts
1290 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1292 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1293 runGroovy.setToolTipText(
1294 MessageManager.getString("label.run_groovy_tip"));
1295 runGroovy.addActionListener(new ActionListener()
1298 public void actionPerformed(ActionEvent e)
1300 runGroovy_actionPerformed();
1304 openFeatureSettings = new JMenuItem(
1305 MessageManager.getString("action.feature_settings"));
1306 openFeatureSettings.addActionListener(new ActionListener()
1309 public void actionPerformed(ActionEvent e)
1311 featureSettings_actionPerformed(e);
1316 * add sub-menu of database we can fetch from
1318 JMenuItem fetchSequence = new JMenuItem(
1319 MessageManager.getString("label.fetch_sequences"));
1320 fetchSequence.addActionListener(new ActionListener()
1323 public void actionPerformed(ActionEvent e)
1325 fetchSequence_actionPerformed();
1329 JMenuItem associatedData = new JMenuItem(
1330 MessageManager.getString("label.load_features_annotations"));
1331 associatedData.addActionListener(new ActionListener()
1334 public void actionPerformed(ActionEvent e)
1336 associatedData_actionPerformed(e);
1339 loadVcf = new JMenuItem(MessageManager.getString("label.load_vcf_file"));
1340 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1341 loadVcf.addActionListener(new ActionListener()
1344 public void actionPerformed(ActionEvent e)
1346 loadVcf_actionPerformed();
1349 autoCalculate.setText(
1350 MessageManager.getString("label.autocalculate_consensus"));
1351 autoCalculate.setState(
1352 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1353 autoCalculate.addActionListener(new ActionListener()
1356 public void actionPerformed(ActionEvent e)
1358 autoCalculate_actionPerformed(e);
1362 MessageManager.getString("label.sort_alignment_new_tree"));
1363 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1364 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1366 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1367 sortByTree.addActionListener(new ActionListener()
1370 public void actionPerformed(ActionEvent e)
1372 sortByTreeOption_actionPerformed(e);
1376 listenToViewSelections.setText(
1377 MessageManager.getString("label.listen_for_selections"));
1378 listenToViewSelections
1379 .setToolTipText("<html>" + MessageManager.getString(
1380 "label.selections_mirror_selections_made_same_sequences_other_views"));
1381 listenToViewSelections.setState(false);
1382 listenToViewSelections.addActionListener(new ActionListener()
1385 public void actionPerformed(ActionEvent e)
1387 listenToViewSelections_actionPerformed(e);
1391 JMenu addSequenceMenu = new JMenu(
1392 MessageManager.getString("label.add_sequences"));
1393 JMenuItem addFromFile = new JMenuItem(
1394 MessageManager.getString("label.from_file"));
1395 addFromFile.addActionListener(new ActionListener()
1398 public void actionPerformed(ActionEvent e)
1400 addFromFile_actionPerformed(e);
1403 JMenuItem addFromText = new JMenuItem(
1404 MessageManager.getString("label.from_textbox"));
1405 addFromText.addActionListener(new ActionListener()
1408 public void actionPerformed(ActionEvent e)
1410 addFromText_actionPerformed(e);
1413 JMenuItem addFromURL = new JMenuItem(
1414 MessageManager.getString("label.from_url"));
1415 addFromURL.addActionListener(new ActionListener()
1418 public void actionPerformed(ActionEvent e)
1420 addFromURL_actionPerformed(e);
1423 JMenuItem exportFeatures = new JMenuItem(
1424 MessageManager.getString("label.export_features"));
1425 exportFeatures.addActionListener(new ActionListener()
1428 public void actionPerformed(ActionEvent e)
1430 exportFeatures_actionPerformed(e);
1433 JMenuItem exportAnnotations = new JMenuItem(
1434 MessageManager.getString("label.export_annotations"));
1435 exportAnnotations.addActionListener(new ActionListener()
1438 public void actionPerformed(ActionEvent e)
1440 exportAnnotations_actionPerformed(e);
1443 statusPanel.setLayout(new GridLayout());
1444 JMenuItem showAllSeqs = new JMenuItem(
1445 MessageManager.getString("label.all_sequences"));
1446 showAllSeqs.setToolTipText(
1447 MessageManager.getString("label.toggle_sequence_visibility"));
1448 showAllSeqs.addActionListener(new ActionListener()
1451 public void actionPerformed(ActionEvent e)
1453 showAllSeqs_actionPerformed(e);
1456 JMenuItem showAllColumns = new JMenuItem(
1457 MessageManager.getString("label.all_columns"));
1458 showAllColumns.setToolTipText(
1459 MessageManager.getString("label.toggle_columns_visibility"));
1460 showAllColumns.addActionListener(new ActionListener()
1463 public void actionPerformed(ActionEvent e)
1465 showAllColumns_actionPerformed(e);
1468 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1469 JMenuItem hideSelSequences = new JMenuItem(
1470 MessageManager.getString("label.selected_sequences"));
1471 hideSelSequences.setToolTipText(
1472 MessageManager.getString("label.toggle_sequence_visibility"));
1473 hideSelSequences.addActionListener(new ActionListener()
1476 public void actionPerformed(ActionEvent e)
1478 hideSelSequences_actionPerformed(e);
1481 JMenuItem hideSelColumns = new JMenuItem(
1482 MessageManager.getString("label.selected_columns"));
1483 hideSelColumns.setToolTipText(
1484 MessageManager.getString("label.toggle_columns_visibility"));
1485 hideSelColumns.addActionListener(new ActionListener()
1488 public void actionPerformed(ActionEvent e)
1490 hideSelColumns_actionPerformed(e);
1493 JMenuItem hideAllSelection = new JMenuItem(
1494 MessageManager.getString("label.selected_region"));
1495 hideAllSelection.addActionListener(new ActionListener()
1498 public void actionPerformed(ActionEvent e)
1500 hideAllSelection_actionPerformed(e);
1503 // TODO: should be hidden if no selection exists.
1504 JMenuItem hideAllButSelection = new JMenuItem(
1505 MessageManager.getString("label.all_but_selected_region"));
1506 hideAllButSelection.addActionListener(new ActionListener()
1509 public void actionPerformed(ActionEvent e)
1511 hideAllButSelection_actionPerformed(e);
1514 JMenuItem showAllhidden = new JMenuItem(
1515 MessageManager.getString("label.all_sequences_columns"));
1516 showAllhidden.setToolTipText(MessageManager
1517 .getString("label.toggles_visibility_hidden_selected_regions"));
1518 showAllhidden.addActionListener(new ActionListener()
1521 public void actionPerformed(ActionEvent e)
1523 showAllhidden_actionPerformed(e);
1526 hiddenMarkers.setText(
1527 MessageManager.getString("action.show_hidden_markers"));
1528 hiddenMarkers.addActionListener(new ActionListener()
1531 public void actionPerformed(ActionEvent e)
1533 hiddenMarkers_actionPerformed(e);
1537 JMenuItem invertColSel = new JMenuItem(
1538 MessageManager.getString("action.invert_column_selection"));
1539 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1540 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1541 | KeyEvent.ALT_MASK,
1543 al = new ActionListener()
1546 public void actionPerformed(ActionEvent e)
1548 invertColSel_actionPerformed(e);
1551 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1553 showComplementMenuItem.setVisible(false);
1554 showComplementMenuItem.addActionListener(new ActionListener()
1557 public void actionPerformed(ActionEvent e)
1559 showComplement_actionPerformed(showComplementMenuItem.getState());
1563 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1566 public void stateChanged(ChangeEvent evt)
1568 JTabbedPane pane = (JTabbedPane) evt.getSource();
1569 int sel = pane.getSelectedIndex();
1570 tabSelectionChanged(sel);
1573 tabbedPane.addMouseListener(new MouseAdapter()
1576 public void mousePressed(MouseEvent e)
1578 if (e.isPopupTrigger()) // Mac
1580 tabbedPane_mousePressed(e);
1585 public void mouseReleased(MouseEvent e)
1587 if (e.isPopupTrigger()) // Windows
1589 tabbedPane_mousePressed(e);
1593 tabbedPane.addFocusListener(new FocusAdapter()
1596 public void focusGained(FocusEvent e)
1598 tabbedPane_focusGained(e);
1602 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1603 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1604 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1605 al = new ActionListener()
1608 public void actionPerformed(ActionEvent e)
1610 save_actionPerformed(e);
1613 addMenuActionAndAccelerator(keyStroke, save, al);
1615 reload.setEnabled(false);
1616 reload.setText(MessageManager.getString("action.reload"));
1617 reload.addActionListener(new ActionListener()
1620 public void actionPerformed(ActionEvent e)
1622 reload_actionPerformed(e);
1626 JMenuItem newView = new JMenuItem(
1627 MessageManager.getString("action.new_view"));
1628 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1629 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1630 al = new ActionListener()
1633 public void actionPerformed(ActionEvent e)
1635 newView_actionPerformed(e);
1638 addMenuActionAndAccelerator(keyStroke, newView, al);
1640 tabbedPane.setToolTipText("<html><i>"
1641 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1644 formatMenu.setText(MessageManager.getString("action.format"));
1645 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1647 idRightAlign.setText(
1648 MessageManager.getString("label.right_align_sequence_id"));
1649 idRightAlign.addActionListener(new ActionListener()
1652 public void actionPerformed(ActionEvent e)
1654 idRightAlign_actionPerformed(e);
1658 gatherViews.setEnabled(false);
1659 gatherViews.setText(MessageManager.getString("action.gather_views"));
1660 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1661 al = new ActionListener()
1664 public void actionPerformed(ActionEvent e)
1666 gatherViews_actionPerformed(e);
1669 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1671 expandViews.setEnabled(false);
1672 expandViews.setText(MessageManager.getString("action.expand_views"));
1673 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1674 al = new ActionListener()
1677 public void actionPerformed(ActionEvent e)
1679 expandViews_actionPerformed(e);
1682 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1684 JMenuItem pageSetup = new JMenuItem(
1685 MessageManager.getString("action.page_setup"));
1686 pageSetup.addActionListener(new ActionListener()
1689 public void actionPerformed(ActionEvent e)
1691 pageSetup_actionPerformed(e);
1694 JMenuItem alignmentProperties = new JMenuItem(
1695 MessageManager.getString("label.alignment_props"));
1696 alignmentProperties.addActionListener(new ActionListener()
1699 public void actionPerformed(ActionEvent actionEvent)
1701 alignmentProperties();
1704 JMenuItem selectHighlighted = new JMenuItem(
1705 MessageManager.getString("action.select_highlighted_columns"));
1706 selectHighlighted.setToolTipText(
1707 MessageManager.getString("tooltip.select_highlighted_columns"));
1708 al = new ActionListener()
1711 public void actionPerformed(ActionEvent actionEvent)
1713 selectHighlightedColumns_actionPerformed(actionEvent);
1716 selectHighlighted.addActionListener(al);
1717 JMenu tooltipSettingsMenu = new JMenu(
1718 MessageManager.getString("label.sequence_id_tooltip"));
1719 JMenu autoAnnMenu = new JMenu(
1720 MessageManager.getString("label.autocalculated_annotation"));
1722 JMenu exportImageMenu = new JMenu(
1723 MessageManager.getString("label.export_image"));
1724 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1725 alignFrameMenuBar.add(fileMenu);
1726 alignFrameMenuBar.add(editMenu);
1727 alignFrameMenuBar.add(selectMenu);
1728 alignFrameMenuBar.add(viewMenu);
1729 alignFrameMenuBar.add(annotationsMenu);
1730 alignFrameMenuBar.add(formatMenu);
1731 alignFrameMenuBar.add(colourMenu);
1732 alignFrameMenuBar.add(calculateMenu);
1733 if (!Platform.isJS())
1735 alignFrameMenuBar.add(webService);
1738 fileMenu.add(fetchSequence);
1739 fileMenu.add(addSequenceMenu);
1740 fileMenu.add(reload);
1741 fileMenu.addSeparator();
1742 fileMenu.add(vamsasStore);
1744 fileMenu.add(saveAs);
1745 fileMenu.add(outputTextboxMenu);
1746 fileMenu.add(pageSetup);
1747 fileMenu.add(printMenuItem);
1748 fileMenu.addSeparator();
1749 fileMenu.add(exportImageMenu);
1750 fileMenu.add(exportFeatures);
1751 fileMenu.add(exportAnnotations);
1752 fileMenu.add(loadTreeMenuItem);
1753 fileMenu.add(associatedData);
1754 if (!Platform.isJS())
1756 fileMenu.add(loadVcf);
1758 fileMenu.addSeparator();
1759 fileMenu.add(closeMenuItem);
1761 pasteMenu.add(pasteNew);
1762 pasteMenu.add(pasteThis);
1763 editMenu.add(undoMenuItem);
1764 editMenu.add(redoMenuItem);
1767 editMenu.add(pasteMenu);
1768 editMenu.add(delete);
1769 editMenu.addSeparator();
1770 editMenu.add(remove2LeftMenuItem);
1771 editMenu.add(remove2RightMenuItem);
1772 editMenu.add(removeGappedColumnMenuItem);
1773 editMenu.add(removeAllGapsMenuItem);
1774 editMenu.add(removeRedundancyMenuItem);
1775 editMenu.addSeparator();
1776 // dont add these yet in the CVS build - they cannot be undone!
1777 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1778 // editMenu.add(justifyLeftMenuItem);
1779 // editMenu.add(justifyRightMenuItem);
1780 // editMenu.addSeparator();
1781 editMenu.add(padGapsMenuitem);
1783 showMenu.add(showAllColumns);
1784 showMenu.add(showAllSeqs);
1785 showMenu.add(showAllhidden);
1786 hideMenu.add(hideSelColumns);
1787 hideMenu.add(hideSelSequences);
1788 hideMenu.add(hideAllSelection);
1789 hideMenu.add(hideAllButSelection);
1790 viewMenu.add(newView);
1791 viewMenu.add(expandViews);
1792 viewMenu.add(gatherViews);
1793 viewMenu.addSeparator();
1794 viewMenu.add(showMenu);
1795 viewMenu.add(hideMenu);
1796 viewMenu.add(showComplementMenuItem);
1797 viewMenu.addSeparator();
1798 viewMenu.add(followHighlightMenuItem);
1799 viewMenu.addSeparator();
1800 viewMenu.add(showSeqFeatures);
1801 // viewMenu.add(showSeqFeaturesHeight);
1802 viewMenu.add(openFeatureSettings);
1803 tooltipSettingsMenu.add(showDbRefsMenuitem);
1804 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1805 viewMenu.add(tooltipSettingsMenu);
1806 viewMenu.addSeparator();
1807 viewMenu.add(alignmentProperties);
1808 viewMenu.addSeparator();
1809 viewMenu.add(overviewMenuItem);
1811 annotationsMenu.add(annotationPanelMenuItem);
1812 annotationsMenu.addSeparator();
1813 annotationsMenu.add(showAllAlAnnotations);
1814 annotationsMenu.add(hideAllAlAnnotations);
1815 annotationsMenu.addSeparator();
1816 annotationsMenu.add(showAllSeqAnnotations);
1817 annotationsMenu.add(hideAllSeqAnnotations);
1818 annotationsMenu.add(sortAnnBySequence);
1819 annotationsMenu.add(sortAnnByLabel);
1820 annotationsMenu.addSeparator();
1821 autoAnnMenu.add(showAutoFirst);
1822 autoAnnMenu.add(showAutoLast);
1823 autoAnnMenu.addSeparator();
1824 autoAnnMenu.add(applyAutoAnnotationSettings);
1825 autoAnnMenu.add(showConsensusHistogram);
1826 autoAnnMenu.add(showSequenceLogo);
1827 autoAnnMenu.add(normaliseSequenceLogo);
1828 autoAnnMenu.addSeparator();
1829 autoAnnMenu.add(showGroupConservation);
1830 autoAnnMenu.add(showGroupConsensus);
1831 annotationsMenu.add(autoAnnMenu);
1833 sort.add(sortIDMenuItem);
1834 sort.add(sortLengthMenuItem);
1835 sort.add(sortGroupMenuItem);
1836 sort.add(sortPairwiseMenuItem);
1837 sort.add(sortByTreeMenu);
1838 calculateMenu.add(sort);
1839 calculateMenu.add(calculateTree);
1840 calculateMenu.addSeparator();
1841 calculateMenu.add(pairwiseAlignmentMenuItem);
1842 calculateMenu.addSeparator();
1843 calculateMenu.add(showTranslation);
1844 calculateMenu.add(showReverse);
1845 calculateMenu.add(showReverseComplement);
1846 calculateMenu.add(showProducts);
1847 calculateMenu.add(autoCalculate);
1848 calculateMenu.add(sortByTree);
1849 calculateMenu.addSeparator();
1850 calculateMenu.add(expandAlignment);
1851 calculateMenu.add(extractScores);
1852 if (!Platform.isJS())
1854 calculateMenu.addSeparator();
1855 calculateMenu.add(runGroovy);
1858 webServiceNoServices = new JMenuItem(
1859 MessageManager.getString("label.no_services"));
1860 webService.add(webServiceNoServices);
1861 if (!Platform.isJS())
1863 exportImageMenu.add(htmlMenuItem);
1865 exportImageMenu.add(epsFile);
1866 exportImageMenu.add(createPNG);
1867 if (!Platform.isJS())
1869 exportImageMenu.add(createBioJS);
1870 exportImageMenu.add(createSVG);
1872 addSequenceMenu.add(addFromFile);
1873 addSequenceMenu.add(addFromText);
1874 addSequenceMenu.add(addFromURL);
1875 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1876 statusPanel.add(statusBar, null);
1877 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1879 formatMenu.add(font);
1880 formatMenu.addSeparator();
1881 formatMenu.add(wrapMenuItem);
1882 formatMenu.add(scaleAbove);
1883 formatMenu.add(scaleLeft);
1884 formatMenu.add(scaleRight);
1885 formatMenu.add(seqLimits);
1886 formatMenu.add(idRightAlign);
1887 formatMenu.add(hiddenMarkers);
1888 formatMenu.add(viewBoxesMenuItem);
1889 formatMenu.add(viewTextMenuItem);
1890 formatMenu.add(colourTextMenuItem);
1891 formatMenu.add(renderGapsMenuItem);
1892 formatMenu.add(centreColumnLabelsMenuItem);
1893 formatMenu.add(showNonconservedMenuItem);
1894 selectMenu.add(findMenuItem);
1895 selectMenu.addSeparator();
1896 selectMenu.add(selectAllSequenceMenuItem);
1897 selectMenu.add(deselectAllSequenceMenuItem);
1898 selectMenu.add(invertSequenceMenuItem);
1899 selectMenu.add(invertColSel);
1900 selectMenu.add(createGroup);
1901 selectMenu.add(unGroup);
1902 selectMenu.add(grpsFromSelection);
1903 selectMenu.add(deleteGroups);
1904 selectMenu.add(annotationColumn);
1905 selectMenu.add(selectHighlighted);
1906 // TODO - determine if the listenToViewSelections button is needed : see bug
1908 // selectMenu.addSeparator();
1909 // selectMenu.add(listenToViewSelections);
1912 protected void loadVcf_actionPerformed()
1917 * Constructs the entries on the Colour menu (but does not add them to the
1920 protected void initColourMenu()
1922 applyToAllGroups = new JCheckBoxMenuItem(
1923 MessageManager.getString("label.apply_colour_to_all_groups"));
1924 applyToAllGroups.addActionListener(new ActionListener()
1927 public void actionPerformed(ActionEvent e)
1929 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1933 textColour = new JMenuItem(
1934 MessageManager.getString("label.text_colour"));
1935 textColour.addActionListener(new ActionListener()
1938 public void actionPerformed(ActionEvent e)
1940 textColour_actionPerformed();
1944 conservationMenuItem = new JCheckBoxMenuItem(
1945 MessageManager.getString("action.by_conservation"));
1946 conservationMenuItem.addActionListener(new ActionListener()
1949 public void actionPerformed(ActionEvent e)
1951 conservationMenuItem_actionPerformed(
1952 conservationMenuItem.isSelected());
1956 abovePIDThreshold = new JCheckBoxMenuItem(
1957 MessageManager.getString("label.above_identity_threshold"));
1958 abovePIDThreshold.addActionListener(new ActionListener()
1961 public void actionPerformed(ActionEvent e)
1963 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1966 modifyPID = new JMenuItem(
1967 MessageManager.getString("label.modify_identity_threshold"));
1968 modifyPID.addActionListener(new ActionListener()
1971 public void actionPerformed(ActionEvent e)
1973 modifyPID_actionPerformed();
1976 modifyConservation = new JMenuItem(MessageManager
1977 .getString("label.modify_conservation_threshold"));
1978 modifyConservation.addActionListener(new ActionListener()
1981 public void actionPerformed(ActionEvent e)
1983 modifyConservation_actionPerformed();
1987 annotationColour = new JRadioButtonMenuItem(
1988 MessageManager.getString("action.by_annotation"));
1989 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
1990 annotationColour.addActionListener(new ActionListener()
1993 public void actionPerformed(ActionEvent e)
1995 annotationColour_actionPerformed();
2000 protected void selectHighlightedColumns_actionPerformed(
2001 ActionEvent actionEvent)
2003 // TODO Auto-generated method stub
2008 * Generate the reverse sequence (or reverse complement if the flag is true)
2009 * and add it to the alignment
2013 protected void showReverse_actionPerformed(boolean complement)
2018 * Try to run script in a Groovy console, having first ensured that this
2019 * alignframe is set as currentAlignFrame in Desktop
2021 protected void runGroovy_actionPerformed()
2027 * Adds the given action listener and key accelerator to the given menu item.
2028 * Also saves in a lookup table to support lookup of action by key stroke.
2032 * @param actionListener
2034 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2035 JMenuItem menuItem, ActionListener actionListener)
2037 menuItem.setAccelerator(keyStroke);
2038 accelerators.put(keyStroke, menuItem);
2039 menuItem.addActionListener(actionListener);
2043 * Action on clicking sort annotations by type.
2047 protected void sortAnnotations_actionPerformed()
2052 * Action on clicking Show all annotations.
2054 * @param forSequences
2055 * update sequence-related annotations
2056 * @param forAlignment
2057 * update non-sequence-related annotations
2059 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2060 boolean forAlignment)
2062 setAnnotationsVisibility(true, forSequences, forAlignment);
2066 * Action on clicking Hide all annotations.
2068 * @param forSequences
2069 * update sequence-related annotations
2070 * @param forAlignment
2071 * update non-sequence-related annotations
2073 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2074 boolean forAlignment)
2076 setAnnotationsVisibility(false, forSequences, forAlignment);
2080 * Set the visibility of annotations to true or false. Can act on
2081 * sequence-related annotations, or alignment-related, or both.
2084 * @param forSequences
2085 * update sequence-related annotations
2086 * @param forAlignment
2087 * update non-sequence-related annotations
2089 protected void setAnnotationsVisibility(boolean visible,
2090 boolean forSequences, boolean forAlignment)
2095 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2097 // TODO Auto-generated method stub
2101 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2103 // TODO Auto-generated method stub
2107 protected void showAllhidden_actionPerformed(ActionEvent e)
2109 // TODO Auto-generated method stub
2113 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2115 // TODO Auto-generated method stub
2119 protected void hideAllSelection_actionPerformed(ActionEvent e)
2121 // TODO Auto-generated method stub
2125 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2127 // TODO Auto-generated method stub
2131 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2133 // TODO Auto-generated method stub
2137 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2139 // TODO Auto-generated method stub
2143 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2145 // TODO Auto-generated method stub
2149 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2151 // TODO Auto-generated method stub
2155 protected void showGroupConservation_actionPerformed(ActionEvent e)
2157 // TODO Auto-generated method stub
2161 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2163 // TODO Auto-generated method stub
2167 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2169 // TODO Auto-generated method stub
2173 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2175 // TODO Auto-generated method stub
2179 protected void followHighlight_actionPerformed()
2181 // TODO Auto-generated method stub
2185 protected void showNpFeats_actionPerformed(ActionEvent e)
2187 // TODO Auto-generated method stub
2191 protected void showDbRefs_actionPerformed(ActionEvent e)
2193 // TODO Auto-generated method stub
2197 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2201 protected void buildSortByAnnotationScoresMenu()
2205 protected void extractScores_actionPerformed(ActionEvent e)
2209 protected void outputText_actionPerformed(String formatName)
2213 public void addFromFile_actionPerformed(ActionEvent e)
2218 public void addFromText_actionPerformed(ActionEvent e)
2223 public void addFromURL_actionPerformed(ActionEvent e)
2228 public void exportFeatures_actionPerformed(ActionEvent e)
2233 public void exportAnnotations_actionPerformed(ActionEvent e)
2238 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2242 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2247 protected void closeMenuItem_actionPerformed(boolean b)
2251 protected void redoMenuItem_actionPerformed(ActionEvent e)
2255 protected void undoMenuItem_actionPerformed(ActionEvent e)
2259 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2263 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2267 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2271 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2275 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2279 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2283 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2287 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2291 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2295 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2299 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2303 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2307 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2311 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2315 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2319 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2323 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2327 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2331 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2335 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2339 protected void conservationMenuItem_actionPerformed(boolean selected)
2343 protected void printMenuItem_actionPerformed(ActionEvent e)
2347 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2351 protected void findMenuItem_actionPerformed(ActionEvent e)
2355 protected void abovePIDThreshold_actionPerformed(boolean selected)
2359 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2363 protected void deleteGroups_actionPerformed(ActionEvent e)
2367 protected void createGroup_actionPerformed(ActionEvent e)
2371 protected void unGroup_actionPerformed(ActionEvent e)
2375 protected void copy_actionPerformed()
2379 protected void cut_actionPerformed()
2383 protected void delete_actionPerformed()
2387 protected void pasteNew_actionPerformed(ActionEvent e)
2391 protected void pasteThis_actionPerformed(ActionEvent e)
2395 protected void applyToAllGroups_actionPerformed(boolean selected)
2399 public void createPNG(java.io.File f)
2403 protected void font_actionPerformed(ActionEvent e)
2407 protected void seqLimit_actionPerformed(ActionEvent e)
2411 public void seqDBRef_actionPerformed(ActionEvent e)
2416 public void createEPS(java.io.File f)
2420 public void createSVG(java.io.File f)
2425 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2431 * Template method to handle the 'load T-Coffee scores' menu event.
2433 * Subclasses override this method to provide a custom action.
2438 protected void loadScores_actionPerformed(ActionEvent event)
2443 protected void jpred_actionPerformed(ActionEvent e)
2447 protected void scaleAbove_actionPerformed(ActionEvent e)
2451 protected void scaleLeft_actionPerformed(ActionEvent e)
2455 protected void scaleRight_actionPerformed(ActionEvent e)
2459 protected void modifyPID_actionPerformed()
2463 protected void modifyConservation_actionPerformed()
2467 protected void saveAs_actionPerformed()
2471 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2475 public void vamsasStore_actionPerformed(ActionEvent e)
2480 public void vamsasLoad_actionPerformed(ActionEvent e)
2485 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2490 public void featureSettings_actionPerformed(ActionEvent e)
2495 public void fetchSequence_actionPerformed()
2500 public void smoothFont_actionPerformed(ActionEvent e)
2505 public void annotationColour_actionPerformed()
2509 public void annotationColumn_actionPerformed(ActionEvent e)
2513 public void associatedData_actionPerformed(ActionEvent e)
2518 public void autoCalculate_actionPerformed(ActionEvent e)
2523 public void sortByTreeOption_actionPerformed(ActionEvent e)
2528 public void showAllSeqs_actionPerformed(ActionEvent e)
2533 public void showAllColumns_actionPerformed(ActionEvent e)
2538 public void hideSelSequences_actionPerformed(ActionEvent e)
2543 public void hideSelColumns_actionPerformed(ActionEvent e)
2548 public void hiddenMarkers_actionPerformed(ActionEvent e)
2553 public void findPdbId_actionPerformed(ActionEvent e)
2558 public void enterPdbId_actionPerformed(ActionEvent e)
2563 public void pdbFile_actionPerformed(ActionEvent e)
2568 public void invertColSel_actionPerformed(ActionEvent e)
2573 public void tabSelectionChanged(int sel)
2578 public void tabbedPane_mousePressed(MouseEvent e)
2583 public void tabbedPane_focusGained(FocusEvent e)
2588 public void save_actionPerformed(ActionEvent e)
2593 public void reload_actionPerformed(ActionEvent e)
2598 public void newView_actionPerformed(ActionEvent e)
2603 public void textColour_actionPerformed()
2608 public void idRightAlign_actionPerformed(ActionEvent e)
2613 public void expandViews_actionPerformed(ActionEvent e)
2618 public void gatherViews_actionPerformed(ActionEvent e)
2623 public void buildTreeSortMenu()
2628 public void pageSetup_actionPerformed(ActionEvent e)
2633 public void alignmentProperties()
2638 protected void expand_newalign(ActionEvent e)
2640 // TODO Auto-generated method stub
2644 protected boolean isShowAutoCalculatedAbove()
2646 return showAutoCalculatedAbove;
2649 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2651 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2654 protected SequenceAnnotationOrder getAnnotationSortOrder()
2656 return annotationSortOrder;
2659 protected void setAnnotationSortOrder(
2660 SequenceAnnotationOrder annotationSortOrder)
2662 this.annotationSortOrder = annotationSortOrder;
2665 public Map<KeyStroke, JMenuItem> getAccelerators()
2667 return this.accelerators;
2671 * Returns the selected index of the tabbed pane, or -1 if none selected
2672 * (including the case where the tabbed pane has not been made visible).
2676 public int getTabIndex()
2678 return tabbedPane.getSelectedIndex();
2681 public JPanel getStatusPanel()
2687 * Sets a reference to the containing split frame. Also makes the 'toggle
2688 * split view' menu item visible and checked.
2692 public void setSplitFrame(SplitContainerI sf)
2694 this.splitFrame = sf;
2697 this.showComplementMenuItem.setVisible(true);
2698 this.showComplementMenuItem.setState(true);
2702 public SplitContainerI getSplitViewContainer()
2704 return this.splitFrame;
2707 protected void showComplement_actionPerformed(boolean complement)