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.bin.Jalview;
29 import jalview.gui.JvSwingUtils;
30 import jalview.gui.Preferences;
31 import jalview.io.FileFormats;
32 import jalview.schemes.ResidueColourScheme;
33 import jalview.util.MessageManager;
34 import jalview.util.Platform;
36 import java.awt.BorderLayout;
37 import java.awt.Color;
38 import java.awt.GridLayout;
39 import java.awt.Toolkit;
40 import java.awt.event.ActionEvent;
41 import java.awt.event.ActionListener;
42 import java.awt.event.FocusAdapter;
43 import java.awt.event.FocusEvent;
44 import java.awt.event.KeyEvent;
45 import java.awt.event.MouseAdapter;
46 import java.awt.event.MouseEvent;
47 import java.util.HashMap;
50 import javax.swing.BorderFactory;
51 import javax.swing.ButtonGroup;
52 import javax.swing.JCheckBoxMenuItem;
53 import javax.swing.JInternalFrame;
54 import javax.swing.JLabel;
55 import javax.swing.JMenu;
56 import javax.swing.JMenuBar;
57 import javax.swing.JMenuItem;
58 import javax.swing.JPanel;
59 import javax.swing.JRadioButtonMenuItem;
60 import javax.swing.JTabbedPane;
61 import javax.swing.KeyStroke;
62 import javax.swing.event.ChangeEvent;
63 import javax.swing.event.MenuEvent;
64 import javax.swing.event.MenuListener;
66 @SuppressWarnings("serial")
67 public class GAlignFrame extends JInternalFrame
69 protected JMenuBar alignFrameMenuBar = new JMenuBar();
71 protected JMenuItem closeMenuItem = new JMenuItem();
73 public JMenu webService = new JMenu();// BH 2019 was protected, but not
74 // sufficient for AlignFrame thread run
76 public JMenuItem webServiceNoServices;// BH 2019 was protected, but not
77 // sufficient for AlignFrame thread run
79 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
81 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
83 protected JMenu sortByAnnotScore = new JMenu();
85 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
87 // AlignFrame.printWriter
89 protected JMenu outputTextboxMenu = new JMenu();
91 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
93 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
95 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
97 protected JMenuItem undoMenuItem = new JMenuItem();
99 protected JMenuItem redoMenuItem = new JMenuItem();
101 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
103 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
105 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
107 JMenuItem copy = new JMenuItem();
109 JMenuItem cut = new JMenuItem();
111 JMenu pasteMenu = new JMenu();
113 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
115 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
117 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
119 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
121 protected JCheckBoxMenuItem applyToAllGroups;
123 protected JMenu colourMenu = new JMenu();
125 protected JMenuItem textColour;
127 protected JCheckBoxMenuItem conservationMenuItem;
129 protected JMenuItem modifyConservation;
131 protected JCheckBoxMenuItem abovePIDThreshold;
133 protected JMenuItem modifyPID;
135 protected JRadioButtonMenuItem annotationColour;
137 protected JMenu sortByTreeMenu = new JMenu();
139 protected JMenu sort = new JMenu();
141 protected JMenuItem calculateTree = new JMenuItem();
143 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
145 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
147 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
149 protected JMenu showTranslation = new JMenu();
151 protected JMenuItem showReverse = new JMenuItem();
153 protected JMenuItem showReverseComplement = new JMenuItem();
155 protected JMenu showProducts = new JMenu();
157 protected JMenuItem runGroovy = new JMenuItem();
159 protected JMenuItem loadVcf;
161 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
163 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
165 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
167 protected JPanel statusPanel = new JPanel();
169 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
171 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
173 protected JMenuItem showAllAlAnnotations = new JMenuItem();
175 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
177 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
179 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
181 protected JTabbedPane tabbedPane = new JTabbedPane();
183 protected JMenuItem reload = new JMenuItem();
185 protected JMenu formatMenu = new JMenu();
187 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
189 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
191 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
193 protected JMenuItem gatherViews = new JMenuItem();
195 protected JMenuItem expandViews = new JMenuItem();
197 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
201 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
207 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
209 protected JMenuItem openFeatureSettings;
211 private SequenceAnnotationOrder annotationSortOrder;
213 private boolean showAutoCalculatedAbove = false;
215 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
217 private SplitContainerI splitFrame;
224 // for Web-page embedding using id=align-frame-div
225 setName(Jalview.getAppID("alignment"));
228 setJMenuBar(alignFrameMenuBar);
230 // dynamically fill save as menu with available formats
231 for (String ff : FileFormats.getInstance().getWritableFormats(true))
233 JMenuItem item = new JMenuItem(ff);
235 item.addActionListener(new ActionListener()
238 public void actionPerformed(ActionEvent e)
240 outputText_actionPerformed(e.getActionCommand());
244 outputTextboxMenu.add(item);
246 } catch (Exception e)
248 System.err.println(e.toString());
251 if (Platform.allowMnemonics()) // was "not mac and not JS"
253 closeMenuItem.setMnemonic('C');
254 outputTextboxMenu.setMnemonic('T');
255 undoMenuItem.setMnemonic('Z');
256 redoMenuItem.setMnemonic('0');
257 copy.setMnemonic('C');
258 cut.setMnemonic('U');
259 pasteMenu.setMnemonic('P');
260 reload.setMnemonic('R');
264 private void jbInit() throws Exception
268 JMenuItem saveAs = new JMenuItem(
269 MessageManager.getString("action.save_as"));
270 ActionListener al = new ActionListener()
273 public void actionPerformed(ActionEvent e)
275 saveAs_actionPerformed();
279 // FIXME getDefaultToolkit throws an exception in Headless mode
280 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
281 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
282 | KeyEvent.SHIFT_MASK,
284 addMenuActionAndAccelerator(keyStroke, saveAs, al);
286 closeMenuItem.setText(MessageManager.getString("action.close"));
287 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
288 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
289 al = new ActionListener()
292 public void actionPerformed(ActionEvent e)
294 closeMenuItem_actionPerformed(false);
297 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
299 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
300 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
301 JMenu annotationsMenu = new JMenu(
302 MessageManager.getString("action.annotations"));
303 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
304 colourMenu.setText(MessageManager.getString("action.colour"));
305 JMenu calculateMenu = new JMenu(
306 MessageManager.getString("action.calculate"));
307 webService.setText(MessageManager.getString("action.web_service"));
308 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
309 MessageManager.getString("action.select_all"));
310 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
311 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
312 al = new ActionListener()
315 public void actionPerformed(ActionEvent e)
317 selectAllSequenceMenuItem_actionPerformed(e);
320 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
322 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
323 MessageManager.getString("action.deselect_all"));
324 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
325 al = new ActionListener()
328 public void actionPerformed(ActionEvent e)
330 deselectAllSequenceMenuItem_actionPerformed(e);
333 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
335 JMenuItem invertSequenceMenuItem = new JMenuItem(
336 MessageManager.getString("action.invert_sequence_selection"));
337 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
338 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
339 al = new ActionListener()
342 public void actionPerformed(ActionEvent e)
344 invertSequenceMenuItem_actionPerformed(e);
347 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
349 JMenuItem grpsFromSelection = new JMenuItem(
350 MessageManager.getString("action.make_groups_selection"));
351 grpsFromSelection.addActionListener(new ActionListener()
354 public void actionPerformed(ActionEvent e)
356 makeGrpsFromSelection_actionPerformed(e);
359 JMenuItem expandAlignment = new JMenuItem(
360 MessageManager.getString("action.view_flanking_regions"));
361 expandAlignment.setToolTipText(
362 MessageManager.getString("label.view_flanking_regions"));
363 expandAlignment.addActionListener(new ActionListener()
366 public void actionPerformed(ActionEvent e)
371 JMenuItem remove2LeftMenuItem = new JMenuItem(
372 MessageManager.getString("action.remove_left"));
373 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
374 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
375 al = new ActionListener()
378 public void actionPerformed(ActionEvent e)
380 remove2LeftMenuItem_actionPerformed(e);
383 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
385 JMenuItem remove2RightMenuItem = new JMenuItem(
386 MessageManager.getString("action.remove_right"));
387 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
388 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
389 al = new ActionListener()
392 public void actionPerformed(ActionEvent e)
394 remove2RightMenuItem_actionPerformed(e);
397 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
399 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
400 MessageManager.getString("action.remove_empty_columns"));
401 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
402 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
403 al = new ActionListener()
406 public void actionPerformed(ActionEvent e)
408 removeGappedColumnMenuItem_actionPerformed(e);
411 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
413 JMenuItem removeAllGapsMenuItem = new JMenuItem(
414 MessageManager.getString("action.remove_all_gaps"));
415 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
416 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
417 | KeyEvent.SHIFT_MASK,
419 al = new ActionListener()
422 public void actionPerformed(ActionEvent e)
424 removeAllGapsMenuItem_actionPerformed(e);
427 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
429 JMenuItem justifyLeftMenuItem = new JMenuItem(
430 MessageManager.getString("action.left_justify_alignment"));
431 justifyLeftMenuItem.addActionListener(new ActionListener()
434 public void actionPerformed(ActionEvent e)
436 justifyLeftMenuItem_actionPerformed(e);
439 JMenuItem justifyRightMenuItem = new JMenuItem(
440 MessageManager.getString("action.right_justify_alignment"));
441 justifyRightMenuItem.addActionListener(new ActionListener()
444 public void actionPerformed(ActionEvent e)
446 justifyRightMenuItem_actionPerformed(e);
449 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
450 viewBoxesMenuItem.setState(true);
451 viewBoxesMenuItem.addActionListener(new ActionListener()
454 public void actionPerformed(ActionEvent e)
456 viewBoxesMenuItem_actionPerformed(e);
459 viewTextMenuItem.setText(MessageManager.getString("action.text"));
460 viewTextMenuItem.setState(true);
461 viewTextMenuItem.addActionListener(new ActionListener()
464 public void actionPerformed(ActionEvent e)
466 viewTextMenuItem_actionPerformed(e);
469 showNonconservedMenuItem
470 .setText(MessageManager.getString("label.show_non_conserved"));
471 showNonconservedMenuItem.setState(false);
472 showNonconservedMenuItem.addActionListener(new ActionListener()
475 public void actionPerformed(ActionEvent e)
477 showUnconservedMenuItem_actionPerformed(e);
480 JMenuItem sortPairwiseMenuItem = new JMenuItem(
481 MessageManager.getString("action.by_pairwise_id"));
482 sortPairwiseMenuItem.addActionListener(new ActionListener()
485 public void actionPerformed(ActionEvent e)
487 sortPairwiseMenuItem_actionPerformed(e);
490 JMenuItem sortIDMenuItem = new JMenuItem(
491 MessageManager.getString("action.by_id"));
492 sortIDMenuItem.addActionListener(new ActionListener()
495 public void actionPerformed(ActionEvent e)
497 sortIDMenuItem_actionPerformed(e);
500 JMenuItem sortLengthMenuItem = new JMenuItem(
501 MessageManager.getString("action.by_length"));
502 sortLengthMenuItem.addActionListener(new ActionListener()
505 public void actionPerformed(ActionEvent e)
507 sortLengthMenuItem_actionPerformed(e);
510 JMenuItem sortGroupMenuItem = new JMenuItem(
511 MessageManager.getString("action.by_group"));
512 sortGroupMenuItem.addActionListener(new ActionListener()
515 public void actionPerformed(ActionEvent e)
517 sortGroupMenuItem_actionPerformed(e);
521 JMenuItem removeRedundancyMenuItem = new JMenuItem(
522 MessageManager.getString("action.remove_redundancy"));
523 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
524 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
525 al = new ActionListener()
528 public void actionPerformed(ActionEvent e)
530 removeRedundancyMenuItem_actionPerformed(e);
533 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
535 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
536 MessageManager.getString("action.pairwise_alignment"));
537 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
540 public void actionPerformed(ActionEvent e)
542 pairwiseAlignmentMenuItem_actionPerformed(e);
546 this.getContentPane().setLayout(new BorderLayout());
547 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
548 // statusBar.setBackground(Color.white); BH 2019.08.01 -- this does nothing,
549 // as the label is not opaque
550 statusBar.setOpaque(true);// BH 2019.07.01 -- setting a label opaque avoids
551 // frame repaint in SwingJS and has no effect in
553 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
554 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
555 statusBar.setText(MessageManager.getString("label.status_bar"));
557 .setText(MessageManager.getString("label.out_to_textbox"));
559 annotationPanelMenuItem.setActionCommand("");
560 annotationPanelMenuItem
561 .setText(MessageManager.getString("label.show_annotations"));
562 annotationPanelMenuItem
563 .setState(Cache.getDefault(Preferences.SHOW_ANNOTATIONS, true));
564 annotationPanelMenuItem.addActionListener(new ActionListener()
567 public void actionPerformed(ActionEvent e)
569 annotationPanelMenuItem_actionPerformed(e);
572 showAllAlAnnotations.setText(
573 MessageManager.getString("label.show_all_al_annotations"));
574 final boolean isAnnotationPanelShown = annotationPanelMenuItem
576 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
577 showAllAlAnnotations.addActionListener(new ActionListener()
580 public void actionPerformed(ActionEvent e)
582 showAllAnnotations_actionPerformed(false, true);
585 hideAllAlAnnotations.setText(
586 MessageManager.getString("label.hide_all_al_annotations"));
587 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
588 hideAllAlAnnotations.addActionListener(new ActionListener()
591 public void actionPerformed(ActionEvent e)
593 hideAllAnnotations_actionPerformed(false, true);
596 showAllSeqAnnotations.setText(
597 MessageManager.getString("label.show_all_seq_annotations"));
598 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
599 showAllSeqAnnotations.addActionListener(new ActionListener()
602 public void actionPerformed(ActionEvent e)
604 showAllAnnotations_actionPerformed(true, false);
607 hideAllSeqAnnotations.setText(
608 MessageManager.getString("label.hide_all_seq_annotations"));
609 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
610 hideAllSeqAnnotations.addActionListener(new ActionListener()
613 public void actionPerformed(ActionEvent e)
615 hideAllAnnotations_actionPerformed(true, false);
618 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
619 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
620 SequenceAnnotationOrder.NONE.name()));
621 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
622 MessageManager.getString("label.sort_annotations_by_sequence"));
623 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
624 MessageManager.getString("label.sort_annotations_by_label"));
626 sortAnnBySequence.setSelected(
627 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
628 sortAnnBySequence.addActionListener(new ActionListener()
631 public void actionPerformed(ActionEvent e)
633 boolean newState = sortAnnBySequence.getState();
634 sortAnnByLabel.setSelected(false);
635 setAnnotationSortOrder(
636 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
637 : SequenceAnnotationOrder.NONE);
638 sortAnnotations_actionPerformed();
641 sortAnnByLabel.setSelected(
642 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
643 sortAnnByLabel.addActionListener(new ActionListener()
646 public void actionPerformed(ActionEvent e)
648 boolean newState = sortAnnByLabel.getState();
649 sortAnnBySequence.setSelected(false);
650 setAnnotationSortOrder(
651 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
652 : SequenceAnnotationOrder.NONE);
653 sortAnnotations_actionPerformed();
656 colourTextMenuItem = new JCheckBoxMenuItem(
657 MessageManager.getString("label.colour_text"));
658 colourTextMenuItem.addActionListener(new ActionListener()
661 public void actionPerformed(ActionEvent e)
663 colourTextMenuItem_actionPerformed(e);
667 JMenuItem htmlMenuItem = new JMenuItem(
668 MessageManager.getString("label.html"));
669 htmlMenuItem.addActionListener(new ActionListener()
672 public void actionPerformed(ActionEvent e)
674 htmlMenuItem_actionPerformed(e);
678 JMenuItem createBioJS = new JMenuItem(
679 MessageManager.getString("label.biojs_html_export"));
680 createBioJS.addActionListener(new java.awt.event.ActionListener()
683 public void actionPerformed(ActionEvent e)
685 bioJSMenuItem_actionPerformed(e);
689 JMenuItem overviewMenuItem = new JMenuItem(
690 MessageManager.getString("label.overview_window"));
691 overviewMenuItem.addActionListener(new ActionListener()
694 public void actionPerformed(ActionEvent e)
696 overviewMenuItem_actionPerformed(e);
700 undoMenuItem.setEnabled(false);
701 undoMenuItem.setText(MessageManager.getString("action.undo"));
702 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
703 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
704 al = new ActionListener()
707 public void actionPerformed(ActionEvent e)
709 undoMenuItem_actionPerformed(e);
712 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
714 redoMenuItem.setEnabled(false);
715 redoMenuItem.setText(MessageManager.getString("action.redo"));
716 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
717 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
718 al = new ActionListener()
721 public void actionPerformed(ActionEvent e)
723 redoMenuItem_actionPerformed(e);
726 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
728 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
729 wrapMenuItem.addActionListener(new ActionListener()
732 public void actionPerformed(ActionEvent e)
734 wrapMenuItem_actionPerformed(e);
738 JMenuItem printMenuItem = new JMenuItem(
739 MessageManager.getString("action.print"));
740 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
741 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
742 al = new ActionListener()
745 public void actionPerformed(ActionEvent e)
747 printMenuItem_actionPerformed(e);
750 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
753 .setText(MessageManager.getString("action.show_gaps"));
754 renderGapsMenuItem.setState(true);
755 renderGapsMenuItem.addActionListener(new ActionListener()
758 public void actionPerformed(ActionEvent e)
760 renderGapsMenuItem_actionPerformed(e);
764 JMenuItem findMenuItem = new JMenuItem(
765 MessageManager.getString("action.find"));
766 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
767 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
768 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
769 MessageManager.getString("label.find_tip")));
770 al = new ActionListener()
773 public void actionPerformed(ActionEvent e)
775 findMenuItem_actionPerformed(e);
778 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
780 showSeqFeatures.setText(
781 MessageManager.getString("label.show_sequence_features"));
782 showSeqFeatures.addActionListener(new ActionListener()
785 public void actionPerformed(ActionEvent actionEvent)
787 showSeqFeatures_actionPerformed(actionEvent);
791 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
792 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
793 * void actionPerformed(ActionEvent actionEvent) {
794 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
797 .setText(MessageManager.getString("label.show_database_refs"));
798 showDbRefsMenuitem.addActionListener(new ActionListener()
802 public void actionPerformed(ActionEvent e)
804 showDbRefs_actionPerformed(e);
808 showNpFeatsMenuitem.setText(
809 MessageManager.getString("label.show_non_positional_features"));
810 showNpFeatsMenuitem.addActionListener(new ActionListener()
814 public void actionPerformed(ActionEvent e)
816 showNpFeats_actionPerformed(e);
820 showGroupConservation
821 .setText(MessageManager.getString("label.group_conservation"));
822 showGroupConservation.addActionListener(new ActionListener()
826 public void actionPerformed(ActionEvent e)
828 showGroupConservation_actionPerformed(e);
834 .setText(MessageManager.getString("label.group_consensus"));
835 showGroupConsensus.addActionListener(new ActionListener()
839 public void actionPerformed(ActionEvent e)
841 showGroupConsensus_actionPerformed(e);
845 showConsensusHistogram.setText(
846 MessageManager.getString("label.show_consensus_histogram"));
847 showConsensusHistogram.addActionListener(new ActionListener()
851 public void actionPerformed(ActionEvent e)
853 showConsensusHistogram_actionPerformed(e);
858 .setText(MessageManager.getString("label.show_consensus_logo"));
859 showSequenceLogo.addActionListener(new ActionListener()
863 public void actionPerformed(ActionEvent e)
865 showSequenceLogo_actionPerformed(e);
869 normaliseSequenceLogo
870 .setText(MessageManager.getString("label.norm_consensus_logo"));
871 normaliseSequenceLogo.addActionListener(new ActionListener()
875 public void actionPerformed(ActionEvent e)
877 normaliseSequenceLogo_actionPerformed(e);
881 applyAutoAnnotationSettings
882 .setText(MessageManager.getString("label.apply_all_groups"));
883 applyAutoAnnotationSettings.setState(false);
884 applyAutoAnnotationSettings.setVisible(true);
885 applyAutoAnnotationSettings.addActionListener(new ActionListener()
888 public void actionPerformed(ActionEvent e)
890 applyAutoAnnotationSettings_actionPerformed(e);
894 ButtonGroup buttonGroup = new ButtonGroup();
895 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
896 MessageManager.getString("label.show_first"));
897 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
898 MessageManager.getString("label.show_last"));
899 buttonGroup.add(showAutoFirst);
900 buttonGroup.add(showAutoLast);
901 final boolean autoFirst = Cache
902 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
903 showAutoFirst.setSelected(autoFirst);
904 setShowAutoCalculatedAbove(autoFirst);
905 showAutoFirst.addActionListener(new ActionListener()
908 public void actionPerformed(ActionEvent e)
910 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
911 sortAnnotations_actionPerformed();
914 showAutoLast.setSelected(!showAutoFirst.isSelected());
915 showAutoLast.addActionListener(new ActionListener()
918 public void actionPerformed(ActionEvent e)
920 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
921 sortAnnotations_actionPerformed();
925 JMenuItem deleteGroups = new JMenuItem(
926 MessageManager.getString("action.undefine_groups"));
927 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
928 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
929 al = new ActionListener()
932 public void actionPerformed(ActionEvent e)
934 deleteGroups_actionPerformed(e);
937 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
939 JMenuItem annotationColumn = new JMenuItem(
940 MessageManager.getString("action.select_by_annotation"));
941 annotationColumn.addActionListener(new ActionListener()
944 public void actionPerformed(ActionEvent e)
946 annotationColumn_actionPerformed(e);
950 JMenuItem createGroup = new JMenuItem(
951 MessageManager.getString("action.create_group"));
952 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
953 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
954 al = new ActionListener()
957 public void actionPerformed(ActionEvent e)
959 createGroup_actionPerformed(e);
962 addMenuActionAndAccelerator(keyStroke, createGroup, al);
964 JMenuItem unGroup = new JMenuItem(
965 MessageManager.getString("action.remove_group"));
966 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
967 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
968 | KeyEvent.SHIFT_MASK,
970 al = new ActionListener()
973 public void actionPerformed(ActionEvent e)
975 unGroup_actionPerformed(e);
978 addMenuActionAndAccelerator(keyStroke, unGroup, al);
980 copy.setText(MessageManager.getString("action.copy"));
981 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
982 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
984 al = new ActionListener()
987 public void actionPerformed(ActionEvent e)
989 copy_actionPerformed();
992 addMenuActionAndAccelerator(keyStroke, copy, al);
994 cut.setText(MessageManager.getString("action.cut"));
995 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
996 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
997 al = new ActionListener()
1000 public void actionPerformed(ActionEvent e)
1002 cut_actionPerformed();
1005 addMenuActionAndAccelerator(keyStroke, cut, al);
1007 JMenuItem delete = new JMenuItem(
1008 MessageManager.getString("action.delete"));
1009 delete.addActionListener(new ActionListener()
1012 public void actionPerformed(ActionEvent e)
1014 delete_actionPerformed();
1018 pasteMenu.setText(MessageManager.getString("action.paste"));
1019 JMenuItem pasteNew = new JMenuItem(
1020 MessageManager.getString("label.to_new_alignment"));
1021 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1022 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1023 | KeyEvent.SHIFT_MASK,
1025 al = new ActionListener()
1028 public void actionPerformed(ActionEvent e)
1030 pasteNew_actionPerformed(e);
1033 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1035 JMenuItem pasteThis = new JMenuItem(
1036 MessageManager.getString("label.to_this_alignment"));
1037 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1038 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1039 al = new ActionListener()
1042 public void actionPerformed(ActionEvent e)
1044 pasteThis_actionPerformed(e);
1047 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1049 JMenuItem createPNG = new JMenuItem("PNG");
1050 createPNG.addActionListener(new ActionListener()
1053 public void actionPerformed(ActionEvent e)
1058 createPNG.setActionCommand(
1059 MessageManager.getString("label.save_png_image"));
1061 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1062 font.addActionListener(new ActionListener()
1065 public void actionPerformed(ActionEvent e)
1067 font_actionPerformed(e);
1071 MessageManager.getString("label.show_sequence_limits"));
1072 seqLimits.setState(jalview.bin.Cache.getDefault(Preferences.SHOW_JVSUFFIX, true));
1073 seqLimits.addActionListener(new ActionListener()
1076 public void actionPerformed(ActionEvent e)
1078 seqLimit_actionPerformed(e);
1081 JMenuItem epsFile = new JMenuItem("EPS");
1082 epsFile.addActionListener(new ActionListener()
1085 public void actionPerformed(ActionEvent e)
1091 JMenuItem createSVG = new JMenuItem("SVG");
1092 createSVG.addActionListener(new ActionListener()
1095 public void actionPerformed(ActionEvent e)
1101 JMenuItem loadTreeMenuItem = new JMenuItem(
1102 MessageManager.getString("label.load_associated_tree"));
1103 loadTreeMenuItem.setActionCommand(
1104 MessageManager.getString("label.load_tree_for_sequence_set"));
1105 loadTreeMenuItem.addActionListener(new ActionListener()
1108 public void actionPerformed(ActionEvent e)
1110 loadTreeMenuItem_actionPerformed(e);
1114 scaleAbove.setVisible(false);
1115 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1116 scaleAbove.addActionListener(new ActionListener()
1119 public void actionPerformed(ActionEvent e)
1121 scaleAbove_actionPerformed(e);
1124 scaleLeft.setVisible(false);
1125 scaleLeft.setSelected(true);
1126 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1127 scaleLeft.addActionListener(new ActionListener()
1130 public void actionPerformed(ActionEvent e)
1132 scaleLeft_actionPerformed(e);
1135 scaleRight.setVisible(false);
1136 scaleRight.setSelected(true);
1137 scaleRight.setText(MessageManager.getString("action.scale_right"));
1138 scaleRight.addActionListener(new ActionListener()
1141 public void actionPerformed(ActionEvent e)
1143 scaleRight_actionPerformed(e);
1146 centreColumnLabelsMenuItem.setVisible(true);
1147 centreColumnLabelsMenuItem.setState(false);
1148 centreColumnLabelsMenuItem.setText(
1149 MessageManager.getString("label.centre_column_labels"));
1150 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1153 public void actionPerformed(ActionEvent e)
1155 centreColumnLabels_actionPerformed(e);
1158 followHighlightMenuItem.setVisible(true);
1159 followHighlightMenuItem.setState(true);
1160 followHighlightMenuItem
1161 .setText(MessageManager.getString("label.automatic_scrolling"));
1162 followHighlightMenuItem.addActionListener(new ActionListener()
1166 public void actionPerformed(ActionEvent e)
1168 followHighlight_actionPerformed();
1174 .setText(MessageManager.getString("action.by_tree_order"));
1175 sort.setText(MessageManager.getString("action.sort"));
1176 sort.addMenuListener(new MenuListener()
1179 public void menuSelected(MenuEvent e)
1181 buildTreeSortMenu();
1185 public void menuDeselected(MenuEvent e)
1190 public void menuCanceled(MenuEvent e)
1195 .setText(MessageManager.getString("label.sort_by_score"));
1196 sort.add(sortByAnnotScore);
1197 sort.addMenuListener(new javax.swing.event.MenuListener()
1201 public void menuCanceled(MenuEvent e)
1206 public void menuDeselected(MenuEvent e)
1211 public void menuSelected(MenuEvent e)
1213 buildSortByAnnotationScoresMenu();
1216 sortByAnnotScore.setVisible(false);
1219 .setText(MessageManager.getString("action.calculate_tree_pca"));
1221 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1223 .setState(jalview.bin.Cache.getDefault(Preferences.PAD_GAPS, false));
1224 padGapsMenuitem.addActionListener(new ActionListener()
1227 public void actionPerformed(ActionEvent e)
1229 padGapsMenuitem_actionPerformed(e);
1232 JMenuItem vamsasStore = new JMenuItem(
1233 MessageManager.getString("label.vamsas_store"));
1234 vamsasStore.setVisible(false);
1235 vamsasStore.addActionListener(new ActionListener()
1238 public void actionPerformed(ActionEvent e)
1240 vamsasStore_actionPerformed(e);
1245 * Translate as cDNA with sub-menu of translation tables
1248 .setText(MessageManager.getString("label.translate_cDNA"));
1249 boolean first = true;
1250 for (final GeneticCodeI table : GeneticCodes.getCodeTables())
1252 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1253 showTranslation.add(item);
1254 item.addActionListener(new ActionListener()
1257 public void actionPerformed(ActionEvent e)
1259 showTranslation_actionPerformed(table);
1264 showTranslation.addSeparator();
1269 showReverse.setText(MessageManager.getString("label.reverse"));
1270 showReverse.addActionListener(new ActionListener()
1273 public void actionPerformed(ActionEvent e)
1275 showReverse_actionPerformed(false);
1278 showReverseComplement
1279 .setText(MessageManager.getString("label.reverse_complement"));
1280 showReverseComplement.addActionListener(new ActionListener()
1283 public void actionPerformed(ActionEvent e)
1285 showReverse_actionPerformed(true);
1289 JMenuItem extractScores = new JMenuItem(
1290 MessageManager.getString("label.extract_scores"));
1291 extractScores.addActionListener(new ActionListener()
1294 public void actionPerformed(ActionEvent e)
1296 extractScores_actionPerformed(e);
1299 extractScores.setVisible(true);
1300 // JBPNote: TODO: make gui for regex based score extraction
1302 // for show products actions see AlignFrame.canShowProducts
1303 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1305 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1306 runGroovy.setToolTipText(
1307 MessageManager.getString("label.run_groovy_tip"));
1308 runGroovy.addActionListener(new ActionListener()
1311 public void actionPerformed(ActionEvent e)
1313 runGroovy_actionPerformed();
1317 openFeatureSettings = new JMenuItem(
1318 MessageManager.getString("action.feature_settings"));
1319 openFeatureSettings.addActionListener(new ActionListener()
1322 public void actionPerformed(ActionEvent e)
1324 featureSettings_actionPerformed(e);
1329 * add sub-menu of database we can fetch from
1331 JMenuItem fetchSequence = new JMenuItem(
1332 MessageManager.getString("label.fetch_sequences"));
1333 fetchSequence.addActionListener(new ActionListener()
1336 public void actionPerformed(ActionEvent e)
1338 fetchSequence_actionPerformed();
1342 JMenuItem associatedData = new JMenuItem(
1343 MessageManager.getString("label.load_features_annotations"));
1344 associatedData.addActionListener(new ActionListener()
1347 public void actionPerformed(ActionEvent e)
1349 associatedData_actionPerformed(e);
1352 loadVcf = new JMenuItem(
1353 MessageManager.getString("label.load_vcf_file"));
1354 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1355 loadVcf.addActionListener(new ActionListener()
1358 public void actionPerformed(ActionEvent e)
1360 loadVcf_actionPerformed();
1363 autoCalculate.setText(
1364 MessageManager.getString("label.autocalculate_consensus"));
1365 autoCalculate.setState(
1366 jalview.bin.Cache.getDefault(Preferences.AUTO_CALC_CONSENSUS, true));
1367 autoCalculate.addActionListener(new ActionListener()
1370 public void actionPerformed(ActionEvent e)
1372 autoCalculate_actionPerformed(e);
1376 MessageManager.getString("label.sort_alignment_new_tree"));
1377 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1378 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1380 .setState(jalview.bin.Cache.getDefault(Preferences.SORT_BY_TREE,
1382 sortByTree.addActionListener(new ActionListener()
1385 public void actionPerformed(ActionEvent e)
1387 sortByTreeOption_actionPerformed(e);
1391 listenToViewSelections.setText(
1392 MessageManager.getString("label.listen_for_selections"));
1393 listenToViewSelections
1394 .setToolTipText("<html>" + MessageManager.getString(
1395 "label.selections_mirror_selections_made_same_sequences_other_views"));
1396 listenToViewSelections.setState(false);
1397 listenToViewSelections.addActionListener(new ActionListener()
1400 public void actionPerformed(ActionEvent e)
1402 listenToViewSelections_actionPerformed(e);
1406 JMenu addSequenceMenu = new JMenu(
1407 MessageManager.getString("label.add_sequences"));
1408 JMenuItem addFromFile = new JMenuItem(
1409 MessageManager.getString("label.from_file"));
1410 addFromFile.addActionListener(new ActionListener()
1413 public void actionPerformed(ActionEvent e)
1415 addFromFile_actionPerformed(e);
1418 JMenuItem addFromText = new JMenuItem(
1419 MessageManager.getString("label.from_textbox"));
1420 addFromText.addActionListener(new ActionListener()
1423 public void actionPerformed(ActionEvent e)
1425 addFromText_actionPerformed(e);
1428 JMenuItem addFromURL = new JMenuItem(
1429 MessageManager.getString("label.from_url"));
1430 addFromURL.addActionListener(new ActionListener()
1433 public void actionPerformed(ActionEvent e)
1435 addFromURL_actionPerformed(e);
1438 JMenuItem exportFeatures = new JMenuItem(
1439 MessageManager.getString("label.export_features"));
1440 exportFeatures.addActionListener(new ActionListener()
1443 public void actionPerformed(ActionEvent e)
1445 exportFeatures_actionPerformed(e);
1448 JMenuItem exportAnnotations = new JMenuItem(
1449 MessageManager.getString("label.export_annotations"));
1450 exportAnnotations.addActionListener(new ActionListener()
1453 public void actionPerformed(ActionEvent e)
1455 exportAnnotations_actionPerformed(e);
1458 statusPanel.setLayout(new GridLayout());
1459 JMenuItem showAllSeqs = new JMenuItem(
1460 MessageManager.getString("label.all_sequences"));
1461 showAllSeqs.setToolTipText(
1462 MessageManager.getString("label.toggle_sequence_visibility"));
1463 showAllSeqs.addActionListener(new ActionListener()
1466 public void actionPerformed(ActionEvent e)
1468 showAllSeqs_actionPerformed(e);
1471 JMenuItem showAllColumns = new JMenuItem(
1472 MessageManager.getString("label.all_columns"));
1473 showAllColumns.setToolTipText(
1474 MessageManager.getString("label.toggle_columns_visibility"));
1475 showAllColumns.addActionListener(new ActionListener()
1478 public void actionPerformed(ActionEvent e)
1480 showAllColumns_actionPerformed(e);
1483 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1484 JMenuItem hideSelSequences = new JMenuItem(
1485 MessageManager.getString("label.selected_sequences"));
1486 hideSelSequences.setToolTipText(
1487 MessageManager.getString("label.toggle_sequence_visibility"));
1488 hideSelSequences.addActionListener(new ActionListener()
1491 public void actionPerformed(ActionEvent e)
1493 hideSelSequences_actionPerformed(e);
1496 JMenuItem hideSelColumns = new JMenuItem(
1497 MessageManager.getString("label.selected_columns"));
1498 hideSelColumns.setToolTipText(
1499 MessageManager.getString("label.toggle_columns_visibility"));
1500 hideSelColumns.addActionListener(new ActionListener()
1503 public void actionPerformed(ActionEvent e)
1505 hideSelColumns_actionPerformed(e);
1508 JMenuItem hideAllSelection = new JMenuItem(
1509 MessageManager.getString("label.selected_region"));
1510 hideAllSelection.addActionListener(new ActionListener()
1513 public void actionPerformed(ActionEvent e)
1515 hideAllSelection_actionPerformed(e);
1518 // TODO: should be hidden if no selection exists.
1519 JMenuItem hideAllButSelection = new JMenuItem(
1520 MessageManager.getString("label.all_but_selected_region"));
1521 hideAllButSelection.addActionListener(new ActionListener()
1524 public void actionPerformed(ActionEvent e)
1526 hideAllButSelection_actionPerformed(e);
1529 JMenuItem showAllhidden = new JMenuItem(
1530 MessageManager.getString("label.all_sequences_columns"));
1531 showAllhidden.setToolTipText(MessageManager
1532 .getString("label.toggles_visibility_hidden_selected_regions"));
1533 showAllhidden.addActionListener(new ActionListener()
1536 public void actionPerformed(ActionEvent e)
1538 showAllhidden_actionPerformed(e);
1541 hiddenMarkers.setText(
1542 MessageManager.getString("action.show_hidden_markers"));
1543 hiddenMarkers.addActionListener(new ActionListener()
1546 public void actionPerformed(ActionEvent e)
1548 hiddenMarkers_actionPerformed(e);
1552 JMenuItem invertColSel = new JMenuItem(
1553 MessageManager.getString("action.invert_column_selection"));
1554 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1555 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1556 | KeyEvent.ALT_MASK,
1558 al = new ActionListener()
1561 public void actionPerformed(ActionEvent e)
1563 invertColSel_actionPerformed(e);
1566 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1568 showComplementMenuItem.setVisible(false);
1569 showComplementMenuItem.addActionListener(new ActionListener()
1572 public void actionPerformed(ActionEvent e)
1574 showComplement_actionPerformed(showComplementMenuItem.getState());
1578 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1581 public void stateChanged(ChangeEvent evt)
1583 JTabbedPane pane = (JTabbedPane) evt.getSource();
1584 int sel = pane.getSelectedIndex();
1585 tabSelectionChanged(sel);
1588 tabbedPane.addMouseListener(new MouseAdapter()
1591 public void mousePressed(MouseEvent e)
1593 if (e.isPopupTrigger()) // Mac
1595 tabbedPane_mousePressed(e);
1600 public void mouseReleased(MouseEvent e)
1602 if (e.isPopupTrigger()) // Windows
1604 tabbedPane_mousePressed(e);
1608 tabbedPane.addFocusListener(new FocusAdapter()
1611 public void focusGained(FocusEvent e)
1613 tabbedPane_focusGained(e);
1617 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1618 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1619 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1620 al = new ActionListener()
1623 public void actionPerformed(ActionEvent e)
1625 save_actionPerformed(e);
1628 addMenuActionAndAccelerator(keyStroke, save, al);
1630 reload.setEnabled(false);
1631 reload.setText(MessageManager.getString("action.reload"));
1632 reload.addActionListener(new ActionListener()
1635 public void actionPerformed(ActionEvent e)
1637 reload_actionPerformed(e);
1641 JMenuItem newView = new JMenuItem(
1642 MessageManager.getString("action.new_view"));
1643 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1644 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1645 al = new ActionListener()
1648 public void actionPerformed(ActionEvent e)
1650 newView_actionPerformed(e);
1653 addMenuActionAndAccelerator(keyStroke, newView, al);
1655 tabbedPane.setToolTipText("<html><i>"
1656 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1659 formatMenu.setText(MessageManager.getString("action.format"));
1660 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1662 idRightAlign.setText(
1663 MessageManager.getString("label.right_align_sequence_id"));
1664 idRightAlign.addActionListener(new ActionListener()
1667 public void actionPerformed(ActionEvent e)
1669 idRightAlign_actionPerformed(e);
1673 gatherViews.setEnabled(false);
1674 gatherViews.setText(MessageManager.getString("action.gather_views"));
1675 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1676 al = new ActionListener()
1679 public void actionPerformed(ActionEvent e)
1681 gatherViews_actionPerformed(e);
1684 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1686 expandViews.setEnabled(false);
1687 expandViews.setText(MessageManager.getString("action.expand_views"));
1688 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1689 al = new ActionListener()
1692 public void actionPerformed(ActionEvent e)
1694 expandViews_actionPerformed(e);
1697 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1699 JMenuItem pageSetup = new JMenuItem(
1700 MessageManager.getString("action.page_setup"));
1701 pageSetup.addActionListener(new ActionListener()
1704 public void actionPerformed(ActionEvent e)
1706 pageSetup_actionPerformed(e);
1709 JMenuItem alignmentProperties = new JMenuItem(
1710 MessageManager.getString("label.alignment_props"));
1711 alignmentProperties.addActionListener(new ActionListener()
1714 public void actionPerformed(ActionEvent actionEvent)
1716 alignmentProperties();
1719 JMenuItem selectHighlighted = new JMenuItem(
1720 MessageManager.getString("action.select_highlighted_columns"));
1721 selectHighlighted.setToolTipText(
1722 MessageManager.getString("tooltip.select_highlighted_columns"));
1723 al = new ActionListener()
1726 public void actionPerformed(ActionEvent actionEvent)
1728 selectHighlightedColumns_actionPerformed(actionEvent);
1731 selectHighlighted.addActionListener(al);
1732 JMenu tooltipSettingsMenu = new JMenu(
1733 MessageManager.getString("label.sequence_id_tooltip"));
1734 JMenu autoAnnMenu = new JMenu(
1735 MessageManager.getString("label.autocalculated_annotation"));
1737 JMenu exportImageMenu = new JMenu(
1738 MessageManager.getString("label.export_image"));
1739 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1740 alignFrameMenuBar.add(fileMenu);
1741 alignFrameMenuBar.add(editMenu);
1742 alignFrameMenuBar.add(selectMenu);
1743 alignFrameMenuBar.add(viewMenu);
1744 alignFrameMenuBar.add(annotationsMenu);
1745 alignFrameMenuBar.add(formatMenu);
1746 alignFrameMenuBar.add(colourMenu);
1747 alignFrameMenuBar.add(calculateMenu);
1748 if (!Platform.isJS())
1750 alignFrameMenuBar.add(webService);
1753 fileMenu.add(fetchSequence);
1754 fileMenu.add(addSequenceMenu);
1755 fileMenu.add(reload);
1756 fileMenu.addSeparator();
1757 fileMenu.add(vamsasStore);
1759 fileMenu.add(saveAs);
1760 fileMenu.add(outputTextboxMenu);
1761 fileMenu.add(pageSetup);
1762 fileMenu.add(printMenuItem);
1763 fileMenu.addSeparator();
1764 fileMenu.add(exportImageMenu);
1765 fileMenu.add(exportFeatures);
1766 fileMenu.add(exportAnnotations);
1767 fileMenu.add(loadTreeMenuItem);
1768 fileMenu.add(associatedData);
1769 if (!Platform.isJS())
1771 fileMenu.add(loadVcf);
1773 fileMenu.addSeparator();
1774 fileMenu.add(closeMenuItem);
1776 pasteMenu.add(pasteNew);
1777 pasteMenu.add(pasteThis);
1778 editMenu.add(undoMenuItem);
1779 editMenu.add(redoMenuItem);
1782 editMenu.add(pasteMenu);
1783 editMenu.add(delete);
1784 editMenu.addSeparator();
1785 editMenu.add(remove2LeftMenuItem);
1786 editMenu.add(remove2RightMenuItem);
1787 editMenu.add(removeGappedColumnMenuItem);
1788 editMenu.add(removeAllGapsMenuItem);
1789 editMenu.add(removeRedundancyMenuItem);
1790 editMenu.addSeparator();
1791 // dont add these yet in the CVS build - they cannot be undone!
1792 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1793 // editMenu.add(justifyLeftMenuItem);
1794 // editMenu.add(justifyRightMenuItem);
1795 // editMenu.addSeparator();
1796 editMenu.add(padGapsMenuitem);
1798 showMenu.add(showAllColumns);
1799 showMenu.add(showAllSeqs);
1800 showMenu.add(showAllhidden);
1801 hideMenu.add(hideSelColumns);
1802 hideMenu.add(hideSelSequences);
1803 hideMenu.add(hideAllSelection);
1804 hideMenu.add(hideAllButSelection);
1805 viewMenu.add(newView);
1806 viewMenu.add(expandViews);
1807 viewMenu.add(gatherViews);
1808 viewMenu.addSeparator();
1809 viewMenu.add(showMenu);
1810 viewMenu.add(hideMenu);
1811 viewMenu.add(showComplementMenuItem);
1812 viewMenu.addSeparator();
1813 viewMenu.add(followHighlightMenuItem);
1814 viewMenu.addSeparator();
1815 viewMenu.add(showSeqFeatures);
1816 // viewMenu.add(showSeqFeaturesHeight);
1817 viewMenu.add(openFeatureSettings);
1818 tooltipSettingsMenu.add(showDbRefsMenuitem);
1819 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1820 viewMenu.add(tooltipSettingsMenu);
1821 viewMenu.addSeparator();
1822 viewMenu.add(alignmentProperties);
1823 viewMenu.addSeparator();
1824 viewMenu.add(overviewMenuItem);
1826 annotationsMenu.add(annotationPanelMenuItem);
1827 annotationsMenu.addSeparator();
1828 annotationsMenu.add(showAllAlAnnotations);
1829 annotationsMenu.add(hideAllAlAnnotations);
1830 annotationsMenu.addSeparator();
1831 annotationsMenu.add(showAllSeqAnnotations);
1832 annotationsMenu.add(hideAllSeqAnnotations);
1833 annotationsMenu.add(sortAnnBySequence);
1834 annotationsMenu.add(sortAnnByLabel);
1835 annotationsMenu.addSeparator();
1836 autoAnnMenu.add(showAutoFirst);
1837 autoAnnMenu.add(showAutoLast);
1838 autoAnnMenu.addSeparator();
1839 autoAnnMenu.add(applyAutoAnnotationSettings);
1840 autoAnnMenu.add(showConsensusHistogram);
1841 autoAnnMenu.add(showSequenceLogo);
1842 autoAnnMenu.add(normaliseSequenceLogo);
1843 autoAnnMenu.addSeparator();
1844 autoAnnMenu.add(showGroupConservation);
1845 autoAnnMenu.add(showGroupConsensus);
1846 annotationsMenu.add(autoAnnMenu);
1848 sort.add(sortIDMenuItem);
1849 sort.add(sortLengthMenuItem);
1850 sort.add(sortGroupMenuItem);
1851 sort.add(sortPairwiseMenuItem);
1852 sort.add(sortByTreeMenu);
1853 calculateMenu.add(sort);
1854 calculateMenu.add(calculateTree);
1855 calculateMenu.addSeparator();
1856 calculateMenu.add(pairwiseAlignmentMenuItem);
1857 calculateMenu.addSeparator();
1858 calculateMenu.add(showTranslation);
1859 calculateMenu.add(showReverse);
1860 calculateMenu.add(showReverseComplement);
1861 calculateMenu.add(showProducts);
1862 calculateMenu.add(autoCalculate);
1863 calculateMenu.add(sortByTree);
1864 calculateMenu.addSeparator();
1865 calculateMenu.add(expandAlignment);
1866 calculateMenu.add(extractScores);
1867 if (!Platform.isJS())
1869 calculateMenu.addSeparator();
1870 calculateMenu.add(runGroovy);
1873 webServiceNoServices = new JMenuItem(
1874 MessageManager.getString("label.no_services"));
1875 webService.add(webServiceNoServices);
1876 if (!Platform.isJS())
1878 exportImageMenu.add(htmlMenuItem);
1880 exportImageMenu.add(epsFile);
1881 exportImageMenu.add(createPNG);
1882 if (!Platform.isJS())
1884 exportImageMenu.add(createBioJS);
1885 exportImageMenu.add(createSVG);
1887 addSequenceMenu.add(addFromFile);
1888 addSequenceMenu.add(addFromText);
1889 addSequenceMenu.add(addFromURL);
1890 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1891 statusPanel.add(statusBar, null);
1892 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1894 formatMenu.add(font);
1895 formatMenu.addSeparator();
1896 formatMenu.add(wrapMenuItem);
1897 formatMenu.add(scaleAbove);
1898 formatMenu.add(scaleLeft);
1899 formatMenu.add(scaleRight);
1900 formatMenu.add(seqLimits);
1901 formatMenu.add(idRightAlign);
1902 formatMenu.add(hiddenMarkers);
1903 formatMenu.add(viewBoxesMenuItem);
1904 formatMenu.add(viewTextMenuItem);
1905 formatMenu.add(colourTextMenuItem);
1906 formatMenu.add(renderGapsMenuItem);
1907 formatMenu.add(centreColumnLabelsMenuItem);
1908 formatMenu.add(showNonconservedMenuItem);
1909 selectMenu.add(findMenuItem);
1910 selectMenu.addSeparator();
1911 selectMenu.add(selectAllSequenceMenuItem);
1912 selectMenu.add(deselectAllSequenceMenuItem);
1913 selectMenu.add(invertSequenceMenuItem);
1914 selectMenu.add(invertColSel);
1915 selectMenu.add(createGroup);
1916 selectMenu.add(unGroup);
1917 selectMenu.add(grpsFromSelection);
1918 selectMenu.add(deleteGroups);
1919 selectMenu.add(annotationColumn);
1920 selectMenu.add(selectHighlighted);
1921 // TODO - determine if the listenToViewSelections button is needed : see bug
1923 // selectMenu.addSeparator();
1924 // selectMenu.add(listenToViewSelections);
1927 protected void loadVcf_actionPerformed()
1932 * Constructs the entries on the Colour menu (but does not add them to the
1935 protected void initColourMenu()
1937 applyToAllGroups = new JCheckBoxMenuItem(
1938 MessageManager.getString("label.apply_colour_to_all_groups"));
1939 applyToAllGroups.addActionListener(new ActionListener()
1942 public void actionPerformed(ActionEvent e)
1944 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1948 textColour = new JMenuItem(
1949 MessageManager.getString("label.text_colour"));
1950 textColour.addActionListener(new ActionListener()
1953 public void actionPerformed(ActionEvent e)
1955 textColour_actionPerformed();
1959 conservationMenuItem = new JCheckBoxMenuItem(
1960 MessageManager.getString("action.by_conservation"));
1961 conservationMenuItem.addActionListener(new ActionListener()
1964 public void actionPerformed(ActionEvent e)
1966 conservationMenuItem_actionPerformed(
1967 conservationMenuItem.isSelected());
1971 abovePIDThreshold = new JCheckBoxMenuItem(
1972 MessageManager.getString("label.above_identity_threshold"));
1973 abovePIDThreshold.addActionListener(new ActionListener()
1976 public void actionPerformed(ActionEvent e)
1978 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1981 modifyPID = new JMenuItem(
1982 MessageManager.getString("label.modify_identity_threshold"));
1983 modifyPID.addActionListener(new ActionListener()
1986 public void actionPerformed(ActionEvent e)
1988 modifyPID_actionPerformed();
1991 modifyConservation = new JMenuItem(MessageManager
1992 .getString("label.modify_conservation_threshold"));
1993 modifyConservation.addActionListener(new ActionListener()
1996 public void actionPerformed(ActionEvent e)
1998 modifyConservation_actionPerformed();
2002 annotationColour = new JRadioButtonMenuItem(
2003 MessageManager.getString("action.by_annotation"));
2004 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2005 annotationColour.addActionListener(new ActionListener()
2008 public void actionPerformed(ActionEvent e)
2010 annotationColour_actionPerformed();
2015 protected void selectHighlightedColumns_actionPerformed(
2016 ActionEvent actionEvent)
2018 // TODO Auto-generated method stub
2023 * Generate the reverse sequence (or reverse complement if the flag is true)
2024 * and add it to the alignment
2028 protected void showReverse_actionPerformed(boolean complement)
2033 * Try to run script in a Groovy console, having first ensured that this
2034 * alignframe is set as currentAlignFrame in Desktop
2036 protected void runGroovy_actionPerformed()
2042 * Adds the given action listener and key accelerator to the given menu item.
2043 * Also saves in a lookup table to support lookup of action by key stroke.
2047 * @param actionListener
2049 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2050 JMenuItem menuItem, ActionListener actionListener)
2052 menuItem.setAccelerator(keyStroke);
2053 accelerators.put(keyStroke, menuItem);
2054 menuItem.addActionListener(actionListener);
2058 * Action on clicking sort annotations by type.
2062 protected void sortAnnotations_actionPerformed()
2067 * Action on clicking Show all annotations.
2069 * @param forSequences
2070 * update sequence-related annotations
2071 * @param forAlignment
2072 * update non-sequence-related annotations
2074 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2075 boolean forAlignment)
2077 setAnnotationsVisibility(true, forSequences, forAlignment);
2081 * Action on clicking Hide all annotations.
2083 * @param forSequences
2084 * update sequence-related annotations
2085 * @param forAlignment
2086 * update non-sequence-related annotations
2088 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2089 boolean forAlignment)
2091 setAnnotationsVisibility(false, forSequences, forAlignment);
2095 * Set the visibility of annotations to true or false. Can act on
2096 * sequence-related annotations, or alignment-related, or both.
2099 * @param forSequences
2100 * update sequence-related annotations
2101 * @param forAlignment
2102 * update non-sequence-related annotations
2104 protected void setAnnotationsVisibility(boolean visible,
2105 boolean forSequences, boolean forAlignment)
2110 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2112 // TODO Auto-generated method stub
2116 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2118 // TODO Auto-generated method stub
2122 protected void showAllhidden_actionPerformed(ActionEvent e)
2124 // TODO Auto-generated method stub
2128 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2130 // TODO Auto-generated method stub
2134 protected void hideAllSelection_actionPerformed(ActionEvent e)
2136 // TODO Auto-generated method stub
2140 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2142 // TODO Auto-generated method stub
2146 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2148 // TODO Auto-generated method stub
2152 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2154 // TODO Auto-generated method stub
2158 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2160 // TODO Auto-generated method stub
2164 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2166 // TODO Auto-generated method stub
2170 protected void showGroupConservation_actionPerformed(ActionEvent e)
2172 // TODO Auto-generated method stub
2176 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2178 // TODO Auto-generated method stub
2182 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2184 // TODO Auto-generated method stub
2188 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2190 // TODO Auto-generated method stub
2194 protected void followHighlight_actionPerformed()
2196 // TODO Auto-generated method stub
2200 protected void showNpFeats_actionPerformed(ActionEvent e)
2202 // TODO Auto-generated method stub
2206 protected void showDbRefs_actionPerformed(ActionEvent e)
2208 // TODO Auto-generated method stub
2212 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2216 protected void buildSortByAnnotationScoresMenu()
2220 protected void extractScores_actionPerformed(ActionEvent e)
2224 protected void outputText_actionPerformed(String formatName)
2228 public void addFromFile_actionPerformed(ActionEvent e)
2233 public void addFromText_actionPerformed(ActionEvent e)
2238 public void addFromURL_actionPerformed(ActionEvent e)
2243 public void exportFeatures_actionPerformed(ActionEvent e)
2248 public void exportAnnotations_actionPerformed(ActionEvent e)
2253 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2257 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2262 protected void closeMenuItem_actionPerformed(boolean b)
2266 protected void redoMenuItem_actionPerformed(ActionEvent e)
2270 protected void undoMenuItem_actionPerformed(ActionEvent e)
2274 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2278 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2282 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2286 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2290 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2294 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2298 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2302 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2306 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2310 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2314 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2318 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2322 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2326 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2330 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2334 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2338 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2342 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2346 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2350 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2354 protected void conservationMenuItem_actionPerformed(boolean selected)
2358 protected void printMenuItem_actionPerformed(ActionEvent e)
2362 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2366 protected void findMenuItem_actionPerformed(ActionEvent e)
2370 protected void abovePIDThreshold_actionPerformed(boolean selected)
2374 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2378 protected void deleteGroups_actionPerformed(ActionEvent e)
2382 protected void createGroup_actionPerformed(ActionEvent e)
2386 protected void unGroup_actionPerformed(ActionEvent e)
2390 protected void copy_actionPerformed()
2394 protected void cut_actionPerformed()
2398 protected void delete_actionPerformed()
2402 protected void pasteNew_actionPerformed(ActionEvent e)
2406 protected void pasteThis_actionPerformed(ActionEvent e)
2410 protected void applyToAllGroups_actionPerformed(boolean selected)
2414 public void createPNG(java.io.File f)
2418 protected void font_actionPerformed(ActionEvent e)
2422 protected void seqLimit_actionPerformed(ActionEvent e)
2426 public void seqDBRef_actionPerformed(ActionEvent e)
2431 public void createEPS(java.io.File f)
2435 public void createSVG(java.io.File f)
2440 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2446 * Template method to handle the 'load T-Coffee scores' menu event.
2448 * Subclasses override this method to provide a custom action.
2453 protected void loadScores_actionPerformed(ActionEvent event)
2458 protected void jpred_actionPerformed(ActionEvent e)
2462 protected void scaleAbove_actionPerformed(ActionEvent e)
2466 protected void scaleLeft_actionPerformed(ActionEvent e)
2470 protected void scaleRight_actionPerformed(ActionEvent e)
2474 protected void modifyPID_actionPerformed()
2478 protected void modifyConservation_actionPerformed()
2482 protected void saveAs_actionPerformed()
2486 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2490 public void vamsasStore_actionPerformed(ActionEvent e)
2495 public void vamsasLoad_actionPerformed(ActionEvent e)
2500 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2505 public void featureSettings_actionPerformed(ActionEvent e)
2510 public void fetchSequence_actionPerformed()
2515 public void smoothFont_actionPerformed(ActionEvent e)
2520 public void annotationColour_actionPerformed()
2524 public void annotationColumn_actionPerformed(ActionEvent e)
2528 public void associatedData_actionPerformed(ActionEvent e)
2533 public void autoCalculate_actionPerformed(ActionEvent e)
2538 public void sortByTreeOption_actionPerformed(ActionEvent e)
2543 public void showAllSeqs_actionPerformed(ActionEvent e)
2548 public void showAllColumns_actionPerformed(ActionEvent e)
2553 public void hideSelSequences_actionPerformed(ActionEvent e)
2558 public void hideSelColumns_actionPerformed(ActionEvent e)
2563 public void hiddenMarkers_actionPerformed(ActionEvent e)
2568 public void findPdbId_actionPerformed(ActionEvent e)
2573 public void enterPdbId_actionPerformed(ActionEvent e)
2578 public void pdbFile_actionPerformed(ActionEvent e)
2583 public void invertColSel_actionPerformed(ActionEvent e)
2588 public void tabSelectionChanged(int sel)
2593 public void tabbedPane_mousePressed(MouseEvent e)
2598 public void tabbedPane_focusGained(FocusEvent e)
2603 public void save_actionPerformed(ActionEvent e)
2608 public void reload_actionPerformed(ActionEvent e)
2613 public void newView_actionPerformed(ActionEvent e)
2618 public void textColour_actionPerformed()
2623 public void idRightAlign_actionPerformed(ActionEvent e)
2628 public void expandViews_actionPerformed(ActionEvent e)
2633 public void gatherViews_actionPerformed(ActionEvent e)
2638 public void buildTreeSortMenu()
2643 public void pageSetup_actionPerformed(ActionEvent e)
2648 public void alignmentProperties()
2653 protected void expand_newalign(ActionEvent e)
2655 // TODO Auto-generated method stub
2659 protected boolean isShowAutoCalculatedAbove()
2661 return showAutoCalculatedAbove;
2664 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2666 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2669 protected SequenceAnnotationOrder getAnnotationSortOrder()
2671 return annotationSortOrder;
2674 protected void setAnnotationSortOrder(
2675 SequenceAnnotationOrder annotationSortOrder)
2677 this.annotationSortOrder = annotationSortOrder;
2680 public Map<KeyStroke, JMenuItem> getAccelerators()
2682 return this.accelerators;
2686 * Returns the selected index of the tabbed pane, or -1 if none selected
2687 * (including the case where the tabbed pane has not been made visible).
2691 public int getTabIndex()
2693 return tabbedPane.getSelectedIndex();
2696 public JPanel getStatusPanel()
2702 * Sets a reference to the containing split frame. Also makes the 'toggle
2703 * split view' menu item visible and checked.
2707 public void setSplitFrame(SplitContainerI sf)
2709 this.splitFrame = sf;
2712 this.showComplementMenuItem.setVisible(true);
2713 this.showComplementMenuItem.setState(true);
2717 public SplitContainerI getSplitViewContainer()
2719 return this.splitFrame;
2722 protected void showComplement_actionPerformed(boolean complement)