2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import java.awt.BorderLayout;
24 import java.awt.Color;
25 import java.awt.GridLayout;
26 import java.awt.event.ActionEvent;
27 import java.awt.event.ActionListener;
28 import java.awt.event.FocusAdapter;
29 import java.awt.event.FocusEvent;
30 import java.awt.event.InputEvent;
31 import java.awt.event.KeyEvent;
32 import java.awt.event.MouseAdapter;
33 import java.awt.event.MouseEvent;
34 import java.util.HashMap;
37 import javax.swing.BorderFactory;
38 import javax.swing.ButtonGroup;
39 import javax.swing.JCheckBoxMenuItem;
40 import javax.swing.JInternalFrame;
41 import javax.swing.JLabel;
42 import javax.swing.JMenu;
43 import javax.swing.JMenuBar;
44 import javax.swing.JMenuItem;
45 import javax.swing.JPanel;
46 import javax.swing.JRadioButtonMenuItem;
47 import javax.swing.JTabbedPane;
48 import javax.swing.KeyStroke;
49 import javax.swing.event.ChangeEvent;
50 import javax.swing.event.MenuEvent;
51 import javax.swing.event.MenuListener;
53 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
54 import jalview.analysis.GeneticCodeI;
55 import jalview.analysis.GeneticCodes;
56 import jalview.api.SplitContainerI;
57 import jalview.bin.Cache;
58 import jalview.gui.JvSwingUtils;
59 import jalview.gui.Preferences;
60 import jalview.io.FileFormats;
61 import jalview.schemes.ResidueColourScheme;
62 import jalview.util.MessageManager;
63 import jalview.util.Platform;
65 @SuppressWarnings("serial")
66 public class GAlignFrame extends JInternalFrame
68 protected JMenuBar alignFrameMenuBar = new JMenuBar();
70 protected JMenuItem closeMenuItem = new JMenuItem();
72 public JMenu webService = new JMenu();// BH 2019 was protected, but not
73 // sufficient for AlignFrame thread run
75 public JMenuItem webServiceNoServices;// BH 2019 was protected, but not
76 // sufficient for AlignFrame thread run
78 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
80 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
82 protected JMenu sortByAnnotScore = new JMenu();
84 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
86 // AlignFrame.printWriter
88 protected JMenu outputTextboxMenu = new JMenu();
90 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
92 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
94 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
96 protected JMenuItem undoMenuItem = new JMenuItem();
98 protected JMenuItem redoMenuItem = new JMenuItem();
100 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
102 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
104 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
106 JMenuItem copy = new JMenuItem();
108 JMenuItem cut = new JMenuItem();
110 JMenu pasteMenu = new JMenu();
112 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
114 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
116 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
118 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
120 protected JCheckBoxMenuItem applyToAllGroups;
122 protected JMenu colourMenu = new JMenu();
124 protected JMenuItem textColour;
126 protected JCheckBoxMenuItem conservationMenuItem;
128 protected JMenuItem modifyConservation;
130 protected JCheckBoxMenuItem abovePIDThreshold;
132 protected JMenuItem modifyPID;
134 protected JRadioButtonMenuItem annotationColour;
136 protected JMenu sortByTreeMenu = new JMenu();
138 protected JMenu sort = new JMenu();
140 protected JMenuItem calculateTree = new JMenuItem();
142 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
144 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
146 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
148 protected JMenu showTranslation = new JMenu();
150 protected JMenuItem showReverse = new JMenuItem();
152 protected JMenuItem showReverseComplement = new JMenuItem();
154 protected JMenu showProducts = new JMenu();
156 protected JMenuItem runGroovy = new JMenuItem();
158 protected JMenuItem loadVcf;
160 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
162 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
164 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
166 protected JPanel statusPanel = new JPanel();
168 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
170 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
172 protected JMenuItem showAllAlAnnotations = new JMenuItem();
174 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
176 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
178 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
180 protected JTabbedPane tabbedPane = new JTabbedPane();
182 protected JMenuItem reload = new JMenuItem();
184 protected JMenu formatMenu = new JMenu();
186 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
188 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
190 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
192 protected JMenuItem gatherViews = new JMenuItem();
194 protected JMenuItem expandViews = new JMenuItem();
196 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
198 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
200 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
202 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
204 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
206 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
208 protected JMenuItem openFeatureSettings;
210 private SequenceAnnotationOrder annotationSortOrder;
212 private boolean showAutoCalculatedAbove = false;
214 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
216 private SplitContainerI splitFrame;
223 // for Web-page embedding using id=align-frame-div
224 setName(Platform.getAppID("alignment"));
228 setJMenuBar(alignFrameMenuBar);
230 // dynamically fill save as menu with available formats
231 for (String ff : FileFormats.getInstance().getWritableFormats(true))
233 JMenuItem item = new JMenuItem(ff);
235 item.addActionListener(new ActionListener()
238 public void actionPerformed(ActionEvent e)
240 outputText_actionPerformed(e.getActionCommand());
244 outputTextboxMenu.add(item);
246 } catch (Exception e)
248 System.err.println(e.toString());
251 if (Platform.allowMnemonics()) // was "not mac and not JS"
253 closeMenuItem.setMnemonic('C');
254 outputTextboxMenu.setMnemonic('T');
255 undoMenuItem.setMnemonic('Z');
256 redoMenuItem.setMnemonic('0');
257 copy.setMnemonic('C');
258 cut.setMnemonic('U');
259 pasteMenu.setMnemonic('P');
260 reload.setMnemonic('R');
264 private void jbInit() throws Exception
268 JMenuItem saveAs = new JMenuItem(
269 MessageManager.getString("action.save_as"));
270 ActionListener al = new ActionListener()
273 public void actionPerformed(ActionEvent e)
275 saveAs_actionPerformed();
279 // FIXME getDefaultToolkit throws an exception in Headless mode
280 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Platform.SHORTCUT_KEY_MASK | InputEvent.SHIFT_DOWN_MASK,
282 addMenuActionAndAccelerator(keyStroke, saveAs, al);
284 closeMenuItem.setText(MessageManager.getString("action.close"));
285 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W, Platform.SHORTCUT_KEY_MASK, false);
286 al = new ActionListener()
289 public void actionPerformed(ActionEvent e)
291 closeMenuItem_actionPerformed(false);
294 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
296 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
297 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
298 JMenu annotationsMenu = new JMenu(
299 MessageManager.getString("action.annotations"));
300 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
301 colourMenu.setText(MessageManager.getString("action.colour"));
302 JMenu calculateMenu = new JMenu(
303 MessageManager.getString("action.calculate"));
304 webService.setText(MessageManager.getString("action.web_service"));
305 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
306 MessageManager.getString("action.select_all"));
307 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
308 Platform.SHORTCUT_KEY_MASK, false);
309 al = new ActionListener()
312 public void actionPerformed(ActionEvent e)
314 selectAllSequenceMenuItem_actionPerformed(e);
317 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
319 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
320 MessageManager.getString("action.deselect_all"));
321 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
322 al = new ActionListener()
325 public void actionPerformed(ActionEvent e)
327 deselectAllSequenceMenuItem_actionPerformed(e);
330 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
332 JMenuItem invertSequenceMenuItem = new JMenuItem(
333 MessageManager.getString("action.invert_sequence_selection"));
334 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
335 Platform.SHORTCUT_KEY_MASK, false);
336 al = new ActionListener()
339 public void actionPerformed(ActionEvent e)
341 invertSequenceMenuItem_actionPerformed(e);
344 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
346 JMenuItem grpsFromSelection = new JMenuItem(
347 MessageManager.getString("action.make_groups_selection"));
348 grpsFromSelection.addActionListener(new ActionListener()
351 public void actionPerformed(ActionEvent e)
353 makeGrpsFromSelection_actionPerformed(e);
356 JMenuItem expandAlignment = new JMenuItem(
357 MessageManager.getString("action.view_flanking_regions"));
358 expandAlignment.setToolTipText(
359 MessageManager.getString("label.view_flanking_regions"));
360 expandAlignment.addActionListener(new ActionListener()
363 public void actionPerformed(ActionEvent e)
368 JMenuItem remove2LeftMenuItem = new JMenuItem(
369 MessageManager.getString("action.remove_left"));
370 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
371 Platform.SHORTCUT_KEY_MASK, false);
372 al = new ActionListener()
375 public void actionPerformed(ActionEvent e)
377 remove2LeftMenuItem_actionPerformed(e);
380 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
382 JMenuItem remove2RightMenuItem = new JMenuItem(
383 MessageManager.getString("action.remove_right"));
384 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
385 Platform.SHORTCUT_KEY_MASK, false);
386 al = new ActionListener()
389 public void actionPerformed(ActionEvent e)
391 remove2RightMenuItem_actionPerformed(e);
394 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
396 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
397 MessageManager.getString("action.remove_empty_columns"));
398 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
399 Platform.SHORTCUT_KEY_MASK, false);
400 al = new ActionListener()
403 public void actionPerformed(ActionEvent e)
405 removeGappedColumnMenuItem_actionPerformed(e);
408 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
410 JMenuItem removeAllGapsMenuItem = new JMenuItem(
411 MessageManager.getString("action.remove_all_gaps"));
412 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
413 Platform.SHORTCUT_KEY_MASK
414 | InputEvent.SHIFT_DOWN_MASK,
416 al = new ActionListener()
419 public void actionPerformed(ActionEvent e)
421 removeAllGapsMenuItem_actionPerformed(e);
424 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
426 JMenuItem justifyLeftMenuItem = new JMenuItem(
427 MessageManager.getString("action.left_justify_alignment"));
428 justifyLeftMenuItem.addActionListener(new ActionListener()
431 public void actionPerformed(ActionEvent e)
433 justifyLeftMenuItem_actionPerformed(e);
436 JMenuItem justifyRightMenuItem = new JMenuItem(
437 MessageManager.getString("action.right_justify_alignment"));
438 justifyRightMenuItem.addActionListener(new ActionListener()
441 public void actionPerformed(ActionEvent e)
443 justifyRightMenuItem_actionPerformed(e);
446 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
447 viewBoxesMenuItem.setState(true);
448 viewBoxesMenuItem.addActionListener(new ActionListener()
451 public void actionPerformed(ActionEvent e)
453 viewBoxesMenuItem_actionPerformed(e);
456 viewTextMenuItem.setText(MessageManager.getString("action.text"));
457 viewTextMenuItem.setState(true);
458 viewTextMenuItem.addActionListener(new ActionListener()
461 public void actionPerformed(ActionEvent e)
463 viewTextMenuItem_actionPerformed(e);
466 showNonconservedMenuItem
467 .setText(MessageManager.getString("label.show_non_conserved"));
468 showNonconservedMenuItem.setState(false);
469 showNonconservedMenuItem.addActionListener(new ActionListener()
472 public void actionPerformed(ActionEvent e)
474 showUnconservedMenuItem_actionPerformed(e);
477 JMenuItem sortPairwiseMenuItem = new JMenuItem(
478 MessageManager.getString("action.by_pairwise_id"));
479 sortPairwiseMenuItem.addActionListener(new ActionListener()
482 public void actionPerformed(ActionEvent e)
484 sortPairwiseMenuItem_actionPerformed(e);
487 JMenuItem sortIDMenuItem = new JMenuItem(
488 MessageManager.getString("action.by_id"));
489 sortIDMenuItem.addActionListener(new ActionListener()
492 public void actionPerformed(ActionEvent e)
494 sortIDMenuItem_actionPerformed(e);
497 JMenuItem sortLengthMenuItem = new JMenuItem(
498 MessageManager.getString("action.by_length"));
499 sortLengthMenuItem.addActionListener(new ActionListener()
502 public void actionPerformed(ActionEvent e)
504 sortLengthMenuItem_actionPerformed(e);
507 JMenuItem sortGroupMenuItem = new JMenuItem(
508 MessageManager.getString("action.by_group"));
509 sortGroupMenuItem.addActionListener(new ActionListener()
512 public void actionPerformed(ActionEvent e)
514 sortGroupMenuItem_actionPerformed(e);
518 JMenuItem removeRedundancyMenuItem = new JMenuItem(
519 MessageManager.getString("action.remove_redundancy"));
520 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
521 Platform.SHORTCUT_KEY_MASK, false);
522 al = new ActionListener()
525 public void actionPerformed(ActionEvent e)
527 removeRedundancyMenuItem_actionPerformed(e);
530 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
532 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
533 MessageManager.getString("action.pairwise_alignment"));
534 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
537 public void actionPerformed(ActionEvent e)
539 pairwiseAlignmentMenuItem_actionPerformed(e);
543 this.getContentPane().setLayout(new BorderLayout());
544 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
545 statusBar.setBackground(Color.white);
546 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
547 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
548 statusBar.setText(MessageManager.getString("label.status_bar"));
550 .setText(MessageManager.getString("label.out_to_textbox"));
552 annotationPanelMenuItem.setActionCommand("");
553 annotationPanelMenuItem
554 .setText(MessageManager.getString("label.show_annotations"));
555 annotationPanelMenuItem
556 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
557 annotationPanelMenuItem.addActionListener(new ActionListener()
560 public void actionPerformed(ActionEvent e)
562 annotationPanelMenuItem_actionPerformed(e);
565 showAllAlAnnotations.setText(
566 MessageManager.getString("label.show_all_al_annotations"));
567 final boolean isAnnotationPanelShown = annotationPanelMenuItem
569 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
570 showAllAlAnnotations.addActionListener(new ActionListener()
573 public void actionPerformed(ActionEvent e)
575 showAllAnnotations_actionPerformed(false, true);
578 hideAllAlAnnotations.setText(
579 MessageManager.getString("label.hide_all_al_annotations"));
580 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
581 hideAllAlAnnotations.addActionListener(new ActionListener()
584 public void actionPerformed(ActionEvent e)
586 hideAllAnnotations_actionPerformed(false, true);
589 showAllSeqAnnotations.setText(
590 MessageManager.getString("label.show_all_seq_annotations"));
591 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
592 showAllSeqAnnotations.addActionListener(new ActionListener()
595 public void actionPerformed(ActionEvent e)
597 showAllAnnotations_actionPerformed(true, false);
600 hideAllSeqAnnotations.setText(
601 MessageManager.getString("label.hide_all_seq_annotations"));
602 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
603 hideAllSeqAnnotations.addActionListener(new ActionListener()
606 public void actionPerformed(ActionEvent e)
608 hideAllAnnotations_actionPerformed(true, false);
611 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
612 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
613 SequenceAnnotationOrder.NONE.name()));
614 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
615 MessageManager.getString("label.sort_annotations_by_sequence"));
616 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
617 MessageManager.getString("label.sort_annotations_by_label"));
619 sortAnnBySequence.setSelected(
620 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
621 sortAnnBySequence.addActionListener(new ActionListener()
624 public void actionPerformed(ActionEvent e)
626 boolean newState = sortAnnBySequence.getState();
627 sortAnnByLabel.setSelected(false);
628 setAnnotationSortOrder(
629 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
630 : SequenceAnnotationOrder.NONE);
631 sortAnnotations_actionPerformed();
634 sortAnnByLabel.setSelected(
635 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
636 sortAnnByLabel.addActionListener(new ActionListener()
639 public void actionPerformed(ActionEvent e)
641 boolean newState = sortAnnByLabel.getState();
642 sortAnnBySequence.setSelected(false);
643 setAnnotationSortOrder(
644 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
645 : SequenceAnnotationOrder.NONE);
646 sortAnnotations_actionPerformed();
649 colourTextMenuItem = new JCheckBoxMenuItem(
650 MessageManager.getString("label.colour_text"));
651 colourTextMenuItem.addActionListener(new ActionListener()
654 public void actionPerformed(ActionEvent e)
656 colourTextMenuItem_actionPerformed(e);
660 JMenuItem htmlMenuItem = new JMenuItem(
661 MessageManager.getString("label.html"));
662 htmlMenuItem.addActionListener(new ActionListener()
665 public void actionPerformed(ActionEvent e)
667 htmlMenuItem_actionPerformed(e);
671 JMenuItem createBioJS = new JMenuItem(
672 MessageManager.getString("label.biojs_html_export"));
673 createBioJS.addActionListener(new java.awt.event.ActionListener()
676 public void actionPerformed(ActionEvent e)
678 bioJSMenuItem_actionPerformed(e);
682 JMenuItem overviewMenuItem = new JMenuItem(
683 MessageManager.getString("label.overview_window"));
684 overviewMenuItem.addActionListener(new ActionListener()
687 public void actionPerformed(ActionEvent e)
689 overviewMenuItem_actionPerformed(e);
693 undoMenuItem.setEnabled(false);
694 undoMenuItem.setText(MessageManager.getString("action.undo"));
695 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
696 Platform.SHORTCUT_KEY_MASK, false);
697 al = new ActionListener()
700 public void actionPerformed(ActionEvent e)
702 undoMenuItem_actionPerformed(e);
705 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
707 redoMenuItem.setEnabled(false);
708 redoMenuItem.setText(MessageManager.getString("action.redo"));
709 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
710 Platform.SHORTCUT_KEY_MASK, false);
711 al = new ActionListener()
714 public void actionPerformed(ActionEvent e)
716 redoMenuItem_actionPerformed(e);
719 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
721 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
722 wrapMenuItem.addActionListener(new ActionListener()
725 public void actionPerformed(ActionEvent e)
727 wrapMenuItem_actionPerformed(e);
731 JMenuItem printMenuItem = new JMenuItem(
732 MessageManager.getString("action.print"));
733 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
734 Platform.SHORTCUT_KEY_MASK, false);
735 al = new ActionListener()
738 public void actionPerformed(ActionEvent e)
740 printMenuItem_actionPerformed(e);
743 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
746 .setText(MessageManager.getString("action.show_gaps"));
747 renderGapsMenuItem.setState(true);
748 renderGapsMenuItem.addActionListener(new ActionListener()
751 public void actionPerformed(ActionEvent e)
753 renderGapsMenuItem_actionPerformed(e);
757 JMenuItem findMenuItem = new JMenuItem(
758 MessageManager.getString("action.find"));
759 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
760 Platform.SHORTCUT_KEY_MASK, false);
761 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
762 MessageManager.getString("label.find_tip")));
763 al = new ActionListener()
766 public void actionPerformed(ActionEvent e)
768 findMenuItem_actionPerformed(e);
771 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
773 showSeqFeatures.setText(
774 MessageManager.getString("label.show_sequence_features"));
775 showSeqFeatures.addActionListener(new ActionListener()
778 public void actionPerformed(ActionEvent actionEvent)
780 showSeqFeatures_actionPerformed(actionEvent);
784 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
785 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
786 * void actionPerformed(ActionEvent actionEvent) {
787 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
790 .setText(MessageManager.getString("label.show_database_refs"));
791 showDbRefsMenuitem.addActionListener(new ActionListener()
795 public void actionPerformed(ActionEvent e)
797 showDbRefs_actionPerformed(e);
801 showNpFeatsMenuitem.setText(
802 MessageManager.getString("label.show_non_positional_features"));
803 showNpFeatsMenuitem.addActionListener(new ActionListener()
807 public void actionPerformed(ActionEvent e)
809 showNpFeats_actionPerformed(e);
813 showGroupConservation
814 .setText(MessageManager.getString("label.group_conservation"));
815 showGroupConservation.addActionListener(new ActionListener()
819 public void actionPerformed(ActionEvent e)
821 showGroupConservation_actionPerformed(e);
827 .setText(MessageManager.getString("label.group_consensus"));
828 showGroupConsensus.addActionListener(new ActionListener()
832 public void actionPerformed(ActionEvent e)
834 showGroupConsensus_actionPerformed(e);
838 showConsensusHistogram.setText(
839 MessageManager.getString("label.show_consensus_histogram"));
840 showConsensusHistogram.addActionListener(new ActionListener()
844 public void actionPerformed(ActionEvent e)
846 showConsensusHistogram_actionPerformed(e);
851 .setText(MessageManager.getString("label.show_consensus_logo"));
852 showSequenceLogo.addActionListener(new ActionListener()
856 public void actionPerformed(ActionEvent e)
858 showSequenceLogo_actionPerformed(e);
862 normaliseSequenceLogo
863 .setText(MessageManager.getString("label.norm_consensus_logo"));
864 normaliseSequenceLogo.addActionListener(new ActionListener()
868 public void actionPerformed(ActionEvent e)
870 normaliseSequenceLogo_actionPerformed(e);
874 applyAutoAnnotationSettings
875 .setText(MessageManager.getString("label.apply_all_groups"));
876 applyAutoAnnotationSettings.setState(false);
877 applyAutoAnnotationSettings.setVisible(true);
878 applyAutoAnnotationSettings.addActionListener(new ActionListener()
881 public void actionPerformed(ActionEvent e)
883 applyAutoAnnotationSettings_actionPerformed(e);
887 ButtonGroup buttonGroup = new ButtonGroup();
888 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
889 MessageManager.getString("label.show_first"));
890 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
891 MessageManager.getString("label.show_last"));
892 buttonGroup.add(showAutoFirst);
893 buttonGroup.add(showAutoLast);
894 final boolean autoFirst = Cache
895 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
896 showAutoFirst.setSelected(autoFirst);
897 setShowAutoCalculatedAbove(autoFirst);
898 showAutoFirst.addActionListener(new ActionListener()
901 public void actionPerformed(ActionEvent e)
903 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
904 sortAnnotations_actionPerformed();
907 showAutoLast.setSelected(!showAutoFirst.isSelected());
908 showAutoLast.addActionListener(new ActionListener()
911 public void actionPerformed(ActionEvent e)
913 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
914 sortAnnotations_actionPerformed();
918 JMenuItem deleteGroups = new JMenuItem(
919 MessageManager.getString("action.undefine_groups"));
920 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
921 Platform.SHORTCUT_KEY_MASK, false);
922 al = new ActionListener()
925 public void actionPerformed(ActionEvent e)
927 deleteGroups_actionPerformed(e);
930 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
932 JMenuItem annotationColumn = new JMenuItem(
933 MessageManager.getString("action.select_by_annotation"));
934 annotationColumn.addActionListener(new ActionListener()
937 public void actionPerformed(ActionEvent e)
939 annotationColumn_actionPerformed(e);
943 JMenuItem createGroup = new JMenuItem(
944 MessageManager.getString("action.create_group"));
945 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
946 Platform.SHORTCUT_KEY_MASK, false);
947 al = new ActionListener()
950 public void actionPerformed(ActionEvent e)
952 createGroup_actionPerformed(e);
955 addMenuActionAndAccelerator(keyStroke, createGroup, al);
957 JMenuItem unGroup = new JMenuItem(
958 MessageManager.getString("action.remove_group"));
959 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
960 Platform.SHORTCUT_KEY_MASK
961 | InputEvent.SHIFT_DOWN_MASK,
963 al = new ActionListener()
966 public void actionPerformed(ActionEvent e)
968 unGroup_actionPerformed(e);
971 addMenuActionAndAccelerator(keyStroke, unGroup, al);
973 copy.setText(MessageManager.getString("action.copy"));
974 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
975 Platform.SHORTCUT_KEY_MASK, false);
977 al = new ActionListener()
980 public void actionPerformed(ActionEvent e)
982 copy_actionPerformed();
985 addMenuActionAndAccelerator(keyStroke, copy, al);
987 cut.setText(MessageManager.getString("action.cut"));
988 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
989 Platform.SHORTCUT_KEY_MASK, false);
990 al = new ActionListener()
993 public void actionPerformed(ActionEvent e)
995 cut_actionPerformed();
998 addMenuActionAndAccelerator(keyStroke, cut, al);
1000 JMenuItem delete = new JMenuItem(
1001 MessageManager.getString("action.delete"));
1002 delete.addActionListener(new ActionListener()
1005 public void actionPerformed(ActionEvent e)
1007 delete_actionPerformed();
1011 pasteMenu.setText(MessageManager.getString("action.paste"));
1012 JMenuItem pasteNew = new JMenuItem(
1013 MessageManager.getString("label.to_new_alignment"));
1014 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1015 Platform.SHORTCUT_KEY_MASK
1016 | InputEvent.SHIFT_DOWN_MASK,
1018 al = new ActionListener()
1021 public void actionPerformed(ActionEvent e)
1023 pasteNew_actionPerformed(e);
1026 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1028 JMenuItem pasteThis = new JMenuItem(
1029 MessageManager.getString("label.to_this_alignment"));
1030 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1031 Platform.SHORTCUT_KEY_MASK, false);
1032 al = new ActionListener()
1035 public void actionPerformed(ActionEvent e)
1037 pasteThis_actionPerformed(e);
1040 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1042 JMenuItem createPNG = new JMenuItem("PNG");
1043 createPNG.addActionListener(new ActionListener()
1046 public void actionPerformed(ActionEvent e)
1051 createPNG.setActionCommand(
1052 MessageManager.getString("label.save_png_image"));
1054 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1055 font.addActionListener(new ActionListener()
1058 public void actionPerformed(ActionEvent e)
1060 font_actionPerformed(e);
1064 MessageManager.getString("label.show_sequence_limits"));
1065 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1066 seqLimits.addActionListener(new ActionListener()
1069 public void actionPerformed(ActionEvent e)
1071 seqLimit_actionPerformed(e);
1074 JMenuItem epsFile = new JMenuItem("EPS");
1075 epsFile.addActionListener(new ActionListener()
1078 public void actionPerformed(ActionEvent e)
1084 JMenuItem createSVG = new JMenuItem("SVG");
1085 createSVG.addActionListener(new ActionListener()
1088 public void actionPerformed(ActionEvent e)
1094 JMenuItem loadTreeMenuItem = new JMenuItem(
1095 MessageManager.getString("label.load_associated_tree"));
1096 loadTreeMenuItem.setActionCommand(
1097 MessageManager.getString("label.load_tree_for_sequence_set"));
1098 loadTreeMenuItem.addActionListener(new ActionListener()
1101 public void actionPerformed(ActionEvent e)
1103 loadTreeMenuItem_actionPerformed(e);
1107 scaleAbove.setVisible(false);
1108 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1109 scaleAbove.addActionListener(new ActionListener()
1112 public void actionPerformed(ActionEvent e)
1114 scaleAbove_actionPerformed(e);
1117 scaleLeft.setVisible(false);
1118 scaleLeft.setSelected(true);
1119 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1120 scaleLeft.addActionListener(new ActionListener()
1123 public void actionPerformed(ActionEvent e)
1125 scaleLeft_actionPerformed(e);
1128 scaleRight.setVisible(false);
1129 scaleRight.setSelected(true);
1130 scaleRight.setText(MessageManager.getString("action.scale_right"));
1131 scaleRight.addActionListener(new ActionListener()
1134 public void actionPerformed(ActionEvent e)
1136 scaleRight_actionPerformed(e);
1139 centreColumnLabelsMenuItem.setVisible(true);
1140 centreColumnLabelsMenuItem.setState(false);
1141 centreColumnLabelsMenuItem.setText(
1142 MessageManager.getString("label.centre_column_labels"));
1143 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1146 public void actionPerformed(ActionEvent e)
1148 centreColumnLabels_actionPerformed(e);
1151 followHighlightMenuItem.setVisible(true);
1152 followHighlightMenuItem.setState(true);
1153 followHighlightMenuItem
1154 .setText(MessageManager.getString("label.automatic_scrolling"));
1155 followHighlightMenuItem.addActionListener(new ActionListener()
1159 public void actionPerformed(ActionEvent e)
1161 followHighlight_actionPerformed();
1167 .setText(MessageManager.getString("action.by_tree_order"));
1168 sort.setText(MessageManager.getString("action.sort"));
1169 sort.addMenuListener(new MenuListener()
1172 public void menuSelected(MenuEvent e)
1174 enableSortMenuOptions();
1178 public void menuDeselected(MenuEvent e)
1183 public void menuCanceled(MenuEvent e)
1187 sortByTreeMenu.addMenuListener(new MenuListener()
1190 public void menuSelected(MenuEvent e)
1192 buildTreeSortMenu();
1196 public void menuDeselected(MenuEvent e)
1201 public void menuCanceled(MenuEvent e)
1206 .setText(MessageManager.getString("label.sort_by_score"));
1207 sort.add(sortByAnnotScore);
1208 sort.addMenuListener(new javax.swing.event.MenuListener()
1212 public void menuCanceled(MenuEvent e)
1217 public void menuDeselected(MenuEvent e)
1222 public void menuSelected(MenuEvent e)
1224 buildSortByAnnotationScoresMenu();
1227 sortByAnnotScore.setVisible(false);
1230 .setText(MessageManager.getString("action.calculate_tree_pca"));
1232 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1234 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1235 padGapsMenuitem.addActionListener(new ActionListener()
1238 public void actionPerformed(ActionEvent e)
1240 padGapsMenuitem_actionPerformed(e);
1243 JMenuItem vamsasStore = new JMenuItem(
1244 MessageManager.getString("label.vamsas_store"));
1245 vamsasStore.setVisible(false);
1246 vamsasStore.addActionListener(new ActionListener()
1249 public void actionPerformed(ActionEvent e)
1251 vamsasStore_actionPerformed(e);
1256 * Translate as cDNA with sub-menu of translation tables
1259 .setText(MessageManager.getString("label.translate_cDNA"));
1260 boolean first = true;
1261 for (final GeneticCodeI table : GeneticCodes.getInstance()
1264 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1265 showTranslation.add(item);
1266 item.addActionListener(new ActionListener()
1269 public void actionPerformed(ActionEvent e)
1271 showTranslation_actionPerformed(table);
1276 showTranslation.addSeparator();
1281 showReverse.setText(MessageManager.getString("label.reverse"));
1282 showReverse.addActionListener(new ActionListener()
1285 public void actionPerformed(ActionEvent e)
1287 showReverse_actionPerformed(false);
1290 showReverseComplement
1291 .setText(MessageManager.getString("label.reverse_complement"));
1292 showReverseComplement.addActionListener(new ActionListener()
1295 public void actionPerformed(ActionEvent e)
1297 showReverse_actionPerformed(true);
1301 JMenuItem extractScores = new JMenuItem(
1302 MessageManager.getString("label.extract_scores"));
1303 extractScores.addActionListener(new ActionListener()
1306 public void actionPerformed(ActionEvent e)
1308 extractScores_actionPerformed(e);
1311 extractScores.setVisible(true);
1312 // JBPNote: TODO: make gui for regex based score extraction
1314 // for show products actions see AlignFrame.canShowProducts
1315 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1317 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1318 runGroovy.setToolTipText(
1319 MessageManager.getString("label.run_groovy_tip"));
1320 runGroovy.addActionListener(new ActionListener()
1323 public void actionPerformed(ActionEvent e)
1325 runGroovy_actionPerformed();
1329 openFeatureSettings = new JMenuItem(
1330 MessageManager.getString("action.feature_settings"));
1331 openFeatureSettings.addActionListener(new ActionListener()
1334 public void actionPerformed(ActionEvent e)
1336 featureSettings_actionPerformed(e);
1341 * add sub-menu of database we can fetch from
1343 JMenuItem fetchSequence = new JMenuItem(
1344 MessageManager.getString("label.fetch_sequences"));
1345 fetchSequence.addActionListener(new ActionListener()
1348 public void actionPerformed(ActionEvent e)
1350 fetchSequence_actionPerformed();
1354 JMenuItem associatedData = new JMenuItem(
1355 MessageManager.getString("label.load_features_annotations"));
1356 associatedData.addActionListener(new ActionListener()
1359 public void actionPerformed(ActionEvent e)
1361 associatedData_actionPerformed(e);
1364 loadVcf = new JMenuItem(
1365 MessageManager.getString("label.load_vcf_file"));
1366 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1367 loadVcf.addActionListener(new ActionListener()
1370 public void actionPerformed(ActionEvent e)
1372 loadVcf_actionPerformed();
1375 autoCalculate.setText(
1376 MessageManager.getString("label.autocalculate_consensus"));
1377 autoCalculate.setState(
1378 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1379 autoCalculate.addActionListener(new ActionListener()
1382 public void actionPerformed(ActionEvent e)
1384 autoCalculate_actionPerformed(e);
1388 MessageManager.getString("label.sort_alignment_new_tree"));
1389 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1390 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1392 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1393 sortByTree.addActionListener(new ActionListener()
1396 public void actionPerformed(ActionEvent e)
1398 sortByTreeOption_actionPerformed(e);
1402 listenToViewSelections.setText(
1403 MessageManager.getString("label.listen_for_selections"));
1404 listenToViewSelections
1405 .setToolTipText("<html>" + MessageManager.getString(
1406 "label.selections_mirror_selections_made_same_sequences_other_views"));
1407 listenToViewSelections.setState(false);
1408 listenToViewSelections.addActionListener(new ActionListener()
1411 public void actionPerformed(ActionEvent e)
1413 listenToViewSelections_actionPerformed(e);
1417 JMenu addSequenceMenu = new JMenu(
1418 MessageManager.getString("label.add_sequences"));
1419 JMenuItem addFromFile = new JMenuItem(
1420 MessageManager.getString("label.from_file"));
1421 addFromFile.addActionListener(new ActionListener()
1424 public void actionPerformed(ActionEvent e)
1426 addFromFile_actionPerformed(e);
1429 JMenuItem addFromText = new JMenuItem(
1430 MessageManager.getString("label.from_textbox"));
1431 addFromText.addActionListener(new ActionListener()
1434 public void actionPerformed(ActionEvent e)
1436 addFromText_actionPerformed(e);
1439 JMenuItem addFromURL = new JMenuItem(
1440 MessageManager.getString("label.from_url"));
1441 addFromURL.addActionListener(new ActionListener()
1444 public void actionPerformed(ActionEvent e)
1446 addFromURL_actionPerformed(e);
1449 JMenuItem exportFeatures = new JMenuItem(
1450 MessageManager.getString("label.export_features"));
1451 exportFeatures.addActionListener(new ActionListener()
1454 public void actionPerformed(ActionEvent e)
1456 exportFeatures_actionPerformed(e);
1459 JMenuItem exportAnnotations = new JMenuItem(
1460 MessageManager.getString("label.export_annotations"));
1461 exportAnnotations.addActionListener(new ActionListener()
1464 public void actionPerformed(ActionEvent e)
1466 exportAnnotations_actionPerformed(e);
1469 statusPanel.setLayout(new GridLayout());
1470 JMenuItem showAllSeqs = new JMenuItem(
1471 MessageManager.getString("label.all_sequences"));
1472 showAllSeqs.setToolTipText(
1473 MessageManager.getString("label.toggle_sequence_visibility"));
1474 showAllSeqs.addActionListener(new ActionListener()
1477 public void actionPerformed(ActionEvent e)
1479 showAllSeqs_actionPerformed(e);
1482 JMenuItem showAllColumns = new JMenuItem(
1483 MessageManager.getString("label.all_columns"));
1484 showAllColumns.setToolTipText(
1485 MessageManager.getString("label.toggle_columns_visibility"));
1486 showAllColumns.addActionListener(new ActionListener()
1489 public void actionPerformed(ActionEvent e)
1491 showAllColumns_actionPerformed(e);
1494 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1495 JMenuItem hideSelSequences = new JMenuItem(
1496 MessageManager.getString("label.selected_sequences"));
1497 hideSelSequences.setToolTipText(
1498 MessageManager.getString("label.toggle_sequence_visibility"));
1499 hideSelSequences.addActionListener(new ActionListener()
1502 public void actionPerformed(ActionEvent e)
1504 hideSelSequences_actionPerformed(e);
1507 JMenuItem hideSelColumns = new JMenuItem(
1508 MessageManager.getString("label.selected_columns"));
1509 hideSelColumns.setToolTipText(
1510 MessageManager.getString("label.toggle_columns_visibility"));
1511 hideSelColumns.addActionListener(new ActionListener()
1514 public void actionPerformed(ActionEvent e)
1516 hideSelColumns_actionPerformed(e);
1519 JMenuItem hideAllSelection = new JMenuItem(
1520 MessageManager.getString("label.selected_region"));
1521 hideAllSelection.addActionListener(new ActionListener()
1524 public void actionPerformed(ActionEvent e)
1526 hideAllSelection_actionPerformed(e);
1529 // TODO: should be hidden if no selection exists.
1530 JMenuItem hideAllButSelection = new JMenuItem(
1531 MessageManager.getString("label.all_but_selected_region"));
1532 hideAllButSelection.addActionListener(new ActionListener()
1535 public void actionPerformed(ActionEvent e)
1537 hideAllButSelection_actionPerformed(e);
1540 JMenuItem showAllhidden = new JMenuItem(
1541 MessageManager.getString("label.all_sequences_columns"));
1542 showAllhidden.setToolTipText(MessageManager
1543 .getString("label.toggles_visibility_hidden_selected_regions"));
1544 showAllhidden.addActionListener(new ActionListener()
1547 public void actionPerformed(ActionEvent e)
1549 showAllhidden_actionPerformed(e);
1552 hiddenMarkers.setText(
1553 MessageManager.getString("action.show_hidden_markers"));
1554 hiddenMarkers.addActionListener(new ActionListener()
1557 public void actionPerformed(ActionEvent e)
1559 hiddenMarkers_actionPerformed(e);
1563 JMenuItem invertColSel = new JMenuItem(
1564 MessageManager.getString("action.invert_column_selection"));
1565 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1566 Platform.SHORTCUT_KEY_MASK
1567 | InputEvent.ALT_DOWN_MASK,
1569 al = new ActionListener()
1572 public void actionPerformed(ActionEvent e)
1574 invertColSel_actionPerformed(e);
1577 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1579 showComplementMenuItem.setVisible(false);
1580 showComplementMenuItem.addActionListener(new ActionListener()
1583 public void actionPerformed(ActionEvent e)
1585 showComplement_actionPerformed(showComplementMenuItem.getState());
1589 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1592 public void stateChanged(ChangeEvent evt)
1594 JTabbedPane pane = (JTabbedPane) evt.getSource();
1595 int sel = pane.getSelectedIndex();
1596 tabSelectionChanged(sel);
1599 tabbedPane.addMouseListener(new MouseAdapter()
1602 public void mousePressed(MouseEvent e)
1604 if (e.isPopupTrigger()) // Mac
1606 tabbedPane_mousePressed(e);
1611 public void mouseReleased(MouseEvent e)
1613 if (e.isPopupTrigger()) // Windows
1615 tabbedPane_mousePressed(e);
1619 tabbedPane.addFocusListener(new FocusAdapter()
1622 public void focusGained(FocusEvent e)
1624 tabbedPane_focusGained(e);
1628 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1629 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1630 Platform.SHORTCUT_KEY_MASK, false);
1631 al = new ActionListener()
1634 public void actionPerformed(ActionEvent e)
1636 save_actionPerformed(e);
1639 addMenuActionAndAccelerator(keyStroke, save, al);
1641 reload.setEnabled(false);
1642 reload.setText(MessageManager.getString("action.reload"));
1643 reload.addActionListener(new ActionListener()
1646 public void actionPerformed(ActionEvent e)
1648 reload_actionPerformed(e);
1652 JMenuItem newView = new JMenuItem(
1653 MessageManager.getString("action.new_view"));
1654 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1655 Platform.SHORTCUT_KEY_MASK, false);
1656 al = new ActionListener()
1659 public void actionPerformed(ActionEvent e)
1661 newView_actionPerformed(e);
1664 addMenuActionAndAccelerator(keyStroke, newView, al);
1666 tabbedPane.setToolTipText("<html><i>"
1667 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1670 formatMenu.setText(MessageManager.getString("action.format"));
1671 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1673 idRightAlign.setText(
1674 MessageManager.getString("label.right_align_sequence_id"));
1675 idRightAlign.addActionListener(new ActionListener()
1678 public void actionPerformed(ActionEvent e)
1680 idRightAlign_actionPerformed(e);
1684 gatherViews.setEnabled(false);
1685 gatherViews.setText(MessageManager.getString("action.gather_views"));
1686 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1687 al = new ActionListener()
1690 public void actionPerformed(ActionEvent e)
1692 gatherViews_actionPerformed(e);
1695 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1697 expandViews.setEnabled(false);
1698 expandViews.setText(MessageManager.getString("action.expand_views"));
1699 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1700 al = new ActionListener()
1703 public void actionPerformed(ActionEvent e)
1705 expandViews_actionPerformed(e);
1708 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1710 JMenuItem pageSetup = new JMenuItem(
1711 MessageManager.getString("action.page_setup"));
1712 pageSetup.addActionListener(new ActionListener()
1715 public void actionPerformed(ActionEvent e)
1717 pageSetup_actionPerformed(e);
1720 JMenuItem alignmentProperties = new JMenuItem(
1721 MessageManager.getString("label.alignment_props"));
1722 alignmentProperties.addActionListener(new ActionListener()
1725 public void actionPerformed(ActionEvent actionEvent)
1727 alignmentProperties();
1730 JMenuItem selectHighlighted = new JMenuItem(
1731 MessageManager.getString("action.select_highlighted_columns"));
1732 selectHighlighted.setToolTipText(JvSwingUtils.wrapTooltip(true,
1733 MessageManager.getString("tooltip.select_highlighted_columns")));
1734 al = new ActionListener()
1737 public void actionPerformed(ActionEvent actionEvent)
1739 selectHighlightedColumns_actionPerformed(actionEvent);
1742 selectHighlighted.addActionListener(al);
1743 JMenu tooltipSettingsMenu = new JMenu(
1744 MessageManager.getString("label.sequence_id_tooltip"));
1745 JMenu autoAnnMenu = new JMenu(
1746 MessageManager.getString("label.autocalculated_annotation"));
1748 JMenu exportImageMenu = new JMenu(
1749 MessageManager.getString("label.export_image"));
1750 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1751 alignFrameMenuBar.add(fileMenu);
1752 alignFrameMenuBar.add(editMenu);
1753 alignFrameMenuBar.add(selectMenu);
1754 alignFrameMenuBar.add(viewMenu);
1755 alignFrameMenuBar.add(annotationsMenu);
1756 alignFrameMenuBar.add(formatMenu);
1757 alignFrameMenuBar.add(colourMenu);
1758 alignFrameMenuBar.add(calculateMenu);
1759 if (!Platform.isJS())
1761 alignFrameMenuBar.add(webService);
1764 fileMenu.add(fetchSequence);
1765 fileMenu.add(addSequenceMenu);
1766 fileMenu.add(reload);
1767 fileMenu.addSeparator();
1768 fileMenu.add(vamsasStore);
1770 fileMenu.add(saveAs);
1771 fileMenu.add(outputTextboxMenu);
1772 fileMenu.add(pageSetup);
1773 fileMenu.add(printMenuItem);
1774 fileMenu.addSeparator();
1775 fileMenu.add(exportImageMenu);
1776 fileMenu.add(exportFeatures);
1777 fileMenu.add(exportAnnotations);
1778 fileMenu.add(loadTreeMenuItem);
1779 fileMenu.add(associatedData);
1780 if (!Platform.isJS())
1782 fileMenu.add(loadVcf);
1784 fileMenu.addSeparator();
1785 fileMenu.add(closeMenuItem);
1787 pasteMenu.add(pasteNew);
1788 pasteMenu.add(pasteThis);
1789 editMenu.add(undoMenuItem);
1790 editMenu.add(redoMenuItem);
1793 editMenu.add(pasteMenu);
1794 editMenu.add(delete);
1795 editMenu.addSeparator();
1796 editMenu.add(remove2LeftMenuItem);
1797 editMenu.add(remove2RightMenuItem);
1798 editMenu.add(removeGappedColumnMenuItem);
1799 editMenu.add(removeAllGapsMenuItem);
1800 editMenu.add(removeRedundancyMenuItem);
1801 editMenu.addSeparator();
1802 // dont add these yet in the CVS build - they cannot be undone!
1803 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1804 // editMenu.add(justifyLeftMenuItem);
1805 // editMenu.add(justifyRightMenuItem);
1806 // editMenu.addSeparator();
1807 editMenu.add(padGapsMenuitem);
1809 showMenu.add(showAllColumns);
1810 showMenu.add(showAllSeqs);
1811 showMenu.add(showAllhidden);
1812 hideMenu.add(hideSelColumns);
1813 hideMenu.add(hideSelSequences);
1814 hideMenu.add(hideAllSelection);
1815 hideMenu.add(hideAllButSelection);
1816 viewMenu.add(newView);
1817 viewMenu.add(expandViews);
1818 viewMenu.add(gatherViews);
1819 viewMenu.addSeparator();
1820 viewMenu.add(showMenu);
1821 viewMenu.add(hideMenu);
1822 viewMenu.add(showComplementMenuItem);
1823 viewMenu.addSeparator();
1824 viewMenu.add(followHighlightMenuItem);
1825 viewMenu.addSeparator();
1826 viewMenu.add(showSeqFeatures);
1827 // viewMenu.add(showSeqFeaturesHeight);
1828 viewMenu.add(openFeatureSettings);
1829 tooltipSettingsMenu.add(showDbRefsMenuitem);
1830 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1831 viewMenu.add(tooltipSettingsMenu);
1832 viewMenu.addSeparator();
1833 viewMenu.add(alignmentProperties);
1834 viewMenu.addSeparator();
1835 viewMenu.add(overviewMenuItem);
1837 annotationsMenu.add(annotationPanelMenuItem);
1838 annotationsMenu.addSeparator();
1839 annotationsMenu.add(showAllAlAnnotations);
1840 annotationsMenu.add(hideAllAlAnnotations);
1841 annotationsMenu.addSeparator();
1842 annotationsMenu.add(showAllSeqAnnotations);
1843 annotationsMenu.add(hideAllSeqAnnotations);
1844 annotationsMenu.add(sortAnnBySequence);
1845 annotationsMenu.add(sortAnnByLabel);
1846 annotationsMenu.addSeparator();
1847 autoAnnMenu.add(showAutoFirst);
1848 autoAnnMenu.add(showAutoLast);
1849 autoAnnMenu.addSeparator();
1850 autoAnnMenu.add(applyAutoAnnotationSettings);
1851 autoAnnMenu.add(showConsensusHistogram);
1852 autoAnnMenu.add(showSequenceLogo);
1853 autoAnnMenu.add(normaliseSequenceLogo);
1854 autoAnnMenu.addSeparator();
1855 autoAnnMenu.add(showGroupConservation);
1856 autoAnnMenu.add(showGroupConsensus);
1857 annotationsMenu.add(autoAnnMenu);
1859 sort.add(sortIDMenuItem);
1860 sort.add(sortLengthMenuItem);
1861 sort.add(sortGroupMenuItem);
1862 sort.add(sortPairwiseMenuItem);
1863 sort.add(sortByTreeMenu);
1864 calculateMenu.add(sort);
1865 calculateMenu.add(calculateTree);
1866 calculateMenu.addSeparator();
1867 calculateMenu.add(pairwiseAlignmentMenuItem);
1868 calculateMenu.addSeparator();
1869 calculateMenu.add(showTranslation);
1870 calculateMenu.add(showReverse);
1871 calculateMenu.add(showReverseComplement);
1872 calculateMenu.add(showProducts);
1873 calculateMenu.add(autoCalculate);
1874 calculateMenu.add(sortByTree);
1875 calculateMenu.addSeparator();
1876 calculateMenu.add(expandAlignment);
1877 calculateMenu.add(extractScores);
1878 if (!Platform.isJS())
1880 calculateMenu.addSeparator();
1881 calculateMenu.add(runGroovy);
1884 webServiceNoServices = new JMenuItem(
1885 MessageManager.getString("label.no_services"));
1886 webService.add(webServiceNoServices);
1887 if (!Platform.isJS())
1889 exportImageMenu.add(htmlMenuItem);
1891 exportImageMenu.add(epsFile);
1892 exportImageMenu.add(createPNG);
1893 if (!Platform.isJS())
1895 exportImageMenu.add(createBioJS);
1896 exportImageMenu.add(createSVG);
1898 addSequenceMenu.add(addFromFile);
1899 addSequenceMenu.add(addFromText);
1900 addSequenceMenu.add(addFromURL);
1901 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1902 statusPanel.add(statusBar, null);
1903 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1905 formatMenu.add(font);
1906 formatMenu.addSeparator();
1907 formatMenu.add(wrapMenuItem);
1908 formatMenu.add(scaleAbove);
1909 formatMenu.add(scaleLeft);
1910 formatMenu.add(scaleRight);
1911 formatMenu.add(seqLimits);
1912 formatMenu.add(idRightAlign);
1913 formatMenu.add(hiddenMarkers);
1914 formatMenu.add(viewBoxesMenuItem);
1915 formatMenu.add(viewTextMenuItem);
1916 formatMenu.add(colourTextMenuItem);
1917 formatMenu.add(renderGapsMenuItem);
1918 formatMenu.add(centreColumnLabelsMenuItem);
1919 formatMenu.add(showNonconservedMenuItem);
1920 selectMenu.add(findMenuItem);
1921 selectMenu.addSeparator();
1922 selectMenu.add(selectAllSequenceMenuItem);
1923 selectMenu.add(deselectAllSequenceMenuItem);
1924 selectMenu.add(invertSequenceMenuItem);
1925 selectMenu.add(invertColSel);
1926 selectMenu.add(createGroup);
1927 selectMenu.add(unGroup);
1928 selectMenu.add(grpsFromSelection);
1929 selectMenu.add(deleteGroups);
1930 selectMenu.add(annotationColumn);
1931 selectMenu.add(selectHighlighted);
1932 // TODO - determine if the listenToViewSelections button is needed : see bug
1934 // selectMenu.addSeparator();
1935 // selectMenu.add(listenToViewSelections);
1938 protected void enableSortMenuOptions()
1942 protected void loadVcf_actionPerformed()
1947 * Constructs the entries on the Colour menu (but does not add them to the
1950 protected void initColourMenu()
1952 applyToAllGroups = new JCheckBoxMenuItem(
1953 MessageManager.getString("label.apply_colour_to_all_groups"));
1954 applyToAllGroups.addActionListener(new ActionListener()
1957 public void actionPerformed(ActionEvent e)
1959 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1963 textColour = new JMenuItem(
1964 MessageManager.getString("label.text_colour"));
1965 textColour.addActionListener(new ActionListener()
1968 public void actionPerformed(ActionEvent e)
1970 textColour_actionPerformed();
1974 conservationMenuItem = new JCheckBoxMenuItem(
1975 MessageManager.getString("action.by_conservation"));
1976 conservationMenuItem.addActionListener(new ActionListener()
1979 public void actionPerformed(ActionEvent e)
1981 conservationMenuItem_actionPerformed(
1982 conservationMenuItem.isSelected());
1986 abovePIDThreshold = new JCheckBoxMenuItem(
1987 MessageManager.getString("label.above_identity_threshold"));
1988 abovePIDThreshold.addActionListener(new ActionListener()
1991 public void actionPerformed(ActionEvent e)
1993 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1996 modifyPID = new JMenuItem(
1997 MessageManager.getString("label.modify_identity_threshold"));
1998 modifyPID.addActionListener(new ActionListener()
2001 public void actionPerformed(ActionEvent e)
2003 modifyPID_actionPerformed();
2006 modifyConservation = new JMenuItem(MessageManager
2007 .getString("label.modify_conservation_threshold"));
2008 modifyConservation.addActionListener(new ActionListener()
2011 public void actionPerformed(ActionEvent e)
2013 modifyConservation_actionPerformed();
2017 annotationColour = new JRadioButtonMenuItem(
2018 MessageManager.getString("action.by_annotation"));
2019 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2020 annotationColour.addActionListener(new ActionListener()
2023 public void actionPerformed(ActionEvent e)
2025 annotationColour_actionPerformed();
2030 protected void selectHighlightedColumns_actionPerformed(
2031 ActionEvent actionEvent)
2033 // TODO Auto-generated method stub
2038 * Generate the reverse sequence (or reverse complement if the flag is true)
2039 * and add it to the alignment
2043 protected void showReverse_actionPerformed(boolean complement)
2048 * Try to run script in a Groovy console, having first ensured that this
2049 * alignframe is set as currentAlignFrame in Desktop
2051 protected void runGroovy_actionPerformed()
2057 * Adds the given action listener and key accelerator to the given menu item.
2058 * Also saves in a lookup table to support lookup of action by key stroke.
2062 * @param actionListener
2064 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2065 JMenuItem menuItem, ActionListener actionListener)
2067 menuItem.setAccelerator(keyStroke);
2068 accelerators.put(keyStroke, menuItem);
2069 menuItem.addActionListener(actionListener);
2073 * Action on clicking sort annotations by type.
2077 protected void sortAnnotations_actionPerformed()
2082 * Action on clicking Show all annotations.
2084 * @param forSequences
2085 * update sequence-related annotations
2086 * @param forAlignment
2087 * update non-sequence-related annotations
2089 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2090 boolean forAlignment)
2092 setAnnotationsVisibility(true, forSequences, forAlignment);
2096 * Action on clicking Hide all annotations.
2098 * @param forSequences
2099 * update sequence-related annotations
2100 * @param forAlignment
2101 * update non-sequence-related annotations
2103 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2104 boolean forAlignment)
2106 setAnnotationsVisibility(false, forSequences, forAlignment);
2110 * Set the visibility of annotations to true or false. Can act on
2111 * sequence-related annotations, or alignment-related, or both.
2114 * @param forSequences
2115 * update sequence-related annotations
2116 * @param forAlignment
2117 * update non-sequence-related annotations
2119 protected void setAnnotationsVisibility(boolean visible,
2120 boolean forSequences, boolean forAlignment)
2125 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2127 // TODO Auto-generated method stub
2131 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2133 // TODO Auto-generated method stub
2137 protected void showAllhidden_actionPerformed(ActionEvent e)
2139 // TODO Auto-generated method stub
2143 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2145 // TODO Auto-generated method stub
2149 protected void hideAllSelection_actionPerformed(ActionEvent e)
2151 // TODO Auto-generated method stub
2155 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2157 // TODO Auto-generated method stub
2161 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2163 // TODO Auto-generated method stub
2167 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2169 // TODO Auto-generated method stub
2173 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2175 // TODO Auto-generated method stub
2179 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2181 // TODO Auto-generated method stub
2185 protected void showGroupConservation_actionPerformed(ActionEvent e)
2187 // TODO Auto-generated method stub
2191 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2193 // TODO Auto-generated method stub
2197 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2199 // TODO Auto-generated method stub
2203 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2205 // TODO Auto-generated method stub
2209 protected void followHighlight_actionPerformed()
2211 // TODO Auto-generated method stub
2215 protected void showNpFeats_actionPerformed(ActionEvent e)
2217 // TODO Auto-generated method stub
2221 protected void showDbRefs_actionPerformed(ActionEvent e)
2223 // TODO Auto-generated method stub
2227 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2231 protected void buildSortByAnnotationScoresMenu()
2235 protected void extractScores_actionPerformed(ActionEvent e)
2239 protected void outputText_actionPerformed(String formatName)
2243 public void addFromFile_actionPerformed(ActionEvent e)
2248 public void addFromText_actionPerformed(ActionEvent e)
2253 public void addFromURL_actionPerformed(ActionEvent e)
2258 public void exportFeatures_actionPerformed(ActionEvent e)
2263 public void exportAnnotations_actionPerformed(ActionEvent e)
2268 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2272 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2277 protected void closeMenuItem_actionPerformed(boolean b)
2281 protected void redoMenuItem_actionPerformed(ActionEvent e)
2285 protected void undoMenuItem_actionPerformed(ActionEvent e)
2289 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2293 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2297 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2301 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2305 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2309 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2313 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2317 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2321 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2325 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2329 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2333 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2337 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2341 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2345 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2349 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2353 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2357 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2361 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2365 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2369 protected void conservationMenuItem_actionPerformed(boolean selected)
2373 protected void printMenuItem_actionPerformed(ActionEvent e)
2377 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2381 protected void findMenuItem_actionPerformed(ActionEvent e)
2385 protected void abovePIDThreshold_actionPerformed(boolean selected)
2389 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2393 protected void deleteGroups_actionPerformed(ActionEvent e)
2397 protected void createGroup_actionPerformed(ActionEvent e)
2401 protected void unGroup_actionPerformed(ActionEvent e)
2405 protected void copy_actionPerformed()
2409 protected void cut_actionPerformed()
2413 protected void delete_actionPerformed()
2417 protected void pasteNew_actionPerformed(ActionEvent e)
2421 protected void pasteThis_actionPerformed(ActionEvent e)
2425 protected void applyToAllGroups_actionPerformed(boolean selected)
2429 public void createPNG(java.io.File f)
2433 protected void font_actionPerformed(ActionEvent e)
2437 protected void seqLimit_actionPerformed(ActionEvent e)
2441 public void seqDBRef_actionPerformed(ActionEvent e)
2446 public void createEPS(java.io.File f)
2450 public void createSVG(java.io.File f)
2455 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2461 * Template method to handle the 'load T-Coffee scores' menu event.
2463 * Subclasses override this method to provide a custom action.
2468 protected void loadScores_actionPerformed(ActionEvent event)
2473 protected void jpred_actionPerformed(ActionEvent e)
2477 protected void scaleAbove_actionPerformed(ActionEvent e)
2481 protected void scaleLeft_actionPerformed(ActionEvent e)
2485 protected void scaleRight_actionPerformed(ActionEvent e)
2489 protected void modifyPID_actionPerformed()
2493 protected void modifyConservation_actionPerformed()
2497 protected void saveAs_actionPerformed()
2501 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2505 public void vamsasStore_actionPerformed(ActionEvent e)
2510 public void vamsasLoad_actionPerformed(ActionEvent e)
2515 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2520 public void featureSettings_actionPerformed(ActionEvent e)
2525 public void fetchSequence_actionPerformed()
2530 public void smoothFont_actionPerformed(ActionEvent e)
2535 public void annotationColour_actionPerformed()
2539 public void annotationColumn_actionPerformed(ActionEvent e)
2543 public void associatedData_actionPerformed(ActionEvent e)
2548 public void autoCalculate_actionPerformed(ActionEvent e)
2553 public void sortByTreeOption_actionPerformed(ActionEvent e)
2558 public void showAllSeqs_actionPerformed(ActionEvent e)
2563 public void showAllColumns_actionPerformed(ActionEvent e)
2568 public void hideSelSequences_actionPerformed(ActionEvent e)
2573 public void hideSelColumns_actionPerformed(ActionEvent e)
2578 public void hiddenMarkers_actionPerformed(ActionEvent e)
2583 public void findPdbId_actionPerformed(ActionEvent e)
2588 public void enterPdbId_actionPerformed(ActionEvent e)
2593 public void pdbFile_actionPerformed(ActionEvent e)
2598 public void invertColSel_actionPerformed(ActionEvent e)
2603 public void tabSelectionChanged(int sel)
2608 public void tabbedPane_mousePressed(MouseEvent e)
2613 public void tabbedPane_focusGained(FocusEvent e)
2618 public void save_actionPerformed(ActionEvent e)
2623 public void reload_actionPerformed(ActionEvent e)
2628 public void newView_actionPerformed(ActionEvent e)
2633 public void textColour_actionPerformed()
2638 public void idRightAlign_actionPerformed(ActionEvent e)
2643 public void expandViews_actionPerformed(ActionEvent e)
2648 public void gatherViews_actionPerformed(ActionEvent e)
2653 public void buildTreeSortMenu()
2658 public void pageSetup_actionPerformed(ActionEvent e)
2663 public void alignmentProperties()
2668 protected void expand_newalign(ActionEvent e)
2670 // TODO Auto-generated method stub
2674 protected boolean isShowAutoCalculatedAbove()
2676 return showAutoCalculatedAbove;
2679 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2681 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2684 protected SequenceAnnotationOrder getAnnotationSortOrder()
2686 return annotationSortOrder;
2689 protected void setAnnotationSortOrder(
2690 SequenceAnnotationOrder annotationSortOrder)
2692 this.annotationSortOrder = annotationSortOrder;
2695 public Map<KeyStroke, JMenuItem> getAccelerators()
2697 return this.accelerators;
2701 * Returns the selected index of the tabbed pane, or -1 if none selected
2702 * (including the case where the tabbed pane has not been made visible).
2706 public int getTabIndex()
2708 return tabbedPane.getSelectedIndex();
2711 public JPanel getStatusPanel()
2717 * Sets a reference to the containing split frame. Also makes the 'toggle
2718 * split view' menu item visible and checked.
2722 public void setSplitFrame(SplitContainerI sf)
2724 this.splitFrame = sf;
2727 this.showComplementMenuItem.setVisible(true);
2728 this.showComplementMenuItem.setState(true);
2732 public SplitContainerI getSplitViewContainer()
2734 return this.splitFrame;
2737 protected void showComplement_actionPerformed(boolean complement)