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.KeyEvent;
31 import java.awt.event.MouseAdapter;
32 import java.awt.event.MouseEvent;
33 import java.util.HashMap;
36 import javax.swing.BorderFactory;
37 import javax.swing.ButtonGroup;
38 import javax.swing.JCheckBoxMenuItem;
39 import javax.swing.JInternalFrame;
40 import javax.swing.JLabel;
41 import javax.swing.JMenu;
42 import javax.swing.JMenuBar;
43 import javax.swing.JMenuItem;
44 import javax.swing.JPanel;
45 import javax.swing.JRadioButtonMenuItem;
46 import javax.swing.JTabbedPane;
47 import javax.swing.KeyStroke;
48 import javax.swing.event.ChangeEvent;
49 import javax.swing.event.MenuEvent;
50 import javax.swing.event.MenuListener;
52 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
53 import jalview.analysis.GeneticCodeI;
54 import jalview.analysis.GeneticCodes;
55 import jalview.api.SplitContainerI;
56 import jalview.bin.Cache;
57 import jalview.gui.JvSwingUtils;
58 import jalview.gui.Preferences;
59 import jalview.io.FileFormats;
60 import jalview.schemes.ResidueColourScheme;
61 import jalview.util.MessageManager;
62 import jalview.util.Platform;
64 @SuppressWarnings("serial")
65 public class GAlignFrame extends JInternalFrame
67 protected JMenuBar alignFrameMenuBar = new JMenuBar();
69 protected JMenuItem closeMenuItem = new JMenuItem();
71 public JMenu webService = new JMenu();// BH 2019 was protected, but not
72 // sufficient for AlignFrame thread run
74 public JMenuItem webServiceNoServices;// BH 2019 was protected, but not
75 // sufficient for AlignFrame thread run
77 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
79 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
81 protected JMenu sortByAnnotScore = new JMenu();
83 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
85 // AlignFrame.printWriter
87 protected JMenu outputTextboxMenu = new JMenu();
89 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
91 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
93 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
95 protected JMenuItem undoMenuItem = new JMenuItem();
97 protected JMenuItem redoMenuItem = new JMenuItem();
99 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
101 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
103 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
105 public JCheckBoxMenuItem showSeqFeatureCounts = new JCheckBoxMenuItem();
107 JMenuItem copy = new JMenuItem();
109 JMenuItem cut = new JMenuItem();
111 JMenu pasteMenu = new JMenu();
113 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
115 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
117 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
119 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
121 protected JCheckBoxMenuItem applyToAllGroups;
123 protected JMenu colourMenu = new JMenu();
125 protected JMenuItem textColour;
127 protected JCheckBoxMenuItem conservationMenuItem;
129 protected JMenuItem modifyConservation;
131 protected JCheckBoxMenuItem abovePIDThreshold;
133 protected JMenuItem modifyPID;
135 protected JRadioButtonMenuItem annotationColour;
137 protected JMenu sortByTreeMenu = new JMenu();
139 protected JMenu sort = new JMenu();
141 protected JMenuItem calculateTree = new JMenuItem();
143 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
145 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
147 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
149 protected JMenu showTranslation = new JMenu();
151 protected JMenuItem showReverse = new JMenuItem();
153 protected JMenuItem showReverseComplement = new JMenuItem();
155 protected JMenu showProducts = new JMenu();
157 protected JMenuItem runGroovy = new JMenuItem();
159 protected JMenuItem loadVcf;
161 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
163 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
165 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
167 protected JPanel statusPanel = new JPanel();
169 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
171 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
173 protected JMenuItem showAllAlAnnotations = new JMenuItem();
175 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
177 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
179 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
181 protected JTabbedPane tabbedPane = new JTabbedPane();
183 protected JMenuItem reload = new JMenuItem();
185 protected JMenu formatMenu = new JMenu();
187 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
189 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
191 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
193 protected JMenuItem gatherViews = new JMenuItem();
195 protected JMenuItem expandViews = new JMenuItem();
197 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
201 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
207 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
209 protected JMenuItem openFeatureSettings;
211 private SequenceAnnotationOrder annotationSortOrder;
213 private boolean showAutoCalculatedAbove = false;
215 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
217 private SplitContainerI splitFrame;
224 // for Web-page embedding using id=align-frame-div
225 setName("jalview-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,
281 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
282 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
284 addMenuActionAndAccelerator(keyStroke, saveAs, al);
286 closeMenuItem.setText(MessageManager.getString("action.close"));
287 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
288 jalview.util.ShortcutKeyMaskExWrapper
289 .getMenuShortcutKeyMaskEx(),
291 al = new ActionListener()
294 public void actionPerformed(ActionEvent e)
296 closeMenuItem_actionPerformed(false);
299 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
301 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
302 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
303 JMenu annotationsMenu = new JMenu(
304 MessageManager.getString("action.annotations"));
305 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
306 colourMenu.setText(MessageManager.getString("action.colour"));
307 JMenu calculateMenu = new JMenu(
308 MessageManager.getString("action.calculate"));
309 webService.setText(MessageManager.getString("action.web_service"));
310 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
311 MessageManager.getString("action.select_all"));
312 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
313 jalview.util.ShortcutKeyMaskExWrapper
314 .getMenuShortcutKeyMaskEx(),
316 al = new ActionListener()
319 public void actionPerformed(ActionEvent e)
321 selectAllSequenceMenuItem_actionPerformed(e);
324 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
326 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
327 MessageManager.getString("action.deselect_all"));
328 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
329 al = new ActionListener()
332 public void actionPerformed(ActionEvent e)
334 deselectAllSequenceMenuItem_actionPerformed(e);
337 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
339 JMenuItem invertSequenceMenuItem = new JMenuItem(
340 MessageManager.getString("action.invert_sequence_selection"));
341 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
342 jalview.util.ShortcutKeyMaskExWrapper
343 .getMenuShortcutKeyMaskEx(),
345 al = new ActionListener()
348 public void actionPerformed(ActionEvent e)
350 invertSequenceMenuItem_actionPerformed(e);
353 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
355 JMenuItem grpsFromSelection = new JMenuItem(
356 MessageManager.getString("action.make_groups_selection"));
357 grpsFromSelection.addActionListener(new ActionListener()
360 public void actionPerformed(ActionEvent e)
362 makeGrpsFromSelection_actionPerformed(e);
365 JMenuItem expandAlignment = new JMenuItem(
366 MessageManager.getString("action.view_flanking_regions"));
367 expandAlignment.setToolTipText(
368 MessageManager.getString("label.view_flanking_regions"));
369 expandAlignment.addActionListener(new ActionListener()
372 public void actionPerformed(ActionEvent e)
377 JMenuItem remove2LeftMenuItem = new JMenuItem(
378 MessageManager.getString("action.remove_left"));
379 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
380 jalview.util.ShortcutKeyMaskExWrapper
381 .getMenuShortcutKeyMaskEx(),
383 al = new ActionListener()
386 public void actionPerformed(ActionEvent e)
388 remove2LeftMenuItem_actionPerformed(e);
391 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
393 JMenuItem remove2RightMenuItem = new JMenuItem(
394 MessageManager.getString("action.remove_right"));
395 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
396 jalview.util.ShortcutKeyMaskExWrapper
397 .getMenuShortcutKeyMaskEx(),
399 al = new ActionListener()
402 public void actionPerformed(ActionEvent e)
404 remove2RightMenuItem_actionPerformed(e);
407 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
409 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
410 MessageManager.getString("action.remove_empty_columns"));
411 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
412 jalview.util.ShortcutKeyMaskExWrapper
413 .getMenuShortcutKeyMaskEx(),
415 al = new ActionListener()
418 public void actionPerformed(ActionEvent e)
420 removeGappedColumnMenuItem_actionPerformed(e);
423 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
425 JMenuItem removeAllGapsMenuItem = new JMenuItem(
426 MessageManager.getString("action.remove_all_gaps"));
427 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
428 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
429 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
431 al = new ActionListener()
434 public void actionPerformed(ActionEvent e)
436 removeAllGapsMenuItem_actionPerformed(e);
439 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
441 JMenuItem justifyLeftMenuItem = new JMenuItem(
442 MessageManager.getString("action.left_justify_alignment"));
443 justifyLeftMenuItem.addActionListener(new ActionListener()
446 public void actionPerformed(ActionEvent e)
448 justifyLeftMenuItem_actionPerformed(e);
451 JMenuItem justifyRightMenuItem = new JMenuItem(
452 MessageManager.getString("action.right_justify_alignment"));
453 justifyRightMenuItem.addActionListener(new ActionListener()
456 public void actionPerformed(ActionEvent e)
458 justifyRightMenuItem_actionPerformed(e);
461 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
462 viewBoxesMenuItem.setState(true);
463 viewBoxesMenuItem.addActionListener(new ActionListener()
466 public void actionPerformed(ActionEvent e)
468 viewBoxesMenuItem_actionPerformed(e);
471 viewTextMenuItem.setText(MessageManager.getString("action.text"));
472 viewTextMenuItem.setState(true);
473 viewTextMenuItem.addActionListener(new ActionListener()
476 public void actionPerformed(ActionEvent e)
478 viewTextMenuItem_actionPerformed(e);
481 showNonconservedMenuItem
482 .setText(MessageManager.getString("label.show_non_conserved"));
483 showNonconservedMenuItem.setState(false);
484 showNonconservedMenuItem.addActionListener(new ActionListener()
487 public void actionPerformed(ActionEvent e)
489 showUnconservedMenuItem_actionPerformed(e);
492 JMenuItem sortPairwiseMenuItem = new JMenuItem(
493 MessageManager.getString("action.by_pairwise_id"));
494 sortPairwiseMenuItem.addActionListener(new ActionListener()
497 public void actionPerformed(ActionEvent e)
499 sortPairwiseMenuItem_actionPerformed(e);
502 JMenuItem sortIDMenuItem = new JMenuItem(
503 MessageManager.getString("action.by_id"));
504 sortIDMenuItem.addActionListener(new ActionListener()
507 public void actionPerformed(ActionEvent e)
509 sortIDMenuItem_actionPerformed(e);
512 JMenuItem sortLengthMenuItem = new JMenuItem(
513 MessageManager.getString("action.by_length"));
514 sortLengthMenuItem.addActionListener(new ActionListener()
517 public void actionPerformed(ActionEvent e)
519 sortLengthMenuItem_actionPerformed(e);
522 JMenuItem sortGroupMenuItem = new JMenuItem(
523 MessageManager.getString("action.by_group"));
524 sortGroupMenuItem.addActionListener(new ActionListener()
527 public void actionPerformed(ActionEvent e)
529 sortGroupMenuItem_actionPerformed(e);
533 JMenuItem removeRedundancyMenuItem = new JMenuItem(
534 MessageManager.getString("action.remove_redundancy"));
535 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
536 jalview.util.ShortcutKeyMaskExWrapper
537 .getMenuShortcutKeyMaskEx(),
539 al = new ActionListener()
542 public void actionPerformed(ActionEvent e)
544 removeRedundancyMenuItem_actionPerformed(e);
547 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
549 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
550 MessageManager.getString("action.pairwise_alignment"));
551 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
554 public void actionPerformed(ActionEvent e)
556 pairwiseAlignmentMenuItem_actionPerformed(e);
560 this.getContentPane().setLayout(new BorderLayout());
561 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
562 statusBar.setBackground(Color.white);
563 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
564 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
565 statusBar.setText(MessageManager.getString("label.status_bar"));
567 .setText(MessageManager.getString("label.out_to_textbox"));
569 annotationPanelMenuItem.setActionCommand("");
570 annotationPanelMenuItem
571 .setText(MessageManager.getString("label.show_annotations"));
572 annotationPanelMenuItem
573 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
574 annotationPanelMenuItem.addActionListener(new ActionListener()
577 public void actionPerformed(ActionEvent e)
579 annotationPanelMenuItem_actionPerformed(e);
582 showAllAlAnnotations.setText(
583 MessageManager.getString("label.show_all_al_annotations"));
584 final boolean isAnnotationPanelShown = annotationPanelMenuItem
586 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
587 showAllAlAnnotations.addActionListener(new ActionListener()
590 public void actionPerformed(ActionEvent e)
592 showAllAnnotations_actionPerformed(false, true);
595 hideAllAlAnnotations.setText(
596 MessageManager.getString("label.hide_all_al_annotations"));
597 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
598 hideAllAlAnnotations.addActionListener(new ActionListener()
601 public void actionPerformed(ActionEvent e)
603 hideAllAnnotations_actionPerformed(false, true);
606 showAllSeqAnnotations.setText(
607 MessageManager.getString("label.show_all_seq_annotations"));
608 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
609 showAllSeqAnnotations.addActionListener(new ActionListener()
612 public void actionPerformed(ActionEvent e)
614 showAllAnnotations_actionPerformed(true, false);
617 hideAllSeqAnnotations.setText(
618 MessageManager.getString("label.hide_all_seq_annotations"));
619 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
620 hideAllSeqAnnotations.addActionListener(new ActionListener()
623 public void actionPerformed(ActionEvent e)
625 hideAllAnnotations_actionPerformed(true, false);
628 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
629 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
630 SequenceAnnotationOrder.NONE.name()));
631 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
632 MessageManager.getString("label.sort_annotations_by_sequence"));
633 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
634 MessageManager.getString("label.sort_annotations_by_label"));
636 sortAnnBySequence.setSelected(
637 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
638 sortAnnBySequence.addActionListener(new ActionListener()
641 public void actionPerformed(ActionEvent e)
643 boolean newState = sortAnnBySequence.getState();
644 sortAnnByLabel.setSelected(false);
645 setAnnotationSortOrder(
646 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
647 : SequenceAnnotationOrder.NONE);
648 sortAnnotations_actionPerformed();
651 sortAnnByLabel.setSelected(
652 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
653 sortAnnByLabel.addActionListener(new ActionListener()
656 public void actionPerformed(ActionEvent e)
658 boolean newState = sortAnnByLabel.getState();
659 sortAnnBySequence.setSelected(false);
660 setAnnotationSortOrder(
661 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
662 : SequenceAnnotationOrder.NONE);
663 sortAnnotations_actionPerformed();
666 colourTextMenuItem = new JCheckBoxMenuItem(
667 MessageManager.getString("label.colour_text"));
668 colourTextMenuItem.addActionListener(new ActionListener()
671 public void actionPerformed(ActionEvent e)
673 colourTextMenuItem_actionPerformed(e);
677 JMenuItem htmlMenuItem = new JMenuItem(
678 MessageManager.getString("label.html"));
679 htmlMenuItem.addActionListener(new ActionListener()
682 public void actionPerformed(ActionEvent e)
684 htmlMenuItem_actionPerformed(e);
688 JMenuItem createBioJS = new JMenuItem(
689 MessageManager.getString("label.biojs_html_export"));
690 createBioJS.addActionListener(new java.awt.event.ActionListener()
693 public void actionPerformed(ActionEvent e)
695 bioJSMenuItem_actionPerformed(e);
699 JMenuItem overviewMenuItem = new JMenuItem(
700 MessageManager.getString("label.overview_window"));
701 overviewMenuItem.addActionListener(new ActionListener()
704 public void actionPerformed(ActionEvent e)
706 overviewMenuItem_actionPerformed(e);
710 undoMenuItem.setEnabled(false);
711 undoMenuItem.setText(MessageManager.getString("action.undo"));
712 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
713 jalview.util.ShortcutKeyMaskExWrapper
714 .getMenuShortcutKeyMaskEx(),
716 al = new ActionListener()
719 public void actionPerformed(ActionEvent e)
721 undoMenuItem_actionPerformed(e);
724 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
726 redoMenuItem.setEnabled(false);
727 redoMenuItem.setText(MessageManager.getString("action.redo"));
728 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
729 jalview.util.ShortcutKeyMaskExWrapper
730 .getMenuShortcutKeyMaskEx(),
732 al = new ActionListener()
735 public void actionPerformed(ActionEvent e)
737 redoMenuItem_actionPerformed(e);
740 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
742 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
743 wrapMenuItem.addActionListener(new ActionListener()
746 public void actionPerformed(ActionEvent e)
748 wrapMenuItem_actionPerformed(e);
752 JMenuItem printMenuItem = new JMenuItem(
753 MessageManager.getString("action.print"));
754 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
755 jalview.util.ShortcutKeyMaskExWrapper
756 .getMenuShortcutKeyMaskEx(),
758 al = new ActionListener()
761 public void actionPerformed(ActionEvent e)
763 printMenuItem_actionPerformed(e);
766 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
769 .setText(MessageManager.getString("action.show_gaps"));
770 renderGapsMenuItem.setState(true);
771 renderGapsMenuItem.addActionListener(new ActionListener()
774 public void actionPerformed(ActionEvent e)
776 renderGapsMenuItem_actionPerformed(e);
780 JMenuItem findMenuItem = new JMenuItem(
781 MessageManager.getString("action.find"));
782 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
783 jalview.util.ShortcutKeyMaskExWrapper
784 .getMenuShortcutKeyMaskEx(),
786 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
787 MessageManager.getString("label.find_tip")));
788 al = new ActionListener()
791 public void actionPerformed(ActionEvent e)
793 findMenuItem_actionPerformed(e);
796 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
798 showSeqFeatures.setText(
799 MessageManager.getString("label.show_sequence_features"));
800 showSeqFeatures.addActionListener(new ActionListener()
803 public void actionPerformed(ActionEvent actionEvent)
805 showSeqFeatures_actionPerformed(actionEvent);
808 showSeqFeatureCounts.setText(
809 MessageManager.getString("label.show_sequence_feature_counts"));
810 showSeqFeatureCounts.addActionListener(new ActionListener()
813 public void actionPerformed(ActionEvent actionEvent)
815 showSeqFeatureCounts_actionPerformed(actionEvent);
819 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
820 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
821 * void actionPerformed(ActionEvent actionEvent) {
822 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
825 .setText(MessageManager.getString("label.show_database_refs"));
826 showDbRefsMenuitem.addActionListener(new ActionListener()
830 public void actionPerformed(ActionEvent e)
832 showDbRefs_actionPerformed(e);
836 showNpFeatsMenuitem.setText(
837 MessageManager.getString("label.show_non_positional_features"));
838 showNpFeatsMenuitem.addActionListener(new ActionListener()
842 public void actionPerformed(ActionEvent e)
844 showNpFeats_actionPerformed(e);
848 showGroupConservation
849 .setText(MessageManager.getString("label.group_conservation"));
850 showGroupConservation.addActionListener(new ActionListener()
854 public void actionPerformed(ActionEvent e)
856 showGroupConservation_actionPerformed(e);
862 .setText(MessageManager.getString("label.group_consensus"));
863 showGroupConsensus.addActionListener(new ActionListener()
867 public void actionPerformed(ActionEvent e)
869 showGroupConsensus_actionPerformed(e);
873 showConsensusHistogram.setText(
874 MessageManager.getString("label.show_consensus_histogram"));
875 showConsensusHistogram.addActionListener(new ActionListener()
879 public void actionPerformed(ActionEvent e)
881 showConsensusHistogram_actionPerformed(e);
886 .setText(MessageManager.getString("label.show_consensus_logo"));
887 showSequenceLogo.addActionListener(new ActionListener()
891 public void actionPerformed(ActionEvent e)
893 showSequenceLogo_actionPerformed(e);
897 normaliseSequenceLogo
898 .setText(MessageManager.getString("label.norm_consensus_logo"));
899 normaliseSequenceLogo.addActionListener(new ActionListener()
903 public void actionPerformed(ActionEvent e)
905 normaliseSequenceLogo_actionPerformed(e);
909 applyAutoAnnotationSettings
910 .setText(MessageManager.getString("label.apply_all_groups"));
911 applyAutoAnnotationSettings.setState(false);
912 applyAutoAnnotationSettings.setVisible(true);
913 applyAutoAnnotationSettings.addActionListener(new ActionListener()
916 public void actionPerformed(ActionEvent e)
918 applyAutoAnnotationSettings_actionPerformed(e);
922 ButtonGroup buttonGroup = new ButtonGroup();
923 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
924 MessageManager.getString("label.show_first"));
925 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
926 MessageManager.getString("label.show_last"));
927 buttonGroup.add(showAutoFirst);
928 buttonGroup.add(showAutoLast);
929 final boolean autoFirst = Cache
930 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
931 showAutoFirst.setSelected(autoFirst);
932 setShowAutoCalculatedAbove(autoFirst);
933 showAutoFirst.addActionListener(new ActionListener()
936 public void actionPerformed(ActionEvent e)
938 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
939 sortAnnotations_actionPerformed();
942 showAutoLast.setSelected(!showAutoFirst.isSelected());
943 showAutoLast.addActionListener(new ActionListener()
946 public void actionPerformed(ActionEvent e)
948 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
949 sortAnnotations_actionPerformed();
953 JMenuItem deleteGroups = new JMenuItem(
954 MessageManager.getString("action.undefine_groups"));
955 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
956 jalview.util.ShortcutKeyMaskExWrapper
957 .getMenuShortcutKeyMaskEx(),
959 al = new ActionListener()
962 public void actionPerformed(ActionEvent e)
964 deleteGroups_actionPerformed(e);
967 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
969 JMenuItem annotationColumn = new JMenuItem(
970 MessageManager.getString("action.select_by_annotation"));
971 annotationColumn.addActionListener(new ActionListener()
974 public void actionPerformed(ActionEvent e)
976 annotationColumn_actionPerformed(e);
980 JMenuItem createGroup = new JMenuItem(
981 MessageManager.getString("action.create_group"));
982 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
983 jalview.util.ShortcutKeyMaskExWrapper
984 .getMenuShortcutKeyMaskEx(),
986 al = new ActionListener()
989 public void actionPerformed(ActionEvent e)
991 createGroup_actionPerformed(e);
994 addMenuActionAndAccelerator(keyStroke, createGroup, al);
996 JMenuItem unGroup = new JMenuItem(
997 MessageManager.getString("action.remove_group"));
998 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
999 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1000 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1002 al = new ActionListener()
1005 public void actionPerformed(ActionEvent e)
1007 unGroup_actionPerformed(e);
1010 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1012 copy.setText(MessageManager.getString("action.copy"));
1013 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1014 jalview.util.ShortcutKeyMaskExWrapper
1015 .getMenuShortcutKeyMaskEx(),
1018 al = new ActionListener()
1021 public void actionPerformed(ActionEvent e)
1023 copy_actionPerformed();
1026 addMenuActionAndAccelerator(keyStroke, copy, al);
1028 cut.setText(MessageManager.getString("action.cut"));
1029 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1030 jalview.util.ShortcutKeyMaskExWrapper
1031 .getMenuShortcutKeyMaskEx(),
1033 al = new ActionListener()
1036 public void actionPerformed(ActionEvent e)
1038 cut_actionPerformed();
1041 addMenuActionAndAccelerator(keyStroke, cut, al);
1043 JMenuItem delete = new JMenuItem(
1044 MessageManager.getString("action.delete"));
1045 delete.addActionListener(new ActionListener()
1048 public void actionPerformed(ActionEvent e)
1050 delete_actionPerformed();
1054 pasteMenu.setText(MessageManager.getString("action.paste"));
1055 JMenuItem pasteNew = new JMenuItem(
1056 MessageManager.getString("label.to_new_alignment"));
1057 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1058 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1059 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1061 al = new ActionListener()
1064 public void actionPerformed(ActionEvent e)
1066 pasteNew_actionPerformed(e);
1069 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1071 JMenuItem pasteThis = new JMenuItem(
1072 MessageManager.getString("label.to_this_alignment"));
1073 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1074 jalview.util.ShortcutKeyMaskExWrapper
1075 .getMenuShortcutKeyMaskEx(),
1077 al = new ActionListener()
1080 public void actionPerformed(ActionEvent e)
1082 pasteThis_actionPerformed(e);
1085 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1087 JMenuItem createPNG = new JMenuItem("PNG");
1088 createPNG.addActionListener(new ActionListener()
1091 public void actionPerformed(ActionEvent e)
1096 createPNG.setActionCommand(
1097 MessageManager.getString("label.save_png_image"));
1099 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1100 font.addActionListener(new ActionListener()
1103 public void actionPerformed(ActionEvent e)
1105 font_actionPerformed(e);
1109 MessageManager.getString("label.show_sequence_limits"));
1110 seqLimits.setState(Cache.getDefault("SHOW_JVSUFFIX", true));
1111 seqLimits.addActionListener(new ActionListener()
1114 public void actionPerformed(ActionEvent e)
1116 seqLimit_actionPerformed(e);
1119 JMenuItem epsFile = new JMenuItem("EPS");
1120 epsFile.addActionListener(new ActionListener()
1123 public void actionPerformed(ActionEvent e)
1129 JMenuItem createSVG = new JMenuItem("SVG");
1130 createSVG.addActionListener(new ActionListener()
1133 public void actionPerformed(ActionEvent e)
1139 JMenuItem loadTreeMenuItem = new JMenuItem(
1140 MessageManager.getString("label.load_associated_tree"));
1141 loadTreeMenuItem.setActionCommand(
1142 MessageManager.getString("label.load_tree_for_sequence_set"));
1143 loadTreeMenuItem.addActionListener(new ActionListener()
1146 public void actionPerformed(ActionEvent e)
1148 loadTreeMenuItem_actionPerformed(e);
1152 scaleAbove.setVisible(false);
1153 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1154 scaleAbove.addActionListener(new ActionListener()
1157 public void actionPerformed(ActionEvent e)
1159 scaleAbove_actionPerformed(e);
1162 scaleLeft.setVisible(false);
1163 scaleLeft.setSelected(true);
1164 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1165 scaleLeft.addActionListener(new ActionListener()
1168 public void actionPerformed(ActionEvent e)
1170 scaleLeft_actionPerformed(e);
1173 scaleRight.setVisible(false);
1174 scaleRight.setSelected(true);
1175 scaleRight.setText(MessageManager.getString("action.scale_right"));
1176 scaleRight.addActionListener(new ActionListener()
1179 public void actionPerformed(ActionEvent e)
1181 scaleRight_actionPerformed(e);
1184 centreColumnLabelsMenuItem.setVisible(true);
1185 centreColumnLabelsMenuItem.setState(false);
1186 centreColumnLabelsMenuItem.setText(
1187 MessageManager.getString("label.centre_column_labels"));
1188 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1191 public void actionPerformed(ActionEvent e)
1193 centreColumnLabels_actionPerformed(e);
1196 followHighlightMenuItem.setVisible(true);
1197 followHighlightMenuItem.setState(true);
1198 followHighlightMenuItem
1199 .setText(MessageManager.getString("label.automatic_scrolling"));
1200 followHighlightMenuItem.addActionListener(new ActionListener()
1204 public void actionPerformed(ActionEvent e)
1206 followHighlight_actionPerformed();
1212 .setText(MessageManager.getString("action.by_tree_order"));
1213 sort.setText(MessageManager.getString("action.sort"));
1214 sort.addMenuListener(new MenuListener()
1217 public void menuSelected(MenuEvent e)
1219 buildTreeSortMenu();
1223 public void menuDeselected(MenuEvent e)
1228 public void menuCanceled(MenuEvent e)
1233 .setText(MessageManager.getString("label.sort_by_score"));
1234 sort.add(sortByAnnotScore);
1235 sort.addMenuListener(new javax.swing.event.MenuListener()
1239 public void menuCanceled(MenuEvent e)
1244 public void menuDeselected(MenuEvent e)
1249 public void menuSelected(MenuEvent e)
1251 buildSortByAnnotationScoresMenu();
1254 sortByAnnotScore.setVisible(false);
1257 .setText(MessageManager.getString("action.calculate_tree_pca"));
1259 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1260 padGapsMenuitem.setState(Cache.getDefault("PAD_GAPS", false));
1261 padGapsMenuitem.addActionListener(new ActionListener()
1264 public void actionPerformed(ActionEvent e)
1266 padGapsMenuitem_actionPerformed(e);
1269 JMenuItem vamsasStore = new JMenuItem(
1270 MessageManager.getString("label.vamsas_store"));
1271 vamsasStore.setVisible(false);
1272 vamsasStore.addActionListener(new ActionListener()
1275 public void actionPerformed(ActionEvent e)
1277 vamsasStore_actionPerformed(e);
1282 * Translate as cDNA with sub-menu of translation tables
1285 .setText(MessageManager.getString("label.translate_cDNA"));
1286 boolean first = true;
1287 for (final GeneticCodeI table : GeneticCodes.getInstance()
1290 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1291 showTranslation.add(item);
1292 item.addActionListener(new ActionListener()
1295 public void actionPerformed(ActionEvent e)
1297 showTranslation_actionPerformed(table);
1302 showTranslation.addSeparator();
1307 showReverse.setText(MessageManager.getString("label.reverse"));
1308 showReverse.addActionListener(new ActionListener()
1311 public void actionPerformed(ActionEvent e)
1313 showReverse_actionPerformed(false);
1316 showReverseComplement
1317 .setText(MessageManager.getString("label.reverse_complement"));
1318 showReverseComplement.addActionListener(new ActionListener()
1321 public void actionPerformed(ActionEvent e)
1323 showReverse_actionPerformed(true);
1327 JMenuItem extractScores = new JMenuItem(
1328 MessageManager.getString("label.extract_scores"));
1329 extractScores.addActionListener(new ActionListener()
1332 public void actionPerformed(ActionEvent e)
1334 extractScores_actionPerformed(e);
1337 extractScores.setVisible(true);
1338 // JBPNote: TODO: make gui for regex based score extraction
1340 // for show products actions see AlignFrame.canShowProducts
1341 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1343 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1344 runGroovy.setToolTipText(
1345 MessageManager.getString("label.run_groovy_tip"));
1346 runGroovy.addActionListener(new ActionListener()
1349 public void actionPerformed(ActionEvent e)
1351 runGroovy_actionPerformed();
1355 openFeatureSettings = new JMenuItem(
1356 MessageManager.getString("action.feature_settings"));
1357 openFeatureSettings.addActionListener(new ActionListener()
1360 public void actionPerformed(ActionEvent e)
1362 featureSettings_actionPerformed(e);
1367 * add sub-menu of database we can fetch from
1369 JMenuItem fetchSequence = new JMenuItem(
1370 MessageManager.getString("label.fetch_sequences"));
1371 fetchSequence.addActionListener(new ActionListener()
1374 public void actionPerformed(ActionEvent e)
1376 fetchSequence_actionPerformed();
1380 JMenuItem associatedData = new JMenuItem(
1381 MessageManager.getString("label.load_features_annotations"));
1382 associatedData.addActionListener(new ActionListener()
1385 public void actionPerformed(ActionEvent e)
1387 associatedData_actionPerformed(e);
1390 loadVcf = new JMenuItem(
1391 MessageManager.getString("label.load_vcf_file"));
1392 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1393 loadVcf.addActionListener(new ActionListener()
1396 public void actionPerformed(ActionEvent e)
1398 loadVcf_actionPerformed();
1401 autoCalculate.setText(
1402 MessageManager.getString("label.autocalculate_consensus"));
1403 autoCalculate.setState(Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1404 autoCalculate.addActionListener(new ActionListener()
1407 public void actionPerformed(ActionEvent e)
1409 autoCalculate_actionPerformed(e);
1413 MessageManager.getString("label.sort_alignment_new_tree"));
1414 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1415 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1416 sortByTree.setState(Cache.getDefault("SORT_BY_TREE", false));
1417 sortByTree.addActionListener(new ActionListener()
1420 public void actionPerformed(ActionEvent e)
1422 sortByTreeOption_actionPerformed(e);
1426 listenToViewSelections.setText(
1427 MessageManager.getString("label.listen_for_selections"));
1428 listenToViewSelections
1429 .setToolTipText("<html>" + MessageManager.getString(
1430 "label.selections_mirror_selections_made_same_sequences_other_views"));
1431 listenToViewSelections.setState(false);
1432 listenToViewSelections.addActionListener(new ActionListener()
1435 public void actionPerformed(ActionEvent e)
1437 listenToViewSelections_actionPerformed(e);
1441 JMenu addSequenceMenu = new JMenu(
1442 MessageManager.getString("label.add_sequences"));
1443 JMenuItem addFromFile = new JMenuItem(
1444 MessageManager.getString("label.from_file"));
1445 addFromFile.addActionListener(new ActionListener()
1448 public void actionPerformed(ActionEvent e)
1450 addFromFile_actionPerformed(e);
1453 JMenuItem addFromText = new JMenuItem(
1454 MessageManager.getString("label.from_textbox"));
1455 addFromText.addActionListener(new ActionListener()
1458 public void actionPerformed(ActionEvent e)
1460 addFromText_actionPerformed(e);
1463 JMenuItem addFromURL = new JMenuItem(
1464 MessageManager.getString("label.from_url"));
1465 addFromURL.addActionListener(new ActionListener()
1468 public void actionPerformed(ActionEvent e)
1470 addFromURL_actionPerformed(e);
1473 JMenuItem exportFeatures = new JMenuItem(
1474 MessageManager.getString("label.export_features"));
1475 exportFeatures.addActionListener(new ActionListener()
1478 public void actionPerformed(ActionEvent e)
1480 exportFeatures_actionPerformed(e);
1483 JMenuItem exportAnnotations = new JMenuItem(
1484 MessageManager.getString("label.export_annotations"));
1485 exportAnnotations.addActionListener(new ActionListener()
1488 public void actionPerformed(ActionEvent e)
1490 exportAnnotations_actionPerformed(e);
1493 statusPanel.setLayout(new GridLayout());
1494 JMenuItem showAllSeqs = new JMenuItem(
1495 MessageManager.getString("label.all_sequences"));
1496 showAllSeqs.setToolTipText(
1497 MessageManager.getString("label.toggle_sequence_visibility"));
1498 showAllSeqs.addActionListener(new ActionListener()
1501 public void actionPerformed(ActionEvent e)
1503 showAllSeqs_actionPerformed(e);
1506 JMenuItem showAllColumns = new JMenuItem(
1507 MessageManager.getString("label.all_columns"));
1508 showAllColumns.setToolTipText(
1509 MessageManager.getString("label.toggle_columns_visibility"));
1510 showAllColumns.addActionListener(new ActionListener()
1513 public void actionPerformed(ActionEvent e)
1515 showAllColumns_actionPerformed(e);
1518 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1519 JMenuItem hideSelSequences = new JMenuItem(
1520 MessageManager.getString("label.selected_sequences"));
1521 hideSelSequences.setToolTipText(
1522 MessageManager.getString("label.toggle_sequence_visibility"));
1523 hideSelSequences.addActionListener(new ActionListener()
1526 public void actionPerformed(ActionEvent e)
1528 hideSelSequences_actionPerformed(e);
1531 JMenuItem hideSelColumns = new JMenuItem(
1532 MessageManager.getString("label.selected_columns"));
1533 hideSelColumns.setToolTipText(
1534 MessageManager.getString("label.toggle_columns_visibility"));
1535 hideSelColumns.addActionListener(new ActionListener()
1538 public void actionPerformed(ActionEvent e)
1540 hideSelColumns_actionPerformed(e);
1543 JMenuItem hideAllSelection = new JMenuItem(
1544 MessageManager.getString("label.selected_region"));
1545 hideAllSelection.addActionListener(new ActionListener()
1548 public void actionPerformed(ActionEvent e)
1550 hideAllSelection_actionPerformed(e);
1553 // TODO: should be hidden if no selection exists.
1554 JMenuItem hideAllButSelection = new JMenuItem(
1555 MessageManager.getString("label.all_but_selected_region"));
1556 hideAllButSelection.addActionListener(new ActionListener()
1559 public void actionPerformed(ActionEvent e)
1561 hideAllButSelection_actionPerformed(e);
1564 JMenuItem showAllhidden = new JMenuItem(
1565 MessageManager.getString("label.all_sequences_columns"));
1566 showAllhidden.setToolTipText(MessageManager
1567 .getString("label.toggles_visibility_hidden_selected_regions"));
1568 showAllhidden.addActionListener(new ActionListener()
1571 public void actionPerformed(ActionEvent e)
1573 showAllhidden_actionPerformed(e);
1576 hiddenMarkers.setText(
1577 MessageManager.getString("action.show_hidden_markers"));
1578 hiddenMarkers.addActionListener(new ActionListener()
1581 public void actionPerformed(ActionEvent e)
1583 hiddenMarkers_actionPerformed(e);
1587 JMenuItem invertColSel = new JMenuItem(
1588 MessageManager.getString("action.invert_column_selection"));
1589 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1590 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1591 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1593 al = new ActionListener()
1596 public void actionPerformed(ActionEvent e)
1598 invertColSel_actionPerformed(e);
1601 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1603 showComplementMenuItem.setVisible(false);
1604 showComplementMenuItem.addActionListener(new ActionListener()
1607 public void actionPerformed(ActionEvent e)
1609 showComplement_actionPerformed(showComplementMenuItem.getState());
1613 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1616 public void stateChanged(ChangeEvent evt)
1618 JTabbedPane pane = (JTabbedPane) evt.getSource();
1619 int sel = pane.getSelectedIndex();
1620 tabSelectionChanged(sel);
1623 tabbedPane.addMouseListener(new MouseAdapter()
1626 public void mousePressed(MouseEvent e)
1628 if (e.isPopupTrigger()) // Mac
1630 tabbedPane_mousePressed(e);
1635 public void mouseReleased(MouseEvent e)
1637 if (e.isPopupTrigger()) // Windows
1639 tabbedPane_mousePressed(e);
1643 tabbedPane.addFocusListener(new FocusAdapter()
1646 public void focusGained(FocusEvent e)
1648 tabbedPane_focusGained(e);
1652 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1653 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1654 jalview.util.ShortcutKeyMaskExWrapper
1655 .getMenuShortcutKeyMaskEx(),
1657 al = new ActionListener()
1660 public void actionPerformed(ActionEvent e)
1662 save_actionPerformed(e);
1665 addMenuActionAndAccelerator(keyStroke, save, al);
1667 reload.setEnabled(false);
1668 reload.setText(MessageManager.getString("action.reload"));
1669 reload.addActionListener(new ActionListener()
1672 public void actionPerformed(ActionEvent e)
1674 reload_actionPerformed(e);
1678 JMenuItem newView = new JMenuItem(
1679 MessageManager.getString("action.new_view"));
1680 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1681 jalview.util.ShortcutKeyMaskExWrapper
1682 .getMenuShortcutKeyMaskEx(),
1684 al = new ActionListener()
1687 public void actionPerformed(ActionEvent e)
1689 newView_actionPerformed(e);
1692 addMenuActionAndAccelerator(keyStroke, newView, al);
1694 tabbedPane.setToolTipText("<html><i>"
1695 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1698 formatMenu.setText(MessageManager.getString("action.format"));
1699 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1701 idRightAlign.setText(
1702 MessageManager.getString("label.right_align_sequence_id"));
1703 idRightAlign.addActionListener(new ActionListener()
1706 public void actionPerformed(ActionEvent e)
1708 idRightAlign_actionPerformed(e);
1712 gatherViews.setEnabled(false);
1713 gatherViews.setText(MessageManager.getString("action.gather_views"));
1714 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1715 al = new ActionListener()
1718 public void actionPerformed(ActionEvent e)
1720 gatherViews_actionPerformed(e);
1723 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1725 expandViews.setEnabled(false);
1726 expandViews.setText(MessageManager.getString("action.expand_views"));
1727 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1728 al = new ActionListener()
1731 public void actionPerformed(ActionEvent e)
1733 expandViews_actionPerformed(e);
1736 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1738 JMenuItem pageSetup = new JMenuItem(
1739 MessageManager.getString("action.page_setup"));
1740 pageSetup.addActionListener(new ActionListener()
1743 public void actionPerformed(ActionEvent e)
1745 pageSetup_actionPerformed(e);
1748 JMenuItem alignmentProperties = new JMenuItem(
1749 MessageManager.getString("label.alignment_props"));
1750 alignmentProperties.addActionListener(new ActionListener()
1753 public void actionPerformed(ActionEvent actionEvent)
1755 alignmentProperties();
1758 JMenuItem selectHighlighted = new JMenuItem(
1759 MessageManager.getString("action.select_highlighted_columns"));
1760 selectHighlighted.setToolTipText(
1761 MessageManager.getString("tooltip.select_highlighted_columns"));
1762 al = new ActionListener()
1765 public void actionPerformed(ActionEvent actionEvent)
1767 selectHighlightedColumns_actionPerformed(actionEvent);
1770 selectHighlighted.addActionListener(al);
1771 JMenu tooltipSettingsMenu = new JMenu(
1772 MessageManager.getString("label.sequence_id_tooltip"));
1773 JMenu autoAnnMenu = new JMenu(
1774 MessageManager.getString("label.autocalculated_annotation"));
1776 JMenu exportImageMenu = new JMenu(
1777 MessageManager.getString("label.export_image"));
1778 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1779 alignFrameMenuBar.add(fileMenu);
1780 alignFrameMenuBar.add(editMenu);
1781 alignFrameMenuBar.add(selectMenu);
1782 alignFrameMenuBar.add(viewMenu);
1783 alignFrameMenuBar.add(annotationsMenu);
1784 alignFrameMenuBar.add(formatMenu);
1785 alignFrameMenuBar.add(colourMenu);
1786 alignFrameMenuBar.add(calculateMenu);
1787 if (!Platform.isJS())
1789 alignFrameMenuBar.add(webService);
1792 fileMenu.add(fetchSequence);
1793 fileMenu.add(addSequenceMenu);
1794 fileMenu.add(reload);
1795 fileMenu.addSeparator();
1796 fileMenu.add(vamsasStore);
1798 fileMenu.add(saveAs);
1799 fileMenu.add(outputTextboxMenu);
1800 fileMenu.add(pageSetup);
1801 fileMenu.add(printMenuItem);
1802 fileMenu.addSeparator();
1803 fileMenu.add(exportImageMenu);
1804 fileMenu.add(exportFeatures);
1805 fileMenu.add(exportAnnotations);
1806 fileMenu.add(loadTreeMenuItem);
1807 fileMenu.add(associatedData);
1808 if (!Platform.isJS())
1810 fileMenu.add(loadVcf);
1812 fileMenu.addSeparator();
1813 fileMenu.add(closeMenuItem);
1815 pasteMenu.add(pasteNew);
1816 pasteMenu.add(pasteThis);
1817 editMenu.add(undoMenuItem);
1818 editMenu.add(redoMenuItem);
1821 editMenu.add(pasteMenu);
1822 editMenu.add(delete);
1823 editMenu.addSeparator();
1824 editMenu.add(remove2LeftMenuItem);
1825 editMenu.add(remove2RightMenuItem);
1826 editMenu.add(removeGappedColumnMenuItem);
1827 editMenu.add(removeAllGapsMenuItem);
1828 editMenu.add(removeRedundancyMenuItem);
1829 editMenu.addSeparator();
1830 // dont add these yet in the CVS build - they cannot be undone!
1831 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1832 // editMenu.add(justifyLeftMenuItem);
1833 // editMenu.add(justifyRightMenuItem);
1834 // editMenu.addSeparator();
1835 editMenu.add(padGapsMenuitem);
1837 showMenu.add(showAllColumns);
1838 showMenu.add(showAllSeqs);
1839 showMenu.add(showAllhidden);
1840 hideMenu.add(hideSelColumns);
1841 hideMenu.add(hideSelSequences);
1842 hideMenu.add(hideAllSelection);
1843 hideMenu.add(hideAllButSelection);
1844 viewMenu.add(newView);
1845 viewMenu.add(expandViews);
1846 viewMenu.add(gatherViews);
1847 viewMenu.addSeparator();
1848 viewMenu.add(showMenu);
1849 viewMenu.add(hideMenu);
1850 viewMenu.add(showComplementMenuItem);
1851 viewMenu.addSeparator();
1852 viewMenu.add(followHighlightMenuItem);
1853 viewMenu.addSeparator();
1854 viewMenu.add(showSeqFeatures);
1855 // viewMenu.add(showSeqFeaturesHeight);
1856 viewMenu.add(openFeatureSettings);
1857 tooltipSettingsMenu.add(showDbRefsMenuitem);
1858 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1859 viewMenu.add(tooltipSettingsMenu);
1860 viewMenu.addSeparator();
1861 viewMenu.add(alignmentProperties);
1862 viewMenu.addSeparator();
1863 viewMenu.add(overviewMenuItem);
1865 annotationsMenu.add(annotationPanelMenuItem);
1866 annotationsMenu.addSeparator();
1867 annotationsMenu.add(showAllAlAnnotations);
1868 annotationsMenu.add(hideAllAlAnnotations);
1869 annotationsMenu.addSeparator();
1870 annotationsMenu.add(showAllSeqAnnotations);
1871 annotationsMenu.add(hideAllSeqAnnotations);
1872 annotationsMenu.add(sortAnnBySequence);
1873 annotationsMenu.add(sortAnnByLabel);
1874 annotationsMenu.addSeparator();
1875 autoAnnMenu.add(showAutoFirst);
1876 autoAnnMenu.add(showAutoLast);
1877 autoAnnMenu.addSeparator();
1878 autoAnnMenu.add(showSeqFeatureCounts);
1879 autoAnnMenu.add(applyAutoAnnotationSettings);
1880 autoAnnMenu.add(showConsensusHistogram);
1881 autoAnnMenu.add(showSequenceLogo);
1882 autoAnnMenu.add(normaliseSequenceLogo);
1883 autoAnnMenu.addSeparator();
1884 autoAnnMenu.add(showGroupConservation);
1885 autoAnnMenu.add(showGroupConsensus);
1886 annotationsMenu.add(autoAnnMenu);
1888 sort.add(sortIDMenuItem);
1889 sort.add(sortLengthMenuItem);
1890 sort.add(sortGroupMenuItem);
1891 sort.add(sortPairwiseMenuItem);
1892 sort.add(sortByTreeMenu);
1893 calculateMenu.add(sort);
1894 calculateMenu.add(calculateTree);
1895 calculateMenu.addSeparator();
1896 calculateMenu.add(pairwiseAlignmentMenuItem);
1897 calculateMenu.addSeparator();
1898 calculateMenu.add(showTranslation);
1899 calculateMenu.add(showReverse);
1900 calculateMenu.add(showReverseComplement);
1901 calculateMenu.add(showProducts);
1902 calculateMenu.add(autoCalculate);
1903 calculateMenu.add(sortByTree);
1904 calculateMenu.addSeparator();
1905 calculateMenu.add(expandAlignment);
1906 calculateMenu.add(extractScores);
1907 if (!Platform.isJS())
1909 calculateMenu.addSeparator();
1910 calculateMenu.add(runGroovy);
1913 webServiceNoServices = new JMenuItem(
1914 MessageManager.getString("label.no_services"));
1915 webService.add(webServiceNoServices);
1916 if (!Platform.isJS())
1918 exportImageMenu.add(htmlMenuItem);
1920 exportImageMenu.add(epsFile);
1921 exportImageMenu.add(createPNG);
1922 if (!Platform.isJS())
1924 exportImageMenu.add(createBioJS);
1925 exportImageMenu.add(createSVG);
1927 addSequenceMenu.add(addFromFile);
1928 addSequenceMenu.add(addFromText);
1929 addSequenceMenu.add(addFromURL);
1930 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1931 statusPanel.add(statusBar, null);
1932 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1934 formatMenu.add(font);
1935 formatMenu.addSeparator();
1936 formatMenu.add(wrapMenuItem);
1937 formatMenu.add(scaleAbove);
1938 formatMenu.add(scaleLeft);
1939 formatMenu.add(scaleRight);
1940 formatMenu.add(seqLimits);
1941 formatMenu.add(idRightAlign);
1942 formatMenu.add(hiddenMarkers);
1943 formatMenu.add(viewBoxesMenuItem);
1944 formatMenu.add(viewTextMenuItem);
1945 formatMenu.add(colourTextMenuItem);
1946 formatMenu.add(renderGapsMenuItem);
1947 formatMenu.add(centreColumnLabelsMenuItem);
1948 formatMenu.add(showNonconservedMenuItem);
1949 selectMenu.add(findMenuItem);
1950 selectMenu.addSeparator();
1951 selectMenu.add(selectAllSequenceMenuItem);
1952 selectMenu.add(deselectAllSequenceMenuItem);
1953 selectMenu.add(invertSequenceMenuItem);
1954 selectMenu.add(invertColSel);
1955 selectMenu.add(createGroup);
1956 selectMenu.add(unGroup);
1957 selectMenu.add(grpsFromSelection);
1958 selectMenu.add(deleteGroups);
1959 selectMenu.add(annotationColumn);
1960 selectMenu.add(selectHighlighted);
1961 // TODO - determine if the listenToViewSelections button is needed : see bug
1963 // selectMenu.addSeparator();
1964 // selectMenu.add(listenToViewSelections);
1967 protected void showSeqFeatureCounts_actionPerformed(
1968 ActionEvent actionEvent)
1970 // TODO Auto-generated method stub
1974 protected void loadVcf_actionPerformed()
1979 * Constructs the entries on the Colour menu (but does not add them to the
1982 protected void initColourMenu()
1984 applyToAllGroups = new JCheckBoxMenuItem(
1985 MessageManager.getString("label.apply_colour_to_all_groups"));
1986 applyToAllGroups.addActionListener(new ActionListener()
1989 public void actionPerformed(ActionEvent e)
1991 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1995 textColour = new JMenuItem(
1996 MessageManager.getString("label.text_colour"));
1997 textColour.addActionListener(new ActionListener()
2000 public void actionPerformed(ActionEvent e)
2002 textColour_actionPerformed();
2006 conservationMenuItem = new JCheckBoxMenuItem(
2007 MessageManager.getString("action.by_conservation"));
2008 conservationMenuItem.addActionListener(new ActionListener()
2011 public void actionPerformed(ActionEvent e)
2013 conservationMenuItem_actionPerformed(
2014 conservationMenuItem.isSelected());
2018 abovePIDThreshold = new JCheckBoxMenuItem(
2019 MessageManager.getString("label.above_identity_threshold"));
2020 abovePIDThreshold.addActionListener(new ActionListener()
2023 public void actionPerformed(ActionEvent e)
2025 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2028 modifyPID = new JMenuItem(
2029 MessageManager.getString("label.modify_identity_threshold"));
2030 modifyPID.addActionListener(new ActionListener()
2033 public void actionPerformed(ActionEvent e)
2035 modifyPID_actionPerformed();
2038 modifyConservation = new JMenuItem(MessageManager
2039 .getString("label.modify_conservation_threshold"));
2040 modifyConservation.addActionListener(new ActionListener()
2043 public void actionPerformed(ActionEvent e)
2045 modifyConservation_actionPerformed();
2049 annotationColour = new JRadioButtonMenuItem(
2050 MessageManager.getString("action.by_annotation"));
2051 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2052 annotationColour.addActionListener(new ActionListener()
2055 public void actionPerformed(ActionEvent e)
2057 annotationColour_actionPerformed();
2062 protected void selectHighlightedColumns_actionPerformed(
2063 ActionEvent actionEvent)
2065 // TODO Auto-generated method stub
2070 * Generate the reverse sequence (or reverse complement if the flag is true)
2071 * and add it to the alignment
2075 protected void showReverse_actionPerformed(boolean complement)
2080 * Try to run script in a Groovy console, having first ensured that this
2081 * alignframe is set as currentAlignFrame in Desktop
2083 protected void runGroovy_actionPerformed()
2089 * Adds the given action listener and key accelerator to the given menu item.
2090 * Also saves in a lookup table to support lookup of action by key stroke.
2094 * @param actionListener
2096 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2097 JMenuItem menuItem, ActionListener actionListener)
2099 menuItem.setAccelerator(keyStroke);
2100 accelerators.put(keyStroke, menuItem);
2101 menuItem.addActionListener(actionListener);
2105 * Action on clicking sort annotations by type.
2109 protected void sortAnnotations_actionPerformed()
2114 * Action on clicking Show all annotations.
2116 * @param forSequences
2117 * update sequence-related annotations
2118 * @param forAlignment
2119 * update non-sequence-related annotations
2121 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2122 boolean forAlignment)
2124 setAnnotationsVisibility(true, forSequences, forAlignment);
2128 * Action on clicking Hide all annotations.
2130 * @param forSequences
2131 * update sequence-related annotations
2132 * @param forAlignment
2133 * update non-sequence-related annotations
2135 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2136 boolean forAlignment)
2138 setAnnotationsVisibility(false, forSequences, forAlignment);
2142 * Set the visibility of annotations to true or false. Can act on
2143 * sequence-related annotations, or alignment-related, or both.
2146 * @param forSequences
2147 * update sequence-related annotations
2148 * @param forAlignment
2149 * update non-sequence-related annotations
2151 protected void setAnnotationsVisibility(boolean visible,
2152 boolean forSequences, boolean forAlignment)
2157 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2159 // TODO Auto-generated method stub
2163 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2165 // TODO Auto-generated method stub
2169 protected void showAllhidden_actionPerformed(ActionEvent e)
2171 // TODO Auto-generated method stub
2175 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2177 // TODO Auto-generated method stub
2181 protected void hideAllSelection_actionPerformed(ActionEvent e)
2183 // TODO Auto-generated method stub
2187 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2189 // TODO Auto-generated method stub
2193 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2195 // TODO Auto-generated method stub
2199 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2201 // TODO Auto-generated method stub
2205 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2207 // TODO Auto-generated method stub
2211 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2213 // TODO Auto-generated method stub
2217 protected void showGroupConservation_actionPerformed(ActionEvent e)
2219 // TODO Auto-generated method stub
2223 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2225 // TODO Auto-generated method stub
2229 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2231 // TODO Auto-generated method stub
2235 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2237 // TODO Auto-generated method stub
2241 protected void followHighlight_actionPerformed()
2243 // TODO Auto-generated method stub
2247 protected void showNpFeats_actionPerformed(ActionEvent e)
2249 // TODO Auto-generated method stub
2253 protected void showDbRefs_actionPerformed(ActionEvent e)
2255 // TODO Auto-generated method stub
2259 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2263 protected void buildSortByAnnotationScoresMenu()
2267 protected void extractScores_actionPerformed(ActionEvent e)
2271 protected void outputText_actionPerformed(String formatName)
2275 public void addFromFile_actionPerformed(ActionEvent e)
2280 public void addFromText_actionPerformed(ActionEvent e)
2285 public void addFromURL_actionPerformed(ActionEvent e)
2290 public void exportFeatures_actionPerformed(ActionEvent e)
2295 public void exportAnnotations_actionPerformed(ActionEvent e)
2300 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2304 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2309 protected void closeMenuItem_actionPerformed(boolean b)
2313 protected void redoMenuItem_actionPerformed(ActionEvent e)
2317 protected void undoMenuItem_actionPerformed(ActionEvent e)
2321 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2325 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2329 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2333 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2337 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2341 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2345 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2349 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2353 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2357 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2361 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2365 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2369 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2373 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2377 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2381 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2385 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2389 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2393 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2397 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2401 protected void conservationMenuItem_actionPerformed(boolean selected)
2405 protected void printMenuItem_actionPerformed(ActionEvent e)
2409 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2413 protected void findMenuItem_actionPerformed(ActionEvent e)
2417 protected void abovePIDThreshold_actionPerformed(boolean selected)
2421 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2425 protected void deleteGroups_actionPerformed(ActionEvent e)
2429 protected void createGroup_actionPerformed(ActionEvent e)
2433 protected void unGroup_actionPerformed(ActionEvent e)
2437 protected void copy_actionPerformed()
2441 protected void cut_actionPerformed()
2445 protected void delete_actionPerformed()
2449 protected void pasteNew_actionPerformed(ActionEvent e)
2453 protected void pasteThis_actionPerformed(ActionEvent e)
2457 protected void applyToAllGroups_actionPerformed(boolean selected)
2461 public void createPNG(java.io.File f)
2465 protected void font_actionPerformed(ActionEvent e)
2469 protected void seqLimit_actionPerformed(ActionEvent e)
2473 public void seqDBRef_actionPerformed(ActionEvent e)
2478 public void createEPS(java.io.File f)
2482 public void createSVG(java.io.File f)
2487 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2493 * Template method to handle the 'load T-Coffee scores' menu event.
2495 * Subclasses override this method to provide a custom action.
2500 protected void loadScores_actionPerformed(ActionEvent event)
2505 protected void jpred_actionPerformed(ActionEvent e)
2509 protected void scaleAbove_actionPerformed(ActionEvent e)
2513 protected void scaleLeft_actionPerformed(ActionEvent e)
2517 protected void scaleRight_actionPerformed(ActionEvent e)
2521 protected void modifyPID_actionPerformed()
2525 protected void modifyConservation_actionPerformed()
2529 protected void saveAs_actionPerformed()
2533 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2537 public void vamsasStore_actionPerformed(ActionEvent e)
2542 public void vamsasLoad_actionPerformed(ActionEvent e)
2547 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2552 public void featureSettings_actionPerformed(ActionEvent e)
2557 public void fetchSequence_actionPerformed()
2562 public void smoothFont_actionPerformed(ActionEvent e)
2567 public void annotationColour_actionPerformed()
2571 public void annotationColumn_actionPerformed(ActionEvent e)
2575 public void associatedData_actionPerformed(ActionEvent e)
2580 public void autoCalculate_actionPerformed(ActionEvent e)
2585 public void sortByTreeOption_actionPerformed(ActionEvent e)
2590 public void showAllSeqs_actionPerformed(ActionEvent e)
2595 public void showAllColumns_actionPerformed(ActionEvent e)
2600 public void hideSelSequences_actionPerformed(ActionEvent e)
2605 public void hideSelColumns_actionPerformed(ActionEvent e)
2610 public void hiddenMarkers_actionPerformed(ActionEvent e)
2615 public void findPdbId_actionPerformed(ActionEvent e)
2620 public void enterPdbId_actionPerformed(ActionEvent e)
2625 public void pdbFile_actionPerformed(ActionEvent e)
2630 public void invertColSel_actionPerformed(ActionEvent e)
2635 public void tabSelectionChanged(int sel)
2640 public void tabbedPane_mousePressed(MouseEvent e)
2645 public void tabbedPane_focusGained(FocusEvent e)
2650 public void save_actionPerformed(ActionEvent e)
2655 public void reload_actionPerformed(ActionEvent e)
2660 public void newView_actionPerformed(ActionEvent e)
2665 public void textColour_actionPerformed()
2670 public void idRightAlign_actionPerformed(ActionEvent e)
2675 public void expandViews_actionPerformed(ActionEvent e)
2680 public void gatherViews_actionPerformed(ActionEvent e)
2685 public void buildTreeSortMenu()
2690 public void pageSetup_actionPerformed(ActionEvent e)
2695 public void alignmentProperties()
2700 protected void expand_newalign(ActionEvent e)
2702 // TODO Auto-generated method stub
2706 protected boolean isShowAutoCalculatedAbove()
2708 return showAutoCalculatedAbove;
2711 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2713 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2716 protected SequenceAnnotationOrder getAnnotationSortOrder()
2718 return annotationSortOrder;
2721 protected void setAnnotationSortOrder(
2722 SequenceAnnotationOrder annotationSortOrder)
2724 this.annotationSortOrder = annotationSortOrder;
2727 public Map<KeyStroke, JMenuItem> getAccelerators()
2729 return this.accelerators;
2733 * Returns the selected index of the tabbed pane, or -1 if none selected
2734 * (including the case where the tabbed pane has not been made visible).
2738 public int getTabIndex()
2740 return tabbedPane.getSelectedIndex();
2743 public JPanel getStatusPanel()
2749 * Sets a reference to the containing split frame. Also makes the 'toggle
2750 * split view' menu item visible and checked.
2754 public void setSplitFrame(SplitContainerI sf)
2756 this.splitFrame = sf;
2759 this.showComplementMenuItem.setVisible(true);
2760 this.showComplementMenuItem.setState(true);
2764 public SplitContainerI getSplitViewContainer()
2766 return this.splitFrame;
2769 protected void showComplement_actionPerformed(boolean complement)