2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import java.awt.BorderLayout;
24 import java.awt.Color;
25 import java.awt.GridLayout;
26 import java.awt.event.ActionEvent;
27 import java.awt.event.ActionListener;
28 import java.awt.event.FocusAdapter;
29 import java.awt.event.FocusEvent;
30 import java.awt.event.KeyEvent;
31 import java.awt.event.MouseAdapter;
32 import java.awt.event.MouseEvent;
33 import java.util.HashMap;
36 import javax.swing.BorderFactory;
37 import javax.swing.ButtonGroup;
38 import javax.swing.JCheckBoxMenuItem;
39 import javax.swing.JInternalFrame;
40 import javax.swing.JLabel;
41 import javax.swing.JMenu;
42 import javax.swing.JMenuBar;
43 import javax.swing.JMenuItem;
44 import javax.swing.JPanel;
45 import javax.swing.JRadioButtonMenuItem;
46 import javax.swing.JTabbedPane;
47 import javax.swing.KeyStroke;
48 import javax.swing.event.ChangeEvent;
49 import javax.swing.event.MenuEvent;
50 import javax.swing.event.MenuListener;
52 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
53 import jalview.analysis.GeneticCodeI;
54 import jalview.analysis.GeneticCodes;
55 import jalview.api.SplitContainerI;
56 import jalview.bin.Cache;
57 import jalview.gui.JvSwingUtils;
58 import jalview.gui.Preferences;
59 import jalview.io.FileFormats;
60 import jalview.schemes.ResidueColourScheme;
61 import jalview.util.MessageManager;
62 import jalview.util.Platform;
64 @SuppressWarnings("serial")
65 public class GAlignFrame extends JInternalFrame
67 protected JMenuBar alignFrameMenuBar = new JMenuBar();
69 protected JMenuItem closeMenuItem = new JMenuItem();
71 public JMenu webService = new JMenu();// BH 2019 was protected, but not
72 // sufficient for AlignFrame thread run
74 public JMenuItem webServiceNoServices;// BH 2019 was protected, but not
75 // sufficient for AlignFrame thread run
77 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
79 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
81 protected JMenu sortByAnnotScore = new JMenu();
83 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
85 // AlignFrame.printWriter
87 protected JMenu outputTextboxMenu = new JMenu();
89 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
91 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
93 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
95 protected JMenuItem undoMenuItem = new JMenuItem();
97 protected JMenuItem redoMenuItem = new JMenuItem();
99 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
101 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
103 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
105 JMenuItem copy = new JMenuItem();
107 JMenuItem copyHighlighted = new JMenuItem();
109 JMenuItem cut = new JMenuItem();
111 JMenu pasteMenu = new JMenu();
113 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
115 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
117 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
119 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
121 protected JCheckBoxMenuItem applyToAllGroups;
123 protected JMenu colourMenu = new JMenu();
125 protected JMenuItem textColour;
127 protected JCheckBoxMenuItem conservationMenuItem;
129 protected JMenuItem modifyConservation;
131 protected JCheckBoxMenuItem abovePIDThreshold;
133 protected JMenuItem modifyPID;
135 protected JRadioButtonMenuItem annotationColour;
137 protected JMenu sortByTreeMenu = new JMenu();
139 protected JMenu sort = new JMenu();
141 protected JMenuItem calculateTree = new JMenuItem();
143 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
145 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
147 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
149 protected JMenu showTranslation = new JMenu();
151 protected JMenuItem showReverse = new JMenuItem();
153 protected JMenuItem showReverseComplement = new JMenuItem();
155 protected JMenu showProducts = new JMenu();
157 protected JMenuItem runGroovy = new JMenuItem();
159 protected JMenuItem loadVcf;
161 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
163 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
165 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
167 protected JPanel statusPanel = new JPanel();
169 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
171 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
173 protected JMenuItem showAllAlAnnotations = new JMenuItem();
175 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
177 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
179 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
181 protected JTabbedPane tabbedPane = new JTabbedPane();
183 protected JMenuItem reload = new JMenuItem();
185 protected JMenu formatMenu = new JMenu();
187 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
189 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
191 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
193 protected JMenuItem gatherViews = new JMenuItem();
195 protected JMenuItem expandViews = new JMenuItem();
197 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
201 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
207 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
209 protected JMenuItem openFeatureSettings;
211 private SequenceAnnotationOrder annotationSortOrder;
213 private boolean showAutoCalculatedAbove = false;
215 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
217 private SplitContainerI splitFrame;
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
269 JMenuItem saveAs = new JMenuItem(
270 MessageManager.getString("action.save_as"));
271 ActionListener al = new ActionListener()
274 public void actionPerformed(ActionEvent e)
276 saveAs_actionPerformed();
280 // FIXME getDefaultToolkit throws an exception in Headless mode
281 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
282 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
283 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
285 addMenuActionAndAccelerator(keyStroke, saveAs, al);
287 closeMenuItem.setText(MessageManager.getString("action.close"));
288 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
289 jalview.util.ShortcutKeyMaskExWrapper
290 .getMenuShortcutKeyMaskEx(),
292 al = new ActionListener()
295 public void actionPerformed(ActionEvent e)
297 closeMenuItem_actionPerformed(false);
300 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
302 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
303 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
304 JMenu annotationsMenu = new JMenu(
305 MessageManager.getString("action.annotations"));
306 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
307 colourMenu.setText(MessageManager.getString("action.colour"));
308 JMenu calculateMenu = new JMenu(
309 MessageManager.getString("action.calculate"));
310 webService.setText(MessageManager.getString("action.web_service"));
311 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
312 MessageManager.getString("action.select_all"));
313 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
314 jalview.util.ShortcutKeyMaskExWrapper
315 .getMenuShortcutKeyMaskEx(),
317 al = new ActionListener()
320 public void actionPerformed(ActionEvent e)
322 selectAllSequenceMenuItem_actionPerformed(e);
325 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
327 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
328 MessageManager.getString("action.deselect_all"));
329 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
330 al = new ActionListener()
333 public void actionPerformed(ActionEvent e)
335 deselectAllSequenceMenuItem_actionPerformed(e);
338 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
340 JMenuItem invertSequenceMenuItem = new JMenuItem(
341 MessageManager.getString("action.invert_sequence_selection"));
342 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
343 jalview.util.ShortcutKeyMaskExWrapper
344 .getMenuShortcutKeyMaskEx(),
346 al = new ActionListener()
349 public void actionPerformed(ActionEvent e)
351 invertSequenceMenuItem_actionPerformed(e);
354 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
356 JMenuItem grpsFromSelection = new JMenuItem(
357 MessageManager.getString("action.make_groups_selection"));
358 grpsFromSelection.addActionListener(new ActionListener()
361 public void actionPerformed(ActionEvent e)
363 makeGrpsFromSelection_actionPerformed(e);
366 JMenuItem expandAlignment = new JMenuItem(
367 MessageManager.getString("action.view_flanking_regions"));
368 expandAlignment.setToolTipText(
369 MessageManager.getString("label.view_flanking_regions"));
370 expandAlignment.addActionListener(new ActionListener()
373 public void actionPerformed(ActionEvent e)
378 JMenuItem remove2LeftMenuItem = new JMenuItem(
379 MessageManager.getString("action.remove_left"));
380 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
381 jalview.util.ShortcutKeyMaskExWrapper
382 .getMenuShortcutKeyMaskEx(),
384 al = new ActionListener()
387 public void actionPerformed(ActionEvent e)
389 remove2LeftMenuItem_actionPerformed(e);
392 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
394 JMenuItem remove2RightMenuItem = new JMenuItem(
395 MessageManager.getString("action.remove_right"));
396 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
397 jalview.util.ShortcutKeyMaskExWrapper
398 .getMenuShortcutKeyMaskEx(),
400 al = new ActionListener()
403 public void actionPerformed(ActionEvent e)
405 remove2RightMenuItem_actionPerformed(e);
408 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
410 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
411 MessageManager.getString("action.remove_empty_columns"));
412 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
413 jalview.util.ShortcutKeyMaskExWrapper
414 .getMenuShortcutKeyMaskEx(),
416 al = new ActionListener()
419 public void actionPerformed(ActionEvent e)
421 removeGappedColumnMenuItem_actionPerformed(e);
424 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
426 JMenuItem removeAllGapsMenuItem = new JMenuItem(
427 MessageManager.getString("action.remove_all_gaps"));
428 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
429 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
430 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
432 al = new ActionListener()
435 public void actionPerformed(ActionEvent e)
437 removeAllGapsMenuItem_actionPerformed(e);
440 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
442 JMenuItem justifyLeftMenuItem = new JMenuItem(
443 MessageManager.getString("action.left_justify_alignment"));
444 justifyLeftMenuItem.addActionListener(new ActionListener()
447 public void actionPerformed(ActionEvent e)
449 justifyLeftMenuItem_actionPerformed(e);
452 JMenuItem justifyRightMenuItem = new JMenuItem(
453 MessageManager.getString("action.right_justify_alignment"));
454 justifyRightMenuItem.addActionListener(new ActionListener()
457 public void actionPerformed(ActionEvent e)
459 justifyRightMenuItem_actionPerformed(e);
462 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
463 viewBoxesMenuItem.setState(true);
464 viewBoxesMenuItem.addActionListener(new ActionListener()
467 public void actionPerformed(ActionEvent e)
469 viewBoxesMenuItem_actionPerformed(e);
472 viewTextMenuItem.setText(MessageManager.getString("action.text"));
473 viewTextMenuItem.setState(true);
474 viewTextMenuItem.addActionListener(new ActionListener()
477 public void actionPerformed(ActionEvent e)
479 viewTextMenuItem_actionPerformed(e);
482 showNonconservedMenuItem
483 .setText(MessageManager.getString("label.show_non_conserved"));
484 showNonconservedMenuItem.setState(false);
485 showNonconservedMenuItem.addActionListener(new ActionListener()
488 public void actionPerformed(ActionEvent e)
490 showUnconservedMenuItem_actionPerformed(e);
493 JMenuItem sortPairwiseMenuItem = new JMenuItem(
494 MessageManager.getString("action.by_pairwise_id"));
495 sortPairwiseMenuItem.addActionListener(new ActionListener()
498 public void actionPerformed(ActionEvent e)
500 sortPairwiseMenuItem_actionPerformed(e);
503 JMenuItem sortIDMenuItem = new JMenuItem(
504 MessageManager.getString("action.by_id"));
505 sortIDMenuItem.addActionListener(new ActionListener()
508 public void actionPerformed(ActionEvent e)
510 sortIDMenuItem_actionPerformed(e);
513 JMenuItem sortLengthMenuItem = new JMenuItem(
514 MessageManager.getString("action.by_length"));
515 sortLengthMenuItem.addActionListener(new ActionListener()
518 public void actionPerformed(ActionEvent e)
520 sortLengthMenuItem_actionPerformed(e);
523 JMenuItem sortGroupMenuItem = new JMenuItem(
524 MessageManager.getString("action.by_group"));
525 sortGroupMenuItem.addActionListener(new ActionListener()
528 public void actionPerformed(ActionEvent e)
530 sortGroupMenuItem_actionPerformed(e);
534 JMenuItem removeRedundancyMenuItem = new JMenuItem(
535 MessageManager.getString("action.remove_redundancy"));
536 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
537 jalview.util.ShortcutKeyMaskExWrapper
538 .getMenuShortcutKeyMaskEx(),
540 al = new ActionListener()
543 public void actionPerformed(ActionEvent e)
545 removeRedundancyMenuItem_actionPerformed(e);
548 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
550 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
551 MessageManager.getString("action.pairwise_alignment"));
552 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
555 public void actionPerformed(ActionEvent e)
557 pairwiseAlignmentMenuItem_actionPerformed(e);
561 this.getContentPane().setLayout(new BorderLayout());
562 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
563 statusBar.setBackground(Color.white);
564 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
565 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
566 statusBar.setText(MessageManager.getString("label.status_bar"));
568 .setText(MessageManager.getString("label.out_to_textbox"));
570 annotationPanelMenuItem.setActionCommand("");
571 annotationPanelMenuItem
572 .setText(MessageManager.getString("label.show_annotations"));
573 annotationPanelMenuItem
574 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
575 annotationPanelMenuItem.addActionListener(new ActionListener()
578 public void actionPerformed(ActionEvent e)
580 annotationPanelMenuItem_actionPerformed(e);
583 showAllAlAnnotations.setText(
584 MessageManager.getString("label.show_all_al_annotations"));
585 final boolean isAnnotationPanelShown = annotationPanelMenuItem
587 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
588 showAllAlAnnotations.addActionListener(new ActionListener()
591 public void actionPerformed(ActionEvent e)
593 showAllAnnotations_actionPerformed(false, true);
596 hideAllAlAnnotations.setText(
597 MessageManager.getString("label.hide_all_al_annotations"));
598 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
599 hideAllAlAnnotations.addActionListener(new ActionListener()
602 public void actionPerformed(ActionEvent e)
604 hideAllAnnotations_actionPerformed(false, true);
607 showAllSeqAnnotations.setText(
608 MessageManager.getString("label.show_all_seq_annotations"));
609 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
610 showAllSeqAnnotations.addActionListener(new ActionListener()
613 public void actionPerformed(ActionEvent e)
615 showAllAnnotations_actionPerformed(true, false);
618 hideAllSeqAnnotations.setText(
619 MessageManager.getString("label.hide_all_seq_annotations"));
620 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
621 hideAllSeqAnnotations.addActionListener(new ActionListener()
624 public void actionPerformed(ActionEvent e)
626 hideAllAnnotations_actionPerformed(true, false);
629 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
630 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
631 SequenceAnnotationOrder.NONE.name()));
632 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
633 MessageManager.getString("label.sort_annotations_by_sequence"));
634 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
635 MessageManager.getString("label.sort_annotations_by_label"));
637 sortAnnBySequence.setSelected(
638 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
639 sortAnnBySequence.addActionListener(new ActionListener()
642 public void actionPerformed(ActionEvent e)
644 boolean newState = sortAnnBySequence.getState();
645 sortAnnByLabel.setSelected(false);
646 setAnnotationSortOrder(
647 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
648 : SequenceAnnotationOrder.NONE);
649 sortAnnotations_actionPerformed();
652 sortAnnByLabel.setSelected(
653 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
654 sortAnnByLabel.addActionListener(new ActionListener()
657 public void actionPerformed(ActionEvent e)
659 boolean newState = sortAnnByLabel.getState();
660 sortAnnBySequence.setSelected(false);
661 setAnnotationSortOrder(
662 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
663 : SequenceAnnotationOrder.NONE);
664 sortAnnotations_actionPerformed();
667 colourTextMenuItem = new JCheckBoxMenuItem(
668 MessageManager.getString("label.colour_text"));
669 colourTextMenuItem.addActionListener(new ActionListener()
672 public void actionPerformed(ActionEvent e)
674 colourTextMenuItem_actionPerformed(e);
678 JMenuItem htmlMenuItem = new JMenuItem(
679 MessageManager.getString("label.html"));
680 htmlMenuItem.addActionListener(new ActionListener()
683 public void actionPerformed(ActionEvent e)
685 htmlMenuItem_actionPerformed(e);
689 JMenuItem createBioJS = new JMenuItem(
690 MessageManager.getString("label.biojs_html_export"));
691 createBioJS.addActionListener(new java.awt.event.ActionListener()
694 public void actionPerformed(ActionEvent e)
696 bioJSMenuItem_actionPerformed(e);
700 JMenuItem overviewMenuItem = new JMenuItem(
701 MessageManager.getString("label.overview_window"));
702 overviewMenuItem.addActionListener(new ActionListener()
705 public void actionPerformed(ActionEvent e)
707 overviewMenuItem_actionPerformed(e);
711 undoMenuItem.setEnabled(false);
712 undoMenuItem.setText(MessageManager.getString("action.undo"));
713 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
714 jalview.util.ShortcutKeyMaskExWrapper
715 .getMenuShortcutKeyMaskEx(),
717 al = new ActionListener()
720 public void actionPerformed(ActionEvent e)
722 undoMenuItem_actionPerformed(e);
725 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
727 redoMenuItem.setEnabled(false);
728 redoMenuItem.setText(MessageManager.getString("action.redo"));
729 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
730 jalview.util.ShortcutKeyMaskExWrapper
731 .getMenuShortcutKeyMaskEx(),
733 al = new ActionListener()
736 public void actionPerformed(ActionEvent e)
738 redoMenuItem_actionPerformed(e);
741 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
743 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
744 wrapMenuItem.addActionListener(new ActionListener()
747 public void actionPerformed(ActionEvent e)
749 wrapMenuItem_actionPerformed(e);
753 JMenuItem printMenuItem = new JMenuItem(
754 MessageManager.getString("action.print"));
755 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
756 jalview.util.ShortcutKeyMaskExWrapper
757 .getMenuShortcutKeyMaskEx(),
759 al = new ActionListener()
762 public void actionPerformed(ActionEvent e)
764 printMenuItem_actionPerformed(e);
767 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
770 .setText(MessageManager.getString("action.show_gaps"));
771 renderGapsMenuItem.setState(true);
772 renderGapsMenuItem.addActionListener(new ActionListener()
775 public void actionPerformed(ActionEvent e)
777 renderGapsMenuItem_actionPerformed(e);
781 JMenuItem findMenuItem = new JMenuItem(
782 MessageManager.getString("action.find"));
783 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
784 jalview.util.ShortcutKeyMaskExWrapper
785 .getMenuShortcutKeyMaskEx(),
787 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
788 MessageManager.getString("label.find_tip")));
789 al = new ActionListener()
792 public void actionPerformed(ActionEvent e)
794 findMenuItem_actionPerformed(e);
797 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
799 showSeqFeatures.setText(
800 MessageManager.getString("label.show_sequence_features"));
801 showSeqFeatures.addActionListener(new ActionListener()
804 public void actionPerformed(ActionEvent actionEvent)
806 showSeqFeatures_actionPerformed(actionEvent);
810 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
811 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
812 * void actionPerformed(ActionEvent actionEvent) {
813 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
816 .setText(MessageManager.getString("label.show_database_refs"));
817 showDbRefsMenuitem.addActionListener(new ActionListener()
821 public void actionPerformed(ActionEvent e)
823 showDbRefs_actionPerformed(e);
827 showNpFeatsMenuitem.setText(
828 MessageManager.getString("label.show_non_positional_features"));
829 showNpFeatsMenuitem.addActionListener(new ActionListener()
833 public void actionPerformed(ActionEvent e)
835 showNpFeats_actionPerformed(e);
839 showGroupConservation
840 .setText(MessageManager.getString("label.group_conservation"));
841 showGroupConservation.addActionListener(new ActionListener()
845 public void actionPerformed(ActionEvent e)
847 showGroupConservation_actionPerformed(e);
853 .setText(MessageManager.getString("label.group_consensus"));
854 showGroupConsensus.addActionListener(new ActionListener()
858 public void actionPerformed(ActionEvent e)
860 showGroupConsensus_actionPerformed(e);
864 showConsensusHistogram.setText(
865 MessageManager.getString("label.show_consensus_histogram"));
866 showConsensusHistogram.addActionListener(new ActionListener()
870 public void actionPerformed(ActionEvent e)
872 showConsensusHistogram_actionPerformed(e);
877 .setText(MessageManager.getString("label.show_consensus_logo"));
878 showSequenceLogo.addActionListener(new ActionListener()
882 public void actionPerformed(ActionEvent e)
884 showSequenceLogo_actionPerformed(e);
888 normaliseSequenceLogo
889 .setText(MessageManager.getString("label.norm_consensus_logo"));
890 normaliseSequenceLogo.addActionListener(new ActionListener()
894 public void actionPerformed(ActionEvent e)
896 normaliseSequenceLogo_actionPerformed(e);
900 applyAutoAnnotationSettings
901 .setText(MessageManager.getString("label.apply_all_groups"));
902 applyAutoAnnotationSettings.setState(false);
903 applyAutoAnnotationSettings.setVisible(true);
904 applyAutoAnnotationSettings.addActionListener(new ActionListener()
907 public void actionPerformed(ActionEvent e)
909 applyAutoAnnotationSettings_actionPerformed(e);
913 ButtonGroup buttonGroup = new ButtonGroup();
914 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
915 MessageManager.getString("label.show_first"));
916 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
917 MessageManager.getString("label.show_last"));
918 buttonGroup.add(showAutoFirst);
919 buttonGroup.add(showAutoLast);
920 final boolean autoFirst = Cache
921 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
922 showAutoFirst.setSelected(autoFirst);
923 setShowAutoCalculatedAbove(autoFirst);
924 showAutoFirst.addActionListener(new ActionListener()
927 public void actionPerformed(ActionEvent e)
929 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
930 sortAnnotations_actionPerformed();
933 showAutoLast.setSelected(!showAutoFirst.isSelected());
934 showAutoLast.addActionListener(new ActionListener()
937 public void actionPerformed(ActionEvent e)
939 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
940 sortAnnotations_actionPerformed();
944 JMenuItem deleteGroups = new JMenuItem(
945 MessageManager.getString("action.undefine_groups"));
946 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
947 jalview.util.ShortcutKeyMaskExWrapper
948 .getMenuShortcutKeyMaskEx(),
950 al = new ActionListener()
953 public void actionPerformed(ActionEvent e)
955 deleteGroups_actionPerformed(e);
958 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
960 JMenuItem annotationColumn = new JMenuItem(
961 MessageManager.getString("action.select_by_annotation"));
962 annotationColumn.addActionListener(new ActionListener()
965 public void actionPerformed(ActionEvent e)
967 annotationColumn_actionPerformed(e);
971 JMenuItem createGroup = new JMenuItem(
972 MessageManager.getString("action.create_group"));
973 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
974 jalview.util.ShortcutKeyMaskExWrapper
975 .getMenuShortcutKeyMaskEx(),
977 al = new ActionListener()
980 public void actionPerformed(ActionEvent e)
982 createGroup_actionPerformed(e);
985 addMenuActionAndAccelerator(keyStroke, createGroup, al);
987 JMenuItem unGroup = new JMenuItem(
988 MessageManager.getString("action.remove_group"));
989 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
990 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
991 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
993 al = new ActionListener()
996 public void actionPerformed(ActionEvent e)
998 unGroup_actionPerformed(e);
1001 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1003 copy.setText(MessageManager.getString("action.copy"));
1004 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1005 jalview.util.ShortcutKeyMaskExWrapper
1006 .getMenuShortcutKeyMaskEx(),
1009 al = new ActionListener()
1012 public void actionPerformed(ActionEvent e)
1014 copy_actionPerformed();
1017 addMenuActionAndAccelerator(keyStroke, copy, al);
1019 cut.setText(MessageManager.getString("action.cut"));
1020 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1021 jalview.util.ShortcutKeyMaskExWrapper
1022 .getMenuShortcutKeyMaskEx(),
1024 al = new ActionListener()
1027 public void actionPerformed(ActionEvent e)
1029 cut_actionPerformed();
1032 addMenuActionAndAccelerator(keyStroke, cut, al);
1034 JMenuItem delete = new JMenuItem(
1035 MessageManager.getString("action.delete"));
1036 delete.addActionListener(new ActionListener()
1039 public void actionPerformed(ActionEvent e)
1041 delete_actionPerformed();
1045 pasteMenu.setText(MessageManager.getString("action.paste"));
1046 JMenuItem pasteNew = new JMenuItem(
1047 MessageManager.getString("label.to_new_alignment"));
1048 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1049 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1050 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1052 al = new ActionListener()
1055 public void actionPerformed(ActionEvent e)
1057 pasteNew_actionPerformed(e);
1060 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1062 JMenuItem pasteThis = new JMenuItem(
1063 MessageManager.getString("label.to_this_alignment"));
1064 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1065 jalview.util.ShortcutKeyMaskExWrapper
1066 .getMenuShortcutKeyMaskEx(),
1068 al = new ActionListener()
1071 public void actionPerformed(ActionEvent e)
1073 pasteThis_actionPerformed(e);
1076 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1078 JMenuItem createPNG = new JMenuItem("PNG");
1079 createPNG.addActionListener(new ActionListener()
1082 public void actionPerformed(ActionEvent e)
1087 createPNG.setActionCommand(
1088 MessageManager.getString("label.save_png_image"));
1090 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1091 font.addActionListener(new ActionListener()
1094 public void actionPerformed(ActionEvent e)
1096 font_actionPerformed(e);
1100 MessageManager.getString("label.show_sequence_limits"));
1101 seqLimits.setState(Cache.getDefault("SHOW_JVSUFFIX", true));
1102 seqLimits.addActionListener(new ActionListener()
1105 public void actionPerformed(ActionEvent e)
1107 seqLimit_actionPerformed(e);
1110 JMenuItem epsFile = new JMenuItem("EPS");
1111 epsFile.addActionListener(new ActionListener()
1114 public void actionPerformed(ActionEvent e)
1120 JMenuItem createSVG = new JMenuItem("SVG");
1121 createSVG.addActionListener(new ActionListener()
1124 public void actionPerformed(ActionEvent e)
1130 JMenuItem loadTreeMenuItem = new JMenuItem(
1131 MessageManager.getString("label.load_associated_tree"));
1132 loadTreeMenuItem.setActionCommand(
1133 MessageManager.getString("label.load_tree_for_sequence_set"));
1134 loadTreeMenuItem.addActionListener(new ActionListener()
1137 public void actionPerformed(ActionEvent e)
1139 loadTreeMenuItem_actionPerformed(e);
1143 scaleAbove.setVisible(false);
1144 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1145 scaleAbove.addActionListener(new ActionListener()
1148 public void actionPerformed(ActionEvent e)
1150 scaleAbove_actionPerformed(e);
1153 scaleLeft.setVisible(false);
1154 scaleLeft.setSelected(true);
1155 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1156 scaleLeft.addActionListener(new ActionListener()
1159 public void actionPerformed(ActionEvent e)
1161 scaleLeft_actionPerformed(e);
1164 scaleRight.setVisible(false);
1165 scaleRight.setSelected(true);
1166 scaleRight.setText(MessageManager.getString("action.scale_right"));
1167 scaleRight.addActionListener(new ActionListener()
1170 public void actionPerformed(ActionEvent e)
1172 scaleRight_actionPerformed(e);
1175 centreColumnLabelsMenuItem.setVisible(true);
1176 centreColumnLabelsMenuItem.setState(false);
1177 centreColumnLabelsMenuItem.setText(
1178 MessageManager.getString("label.centre_column_labels"));
1179 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1182 public void actionPerformed(ActionEvent e)
1184 centreColumnLabels_actionPerformed(e);
1187 followHighlightMenuItem.setVisible(true);
1188 followHighlightMenuItem.setState(true);
1189 followHighlightMenuItem
1190 .setText(MessageManager.getString("label.automatic_scrolling"));
1191 followHighlightMenuItem.addActionListener(new ActionListener()
1195 public void actionPerformed(ActionEvent e)
1197 followHighlight_actionPerformed();
1203 .setText(MessageManager.getString("action.by_tree_order"));
1204 sort.setText(MessageManager.getString("action.sort"));
1205 sort.addMenuListener(new MenuListener()
1208 public void menuSelected(MenuEvent e)
1210 buildTreeSortMenu();
1214 public void menuDeselected(MenuEvent e)
1219 public void menuCanceled(MenuEvent e)
1224 .setText(MessageManager.getString("label.sort_by_score"));
1225 sort.add(sortByAnnotScore);
1226 sort.addMenuListener(new javax.swing.event.MenuListener()
1230 public void menuCanceled(MenuEvent e)
1235 public void menuDeselected(MenuEvent e)
1240 public void menuSelected(MenuEvent e)
1242 buildSortByAnnotationScoresMenu();
1245 sortByAnnotScore.setVisible(false);
1248 .setText(MessageManager.getString("action.calculate_tree_pca"));
1250 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1251 padGapsMenuitem.setState(Cache.getDefault("PAD_GAPS", false));
1252 padGapsMenuitem.addActionListener(new ActionListener()
1255 public void actionPerformed(ActionEvent e)
1257 padGapsMenuitem_actionPerformed(e);
1260 JMenuItem vamsasStore = new JMenuItem(
1261 MessageManager.getString("label.vamsas_store"));
1262 vamsasStore.setVisible(false);
1263 vamsasStore.addActionListener(new ActionListener()
1266 public void actionPerformed(ActionEvent e)
1268 vamsasStore_actionPerformed(e);
1273 * Translate as cDNA with sub-menu of translation tables
1276 .setText(MessageManager.getString("label.translate_cDNA"));
1277 boolean first = true;
1278 for (final GeneticCodeI table : GeneticCodes.getInstance()
1281 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1282 showTranslation.add(item);
1283 item.addActionListener(new ActionListener()
1286 public void actionPerformed(ActionEvent e)
1288 showTranslation_actionPerformed(table);
1293 showTranslation.addSeparator();
1298 showReverse.setText(MessageManager.getString("label.reverse"));
1299 showReverse.addActionListener(new ActionListener()
1302 public void actionPerformed(ActionEvent e)
1304 showReverse_actionPerformed(false);
1307 showReverseComplement
1308 .setText(MessageManager.getString("label.reverse_complement"));
1309 showReverseComplement.addActionListener(new ActionListener()
1312 public void actionPerformed(ActionEvent e)
1314 showReverse_actionPerformed(true);
1318 JMenuItem extractScores = new JMenuItem(
1319 MessageManager.getString("label.extract_scores"));
1320 extractScores.addActionListener(new ActionListener()
1323 public void actionPerformed(ActionEvent e)
1325 extractScores_actionPerformed(e);
1328 extractScores.setVisible(true);
1329 // JBPNote: TODO: make gui for regex based score extraction
1331 // for show products actions see AlignFrame.canShowProducts
1332 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1334 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1335 runGroovy.setToolTipText(
1336 MessageManager.getString("label.run_groovy_tip"));
1337 runGroovy.addActionListener(new ActionListener()
1340 public void actionPerformed(ActionEvent e)
1342 runGroovy_actionPerformed();
1346 openFeatureSettings = new JMenuItem(
1347 MessageManager.getString("action.feature_settings"));
1348 openFeatureSettings.addActionListener(new ActionListener()
1351 public void actionPerformed(ActionEvent e)
1353 featureSettings_actionPerformed(e);
1358 * add sub-menu of database we can fetch from
1360 JMenuItem fetchSequence = new JMenuItem(
1361 MessageManager.getString("label.fetch_sequences"));
1362 fetchSequence.addActionListener(new ActionListener()
1365 public void actionPerformed(ActionEvent e)
1367 fetchSequence_actionPerformed();
1371 JMenuItem associatedData = new JMenuItem(
1372 MessageManager.getString("label.load_features_annotations"));
1373 associatedData.addActionListener(new ActionListener()
1376 public void actionPerformed(ActionEvent e)
1378 associatedData_actionPerformed(e);
1381 loadVcf = new JMenuItem(
1382 MessageManager.getString("label.load_vcf_file"));
1383 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1384 loadVcf.addActionListener(new ActionListener()
1387 public void actionPerformed(ActionEvent e)
1389 loadVcf_actionPerformed();
1392 autoCalculate.setText(
1393 MessageManager.getString("label.autocalculate_consensus"));
1394 autoCalculate.setState(Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1395 autoCalculate.addActionListener(new ActionListener()
1398 public void actionPerformed(ActionEvent e)
1400 autoCalculate_actionPerformed(e);
1404 MessageManager.getString("label.sort_alignment_new_tree"));
1405 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1406 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1407 sortByTree.setState(Cache.getDefault("SORT_BY_TREE", false));
1408 sortByTree.addActionListener(new ActionListener()
1411 public void actionPerformed(ActionEvent e)
1413 sortByTreeOption_actionPerformed(e);
1417 listenToViewSelections.setText(
1418 MessageManager.getString("label.listen_for_selections"));
1419 listenToViewSelections
1420 .setToolTipText("<html>" + MessageManager.getString(
1421 "label.selections_mirror_selections_made_same_sequences_other_views"));
1422 listenToViewSelections.setState(false);
1423 listenToViewSelections.addActionListener(new ActionListener()
1426 public void actionPerformed(ActionEvent e)
1428 listenToViewSelections_actionPerformed(e);
1432 JMenu addSequenceMenu = new JMenu(
1433 MessageManager.getString("label.add_sequences"));
1434 JMenuItem addFromFile = new JMenuItem(
1435 MessageManager.getString("label.from_file"));
1436 addFromFile.addActionListener(new ActionListener()
1439 public void actionPerformed(ActionEvent e)
1441 addFromFile_actionPerformed(e);
1444 JMenuItem addFromText = new JMenuItem(
1445 MessageManager.getString("label.from_textbox"));
1446 addFromText.addActionListener(new ActionListener()
1449 public void actionPerformed(ActionEvent e)
1451 addFromText_actionPerformed(e);
1454 JMenuItem addFromURL = new JMenuItem(
1455 MessageManager.getString("label.from_url"));
1456 addFromURL.addActionListener(new ActionListener()
1459 public void actionPerformed(ActionEvent e)
1461 addFromURL_actionPerformed(e);
1464 JMenuItem exportFeatures = new JMenuItem(
1465 MessageManager.getString("label.export_features"));
1466 exportFeatures.addActionListener(new ActionListener()
1469 public void actionPerformed(ActionEvent e)
1471 exportFeatures_actionPerformed(e);
1474 JMenuItem exportAnnotations = new JMenuItem(
1475 MessageManager.getString("label.export_annotations"));
1476 exportAnnotations.addActionListener(new ActionListener()
1479 public void actionPerformed(ActionEvent e)
1481 exportAnnotations_actionPerformed(e);
1484 statusPanel.setLayout(new GridLayout());
1485 JMenuItem showAllSeqs = new JMenuItem(
1486 MessageManager.getString("label.all_sequences"));
1487 showAllSeqs.setToolTipText(
1488 MessageManager.getString("label.toggle_sequence_visibility"));
1489 showAllSeqs.addActionListener(new ActionListener()
1492 public void actionPerformed(ActionEvent e)
1494 showAllSeqs_actionPerformed(e);
1497 JMenuItem showAllColumns = new JMenuItem(
1498 MessageManager.getString("label.all_columns"));
1499 showAllColumns.setToolTipText(
1500 MessageManager.getString("label.toggle_columns_visibility"));
1501 showAllColumns.addActionListener(new ActionListener()
1504 public void actionPerformed(ActionEvent e)
1506 showAllColumns_actionPerformed(e);
1509 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1510 JMenuItem hideSelSequences = new JMenuItem(
1511 MessageManager.getString("label.selected_sequences"));
1512 hideSelSequences.setToolTipText(
1513 MessageManager.getString("label.toggle_sequence_visibility"));
1514 hideSelSequences.addActionListener(new ActionListener()
1517 public void actionPerformed(ActionEvent e)
1519 hideSelSequences_actionPerformed(e);
1522 JMenuItem hideSelColumns = new JMenuItem(
1523 MessageManager.getString("label.selected_columns"));
1524 hideSelColumns.setToolTipText(
1525 MessageManager.getString("label.toggle_columns_visibility"));
1526 hideSelColumns.addActionListener(new ActionListener()
1529 public void actionPerformed(ActionEvent e)
1531 hideSelColumns_actionPerformed(e);
1534 JMenuItem hideAllSelection = new JMenuItem(
1535 MessageManager.getString("label.selected_region"));
1536 hideAllSelection.addActionListener(new ActionListener()
1539 public void actionPerformed(ActionEvent e)
1541 hideAllSelection_actionPerformed(e);
1544 // TODO: should be hidden if no selection exists.
1545 JMenuItem hideAllButSelection = new JMenuItem(
1546 MessageManager.getString("label.all_but_selected_region"));
1547 hideAllButSelection.addActionListener(new ActionListener()
1550 public void actionPerformed(ActionEvent e)
1552 hideAllButSelection_actionPerformed(e);
1555 JMenuItem showAllhidden = new JMenuItem(
1556 MessageManager.getString("label.all_sequences_columns"));
1557 showAllhidden.setToolTipText(MessageManager
1558 .getString("label.toggles_visibility_hidden_selected_regions"));
1559 showAllhidden.addActionListener(new ActionListener()
1562 public void actionPerformed(ActionEvent e)
1564 showAllhidden_actionPerformed(e);
1567 hiddenMarkers.setText(
1568 MessageManager.getString("action.show_hidden_markers"));
1569 hiddenMarkers.addActionListener(new ActionListener()
1572 public void actionPerformed(ActionEvent e)
1574 hiddenMarkers_actionPerformed(e);
1578 JMenuItem invertColSel = new JMenuItem(
1579 MessageManager.getString("action.invert_column_selection"));
1580 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1581 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1582 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1584 al = new ActionListener()
1587 public void actionPerformed(ActionEvent e)
1589 invertColSel_actionPerformed(e);
1592 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1594 showComplementMenuItem.setVisible(false);
1595 showComplementMenuItem.addActionListener(new ActionListener()
1598 public void actionPerformed(ActionEvent e)
1600 showComplement_actionPerformed(showComplementMenuItem.getState());
1604 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1607 public void stateChanged(ChangeEvent evt)
1609 JTabbedPane pane = (JTabbedPane) evt.getSource();
1610 int sel = pane.getSelectedIndex();
1611 tabSelectionChanged(sel);
1614 tabbedPane.addMouseListener(new MouseAdapter()
1617 public void mousePressed(MouseEvent e)
1619 if (e.isPopupTrigger()) // Mac
1621 tabbedPane_mousePressed(e);
1626 public void mouseReleased(MouseEvent e)
1628 if (e.isPopupTrigger()) // Windows
1630 tabbedPane_mousePressed(e);
1634 tabbedPane.addFocusListener(new FocusAdapter()
1637 public void focusGained(FocusEvent e)
1639 tabbedPane_focusGained(e);
1643 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1644 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1645 jalview.util.ShortcutKeyMaskExWrapper
1646 .getMenuShortcutKeyMaskEx(),
1648 al = new ActionListener()
1651 public void actionPerformed(ActionEvent e)
1653 save_actionPerformed(e);
1656 addMenuActionAndAccelerator(keyStroke, save, al);
1658 reload.setEnabled(false);
1659 reload.setText(MessageManager.getString("action.reload"));
1660 reload.addActionListener(new ActionListener()
1663 public void actionPerformed(ActionEvent e)
1665 reload_actionPerformed(e);
1669 JMenuItem newView = new JMenuItem(
1670 MessageManager.getString("action.new_view"));
1671 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1672 jalview.util.ShortcutKeyMaskExWrapper
1673 .getMenuShortcutKeyMaskEx(),
1675 al = new ActionListener()
1678 public void actionPerformed(ActionEvent e)
1680 newView_actionPerformed(e);
1683 addMenuActionAndAccelerator(keyStroke, newView, al);
1685 tabbedPane.setToolTipText("<html><i>"
1686 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1689 formatMenu.setText(MessageManager.getString("action.format"));
1690 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1692 idRightAlign.setText(
1693 MessageManager.getString("label.right_align_sequence_id"));
1694 idRightAlign.addActionListener(new ActionListener()
1697 public void actionPerformed(ActionEvent e)
1699 idRightAlign_actionPerformed(e);
1703 gatherViews.setEnabled(false);
1704 gatherViews.setText(MessageManager.getString("action.gather_views"));
1705 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1706 al = new ActionListener()
1709 public void actionPerformed(ActionEvent e)
1711 gatherViews_actionPerformed(e);
1714 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1716 expandViews.setEnabled(false);
1717 expandViews.setText(MessageManager.getString("action.expand_views"));
1718 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1719 al = new ActionListener()
1722 public void actionPerformed(ActionEvent e)
1724 expandViews_actionPerformed(e);
1727 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1729 JMenuItem pageSetup = new JMenuItem(
1730 MessageManager.getString("action.page_setup"));
1731 pageSetup.addActionListener(new ActionListener()
1734 public void actionPerformed(ActionEvent e)
1736 pageSetup_actionPerformed(e);
1739 JMenuItem alignmentProperties = new JMenuItem(
1740 MessageManager.getString("label.alignment_props"));
1741 alignmentProperties.addActionListener(new ActionListener()
1744 public void actionPerformed(ActionEvent actionEvent)
1746 alignmentProperties();
1749 JMenuItem selectHighlighted = new JMenuItem(
1750 MessageManager.getString("action.select_highlighted_columns"));
1751 selectHighlighted.setToolTipText(
1752 MessageManager.getString("tooltip.select_highlighted_columns"));
1753 al = new ActionListener()
1756 public void actionPerformed(ActionEvent actionEvent)
1758 selectHighlightedColumns_actionPerformed(actionEvent);
1761 selectHighlighted.addActionListener(al);
1763 copyHighlighted = new JMenuItem(
1764 MessageManager.getString("action.copy_highlighted_regions"));
1765 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1766 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1767 + jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1769 copyHighlighted.setToolTipText(
1770 MessageManager.getString("tooltip.copy_highlighted_regions"));
1771 al = new ActionListener()
1774 public void actionPerformed(ActionEvent actionEvent)
1776 copyHighlightedColumns_actionPerformed(actionEvent);
1779 addMenuActionAndAccelerator(keyStroke, copyHighlighted, al);
1780 copyHighlighted.addActionListener(al);
1782 JMenu tooltipSettingsMenu = new JMenu(
1783 MessageManager.getString("label.sequence_id_tooltip"));
1784 JMenu autoAnnMenu = new JMenu(
1785 MessageManager.getString("label.autocalculated_annotation"));
1787 JMenu exportImageMenu = new JMenu(
1788 MessageManager.getString("label.export_image"));
1789 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1790 alignFrameMenuBar.add(fileMenu);
1791 alignFrameMenuBar.add(editMenu);
1792 alignFrameMenuBar.add(selectMenu);
1793 alignFrameMenuBar.add(viewMenu);
1794 alignFrameMenuBar.add(annotationsMenu);
1795 alignFrameMenuBar.add(formatMenu);
1796 alignFrameMenuBar.add(colourMenu);
1797 alignFrameMenuBar.add(calculateMenu);
1798 if (!Platform.isJS())
1800 alignFrameMenuBar.add(webService);
1803 fileMenu.add(fetchSequence);
1804 fileMenu.add(addSequenceMenu);
1805 fileMenu.add(reload);
1806 fileMenu.addSeparator();
1807 fileMenu.add(vamsasStore);
1809 fileMenu.add(saveAs);
1810 fileMenu.add(outputTextboxMenu);
1811 fileMenu.add(pageSetup);
1812 fileMenu.add(printMenuItem);
1813 fileMenu.addSeparator();
1814 fileMenu.add(exportImageMenu);
1815 fileMenu.add(exportFeatures);
1816 fileMenu.add(exportAnnotations);
1817 fileMenu.add(loadTreeMenuItem);
1818 fileMenu.add(associatedData);
1819 if (!Platform.isJS())
1821 fileMenu.add(loadVcf);
1823 fileMenu.addSeparator();
1824 fileMenu.add(closeMenuItem);
1826 pasteMenu.add(pasteNew);
1827 pasteMenu.add(pasteThis);
1828 editMenu.add(undoMenuItem);
1829 editMenu.add(redoMenuItem);
1832 editMenu.add(copyHighlighted);
1833 editMenu.add(pasteMenu);
1834 editMenu.add(delete);
1835 editMenu.addSeparator();
1836 editMenu.add(remove2LeftMenuItem);
1837 editMenu.add(remove2RightMenuItem);
1838 editMenu.add(removeGappedColumnMenuItem);
1839 editMenu.add(removeAllGapsMenuItem);
1840 editMenu.add(removeRedundancyMenuItem);
1841 editMenu.addSeparator();
1842 // dont add these yet in the CVS build - they cannot be undone!
1843 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1844 // editMenu.add(justifyLeftMenuItem);
1845 // editMenu.add(justifyRightMenuItem);
1846 // editMenu.addSeparator();
1847 editMenu.add(padGapsMenuitem);
1849 showMenu.add(showAllColumns);
1850 showMenu.add(showAllSeqs);
1851 showMenu.add(showAllhidden);
1852 hideMenu.add(hideSelColumns);
1853 hideMenu.add(hideSelSequences);
1854 hideMenu.add(hideAllSelection);
1855 hideMenu.add(hideAllButSelection);
1856 viewMenu.add(newView);
1857 viewMenu.add(expandViews);
1858 viewMenu.add(gatherViews);
1859 viewMenu.addSeparator();
1860 viewMenu.add(showMenu);
1861 viewMenu.add(hideMenu);
1862 viewMenu.add(showComplementMenuItem);
1863 viewMenu.addSeparator();
1864 viewMenu.add(followHighlightMenuItem);
1865 viewMenu.addSeparator();
1866 viewMenu.add(showSeqFeatures);
1867 // viewMenu.add(showSeqFeaturesHeight);
1868 viewMenu.add(openFeatureSettings);
1869 tooltipSettingsMenu.add(showDbRefsMenuitem);
1870 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1871 viewMenu.add(tooltipSettingsMenu);
1872 viewMenu.addSeparator();
1873 viewMenu.add(alignmentProperties);
1874 viewMenu.addSeparator();
1875 viewMenu.add(overviewMenuItem);
1877 annotationsMenu.add(annotationPanelMenuItem);
1878 annotationsMenu.addSeparator();
1879 annotationsMenu.add(showAllAlAnnotations);
1880 annotationsMenu.add(hideAllAlAnnotations);
1881 annotationsMenu.addSeparator();
1882 annotationsMenu.add(showAllSeqAnnotations);
1883 annotationsMenu.add(hideAllSeqAnnotations);
1884 annotationsMenu.add(sortAnnBySequence);
1885 annotationsMenu.add(sortAnnByLabel);
1886 annotationsMenu.addSeparator();
1887 autoAnnMenu.add(showAutoFirst);
1888 autoAnnMenu.add(showAutoLast);
1889 autoAnnMenu.addSeparator();
1890 autoAnnMenu.add(applyAutoAnnotationSettings);
1891 autoAnnMenu.add(showConsensusHistogram);
1892 autoAnnMenu.add(showSequenceLogo);
1893 autoAnnMenu.add(normaliseSequenceLogo);
1894 autoAnnMenu.addSeparator();
1895 autoAnnMenu.add(showGroupConservation);
1896 autoAnnMenu.add(showGroupConsensus);
1897 annotationsMenu.add(autoAnnMenu);
1899 sort.add(sortIDMenuItem);
1900 sort.add(sortLengthMenuItem);
1901 sort.add(sortGroupMenuItem);
1902 sort.add(sortPairwiseMenuItem);
1903 sort.add(sortByTreeMenu);
1904 calculateMenu.add(sort);
1905 calculateMenu.add(calculateTree);
1906 calculateMenu.addSeparator();
1907 calculateMenu.add(pairwiseAlignmentMenuItem);
1908 calculateMenu.addSeparator();
1909 calculateMenu.add(showTranslation);
1910 calculateMenu.add(showReverse);
1911 calculateMenu.add(showReverseComplement);
1912 calculateMenu.add(showProducts);
1913 calculateMenu.add(autoCalculate);
1914 calculateMenu.add(sortByTree);
1915 calculateMenu.addSeparator();
1916 calculateMenu.add(expandAlignment);
1917 calculateMenu.add(extractScores);
1918 if (!Platform.isJS())
1920 calculateMenu.addSeparator();
1921 calculateMenu.add(runGroovy);
1924 webServiceNoServices = new JMenuItem(
1925 MessageManager.getString("label.no_services"));
1926 webService.add(webServiceNoServices);
1927 if (!Platform.isJS())
1929 exportImageMenu.add(htmlMenuItem);
1931 exportImageMenu.add(epsFile);
1932 exportImageMenu.add(createPNG);
1933 if (!Platform.isJS())
1935 exportImageMenu.add(createBioJS);
1936 exportImageMenu.add(createSVG);
1938 addSequenceMenu.add(addFromFile);
1939 addSequenceMenu.add(addFromText);
1940 addSequenceMenu.add(addFromURL);
1941 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1942 statusPanel.add(statusBar, null);
1943 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1945 formatMenu.add(font);
1946 formatMenu.addSeparator();
1947 formatMenu.add(wrapMenuItem);
1948 formatMenu.add(scaleAbove);
1949 formatMenu.add(scaleLeft);
1950 formatMenu.add(scaleRight);
1951 formatMenu.add(seqLimits);
1952 formatMenu.add(idRightAlign);
1953 formatMenu.add(hiddenMarkers);
1954 formatMenu.add(viewBoxesMenuItem);
1955 formatMenu.add(viewTextMenuItem);
1956 formatMenu.add(colourTextMenuItem);
1957 formatMenu.add(renderGapsMenuItem);
1958 formatMenu.add(centreColumnLabelsMenuItem);
1959 formatMenu.add(showNonconservedMenuItem);
1960 selectMenu.add(findMenuItem);
1961 selectMenu.addSeparator();
1962 selectMenu.add(selectAllSequenceMenuItem);
1963 selectMenu.add(deselectAllSequenceMenuItem);
1964 selectMenu.add(invertSequenceMenuItem);
1965 selectMenu.add(invertColSel);
1966 selectMenu.add(createGroup);
1967 selectMenu.add(unGroup);
1968 selectMenu.add(grpsFromSelection);
1969 selectMenu.add(deleteGroups);
1970 selectMenu.add(annotationColumn);
1971 selectMenu.add(selectHighlighted);
1972 // TODO - determine if the listenToViewSelections button is needed : see bug
1974 // selectMenu.addSeparator();
1975 // selectMenu.add(listenToViewSelections);
1978 protected void copyHighlightedColumns_actionPerformed(
1979 ActionEvent actionEvent)
1984 protected void loadVcf_actionPerformed()
1989 * Constructs the entries on the Colour menu (but does not add them to the
1992 protected void initColourMenu()
1994 applyToAllGroups = new JCheckBoxMenuItem(
1995 MessageManager.getString("label.apply_colour_to_all_groups"));
1996 applyToAllGroups.addActionListener(new ActionListener()
1999 public void actionPerformed(ActionEvent e)
2001 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
2005 textColour = new JMenuItem(
2006 MessageManager.getString("label.text_colour"));
2007 textColour.addActionListener(new ActionListener()
2010 public void actionPerformed(ActionEvent e)
2012 textColour_actionPerformed();
2016 conservationMenuItem = new JCheckBoxMenuItem(
2017 MessageManager.getString("action.by_conservation"));
2018 conservationMenuItem.addActionListener(new ActionListener()
2021 public void actionPerformed(ActionEvent e)
2023 conservationMenuItem_actionPerformed(
2024 conservationMenuItem.isSelected());
2028 abovePIDThreshold = new JCheckBoxMenuItem(
2029 MessageManager.getString("label.above_identity_threshold"));
2030 abovePIDThreshold.addActionListener(new ActionListener()
2033 public void actionPerformed(ActionEvent e)
2035 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2038 modifyPID = new JMenuItem(
2039 MessageManager.getString("label.modify_identity_threshold"));
2040 modifyPID.addActionListener(new ActionListener()
2043 public void actionPerformed(ActionEvent e)
2045 modifyPID_actionPerformed();
2048 modifyConservation = new JMenuItem(MessageManager
2049 .getString("label.modify_conservation_threshold"));
2050 modifyConservation.addActionListener(new ActionListener()
2053 public void actionPerformed(ActionEvent e)
2055 modifyConservation_actionPerformed();
2059 annotationColour = new JRadioButtonMenuItem(
2060 MessageManager.getString("action.by_annotation"));
2061 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2062 annotationColour.addActionListener(new ActionListener()
2065 public void actionPerformed(ActionEvent e)
2067 annotationColour_actionPerformed();
2072 protected void selectHighlightedColumns_actionPerformed(
2073 ActionEvent actionEvent)
2075 // TODO Auto-generated method stub
2080 * Generate the reverse sequence (or reverse complement if the flag is true)
2081 * and add it to the alignment
2085 protected void showReverse_actionPerformed(boolean complement)
2090 * Try to run script in a Groovy console, having first ensured that this
2091 * alignframe is set as currentAlignFrame in Desktop
2093 protected void runGroovy_actionPerformed()
2099 * Adds the given action listener and key accelerator to the given menu item.
2100 * Also saves in a lookup table to support lookup of action by key stroke.
2104 * @param actionListener
2106 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2107 JMenuItem menuItem, ActionListener actionListener)
2109 menuItem.setAccelerator(keyStroke);
2110 accelerators.put(keyStroke, menuItem);
2111 menuItem.addActionListener(actionListener);
2115 * Action on clicking sort annotations by type.
2119 protected void sortAnnotations_actionPerformed()
2124 * Action on clicking Show all annotations.
2126 * @param forSequences
2127 * update sequence-related annotations
2128 * @param forAlignment
2129 * update non-sequence-related annotations
2131 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2132 boolean forAlignment)
2134 setAnnotationsVisibility(true, forSequences, forAlignment);
2138 * Action on clicking Hide all annotations.
2140 * @param forSequences
2141 * update sequence-related annotations
2142 * @param forAlignment
2143 * update non-sequence-related annotations
2145 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2146 boolean forAlignment)
2148 setAnnotationsVisibility(false, forSequences, forAlignment);
2152 * Set the visibility of annotations to true or false. Can act on
2153 * sequence-related annotations, or alignment-related, or both.
2156 * @param forSequences
2157 * update sequence-related annotations
2158 * @param forAlignment
2159 * update non-sequence-related annotations
2161 public void setAnnotationsVisibility(boolean visible,
2162 boolean forSequences, boolean forAlignment)
2167 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2169 // TODO Auto-generated method stub
2173 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2175 // TODO Auto-generated method stub
2179 protected void showAllhidden_actionPerformed(ActionEvent e)
2181 // TODO Auto-generated method stub
2185 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2187 // TODO Auto-generated method stub
2191 protected void hideAllSelection_actionPerformed(ActionEvent e)
2193 // TODO Auto-generated method stub
2197 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2199 // TODO Auto-generated method stub
2203 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2205 // TODO Auto-generated method stub
2209 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2211 // TODO Auto-generated method stub
2215 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2217 // TODO Auto-generated method stub
2221 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2223 // TODO Auto-generated method stub
2227 protected void showGroupConservation_actionPerformed(ActionEvent e)
2229 // TODO Auto-generated method stub
2233 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2235 // TODO Auto-generated method stub
2239 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2241 // TODO Auto-generated method stub
2245 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2247 // TODO Auto-generated method stub
2251 protected void followHighlight_actionPerformed()
2253 // TODO Auto-generated method stub
2257 protected void showNpFeats_actionPerformed(ActionEvent e)
2259 // TODO Auto-generated method stub
2263 protected void showDbRefs_actionPerformed(ActionEvent e)
2265 // TODO Auto-generated method stub
2269 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2273 protected void buildSortByAnnotationScoresMenu()
2277 protected void extractScores_actionPerformed(ActionEvent e)
2281 protected void outputText_actionPerformed(String formatName)
2285 public void addFromFile_actionPerformed(ActionEvent e)
2290 public void addFromText_actionPerformed(ActionEvent e)
2295 public void addFromURL_actionPerformed(ActionEvent e)
2300 public void exportFeatures_actionPerformed(ActionEvent e)
2305 public void exportAnnotations_actionPerformed(ActionEvent e)
2310 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2314 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2319 protected void closeMenuItem_actionPerformed(boolean b)
2323 protected void redoMenuItem_actionPerformed(ActionEvent e)
2327 protected void undoMenuItem_actionPerformed(ActionEvent e)
2331 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2335 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2339 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2343 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2347 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2351 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2355 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2359 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2363 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2367 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2371 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2375 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2379 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2383 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2387 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2391 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2395 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2399 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2403 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2407 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2411 protected void conservationMenuItem_actionPerformed(boolean selected)
2415 protected void printMenuItem_actionPerformed(ActionEvent e)
2419 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2423 protected void findMenuItem_actionPerformed(ActionEvent e)
2427 protected void abovePIDThreshold_actionPerformed(boolean selected)
2431 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2435 protected void deleteGroups_actionPerformed(ActionEvent e)
2439 protected void createGroup_actionPerformed(ActionEvent e)
2443 protected void unGroup_actionPerformed(ActionEvent e)
2447 protected void copy_actionPerformed()
2451 protected void cut_actionPerformed()
2455 protected void delete_actionPerformed()
2459 protected void pasteNew_actionPerformed(ActionEvent e)
2463 protected void pasteThis_actionPerformed(ActionEvent e)
2467 protected void applyToAllGroups_actionPerformed(boolean selected)
2471 public void createPNG(java.io.File f)
2475 protected void font_actionPerformed(ActionEvent e)
2479 protected void seqLimit_actionPerformed(ActionEvent e)
2483 public void seqDBRef_actionPerformed(ActionEvent e)
2488 public void createEPS(java.io.File f)
2492 public void createSVG(java.io.File f)
2497 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2503 * Template method to handle the 'load T-Coffee scores' menu event.
2505 * Subclasses override this method to provide a custom action.
2510 protected void loadScores_actionPerformed(ActionEvent event)
2515 protected void jpred_actionPerformed(ActionEvent e)
2519 protected void scaleAbove_actionPerformed(ActionEvent e)
2523 protected void scaleLeft_actionPerformed(ActionEvent e)
2527 protected void scaleRight_actionPerformed(ActionEvent e)
2531 protected void modifyPID_actionPerformed()
2535 protected void modifyConservation_actionPerformed()
2539 protected void saveAs_actionPerformed()
2543 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2547 public void vamsasStore_actionPerformed(ActionEvent e)
2552 public void vamsasLoad_actionPerformed(ActionEvent e)
2557 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2562 public void featureSettings_actionPerformed(ActionEvent e)
2567 public void fetchSequence_actionPerformed()
2572 public void smoothFont_actionPerformed(ActionEvent e)
2577 public void annotationColour_actionPerformed()
2581 public void annotationColumn_actionPerformed(ActionEvent e)
2585 public void associatedData_actionPerformed(ActionEvent e)
2590 public void autoCalculate_actionPerformed(ActionEvent e)
2595 public void sortByTreeOption_actionPerformed(ActionEvent e)
2600 public void showAllSeqs_actionPerformed(ActionEvent e)
2605 public void showAllColumns_actionPerformed(ActionEvent e)
2610 public void hideSelSequences_actionPerformed(ActionEvent e)
2615 public void hideSelColumns_actionPerformed(ActionEvent e)
2620 public void hiddenMarkers_actionPerformed(ActionEvent e)
2625 public void findPdbId_actionPerformed(ActionEvent e)
2630 public void enterPdbId_actionPerformed(ActionEvent e)
2635 public void pdbFile_actionPerformed(ActionEvent e)
2640 public void invertColSel_actionPerformed(ActionEvent e)
2645 public void tabSelectionChanged(int sel)
2650 public void tabbedPane_mousePressed(MouseEvent e)
2655 public void tabbedPane_focusGained(FocusEvent e)
2660 public void save_actionPerformed(ActionEvent e)
2665 public void reload_actionPerformed(ActionEvent e)
2670 public void newView_actionPerformed(ActionEvent e)
2675 public void textColour_actionPerformed()
2680 public void idRightAlign_actionPerformed(ActionEvent e)
2685 public void expandViews_actionPerformed(ActionEvent e)
2690 public void gatherViews_actionPerformed(ActionEvent e)
2695 public void buildTreeSortMenu()
2700 public void pageSetup_actionPerformed(ActionEvent e)
2705 public void alignmentProperties()
2710 protected void expand_newalign(ActionEvent e)
2712 // TODO Auto-generated method stub
2716 protected boolean isShowAutoCalculatedAbove()
2718 return showAutoCalculatedAbove;
2721 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2723 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2726 protected SequenceAnnotationOrder getAnnotationSortOrder()
2728 return annotationSortOrder;
2731 protected void setAnnotationSortOrder(
2732 SequenceAnnotationOrder annotationSortOrder)
2734 this.annotationSortOrder = annotationSortOrder;
2737 public Map<KeyStroke, JMenuItem> getAccelerators()
2739 return this.accelerators;
2743 * Returns the selected index of the tabbed pane, or -1 if none selected
2744 * (including the case where the tabbed pane has not been made visible).
2748 public int getTabIndex()
2750 return tabbedPane.getSelectedIndex();
2753 public JPanel getStatusPanel()
2759 * Sets a reference to the containing split frame. Also makes the 'toggle
2760 * split view' menu item visible and checked.
2764 public void setSplitFrame(SplitContainerI sf)
2766 this.splitFrame = sf;
2769 this.showComplementMenuItem.setVisible(true);
2770 this.showComplementMenuItem.setState(true);
2774 public SplitContainerI getSplitViewContainer()
2776 return this.splitFrame;
2779 protected void showComplement_actionPerformed(boolean complement)