2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
24 import jalview.analysis.GeneticCodeI;
25 import jalview.analysis.GeneticCodes;
26 import jalview.api.SplitContainerI;
27 import jalview.bin.Cache;
28 import jalview.gui.JvSwingUtils;
29 import jalview.gui.Preferences;
30 import jalview.io.FileFormats;
31 import jalview.schemes.ResidueColourScheme;
32 import jalview.util.MessageManager;
33 import jalview.util.Platform;
35 import java.awt.BorderLayout;
36 import java.awt.Color;
37 import java.awt.GridLayout;
38 import java.awt.Toolkit;
39 import java.awt.event.ActionEvent;
40 import java.awt.event.ActionListener;
41 import java.awt.event.FocusAdapter;
42 import java.awt.event.FocusEvent;
43 import java.awt.event.KeyEvent;
44 import java.awt.event.MouseAdapter;
45 import java.awt.event.MouseEvent;
46 import java.util.HashMap;
49 import javax.swing.BorderFactory;
50 import javax.swing.ButtonGroup;
51 import javax.swing.JCheckBoxMenuItem;
52 import javax.swing.JInternalFrame;
53 import javax.swing.JLabel;
54 import javax.swing.JMenu;
55 import javax.swing.JMenuBar;
56 import javax.swing.JMenuItem;
57 import javax.swing.JPanel;
58 import javax.swing.JRadioButtonMenuItem;
59 import javax.swing.JTabbedPane;
60 import javax.swing.KeyStroke;
61 import javax.swing.event.ChangeEvent;
62 import javax.swing.event.MenuEvent;
63 import javax.swing.event.MenuListener;
65 @SuppressWarnings("serial")
66 public class GAlignFrame extends JInternalFrame
68 protected JMenuBar alignFrameMenuBar = new JMenuBar();
70 protected JMenuItem closeMenuItem = new JMenuItem();
72 public JMenu webService = new JMenu();// BH 2019 was protected, but not
73 // sufficient for AlignFrame thread run
75 public JMenuItem webServiceNoServices;// BH 2019 was protected, but not
76 // sufficient for AlignFrame thread run
78 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
80 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
82 protected JMenu sortByAnnotScore = new JMenu();
84 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
86 // AlignFrame.printWriter
88 protected JMenu outputTextboxMenu = new JMenu();
90 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
92 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
94 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
96 protected JMenuItem undoMenuItem = new JMenuItem();
98 protected JMenuItem redoMenuItem = new JMenuItem();
100 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
102 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
104 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
106 JMenuItem copy = new JMenuItem();
108 JMenuItem cut = new JMenuItem();
110 JMenu pasteMenu = new JMenu();
112 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
114 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
116 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
118 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
120 protected JCheckBoxMenuItem applyToAllGroups;
122 protected JMenu colourMenu = new JMenu();
124 protected JMenuItem textColour;
126 protected JCheckBoxMenuItem conservationMenuItem;
128 protected JMenuItem modifyConservation;
130 protected JCheckBoxMenuItem abovePIDThreshold;
132 protected JMenuItem modifyPID;
134 protected JRadioButtonMenuItem annotationColour;
136 protected JMenu sortByTreeMenu = new JMenu();
138 protected JMenu sort = new JMenu();
140 protected JMenuItem calculateTree = new JMenuItem();
142 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
144 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
146 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
148 protected JMenu showTranslation = new JMenu();
150 protected JMenuItem showReverse = new JMenuItem();
152 protected JMenuItem showReverseComplement = new JMenuItem();
154 protected JMenu showProducts = new JMenu();
156 protected JMenuItem runGroovy = new JMenuItem();
158 protected JMenuItem loadVcf;
160 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
162 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
164 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
166 protected JPanel statusPanel = new JPanel();
168 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
170 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
172 protected JMenuItem showAllAlAnnotations = new JMenuItem();
174 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
176 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
178 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
180 protected JTabbedPane tabbedPane = jalview.jbgui.GDesktop
183 protected JMenuItem reload = new JMenuItem();
185 protected JMenu formatMenu = new JMenu();
187 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
189 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
191 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
193 protected JMenuItem gatherViews = new JMenuItem();
195 protected JMenuItem expandViews = new JMenuItem();
197 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
201 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
207 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
209 protected JMenuItem openFeatureSettings;
211 private SequenceAnnotationOrder annotationSortOrder;
213 private boolean showAutoCalculatedAbove = false;
215 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
217 private SplitContainerI splitFrame;
224 // for Web-page embedding using id=align-frame-div
225 setName("jalview-alignment");
228 setJMenuBar(alignFrameMenuBar);
230 // dynamically fill save as menu with available formats
231 for (String ff : FileFormats.getInstance().getWritableFormats(true))
233 JMenuItem item = new JMenuItem(ff);
235 item.addActionListener(new ActionListener()
238 public void actionPerformed(ActionEvent e)
240 outputText_actionPerformed(e.getActionCommand());
244 outputTextboxMenu.add(item);
246 } catch (Exception e)
248 System.err.println(e.toString());
251 if (Platform.allowMnemonics()) // was "not mac and not JS"
253 closeMenuItem.setMnemonic('C');
254 outputTextboxMenu.setMnemonic('T');
255 undoMenuItem.setMnemonic('Z');
256 redoMenuItem.setMnemonic('0');
257 copy.setMnemonic('C');
258 cut.setMnemonic('U');
259 pasteMenu.setMnemonic('P');
260 reload.setMnemonic('R');
264 private void jbInit() throws Exception
268 JMenuItem saveAs = new JMenuItem(
269 MessageManager.getString("action.save_as"));
270 ActionListener al = new ActionListener()
273 public void actionPerformed(ActionEvent e)
275 saveAs_actionPerformed();
279 // FIXME getDefaultToolkit throws an exception in Headless mode
280 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
281 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);
549 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
550 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
551 statusBar.setText(MessageManager.getString("label.status_bar"));
553 .setText(MessageManager.getString("label.out_to_textbox"));
555 annotationPanelMenuItem.setActionCommand("");
556 annotationPanelMenuItem
557 .setText(MessageManager.getString("label.show_annotations"));
558 annotationPanelMenuItem
559 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
560 annotationPanelMenuItem.addActionListener(new ActionListener()
563 public void actionPerformed(ActionEvent e)
565 annotationPanelMenuItem_actionPerformed(e);
568 showAllAlAnnotations.setText(
569 MessageManager.getString("label.show_all_al_annotations"));
570 final boolean isAnnotationPanelShown = annotationPanelMenuItem
572 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
573 showAllAlAnnotations.addActionListener(new ActionListener()
576 public void actionPerformed(ActionEvent e)
578 showAllAnnotations_actionPerformed(false, true);
581 hideAllAlAnnotations.setText(
582 MessageManager.getString("label.hide_all_al_annotations"));
583 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
584 hideAllAlAnnotations.addActionListener(new ActionListener()
587 public void actionPerformed(ActionEvent e)
589 hideAllAnnotations_actionPerformed(false, true);
592 showAllSeqAnnotations.setText(
593 MessageManager.getString("label.show_all_seq_annotations"));
594 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
595 showAllSeqAnnotations.addActionListener(new ActionListener()
598 public void actionPerformed(ActionEvent e)
600 showAllAnnotations_actionPerformed(true, false);
603 hideAllSeqAnnotations.setText(
604 MessageManager.getString("label.hide_all_seq_annotations"));
605 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
606 hideAllSeqAnnotations.addActionListener(new ActionListener()
609 public void actionPerformed(ActionEvent e)
611 hideAllAnnotations_actionPerformed(true, false);
614 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
615 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
616 SequenceAnnotationOrder.NONE.name()));
617 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
618 MessageManager.getString("label.sort_annotations_by_sequence"));
619 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
620 MessageManager.getString("label.sort_annotations_by_label"));
622 sortAnnBySequence.setSelected(
623 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
624 sortAnnBySequence.addActionListener(new ActionListener()
627 public void actionPerformed(ActionEvent e)
629 boolean newState = sortAnnBySequence.getState();
630 sortAnnByLabel.setSelected(false);
631 setAnnotationSortOrder(
632 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
633 : SequenceAnnotationOrder.NONE);
634 sortAnnotations_actionPerformed();
637 sortAnnByLabel.setSelected(
638 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
639 sortAnnByLabel.addActionListener(new ActionListener()
642 public void actionPerformed(ActionEvent e)
644 boolean newState = sortAnnByLabel.getState();
645 sortAnnBySequence.setSelected(false);
646 setAnnotationSortOrder(
647 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
648 : SequenceAnnotationOrder.NONE);
649 sortAnnotations_actionPerformed();
652 colourTextMenuItem = new JCheckBoxMenuItem(
653 MessageManager.getString("label.colour_text"));
654 colourTextMenuItem.addActionListener(new ActionListener()
657 public void actionPerformed(ActionEvent e)
659 colourTextMenuItem_actionPerformed(e);
663 JMenuItem htmlMenuItem = new JMenuItem(
664 MessageManager.getString("label.html"));
665 htmlMenuItem.addActionListener(new ActionListener()
668 public void actionPerformed(ActionEvent e)
670 htmlMenuItem_actionPerformed(e);
674 JMenuItem createBioJS = new JMenuItem(
675 MessageManager.getString("label.biojs_html_export"));
676 createBioJS.addActionListener(new java.awt.event.ActionListener()
679 public void actionPerformed(ActionEvent e)
681 bioJSMenuItem_actionPerformed(e);
685 JMenuItem overviewMenuItem = new JMenuItem(
686 MessageManager.getString("label.overview_window"));
687 overviewMenuItem.addActionListener(new ActionListener()
690 public void actionPerformed(ActionEvent e)
692 overviewMenuItem_actionPerformed(e);
696 undoMenuItem.setEnabled(false);
697 undoMenuItem.setText(MessageManager.getString("action.undo"));
698 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
699 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
700 al = new ActionListener()
703 public void actionPerformed(ActionEvent e)
705 undoMenuItem_actionPerformed(e);
708 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
710 redoMenuItem.setEnabled(false);
711 redoMenuItem.setText(MessageManager.getString("action.redo"));
712 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
713 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
714 al = new ActionListener()
717 public void actionPerformed(ActionEvent e)
719 redoMenuItem_actionPerformed(e);
722 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
724 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
725 wrapMenuItem.addActionListener(new ActionListener()
728 public void actionPerformed(ActionEvent e)
730 wrapMenuItem_actionPerformed(e);
734 JMenuItem printMenuItem = new JMenuItem(
735 MessageManager.getString("action.print"));
736 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
737 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
738 al = new ActionListener()
741 public void actionPerformed(ActionEvent e)
743 printMenuItem_actionPerformed(e);
746 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
749 .setText(MessageManager.getString("action.show_gaps"));
750 renderGapsMenuItem.setState(true);
751 renderGapsMenuItem.addActionListener(new ActionListener()
754 public void actionPerformed(ActionEvent e)
756 renderGapsMenuItem_actionPerformed(e);
760 JMenuItem findMenuItem = new JMenuItem(
761 MessageManager.getString("action.find"));
762 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
763 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
764 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
765 MessageManager.getString("label.find_tip")));
766 al = new ActionListener()
769 public void actionPerformed(ActionEvent e)
771 findMenuItem_actionPerformed(e);
774 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
776 showSeqFeatures.setText(
777 MessageManager.getString("label.show_sequence_features"));
778 showSeqFeatures.addActionListener(new ActionListener()
781 public void actionPerformed(ActionEvent actionEvent)
783 showSeqFeatures_actionPerformed(actionEvent);
787 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
788 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
789 * void actionPerformed(ActionEvent actionEvent) {
790 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
793 .setText(MessageManager.getString("label.show_database_refs"));
794 showDbRefsMenuitem.addActionListener(new ActionListener()
798 public void actionPerformed(ActionEvent e)
800 showDbRefs_actionPerformed(e);
804 showNpFeatsMenuitem.setText(
805 MessageManager.getString("label.show_non_positional_features"));
806 showNpFeatsMenuitem.addActionListener(new ActionListener()
810 public void actionPerformed(ActionEvent e)
812 showNpFeats_actionPerformed(e);
816 showGroupConservation
817 .setText(MessageManager.getString("label.group_conservation"));
818 showGroupConservation.addActionListener(new ActionListener()
822 public void actionPerformed(ActionEvent e)
824 showGroupConservation_actionPerformed(e);
830 .setText(MessageManager.getString("label.group_consensus"));
831 showGroupConsensus.addActionListener(new ActionListener()
835 public void actionPerformed(ActionEvent e)
837 showGroupConsensus_actionPerformed(e);
841 showConsensusHistogram.setText(
842 MessageManager.getString("label.show_consensus_histogram"));
843 showConsensusHistogram.addActionListener(new ActionListener()
847 public void actionPerformed(ActionEvent e)
849 showConsensusHistogram_actionPerformed(e);
854 .setText(MessageManager.getString("label.show_consensus_logo"));
855 showSequenceLogo.addActionListener(new ActionListener()
859 public void actionPerformed(ActionEvent e)
861 showSequenceLogo_actionPerformed(e);
865 normaliseSequenceLogo
866 .setText(MessageManager.getString("label.norm_consensus_logo"));
867 normaliseSequenceLogo.addActionListener(new ActionListener()
871 public void actionPerformed(ActionEvent e)
873 normaliseSequenceLogo_actionPerformed(e);
877 applyAutoAnnotationSettings
878 .setText(MessageManager.getString("label.apply_all_groups"));
879 applyAutoAnnotationSettings.setState(false);
880 applyAutoAnnotationSettings.setVisible(true);
881 applyAutoAnnotationSettings.addActionListener(new ActionListener()
884 public void actionPerformed(ActionEvent e)
886 applyAutoAnnotationSettings_actionPerformed(e);
890 ButtonGroup buttonGroup = new ButtonGroup();
891 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
892 MessageManager.getString("label.show_first"));
893 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
894 MessageManager.getString("label.show_last"));
895 buttonGroup.add(showAutoFirst);
896 buttonGroup.add(showAutoLast);
897 final boolean autoFirst = Cache
898 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
899 showAutoFirst.setSelected(autoFirst);
900 setShowAutoCalculatedAbove(autoFirst);
901 showAutoFirst.addActionListener(new ActionListener()
904 public void actionPerformed(ActionEvent e)
906 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
907 sortAnnotations_actionPerformed();
910 showAutoLast.setSelected(!showAutoFirst.isSelected());
911 showAutoLast.addActionListener(new ActionListener()
914 public void actionPerformed(ActionEvent e)
916 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
917 sortAnnotations_actionPerformed();
921 JMenuItem deleteGroups = new JMenuItem(
922 MessageManager.getString("action.undefine_groups"));
923 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
924 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
925 al = new ActionListener()
928 public void actionPerformed(ActionEvent e)
930 deleteGroups_actionPerformed(e);
933 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
935 JMenuItem annotationColumn = new JMenuItem(
936 MessageManager.getString("action.select_by_annotation"));
937 annotationColumn.addActionListener(new ActionListener()
940 public void actionPerformed(ActionEvent e)
942 annotationColumn_actionPerformed(e);
946 JMenuItem createGroup = new JMenuItem(
947 MessageManager.getString("action.create_group"));
948 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
949 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
950 al = new ActionListener()
953 public void actionPerformed(ActionEvent e)
955 createGroup_actionPerformed(e);
958 addMenuActionAndAccelerator(keyStroke, createGroup, al);
960 JMenuItem unGroup = new JMenuItem(
961 MessageManager.getString("action.remove_group"));
962 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
963 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
964 | KeyEvent.SHIFT_MASK,
966 al = new ActionListener()
969 public void actionPerformed(ActionEvent e)
971 unGroup_actionPerformed(e);
974 addMenuActionAndAccelerator(keyStroke, unGroup, al);
976 copy.setText(MessageManager.getString("action.copy"));
977 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
978 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
980 al = new ActionListener()
983 public void actionPerformed(ActionEvent e)
985 copy_actionPerformed();
988 addMenuActionAndAccelerator(keyStroke, copy, al);
990 cut.setText(MessageManager.getString("action.cut"));
991 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
992 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
993 al = new ActionListener()
996 public void actionPerformed(ActionEvent e)
998 cut_actionPerformed();
1001 addMenuActionAndAccelerator(keyStroke, cut, al);
1003 JMenuItem delete = new JMenuItem(
1004 MessageManager.getString("action.delete"));
1005 delete.addActionListener(new ActionListener()
1008 public void actionPerformed(ActionEvent e)
1010 delete_actionPerformed();
1014 pasteMenu.setText(MessageManager.getString("action.paste"));
1015 JMenuItem pasteNew = new JMenuItem(
1016 MessageManager.getString("label.to_new_alignment"));
1017 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1018 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1019 | KeyEvent.SHIFT_MASK,
1021 al = new ActionListener()
1024 public void actionPerformed(ActionEvent e)
1026 pasteNew_actionPerformed(e);
1029 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1031 JMenuItem pasteThis = new JMenuItem(
1032 MessageManager.getString("label.to_this_alignment"));
1033 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1034 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1035 al = new ActionListener()
1038 public void actionPerformed(ActionEvent e)
1040 pasteThis_actionPerformed(e);
1043 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1045 JMenuItem createPNG = new JMenuItem("PNG");
1046 createPNG.addActionListener(new ActionListener()
1049 public void actionPerformed(ActionEvent e)
1054 createPNG.setActionCommand(
1055 MessageManager.getString("label.save_png_image"));
1057 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1058 font.addActionListener(new ActionListener()
1061 public void actionPerformed(ActionEvent e)
1063 font_actionPerformed(e);
1067 MessageManager.getString("label.show_sequence_limits"));
1068 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1069 seqLimits.addActionListener(new ActionListener()
1072 public void actionPerformed(ActionEvent e)
1074 seqLimit_actionPerformed(e);
1077 JMenuItem epsFile = new JMenuItem("EPS");
1078 epsFile.addActionListener(new ActionListener()
1081 public void actionPerformed(ActionEvent e)
1087 JMenuItem createSVG = new JMenuItem("SVG");
1088 createSVG.addActionListener(new ActionListener()
1091 public void actionPerformed(ActionEvent e)
1097 JMenuItem loadTreeMenuItem = new JMenuItem(
1098 MessageManager.getString("label.load_associated_tree"));
1099 loadTreeMenuItem.setActionCommand(
1100 MessageManager.getString("label.load_tree_for_sequence_set"));
1101 loadTreeMenuItem.addActionListener(new ActionListener()
1104 public void actionPerformed(ActionEvent e)
1106 loadTreeMenuItem_actionPerformed(e);
1110 scaleAbove.setVisible(false);
1111 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1112 scaleAbove.addActionListener(new ActionListener()
1115 public void actionPerformed(ActionEvent e)
1117 scaleAbove_actionPerformed(e);
1120 scaleLeft.setVisible(false);
1121 scaleLeft.setSelected(true);
1122 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1123 scaleLeft.addActionListener(new ActionListener()
1126 public void actionPerformed(ActionEvent e)
1128 scaleLeft_actionPerformed(e);
1131 scaleRight.setVisible(false);
1132 scaleRight.setSelected(true);
1133 scaleRight.setText(MessageManager.getString("action.scale_right"));
1134 scaleRight.addActionListener(new ActionListener()
1137 public void actionPerformed(ActionEvent e)
1139 scaleRight_actionPerformed(e);
1142 centreColumnLabelsMenuItem.setVisible(true);
1143 centreColumnLabelsMenuItem.setState(false);
1144 centreColumnLabelsMenuItem.setText(
1145 MessageManager.getString("label.centre_column_labels"));
1146 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1149 public void actionPerformed(ActionEvent e)
1151 centreColumnLabels_actionPerformed(e);
1154 followHighlightMenuItem.setVisible(true);
1155 followHighlightMenuItem.setState(true);
1156 followHighlightMenuItem
1157 .setText(MessageManager.getString("label.automatic_scrolling"));
1158 followHighlightMenuItem.addActionListener(new ActionListener()
1162 public void actionPerformed(ActionEvent e)
1164 followHighlight_actionPerformed();
1170 .setText(MessageManager.getString("action.by_tree_order"));
1171 sort.setText(MessageManager.getString("action.sort"));
1172 sort.addMenuListener(new MenuListener()
1175 public void menuSelected(MenuEvent e)
1177 buildTreeSortMenu();
1181 public void menuDeselected(MenuEvent e)
1186 public void menuCanceled(MenuEvent e)
1191 .setText(MessageManager.getString("label.sort_by_score"));
1192 sort.add(sortByAnnotScore);
1193 sort.addMenuListener(new javax.swing.event.MenuListener()
1197 public void menuCanceled(MenuEvent e)
1202 public void menuDeselected(MenuEvent e)
1207 public void menuSelected(MenuEvent e)
1209 buildSortByAnnotationScoresMenu();
1212 sortByAnnotScore.setVisible(false);
1215 .setText(MessageManager.getString("action.calculate_tree_pca"));
1217 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1219 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1220 padGapsMenuitem.addActionListener(new ActionListener()
1223 public void actionPerformed(ActionEvent e)
1225 padGapsMenuitem_actionPerformed(e);
1228 JMenuItem vamsasStore = new JMenuItem(
1229 MessageManager.getString("label.vamsas_store"));
1230 vamsasStore.setVisible(false);
1231 vamsasStore.addActionListener(new ActionListener()
1234 public void actionPerformed(ActionEvent e)
1236 vamsasStore_actionPerformed(e);
1241 * Translate as cDNA with sub-menu of translation tables
1244 .setText(MessageManager.getString("label.translate_cDNA"));
1245 boolean first = true;
1246 for (final GeneticCodeI table : GeneticCodes.getInstance()
1249 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1250 showTranslation.add(item);
1251 item.addActionListener(new ActionListener()
1254 public void actionPerformed(ActionEvent e)
1256 showTranslation_actionPerformed(table);
1261 showTranslation.addSeparator();
1266 showReverse.setText(MessageManager.getString("label.reverse"));
1267 showReverse.addActionListener(new ActionListener()
1270 public void actionPerformed(ActionEvent e)
1272 showReverse_actionPerformed(false);
1275 showReverseComplement
1276 .setText(MessageManager.getString("label.reverse_complement"));
1277 showReverseComplement.addActionListener(new ActionListener()
1280 public void actionPerformed(ActionEvent e)
1282 showReverse_actionPerformed(true);
1286 JMenuItem extractScores = new JMenuItem(
1287 MessageManager.getString("label.extract_scores"));
1288 extractScores.addActionListener(new ActionListener()
1291 public void actionPerformed(ActionEvent e)
1293 extractScores_actionPerformed(e);
1296 extractScores.setVisible(true);
1297 // JBPNote: TODO: make gui for regex based score extraction
1299 // for show products actions see AlignFrame.canShowProducts
1300 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1302 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1303 runGroovy.setToolTipText(
1304 MessageManager.getString("label.run_groovy_tip"));
1305 runGroovy.addActionListener(new ActionListener()
1308 public void actionPerformed(ActionEvent e)
1310 runGroovy_actionPerformed();
1314 openFeatureSettings = new JMenuItem(
1315 MessageManager.getString("action.feature_settings"));
1316 openFeatureSettings.addActionListener(new ActionListener()
1319 public void actionPerformed(ActionEvent e)
1321 featureSettings_actionPerformed(e);
1326 * add sub-menu of database we can fetch from
1328 JMenuItem fetchSequence = new JMenuItem(
1329 MessageManager.getString("label.fetch_sequences"));
1330 fetchSequence.addActionListener(new ActionListener()
1333 public void actionPerformed(ActionEvent e)
1335 fetchSequence_actionPerformed();
1339 JMenuItem associatedData = new JMenuItem(
1340 MessageManager.getString("label.load_features_annotations"));
1341 associatedData.addActionListener(new ActionListener()
1344 public void actionPerformed(ActionEvent e)
1346 associatedData_actionPerformed(e);
1349 loadVcf = new JMenuItem(
1350 MessageManager.getString("label.load_vcf_file"));
1351 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1352 loadVcf.addActionListener(new ActionListener()
1355 public void actionPerformed(ActionEvent e)
1357 loadVcf_actionPerformed();
1360 autoCalculate.setText(
1361 MessageManager.getString("label.autocalculate_consensus"));
1362 autoCalculate.setState(
1363 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1364 autoCalculate.addActionListener(new ActionListener()
1367 public void actionPerformed(ActionEvent e)
1369 autoCalculate_actionPerformed(e);
1373 MessageManager.getString("label.sort_alignment_new_tree"));
1374 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1375 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1377 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1378 sortByTree.addActionListener(new ActionListener()
1381 public void actionPerformed(ActionEvent e)
1383 sortByTreeOption_actionPerformed(e);
1387 listenToViewSelections.setText(
1388 MessageManager.getString("label.listen_for_selections"));
1389 listenToViewSelections
1390 .setToolTipText("<html>" + MessageManager.getString(
1391 "label.selections_mirror_selections_made_same_sequences_other_views"));
1392 listenToViewSelections.setState(false);
1393 listenToViewSelections.addActionListener(new ActionListener()
1396 public void actionPerformed(ActionEvent e)
1398 listenToViewSelections_actionPerformed(e);
1402 JMenu addSequenceMenu = new JMenu(
1403 MessageManager.getString("label.add_sequences"));
1404 JMenuItem addFromFile = new JMenuItem(
1405 MessageManager.getString("label.from_file"));
1406 addFromFile.addActionListener(new ActionListener()
1409 public void actionPerformed(ActionEvent e)
1411 addFromFile_actionPerformed(e);
1414 JMenuItem addFromText = new JMenuItem(
1415 MessageManager.getString("label.from_textbox"));
1416 addFromText.addActionListener(new ActionListener()
1419 public void actionPerformed(ActionEvent e)
1421 addFromText_actionPerformed(e);
1424 JMenuItem addFromURL = new JMenuItem(
1425 MessageManager.getString("label.from_url"));
1426 addFromURL.addActionListener(new ActionListener()
1429 public void actionPerformed(ActionEvent e)
1431 addFromURL_actionPerformed(e);
1434 JMenuItem exportFeatures = new JMenuItem(
1435 MessageManager.getString("label.export_features"));
1436 exportFeatures.addActionListener(new ActionListener()
1439 public void actionPerformed(ActionEvent e)
1441 exportFeatures_actionPerformed(e);
1444 JMenuItem exportAnnotations = new JMenuItem(
1445 MessageManager.getString("label.export_annotations"));
1446 exportAnnotations.addActionListener(new ActionListener()
1449 public void actionPerformed(ActionEvent e)
1451 exportAnnotations_actionPerformed(e);
1454 statusPanel.setLayout(new GridLayout());
1455 JMenuItem showAllSeqs = new JMenuItem(
1456 MessageManager.getString("label.all_sequences"));
1457 showAllSeqs.setToolTipText(
1458 MessageManager.getString("label.toggle_sequence_visibility"));
1459 showAllSeqs.addActionListener(new ActionListener()
1462 public void actionPerformed(ActionEvent e)
1464 showAllSeqs_actionPerformed(e);
1467 JMenuItem showAllColumns = new JMenuItem(
1468 MessageManager.getString("label.all_columns"));
1469 showAllColumns.setToolTipText(
1470 MessageManager.getString("label.toggle_columns_visibility"));
1471 showAllColumns.addActionListener(new ActionListener()
1474 public void actionPerformed(ActionEvent e)
1476 showAllColumns_actionPerformed(e);
1479 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1480 JMenuItem hideSelSequences = new JMenuItem(
1481 MessageManager.getString("label.selected_sequences"));
1482 hideSelSequences.setToolTipText(
1483 MessageManager.getString("label.toggle_sequence_visibility"));
1484 hideSelSequences.addActionListener(new ActionListener()
1487 public void actionPerformed(ActionEvent e)
1489 hideSelSequences_actionPerformed(e);
1492 JMenuItem hideSelColumns = new JMenuItem(
1493 MessageManager.getString("label.selected_columns"));
1494 hideSelColumns.setToolTipText(
1495 MessageManager.getString("label.toggle_columns_visibility"));
1496 hideSelColumns.addActionListener(new ActionListener()
1499 public void actionPerformed(ActionEvent e)
1501 hideSelColumns_actionPerformed(e);
1504 JMenuItem hideAllSelection = new JMenuItem(
1505 MessageManager.getString("label.selected_region"));
1506 hideAllSelection.addActionListener(new ActionListener()
1509 public void actionPerformed(ActionEvent e)
1511 hideAllSelection_actionPerformed(e);
1514 // TODO: should be hidden if no selection exists.
1515 JMenuItem hideAllButSelection = new JMenuItem(
1516 MessageManager.getString("label.all_but_selected_region"));
1517 hideAllButSelection.addActionListener(new ActionListener()
1520 public void actionPerformed(ActionEvent e)
1522 hideAllButSelection_actionPerformed(e);
1525 JMenuItem showAllhidden = new JMenuItem(
1526 MessageManager.getString("label.all_sequences_columns"));
1527 showAllhidden.setToolTipText(MessageManager
1528 .getString("label.toggles_visibility_hidden_selected_regions"));
1529 showAllhidden.addActionListener(new ActionListener()
1532 public void actionPerformed(ActionEvent e)
1534 showAllhidden_actionPerformed(e);
1537 hiddenMarkers.setText(
1538 MessageManager.getString("action.show_hidden_markers"));
1539 hiddenMarkers.addActionListener(new ActionListener()
1542 public void actionPerformed(ActionEvent e)
1544 hiddenMarkers_actionPerformed(e);
1548 JMenuItem invertColSel = new JMenuItem(
1549 MessageManager.getString("action.invert_column_selection"));
1550 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1551 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1552 | KeyEvent.ALT_MASK,
1554 al = new ActionListener()
1557 public void actionPerformed(ActionEvent e)
1559 invertColSel_actionPerformed(e);
1562 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1564 showComplementMenuItem.setVisible(false);
1565 showComplementMenuItem.addActionListener(new ActionListener()
1568 public void actionPerformed(ActionEvent e)
1570 showComplement_actionPerformed(showComplementMenuItem.getState());
1574 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1577 public void stateChanged(ChangeEvent evt)
1579 JTabbedPane pane = (JTabbedPane) evt.getSource();
1580 int sel = pane.getSelectedIndex();
1581 tabSelectionChanged(sel);
1584 tabbedPane.addMouseListener(new MouseAdapter()
1587 public void mousePressed(MouseEvent e)
1589 if (e.isPopupTrigger()) // Mac
1591 tabbedPane_mousePressed(e);
1596 public void mouseReleased(MouseEvent e)
1598 if (e.isPopupTrigger()) // Windows
1600 tabbedPane_mousePressed(e);
1604 tabbedPane.addFocusListener(new FocusAdapter()
1607 public void focusGained(FocusEvent e)
1609 tabbedPane_focusGained(e);
1613 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1614 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1615 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1616 al = new ActionListener()
1619 public void actionPerformed(ActionEvent e)
1621 save_actionPerformed(e);
1624 addMenuActionAndAccelerator(keyStroke, save, al);
1626 reload.setEnabled(false);
1627 reload.setText(MessageManager.getString("action.reload"));
1628 reload.addActionListener(new ActionListener()
1631 public void actionPerformed(ActionEvent e)
1633 reload_actionPerformed(e);
1637 JMenuItem newView = new JMenuItem(
1638 MessageManager.getString("action.new_view"));
1639 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1640 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1641 al = new ActionListener()
1644 public void actionPerformed(ActionEvent e)
1646 newView_actionPerformed(e);
1649 addMenuActionAndAccelerator(keyStroke, newView, al);
1651 tabbedPane.setToolTipText("<html><i>"
1652 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1655 formatMenu.setText(MessageManager.getString("action.format"));
1656 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1658 idRightAlign.setText(
1659 MessageManager.getString("label.right_align_sequence_id"));
1660 idRightAlign.addActionListener(new ActionListener()
1663 public void actionPerformed(ActionEvent e)
1665 idRightAlign_actionPerformed(e);
1669 gatherViews.setEnabled(false);
1670 gatherViews.setText(MessageManager.getString("action.gather_views"));
1671 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1672 al = new ActionListener()
1675 public void actionPerformed(ActionEvent e)
1677 gatherViews_actionPerformed(e);
1680 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1682 expandViews.setEnabled(false);
1683 expandViews.setText(MessageManager.getString("action.expand_views"));
1684 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1685 al = new ActionListener()
1688 public void actionPerformed(ActionEvent e)
1690 expandViews_actionPerformed(e);
1693 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1695 JMenuItem pageSetup = new JMenuItem(
1696 MessageManager.getString("action.page_setup"));
1697 pageSetup.addActionListener(new ActionListener()
1700 public void actionPerformed(ActionEvent e)
1702 pageSetup_actionPerformed(e);
1705 JMenuItem alignmentProperties = new JMenuItem(
1706 MessageManager.getString("label.alignment_props"));
1707 alignmentProperties.addActionListener(new ActionListener()
1710 public void actionPerformed(ActionEvent actionEvent)
1712 alignmentProperties();
1715 JMenuItem selectHighlighted = new JMenuItem(
1716 MessageManager.getString("action.select_highlighted_columns"));
1717 selectHighlighted.setToolTipText(
1718 MessageManager.getString("tooltip.select_highlighted_columns"));
1719 al = new ActionListener()
1722 public void actionPerformed(ActionEvent actionEvent)
1724 selectHighlightedColumns_actionPerformed(actionEvent);
1727 selectHighlighted.addActionListener(al);
1728 JMenu tooltipSettingsMenu = new JMenu(
1729 MessageManager.getString("label.sequence_id_tooltip"));
1730 JMenu autoAnnMenu = new JMenu(
1731 MessageManager.getString("label.autocalculated_annotation"));
1733 JMenu exportImageMenu = new JMenu(
1734 MessageManager.getString("label.export_image"));
1735 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1736 alignFrameMenuBar.add(fileMenu);
1737 alignFrameMenuBar.add(editMenu);
1738 alignFrameMenuBar.add(selectMenu);
1739 alignFrameMenuBar.add(viewMenu);
1740 alignFrameMenuBar.add(annotationsMenu);
1741 alignFrameMenuBar.add(formatMenu);
1742 alignFrameMenuBar.add(colourMenu);
1743 alignFrameMenuBar.add(calculateMenu);
1744 if (!Platform.isJS())
1746 alignFrameMenuBar.add(webService);
1749 fileMenu.add(fetchSequence);
1750 fileMenu.add(addSequenceMenu);
1751 fileMenu.add(reload);
1752 fileMenu.addSeparator();
1753 fileMenu.add(vamsasStore);
1755 fileMenu.add(saveAs);
1756 fileMenu.add(outputTextboxMenu);
1757 fileMenu.add(pageSetup);
1758 fileMenu.add(printMenuItem);
1759 fileMenu.addSeparator();
1760 fileMenu.add(exportImageMenu);
1761 fileMenu.add(exportFeatures);
1762 fileMenu.add(exportAnnotations);
1763 fileMenu.add(loadTreeMenuItem);
1764 fileMenu.add(associatedData);
1765 if (!Platform.isJS())
1767 fileMenu.add(loadVcf);
1769 fileMenu.addSeparator();
1770 fileMenu.add(closeMenuItem);
1772 pasteMenu.add(pasteNew);
1773 pasteMenu.add(pasteThis);
1774 editMenu.add(undoMenuItem);
1775 editMenu.add(redoMenuItem);
1778 editMenu.add(pasteMenu);
1779 editMenu.add(delete);
1780 editMenu.addSeparator();
1781 editMenu.add(remove2LeftMenuItem);
1782 editMenu.add(remove2RightMenuItem);
1783 editMenu.add(removeGappedColumnMenuItem);
1784 editMenu.add(removeAllGapsMenuItem);
1785 editMenu.add(removeRedundancyMenuItem);
1786 editMenu.addSeparator();
1787 // dont add these yet in the CVS build - they cannot be undone!
1788 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1789 // editMenu.add(justifyLeftMenuItem);
1790 // editMenu.add(justifyRightMenuItem);
1791 // editMenu.addSeparator();
1792 editMenu.add(padGapsMenuitem);
1794 showMenu.add(showAllColumns);
1795 showMenu.add(showAllSeqs);
1796 showMenu.add(showAllhidden);
1797 hideMenu.add(hideSelColumns);
1798 hideMenu.add(hideSelSequences);
1799 hideMenu.add(hideAllSelection);
1800 hideMenu.add(hideAllButSelection);
1801 viewMenu.add(newView);
1802 viewMenu.add(expandViews);
1803 viewMenu.add(gatherViews);
1804 viewMenu.addSeparator();
1805 viewMenu.add(showMenu);
1806 viewMenu.add(hideMenu);
1807 viewMenu.add(showComplementMenuItem);
1808 viewMenu.addSeparator();
1809 viewMenu.add(followHighlightMenuItem);
1810 viewMenu.addSeparator();
1811 viewMenu.add(showSeqFeatures);
1812 // viewMenu.add(showSeqFeaturesHeight);
1813 viewMenu.add(openFeatureSettings);
1814 tooltipSettingsMenu.add(showDbRefsMenuitem);
1815 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1816 viewMenu.add(tooltipSettingsMenu);
1817 viewMenu.addSeparator();
1818 viewMenu.add(alignmentProperties);
1819 viewMenu.addSeparator();
1820 viewMenu.add(overviewMenuItem);
1822 annotationsMenu.add(annotationPanelMenuItem);
1823 annotationsMenu.addSeparator();
1824 annotationsMenu.add(showAllAlAnnotations);
1825 annotationsMenu.add(hideAllAlAnnotations);
1826 annotationsMenu.addSeparator();
1827 annotationsMenu.add(showAllSeqAnnotations);
1828 annotationsMenu.add(hideAllSeqAnnotations);
1829 annotationsMenu.add(sortAnnBySequence);
1830 annotationsMenu.add(sortAnnByLabel);
1831 annotationsMenu.addSeparator();
1832 autoAnnMenu.add(showAutoFirst);
1833 autoAnnMenu.add(showAutoLast);
1834 autoAnnMenu.addSeparator();
1835 autoAnnMenu.add(applyAutoAnnotationSettings);
1836 autoAnnMenu.add(showConsensusHistogram);
1837 autoAnnMenu.add(showSequenceLogo);
1838 autoAnnMenu.add(normaliseSequenceLogo);
1839 autoAnnMenu.addSeparator();
1840 autoAnnMenu.add(showGroupConservation);
1841 autoAnnMenu.add(showGroupConsensus);
1842 annotationsMenu.add(autoAnnMenu);
1844 sort.add(sortIDMenuItem);
1845 sort.add(sortLengthMenuItem);
1846 sort.add(sortGroupMenuItem);
1847 sort.add(sortPairwiseMenuItem);
1848 sort.add(sortByTreeMenu);
1849 calculateMenu.add(sort);
1850 calculateMenu.add(calculateTree);
1851 calculateMenu.addSeparator();
1852 calculateMenu.add(pairwiseAlignmentMenuItem);
1853 calculateMenu.addSeparator();
1854 calculateMenu.add(showTranslation);
1855 calculateMenu.add(showReverse);
1856 calculateMenu.add(showReverseComplement);
1857 calculateMenu.add(showProducts);
1858 calculateMenu.add(autoCalculate);
1859 calculateMenu.add(sortByTree);
1860 calculateMenu.addSeparator();
1861 calculateMenu.add(expandAlignment);
1862 calculateMenu.add(extractScores);
1863 if (!Platform.isJS())
1865 calculateMenu.addSeparator();
1866 calculateMenu.add(runGroovy);
1869 webServiceNoServices = new JMenuItem(
1870 MessageManager.getString("label.no_services"));
1871 webService.add(webServiceNoServices);
1872 if (!Platform.isJS())
1874 exportImageMenu.add(htmlMenuItem);
1876 exportImageMenu.add(epsFile);
1877 exportImageMenu.add(createPNG);
1878 if (!Platform.isJS())
1880 exportImageMenu.add(createBioJS);
1881 exportImageMenu.add(createSVG);
1883 addSequenceMenu.add(addFromFile);
1884 addSequenceMenu.add(addFromText);
1885 addSequenceMenu.add(addFromURL);
1886 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1887 statusPanel.add(statusBar, null);
1888 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1890 formatMenu.add(font);
1891 formatMenu.addSeparator();
1892 formatMenu.add(wrapMenuItem);
1893 formatMenu.add(scaleAbove);
1894 formatMenu.add(scaleLeft);
1895 formatMenu.add(scaleRight);
1896 formatMenu.add(seqLimits);
1897 formatMenu.add(idRightAlign);
1898 formatMenu.add(hiddenMarkers);
1899 formatMenu.add(viewBoxesMenuItem);
1900 formatMenu.add(viewTextMenuItem);
1901 formatMenu.add(colourTextMenuItem);
1902 formatMenu.add(renderGapsMenuItem);
1903 formatMenu.add(centreColumnLabelsMenuItem);
1904 formatMenu.add(showNonconservedMenuItem);
1905 selectMenu.add(findMenuItem);
1906 selectMenu.addSeparator();
1907 selectMenu.add(selectAllSequenceMenuItem);
1908 selectMenu.add(deselectAllSequenceMenuItem);
1909 selectMenu.add(invertSequenceMenuItem);
1910 selectMenu.add(invertColSel);
1911 selectMenu.add(createGroup);
1912 selectMenu.add(unGroup);
1913 selectMenu.add(grpsFromSelection);
1914 selectMenu.add(deleteGroups);
1915 selectMenu.add(annotationColumn);
1916 selectMenu.add(selectHighlighted);
1917 // TODO - determine if the listenToViewSelections button is needed : see bug
1919 // selectMenu.addSeparator();
1920 // selectMenu.add(listenToViewSelections);
1923 protected void loadVcf_actionPerformed()
1928 * Constructs the entries on the Colour menu (but does not add them to the
1931 protected void initColourMenu()
1933 applyToAllGroups = new JCheckBoxMenuItem(
1934 MessageManager.getString("label.apply_colour_to_all_groups"));
1935 applyToAllGroups.addActionListener(new ActionListener()
1938 public void actionPerformed(ActionEvent e)
1940 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1944 textColour = new JMenuItem(
1945 MessageManager.getString("label.text_colour"));
1946 textColour.addActionListener(new ActionListener()
1949 public void actionPerformed(ActionEvent e)
1951 textColour_actionPerformed();
1955 conservationMenuItem = new JCheckBoxMenuItem(
1956 MessageManager.getString("action.by_conservation"));
1957 conservationMenuItem.addActionListener(new ActionListener()
1960 public void actionPerformed(ActionEvent e)
1962 conservationMenuItem_actionPerformed(
1963 conservationMenuItem.isSelected());
1967 abovePIDThreshold = new JCheckBoxMenuItem(
1968 MessageManager.getString("label.above_identity_threshold"));
1969 abovePIDThreshold.addActionListener(new ActionListener()
1972 public void actionPerformed(ActionEvent e)
1974 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1977 modifyPID = new JMenuItem(
1978 MessageManager.getString("label.modify_identity_threshold"));
1979 modifyPID.addActionListener(new ActionListener()
1982 public void actionPerformed(ActionEvent e)
1984 modifyPID_actionPerformed();
1987 modifyConservation = new JMenuItem(MessageManager
1988 .getString("label.modify_conservation_threshold"));
1989 modifyConservation.addActionListener(new ActionListener()
1992 public void actionPerformed(ActionEvent e)
1994 modifyConservation_actionPerformed();
1998 annotationColour = new JRadioButtonMenuItem(
1999 MessageManager.getString("action.by_annotation"));
2000 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2001 annotationColour.addActionListener(new ActionListener()
2004 public void actionPerformed(ActionEvent e)
2006 annotationColour_actionPerformed();
2011 protected void selectHighlightedColumns_actionPerformed(
2012 ActionEvent actionEvent)
2014 // TODO Auto-generated method stub
2019 * Generate the reverse sequence (or reverse complement if the flag is true)
2020 * and add it to the alignment
2024 protected void showReverse_actionPerformed(boolean complement)
2029 * Try to run script in a Groovy console, having first ensured that this
2030 * alignframe is set as currentAlignFrame in Desktop
2032 protected void runGroovy_actionPerformed()
2038 * Adds the given action listener and key accelerator to the given menu item.
2039 * Also saves in a lookup table to support lookup of action by key stroke.
2043 * @param actionListener
2045 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2046 JMenuItem menuItem, ActionListener actionListener)
2048 menuItem.setAccelerator(keyStroke);
2049 accelerators.put(keyStroke, menuItem);
2050 menuItem.addActionListener(actionListener);
2054 * Action on clicking sort annotations by type.
2058 protected void sortAnnotations_actionPerformed()
2063 * Action on clicking Show all annotations.
2065 * @param forSequences
2066 * update sequence-related annotations
2067 * @param forAlignment
2068 * update non-sequence-related annotations
2070 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2071 boolean forAlignment)
2073 setAnnotationsVisibility(true, forSequences, forAlignment);
2077 * Action on clicking Hide all annotations.
2079 * @param forSequences
2080 * update sequence-related annotations
2081 * @param forAlignment
2082 * update non-sequence-related annotations
2084 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2085 boolean forAlignment)
2087 setAnnotationsVisibility(false, forSequences, forAlignment);
2091 * Set the visibility of annotations to true or false. Can act on
2092 * sequence-related annotations, or alignment-related, or both.
2095 * @param forSequences
2096 * update sequence-related annotations
2097 * @param forAlignment
2098 * update non-sequence-related annotations
2100 protected void setAnnotationsVisibility(boolean visible,
2101 boolean forSequences, boolean forAlignment)
2106 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2108 // TODO Auto-generated method stub
2112 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2114 // TODO Auto-generated method stub
2118 protected void showAllhidden_actionPerformed(ActionEvent e)
2120 // TODO Auto-generated method stub
2124 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2126 // TODO Auto-generated method stub
2130 protected void hideAllSelection_actionPerformed(ActionEvent e)
2132 // TODO Auto-generated method stub
2136 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2138 // TODO Auto-generated method stub
2142 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2144 // TODO Auto-generated method stub
2148 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2150 // TODO Auto-generated method stub
2154 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2156 // TODO Auto-generated method stub
2160 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2162 // TODO Auto-generated method stub
2166 protected void showGroupConservation_actionPerformed(ActionEvent e)
2168 // TODO Auto-generated method stub
2172 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2174 // TODO Auto-generated method stub
2178 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2180 // TODO Auto-generated method stub
2184 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2186 // TODO Auto-generated method stub
2190 protected void followHighlight_actionPerformed()
2192 // TODO Auto-generated method stub
2196 protected void showNpFeats_actionPerformed(ActionEvent e)
2198 // TODO Auto-generated method stub
2202 protected void showDbRefs_actionPerformed(ActionEvent e)
2204 // TODO Auto-generated method stub
2208 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2212 protected void buildSortByAnnotationScoresMenu()
2216 protected void extractScores_actionPerformed(ActionEvent e)
2220 protected void outputText_actionPerformed(String formatName)
2224 public void addFromFile_actionPerformed(ActionEvent e)
2229 public void addFromText_actionPerformed(ActionEvent e)
2234 public void addFromURL_actionPerformed(ActionEvent e)
2239 public void exportFeatures_actionPerformed(ActionEvent e)
2244 public void exportAnnotations_actionPerformed(ActionEvent e)
2249 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2253 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2258 protected void closeMenuItem_actionPerformed(boolean b)
2262 protected void redoMenuItem_actionPerformed(ActionEvent e)
2266 protected void undoMenuItem_actionPerformed(ActionEvent e)
2270 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2274 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2278 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2282 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2286 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2290 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2294 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2298 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2302 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2306 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2310 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2314 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2318 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2322 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2326 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2330 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2334 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2338 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2342 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2346 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2350 protected void conservationMenuItem_actionPerformed(boolean selected)
2354 protected void printMenuItem_actionPerformed(ActionEvent e)
2358 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2362 protected void findMenuItem_actionPerformed(ActionEvent e)
2366 protected void abovePIDThreshold_actionPerformed(boolean selected)
2370 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2374 protected void deleteGroups_actionPerformed(ActionEvent e)
2378 protected void createGroup_actionPerformed(ActionEvent e)
2382 protected void unGroup_actionPerformed(ActionEvent e)
2386 protected void copy_actionPerformed()
2390 protected void cut_actionPerformed()
2394 protected void delete_actionPerformed()
2398 protected void pasteNew_actionPerformed(ActionEvent e)
2402 protected void pasteThis_actionPerformed(ActionEvent e)
2406 protected void applyToAllGroups_actionPerformed(boolean selected)
2410 public void createPNG(java.io.File f)
2414 protected void font_actionPerformed(ActionEvent e)
2418 protected void seqLimit_actionPerformed(ActionEvent e)
2422 public void seqDBRef_actionPerformed(ActionEvent e)
2427 public void createEPS(java.io.File f)
2431 public void createSVG(java.io.File f)
2436 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2442 * Template method to handle the 'load T-Coffee scores' menu event.
2444 * Subclasses override this method to provide a custom action.
2449 protected void loadScores_actionPerformed(ActionEvent event)
2454 protected void jpred_actionPerformed(ActionEvent e)
2458 protected void scaleAbove_actionPerformed(ActionEvent e)
2462 protected void scaleLeft_actionPerformed(ActionEvent e)
2466 protected void scaleRight_actionPerformed(ActionEvent e)
2470 protected void modifyPID_actionPerformed()
2474 protected void modifyConservation_actionPerformed()
2478 protected void saveAs_actionPerformed()
2482 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2486 public void vamsasStore_actionPerformed(ActionEvent e)
2491 public void vamsasLoad_actionPerformed(ActionEvent e)
2496 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2501 public void featureSettings_actionPerformed(ActionEvent e)
2506 public void fetchSequence_actionPerformed()
2511 public void smoothFont_actionPerformed(ActionEvent e)
2516 public void annotationColour_actionPerformed()
2520 public void annotationColumn_actionPerformed(ActionEvent e)
2524 public void associatedData_actionPerformed(ActionEvent e)
2529 public void autoCalculate_actionPerformed(ActionEvent e)
2534 public void sortByTreeOption_actionPerformed(ActionEvent e)
2539 public void showAllSeqs_actionPerformed(ActionEvent e)
2544 public void showAllColumns_actionPerformed(ActionEvent e)
2549 public void hideSelSequences_actionPerformed(ActionEvent e)
2554 public void hideSelColumns_actionPerformed(ActionEvent e)
2559 public void hiddenMarkers_actionPerformed(ActionEvent e)
2564 public void findPdbId_actionPerformed(ActionEvent e)
2569 public void enterPdbId_actionPerformed(ActionEvent e)
2574 public void pdbFile_actionPerformed(ActionEvent e)
2579 public void invertColSel_actionPerformed(ActionEvent e)
2584 public void tabSelectionChanged(int sel)
2589 public void tabbedPane_mousePressed(MouseEvent e)
2594 public void tabbedPane_focusGained(FocusEvent e)
2599 public void save_actionPerformed(ActionEvent e)
2604 public void reload_actionPerformed(ActionEvent e)
2609 public void newView_actionPerformed(ActionEvent e)
2614 public void textColour_actionPerformed()
2619 public void idRightAlign_actionPerformed(ActionEvent e)
2624 public void expandViews_actionPerformed(ActionEvent e)
2629 public void gatherViews_actionPerformed(ActionEvent e)
2634 public void buildTreeSortMenu()
2639 public void pageSetup_actionPerformed(ActionEvent e)
2644 public void alignmentProperties()
2649 protected void expand_newalign(ActionEvent e)
2651 // TODO Auto-generated method stub
2655 protected boolean isShowAutoCalculatedAbove()
2657 return showAutoCalculatedAbove;
2660 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2662 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2665 protected SequenceAnnotationOrder getAnnotationSortOrder()
2667 return annotationSortOrder;
2670 protected void setAnnotationSortOrder(
2671 SequenceAnnotationOrder annotationSortOrder)
2673 this.annotationSortOrder = annotationSortOrder;
2676 public Map<KeyStroke, JMenuItem> getAccelerators()
2678 return this.accelerators;
2682 * Returns the selected index of the tabbed pane, or -1 if none selected
2683 * (including the case where the tabbed pane has not been made visible).
2687 public int getTabIndex()
2689 return tabbedPane.getSelectedIndex();
2692 public JPanel getStatusPanel()
2698 * Sets a reference to the containing split frame. Also makes the 'toggle
2699 * split view' menu item visible and checked.
2703 public void setSplitFrame(SplitContainerI sf)
2705 this.splitFrame = sf;
2708 this.showComplementMenuItem.setVisible(true);
2709 this.showComplementMenuItem.setState(true);
2713 public SplitContainerI getSplitViewContainer()
2715 return this.splitFrame;
2718 protected void showComplement_actionPerformed(boolean complement)