2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
24 import jalview.analysis.GeneticCodeI;
25 import jalview.analysis.GeneticCodes;
26 import jalview.api.SplitContainerI;
27 import jalview.bin.Cache;
28 import jalview.gui.JvSwingUtils;
29 import jalview.gui.Preferences;
30 import jalview.io.FileFormats;
31 import jalview.schemes.ResidueColourScheme;
32 import jalview.util.MessageManager;
33 import jalview.util.Platform;
35 import java.awt.BorderLayout;
36 import java.awt.Color;
37 import java.awt.GridLayout;
38 import java.awt.event.ActionEvent;
39 import java.awt.event.ActionListener;
40 import java.awt.event.FocusAdapter;
41 import java.awt.event.FocusEvent;
42 import java.awt.event.KeyEvent;
43 import java.awt.event.MouseAdapter;
44 import java.awt.event.MouseEvent;
45 import java.util.HashMap;
48 import javax.swing.BorderFactory;
49 import javax.swing.ButtonGroup;
50 import javax.swing.JCheckBoxMenuItem;
51 import javax.swing.JInternalFrame;
52 import javax.swing.JLabel;
53 import javax.swing.JMenu;
54 import javax.swing.JMenuBar;
55 import javax.swing.JMenuItem;
56 import javax.swing.JPanel;
57 import javax.swing.JRadioButtonMenuItem;
58 import javax.swing.JTabbedPane;
59 import javax.swing.KeyStroke;
60 import javax.swing.event.ChangeEvent;
61 import javax.swing.event.MenuEvent;
62 import javax.swing.event.MenuListener;
64 @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 colourGapsMenuItem = new JCheckBoxMenuItem();
95 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
97 protected JMenuItem undoMenuItem = new JMenuItem();
99 protected JMenuItem redoMenuItem = new JMenuItem();
101 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
103 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
105 public JCheckBoxMenuItem showSeqFeatures = 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.getMenuShortcutKeyMaskEx(), false);
289 al = new ActionListener()
292 public void actionPerformed(ActionEvent e)
294 closeMenuItem_actionPerformed(false);
297 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
299 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
300 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
301 JMenu annotationsMenu = new JMenu(
302 MessageManager.getString("action.annotations"));
303 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
304 colourMenu.setText(MessageManager.getString("action.colour"));
305 JMenu calculateMenu = new JMenu(
306 MessageManager.getString("action.calculate"));
307 webService.setText(MessageManager.getString("action.web_service"));
308 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
309 MessageManager.getString("action.select_all"));
310 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
311 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
312 al = new ActionListener()
315 public void actionPerformed(ActionEvent e)
317 selectAllSequenceMenuItem_actionPerformed(e);
320 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
322 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
323 MessageManager.getString("action.deselect_all"));
324 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
325 al = new ActionListener()
328 public void actionPerformed(ActionEvent e)
330 deselectAllSequenceMenuItem_actionPerformed(e);
333 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
335 JMenuItem invertSequenceMenuItem = new JMenuItem(
336 MessageManager.getString("action.invert_sequence_selection"));
337 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
338 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
339 al = new ActionListener()
342 public void actionPerformed(ActionEvent e)
344 invertSequenceMenuItem_actionPerformed(e);
347 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
349 JMenuItem grpsFromSelection = new JMenuItem(
350 MessageManager.getString("action.make_groups_selection"));
351 grpsFromSelection.addActionListener(new ActionListener()
354 public void actionPerformed(ActionEvent e)
356 makeGrpsFromSelection_actionPerformed(e);
359 JMenuItem expandAlignment = new JMenuItem(
360 MessageManager.getString("action.view_flanking_regions"));
361 expandAlignment.setToolTipText(
362 MessageManager.getString("label.view_flanking_regions"));
363 expandAlignment.addActionListener(new ActionListener()
366 public void actionPerformed(ActionEvent e)
371 JMenuItem remove2LeftMenuItem = new JMenuItem(
372 MessageManager.getString("action.remove_left"));
373 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
374 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
375 al = new ActionListener()
378 public void actionPerformed(ActionEvent e)
380 remove2LeftMenuItem_actionPerformed(e);
383 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
385 JMenuItem remove2RightMenuItem = new JMenuItem(
386 MessageManager.getString("action.remove_right"));
387 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
388 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
389 al = new ActionListener()
392 public void actionPerformed(ActionEvent e)
394 remove2RightMenuItem_actionPerformed(e);
397 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
399 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
400 MessageManager.getString("action.remove_empty_columns"));
401 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
402 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
403 al = new ActionListener()
406 public void actionPerformed(ActionEvent e)
408 removeGappedColumnMenuItem_actionPerformed(e);
411 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
413 JMenuItem removeAllGapsMenuItem = new JMenuItem(
414 MessageManager.getString("action.remove_all_gaps"));
415 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
416 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
417 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
419 al = new ActionListener()
422 public void actionPerformed(ActionEvent e)
424 removeAllGapsMenuItem_actionPerformed(e);
427 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
429 JMenuItem justifyLeftMenuItem = new JMenuItem(
430 MessageManager.getString("action.left_justify_alignment"));
431 justifyLeftMenuItem.addActionListener(new ActionListener()
434 public void actionPerformed(ActionEvent e)
436 justifyLeftMenuItem_actionPerformed(e);
439 JMenuItem justifyRightMenuItem = new JMenuItem(
440 MessageManager.getString("action.right_justify_alignment"));
441 justifyRightMenuItem.addActionListener(new ActionListener()
444 public void actionPerformed(ActionEvent e)
446 justifyRightMenuItem_actionPerformed(e);
449 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
450 viewBoxesMenuItem.setState(true);
451 viewBoxesMenuItem.addActionListener(new ActionListener()
454 public void actionPerformed(ActionEvent e)
456 viewBoxesMenuItem_actionPerformed(e);
459 viewTextMenuItem.setText(MessageManager.getString("action.text"));
460 viewTextMenuItem.setState(true);
461 viewTextMenuItem.addActionListener(new ActionListener()
464 public void actionPerformed(ActionEvent e)
466 viewTextMenuItem_actionPerformed(e);
469 showNonconservedMenuItem
470 .setText(MessageManager.getString("label.show_non_conserved"));
471 showNonconservedMenuItem.setState(false);
472 showNonconservedMenuItem.addActionListener(new ActionListener()
475 public void actionPerformed(ActionEvent e)
477 showUnconservedMenuItem_actionPerformed(e);
480 JMenuItem sortPairwiseMenuItem = new JMenuItem(
481 MessageManager.getString("action.by_pairwise_id"));
482 sortPairwiseMenuItem.addActionListener(new ActionListener()
485 public void actionPerformed(ActionEvent e)
487 sortPairwiseMenuItem_actionPerformed(e);
490 JMenuItem sortIDMenuItem = new JMenuItem(
491 MessageManager.getString("action.by_id"));
492 sortIDMenuItem.addActionListener(new ActionListener()
495 public void actionPerformed(ActionEvent e)
497 sortIDMenuItem_actionPerformed(e);
500 JMenuItem sortLengthMenuItem = new JMenuItem(
501 MessageManager.getString("action.by_length"));
502 sortLengthMenuItem.addActionListener(new ActionListener()
505 public void actionPerformed(ActionEvent e)
507 sortLengthMenuItem_actionPerformed(e);
510 JMenuItem sortGroupMenuItem = new JMenuItem(
511 MessageManager.getString("action.by_group"));
512 sortGroupMenuItem.addActionListener(new ActionListener()
515 public void actionPerformed(ActionEvent e)
517 sortGroupMenuItem_actionPerformed(e);
521 JMenuItem removeRedundancyMenuItem = new JMenuItem(
522 MessageManager.getString("action.remove_redundancy"));
523 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
524 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
525 al = new ActionListener()
528 public void actionPerformed(ActionEvent e)
530 removeRedundancyMenuItem_actionPerformed(e);
533 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
535 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
536 MessageManager.getString("action.pairwise_alignment"));
537 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
540 public void actionPerformed(ActionEvent e)
542 pairwiseAlignmentMenuItem_actionPerformed(e);
546 this.getContentPane().setLayout(new BorderLayout());
547 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
548 statusBar.setBackground(Color.white);
549 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
550 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
551 statusBar.setText(MessageManager.getString("label.status_bar"));
553 .setText(MessageManager.getString("label.out_to_textbox"));
555 annotationPanelMenuItem.setActionCommand("");
556 annotationPanelMenuItem
557 .setText(MessageManager.getString("label.show_annotations"));
558 annotationPanelMenuItem
559 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
560 annotationPanelMenuItem.addActionListener(new ActionListener()
563 public void actionPerformed(ActionEvent e)
565 annotationPanelMenuItem_actionPerformed(e);
568 showAllAlAnnotations.setText(
569 MessageManager.getString("label.show_all_al_annotations"));
570 final boolean isAnnotationPanelShown = annotationPanelMenuItem
572 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
573 showAllAlAnnotations.addActionListener(new ActionListener()
576 public void actionPerformed(ActionEvent e)
578 showAllAnnotations_actionPerformed(false, true);
581 hideAllAlAnnotations.setText(
582 MessageManager.getString("label.hide_all_al_annotations"));
583 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
584 hideAllAlAnnotations.addActionListener(new ActionListener()
587 public void actionPerformed(ActionEvent e)
589 hideAllAnnotations_actionPerformed(false, true);
592 showAllSeqAnnotations.setText(
593 MessageManager.getString("label.show_all_seq_annotations"));
594 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
595 showAllSeqAnnotations.addActionListener(new ActionListener()
598 public void actionPerformed(ActionEvent e)
600 showAllAnnotations_actionPerformed(true, false);
603 hideAllSeqAnnotations.setText(
604 MessageManager.getString("label.hide_all_seq_annotations"));
605 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
606 hideAllSeqAnnotations.addActionListener(new ActionListener()
609 public void actionPerformed(ActionEvent e)
611 hideAllAnnotations_actionPerformed(true, false);
614 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
615 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
616 SequenceAnnotationOrder.NONE.name()));
617 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
618 MessageManager.getString("label.sort_annotations_by_sequence"));
619 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
620 MessageManager.getString("label.sort_annotations_by_label"));
622 sortAnnBySequence.setSelected(
623 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
624 sortAnnBySequence.addActionListener(new ActionListener()
627 public void actionPerformed(ActionEvent e)
629 boolean newState = sortAnnBySequence.getState();
630 sortAnnByLabel.setSelected(false);
631 setAnnotationSortOrder(
632 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
633 : SequenceAnnotationOrder.NONE);
634 sortAnnotations_actionPerformed();
637 sortAnnByLabel.setSelected(
638 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
639 sortAnnByLabel.addActionListener(new ActionListener()
642 public void actionPerformed(ActionEvent e)
644 boolean newState = sortAnnByLabel.getState();
645 sortAnnBySequence.setSelected(false);
646 setAnnotationSortOrder(
647 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
648 : SequenceAnnotationOrder.NONE);
649 sortAnnotations_actionPerformed();
652 colourTextMenuItem = new JCheckBoxMenuItem(
653 MessageManager.getString("label.colour_text"));
654 colourTextMenuItem.addActionListener(new ActionListener()
657 public void actionPerformed(ActionEvent e)
659 colourTextMenuItem_actionPerformed(e);
662 colourGapsMenuItem = new JCheckBoxMenuItem(
663 MessageManager.getString("label.colour_gaps"));
664 colourGapsMenuItem.addActionListener(new ActionListener()
667 public void actionPerformed(ActionEvent e)
669 colourGapsMenuItem_actionPerformed(e);
672 JMenuItem htmlMenuItem = new JMenuItem(
673 MessageManager.getString("label.html"));
674 htmlMenuItem.addActionListener(new ActionListener()
677 public void actionPerformed(ActionEvent e)
679 htmlMenuItem_actionPerformed(e);
683 JMenuItem createBioJS = new JMenuItem(
684 MessageManager.getString("label.biojs_html_export"));
685 createBioJS.addActionListener(new java.awt.event.ActionListener()
688 public void actionPerformed(ActionEvent e)
690 bioJSMenuItem_actionPerformed(e);
694 JMenuItem overviewMenuItem = new JMenuItem(
695 MessageManager.getString("label.overview_window"));
696 overviewMenuItem.addActionListener(new ActionListener()
699 public void actionPerformed(ActionEvent e)
701 overviewMenuItem_actionPerformed(e);
705 undoMenuItem.setEnabled(false);
706 undoMenuItem.setText(MessageManager.getString("action.undo"));
707 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
708 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
709 al = new ActionListener()
712 public void actionPerformed(ActionEvent e)
714 undoMenuItem_actionPerformed(e);
717 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
719 redoMenuItem.setEnabled(false);
720 redoMenuItem.setText(MessageManager.getString("action.redo"));
721 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
722 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
723 al = new ActionListener()
726 public void actionPerformed(ActionEvent e)
728 redoMenuItem_actionPerformed(e);
731 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
733 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
734 wrapMenuItem.addActionListener(new ActionListener()
737 public void actionPerformed(ActionEvent e)
739 wrapMenuItem_actionPerformed(e);
743 JMenuItem printMenuItem = new JMenuItem(
744 MessageManager.getString("action.print"));
745 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
746 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
747 al = new ActionListener()
750 public void actionPerformed(ActionEvent e)
752 printMenuItem_actionPerformed(e);
755 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
758 .setText(MessageManager.getString("action.show_gaps"));
759 renderGapsMenuItem.setState(true);
760 renderGapsMenuItem.addActionListener(new ActionListener()
763 public void actionPerformed(ActionEvent e)
765 renderGapsMenuItem_actionPerformed(e);
769 JMenuItem findMenuItem = new JMenuItem(
770 MessageManager.getString("action.find"));
771 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
772 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
773 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
774 MessageManager.getString("label.find_tip")));
775 al = new ActionListener()
778 public void actionPerformed(ActionEvent e)
780 findMenuItem_actionPerformed(e);
783 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
785 showSeqFeatures.setText(
786 MessageManager.getString("label.show_sequence_features"));
787 showSeqFeatures.addActionListener(new ActionListener()
790 public void actionPerformed(ActionEvent actionEvent)
792 showSeqFeatures_actionPerformed(actionEvent);
796 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
797 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
798 * void actionPerformed(ActionEvent actionEvent) {
799 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
802 .setText(MessageManager.getString("label.show_database_refs"));
803 showDbRefsMenuitem.addActionListener(new ActionListener()
807 public void actionPerformed(ActionEvent e)
809 showDbRefs_actionPerformed(e);
813 showNpFeatsMenuitem.setText(
814 MessageManager.getString("label.show_non_positional_features"));
815 showNpFeatsMenuitem.addActionListener(new ActionListener()
819 public void actionPerformed(ActionEvent e)
821 showNpFeats_actionPerformed(e);
825 showGroupConservation
826 .setText(MessageManager.getString("label.group_conservation"));
827 showGroupConservation.addActionListener(new ActionListener()
831 public void actionPerformed(ActionEvent e)
833 showGroupConservation_actionPerformed(e);
839 .setText(MessageManager.getString("label.group_consensus"));
840 showGroupConsensus.addActionListener(new ActionListener()
844 public void actionPerformed(ActionEvent e)
846 showGroupConsensus_actionPerformed(e);
850 showConsensusHistogram.setText(
851 MessageManager.getString("label.show_consensus_histogram"));
852 showConsensusHistogram.addActionListener(new ActionListener()
856 public void actionPerformed(ActionEvent e)
858 showConsensusHistogram_actionPerformed(e);
863 .setText(MessageManager.getString("label.show_consensus_logo"));
864 showSequenceLogo.addActionListener(new ActionListener()
868 public void actionPerformed(ActionEvent e)
870 showSequenceLogo_actionPerformed(e);
874 normaliseSequenceLogo
875 .setText(MessageManager.getString("label.norm_consensus_logo"));
876 normaliseSequenceLogo.addActionListener(new ActionListener()
880 public void actionPerformed(ActionEvent e)
882 normaliseSequenceLogo_actionPerformed(e);
886 applyAutoAnnotationSettings
887 .setText(MessageManager.getString("label.apply_all_groups"));
888 applyAutoAnnotationSettings.setState(false);
889 applyAutoAnnotationSettings.setVisible(true);
890 applyAutoAnnotationSettings.addActionListener(new ActionListener()
893 public void actionPerformed(ActionEvent e)
895 applyAutoAnnotationSettings_actionPerformed(e);
899 ButtonGroup buttonGroup = new ButtonGroup();
900 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
901 MessageManager.getString("label.show_first"));
902 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
903 MessageManager.getString("label.show_last"));
904 buttonGroup.add(showAutoFirst);
905 buttonGroup.add(showAutoLast);
906 final boolean autoFirst = Cache
907 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
908 showAutoFirst.setSelected(autoFirst);
909 setShowAutoCalculatedAbove(autoFirst);
910 showAutoFirst.addActionListener(new ActionListener()
913 public void actionPerformed(ActionEvent e)
915 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
916 sortAnnotations_actionPerformed();
919 showAutoLast.setSelected(!showAutoFirst.isSelected());
920 showAutoLast.addActionListener(new ActionListener()
923 public void actionPerformed(ActionEvent e)
925 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
926 sortAnnotations_actionPerformed();
930 JMenuItem deleteGroups = new JMenuItem(
931 MessageManager.getString("action.undefine_groups"));
932 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
933 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
934 al = new ActionListener()
937 public void actionPerformed(ActionEvent e)
939 deleteGroups_actionPerformed(e);
942 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
944 JMenuItem annotationColumn = new JMenuItem(
945 MessageManager.getString("action.select_by_annotation"));
946 annotationColumn.addActionListener(new ActionListener()
949 public void actionPerformed(ActionEvent e)
951 annotationColumn_actionPerformed(e);
955 JMenuItem createGroup = new JMenuItem(
956 MessageManager.getString("action.create_group"));
957 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
958 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
959 al = new ActionListener()
962 public void actionPerformed(ActionEvent e)
964 createGroup_actionPerformed(e);
967 addMenuActionAndAccelerator(keyStroke, createGroup, al);
969 JMenuItem unGroup = new JMenuItem(
970 MessageManager.getString("action.remove_group"));
971 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
972 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
973 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
975 al = new ActionListener()
978 public void actionPerformed(ActionEvent e)
980 unGroup_actionPerformed(e);
983 addMenuActionAndAccelerator(keyStroke, unGroup, al);
985 copy.setText(MessageManager.getString("action.copy"));
986 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
987 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
989 al = new ActionListener()
992 public void actionPerformed(ActionEvent e)
994 copy_actionPerformed();
997 addMenuActionAndAccelerator(keyStroke, copy, al);
999 cut.setText(MessageManager.getString("action.cut"));
1000 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1001 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1002 al = new ActionListener()
1005 public void actionPerformed(ActionEvent e)
1007 cut_actionPerformed();
1010 addMenuActionAndAccelerator(keyStroke, cut, al);
1012 JMenuItem delete = new JMenuItem(
1013 MessageManager.getString("action.delete"));
1014 delete.addActionListener(new ActionListener()
1017 public void actionPerformed(ActionEvent e)
1019 delete_actionPerformed();
1023 pasteMenu.setText(MessageManager.getString("action.paste"));
1024 JMenuItem pasteNew = new JMenuItem(
1025 MessageManager.getString("label.to_new_alignment"));
1026 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1027 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1028 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1030 al = new ActionListener()
1033 public void actionPerformed(ActionEvent e)
1035 pasteNew_actionPerformed(e);
1038 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1040 JMenuItem pasteThis = new JMenuItem(
1041 MessageManager.getString("label.to_this_alignment"));
1042 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1043 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1044 al = new ActionListener()
1047 public void actionPerformed(ActionEvent e)
1049 pasteThis_actionPerformed(e);
1052 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1054 JMenuItem createPNG = new JMenuItem("PNG");
1055 createPNG.addActionListener(new ActionListener()
1058 public void actionPerformed(ActionEvent e)
1063 createPNG.setActionCommand(
1064 MessageManager.getString("label.save_png_image"));
1066 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1067 font.addActionListener(new ActionListener()
1070 public void actionPerformed(ActionEvent e)
1072 font_actionPerformed(e);
1076 MessageManager.getString("label.show_sequence_limits"));
1077 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1078 seqLimits.addActionListener(new ActionListener()
1081 public void actionPerformed(ActionEvent e)
1083 seqLimit_actionPerformed(e);
1086 JMenuItem epsFile = new JMenuItem("EPS");
1087 epsFile.addActionListener(new ActionListener()
1090 public void actionPerformed(ActionEvent e)
1096 JMenuItem createSVG = new JMenuItem("SVG");
1097 createSVG.addActionListener(new ActionListener()
1100 public void actionPerformed(ActionEvent e)
1106 JMenuItem loadTreeMenuItem = new JMenuItem(
1107 MessageManager.getString("label.load_associated_tree"));
1108 loadTreeMenuItem.setActionCommand(
1109 MessageManager.getString("label.load_tree_for_sequence_set"));
1110 loadTreeMenuItem.addActionListener(new ActionListener()
1113 public void actionPerformed(ActionEvent e)
1115 loadTreeMenuItem_actionPerformed(e);
1119 scaleAbove.setVisible(false);
1120 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1121 scaleAbove.addActionListener(new ActionListener()
1124 public void actionPerformed(ActionEvent e)
1126 scaleAbove_actionPerformed(e);
1129 scaleLeft.setVisible(false);
1130 scaleLeft.setSelected(true);
1131 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1132 scaleLeft.addActionListener(new ActionListener()
1135 public void actionPerformed(ActionEvent e)
1137 scaleLeft_actionPerformed(e);
1140 scaleRight.setVisible(false);
1141 scaleRight.setSelected(true);
1142 scaleRight.setText(MessageManager.getString("action.scale_right"));
1143 scaleRight.addActionListener(new ActionListener()
1146 public void actionPerformed(ActionEvent e)
1148 scaleRight_actionPerformed(e);
1151 centreColumnLabelsMenuItem.setVisible(true);
1152 centreColumnLabelsMenuItem.setState(false);
1153 centreColumnLabelsMenuItem.setText(
1154 MessageManager.getString("label.centre_column_labels"));
1155 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1158 public void actionPerformed(ActionEvent e)
1160 centreColumnLabels_actionPerformed(e);
1163 followHighlightMenuItem.setVisible(true);
1164 followHighlightMenuItem.setState(true);
1165 followHighlightMenuItem
1166 .setText(MessageManager.getString("label.automatic_scrolling"));
1167 followHighlightMenuItem.addActionListener(new ActionListener()
1171 public void actionPerformed(ActionEvent e)
1173 followHighlight_actionPerformed();
1179 .setText(MessageManager.getString("action.by_tree_order"));
1180 sort.setText(MessageManager.getString("action.sort"));
1181 sort.addMenuListener(new MenuListener()
1184 public void menuSelected(MenuEvent e)
1186 buildTreeSortMenu();
1190 public void menuDeselected(MenuEvent e)
1195 public void menuCanceled(MenuEvent e)
1200 .setText(MessageManager.getString("label.sort_by_score"));
1201 sort.add(sortByAnnotScore);
1202 sort.addMenuListener(new javax.swing.event.MenuListener()
1206 public void menuCanceled(MenuEvent e)
1211 public void menuDeselected(MenuEvent e)
1216 public void menuSelected(MenuEvent e)
1218 buildSortByAnnotationScoresMenu();
1221 sortByAnnotScore.setVisible(false);
1224 .setText(MessageManager.getString("action.calculate_tree_pca"));
1226 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1228 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1229 padGapsMenuitem.addActionListener(new ActionListener()
1232 public void actionPerformed(ActionEvent e)
1234 padGapsMenuitem_actionPerformed(e);
1237 JMenuItem vamsasStore = new JMenuItem(
1238 MessageManager.getString("label.vamsas_store"));
1239 vamsasStore.setVisible(false);
1240 vamsasStore.addActionListener(new ActionListener()
1243 public void actionPerformed(ActionEvent e)
1245 vamsasStore_actionPerformed(e);
1250 * Translate as cDNA with sub-menu of translation tables
1253 .setText(MessageManager.getString("label.translate_cDNA"));
1254 boolean first = true;
1255 for (final GeneticCodeI table : GeneticCodes.getInstance()
1258 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1259 showTranslation.add(item);
1260 item.addActionListener(new ActionListener()
1263 public void actionPerformed(ActionEvent e)
1265 showTranslation_actionPerformed(table);
1270 showTranslation.addSeparator();
1275 showReverse.setText(MessageManager.getString("label.reverse"));
1276 showReverse.addActionListener(new ActionListener()
1279 public void actionPerformed(ActionEvent e)
1281 showReverse_actionPerformed(false);
1284 showReverseComplement
1285 .setText(MessageManager.getString("label.reverse_complement"));
1286 showReverseComplement.addActionListener(new ActionListener()
1289 public void actionPerformed(ActionEvent e)
1291 showReverse_actionPerformed(true);
1295 JMenuItem extractScores = new JMenuItem(
1296 MessageManager.getString("label.extract_scores"));
1297 extractScores.addActionListener(new ActionListener()
1300 public void actionPerformed(ActionEvent e)
1302 extractScores_actionPerformed(e);
1305 extractScores.setVisible(true);
1306 // JBPNote: TODO: make gui for regex based score extraction
1308 // for show products actions see AlignFrame.canShowProducts
1309 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1311 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1312 runGroovy.setToolTipText(
1313 MessageManager.getString("label.run_groovy_tip"));
1314 runGroovy.addActionListener(new ActionListener()
1317 public void actionPerformed(ActionEvent e)
1319 runGroovy_actionPerformed();
1323 openFeatureSettings = new JMenuItem(
1324 MessageManager.getString("action.feature_settings"));
1325 openFeatureSettings.addActionListener(new ActionListener()
1328 public void actionPerformed(ActionEvent e)
1330 featureSettings_actionPerformed(e);
1335 * add sub-menu of database we can fetch from
1337 JMenuItem fetchSequence = new JMenuItem(
1338 MessageManager.getString("label.fetch_sequences"));
1339 fetchSequence.addActionListener(new ActionListener()
1342 public void actionPerformed(ActionEvent e)
1344 fetchSequence_actionPerformed();
1348 JMenuItem associatedData = new JMenuItem(
1349 MessageManager.getString("label.load_features_annotations"));
1350 associatedData.addActionListener(new ActionListener()
1353 public void actionPerformed(ActionEvent e)
1355 associatedData_actionPerformed(e);
1358 loadVcf = new JMenuItem(
1359 MessageManager.getString("label.load_vcf_file"));
1360 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1361 loadVcf.addActionListener(new ActionListener()
1364 public void actionPerformed(ActionEvent e)
1366 loadVcf_actionPerformed();
1369 autoCalculate.setText(
1370 MessageManager.getString("label.autocalculate_consensus"));
1371 autoCalculate.setState(
1372 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1373 autoCalculate.addActionListener(new ActionListener()
1376 public void actionPerformed(ActionEvent e)
1378 autoCalculate_actionPerformed(e);
1382 MessageManager.getString("label.sort_alignment_new_tree"));
1383 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1384 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1386 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1387 sortByTree.addActionListener(new ActionListener()
1390 public void actionPerformed(ActionEvent e)
1392 sortByTreeOption_actionPerformed(e);
1396 listenToViewSelections.setText(
1397 MessageManager.getString("label.listen_for_selections"));
1398 listenToViewSelections
1399 .setToolTipText("<html>" + MessageManager.getString(
1400 "label.selections_mirror_selections_made_same_sequences_other_views"));
1401 listenToViewSelections.setState(false);
1402 listenToViewSelections.addActionListener(new ActionListener()
1405 public void actionPerformed(ActionEvent e)
1407 listenToViewSelections_actionPerformed(e);
1411 JMenu addSequenceMenu = new JMenu(
1412 MessageManager.getString("label.add_sequences"));
1413 JMenuItem addFromFile = new JMenuItem(
1414 MessageManager.getString("label.from_file"));
1415 addFromFile.addActionListener(new ActionListener()
1418 public void actionPerformed(ActionEvent e)
1420 addFromFile_actionPerformed(e);
1423 JMenuItem addFromText = new JMenuItem(
1424 MessageManager.getString("label.from_textbox"));
1425 addFromText.addActionListener(new ActionListener()
1428 public void actionPerformed(ActionEvent e)
1430 addFromText_actionPerformed(e);
1433 JMenuItem addFromURL = new JMenuItem(
1434 MessageManager.getString("label.from_url"));
1435 addFromURL.addActionListener(new ActionListener()
1438 public void actionPerformed(ActionEvent e)
1440 addFromURL_actionPerformed(e);
1443 JMenuItem exportFeatures = new JMenuItem(
1444 MessageManager.getString("label.export_features"));
1445 exportFeatures.addActionListener(new ActionListener()
1448 public void actionPerformed(ActionEvent e)
1450 exportFeatures_actionPerformed(e);
1453 JMenuItem exportAnnotations = new JMenuItem(
1454 MessageManager.getString("label.export_annotations"));
1455 exportAnnotations.addActionListener(new ActionListener()
1458 public void actionPerformed(ActionEvent e)
1460 exportAnnotations_actionPerformed(e);
1463 statusPanel.setLayout(new GridLayout());
1464 JMenuItem showAllSeqs = new JMenuItem(
1465 MessageManager.getString("label.all_sequences"));
1466 showAllSeqs.setToolTipText(
1467 MessageManager.getString("label.toggle_sequence_visibility"));
1468 showAllSeqs.addActionListener(new ActionListener()
1471 public void actionPerformed(ActionEvent e)
1473 showAllSeqs_actionPerformed(e);
1476 JMenuItem showAllColumns = new JMenuItem(
1477 MessageManager.getString("label.all_columns"));
1478 showAllColumns.setToolTipText(
1479 MessageManager.getString("label.toggle_columns_visibility"));
1480 showAllColumns.addActionListener(new ActionListener()
1483 public void actionPerformed(ActionEvent e)
1485 showAllColumns_actionPerformed(e);
1488 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1489 JMenuItem hideSelSequences = new JMenuItem(
1490 MessageManager.getString("label.selected_sequences"));
1491 hideSelSequences.setToolTipText(
1492 MessageManager.getString("label.toggle_sequence_visibility"));
1493 hideSelSequences.addActionListener(new ActionListener()
1496 public void actionPerformed(ActionEvent e)
1498 hideSelSequences_actionPerformed(e);
1501 JMenuItem hideSelColumns = new JMenuItem(
1502 MessageManager.getString("label.selected_columns"));
1503 hideSelColumns.setToolTipText(
1504 MessageManager.getString("label.toggle_columns_visibility"));
1505 hideSelColumns.addActionListener(new ActionListener()
1508 public void actionPerformed(ActionEvent e)
1510 hideSelColumns_actionPerformed(e);
1513 JMenuItem hideAllSelection = new JMenuItem(
1514 MessageManager.getString("label.selected_region"));
1515 hideAllSelection.addActionListener(new ActionListener()
1518 public void actionPerformed(ActionEvent e)
1520 hideAllSelection_actionPerformed(e);
1523 // TODO: should be hidden if no selection exists.
1524 JMenuItem hideAllButSelection = new JMenuItem(
1525 MessageManager.getString("label.all_but_selected_region"));
1526 hideAllButSelection.addActionListener(new ActionListener()
1529 public void actionPerformed(ActionEvent e)
1531 hideAllButSelection_actionPerformed(e);
1534 JMenuItem showAllhidden = new JMenuItem(
1535 MessageManager.getString("label.all_sequences_columns"));
1536 showAllhidden.setToolTipText(MessageManager
1537 .getString("label.toggles_visibility_hidden_selected_regions"));
1538 showAllhidden.addActionListener(new ActionListener()
1541 public void actionPerformed(ActionEvent e)
1543 showAllhidden_actionPerformed(e);
1546 hiddenMarkers.setText(
1547 MessageManager.getString("action.show_hidden_markers"));
1548 hiddenMarkers.addActionListener(new ActionListener()
1551 public void actionPerformed(ActionEvent e)
1553 hiddenMarkers_actionPerformed(e);
1557 JMenuItem invertColSel = new JMenuItem(
1558 MessageManager.getString("action.invert_column_selection"));
1559 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1560 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1561 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1563 al = new ActionListener()
1566 public void actionPerformed(ActionEvent e)
1568 invertColSel_actionPerformed(e);
1571 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1573 showComplementMenuItem.setVisible(false);
1574 showComplementMenuItem.addActionListener(new ActionListener()
1577 public void actionPerformed(ActionEvent e)
1579 showComplement_actionPerformed(showComplementMenuItem.getState());
1583 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1586 public void stateChanged(ChangeEvent evt)
1588 JTabbedPane pane = (JTabbedPane) evt.getSource();
1589 int sel = pane.getSelectedIndex();
1590 tabSelectionChanged(sel);
1593 tabbedPane.addMouseListener(new MouseAdapter()
1596 public void mousePressed(MouseEvent e)
1598 if (e.isPopupTrigger()) // Mac
1600 tabbedPane_mousePressed(e);
1605 public void mouseReleased(MouseEvent e)
1607 if (e.isPopupTrigger()) // Windows
1609 tabbedPane_mousePressed(e);
1613 tabbedPane.addFocusListener(new FocusAdapter()
1616 public void focusGained(FocusEvent e)
1618 tabbedPane_focusGained(e);
1622 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1623 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1624 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1625 al = new ActionListener()
1628 public void actionPerformed(ActionEvent e)
1630 save_actionPerformed(e);
1633 addMenuActionAndAccelerator(keyStroke, save, al);
1635 reload.setEnabled(false);
1636 reload.setText(MessageManager.getString("action.reload"));
1637 reload.addActionListener(new ActionListener()
1640 public void actionPerformed(ActionEvent e)
1642 reload_actionPerformed(e);
1646 JMenuItem newView = new JMenuItem(
1647 MessageManager.getString("action.new_view"));
1648 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1649 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1650 al = new ActionListener()
1653 public void actionPerformed(ActionEvent e)
1655 newView_actionPerformed(e);
1658 addMenuActionAndAccelerator(keyStroke, newView, al);
1660 tabbedPane.setToolTipText("<html><i>"
1661 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1664 formatMenu.setText(MessageManager.getString("action.format"));
1665 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1667 idRightAlign.setText(
1668 MessageManager.getString("label.right_align_sequence_id"));
1669 idRightAlign.addActionListener(new ActionListener()
1672 public void actionPerformed(ActionEvent e)
1674 idRightAlign_actionPerformed(e);
1678 gatherViews.setEnabled(false);
1679 gatherViews.setText(MessageManager.getString("action.gather_views"));
1680 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1681 al = new ActionListener()
1684 public void actionPerformed(ActionEvent e)
1686 gatherViews_actionPerformed(e);
1689 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1691 expandViews.setEnabled(false);
1692 expandViews.setText(MessageManager.getString("action.expand_views"));
1693 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1694 al = new ActionListener()
1697 public void actionPerformed(ActionEvent e)
1699 expandViews_actionPerformed(e);
1702 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1704 JMenuItem pageSetup = new JMenuItem(
1705 MessageManager.getString("action.page_setup"));
1706 pageSetup.addActionListener(new ActionListener()
1709 public void actionPerformed(ActionEvent e)
1711 pageSetup_actionPerformed(e);
1714 JMenuItem alignmentProperties = new JMenuItem(
1715 MessageManager.getString("label.alignment_props"));
1716 alignmentProperties.addActionListener(new ActionListener()
1719 public void actionPerformed(ActionEvent actionEvent)
1721 alignmentProperties();
1724 JMenuItem selectHighlighted = new JMenuItem(
1725 MessageManager.getString("action.select_highlighted_columns"));
1726 selectHighlighted.setToolTipText(
1727 MessageManager.getString("tooltip.select_highlighted_columns"));
1728 al = new ActionListener()
1731 public void actionPerformed(ActionEvent actionEvent)
1733 selectHighlightedColumns_actionPerformed(actionEvent);
1736 selectHighlighted.addActionListener(al);
1737 JMenu tooltipSettingsMenu = new JMenu(
1738 MessageManager.getString("label.sequence_id_tooltip"));
1739 JMenu autoAnnMenu = new JMenu(
1740 MessageManager.getString("label.autocalculated_annotation"));
1742 JMenu exportImageMenu = new JMenu(
1743 MessageManager.getString("label.export_image"));
1744 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1745 alignFrameMenuBar.add(fileMenu);
1746 alignFrameMenuBar.add(editMenu);
1747 alignFrameMenuBar.add(selectMenu);
1748 alignFrameMenuBar.add(viewMenu);
1749 alignFrameMenuBar.add(annotationsMenu);
1750 alignFrameMenuBar.add(formatMenu);
1751 alignFrameMenuBar.add(colourMenu);
1752 alignFrameMenuBar.add(calculateMenu);
1753 if (!Platform.isJS())
1755 alignFrameMenuBar.add(webService);
1758 fileMenu.add(fetchSequence);
1759 fileMenu.add(addSequenceMenu);
1760 fileMenu.add(reload);
1761 fileMenu.addSeparator();
1762 fileMenu.add(vamsasStore);
1764 fileMenu.add(saveAs);
1765 fileMenu.add(outputTextboxMenu);
1766 fileMenu.add(pageSetup);
1767 fileMenu.add(printMenuItem);
1768 fileMenu.addSeparator();
1769 fileMenu.add(exportImageMenu);
1770 fileMenu.add(exportFeatures);
1771 fileMenu.add(exportAnnotations);
1772 fileMenu.add(loadTreeMenuItem);
1773 fileMenu.add(associatedData);
1774 if (!Platform.isJS())
1776 fileMenu.add(loadVcf);
1778 fileMenu.addSeparator();
1779 fileMenu.add(closeMenuItem);
1781 pasteMenu.add(pasteNew);
1782 pasteMenu.add(pasteThis);
1783 editMenu.add(undoMenuItem);
1784 editMenu.add(redoMenuItem);
1787 editMenu.add(pasteMenu);
1788 editMenu.add(delete);
1789 editMenu.addSeparator();
1790 editMenu.add(remove2LeftMenuItem);
1791 editMenu.add(remove2RightMenuItem);
1792 editMenu.add(removeGappedColumnMenuItem);
1793 editMenu.add(removeAllGapsMenuItem);
1794 editMenu.add(removeRedundancyMenuItem);
1795 editMenu.addSeparator();
1796 // dont add these yet in the CVS build - they cannot be undone!
1797 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1798 // editMenu.add(justifyLeftMenuItem);
1799 // editMenu.add(justifyRightMenuItem);
1800 // editMenu.addSeparator();
1801 editMenu.add(padGapsMenuitem);
1803 showMenu.add(showAllColumns);
1804 showMenu.add(showAllSeqs);
1805 showMenu.add(showAllhidden);
1806 hideMenu.add(hideSelColumns);
1807 hideMenu.add(hideSelSequences);
1808 hideMenu.add(hideAllSelection);
1809 hideMenu.add(hideAllButSelection);
1810 viewMenu.add(newView);
1811 viewMenu.add(expandViews);
1812 viewMenu.add(gatherViews);
1813 viewMenu.addSeparator();
1814 viewMenu.add(showMenu);
1815 viewMenu.add(hideMenu);
1816 viewMenu.add(showComplementMenuItem);
1817 viewMenu.addSeparator();
1818 viewMenu.add(followHighlightMenuItem);
1819 viewMenu.addSeparator();
1820 viewMenu.add(showSeqFeatures);
1821 // viewMenu.add(showSeqFeaturesHeight);
1822 viewMenu.add(openFeatureSettings);
1823 tooltipSettingsMenu.add(showDbRefsMenuitem);
1824 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1825 viewMenu.add(tooltipSettingsMenu);
1826 viewMenu.addSeparator();
1827 viewMenu.add(alignmentProperties);
1828 viewMenu.addSeparator();
1829 viewMenu.add(overviewMenuItem);
1831 annotationsMenu.add(annotationPanelMenuItem);
1832 annotationsMenu.addSeparator();
1833 annotationsMenu.add(showAllAlAnnotations);
1834 annotationsMenu.add(hideAllAlAnnotations);
1835 annotationsMenu.addSeparator();
1836 annotationsMenu.add(showAllSeqAnnotations);
1837 annotationsMenu.add(hideAllSeqAnnotations);
1838 annotationsMenu.add(sortAnnBySequence);
1839 annotationsMenu.add(sortAnnByLabel);
1840 annotationsMenu.addSeparator();
1841 autoAnnMenu.add(showAutoFirst);
1842 autoAnnMenu.add(showAutoLast);
1843 autoAnnMenu.addSeparator();
1844 autoAnnMenu.add(applyAutoAnnotationSettings);
1845 autoAnnMenu.add(showConsensusHistogram);
1846 autoAnnMenu.add(showSequenceLogo);
1847 autoAnnMenu.add(normaliseSequenceLogo);
1848 autoAnnMenu.addSeparator();
1849 autoAnnMenu.add(showGroupConservation);
1850 autoAnnMenu.add(showGroupConsensus);
1851 annotationsMenu.add(autoAnnMenu);
1853 sort.add(sortIDMenuItem);
1854 sort.add(sortLengthMenuItem);
1855 sort.add(sortGroupMenuItem);
1856 sort.add(sortPairwiseMenuItem);
1857 sort.add(sortByTreeMenu);
1858 calculateMenu.add(sort);
1859 calculateMenu.add(calculateTree);
1860 calculateMenu.addSeparator();
1861 calculateMenu.add(pairwiseAlignmentMenuItem);
1862 calculateMenu.addSeparator();
1863 calculateMenu.add(showTranslation);
1864 calculateMenu.add(showReverse);
1865 calculateMenu.add(showReverseComplement);
1866 calculateMenu.add(showProducts);
1867 calculateMenu.add(autoCalculate);
1868 calculateMenu.add(sortByTree);
1869 calculateMenu.addSeparator();
1870 calculateMenu.add(expandAlignment);
1871 calculateMenu.add(extractScores);
1872 if (!Platform.isJS())
1874 calculateMenu.addSeparator();
1875 calculateMenu.add(runGroovy);
1878 webServiceNoServices = new JMenuItem(
1879 MessageManager.getString("label.no_services"));
1880 webService.add(webServiceNoServices);
1881 if (!Platform.isJS())
1883 exportImageMenu.add(htmlMenuItem);
1885 exportImageMenu.add(epsFile);
1886 exportImageMenu.add(createPNG);
1887 if (!Platform.isJS())
1889 exportImageMenu.add(createBioJS);
1890 exportImageMenu.add(createSVG);
1892 addSequenceMenu.add(addFromFile);
1893 addSequenceMenu.add(addFromText);
1894 addSequenceMenu.add(addFromURL);
1895 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1896 statusPanel.add(statusBar, null);
1897 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1899 formatMenu.add(font);
1900 formatMenu.addSeparator();
1901 formatMenu.add(wrapMenuItem);
1902 formatMenu.add(scaleAbove);
1903 formatMenu.add(scaleLeft);
1904 formatMenu.add(scaleRight);
1905 formatMenu.add(seqLimits);
1906 formatMenu.add(idRightAlign);
1907 formatMenu.add(hiddenMarkers);
1908 formatMenu.add(viewBoxesMenuItem);
1909 formatMenu.add(viewTextMenuItem);
1910 formatMenu.add(colourTextMenuItem);
1911 formatMenu.add(renderGapsMenuItem);
1912 formatMenu.add(colourGapsMenuItem);
1913 formatMenu.add(centreColumnLabelsMenuItem);
1914 formatMenu.add(showNonconservedMenuItem);
1915 selectMenu.add(findMenuItem);
1916 selectMenu.addSeparator();
1917 selectMenu.add(selectAllSequenceMenuItem);
1918 selectMenu.add(deselectAllSequenceMenuItem);
1919 selectMenu.add(invertSequenceMenuItem);
1920 selectMenu.add(invertColSel);
1921 selectMenu.add(createGroup);
1922 selectMenu.add(unGroup);
1923 selectMenu.add(grpsFromSelection);
1924 selectMenu.add(deleteGroups);
1925 selectMenu.add(annotationColumn);
1926 selectMenu.add(selectHighlighted);
1927 // TODO - determine if the listenToViewSelections button is needed : see bug
1929 // selectMenu.addSeparator();
1930 // selectMenu.add(listenToViewSelections);
1933 protected void colourGapsMenuItem_actionPerformed(ActionEvent e)
1935 // TODO Auto-generated method stub
1939 protected void loadVcf_actionPerformed()
1944 * Constructs the entries on the Colour menu (but does not add them to the
1947 protected void initColourMenu()
1949 applyToAllGroups = new JCheckBoxMenuItem(
1950 MessageManager.getString("label.apply_colour_to_all_groups"));
1951 applyToAllGroups.addActionListener(new ActionListener()
1954 public void actionPerformed(ActionEvent e)
1956 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1960 textColour = new JMenuItem(
1961 MessageManager.getString("label.text_colour"));
1962 textColour.addActionListener(new ActionListener()
1965 public void actionPerformed(ActionEvent e)
1967 textColour_actionPerformed();
1971 conservationMenuItem = new JCheckBoxMenuItem(
1972 MessageManager.getString("action.by_conservation"));
1973 conservationMenuItem.addActionListener(new ActionListener()
1976 public void actionPerformed(ActionEvent e)
1978 conservationMenuItem_actionPerformed(
1979 conservationMenuItem.isSelected());
1983 abovePIDThreshold = new JCheckBoxMenuItem(
1984 MessageManager.getString("label.above_identity_threshold"));
1985 abovePIDThreshold.addActionListener(new ActionListener()
1988 public void actionPerformed(ActionEvent e)
1990 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1993 modifyPID = new JMenuItem(
1994 MessageManager.getString("label.modify_identity_threshold"));
1995 modifyPID.addActionListener(new ActionListener()
1998 public void actionPerformed(ActionEvent e)
2000 modifyPID_actionPerformed();
2003 modifyConservation = new JMenuItem(MessageManager
2004 .getString("label.modify_conservation_threshold"));
2005 modifyConservation.addActionListener(new ActionListener()
2008 public void actionPerformed(ActionEvent e)
2010 modifyConservation_actionPerformed();
2014 annotationColour = new JRadioButtonMenuItem(
2015 MessageManager.getString("action.by_annotation"));
2016 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2017 annotationColour.addActionListener(new ActionListener()
2020 public void actionPerformed(ActionEvent e)
2022 annotationColour_actionPerformed();
2027 protected void selectHighlightedColumns_actionPerformed(
2028 ActionEvent actionEvent)
2030 // TODO Auto-generated method stub
2035 * Generate the reverse sequence (or reverse complement if the flag is true)
2036 * and add it to the alignment
2040 protected void showReverse_actionPerformed(boolean complement)
2045 * Try to run script in a Groovy console, having first ensured that this
2046 * alignframe is set as currentAlignFrame in Desktop
2048 protected void runGroovy_actionPerformed()
2054 * Adds the given action listener and key accelerator to the given menu item.
2055 * Also saves in a lookup table to support lookup of action by key stroke.
2059 * @param actionListener
2061 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2062 JMenuItem menuItem, ActionListener actionListener)
2064 menuItem.setAccelerator(keyStroke);
2065 accelerators.put(keyStroke, menuItem);
2066 menuItem.addActionListener(actionListener);
2070 * Action on clicking sort annotations by type.
2074 protected void sortAnnotations_actionPerformed()
2079 * Action on clicking Show all annotations.
2081 * @param forSequences
2082 * update sequence-related annotations
2083 * @param forAlignment
2084 * update non-sequence-related annotations
2086 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2087 boolean forAlignment)
2089 setAnnotationsVisibility(true, forSequences, forAlignment);
2093 * Action on clicking Hide all annotations.
2095 * @param forSequences
2096 * update sequence-related annotations
2097 * @param forAlignment
2098 * update non-sequence-related annotations
2100 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2101 boolean forAlignment)
2103 setAnnotationsVisibility(false, forSequences, forAlignment);
2107 * Set the visibility of annotations to true or false. Can act on
2108 * sequence-related annotations, or alignment-related, or both.
2111 * @param forSequences
2112 * update sequence-related annotations
2113 * @param forAlignment
2114 * update non-sequence-related annotations
2116 protected void setAnnotationsVisibility(boolean visible,
2117 boolean forSequences, boolean forAlignment)
2122 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2124 // TODO Auto-generated method stub
2128 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2130 // TODO Auto-generated method stub
2134 protected void showAllhidden_actionPerformed(ActionEvent e)
2136 // TODO Auto-generated method stub
2140 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2142 // TODO Auto-generated method stub
2146 protected void hideAllSelection_actionPerformed(ActionEvent e)
2148 // TODO Auto-generated method stub
2152 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2154 // TODO Auto-generated method stub
2158 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2160 // TODO Auto-generated method stub
2164 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2166 // TODO Auto-generated method stub
2170 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2172 // TODO Auto-generated method stub
2176 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2178 // TODO Auto-generated method stub
2182 protected void showGroupConservation_actionPerformed(ActionEvent e)
2184 // TODO Auto-generated method stub
2188 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2190 // TODO Auto-generated method stub
2194 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2196 // TODO Auto-generated method stub
2200 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2202 // TODO Auto-generated method stub
2206 protected void followHighlight_actionPerformed()
2208 // TODO Auto-generated method stub
2212 protected void showNpFeats_actionPerformed(ActionEvent e)
2214 // TODO Auto-generated method stub
2218 protected void showDbRefs_actionPerformed(ActionEvent e)
2220 // TODO Auto-generated method stub
2224 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2228 protected void buildSortByAnnotationScoresMenu()
2232 protected void extractScores_actionPerformed(ActionEvent e)
2236 protected void outputText_actionPerformed(String formatName)
2240 public void addFromFile_actionPerformed(ActionEvent e)
2245 public void addFromText_actionPerformed(ActionEvent e)
2250 public void addFromURL_actionPerformed(ActionEvent e)
2255 public void exportFeatures_actionPerformed(ActionEvent e)
2260 public void exportAnnotations_actionPerformed(ActionEvent e)
2265 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2269 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2274 protected void closeMenuItem_actionPerformed(boolean b)
2278 protected void redoMenuItem_actionPerformed(ActionEvent e)
2282 protected void undoMenuItem_actionPerformed(ActionEvent e)
2286 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2290 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2294 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2298 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2302 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2306 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2310 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2314 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2318 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2322 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2326 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2330 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2334 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2338 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2342 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2346 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2350 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2354 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2358 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2362 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2366 protected void conservationMenuItem_actionPerformed(boolean selected)
2370 protected void printMenuItem_actionPerformed(ActionEvent e)
2374 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2378 protected void findMenuItem_actionPerformed(ActionEvent e)
2382 protected void abovePIDThreshold_actionPerformed(boolean selected)
2386 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2390 protected void deleteGroups_actionPerformed(ActionEvent e)
2394 protected void createGroup_actionPerformed(ActionEvent e)
2398 protected void unGroup_actionPerformed(ActionEvent e)
2402 protected void copy_actionPerformed()
2406 protected void cut_actionPerformed()
2410 protected void delete_actionPerformed()
2414 protected void pasteNew_actionPerformed(ActionEvent e)
2418 protected void pasteThis_actionPerformed(ActionEvent e)
2422 protected void applyToAllGroups_actionPerformed(boolean selected)
2426 public void createPNG(java.io.File f)
2430 protected void font_actionPerformed(ActionEvent e)
2434 protected void seqLimit_actionPerformed(ActionEvent e)
2438 public void seqDBRef_actionPerformed(ActionEvent e)
2443 public void createEPS(java.io.File f)
2447 public void createSVG(java.io.File f)
2452 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2458 * Template method to handle the 'load T-Coffee scores' menu event.
2460 * Subclasses override this method to provide a custom action.
2465 protected void loadScores_actionPerformed(ActionEvent event)
2470 protected void jpred_actionPerformed(ActionEvent e)
2474 protected void scaleAbove_actionPerformed(ActionEvent e)
2478 protected void scaleLeft_actionPerformed(ActionEvent e)
2482 protected void scaleRight_actionPerformed(ActionEvent e)
2486 protected void modifyPID_actionPerformed()
2490 protected void modifyConservation_actionPerformed()
2494 protected void saveAs_actionPerformed()
2498 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2502 public void vamsasStore_actionPerformed(ActionEvent e)
2507 public void vamsasLoad_actionPerformed(ActionEvent e)
2512 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2517 public void featureSettings_actionPerformed(ActionEvent e)
2522 public void fetchSequence_actionPerformed()
2527 public void smoothFont_actionPerformed(ActionEvent e)
2532 public void annotationColour_actionPerformed()
2536 public void annotationColumn_actionPerformed(ActionEvent e)
2540 public void associatedData_actionPerformed(ActionEvent e)
2545 public void autoCalculate_actionPerformed(ActionEvent e)
2550 public void sortByTreeOption_actionPerformed(ActionEvent e)
2555 public void showAllSeqs_actionPerformed(ActionEvent e)
2560 public void showAllColumns_actionPerformed(ActionEvent e)
2565 public void hideSelSequences_actionPerformed(ActionEvent e)
2570 public void hideSelColumns_actionPerformed(ActionEvent e)
2575 public void hiddenMarkers_actionPerformed(ActionEvent e)
2580 public void findPdbId_actionPerformed(ActionEvent e)
2585 public void enterPdbId_actionPerformed(ActionEvent e)
2590 public void pdbFile_actionPerformed(ActionEvent e)
2595 public void invertColSel_actionPerformed(ActionEvent e)
2600 public void tabSelectionChanged(int sel)
2605 public void tabbedPane_mousePressed(MouseEvent e)
2610 public void tabbedPane_focusGained(FocusEvent e)
2615 public void save_actionPerformed(ActionEvent e)
2620 public void reload_actionPerformed(ActionEvent e)
2625 public void newView_actionPerformed(ActionEvent e)
2630 public void textColour_actionPerformed()
2635 public void idRightAlign_actionPerformed(ActionEvent e)
2640 public void expandViews_actionPerformed(ActionEvent e)
2645 public void gatherViews_actionPerformed(ActionEvent e)
2650 public void buildTreeSortMenu()
2655 public void pageSetup_actionPerformed(ActionEvent e)
2660 public void alignmentProperties()
2665 protected void expand_newalign(ActionEvent e)
2667 // TODO Auto-generated method stub
2671 protected boolean isShowAutoCalculatedAbove()
2673 return showAutoCalculatedAbove;
2676 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2678 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2681 protected SequenceAnnotationOrder getAnnotationSortOrder()
2683 return annotationSortOrder;
2686 protected void setAnnotationSortOrder(
2687 SequenceAnnotationOrder annotationSortOrder)
2689 this.annotationSortOrder = annotationSortOrder;
2692 public Map<KeyStroke, JMenuItem> getAccelerators()
2694 return this.accelerators;
2698 * Returns the selected index of the tabbed pane, or -1 if none selected
2699 * (including the case where the tabbed pane has not been made visible).
2703 public int getTabIndex()
2705 return tabbedPane.getSelectedIndex();
2708 public JPanel getStatusPanel()
2714 * Sets a reference to the containing split frame. Also makes the 'toggle
2715 * split view' menu item visible and checked.
2719 public void setSplitFrame(SplitContainerI sf)
2721 this.splitFrame = sf;
2724 this.showComplementMenuItem.setVisible(true);
2725 this.showComplementMenuItem.setState(true);
2729 public SplitContainerI getSplitViewContainer()
2731 return this.splitFrame;
2734 protected void showComplement_actionPerformed(boolean complement)