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 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 cut = new JMenuItem();
109 JMenu pasteMenu = new JMenu();
111 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
113 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
115 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
117 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
119 protected JCheckBoxMenuItem applyToAllGroups;
121 protected JMenu colourMenu = new JMenu();
123 protected JMenuItem textColour;
125 protected JCheckBoxMenuItem conservationMenuItem;
127 protected JMenuItem modifyConservation;
129 protected JCheckBoxMenuItem abovePIDThreshold;
131 protected JMenuItem modifyPID;
133 protected JRadioButtonMenuItem annotationColour;
135 protected JMenu sortByTreeMenu = new JMenu();
137 protected JMenu sort = new JMenu();
139 protected JMenuItem calculateTree = new JMenuItem();
141 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
143 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
145 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
147 protected JMenu showTranslation = new JMenu();
149 protected JMenuItem showReverse = new JMenuItem();
151 protected JMenuItem showReverseComplement = new JMenuItem();
153 protected JMenu showProducts = new JMenu();
155 protected JMenuItem runGroovy = new JMenuItem();
157 protected JMenuItem loadVcf;
159 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
161 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
163 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
165 protected JPanel statusPanel = new JPanel();
167 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
169 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
171 protected JMenuItem showAllAlAnnotations = new JMenuItem();
173 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
175 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
177 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
179 protected JTabbedPane tabbedPane = new JTabbedPane();
181 protected JMenuItem reload = new JMenuItem();
183 protected JMenu formatMenu = new JMenu();
185 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
187 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
189 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
191 protected JMenuItem gatherViews = new JMenuItem();
193 protected JMenuItem expandViews = new JMenuItem();
195 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
197 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
201 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
207 protected JMenuItem openFeatureSettings;
209 private SequenceAnnotationOrder annotationSortOrder;
211 private boolean showAutoCalculatedAbove = false;
213 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
215 private SplitContainerI splitFrame;
222 // for Web-page embedding using id=align-frame-div
223 setName("jalview-alignment");
226 setJMenuBar(alignFrameMenuBar);
228 // dynamically fill save as menu with available formats
229 for (String ff : FileFormats.getInstance().getWritableFormats(true))
231 JMenuItem item = new JMenuItem(ff);
233 item.addActionListener(new ActionListener()
236 public void actionPerformed(ActionEvent e)
238 outputText_actionPerformed(e.getActionCommand());
242 outputTextboxMenu.add(item);
244 } catch (Exception e)
246 System.err.println(e.toString());
249 if (Platform.allowMnemonics()) // was "not mac and not JS"
251 closeMenuItem.setMnemonic('C');
252 outputTextboxMenu.setMnemonic('T');
253 undoMenuItem.setMnemonic('Z');
254 redoMenuItem.setMnemonic('0');
255 copy.setMnemonic('C');
256 cut.setMnemonic('U');
257 pasteMenu.setMnemonic('P');
258 reload.setMnemonic('R');
262 private void jbInit() throws Exception
266 JMenuItem saveAs = new JMenuItem(
267 MessageManager.getString("action.save_as"));
268 ActionListener al = new ActionListener()
271 public void actionPerformed(ActionEvent e)
273 saveAs_actionPerformed();
277 // FIXME getDefaultToolkit throws an exception in Headless mode
278 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
279 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
280 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
282 addMenuActionAndAccelerator(keyStroke, saveAs, al);
284 closeMenuItem.setText(MessageManager.getString("action.close"));
285 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
286 jalview.util.ShortcutKeyMaskExWrapper
287 .getMenuShortcutKeyMaskEx(),
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
312 .getMenuShortcutKeyMaskEx(),
314 al = new ActionListener()
317 public void actionPerformed(ActionEvent e)
319 selectAllSequenceMenuItem_actionPerformed(e);
322 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
324 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
325 MessageManager.getString("action.deselect_all"));
326 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
327 al = new ActionListener()
330 public void actionPerformed(ActionEvent e)
332 deselectAllSequenceMenuItem_actionPerformed(e);
335 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
337 JMenuItem invertSequenceMenuItem = new JMenuItem(
338 MessageManager.getString("action.invert_sequence_selection"));
339 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
340 jalview.util.ShortcutKeyMaskExWrapper
341 .getMenuShortcutKeyMaskEx(),
343 al = new ActionListener()
346 public void actionPerformed(ActionEvent e)
348 invertSequenceMenuItem_actionPerformed(e);
351 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
353 JMenuItem grpsFromSelection = new JMenuItem(
354 MessageManager.getString("action.make_groups_selection"));
355 grpsFromSelection.addActionListener(new ActionListener()
358 public void actionPerformed(ActionEvent e)
360 makeGrpsFromSelection_actionPerformed(e);
363 JMenuItem expandAlignment = new JMenuItem(
364 MessageManager.getString("action.view_flanking_regions"));
365 expandAlignment.setToolTipText(
366 MessageManager.getString("label.view_flanking_regions"));
367 expandAlignment.addActionListener(new ActionListener()
370 public void actionPerformed(ActionEvent e)
375 JMenuItem remove2LeftMenuItem = new JMenuItem(
376 MessageManager.getString("action.remove_left"));
377 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
378 jalview.util.ShortcutKeyMaskExWrapper
379 .getMenuShortcutKeyMaskEx(),
381 al = new ActionListener()
384 public void actionPerformed(ActionEvent e)
386 remove2LeftMenuItem_actionPerformed(e);
389 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
391 JMenuItem remove2RightMenuItem = new JMenuItem(
392 MessageManager.getString("action.remove_right"));
393 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
394 jalview.util.ShortcutKeyMaskExWrapper
395 .getMenuShortcutKeyMaskEx(),
397 al = new ActionListener()
400 public void actionPerformed(ActionEvent e)
402 remove2RightMenuItem_actionPerformed(e);
405 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
407 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
408 MessageManager.getString("action.remove_empty_columns"));
409 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
410 jalview.util.ShortcutKeyMaskExWrapper
411 .getMenuShortcutKeyMaskEx(),
413 al = new ActionListener()
416 public void actionPerformed(ActionEvent e)
418 removeGappedColumnMenuItem_actionPerformed(e);
421 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
423 JMenuItem removeAllGapsMenuItem = new JMenuItem(
424 MessageManager.getString("action.remove_all_gaps"));
425 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
426 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
427 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
429 al = new ActionListener()
432 public void actionPerformed(ActionEvent e)
434 removeAllGapsMenuItem_actionPerformed(e);
437 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
439 JMenuItem justifyLeftMenuItem = new JMenuItem(
440 MessageManager.getString("action.left_justify_alignment"));
441 justifyLeftMenuItem.addActionListener(new ActionListener()
444 public void actionPerformed(ActionEvent e)
446 justifyLeftMenuItem_actionPerformed(e);
449 JMenuItem justifyRightMenuItem = new JMenuItem(
450 MessageManager.getString("action.right_justify_alignment"));
451 justifyRightMenuItem.addActionListener(new ActionListener()
454 public void actionPerformed(ActionEvent e)
456 justifyRightMenuItem_actionPerformed(e);
459 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
460 viewBoxesMenuItem.setState(true);
461 viewBoxesMenuItem.addActionListener(new ActionListener()
464 public void actionPerformed(ActionEvent e)
466 viewBoxesMenuItem_actionPerformed(e);
469 viewTextMenuItem.setText(MessageManager.getString("action.text"));
470 viewTextMenuItem.setState(true);
471 viewTextMenuItem.addActionListener(new ActionListener()
474 public void actionPerformed(ActionEvent e)
476 viewTextMenuItem_actionPerformed(e);
479 showNonconservedMenuItem
480 .setText(MessageManager.getString("label.show_non_conserved"));
481 showNonconservedMenuItem.setState(false);
482 showNonconservedMenuItem.addActionListener(new ActionListener()
485 public void actionPerformed(ActionEvent e)
487 showUnconservedMenuItem_actionPerformed(e);
490 JMenuItem sortPairwiseMenuItem = new JMenuItem(
491 MessageManager.getString("action.by_pairwise_id"));
492 sortPairwiseMenuItem.addActionListener(new ActionListener()
495 public void actionPerformed(ActionEvent e)
497 sortPairwiseMenuItem_actionPerformed(e);
500 JMenuItem sortIDMenuItem = new JMenuItem(
501 MessageManager.getString("action.by_id"));
502 sortIDMenuItem.addActionListener(new ActionListener()
505 public void actionPerformed(ActionEvent e)
507 sortIDMenuItem_actionPerformed(e);
510 JMenuItem sortLengthMenuItem = new JMenuItem(
511 MessageManager.getString("action.by_length"));
512 sortLengthMenuItem.addActionListener(new ActionListener()
515 public void actionPerformed(ActionEvent e)
517 sortLengthMenuItem_actionPerformed(e);
520 JMenuItem sortGroupMenuItem = new JMenuItem(
521 MessageManager.getString("action.by_group"));
522 sortGroupMenuItem.addActionListener(new ActionListener()
525 public void actionPerformed(ActionEvent e)
527 sortGroupMenuItem_actionPerformed(e);
531 JMenuItem removeRedundancyMenuItem = new JMenuItem(
532 MessageManager.getString("action.remove_redundancy"));
533 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
534 jalview.util.ShortcutKeyMaskExWrapper
535 .getMenuShortcutKeyMaskEx(),
537 al = new ActionListener()
540 public void actionPerformed(ActionEvent e)
542 removeRedundancyMenuItem_actionPerformed(e);
545 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
547 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
548 MessageManager.getString("action.pairwise_alignment"));
549 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
552 public void actionPerformed(ActionEvent e)
554 pairwiseAlignmentMenuItem_actionPerformed(e);
558 this.getContentPane().setLayout(new BorderLayout());
559 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
560 statusBar.setBackground(Color.white);
561 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
562 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
563 statusBar.setText(MessageManager.getString("label.status_bar"));
565 .setText(MessageManager.getString("label.out_to_textbox"));
567 annotationPanelMenuItem.setActionCommand("");
568 annotationPanelMenuItem
569 .setText(MessageManager.getString("label.show_annotations"));
570 annotationPanelMenuItem
571 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
572 annotationPanelMenuItem.addActionListener(new ActionListener()
575 public void actionPerformed(ActionEvent e)
577 annotationPanelMenuItem_actionPerformed(e);
580 showAllAlAnnotations.setText(
581 MessageManager.getString("label.show_all_al_annotations"));
582 final boolean isAnnotationPanelShown = annotationPanelMenuItem
584 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
585 showAllAlAnnotations.addActionListener(new ActionListener()
588 public void actionPerformed(ActionEvent e)
590 showAllAnnotations_actionPerformed(false, true);
593 hideAllAlAnnotations.setText(
594 MessageManager.getString("label.hide_all_al_annotations"));
595 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
596 hideAllAlAnnotations.addActionListener(new ActionListener()
599 public void actionPerformed(ActionEvent e)
601 hideAllAnnotations_actionPerformed(false, true);
604 showAllSeqAnnotations.setText(
605 MessageManager.getString("label.show_all_seq_annotations"));
606 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
607 showAllSeqAnnotations.addActionListener(new ActionListener()
610 public void actionPerformed(ActionEvent e)
612 showAllAnnotations_actionPerformed(true, false);
615 hideAllSeqAnnotations.setText(
616 MessageManager.getString("label.hide_all_seq_annotations"));
617 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
618 hideAllSeqAnnotations.addActionListener(new ActionListener()
621 public void actionPerformed(ActionEvent e)
623 hideAllAnnotations_actionPerformed(true, false);
626 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
627 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
628 SequenceAnnotationOrder.NONE.name()));
629 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
630 MessageManager.getString("label.sort_annotations_by_sequence"));
631 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
632 MessageManager.getString("label.sort_annotations_by_label"));
634 sortAnnBySequence.setSelected(
635 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
636 sortAnnBySequence.addActionListener(new ActionListener()
639 public void actionPerformed(ActionEvent e)
641 boolean newState = sortAnnBySequence.getState();
642 sortAnnByLabel.setSelected(false);
643 setAnnotationSortOrder(
644 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
645 : SequenceAnnotationOrder.NONE);
646 sortAnnotations_actionPerformed();
649 sortAnnByLabel.setSelected(
650 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
651 sortAnnByLabel.addActionListener(new ActionListener()
654 public void actionPerformed(ActionEvent e)
656 boolean newState = sortAnnByLabel.getState();
657 sortAnnBySequence.setSelected(false);
658 setAnnotationSortOrder(
659 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
660 : SequenceAnnotationOrder.NONE);
661 sortAnnotations_actionPerformed();
664 colourTextMenuItem = new JCheckBoxMenuItem(
665 MessageManager.getString("label.colour_text"));
666 colourTextMenuItem.addActionListener(new ActionListener()
669 public void actionPerformed(ActionEvent e)
671 colourTextMenuItem_actionPerformed(e);
675 JMenuItem htmlMenuItem = new JMenuItem(
676 MessageManager.getString("label.html"));
677 htmlMenuItem.addActionListener(new ActionListener()
680 public void actionPerformed(ActionEvent e)
682 htmlMenuItem_actionPerformed(e);
686 JMenuItem createBioJS = new JMenuItem(
687 MessageManager.getString("label.biojs_html_export"));
688 createBioJS.addActionListener(new java.awt.event.ActionListener()
691 public void actionPerformed(ActionEvent e)
693 bioJSMenuItem_actionPerformed(e);
697 JMenuItem overviewMenuItem = new JMenuItem(
698 MessageManager.getString("label.overview_window"));
699 overviewMenuItem.addActionListener(new ActionListener()
702 public void actionPerformed(ActionEvent e)
704 overviewMenuItem_actionPerformed(e);
708 undoMenuItem.setEnabled(false);
709 undoMenuItem.setText(MessageManager.getString("action.undo"));
710 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
711 jalview.util.ShortcutKeyMaskExWrapper
712 .getMenuShortcutKeyMaskEx(),
714 al = new ActionListener()
717 public void actionPerformed(ActionEvent e)
719 undoMenuItem_actionPerformed(e);
722 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
724 redoMenuItem.setEnabled(false);
725 redoMenuItem.setText(MessageManager.getString("action.redo"));
726 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
727 jalview.util.ShortcutKeyMaskExWrapper
728 .getMenuShortcutKeyMaskEx(),
730 al = new ActionListener()
733 public void actionPerformed(ActionEvent e)
735 redoMenuItem_actionPerformed(e);
738 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
740 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
741 wrapMenuItem.addActionListener(new ActionListener()
744 public void actionPerformed(ActionEvent e)
746 wrapMenuItem_actionPerformed(e);
750 JMenuItem printMenuItem = new JMenuItem(
751 MessageManager.getString("action.print"));
752 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
753 jalview.util.ShortcutKeyMaskExWrapper
754 .getMenuShortcutKeyMaskEx(),
756 al = new ActionListener()
759 public void actionPerformed(ActionEvent e)
761 printMenuItem_actionPerformed(e);
764 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
767 .setText(MessageManager.getString("action.show_gaps"));
768 renderGapsMenuItem.setState(true);
769 renderGapsMenuItem.addActionListener(new ActionListener()
772 public void actionPerformed(ActionEvent e)
774 renderGapsMenuItem_actionPerformed(e);
778 JMenuItem findMenuItem = new JMenuItem(
779 MessageManager.getString("action.find"));
780 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
781 jalview.util.ShortcutKeyMaskExWrapper
782 .getMenuShortcutKeyMaskEx(),
784 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
785 MessageManager.getString("label.find_tip")));
786 al = new ActionListener()
789 public void actionPerformed(ActionEvent e)
791 findMenuItem_actionPerformed(e);
794 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
796 showSeqFeatures.setText(
797 MessageManager.getString("label.show_sequence_features"));
798 showSeqFeatures.addActionListener(new ActionListener()
801 public void actionPerformed(ActionEvent actionEvent)
803 showSeqFeatures_actionPerformed(actionEvent);
807 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
808 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
809 * void actionPerformed(ActionEvent actionEvent) {
810 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
813 .setText(MessageManager.getString("label.show_database_refs"));
814 showDbRefsMenuitem.addActionListener(new ActionListener()
818 public void actionPerformed(ActionEvent e)
820 showDbRefs_actionPerformed(e);
824 showNpFeatsMenuitem.setText(
825 MessageManager.getString("label.show_non_positional_features"));
826 showNpFeatsMenuitem.addActionListener(new ActionListener()
830 public void actionPerformed(ActionEvent e)
832 showNpFeats_actionPerformed(e);
836 showGroupConservation
837 .setText(MessageManager.getString("label.group_conservation"));
838 showGroupConservation.addActionListener(new ActionListener()
842 public void actionPerformed(ActionEvent e)
844 showGroupConservation_actionPerformed(e);
850 .setText(MessageManager.getString("label.group_consensus"));
851 showGroupConsensus.addActionListener(new ActionListener()
855 public void actionPerformed(ActionEvent e)
857 showGroupConsensus_actionPerformed(e);
861 showConsensusHistogram.setText(
862 MessageManager.getString("label.show_consensus_histogram"));
863 showConsensusHistogram.addActionListener(new ActionListener()
867 public void actionPerformed(ActionEvent e)
869 showConsensusHistogram_actionPerformed(e);
874 .setText(MessageManager.getString("label.show_consensus_logo"));
875 showSequenceLogo.addActionListener(new ActionListener()
879 public void actionPerformed(ActionEvent e)
881 showSequenceLogo_actionPerformed(e);
885 normaliseSequenceLogo
886 .setText(MessageManager.getString("label.norm_consensus_logo"));
887 normaliseSequenceLogo.addActionListener(new ActionListener()
891 public void actionPerformed(ActionEvent e)
893 normaliseSequenceLogo_actionPerformed(e);
897 applyAutoAnnotationSettings
898 .setText(MessageManager.getString("label.apply_all_groups"));
899 applyAutoAnnotationSettings.setState(false);
900 applyAutoAnnotationSettings.setVisible(true);
901 applyAutoAnnotationSettings.addActionListener(new ActionListener()
904 public void actionPerformed(ActionEvent e)
906 applyAutoAnnotationSettings_actionPerformed(e);
910 ButtonGroup buttonGroup = new ButtonGroup();
911 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
912 MessageManager.getString("label.show_first"));
913 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
914 MessageManager.getString("label.show_last"));
915 buttonGroup.add(showAutoFirst);
916 buttonGroup.add(showAutoLast);
917 final boolean autoFirst = Cache
918 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
919 showAutoFirst.setSelected(autoFirst);
920 setShowAutoCalculatedAbove(autoFirst);
921 showAutoFirst.addActionListener(new ActionListener()
924 public void actionPerformed(ActionEvent e)
926 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
927 sortAnnotations_actionPerformed();
930 showAutoLast.setSelected(!showAutoFirst.isSelected());
931 showAutoLast.addActionListener(new ActionListener()
934 public void actionPerformed(ActionEvent e)
936 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
937 sortAnnotations_actionPerformed();
941 JMenuItem deleteGroups = new JMenuItem(
942 MessageManager.getString("action.undefine_groups"));
943 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
944 jalview.util.ShortcutKeyMaskExWrapper
945 .getMenuShortcutKeyMaskEx(),
947 al = new ActionListener()
950 public void actionPerformed(ActionEvent e)
952 deleteGroups_actionPerformed(e);
955 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
957 JMenuItem annotationColumn = new JMenuItem(
958 MessageManager.getString("action.select_by_annotation"));
959 annotationColumn.addActionListener(new ActionListener()
962 public void actionPerformed(ActionEvent e)
964 annotationColumn_actionPerformed(e);
968 JMenuItem createGroup = new JMenuItem(
969 MessageManager.getString("action.create_group"));
970 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
971 jalview.util.ShortcutKeyMaskExWrapper
972 .getMenuShortcutKeyMaskEx(),
974 al = new ActionListener()
977 public void actionPerformed(ActionEvent e)
979 createGroup_actionPerformed(e);
982 addMenuActionAndAccelerator(keyStroke, createGroup, al);
984 JMenuItem unGroup = new JMenuItem(
985 MessageManager.getString("action.remove_group"));
986 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
987 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
988 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
990 al = new ActionListener()
993 public void actionPerformed(ActionEvent e)
995 unGroup_actionPerformed(e);
998 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1000 copy.setText(MessageManager.getString("action.copy"));
1001 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1002 jalview.util.ShortcutKeyMaskExWrapper
1003 .getMenuShortcutKeyMaskEx(),
1006 al = new ActionListener()
1009 public void actionPerformed(ActionEvent e)
1011 copy_actionPerformed();
1014 addMenuActionAndAccelerator(keyStroke, copy, al);
1016 cut.setText(MessageManager.getString("action.cut"));
1017 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1018 jalview.util.ShortcutKeyMaskExWrapper
1019 .getMenuShortcutKeyMaskEx(),
1021 al = new ActionListener()
1024 public void actionPerformed(ActionEvent e)
1026 cut_actionPerformed();
1029 addMenuActionAndAccelerator(keyStroke, cut, al);
1031 JMenuItem delete = new JMenuItem(
1032 MessageManager.getString("action.delete"));
1033 delete.addActionListener(new ActionListener()
1036 public void actionPerformed(ActionEvent e)
1038 delete_actionPerformed();
1042 pasteMenu.setText(MessageManager.getString("action.paste"));
1043 JMenuItem pasteNew = new JMenuItem(
1044 MessageManager.getString("label.to_new_alignment"));
1045 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1046 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1047 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1049 al = new ActionListener()
1052 public void actionPerformed(ActionEvent e)
1054 pasteNew_actionPerformed(e);
1057 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1059 JMenuItem pasteThis = new JMenuItem(
1060 MessageManager.getString("label.to_this_alignment"));
1061 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1062 jalview.util.ShortcutKeyMaskExWrapper
1063 .getMenuShortcutKeyMaskEx(),
1065 al = new ActionListener()
1068 public void actionPerformed(ActionEvent e)
1070 pasteThis_actionPerformed(e);
1073 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1075 JMenuItem createPNG = new JMenuItem("PNG");
1076 createPNG.addActionListener(new ActionListener()
1079 public void actionPerformed(ActionEvent e)
1084 createPNG.setActionCommand(
1085 MessageManager.getString("label.save_png_image"));
1087 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1088 font.addActionListener(new ActionListener()
1091 public void actionPerformed(ActionEvent e)
1093 font_actionPerformed(e);
1097 MessageManager.getString("label.show_sequence_limits"));
1098 seqLimits.setState(Cache.getDefault("SHOW_JVSUFFIX", true));
1099 seqLimits.addActionListener(new ActionListener()
1102 public void actionPerformed(ActionEvent e)
1104 seqLimit_actionPerformed(e);
1107 JMenuItem epsFile = new JMenuItem("EPS");
1108 epsFile.addActionListener(new ActionListener()
1111 public void actionPerformed(ActionEvent e)
1117 JMenuItem createSVG = new JMenuItem("SVG");
1118 createSVG.addActionListener(new ActionListener()
1121 public void actionPerformed(ActionEvent e)
1127 JMenuItem loadTreeFile = new JMenuItem(
1128 MessageManager.getString("label.from_file"));
1130 loadTreeFile.addActionListener(new ActionListener()
1133 public void actionPerformed(ActionEvent e)
1135 loadTreeMenuItem_actionPerformed(e);
1139 JMenuItem loadTreeUrl = new JMenuItem(
1140 MessageManager.getString("label.from_url"));
1141 loadTreeUrl.addActionListener(new ActionListener()
1144 public void actionPerformed(ActionEvent e)
1146 loadTreeUrlItem_actionPerformed(e);
1152 JMenuItem loadTreeBaseStudy = new JMenuItem(
1153 MessageManager.getString("treebase study"));
1154 loadTreeBaseStudy.addActionListener(new ActionListener()
1158 public void actionPerformed(ActionEvent e)
1160 loadTreeBaseStudy_actionPerformed(e);
1166 JMenuItem loadTreeBase = new JMenuItem(
1167 MessageManager.getString("treebase"));
1168 loadTreeBase.addActionListener(new ActionListener()
1172 public void actionPerformed(ActionEvent e)
1174 loadTreeBase_actionPerformed(e);
1180 JMenuItem loadTreePfam = new JMenuItem(
1181 MessageManager.getString("pfam"));
1182 loadTreePfam.addActionListener(new ActionListener()
1186 public void actionPerformed(ActionEvent e)
1188 loadTreePfam_actionPerformed(e);
1193 JMenuItem loadTreeFam = new JMenuItem(
1194 MessageManager.getString("treefam"));
1195 loadTreeFam.addActionListener(new ActionListener()
1199 public void actionPerformed(ActionEvent e)
1201 loadTreeFam_actionPerformed(e);
1207 JMenuItem loadTreeOfLife = new JMenuItem(
1208 MessageManager.getString("tree_of_life"));
1209 loadTreeOfLife.addActionListener(new ActionListener()
1213 public void actionPerformed(ActionEvent e)
1215 loadTreeOfLife_actionPerformed(e);
1222 scaleAbove.setVisible(false);
1223 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1224 scaleAbove.addActionListener(new ActionListener()
1227 public void actionPerformed(ActionEvent e)
1229 scaleAbove_actionPerformed(e);
1232 scaleLeft.setVisible(false);
1233 scaleLeft.setSelected(true);
1234 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1235 scaleLeft.addActionListener(new ActionListener()
1238 public void actionPerformed(ActionEvent e)
1240 scaleLeft_actionPerformed(e);
1243 scaleRight.setVisible(false);
1244 scaleRight.setSelected(true);
1245 scaleRight.setText(MessageManager.getString("action.scale_right"));
1246 scaleRight.addActionListener(new ActionListener()
1249 public void actionPerformed(ActionEvent e)
1251 scaleRight_actionPerformed(e);
1254 centreColumnLabelsMenuItem.setVisible(true);
1255 centreColumnLabelsMenuItem.setState(false);
1256 centreColumnLabelsMenuItem.setText(
1257 MessageManager.getString("label.centre_column_labels"));
1258 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1261 public void actionPerformed(ActionEvent e)
1263 centreColumnLabels_actionPerformed(e);
1266 followHighlightMenuItem.setVisible(true);
1267 followHighlightMenuItem.setState(true);
1268 followHighlightMenuItem
1269 .setText(MessageManager.getString("label.automatic_scrolling"));
1270 followHighlightMenuItem.addActionListener(new ActionListener()
1274 public void actionPerformed(ActionEvent e)
1276 followHighlight_actionPerformed();
1282 .setText(MessageManager.getString("action.by_tree_order"));
1283 sort.setText(MessageManager.getString("action.sort"));
1284 sort.addMenuListener(new MenuListener()
1287 public void menuSelected(MenuEvent e)
1289 buildTreeSortMenu();
1293 public void menuDeselected(MenuEvent e)
1298 public void menuCanceled(MenuEvent e)
1303 .setText(MessageManager.getString("label.sort_by_score"));
1304 sort.add(sortByAnnotScore);
1305 sort.addMenuListener(new javax.swing.event.MenuListener()
1309 public void menuCanceled(MenuEvent e)
1314 public void menuDeselected(MenuEvent e)
1319 public void menuSelected(MenuEvent e)
1321 buildSortByAnnotationScoresMenu();
1324 sortByAnnotScore.setVisible(false);
1327 .setText(MessageManager.getString("action.calculate_tree_pca"));
1329 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1330 padGapsMenuitem.setState(Cache.getDefault("PAD_GAPS", false));
1331 padGapsMenuitem.addActionListener(new ActionListener()
1334 public void actionPerformed(ActionEvent e)
1336 padGapsMenuitem_actionPerformed(e);
1339 JMenuItem vamsasStore = new JMenuItem(
1340 MessageManager.getString("label.vamsas_store"));
1341 vamsasStore.setVisible(false);
1342 vamsasStore.addActionListener(new ActionListener()
1345 public void actionPerformed(ActionEvent e)
1347 vamsasStore_actionPerformed(e);
1352 * Translate as cDNA with sub-menu of translation tables
1355 .setText(MessageManager.getString("label.translate_cDNA"));
1356 boolean first = true;
1357 for (final GeneticCodeI table : GeneticCodes.getInstance()
1360 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1361 showTranslation.add(item);
1362 item.addActionListener(new ActionListener()
1365 public void actionPerformed(ActionEvent e)
1367 showTranslation_actionPerformed(table);
1372 showTranslation.addSeparator();
1377 showReverse.setText(MessageManager.getString("label.reverse"));
1378 showReverse.addActionListener(new ActionListener()
1381 public void actionPerformed(ActionEvent e)
1383 showReverse_actionPerformed(false);
1386 showReverseComplement
1387 .setText(MessageManager.getString("label.reverse_complement"));
1388 showReverseComplement.addActionListener(new ActionListener()
1391 public void actionPerformed(ActionEvent e)
1393 showReverse_actionPerformed(true);
1397 JMenuItem extractScores = new JMenuItem(
1398 MessageManager.getString("label.extract_scores"));
1399 extractScores.addActionListener(new ActionListener()
1402 public void actionPerformed(ActionEvent e)
1404 extractScores_actionPerformed(e);
1407 extractScores.setVisible(true);
1408 // JBPNote: TODO: make gui for regex based score extraction
1410 // for show products actions see AlignFrame.canShowProducts
1411 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1413 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1414 runGroovy.setToolTipText(
1415 MessageManager.getString("label.run_groovy_tip"));
1416 runGroovy.addActionListener(new ActionListener()
1419 public void actionPerformed(ActionEvent e)
1421 runGroovy_actionPerformed();
1425 openFeatureSettings = new JMenuItem(
1426 MessageManager.getString("action.feature_settings"));
1427 openFeatureSettings.addActionListener(new ActionListener()
1430 public void actionPerformed(ActionEvent e)
1432 featureSettings_actionPerformed(e);
1437 * add sub-menu of database we can fetch from
1439 JMenuItem fetchSequence = new JMenuItem(
1440 MessageManager.getString("label.fetch_sequences"));
1441 fetchSequence.addActionListener(new ActionListener()
1444 public void actionPerformed(ActionEvent e)
1446 fetchSequence_actionPerformed();
1450 JMenuItem associatedData = new JMenuItem(
1451 MessageManager.getString("label.load_features_annotations"));
1452 associatedData.addActionListener(new ActionListener()
1455 public void actionPerformed(ActionEvent e)
1457 associatedData_actionPerformed(e);
1460 loadVcf = new JMenuItem(
1461 MessageManager.getString("label.load_vcf_file"));
1462 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1463 loadVcf.addActionListener(new ActionListener()
1466 public void actionPerformed(ActionEvent e)
1468 loadVcf_actionPerformed();
1471 autoCalculate.setText(
1472 MessageManager.getString("label.autocalculate_consensus"));
1473 autoCalculate.setState(Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1474 autoCalculate.addActionListener(new ActionListener()
1477 public void actionPerformed(ActionEvent e)
1479 autoCalculate_actionPerformed(e);
1483 MessageManager.getString("label.sort_alignment_new_tree"));
1484 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1485 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1486 sortByTree.setState(Cache.getDefault("SORT_BY_TREE", false));
1487 sortByTree.addActionListener(new ActionListener()
1490 public void actionPerformed(ActionEvent e)
1492 sortByTreeOption_actionPerformed(e);
1496 listenToViewSelections.setText(
1497 MessageManager.getString("label.listen_for_selections"));
1498 listenToViewSelections
1499 .setToolTipText("<html>" + MessageManager.getString(
1500 "label.selections_mirror_selections_made_same_sequences_other_views"));
1501 listenToViewSelections.setState(false);
1502 listenToViewSelections.addActionListener(new ActionListener()
1505 public void actionPerformed(ActionEvent e)
1507 listenToViewSelections_actionPerformed(e);
1511 JMenu addSequenceMenu = new JMenu(
1512 MessageManager.getString("label.add_sequences"));
1513 JMenuItem addFromFile = new JMenuItem(
1514 MessageManager.getString("label.from_file"));
1515 addFromFile.addActionListener(new ActionListener()
1518 public void actionPerformed(ActionEvent e)
1520 addFromFile_actionPerformed(e);
1523 JMenuItem addFromText = new JMenuItem(
1524 MessageManager.getString("label.from_textbox"));
1525 addFromText.addActionListener(new ActionListener()
1528 public void actionPerformed(ActionEvent e)
1530 addFromText_actionPerformed(e);
1533 JMenuItem addFromURL = new JMenuItem(
1534 MessageManager.getString("label.from_url"));
1535 addFromURL.addActionListener(new ActionListener()
1538 public void actionPerformed(ActionEvent e)
1540 addFromURL_actionPerformed(e);
1543 JMenuItem exportFeatures = new JMenuItem(
1544 MessageManager.getString("label.export_features"));
1545 exportFeatures.addActionListener(new ActionListener()
1548 public void actionPerformed(ActionEvent e)
1550 exportFeatures_actionPerformed(e);
1553 JMenuItem exportAnnotations = new JMenuItem(
1554 MessageManager.getString("label.export_annotations"));
1555 exportAnnotations.addActionListener(new ActionListener()
1558 public void actionPerformed(ActionEvent e)
1560 exportAnnotations_actionPerformed(e);
1563 statusPanel.setLayout(new GridLayout());
1564 JMenuItem showAllSeqs = new JMenuItem(
1565 MessageManager.getString("label.all_sequences"));
1566 showAllSeqs.setToolTipText(
1567 MessageManager.getString("label.toggle_sequence_visibility"));
1568 showAllSeqs.addActionListener(new ActionListener()
1571 public void actionPerformed(ActionEvent e)
1573 showAllSeqs_actionPerformed(e);
1576 JMenuItem showAllColumns = new JMenuItem(
1577 MessageManager.getString("label.all_columns"));
1578 showAllColumns.setToolTipText(
1579 MessageManager.getString("label.toggle_columns_visibility"));
1580 showAllColumns.addActionListener(new ActionListener()
1583 public void actionPerformed(ActionEvent e)
1585 showAllColumns_actionPerformed(e);
1588 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1589 JMenuItem hideSelSequences = new JMenuItem(
1590 MessageManager.getString("label.selected_sequences"));
1591 hideSelSequences.setToolTipText(
1592 MessageManager.getString("label.toggle_sequence_visibility"));
1593 hideSelSequences.addActionListener(new ActionListener()
1596 public void actionPerformed(ActionEvent e)
1598 hideSelSequences_actionPerformed(e);
1601 JMenuItem hideSelColumns = new JMenuItem(
1602 MessageManager.getString("label.selected_columns"));
1603 hideSelColumns.setToolTipText(
1604 MessageManager.getString("label.toggle_columns_visibility"));
1605 hideSelColumns.addActionListener(new ActionListener()
1608 public void actionPerformed(ActionEvent e)
1610 hideSelColumns_actionPerformed(e);
1613 JMenuItem hideAllSelection = new JMenuItem(
1614 MessageManager.getString("label.selected_region"));
1615 hideAllSelection.addActionListener(new ActionListener()
1618 public void actionPerformed(ActionEvent e)
1620 hideAllSelection_actionPerformed(e);
1623 // TODO: should be hidden if no selection exists.
1624 JMenuItem hideAllButSelection = new JMenuItem(
1625 MessageManager.getString("label.all_but_selected_region"));
1626 hideAllButSelection.addActionListener(new ActionListener()
1629 public void actionPerformed(ActionEvent e)
1631 hideAllButSelection_actionPerformed(e);
1634 JMenuItem showAllhidden = new JMenuItem(
1635 MessageManager.getString("label.all_sequences_columns"));
1636 showAllhidden.setToolTipText(MessageManager
1637 .getString("label.toggles_visibility_hidden_selected_regions"));
1638 showAllhidden.addActionListener(new ActionListener()
1641 public void actionPerformed(ActionEvent e)
1643 showAllhidden_actionPerformed(e);
1646 hiddenMarkers.setText(
1647 MessageManager.getString("action.show_hidden_markers"));
1648 hiddenMarkers.addActionListener(new ActionListener()
1651 public void actionPerformed(ActionEvent e)
1653 hiddenMarkers_actionPerformed(e);
1657 JMenuItem invertColSel = new JMenuItem(
1658 MessageManager.getString("action.invert_column_selection"));
1659 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1660 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1661 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1663 al = new ActionListener()
1666 public void actionPerformed(ActionEvent e)
1668 invertColSel_actionPerformed(e);
1671 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1673 showComplementMenuItem.setVisible(false);
1674 showComplementMenuItem.addActionListener(new ActionListener()
1677 public void actionPerformed(ActionEvent e)
1679 showComplement_actionPerformed(showComplementMenuItem.getState());
1683 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1686 public void stateChanged(ChangeEvent evt)
1688 JTabbedPane pane = (JTabbedPane) evt.getSource();
1689 int sel = pane.getSelectedIndex();
1690 tabSelectionChanged(sel);
1693 tabbedPane.addMouseListener(new MouseAdapter()
1696 public void mousePressed(MouseEvent e)
1698 if (e.isPopupTrigger()) // Mac
1700 tabbedPane_mousePressed(e);
1705 public void mouseReleased(MouseEvent e)
1707 if (e.isPopupTrigger()) // Windows
1709 tabbedPane_mousePressed(e);
1713 tabbedPane.addFocusListener(new FocusAdapter()
1716 public void focusGained(FocusEvent e)
1718 tabbedPane_focusGained(e);
1722 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1723 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1724 jalview.util.ShortcutKeyMaskExWrapper
1725 .getMenuShortcutKeyMaskEx(),
1727 al = new ActionListener()
1730 public void actionPerformed(ActionEvent e)
1732 save_actionPerformed(e);
1735 addMenuActionAndAccelerator(keyStroke, save, al);
1737 reload.setEnabled(false);
1738 reload.setText(MessageManager.getString("action.reload"));
1739 reload.addActionListener(new ActionListener()
1742 public void actionPerformed(ActionEvent e)
1744 reload_actionPerformed(e);
1748 JMenuItem newView = new JMenuItem(
1749 MessageManager.getString("action.new_view"));
1750 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1751 jalview.util.ShortcutKeyMaskExWrapper
1752 .getMenuShortcutKeyMaskEx(),
1754 al = new ActionListener()
1757 public void actionPerformed(ActionEvent e)
1759 newView_actionPerformed(e);
1762 addMenuActionAndAccelerator(keyStroke, newView, al);
1764 tabbedPane.setToolTipText("<html><i>"
1765 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1768 formatMenu.setText(MessageManager.getString("action.format"));
1769 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1771 idRightAlign.setText(
1772 MessageManager.getString("label.right_align_sequence_id"));
1773 idRightAlign.addActionListener(new ActionListener()
1776 public void actionPerformed(ActionEvent e)
1778 idRightAlign_actionPerformed(e);
1782 gatherViews.setEnabled(false);
1783 gatherViews.setText(MessageManager.getString("action.gather_views"));
1784 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1785 al = new ActionListener()
1788 public void actionPerformed(ActionEvent e)
1790 gatherViews_actionPerformed(e);
1793 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1795 expandViews.setEnabled(false);
1796 expandViews.setText(MessageManager.getString("action.expand_views"));
1797 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1798 al = new ActionListener()
1801 public void actionPerformed(ActionEvent e)
1803 expandViews_actionPerformed(e);
1806 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1808 JMenuItem pageSetup = new JMenuItem(
1809 MessageManager.getString("action.page_setup"));
1810 pageSetup.addActionListener(new ActionListener()
1813 public void actionPerformed(ActionEvent e)
1815 pageSetup_actionPerformed(e);
1818 JMenuItem alignmentProperties = new JMenuItem(
1819 MessageManager.getString("label.alignment_props"));
1820 alignmentProperties.addActionListener(new ActionListener()
1823 public void actionPerformed(ActionEvent actionEvent)
1825 alignmentProperties();
1828 JMenuItem selectHighlighted = new JMenuItem(
1829 MessageManager.getString("action.select_highlighted_columns"));
1830 selectHighlighted.setToolTipText(
1831 MessageManager.getString("tooltip.select_highlighted_columns"));
1832 al = new ActionListener()
1835 public void actionPerformed(ActionEvent actionEvent)
1837 selectHighlightedColumns_actionPerformed(actionEvent);
1840 selectHighlighted.addActionListener(al);
1841 JMenu tooltipSettingsMenu = new JMenu(
1842 MessageManager.getString("label.sequence_id_tooltip"));
1843 JMenu autoAnnMenu = new JMenu(
1844 MessageManager.getString("label.autocalculated_annotation"));
1846 JMenu exportImageMenu = new JMenu(
1847 MessageManager.getString("label.export_image"));
1849 JMenu loadTreeDb = new JMenu(
1850 MessageManager.getString("label.from_database"));
1852 JMenu loadTreeMenu = new JMenu(
1853 MessageManager.getString("label.load_associated_tree"));
1854 // loadTreeMenu.setToolTipText(
1855 // MessageManager.getString("label.load_tree_for_sequence_set"));
1857 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1859 loadTreeDb.add(loadTreeBaseStudy);
1860 loadTreeDb.add(loadTreeBase);
1861 loadTreeDb.add(loadTreePfam);
1862 loadTreeDb.add(loadTreeFam);
1863 loadTreeDb.add(loadTreeOfLife);
1865 loadTreeMenu.add(loadTreeFile);
1866 loadTreeMenu.add(loadTreeUrl);
1867 loadTreeMenu.add(loadTreeDb);
1869 alignFrameMenuBar.add(fileMenu);
1870 alignFrameMenuBar.add(editMenu);
1871 alignFrameMenuBar.add(selectMenu);
1872 alignFrameMenuBar.add(viewMenu);
1873 alignFrameMenuBar.add(annotationsMenu);
1874 alignFrameMenuBar.add(formatMenu);
1875 alignFrameMenuBar.add(colourMenu);
1876 alignFrameMenuBar.add(calculateMenu);
1877 if (!Platform.isJS())
1879 alignFrameMenuBar.add(webService);
1882 fileMenu.add(fetchSequence);
1883 fileMenu.add(addSequenceMenu);
1884 fileMenu.add(reload);
1885 fileMenu.addSeparator();
1886 fileMenu.add(vamsasStore);
1888 fileMenu.add(saveAs);
1889 fileMenu.add(outputTextboxMenu);
1890 fileMenu.add(pageSetup);
1891 fileMenu.add(printMenuItem);
1892 fileMenu.addSeparator();
1893 fileMenu.add(exportImageMenu);
1894 fileMenu.add(exportFeatures);
1895 fileMenu.add(exportAnnotations);
1896 fileMenu.add(loadTreeMenu);
1897 fileMenu.add(associatedData);
1898 if (!Platform.isJS())
1900 fileMenu.add(loadVcf);
1902 fileMenu.addSeparator();
1903 fileMenu.add(closeMenuItem);
1905 pasteMenu.add(pasteNew);
1906 pasteMenu.add(pasteThis);
1907 editMenu.add(undoMenuItem);
1908 editMenu.add(redoMenuItem);
1911 editMenu.add(pasteMenu);
1912 editMenu.add(delete);
1913 editMenu.addSeparator();
1914 editMenu.add(remove2LeftMenuItem);
1915 editMenu.add(remove2RightMenuItem);
1916 editMenu.add(removeGappedColumnMenuItem);
1917 editMenu.add(removeAllGapsMenuItem);
1918 editMenu.add(removeRedundancyMenuItem);
1919 editMenu.addSeparator();
1920 // dont add these yet in the CVS build - they cannot be undone!
1921 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1922 // editMenu.add(justifyLeftMenuItem);
1923 // editMenu.add(justifyRightMenuItem);
1924 // editMenu.addSeparator();
1925 editMenu.add(padGapsMenuitem);
1927 showMenu.add(showAllColumns);
1928 showMenu.add(showAllSeqs);
1929 showMenu.add(showAllhidden);
1930 hideMenu.add(hideSelColumns);
1931 hideMenu.add(hideSelSequences);
1932 hideMenu.add(hideAllSelection);
1933 hideMenu.add(hideAllButSelection);
1934 viewMenu.add(newView);
1935 viewMenu.add(expandViews);
1936 viewMenu.add(gatherViews);
1937 viewMenu.addSeparator();
1938 viewMenu.add(showMenu);
1939 viewMenu.add(hideMenu);
1940 viewMenu.add(showComplementMenuItem);
1941 viewMenu.addSeparator();
1942 viewMenu.add(followHighlightMenuItem);
1943 viewMenu.addSeparator();
1944 viewMenu.add(showSeqFeatures);
1945 // viewMenu.add(showSeqFeaturesHeight);
1946 viewMenu.add(openFeatureSettings);
1947 tooltipSettingsMenu.add(showDbRefsMenuitem);
1948 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1949 viewMenu.add(tooltipSettingsMenu);
1950 viewMenu.addSeparator();
1951 viewMenu.add(alignmentProperties);
1952 viewMenu.addSeparator();
1953 viewMenu.add(overviewMenuItem);
1955 annotationsMenu.add(annotationPanelMenuItem);
1956 annotationsMenu.addSeparator();
1957 annotationsMenu.add(showAllAlAnnotations);
1958 annotationsMenu.add(hideAllAlAnnotations);
1959 annotationsMenu.addSeparator();
1960 annotationsMenu.add(showAllSeqAnnotations);
1961 annotationsMenu.add(hideAllSeqAnnotations);
1962 annotationsMenu.add(sortAnnBySequence);
1963 annotationsMenu.add(sortAnnByLabel);
1964 annotationsMenu.addSeparator();
1965 autoAnnMenu.add(showAutoFirst);
1966 autoAnnMenu.add(showAutoLast);
1967 autoAnnMenu.addSeparator();
1968 autoAnnMenu.add(applyAutoAnnotationSettings);
1969 autoAnnMenu.add(showConsensusHistogram);
1970 autoAnnMenu.add(showSequenceLogo);
1971 autoAnnMenu.add(normaliseSequenceLogo);
1972 autoAnnMenu.addSeparator();
1973 autoAnnMenu.add(showGroupConservation);
1974 autoAnnMenu.add(showGroupConsensus);
1975 annotationsMenu.add(autoAnnMenu);
1977 sort.add(sortIDMenuItem);
1978 sort.add(sortLengthMenuItem);
1979 sort.add(sortGroupMenuItem);
1980 sort.add(sortPairwiseMenuItem);
1981 sort.add(sortByTreeMenu);
1982 calculateMenu.add(sort);
1983 calculateMenu.add(calculateTree);
1984 calculateMenu.addSeparator();
1985 calculateMenu.add(pairwiseAlignmentMenuItem);
1986 calculateMenu.addSeparator();
1987 calculateMenu.add(showTranslation);
1988 calculateMenu.add(showReverse);
1989 calculateMenu.add(showReverseComplement);
1990 calculateMenu.add(showProducts);
1991 calculateMenu.add(autoCalculate);
1992 calculateMenu.add(sortByTree);
1993 calculateMenu.addSeparator();
1994 calculateMenu.add(expandAlignment);
1995 calculateMenu.add(extractScores);
1996 if (!Platform.isJS())
1998 calculateMenu.addSeparator();
1999 calculateMenu.add(runGroovy);
2002 webServiceNoServices = new JMenuItem(
2003 MessageManager.getString("label.no_services"));
2004 webService.add(webServiceNoServices);
2005 if (!Platform.isJS())
2007 exportImageMenu.add(htmlMenuItem);
2009 exportImageMenu.add(epsFile);
2010 exportImageMenu.add(createPNG);
2011 if (!Platform.isJS())
2013 exportImageMenu.add(createBioJS);
2014 exportImageMenu.add(createSVG);
2016 addSequenceMenu.add(addFromFile);
2017 addSequenceMenu.add(addFromText);
2018 addSequenceMenu.add(addFromURL);
2019 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
2020 statusPanel.add(statusBar, null);
2021 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
2023 formatMenu.add(font);
2024 formatMenu.addSeparator();
2025 formatMenu.add(wrapMenuItem);
2026 formatMenu.add(scaleAbove);
2027 formatMenu.add(scaleLeft);
2028 formatMenu.add(scaleRight);
2029 formatMenu.add(seqLimits);
2030 formatMenu.add(idRightAlign);
2031 formatMenu.add(hiddenMarkers);
2032 formatMenu.add(viewBoxesMenuItem);
2033 formatMenu.add(viewTextMenuItem);
2034 formatMenu.add(colourTextMenuItem);
2035 formatMenu.add(renderGapsMenuItem);
2036 formatMenu.add(centreColumnLabelsMenuItem);
2037 formatMenu.add(showNonconservedMenuItem);
2038 selectMenu.add(findMenuItem);
2039 selectMenu.addSeparator();
2040 selectMenu.add(selectAllSequenceMenuItem);
2041 selectMenu.add(deselectAllSequenceMenuItem);
2042 selectMenu.add(invertSequenceMenuItem);
2043 selectMenu.add(invertColSel);
2044 selectMenu.add(createGroup);
2045 selectMenu.add(unGroup);
2046 selectMenu.add(grpsFromSelection);
2047 selectMenu.add(deleteGroups);
2048 selectMenu.add(annotationColumn);
2049 selectMenu.add(selectHighlighted);
2050 // TODO - determine if the listenToViewSelections button is needed : see bug
2052 // selectMenu.addSeparator();
2053 // selectMenu.add(listenToViewSelections);
2058 protected void loadTreeOfLife_actionPerformed(ActionEvent e)
2060 // TODO Auto-generated method stub
2064 protected void loadTreeFam_actionPerformed(ActionEvent e)
2066 // TODO Auto-generated method stub
2070 protected void loadTreePfam_actionPerformed(ActionEvent e)
2072 // TODO Auto-generated method stub
2076 protected void loadTreeBase_actionPerformed(ActionEvent e)
2078 // TODO Auto-generated method stub
2082 protected void loadTreeBaseStudy_actionPerformed(ActionEvent e)
2084 // TODO Auto-generated method stub
2088 protected void loadVcf_actionPerformed()
2093 * Constructs the entries on the Colour menu (but does not add them to the
2096 protected void initColourMenu()
2098 applyToAllGroups = new JCheckBoxMenuItem(
2099 MessageManager.getString("label.apply_colour_to_all_groups"));
2100 applyToAllGroups.addActionListener(new ActionListener()
2103 public void actionPerformed(ActionEvent e)
2105 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
2109 textColour = new JMenuItem(
2110 MessageManager.getString("label.text_colour"));
2111 textColour.addActionListener(new ActionListener()
2114 public void actionPerformed(ActionEvent e)
2116 textColour_actionPerformed();
2120 conservationMenuItem = new JCheckBoxMenuItem(
2121 MessageManager.getString("action.by_conservation"));
2122 conservationMenuItem.addActionListener(new ActionListener()
2125 public void actionPerformed(ActionEvent e)
2127 conservationMenuItem_actionPerformed(
2128 conservationMenuItem.isSelected());
2132 abovePIDThreshold = new JCheckBoxMenuItem(
2133 MessageManager.getString("label.above_identity_threshold"));
2134 abovePIDThreshold.addActionListener(new ActionListener()
2137 public void actionPerformed(ActionEvent e)
2139 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2142 modifyPID = new JMenuItem(
2143 MessageManager.getString("label.modify_identity_threshold"));
2144 modifyPID.addActionListener(new ActionListener()
2147 public void actionPerformed(ActionEvent e)
2149 modifyPID_actionPerformed();
2152 modifyConservation = new JMenuItem(MessageManager
2153 .getString("label.modify_conservation_threshold"));
2154 modifyConservation.addActionListener(new ActionListener()
2157 public void actionPerformed(ActionEvent e)
2159 modifyConservation_actionPerformed();
2163 annotationColour = new JRadioButtonMenuItem(
2164 MessageManager.getString("action.by_annotation"));
2165 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2166 annotationColour.addActionListener(new ActionListener()
2169 public void actionPerformed(ActionEvent e)
2171 annotationColour_actionPerformed();
2176 protected void selectHighlightedColumns_actionPerformed(
2177 ActionEvent actionEvent)
2179 // TODO Auto-generated method stub
2184 * Generate the reverse sequence (or reverse complement if the flag is true)
2185 * and add it to the alignment
2189 protected void showReverse_actionPerformed(boolean complement)
2194 * Try to run script in a Groovy console, having first ensured that this
2195 * alignframe is set as currentAlignFrame in Desktop
2197 protected void runGroovy_actionPerformed()
2203 * Adds the given action listener and key accelerator to the given menu item.
2204 * Also saves in a lookup table to support lookup of action by key stroke.
2208 * @param actionListener
2210 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2211 JMenuItem menuItem, ActionListener actionListener)
2213 menuItem.setAccelerator(keyStroke);
2214 accelerators.put(keyStroke, menuItem);
2215 menuItem.addActionListener(actionListener);
2219 * Action on clicking sort annotations by type.
2223 protected void sortAnnotations_actionPerformed()
2228 * Action on clicking Show all annotations.
2230 * @param forSequences
2231 * update sequence-related annotations
2232 * @param forAlignment
2233 * update non-sequence-related annotations
2235 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2236 boolean forAlignment)
2238 setAnnotationsVisibility(true, forSequences, forAlignment);
2242 * Action on clicking Hide all annotations.
2244 * @param forSequences
2245 * update sequence-related annotations
2246 * @param forAlignment
2247 * update non-sequence-related annotations
2249 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2250 boolean forAlignment)
2252 setAnnotationsVisibility(false, forSequences, forAlignment);
2256 * Set the visibility of annotations to true or false. Can act on
2257 * sequence-related annotations, or alignment-related, or both.
2260 * @param forSequences
2261 * update sequence-related annotations
2262 * @param forAlignment
2263 * update non-sequence-related annotations
2265 protected void setAnnotationsVisibility(boolean visible,
2266 boolean forSequences, boolean forAlignment)
2271 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2273 // TODO Auto-generated method stub
2277 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2279 // TODO Auto-generated method stub
2283 protected void showAllhidden_actionPerformed(ActionEvent e)
2285 // TODO Auto-generated method stub
2289 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2291 // TODO Auto-generated method stub
2295 protected void hideAllSelection_actionPerformed(ActionEvent e)
2297 // TODO Auto-generated method stub
2301 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2303 // TODO Auto-generated method stub
2307 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2309 // TODO Auto-generated method stub
2313 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2315 // TODO Auto-generated method stub
2319 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2321 // TODO Auto-generated method stub
2325 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2327 // TODO Auto-generated method stub
2331 protected void showGroupConservation_actionPerformed(ActionEvent e)
2333 // TODO Auto-generated method stub
2337 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2339 // TODO Auto-generated method stub
2343 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2345 // TODO Auto-generated method stub
2349 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2351 // TODO Auto-generated method stub
2355 protected void followHighlight_actionPerformed()
2357 // TODO Auto-generated method stub
2361 protected void showNpFeats_actionPerformed(ActionEvent e)
2363 // TODO Auto-generated method stub
2367 protected void showDbRefs_actionPerformed(ActionEvent e)
2369 // TODO Auto-generated method stub
2373 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2377 protected void buildSortByAnnotationScoresMenu()
2381 protected void extractScores_actionPerformed(ActionEvent e)
2385 protected void outputText_actionPerformed(String formatName)
2389 public void addFromFile_actionPerformed(ActionEvent e)
2394 public void addFromText_actionPerformed(ActionEvent e)
2399 public void addFromURL_actionPerformed(ActionEvent e)
2404 public void exportFeatures_actionPerformed(ActionEvent e)
2409 public void exportAnnotations_actionPerformed(ActionEvent e)
2414 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2418 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2423 protected void closeMenuItem_actionPerformed(boolean b)
2427 protected void redoMenuItem_actionPerformed(ActionEvent e)
2431 protected void undoMenuItem_actionPerformed(ActionEvent e)
2435 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2439 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2443 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2447 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2451 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2455 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2459 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2463 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2467 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2471 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2475 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2479 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2483 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2487 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2491 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2495 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2499 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2503 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2507 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2511 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2515 protected void conservationMenuItem_actionPerformed(boolean selected)
2519 protected void printMenuItem_actionPerformed(ActionEvent e)
2523 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2527 protected void findMenuItem_actionPerformed(ActionEvent e)
2531 protected void abovePIDThreshold_actionPerformed(boolean selected)
2535 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2539 protected void deleteGroups_actionPerformed(ActionEvent e)
2543 protected void createGroup_actionPerformed(ActionEvent e)
2547 protected void unGroup_actionPerformed(ActionEvent e)
2551 protected void copy_actionPerformed()
2555 protected void cut_actionPerformed()
2559 protected void delete_actionPerformed()
2563 protected void pasteNew_actionPerformed(ActionEvent e)
2567 protected void pasteThis_actionPerformed(ActionEvent e)
2571 protected void applyToAllGroups_actionPerformed(boolean selected)
2575 public void createPNG(java.io.File f)
2579 protected void font_actionPerformed(ActionEvent e)
2583 protected void seqLimit_actionPerformed(ActionEvent e)
2587 public void seqDBRef_actionPerformed(ActionEvent e)
2592 public void createEPS(java.io.File f)
2596 public void createSVG(java.io.File f)
2601 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2606 protected void loadTreeUrlItem_actionPerformed(ActionEvent e)
2614 * Template method to handle the 'load T-Coffee scores' menu event.
2616 * Subclasses override this method to provide a custom action.
2621 protected void loadScores_actionPerformed(ActionEvent event)
2626 protected void jpred_actionPerformed(ActionEvent e)
2630 protected void scaleAbove_actionPerformed(ActionEvent e)
2634 protected void scaleLeft_actionPerformed(ActionEvent e)
2638 protected void scaleRight_actionPerformed(ActionEvent e)
2642 protected void modifyPID_actionPerformed()
2646 protected void modifyConservation_actionPerformed()
2650 protected void saveAs_actionPerformed()
2654 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2658 public void vamsasStore_actionPerformed(ActionEvent e)
2663 public void vamsasLoad_actionPerformed(ActionEvent e)
2668 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2673 public void featureSettings_actionPerformed(ActionEvent e)
2678 public void fetchSequence_actionPerformed()
2683 public void smoothFont_actionPerformed(ActionEvent e)
2688 public void annotationColour_actionPerformed()
2692 public void annotationColumn_actionPerformed(ActionEvent e)
2696 public void associatedData_actionPerformed(ActionEvent e)
2701 public void autoCalculate_actionPerformed(ActionEvent e)
2706 public void sortByTreeOption_actionPerformed(ActionEvent e)
2711 public void showAllSeqs_actionPerformed(ActionEvent e)
2716 public void showAllColumns_actionPerformed(ActionEvent e)
2721 public void hideSelSequences_actionPerformed(ActionEvent e)
2726 public void hideSelColumns_actionPerformed(ActionEvent e)
2731 public void hiddenMarkers_actionPerformed(ActionEvent e)
2736 public void findPdbId_actionPerformed(ActionEvent e)
2741 public void enterPdbId_actionPerformed(ActionEvent e)
2746 public void pdbFile_actionPerformed(ActionEvent e)
2751 public void invertColSel_actionPerformed(ActionEvent e)
2756 public void tabSelectionChanged(int sel)
2761 public void tabbedPane_mousePressed(MouseEvent e)
2766 public void tabbedPane_focusGained(FocusEvent e)
2771 public void save_actionPerformed(ActionEvent e)
2776 public void reload_actionPerformed(ActionEvent e)
2781 public void newView_actionPerformed(ActionEvent e)
2786 public void textColour_actionPerformed()
2791 public void idRightAlign_actionPerformed(ActionEvent e)
2796 public void expandViews_actionPerformed(ActionEvent e)
2801 public void gatherViews_actionPerformed(ActionEvent e)
2806 public void buildTreeSortMenu()
2811 public void pageSetup_actionPerformed(ActionEvent e)
2816 public void alignmentProperties()
2821 protected void expand_newalign(ActionEvent e)
2823 // TODO Auto-generated method stub
2827 protected boolean isShowAutoCalculatedAbove()
2829 return showAutoCalculatedAbove;
2832 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2834 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2837 protected SequenceAnnotationOrder getAnnotationSortOrder()
2839 return annotationSortOrder;
2842 protected void setAnnotationSortOrder(
2843 SequenceAnnotationOrder annotationSortOrder)
2845 this.annotationSortOrder = annotationSortOrder;
2848 public Map<KeyStroke, JMenuItem> getAccelerators()
2850 return this.accelerators;
2854 * Returns the selected index of the tabbed pane, or -1 if none selected
2855 * (including the case where the tabbed pane has not been made visible).
2859 public int getTabIndex()
2861 return tabbedPane.getSelectedIndex();
2864 public JPanel getStatusPanel()
2870 * Sets a reference to the containing split frame. Also makes the 'toggle
2871 * split view' menu item visible and checked.
2875 public void setSplitFrame(SplitContainerI sf)
2877 this.splitFrame = sf;
2880 this.showComplementMenuItem.setVisible(true);
2881 this.showComplementMenuItem.setState(true);
2885 public SplitContainerI getSplitViewContainer()
2887 return this.splitFrame;
2890 protected void showComplement_actionPerformed(boolean complement)