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 JMenuItem copy = new JMenuItem();
107 JMenuItem copyHighlighted = 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;
225 // for Web-page embedding using id=align-frame-div
226 setName("jalview-alignment");
229 setJMenuBar(alignFrameMenuBar);
231 // dynamically fill save as menu with available formats
232 for (String ff : FileFormats.getInstance().getWritableFormats(true))
234 JMenuItem item = new JMenuItem(ff);
236 item.addActionListener(new ActionListener()
239 public void actionPerformed(ActionEvent e)
241 outputText_actionPerformed(e.getActionCommand());
245 outputTextboxMenu.add(item);
247 } catch (Exception e)
249 jalview.bin.Console.errPrintln(e.toString());
252 if (Platform.allowMnemonics()) // was "not mac and not JS"
254 closeMenuItem.setMnemonic('C');
255 outputTextboxMenu.setMnemonic('T');
256 undoMenuItem.setMnemonic('Z');
257 redoMenuItem.setMnemonic('0');
258 copy.setMnemonic('C');
259 cut.setMnemonic('U');
260 pasteMenu.setMnemonic('P');
261 reload.setMnemonic('R');
265 private void jbInit() throws Exception
270 JMenuItem saveAs = new JMenuItem(
271 MessageManager.getString("action.save_as"));
272 ActionListener al = new ActionListener()
275 public void actionPerformed(ActionEvent e)
277 saveAs_actionPerformed();
281 // FIXME getDefaultToolkit throws an exception in Headless mode
282 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
283 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
284 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
286 addMenuActionAndAccelerator(keyStroke, saveAs, al);
288 closeMenuItem.setText(MessageManager.getString("action.close"));
289 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
290 jalview.util.ShortcutKeyMaskExWrapper
291 .getMenuShortcutKeyMaskEx(),
293 al = new ActionListener()
296 public void actionPerformed(ActionEvent e)
298 closeMenuItem_actionPerformed(false);
301 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
303 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
304 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
305 JMenu annotationsMenu = new JMenu(
306 MessageManager.getString("action.annotations"));
307 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
308 colourMenu.setText(MessageManager.getString("action.colour"));
309 JMenu calculateMenu = new JMenu(
310 MessageManager.getString("action.calculate"));
311 webService.setText(MessageManager.getString("action.web_service"));
312 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
313 MessageManager.getString("action.select_all"));
314 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
315 jalview.util.ShortcutKeyMaskExWrapper
316 .getMenuShortcutKeyMaskEx(),
318 al = new ActionListener()
321 public void actionPerformed(ActionEvent e)
323 selectAllSequenceMenuItem_actionPerformed(e);
326 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
328 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
329 MessageManager.getString("action.deselect_all"));
330 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
331 al = new ActionListener()
334 public void actionPerformed(ActionEvent e)
336 deselectAllSequenceMenuItem_actionPerformed(e);
339 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
341 JMenuItem invertSequenceMenuItem = new JMenuItem(
342 MessageManager.getString("action.invert_sequence_selection"));
343 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
344 jalview.util.ShortcutKeyMaskExWrapper
345 .getMenuShortcutKeyMaskEx(),
347 al = new ActionListener()
350 public void actionPerformed(ActionEvent e)
352 invertSequenceMenuItem_actionPerformed(e);
355 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
357 JMenuItem grpsFromSelection = new JMenuItem(
358 MessageManager.getString("action.make_groups_selection"));
359 grpsFromSelection.addActionListener(new ActionListener()
362 public void actionPerformed(ActionEvent e)
364 makeGrpsFromSelection_actionPerformed(e);
367 JMenuItem expandAlignment = new JMenuItem(
368 MessageManager.getString("action.view_flanking_regions"));
369 expandAlignment.setToolTipText(
370 MessageManager.getString("label.view_flanking_regions"));
371 expandAlignment.addActionListener(new ActionListener()
374 public void actionPerformed(ActionEvent e)
379 JMenuItem remove2LeftMenuItem = new JMenuItem(
380 MessageManager.getString("action.remove_left"));
381 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
382 jalview.util.ShortcutKeyMaskExWrapper
383 .getMenuShortcutKeyMaskEx(),
385 al = new ActionListener()
388 public void actionPerformed(ActionEvent e)
390 remove2LeftMenuItem_actionPerformed(e);
393 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
395 JMenuItem remove2RightMenuItem = new JMenuItem(
396 MessageManager.getString("action.remove_right"));
397 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
398 jalview.util.ShortcutKeyMaskExWrapper
399 .getMenuShortcutKeyMaskEx(),
401 al = new ActionListener()
404 public void actionPerformed(ActionEvent e)
406 remove2RightMenuItem_actionPerformed(e);
409 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
411 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
412 MessageManager.getString("action.remove_empty_columns"));
413 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
414 jalview.util.ShortcutKeyMaskExWrapper
415 .getMenuShortcutKeyMaskEx(),
417 al = new ActionListener()
420 public void actionPerformed(ActionEvent e)
422 removeGappedColumnMenuItem_actionPerformed(e);
425 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
427 JMenuItem removeAllGapsMenuItem = new JMenuItem(
428 MessageManager.getString("action.remove_all_gaps"));
429 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
430 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
431 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
433 al = new ActionListener()
436 public void actionPerformed(ActionEvent e)
438 removeAllGapsMenuItem_actionPerformed(e);
441 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
443 JMenuItem justifyLeftMenuItem = new JMenuItem(
444 MessageManager.getString("action.left_justify_alignment"));
445 justifyLeftMenuItem.addActionListener(new ActionListener()
448 public void actionPerformed(ActionEvent e)
450 justifyLeftMenuItem_actionPerformed(e);
453 JMenuItem justifyRightMenuItem = new JMenuItem(
454 MessageManager.getString("action.right_justify_alignment"));
455 justifyRightMenuItem.addActionListener(new ActionListener()
458 public void actionPerformed(ActionEvent e)
460 justifyRightMenuItem_actionPerformed(e);
463 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
464 viewBoxesMenuItem.setState(true);
465 viewBoxesMenuItem.addActionListener(new ActionListener()
468 public void actionPerformed(ActionEvent e)
470 viewBoxesMenuItem_actionPerformed(e);
473 viewTextMenuItem.setText(MessageManager.getString("action.text"));
474 viewTextMenuItem.setState(true);
475 viewTextMenuItem.addActionListener(new ActionListener()
478 public void actionPerformed(ActionEvent e)
480 viewTextMenuItem_actionPerformed(e);
483 showNonconservedMenuItem
484 .setText(MessageManager.getString("label.show_non_conserved"));
485 showNonconservedMenuItem.setState(false);
486 showNonconservedMenuItem.addActionListener(new ActionListener()
489 public void actionPerformed(ActionEvent e)
491 showUnconservedMenuItem_actionPerformed(e);
494 JMenuItem sortPairwiseMenuItem = new JMenuItem(
495 MessageManager.getString("action.by_pairwise_id"));
496 sortPairwiseMenuItem.addActionListener(new ActionListener()
499 public void actionPerformed(ActionEvent e)
501 sortPairwiseMenuItem_actionPerformed(e);
504 JMenuItem sortIDMenuItem = new JMenuItem(
505 MessageManager.getString("action.by_id"));
506 sortIDMenuItem.addActionListener(new ActionListener()
509 public void actionPerformed(ActionEvent e)
511 sortIDMenuItem_actionPerformed(e);
514 JMenuItem sortLengthMenuItem = new JMenuItem(
515 MessageManager.getString("action.by_length"));
516 sortLengthMenuItem.addActionListener(new ActionListener()
519 public void actionPerformed(ActionEvent e)
521 sortLengthMenuItem_actionPerformed(e);
524 JMenuItem sortGroupMenuItem = new JMenuItem(
525 MessageManager.getString("action.by_group"));
526 sortGroupMenuItem.addActionListener(new ActionListener()
529 public void actionPerformed(ActionEvent e)
531 sortGroupMenuItem_actionPerformed(e);
535 JMenuItem removeRedundancyMenuItem = new JMenuItem(
536 MessageManager.getString("action.remove_redundancy"));
537 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
538 jalview.util.ShortcutKeyMaskExWrapper
539 .getMenuShortcutKeyMaskEx(),
541 al = new ActionListener()
544 public void actionPerformed(ActionEvent e)
546 removeRedundancyMenuItem_actionPerformed(e);
549 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
551 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
552 MessageManager.getString("action.pairwise_alignment"));
553 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
556 public void actionPerformed(ActionEvent e)
558 pairwiseAlignmentMenuItem_actionPerformed(e);
562 this.getContentPane().setLayout(new BorderLayout());
563 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
564 statusBar.setBackground(Color.white);
565 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
566 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
567 statusBar.setText(MessageManager.getString("label.status_bar"));
569 .setText(MessageManager.getString("label.out_to_textbox"));
571 annotationPanelMenuItem.setActionCommand("");
572 annotationPanelMenuItem
573 .setText(MessageManager.getString("label.show_annotations"));
574 annotationPanelMenuItem
575 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
576 annotationPanelMenuItem.addActionListener(new ActionListener()
579 public void actionPerformed(ActionEvent e)
581 annotationPanelMenuItem_actionPerformed(e);
584 showAllAlAnnotations.setText(
585 MessageManager.getString("label.show_all_al_annotations"));
586 final boolean isAnnotationPanelShown = annotationPanelMenuItem
588 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
589 showAllAlAnnotations.addActionListener(new ActionListener()
592 public void actionPerformed(ActionEvent e)
594 showAllAnnotations_actionPerformed(false, true);
597 hideAllAlAnnotations.setText(
598 MessageManager.getString("label.hide_all_al_annotations"));
599 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
600 hideAllAlAnnotations.addActionListener(new ActionListener()
603 public void actionPerformed(ActionEvent e)
605 hideAllAnnotations_actionPerformed(false, true);
608 showAllSeqAnnotations.setText(
609 MessageManager.getString("label.show_all_seq_annotations"));
610 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
611 showAllSeqAnnotations.addActionListener(new ActionListener()
614 public void actionPerformed(ActionEvent e)
616 showAllAnnotations_actionPerformed(true, false);
619 hideAllSeqAnnotations.setText(
620 MessageManager.getString("label.hide_all_seq_annotations"));
621 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
622 hideAllSeqAnnotations.addActionListener(new ActionListener()
625 public void actionPerformed(ActionEvent e)
627 hideAllAnnotations_actionPerformed(true, false);
630 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
631 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
632 SequenceAnnotationOrder.NONE.name()));
633 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
634 MessageManager.getString("label.sort_annotations_by_sequence"));
635 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
636 MessageManager.getString("label.sort_annotations_by_label"));
638 sortAnnBySequence.setSelected(
639 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
640 sortAnnBySequence.addActionListener(new ActionListener()
643 public void actionPerformed(ActionEvent e)
645 boolean newState = sortAnnBySequence.getState();
646 sortAnnByLabel.setSelected(false);
647 setAnnotationSortOrder(
648 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
649 : SequenceAnnotationOrder.NONE);
650 sortAnnotations_actionPerformed();
653 sortAnnByLabel.setSelected(
654 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
655 sortAnnByLabel.addActionListener(new ActionListener()
658 public void actionPerformed(ActionEvent e)
660 boolean newState = sortAnnByLabel.getState();
661 sortAnnBySequence.setSelected(false);
662 setAnnotationSortOrder(
663 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
664 : SequenceAnnotationOrder.NONE);
665 sortAnnotations_actionPerformed();
668 colourTextMenuItem = new JCheckBoxMenuItem(
669 MessageManager.getString("label.colour_text"));
670 colourTextMenuItem.addActionListener(new ActionListener()
673 public void actionPerformed(ActionEvent e)
675 colourTextMenuItem_actionPerformed(e);
679 JMenuItem htmlMenuItem = new JMenuItem(
680 MessageManager.getString("label.html"));
681 htmlMenuItem.addActionListener(new ActionListener()
684 public void actionPerformed(ActionEvent e)
686 htmlMenuItem_actionPerformed(e);
690 JMenuItem createBioJS = new JMenuItem(
691 MessageManager.getString("label.biojs_html_export"));
692 createBioJS.addActionListener(new java.awt.event.ActionListener()
695 public void actionPerformed(ActionEvent e)
697 bioJSMenuItem_actionPerformed(e);
701 JMenuItem overviewMenuItem = new JMenuItem(
702 MessageManager.getString("label.overview_window"));
703 overviewMenuItem.addActionListener(new ActionListener()
706 public void actionPerformed(ActionEvent e)
708 overviewMenuItem_actionPerformed(e);
712 undoMenuItem.setEnabled(false);
713 undoMenuItem.setText(MessageManager.getString("action.undo"));
714 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
715 jalview.util.ShortcutKeyMaskExWrapper
716 .getMenuShortcutKeyMaskEx(),
718 al = new ActionListener()
721 public void actionPerformed(ActionEvent e)
723 undoMenuItem_actionPerformed(e);
726 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
728 redoMenuItem.setEnabled(false);
729 redoMenuItem.setText(MessageManager.getString("action.redo"));
730 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
731 jalview.util.ShortcutKeyMaskExWrapper
732 .getMenuShortcutKeyMaskEx(),
734 al = new ActionListener()
737 public void actionPerformed(ActionEvent e)
739 redoMenuItem_actionPerformed(e);
742 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
744 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
745 wrapMenuItem.addActionListener(new ActionListener()
748 public void actionPerformed(ActionEvent e)
750 wrapMenuItem_actionPerformed(e);
754 JMenuItem printMenuItem = new JMenuItem(
755 MessageManager.getString("action.print"));
756 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
757 jalview.util.ShortcutKeyMaskExWrapper
758 .getMenuShortcutKeyMaskEx(),
760 al = new ActionListener()
763 public void actionPerformed(ActionEvent e)
765 printMenuItem_actionPerformed(e);
768 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
771 .setText(MessageManager.getString("action.show_gaps"));
772 renderGapsMenuItem.setState(true);
773 renderGapsMenuItem.addActionListener(new ActionListener()
776 public void actionPerformed(ActionEvent e)
778 renderGapsMenuItem_actionPerformed(e);
782 JMenuItem findMenuItem = new JMenuItem(
783 MessageManager.getString("action.find"));
784 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
785 jalview.util.ShortcutKeyMaskExWrapper
786 .getMenuShortcutKeyMaskEx(),
788 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
789 MessageManager.getString("label.find_tip")));
790 al = new ActionListener()
793 public void actionPerformed(ActionEvent e)
795 findMenuItem_actionPerformed(e);
798 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
800 showSeqFeatures.setText(
801 MessageManager.getString("label.show_sequence_features"));
802 showSeqFeatures.addActionListener(new ActionListener()
805 public void actionPerformed(ActionEvent actionEvent)
807 showSeqFeatures_actionPerformed(actionEvent);
811 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
812 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
813 * void actionPerformed(ActionEvent actionEvent) {
814 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
817 .setText(MessageManager.getString("label.show_database_refs"));
818 showDbRefsMenuitem.addActionListener(new ActionListener()
822 public void actionPerformed(ActionEvent e)
824 showDbRefs_actionPerformed(e);
828 showNpFeatsMenuitem.setText(
829 MessageManager.getString("label.show_non_positional_features"));
830 showNpFeatsMenuitem.addActionListener(new ActionListener()
834 public void actionPerformed(ActionEvent e)
836 showNpFeats_actionPerformed(e);
840 showGroupConservation
841 .setText(MessageManager.getString("label.group_conservation"));
842 showGroupConservation.addActionListener(new ActionListener()
846 public void actionPerformed(ActionEvent e)
848 showGroupConservation_actionPerformed(e);
854 .setText(MessageManager.getString("label.group_consensus"));
855 showGroupConsensus.addActionListener(new ActionListener()
859 public void actionPerformed(ActionEvent e)
861 showGroupConsensus_actionPerformed(e);
865 showConsensusHistogram.setText(
866 MessageManager.getString("label.show_consensus_histogram"));
867 showConsensusHistogram.addActionListener(new ActionListener()
871 public void actionPerformed(ActionEvent e)
873 showConsensusHistogram_actionPerformed(e);
878 .setText(MessageManager.getString("label.show_consensus_logo"));
879 showSequenceLogo.addActionListener(new ActionListener()
883 public void actionPerformed(ActionEvent e)
885 showSequenceLogo_actionPerformed(e);
889 normaliseSequenceLogo
890 .setText(MessageManager.getString("label.norm_consensus_logo"));
891 normaliseSequenceLogo.addActionListener(new ActionListener()
895 public void actionPerformed(ActionEvent e)
897 normaliseSequenceLogo_actionPerformed(e);
901 applyAutoAnnotationSettings
902 .setText(MessageManager.getString("label.apply_all_groups"));
903 applyAutoAnnotationSettings.setState(false);
904 applyAutoAnnotationSettings.setVisible(true);
905 applyAutoAnnotationSettings.addActionListener(new ActionListener()
908 public void actionPerformed(ActionEvent e)
910 applyAutoAnnotationSettings_actionPerformed(e);
914 ButtonGroup buttonGroup = new ButtonGroup();
915 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
916 MessageManager.getString("label.show_first"));
917 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
918 MessageManager.getString("label.show_last"));
919 buttonGroup.add(showAutoFirst);
920 buttonGroup.add(showAutoLast);
921 final boolean autoFirst = Cache
922 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
923 showAutoFirst.setSelected(autoFirst);
924 setShowAutoCalculatedAbove(autoFirst);
925 showAutoFirst.addActionListener(new ActionListener()
928 public void actionPerformed(ActionEvent e)
930 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
931 sortAnnotations_actionPerformed();
934 showAutoLast.setSelected(!showAutoFirst.isSelected());
935 showAutoLast.addActionListener(new ActionListener()
938 public void actionPerformed(ActionEvent e)
940 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
941 sortAnnotations_actionPerformed();
945 JMenuItem deleteGroups = new JMenuItem(
946 MessageManager.getString("action.undefine_groups"));
947 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
948 jalview.util.ShortcutKeyMaskExWrapper
949 .getMenuShortcutKeyMaskEx(),
951 al = new ActionListener()
954 public void actionPerformed(ActionEvent e)
956 deleteGroups_actionPerformed(e);
959 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
961 JMenuItem annotationColumn = new JMenuItem(
962 MessageManager.getString("action.select_by_annotation"));
963 annotationColumn.addActionListener(new ActionListener()
966 public void actionPerformed(ActionEvent e)
968 annotationColumn_actionPerformed(e);
972 JMenuItem createGroup = new JMenuItem(
973 MessageManager.getString("action.create_group"));
974 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
975 jalview.util.ShortcutKeyMaskExWrapper
976 .getMenuShortcutKeyMaskEx(),
978 al = new ActionListener()
981 public void actionPerformed(ActionEvent e)
983 createGroup_actionPerformed(e);
986 addMenuActionAndAccelerator(keyStroke, createGroup, al);
988 JMenuItem unGroup = new JMenuItem(
989 MessageManager.getString("action.remove_group"));
990 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
991 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
992 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
994 al = new ActionListener()
997 public void actionPerformed(ActionEvent e)
999 unGroup_actionPerformed(e);
1002 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1004 copy.setText(MessageManager.getString("action.copy"));
1005 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1006 jalview.util.ShortcutKeyMaskExWrapper
1007 .getMenuShortcutKeyMaskEx(),
1010 al = new ActionListener()
1013 public void actionPerformed(ActionEvent e)
1015 copy_actionPerformed();
1018 addMenuActionAndAccelerator(keyStroke, copy, al);
1020 cut.setText(MessageManager.getString("action.cut"));
1021 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1022 jalview.util.ShortcutKeyMaskExWrapper
1023 .getMenuShortcutKeyMaskEx(),
1025 al = new ActionListener()
1028 public void actionPerformed(ActionEvent e)
1030 cut_actionPerformed();
1033 addMenuActionAndAccelerator(keyStroke, cut, al);
1035 JMenuItem delete = new JMenuItem(
1036 MessageManager.getString("action.delete"));
1037 delete.addActionListener(new ActionListener()
1040 public void actionPerformed(ActionEvent e)
1042 delete_actionPerformed();
1046 pasteMenu.setText(MessageManager.getString("action.paste"));
1047 JMenuItem pasteNew = new JMenuItem(
1048 MessageManager.getString("label.to_new_alignment"));
1049 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1050 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1051 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1053 al = new ActionListener()
1056 public void actionPerformed(ActionEvent e)
1058 pasteNew_actionPerformed(e);
1061 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1063 JMenuItem pasteThis = new JMenuItem(
1064 MessageManager.getString("label.to_this_alignment"));
1065 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1066 jalview.util.ShortcutKeyMaskExWrapper
1067 .getMenuShortcutKeyMaskEx(),
1069 al = new ActionListener()
1072 public void actionPerformed(ActionEvent e)
1074 pasteThis_actionPerformed(e);
1077 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1079 JMenuItem createPNG = new JMenuItem("PNG");
1080 createPNG.addActionListener(new ActionListener()
1083 public void actionPerformed(ActionEvent e)
1085 createPNG_actionPerformed(e);
1088 createPNG.setActionCommand(
1089 MessageManager.getString("label.save_png_image"));
1091 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1092 font.addActionListener(new ActionListener()
1095 public void actionPerformed(ActionEvent e)
1097 font_actionPerformed(e);
1101 MessageManager.getString("label.show_sequence_limits"));
1102 seqLimits.setState(Cache.getDefault("SHOW_JVSUFFIX", true));
1103 seqLimits.addActionListener(new ActionListener()
1106 public void actionPerformed(ActionEvent e)
1108 seqLimit_actionPerformed(e);
1111 JMenuItem epsFile = new JMenuItem("EPS");
1112 epsFile.addActionListener(new ActionListener()
1115 public void actionPerformed(ActionEvent e)
1117 createEPS_actionPerformed(e);
1121 JMenuItem createSVG = new JMenuItem("SVG");
1122 createSVG.addActionListener(new ActionListener()
1125 public void actionPerformed(ActionEvent e)
1127 createSVG_actionPerformed(e);
1131 JMenuItem loadTreeMenuItem = new JMenuItem(
1132 MessageManager.getString("label.load_associated_tree"));
1133 loadTreeMenuItem.setActionCommand(
1134 MessageManager.getString("label.load_tree_for_sequence_set"));
1135 loadTreeMenuItem.addActionListener(new ActionListener()
1138 public void actionPerformed(ActionEvent e)
1140 loadTreeMenuItem_actionPerformed(e);
1144 scaleAbove.setVisible(false);
1145 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1146 scaleAbove.addActionListener(new ActionListener()
1149 public void actionPerformed(ActionEvent e)
1151 scaleAbove_actionPerformed(e);
1154 scaleLeft.setVisible(false);
1155 scaleLeft.setSelected(true);
1156 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1157 scaleLeft.addActionListener(new ActionListener()
1160 public void actionPerformed(ActionEvent e)
1162 scaleLeft_actionPerformed(e);
1165 scaleRight.setVisible(false);
1166 scaleRight.setSelected(true);
1167 scaleRight.setText(MessageManager.getString("action.scale_right"));
1168 scaleRight.addActionListener(new ActionListener()
1171 public void actionPerformed(ActionEvent e)
1173 scaleRight_actionPerformed(e);
1176 centreColumnLabelsMenuItem.setVisible(true);
1177 centreColumnLabelsMenuItem.setState(false);
1178 centreColumnLabelsMenuItem.setText(
1179 MessageManager.getString("label.centre_column_labels"));
1180 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1183 public void actionPerformed(ActionEvent e)
1185 centreColumnLabels_actionPerformed(e);
1188 followHighlightMenuItem.setVisible(true);
1189 followHighlightMenuItem.setState(true);
1190 followHighlightMenuItem
1191 .setText(MessageManager.getString("label.automatic_scrolling"));
1192 followHighlightMenuItem.addActionListener(new ActionListener()
1196 public void actionPerformed(ActionEvent e)
1198 followHighlight_actionPerformed();
1204 .setText(MessageManager.getString("action.by_tree_order"));
1205 sort.setText(MessageManager.getString("action.sort"));
1206 sort.addMenuListener(new MenuListener()
1209 public void menuSelected(MenuEvent e)
1211 buildTreeSortMenu();
1215 public void menuDeselected(MenuEvent e)
1220 public void menuCanceled(MenuEvent e)
1225 .setText(MessageManager.getString("label.sort_by_score"));
1226 sort.add(sortByAnnotScore);
1227 sort.addMenuListener(new javax.swing.event.MenuListener()
1231 public void menuCanceled(MenuEvent e)
1236 public void menuDeselected(MenuEvent e)
1241 public void menuSelected(MenuEvent e)
1243 buildSortByAnnotationScoresMenu();
1246 sortByAnnotScore.setVisible(false);
1249 .setText(MessageManager.getString("action.calculate_tree_pca"));
1251 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1252 padGapsMenuitem.setState(Cache.getDefault("PAD_GAPS", false));
1253 padGapsMenuitem.addActionListener(new ActionListener()
1256 public void actionPerformed(ActionEvent e)
1258 padGapsMenuitem_actionPerformed(e);
1261 JMenuItem vamsasStore = new JMenuItem(
1262 MessageManager.getString("label.vamsas_store"));
1263 vamsasStore.setVisible(false);
1264 vamsasStore.addActionListener(new ActionListener()
1267 public void actionPerformed(ActionEvent e)
1269 vamsasStore_actionPerformed(e);
1274 * Translate as cDNA with sub-menu of translation tables
1277 .setText(MessageManager.getString("label.translate_cDNA"));
1278 boolean first = true;
1279 for (final GeneticCodeI table : GeneticCodes.getInstance()
1282 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1283 showTranslation.add(item);
1284 item.addActionListener(new ActionListener()
1287 public void actionPerformed(ActionEvent e)
1289 showTranslation_actionPerformed(table);
1294 showTranslation.addSeparator();
1299 showReverse.setText(MessageManager.getString("label.reverse"));
1300 showReverse.addActionListener(new ActionListener()
1303 public void actionPerformed(ActionEvent e)
1305 showReverse_actionPerformed(false);
1308 showReverseComplement
1309 .setText(MessageManager.getString("label.reverse_complement"));
1310 showReverseComplement.addActionListener(new ActionListener()
1313 public void actionPerformed(ActionEvent e)
1315 showReverse_actionPerformed(true);
1319 JMenuItem extractScores = new JMenuItem(
1320 MessageManager.getString("label.extract_scores"));
1321 extractScores.addActionListener(new ActionListener()
1324 public void actionPerformed(ActionEvent e)
1326 extractScores_actionPerformed(e);
1329 extractScores.setVisible(true);
1330 // JBPNote: TODO: make gui for regex based score extraction
1332 // for show products actions see AlignFrame.canShowProducts
1333 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1335 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1336 runGroovy.setToolTipText(
1337 MessageManager.getString("label.run_groovy_tip"));
1338 runGroovy.addActionListener(new ActionListener()
1341 public void actionPerformed(ActionEvent e)
1343 runGroovy_actionPerformed();
1347 openFeatureSettings = new JMenuItem(
1348 MessageManager.getString("action.feature_settings"));
1349 openFeatureSettings.addActionListener(new ActionListener()
1352 public void actionPerformed(ActionEvent e)
1354 featureSettings_actionPerformed(e);
1359 * add sub-menu of database we can fetch from
1361 JMenuItem fetchSequence = new JMenuItem(
1362 MessageManager.getString("label.fetch_sequences"));
1363 fetchSequence.addActionListener(new ActionListener()
1366 public void actionPerformed(ActionEvent e)
1368 fetchSequence_actionPerformed();
1372 JMenuItem associatedData = new JMenuItem(
1373 MessageManager.getString("label.load_features_annotations"));
1374 associatedData.addActionListener(new ActionListener()
1377 public void actionPerformed(ActionEvent e)
1379 associatedData_actionPerformed(e);
1382 loadVcf = new JMenuItem(
1383 MessageManager.getString("label.load_vcf_file"));
1384 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1385 loadVcf.addActionListener(new ActionListener()
1388 public void actionPerformed(ActionEvent e)
1390 loadVcf_actionPerformed();
1393 autoCalculate.setText(
1394 MessageManager.getString("label.autocalculate_consensus"));
1395 autoCalculate.setState(Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1396 autoCalculate.addActionListener(new ActionListener()
1399 public void actionPerformed(ActionEvent e)
1401 autoCalculate_actionPerformed(e);
1405 MessageManager.getString("label.sort_alignment_new_tree"));
1406 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1407 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1408 sortByTree.setState(Cache.getDefault("SORT_BY_TREE", false));
1409 sortByTree.addActionListener(new ActionListener()
1412 public void actionPerformed(ActionEvent e)
1414 sortByTreeOption_actionPerformed(e);
1418 listenToViewSelections.setText(
1419 MessageManager.getString("label.listen_for_selections"));
1420 listenToViewSelections
1421 .setToolTipText("<html>" + MessageManager.getString(
1422 "label.selections_mirror_selections_made_same_sequences_other_views"));
1423 listenToViewSelections.setState(false);
1424 listenToViewSelections.addActionListener(new ActionListener()
1427 public void actionPerformed(ActionEvent e)
1429 listenToViewSelections_actionPerformed(e);
1433 JMenu addSequenceMenu = new JMenu(
1434 MessageManager.getString("label.add_sequences"));
1435 JMenuItem addFromFile = new JMenuItem(
1436 MessageManager.getString("label.from_file"));
1437 addFromFile.addActionListener(new ActionListener()
1440 public void actionPerformed(ActionEvent e)
1442 addFromFile_actionPerformed(e);
1445 JMenuItem addFromText = new JMenuItem(
1446 MessageManager.getString("label.from_textbox"));
1447 addFromText.addActionListener(new ActionListener()
1450 public void actionPerformed(ActionEvent e)
1452 addFromText_actionPerformed(e);
1455 JMenuItem addFromURL = new JMenuItem(
1456 MessageManager.getString("label.from_url"));
1457 addFromURL.addActionListener(new ActionListener()
1460 public void actionPerformed(ActionEvent e)
1462 addFromURL_actionPerformed(e);
1465 JMenuItem exportFeatures = new JMenuItem(
1466 MessageManager.getString("label.export_features"));
1467 exportFeatures.addActionListener(new ActionListener()
1470 public void actionPerformed(ActionEvent e)
1472 exportFeatures_actionPerformed(e);
1475 JMenuItem exportAnnotations = new JMenuItem(
1476 MessageManager.getString("label.export_annotations"));
1477 exportAnnotations.addActionListener(new ActionListener()
1480 public void actionPerformed(ActionEvent e)
1482 exportAnnotations_actionPerformed(e);
1485 statusPanel.setLayout(new GridLayout());
1486 JMenuItem showAllSeqs = new JMenuItem(
1487 MessageManager.getString("label.all_sequences"));
1488 showAllSeqs.setToolTipText(
1489 MessageManager.getString("label.toggle_sequence_visibility"));
1490 showAllSeqs.addActionListener(new ActionListener()
1493 public void actionPerformed(ActionEvent e)
1495 showAllSeqs_actionPerformed(e);
1498 JMenuItem showAllColumns = new JMenuItem(
1499 MessageManager.getString("label.all_columns"));
1500 showAllColumns.setToolTipText(
1501 MessageManager.getString("label.toggle_columns_visibility"));
1502 showAllColumns.addActionListener(new ActionListener()
1505 public void actionPerformed(ActionEvent e)
1507 showAllColumns_actionPerformed(e);
1510 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1511 JMenuItem hideSelSequences = new JMenuItem(
1512 MessageManager.getString("label.selected_sequences"));
1513 hideSelSequences.setToolTipText(
1514 MessageManager.getString("label.toggle_sequence_visibility"));
1515 hideSelSequences.addActionListener(new ActionListener()
1518 public void actionPerformed(ActionEvent e)
1520 hideSelSequences_actionPerformed(e);
1523 JMenuItem hideSelColumns = new JMenuItem(
1524 MessageManager.getString("label.selected_columns"));
1525 hideSelColumns.setToolTipText(
1526 MessageManager.getString("label.toggle_columns_visibility"));
1527 hideSelColumns.addActionListener(new ActionListener()
1530 public void actionPerformed(ActionEvent e)
1532 hideSelColumns_actionPerformed(e);
1535 JMenuItem hideAllSelection = new JMenuItem(
1536 MessageManager.getString("label.selected_region"));
1537 hideAllSelection.addActionListener(new ActionListener()
1540 public void actionPerformed(ActionEvent e)
1542 hideAllSelection_actionPerformed(e);
1545 // TODO: should be hidden if no selection exists.
1546 JMenuItem hideAllButSelection = new JMenuItem(
1547 MessageManager.getString("label.all_but_selected_region"));
1548 hideAllButSelection.addActionListener(new ActionListener()
1551 public void actionPerformed(ActionEvent e)
1553 hideAllButSelection_actionPerformed(e);
1556 JMenuItem showAllhidden = new JMenuItem(
1557 MessageManager.getString("label.all_sequences_columns"));
1558 showAllhidden.setToolTipText(MessageManager
1559 .getString("label.toggles_visibility_hidden_selected_regions"));
1560 showAllhidden.addActionListener(new ActionListener()
1563 public void actionPerformed(ActionEvent e)
1565 showAllhidden_actionPerformed(e);
1568 hiddenMarkers.setText(
1569 MessageManager.getString("action.show_hidden_markers"));
1570 hiddenMarkers.addActionListener(new ActionListener()
1573 public void actionPerformed(ActionEvent e)
1575 hiddenMarkers_actionPerformed(e);
1579 JMenuItem invertColSel = new JMenuItem(
1580 MessageManager.getString("action.invert_column_selection"));
1581 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1582 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1583 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1585 al = new ActionListener()
1588 public void actionPerformed(ActionEvent e)
1590 invertColSel_actionPerformed(e);
1593 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1595 showComplementMenuItem.setVisible(false);
1596 showComplementMenuItem.addActionListener(new ActionListener()
1599 public void actionPerformed(ActionEvent e)
1601 showComplement_actionPerformed(showComplementMenuItem.getState());
1605 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1608 public void stateChanged(ChangeEvent evt)
1610 JTabbedPane pane = (JTabbedPane) evt.getSource();
1611 int sel = pane.getSelectedIndex();
1612 tabSelectionChanged(sel);
1615 tabbedPane.addMouseListener(new MouseAdapter()
1618 public void mousePressed(MouseEvent e)
1620 if (e.isPopupTrigger()) // Mac
1622 tabbedPane_mousePressed(e);
1627 public void mouseReleased(MouseEvent e)
1629 if (e.isPopupTrigger()) // Windows
1631 tabbedPane_mousePressed(e);
1635 tabbedPane.addFocusListener(new FocusAdapter()
1638 public void focusGained(FocusEvent e)
1640 tabbedPane_focusGained(e);
1644 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1645 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1646 jalview.util.ShortcutKeyMaskExWrapper
1647 .getMenuShortcutKeyMaskEx(),
1649 al = new ActionListener()
1652 public void actionPerformed(ActionEvent e)
1654 save_actionPerformed(e);
1657 addMenuActionAndAccelerator(keyStroke, save, al);
1659 reload.setEnabled(false);
1660 reload.setText(MessageManager.getString("action.reload"));
1661 reload.addActionListener(new ActionListener()
1664 public void actionPerformed(ActionEvent e)
1666 reload_actionPerformed(e);
1670 JMenuItem newView = new JMenuItem(
1671 MessageManager.getString("action.new_view"));
1672 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1673 jalview.util.ShortcutKeyMaskExWrapper
1674 .getMenuShortcutKeyMaskEx(),
1676 al = new ActionListener()
1679 public void actionPerformed(ActionEvent e)
1681 newView_actionPerformed(e);
1684 addMenuActionAndAccelerator(keyStroke, newView, al);
1686 tabbedPane.setToolTipText("<html><i>"
1687 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1690 formatMenu.setText(MessageManager.getString("action.format"));
1691 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1693 idRightAlign.setText(
1694 MessageManager.getString("label.right_align_sequence_id"));
1695 idRightAlign.addActionListener(new ActionListener()
1698 public void actionPerformed(ActionEvent e)
1700 idRightAlign_actionPerformed(e);
1704 gatherViews.setEnabled(false);
1705 gatherViews.setText(MessageManager.getString("action.gather_views"));
1706 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1707 al = new ActionListener()
1710 public void actionPerformed(ActionEvent e)
1712 gatherViews_actionPerformed(e);
1715 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1717 expandViews.setEnabled(false);
1718 expandViews.setText(MessageManager.getString("action.expand_views"));
1719 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1720 al = new ActionListener()
1723 public void actionPerformed(ActionEvent e)
1725 expandViews_actionPerformed(e);
1728 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1730 JMenuItem pageSetup = new JMenuItem(
1731 MessageManager.getString("action.page_setup"));
1732 pageSetup.addActionListener(new ActionListener()
1735 public void actionPerformed(ActionEvent e)
1737 pageSetup_actionPerformed(e);
1740 JMenuItem alignmentProperties = new JMenuItem(
1741 MessageManager.getString("label.alignment_props"));
1742 alignmentProperties.addActionListener(new ActionListener()
1745 public void actionPerformed(ActionEvent actionEvent)
1747 alignmentProperties();
1750 JMenuItem selectHighlighted = new JMenuItem(
1751 MessageManager.getString("action.select_highlighted_columns"));
1752 selectHighlighted.setToolTipText(
1753 MessageManager.getString("tooltip.select_highlighted_columns"));
1754 al = new ActionListener()
1757 public void actionPerformed(ActionEvent actionEvent)
1759 selectHighlightedColumns_actionPerformed(actionEvent);
1762 selectHighlighted.addActionListener(al);
1764 copyHighlighted = new JMenuItem(
1765 MessageManager.getString("action.copy_highlighted_regions"));
1766 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1767 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1768 + jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1770 copyHighlighted.setToolTipText(
1771 MessageManager.getString("tooltip.copy_highlighted_regions"));
1772 al = new ActionListener()
1775 public void actionPerformed(ActionEvent actionEvent)
1777 copyHighlightedColumns_actionPerformed(actionEvent);
1780 addMenuActionAndAccelerator(keyStroke, copyHighlighted, al);
1781 copyHighlighted.addActionListener(al);
1783 JMenu tooltipSettingsMenu = new JMenu(
1784 MessageManager.getString("label.sequence_id_tooltip"));
1785 JMenu autoAnnMenu = new JMenu(
1786 MessageManager.getString("label.autocalculated_annotation"));
1788 JMenu exportImageMenu = new JMenu(
1789 MessageManager.getString("label.export_image"));
1790 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1791 alignFrameMenuBar.add(fileMenu);
1792 alignFrameMenuBar.add(editMenu);
1793 alignFrameMenuBar.add(selectMenu);
1794 alignFrameMenuBar.add(viewMenu);
1795 alignFrameMenuBar.add(annotationsMenu);
1796 alignFrameMenuBar.add(formatMenu);
1797 alignFrameMenuBar.add(colourMenu);
1798 alignFrameMenuBar.add(calculateMenu);
1799 if (!Platform.isJS())
1801 alignFrameMenuBar.add(webService);
1804 fileMenu.add(fetchSequence);
1805 fileMenu.add(addSequenceMenu);
1806 fileMenu.add(reload);
1807 fileMenu.addSeparator();
1808 fileMenu.add(vamsasStore);
1810 fileMenu.add(saveAs);
1811 fileMenu.add(outputTextboxMenu);
1812 fileMenu.add(pageSetup);
1813 fileMenu.add(printMenuItem);
1814 fileMenu.addSeparator();
1815 fileMenu.add(exportImageMenu);
1816 fileMenu.add(exportFeatures);
1817 fileMenu.add(exportAnnotations);
1818 fileMenu.add(loadTreeMenuItem);
1819 fileMenu.add(associatedData);
1820 if (!Platform.isJS())
1822 fileMenu.add(loadVcf);
1824 fileMenu.addSeparator();
1825 fileMenu.add(closeMenuItem);
1827 pasteMenu.add(pasteNew);
1828 pasteMenu.add(pasteThis);
1829 editMenu.add(undoMenuItem);
1830 editMenu.add(redoMenuItem);
1833 editMenu.add(copyHighlighted);
1834 editMenu.add(pasteMenu);
1835 editMenu.add(delete);
1836 editMenu.addSeparator();
1837 editMenu.add(remove2LeftMenuItem);
1838 editMenu.add(remove2RightMenuItem);
1839 editMenu.add(removeGappedColumnMenuItem);
1840 editMenu.add(removeAllGapsMenuItem);
1841 editMenu.add(removeRedundancyMenuItem);
1842 editMenu.addSeparator();
1843 // dont add these yet in the CVS build - they cannot be undone!
1844 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1845 // editMenu.add(justifyLeftMenuItem);
1846 // editMenu.add(justifyRightMenuItem);
1847 // editMenu.addSeparator();
1848 editMenu.add(padGapsMenuitem);
1850 showMenu.add(showAllColumns);
1851 showMenu.add(showAllSeqs);
1852 showMenu.add(showAllhidden);
1853 hideMenu.add(hideSelColumns);
1854 hideMenu.add(hideSelSequences);
1855 hideMenu.add(hideAllSelection);
1856 hideMenu.add(hideAllButSelection);
1857 viewMenu.add(newView);
1858 viewMenu.add(expandViews);
1859 viewMenu.add(gatherViews);
1860 viewMenu.addSeparator();
1861 viewMenu.add(showMenu);
1862 viewMenu.add(hideMenu);
1863 viewMenu.add(showComplementMenuItem);
1864 viewMenu.addSeparator();
1865 viewMenu.add(followHighlightMenuItem);
1866 viewMenu.addSeparator();
1867 viewMenu.add(showSeqFeatures);
1868 // viewMenu.add(showSeqFeaturesHeight);
1869 viewMenu.add(openFeatureSettings);
1870 tooltipSettingsMenu.add(showDbRefsMenuitem);
1871 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1872 viewMenu.add(tooltipSettingsMenu);
1873 viewMenu.addSeparator();
1874 viewMenu.add(alignmentProperties);
1875 viewMenu.addSeparator();
1876 viewMenu.add(overviewMenuItem);
1878 annotationsMenu.add(annotationPanelMenuItem);
1879 annotationsMenu.addSeparator();
1880 annotationsMenu.add(showAllAlAnnotations);
1881 annotationsMenu.add(hideAllAlAnnotations);
1882 annotationsMenu.addSeparator();
1883 annotationsMenu.add(showAllSeqAnnotations);
1884 annotationsMenu.add(hideAllSeqAnnotations);
1885 annotationsMenu.add(sortAnnBySequence);
1886 annotationsMenu.add(sortAnnByLabel);
1887 annotationsMenu.addSeparator();
1888 autoAnnMenu.add(showAutoFirst);
1889 autoAnnMenu.add(showAutoLast);
1890 autoAnnMenu.addSeparator();
1891 autoAnnMenu.add(applyAutoAnnotationSettings);
1892 autoAnnMenu.add(showConsensusHistogram);
1893 autoAnnMenu.add(showSequenceLogo);
1894 autoAnnMenu.add(normaliseSequenceLogo);
1895 autoAnnMenu.addSeparator();
1896 autoAnnMenu.add(showGroupConservation);
1897 autoAnnMenu.add(showGroupConsensus);
1898 annotationsMenu.add(autoAnnMenu);
1900 sort.add(sortIDMenuItem);
1901 sort.add(sortLengthMenuItem);
1902 sort.add(sortGroupMenuItem);
1903 sort.add(sortPairwiseMenuItem);
1904 sort.add(sortByTreeMenu);
1905 calculateMenu.add(sort);
1906 calculateMenu.add(calculateTree);
1907 calculateMenu.addSeparator();
1908 calculateMenu.add(pairwiseAlignmentMenuItem);
1909 calculateMenu.addSeparator();
1910 calculateMenu.add(showTranslation);
1911 calculateMenu.add(showReverse);
1912 calculateMenu.add(showReverseComplement);
1913 calculateMenu.add(showProducts);
1914 calculateMenu.add(autoCalculate);
1915 calculateMenu.add(sortByTree);
1916 calculateMenu.addSeparator();
1917 calculateMenu.add(expandAlignment);
1918 calculateMenu.add(extractScores);
1919 if (!Platform.isJS())
1921 calculateMenu.addSeparator();
1922 calculateMenu.add(runGroovy);
1925 webServiceNoServices = new JMenuItem(
1926 MessageManager.getString("label.no_services"));
1927 webService.add(webServiceNoServices);
1928 if (!Platform.isJS())
1930 exportImageMenu.add(htmlMenuItem);
1932 exportImageMenu.add(epsFile);
1933 exportImageMenu.add(createPNG);
1934 if (!Platform.isJS())
1936 exportImageMenu.add(createBioJS);
1937 exportImageMenu.add(createSVG);
1939 addSequenceMenu.add(addFromFile);
1940 addSequenceMenu.add(addFromText);
1941 addSequenceMenu.add(addFromURL);
1942 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1943 statusPanel.add(statusBar, null);
1944 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1946 formatMenu.add(font);
1947 formatMenu.addSeparator();
1948 formatMenu.add(wrapMenuItem);
1949 formatMenu.add(scaleAbove);
1950 formatMenu.add(scaleLeft);
1951 formatMenu.add(scaleRight);
1952 formatMenu.add(seqLimits);
1953 formatMenu.add(idRightAlign);
1954 formatMenu.add(hiddenMarkers);
1955 formatMenu.add(viewBoxesMenuItem);
1956 formatMenu.add(viewTextMenuItem);
1957 formatMenu.add(colourTextMenuItem);
1958 formatMenu.add(renderGapsMenuItem);
1959 formatMenu.add(centreColumnLabelsMenuItem);
1960 formatMenu.add(showNonconservedMenuItem);
1961 selectMenu.add(findMenuItem);
1962 selectMenu.addSeparator();
1963 selectMenu.add(selectAllSequenceMenuItem);
1964 selectMenu.add(deselectAllSequenceMenuItem);
1965 selectMenu.add(invertSequenceMenuItem);
1966 selectMenu.add(invertColSel);
1967 selectMenu.add(createGroup);
1968 selectMenu.add(unGroup);
1969 selectMenu.add(grpsFromSelection);
1970 selectMenu.add(deleteGroups);
1971 selectMenu.add(annotationColumn);
1972 selectMenu.add(selectHighlighted);
1973 // TODO - determine if the listenToViewSelections button is needed : see bug
1975 // selectMenu.addSeparator();
1976 // selectMenu.add(listenToViewSelections);
1979 protected void createPNG_actionPerformed(ActionEvent object)
1981 // TODO Auto-generated method stub
1985 protected void createEPS_actionPerformed(ActionEvent object)
1987 // TODO Auto-generated method stub
1991 protected void createSVG_actionPerformed(ActionEvent object)
1993 // TODO Auto-generated method stub
1997 protected void copyHighlightedColumns_actionPerformed(
1998 ActionEvent actionEvent)
2003 protected void loadVcf_actionPerformed()
2008 * Constructs the entries on the Colour menu (but does not add them to the
2011 protected void initColourMenu()
2013 applyToAllGroups = new JCheckBoxMenuItem(
2014 MessageManager.getString("label.apply_colour_to_all_groups"));
2015 applyToAllGroups.addActionListener(new ActionListener()
2018 public void actionPerformed(ActionEvent e)
2020 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
2024 textColour = new JMenuItem(
2025 MessageManager.getString("label.text_colour"));
2026 textColour.addActionListener(new ActionListener()
2029 public void actionPerformed(ActionEvent e)
2031 textColour_actionPerformed();
2035 conservationMenuItem = new JCheckBoxMenuItem(
2036 MessageManager.getString("action.by_conservation"));
2037 conservationMenuItem.addActionListener(new ActionListener()
2040 public void actionPerformed(ActionEvent e)
2042 conservationMenuItem_actionPerformed(
2043 conservationMenuItem.isSelected());
2047 abovePIDThreshold = new JCheckBoxMenuItem(
2048 MessageManager.getString("label.above_identity_threshold"));
2049 abovePIDThreshold.addActionListener(new ActionListener()
2052 public void actionPerformed(ActionEvent e)
2054 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2057 modifyPID = new JMenuItem(
2058 MessageManager.getString("label.modify_identity_threshold"));
2059 modifyPID.addActionListener(new ActionListener()
2062 public void actionPerformed(ActionEvent e)
2064 modifyPID_actionPerformed();
2067 modifyConservation = new JMenuItem(MessageManager
2068 .getString("label.modify_conservation_threshold"));
2069 modifyConservation.addActionListener(new ActionListener()
2072 public void actionPerformed(ActionEvent e)
2074 modifyConservation_actionPerformed();
2078 annotationColour = new JRadioButtonMenuItem(
2079 MessageManager.getString("action.by_annotation"));
2080 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2081 annotationColour.addActionListener(new ActionListener()
2084 public void actionPerformed(ActionEvent e)
2086 annotationColour_actionPerformed();
2091 protected void selectHighlightedColumns_actionPerformed(
2092 ActionEvent actionEvent)
2094 // TODO Auto-generated method stub
2099 * Generate the reverse sequence (or reverse complement if the flag is true)
2100 * and add it to the alignment
2104 protected void showReverse_actionPerformed(boolean complement)
2109 * Try to run script in a Groovy console, having first ensured that this
2110 * alignframe is set as currentAlignFrame in Desktop
2112 protected void runGroovy_actionPerformed()
2118 * Adds the given action listener and key accelerator to the given menu item.
2119 * Also saves in a lookup table to support lookup of action by key stroke.
2123 * @param actionListener
2125 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2126 JMenuItem menuItem, ActionListener actionListener)
2128 menuItem.setAccelerator(keyStroke);
2129 accelerators.put(keyStroke, menuItem);
2130 menuItem.addActionListener(actionListener);
2134 * Action on clicking sort annotations by type.
2138 protected void sortAnnotations_actionPerformed()
2143 * Action on clicking Show all annotations.
2145 * @param forSequences
2146 * update sequence-related annotations
2147 * @param forAlignment
2148 * update non-sequence-related annotations
2150 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2151 boolean forAlignment)
2153 setAnnotationsVisibility(true, forSequences, forAlignment);
2157 * Action on clicking Hide all annotations.
2159 * @param forSequences
2160 * update sequence-related annotations
2161 * @param forAlignment
2162 * update non-sequence-related annotations
2164 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2165 boolean forAlignment)
2167 setAnnotationsVisibility(false, forSequences, forAlignment);
2171 * Set the visibility of annotations to true or false. Can act on
2172 * sequence-related annotations, or alignment-related, or both.
2175 * @param forSequences
2176 * update sequence-related annotations
2177 * @param forAlignment
2178 * update non-sequence-related annotations
2180 public void setAnnotationsVisibility(boolean visible,
2181 boolean forSequences, boolean forAlignment)
2186 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2188 // TODO Auto-generated method stub
2192 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2194 // TODO Auto-generated method stub
2198 protected void showAllhidden_actionPerformed(ActionEvent e)
2200 // TODO Auto-generated method stub
2204 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2206 // TODO Auto-generated method stub
2210 protected void hideAllSelection_actionPerformed(ActionEvent e)
2212 // TODO Auto-generated method stub
2216 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2218 // TODO Auto-generated method stub
2222 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2224 // TODO Auto-generated method stub
2228 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2230 // TODO Auto-generated method stub
2234 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2236 // TODO Auto-generated method stub
2240 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2242 // TODO Auto-generated method stub
2246 protected void showGroupConservation_actionPerformed(ActionEvent e)
2248 // TODO Auto-generated method stub
2252 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2254 // TODO Auto-generated method stub
2258 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2260 // TODO Auto-generated method stub
2264 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2266 // TODO Auto-generated method stub
2270 protected void followHighlight_actionPerformed()
2272 // TODO Auto-generated method stub
2276 protected void showNpFeats_actionPerformed(ActionEvent e)
2278 // TODO Auto-generated method stub
2282 protected void showDbRefs_actionPerformed(ActionEvent e)
2284 // TODO Auto-generated method stub
2288 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2292 protected void buildSortByAnnotationScoresMenu()
2296 protected void extractScores_actionPerformed(ActionEvent e)
2300 protected void outputText_actionPerformed(String formatName)
2304 public void addFromFile_actionPerformed(ActionEvent e)
2309 public void addFromText_actionPerformed(ActionEvent e)
2314 public void addFromURL_actionPerformed(ActionEvent e)
2319 public void exportFeatures_actionPerformed(ActionEvent e)
2324 public void exportAnnotations_actionPerformed(ActionEvent e)
2329 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2333 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2338 protected void closeMenuItem_actionPerformed(boolean b)
2342 protected void redoMenuItem_actionPerformed(ActionEvent e)
2346 protected void undoMenuItem_actionPerformed(ActionEvent e)
2350 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2354 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2358 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2362 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2366 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2370 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2374 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2378 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2382 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2386 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2390 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2394 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2398 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2402 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2406 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2410 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2414 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2418 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2422 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2426 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2430 protected void conservationMenuItem_actionPerformed(boolean selected)
2434 protected void printMenuItem_actionPerformed(ActionEvent e)
2438 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2442 protected void findMenuItem_actionPerformed(ActionEvent e)
2446 protected void abovePIDThreshold_actionPerformed(boolean selected)
2450 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2454 protected void deleteGroups_actionPerformed(ActionEvent e)
2458 protected void createGroup_actionPerformed(ActionEvent e)
2462 protected void unGroup_actionPerformed(ActionEvent e)
2466 protected void copy_actionPerformed()
2470 protected void cut_actionPerformed()
2474 protected void delete_actionPerformed()
2478 protected void pasteNew_actionPerformed(ActionEvent e)
2482 protected void pasteThis_actionPerformed(ActionEvent e)
2486 protected void applyToAllGroups_actionPerformed(boolean selected)
2490 protected void font_actionPerformed(ActionEvent e)
2494 protected void seqLimit_actionPerformed(ActionEvent e)
2498 public void seqDBRef_actionPerformed(ActionEvent e)
2503 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2509 * Template method to handle the 'load T-Coffee scores' menu event.
2511 * Subclasses override this method to provide a custom action.
2516 protected void loadScores_actionPerformed(ActionEvent event)
2521 protected void jpred_actionPerformed(ActionEvent e)
2525 protected void scaleAbove_actionPerformed(ActionEvent e)
2529 protected void scaleLeft_actionPerformed(ActionEvent e)
2533 protected void scaleRight_actionPerformed(ActionEvent e)
2537 protected void modifyPID_actionPerformed()
2541 protected void modifyConservation_actionPerformed()
2545 protected void saveAs_actionPerformed()
2549 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2553 public void vamsasStore_actionPerformed(ActionEvent e)
2558 public void vamsasLoad_actionPerformed(ActionEvent e)
2563 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2568 public void featureSettings_actionPerformed(ActionEvent e)
2573 public void fetchSequence_actionPerformed()
2578 public void smoothFont_actionPerformed(ActionEvent e)
2583 public void annotationColour_actionPerformed()
2587 public void annotationColumn_actionPerformed(ActionEvent e)
2591 public void associatedData_actionPerformed(ActionEvent e)
2596 public void autoCalculate_actionPerformed(ActionEvent e)
2601 public void sortByTreeOption_actionPerformed(ActionEvent e)
2606 public void showAllSeqs_actionPerformed(ActionEvent e)
2611 public void showAllColumns_actionPerformed(ActionEvent e)
2616 public void hideSelSequences_actionPerformed(ActionEvent e)
2621 public void hideSelColumns_actionPerformed(ActionEvent e)
2626 public void hiddenMarkers_actionPerformed(ActionEvent e)
2631 public void findPdbId_actionPerformed(ActionEvent e)
2636 public void enterPdbId_actionPerformed(ActionEvent e)
2641 public void pdbFile_actionPerformed(ActionEvent e)
2646 public void invertColSel_actionPerformed(ActionEvent e)
2651 public void tabSelectionChanged(int sel)
2656 public void tabbedPane_mousePressed(MouseEvent e)
2661 public void tabbedPane_focusGained(FocusEvent e)
2666 public void save_actionPerformed(ActionEvent e)
2671 public void reload_actionPerformed(ActionEvent e)
2676 public void newView_actionPerformed(ActionEvent e)
2681 public void textColour_actionPerformed()
2686 public void idRightAlign_actionPerformed(ActionEvent e)
2691 public void expandViews_actionPerformed(ActionEvent e)
2696 public void gatherViews_actionPerformed(ActionEvent e)
2701 public void buildTreeSortMenu()
2706 public void pageSetup_actionPerformed(ActionEvent e)
2711 public void alignmentProperties()
2716 protected void expand_newalign(ActionEvent e)
2718 // TODO Auto-generated method stub
2722 protected boolean isShowAutoCalculatedAbove()
2724 return showAutoCalculatedAbove;
2727 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2729 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2732 protected SequenceAnnotationOrder getAnnotationSortOrder()
2734 return annotationSortOrder;
2737 protected void setAnnotationSortOrder(
2738 SequenceAnnotationOrder annotationSortOrder)
2740 this.annotationSortOrder = annotationSortOrder;
2743 public Map<KeyStroke, JMenuItem> getAccelerators()
2745 return this.accelerators;
2749 * Returns the selected index of the tabbed pane, or -1 if none selected
2750 * (including the case where the tabbed pane has not been made visible).
2754 public int getTabIndex()
2756 return tabbedPane.getSelectedIndex();
2759 public JPanel getStatusPanel()
2765 * Sets a reference to the containing split frame. Also makes the 'toggle
2766 * split view' menu item visible and checked.
2770 public void setSplitFrame(SplitContainerI sf)
2772 this.splitFrame = sf;
2775 this.showComplementMenuItem.setVisible(true);
2776 this.showComplementMenuItem.setState(true);
2780 public SplitContainerI getSplitViewContainer()
2782 return this.splitFrame;
2785 protected void showComplement_actionPerformed(boolean complement)