2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
24 import jalview.analysis.GeneticCodeI;
25 import jalview.analysis.GeneticCodes;
26 import jalview.api.SplitContainerI;
27 import jalview.bin.Cache;
28 import jalview.gui.JvSwingUtils;
29 import jalview.gui.Preferences;
30 import jalview.io.FileFormats;
31 import jalview.schemes.ResidueColourScheme;
32 import jalview.util.MessageManager;
33 import jalview.util.Platform;
35 import java.awt.BorderLayout;
36 import java.awt.Color;
37 import java.awt.GridLayout;
38 import java.awt.event.ActionEvent;
39 import java.awt.event.ActionListener;
40 import java.awt.event.FocusAdapter;
41 import java.awt.event.FocusEvent;
42 import java.awt.event.KeyEvent;
43 import java.awt.event.MouseAdapter;
44 import java.awt.event.MouseEvent;
45 import java.util.HashMap;
48 import javax.swing.BorderFactory;
49 import javax.swing.ButtonGroup;
50 import javax.swing.JCheckBoxMenuItem;
51 import javax.swing.JInternalFrame;
52 import javax.swing.JLabel;
53 import javax.swing.JMenu;
54 import javax.swing.JMenuBar;
55 import javax.swing.JMenuItem;
56 import javax.swing.JPanel;
57 import javax.swing.JRadioButtonMenuItem;
58 import javax.swing.JTabbedPane;
59 import javax.swing.KeyStroke;
60 import javax.swing.event.ChangeEvent;
61 import javax.swing.event.MenuEvent;
62 import javax.swing.event.MenuListener;
64 public class GAlignFrame extends JInternalFrame
66 protected JMenuBar alignFrameMenuBar = new JMenuBar();
68 protected JMenuItem closeMenuItem = new JMenuItem();
70 protected JMenu webService = new JMenu();
72 protected JMenuItem webServiceNoServices;
74 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
76 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
78 protected JMenu sortByAnnotScore = new JMenu();
80 protected JLabel statusBar = new JLabel();
82 protected JMenu outputTextboxMenu = new JMenu();
84 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
86 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
88 protected JCheckBoxMenuItem colourGapsMenuItem = new JCheckBoxMenuItem();
90 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
92 protected JMenuItem undoMenuItem = new JMenuItem();
94 protected JMenuItem redoMenuItem = new JMenuItem();
96 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
98 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
100 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
102 JMenuItem copy = new JMenuItem();
104 JMenuItem cut = new JMenuItem();
106 JMenu pasteMenu = new JMenu();
108 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
110 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
112 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
114 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
116 protected JCheckBoxMenuItem applyToAllGroups;
118 protected JMenu colourMenu = new JMenu();
120 protected JMenuItem textColour;
122 protected JCheckBoxMenuItem conservationMenuItem;
124 protected JMenuItem modifyConservation;
126 protected JCheckBoxMenuItem abovePIDThreshold;
128 protected JMenuItem modifyPID;
130 protected JRadioButtonMenuItem annotationColour;
132 protected JMenu sortByTreeMenu = new JMenu();
134 protected JMenu sort = new JMenu();
136 protected JMenuItem calculateTree = new JMenuItem();
138 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
140 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
142 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
144 protected JMenu showTranslation = new JMenu();
146 protected JMenuItem showReverse = new JMenuItem();
148 protected JMenuItem showReverseComplement = new JMenuItem();
150 protected JMenu showProducts = new JMenu();
152 protected JMenuItem runGroovy = new JMenuItem();
154 protected JMenuItem loadVcf;
156 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
158 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
160 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
162 protected JPanel statusPanel = new JPanel();
164 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
166 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
168 protected JMenuItem showAllAlAnnotations = new JMenuItem();
170 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
172 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
174 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
176 protected JTabbedPane tabbedPane = new JTabbedPane();
178 protected JMenuItem reload = new JMenuItem();
180 protected JMenu formatMenu = new JMenu();
182 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
184 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
186 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
188 protected JMenuItem gatherViews = new JMenuItem();
190 protected JMenuItem expandViews = new JMenuItem();
192 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
194 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
196 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
198 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
200 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
202 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
204 private SequenceAnnotationOrder annotationSortOrder;
206 private boolean showAutoCalculatedAbove = false;
208 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
210 private SplitContainerI splitFrame;
217 setJMenuBar(alignFrameMenuBar);
219 // dynamically fill save as menu with available formats
220 for (String ff : FileFormats.getInstance().getWritableFormats(true))
222 JMenuItem item = new JMenuItem(ff);
224 item.addActionListener(new ActionListener()
227 public void actionPerformed(ActionEvent e)
229 outputText_actionPerformed(e);
233 outputTextboxMenu.add(item);
235 } catch (Exception e)
237 System.err.println(e.toString());
240 if (!Platform.isAMac())
242 closeMenuItem.setMnemonic('C');
243 outputTextboxMenu.setMnemonic('T');
244 undoMenuItem.setMnemonic('Z');
245 redoMenuItem.setMnemonic('0');
246 copy.setMnemonic('C');
247 cut.setMnemonic('U');
248 pasteMenu.setMnemonic('P');
249 reload.setMnemonic('R');
253 private void jbInit() throws Exception
257 JMenuItem saveAs = new JMenuItem(
258 MessageManager.getString("action.save_as"));
259 ActionListener al = new ActionListener()
262 public void actionPerformed(ActionEvent e)
264 saveAs_actionPerformed(e);
268 // FIXME getDefaultToolkit throws an exception in Headless mode
269 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
270 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
271 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
273 addMenuActionAndAccelerator(keyStroke, saveAs, al);
275 closeMenuItem.setText(MessageManager.getString("action.close"));
276 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
277 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
278 al = new ActionListener()
281 public void actionPerformed(ActionEvent e)
283 closeMenuItem_actionPerformed(false);
286 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
288 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
289 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
290 JMenu annotationsMenu = new JMenu(
291 MessageManager.getString("action.annotations"));
292 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
293 colourMenu.setText(MessageManager.getString("action.colour"));
294 JMenu calculateMenu = new JMenu(
295 MessageManager.getString("action.calculate"));
296 webService.setText(MessageManager.getString("action.web_service"));
297 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
298 MessageManager.getString("action.select_all"));
299 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
300 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
301 al = new ActionListener()
304 public void actionPerformed(ActionEvent e)
306 selectAllSequenceMenuItem_actionPerformed(e);
309 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
311 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
312 MessageManager.getString("action.deselect_all"));
313 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
314 al = new ActionListener()
317 public void actionPerformed(ActionEvent e)
319 deselectAllSequenceMenuItem_actionPerformed(e);
322 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
324 JMenuItem invertSequenceMenuItem = new JMenuItem(
325 MessageManager.getString("action.invert_sequence_selection"));
326 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
327 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
328 al = new ActionListener()
331 public void actionPerformed(ActionEvent e)
333 invertSequenceMenuItem_actionPerformed(e);
336 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
338 JMenuItem grpsFromSelection = new JMenuItem(
339 MessageManager.getString("action.make_groups_selection"));
340 grpsFromSelection.addActionListener(new ActionListener()
343 public void actionPerformed(ActionEvent e)
345 makeGrpsFromSelection_actionPerformed(e);
348 JMenuItem expandAlignment = new JMenuItem(
349 MessageManager.getString("action.view_flanking_regions"));
350 expandAlignment.setToolTipText(
351 MessageManager.getString("label.view_flanking_regions"));
352 expandAlignment.addActionListener(new ActionListener()
355 public void actionPerformed(ActionEvent e)
360 JMenuItem remove2LeftMenuItem = new JMenuItem(
361 MessageManager.getString("action.remove_left"));
362 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
363 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
364 al = new ActionListener()
367 public void actionPerformed(ActionEvent e)
369 remove2LeftMenuItem_actionPerformed(e);
372 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
374 JMenuItem remove2RightMenuItem = new JMenuItem(
375 MessageManager.getString("action.remove_right"));
376 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
377 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
378 al = new ActionListener()
381 public void actionPerformed(ActionEvent e)
383 remove2RightMenuItem_actionPerformed(e);
386 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
388 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
389 MessageManager.getString("action.remove_empty_columns"));
390 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
391 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
392 al = new ActionListener()
395 public void actionPerformed(ActionEvent e)
397 removeGappedColumnMenuItem_actionPerformed(e);
400 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
402 JMenuItem removeAllGapsMenuItem = new JMenuItem(
403 MessageManager.getString("action.remove_all_gaps"));
404 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
405 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
406 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
408 al = new ActionListener()
411 public void actionPerformed(ActionEvent e)
413 removeAllGapsMenuItem_actionPerformed(e);
416 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
418 JMenuItem justifyLeftMenuItem = new JMenuItem(
419 MessageManager.getString("action.left_justify_alignment"));
420 justifyLeftMenuItem.addActionListener(new ActionListener()
423 public void actionPerformed(ActionEvent e)
425 justifyLeftMenuItem_actionPerformed(e);
428 JMenuItem justifyRightMenuItem = new JMenuItem(
429 MessageManager.getString("action.right_justify_alignment"));
430 justifyRightMenuItem.addActionListener(new ActionListener()
433 public void actionPerformed(ActionEvent e)
435 justifyRightMenuItem_actionPerformed(e);
438 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
439 viewBoxesMenuItem.setState(true);
440 viewBoxesMenuItem.addActionListener(new ActionListener()
443 public void actionPerformed(ActionEvent e)
445 viewBoxesMenuItem_actionPerformed(e);
448 viewTextMenuItem.setText(MessageManager.getString("action.text"));
449 viewTextMenuItem.setState(true);
450 viewTextMenuItem.addActionListener(new ActionListener()
453 public void actionPerformed(ActionEvent e)
455 viewTextMenuItem_actionPerformed(e);
458 showNonconservedMenuItem
459 .setText(MessageManager.getString("label.show_non_conserved"));
460 showNonconservedMenuItem.setState(false);
461 showNonconservedMenuItem.addActionListener(new ActionListener()
464 public void actionPerformed(ActionEvent e)
466 showUnconservedMenuItem_actionPerformed(e);
469 JMenuItem sortPairwiseMenuItem = new JMenuItem(
470 MessageManager.getString("action.by_pairwise_id"));
471 sortPairwiseMenuItem.addActionListener(new ActionListener()
474 public void actionPerformed(ActionEvent e)
476 sortPairwiseMenuItem_actionPerformed(e);
479 JMenuItem sortIDMenuItem = new JMenuItem(
480 MessageManager.getString("action.by_id"));
481 sortIDMenuItem.addActionListener(new ActionListener()
484 public void actionPerformed(ActionEvent e)
486 sortIDMenuItem_actionPerformed(e);
489 JMenuItem sortLengthMenuItem = new JMenuItem(
490 MessageManager.getString("action.by_length"));
491 sortLengthMenuItem.addActionListener(new ActionListener()
494 public void actionPerformed(ActionEvent e)
496 sortLengthMenuItem_actionPerformed(e);
499 JMenuItem sortGroupMenuItem = new JMenuItem(
500 MessageManager.getString("action.by_group"));
501 sortGroupMenuItem.addActionListener(new ActionListener()
504 public void actionPerformed(ActionEvent e)
506 sortGroupMenuItem_actionPerformed(e);
510 JMenuItem removeRedundancyMenuItem = new JMenuItem(
511 MessageManager.getString("action.remove_redundancy"));
512 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
513 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
514 al = new ActionListener()
517 public void actionPerformed(ActionEvent e)
519 removeRedundancyMenuItem_actionPerformed(e);
522 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
524 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
525 MessageManager.getString("action.pairwise_alignment"));
526 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
529 public void actionPerformed(ActionEvent e)
531 pairwiseAlignmentMenuItem_actionPerformed(e);
535 this.getContentPane().setLayout(new BorderLayout());
536 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
537 statusBar.setBackground(Color.white);
538 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
539 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
540 statusBar.setText(MessageManager.getString("label.status_bar"));
542 .setText(MessageManager.getString("label.out_to_textbox"));
544 annotationPanelMenuItem.setActionCommand("");
545 annotationPanelMenuItem
546 .setText(MessageManager.getString("label.show_annotations"));
547 annotationPanelMenuItem
548 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
549 annotationPanelMenuItem.addActionListener(new ActionListener()
552 public void actionPerformed(ActionEvent e)
554 annotationPanelMenuItem_actionPerformed(e);
557 showAllAlAnnotations.setText(
558 MessageManager.getString("label.show_all_al_annotations"));
559 final boolean isAnnotationPanelShown = annotationPanelMenuItem
561 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
562 showAllAlAnnotations.addActionListener(new ActionListener()
565 public void actionPerformed(ActionEvent e)
567 showAllAnnotations_actionPerformed(false, true);
570 hideAllAlAnnotations.setText(
571 MessageManager.getString("label.hide_all_al_annotations"));
572 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
573 hideAllAlAnnotations.addActionListener(new ActionListener()
576 public void actionPerformed(ActionEvent e)
578 hideAllAnnotations_actionPerformed(false, true);
581 showAllSeqAnnotations.setText(
582 MessageManager.getString("label.show_all_seq_annotations"));
583 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
584 showAllSeqAnnotations.addActionListener(new ActionListener()
587 public void actionPerformed(ActionEvent e)
589 showAllAnnotations_actionPerformed(true, false);
592 hideAllSeqAnnotations.setText(
593 MessageManager.getString("label.hide_all_seq_annotations"));
594 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
595 hideAllSeqAnnotations.addActionListener(new ActionListener()
598 public void actionPerformed(ActionEvent e)
600 hideAllAnnotations_actionPerformed(true, false);
603 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
604 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
605 SequenceAnnotationOrder.NONE.name()));
606 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
607 MessageManager.getString("label.sort_annotations_by_sequence"));
608 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
609 MessageManager.getString("label.sort_annotations_by_label"));
611 sortAnnBySequence.setSelected(
612 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
613 sortAnnBySequence.addActionListener(new ActionListener()
616 public void actionPerformed(ActionEvent e)
618 boolean newState = sortAnnBySequence.getState();
619 sortAnnByLabel.setSelected(false);
620 setAnnotationSortOrder(
621 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
622 : SequenceAnnotationOrder.NONE);
623 sortAnnotations_actionPerformed();
626 sortAnnByLabel.setSelected(
627 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
628 sortAnnByLabel.addActionListener(new ActionListener()
631 public void actionPerformed(ActionEvent e)
633 boolean newState = sortAnnByLabel.getState();
634 sortAnnBySequence.setSelected(false);
635 setAnnotationSortOrder(
636 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
637 : SequenceAnnotationOrder.NONE);
638 sortAnnotations_actionPerformed();
641 colourTextMenuItem = new JCheckBoxMenuItem(
642 MessageManager.getString("label.colour_text"));
643 colourTextMenuItem.addActionListener(new ActionListener()
646 public void actionPerformed(ActionEvent e)
648 colourTextMenuItem_actionPerformed(e);
651 colourGapsMenuItem = new JCheckBoxMenuItem(
652 MessageManager.getString("label.colour_gaps"));
653 colourGapsMenuItem.addActionListener(new ActionListener()
656 public void actionPerformed(ActionEvent e)
658 colourGapsMenuItem_actionPerformed(e);
661 JMenuItem htmlMenuItem = new JMenuItem(
662 MessageManager.getString("label.html"));
663 htmlMenuItem.addActionListener(new ActionListener()
666 public void actionPerformed(ActionEvent e)
668 htmlMenuItem_actionPerformed(e);
672 JMenuItem createBioJS = new JMenuItem(
673 MessageManager.getString("label.biojs_html_export"));
674 createBioJS.addActionListener(new java.awt.event.ActionListener()
677 public void actionPerformed(ActionEvent e)
679 bioJSMenuItem_actionPerformed(e);
683 JMenuItem overviewMenuItem = new JMenuItem(
684 MessageManager.getString("label.overview_window"));
685 overviewMenuItem.addActionListener(new ActionListener()
688 public void actionPerformed(ActionEvent e)
690 overviewMenuItem_actionPerformed(e);
694 undoMenuItem.setEnabled(false);
695 undoMenuItem.setText(MessageManager.getString("action.undo"));
696 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
697 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
698 al = new ActionListener()
701 public void actionPerformed(ActionEvent e)
703 undoMenuItem_actionPerformed(e);
706 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
708 redoMenuItem.setEnabled(false);
709 redoMenuItem.setText(MessageManager.getString("action.redo"));
710 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
711 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
712 al = new ActionListener()
715 public void actionPerformed(ActionEvent e)
717 redoMenuItem_actionPerformed(e);
720 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
722 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
723 wrapMenuItem.addActionListener(new ActionListener()
726 public void actionPerformed(ActionEvent e)
728 wrapMenuItem_actionPerformed(e);
732 JMenuItem printMenuItem = new JMenuItem(
733 MessageManager.getString("action.print"));
734 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
735 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
736 al = new ActionListener()
739 public void actionPerformed(ActionEvent e)
741 printMenuItem_actionPerformed(e);
744 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
747 .setText(MessageManager.getString("action.show_gaps"));
748 renderGapsMenuItem.setState(true);
749 renderGapsMenuItem.addActionListener(new ActionListener()
752 public void actionPerformed(ActionEvent e)
754 renderGapsMenuItem_actionPerformed(e);
758 JMenuItem findMenuItem = new JMenuItem(
759 MessageManager.getString("action.find"));
760 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
761 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
762 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
763 MessageManager.getString("label.find_tip")));
764 al = new ActionListener()
767 public void actionPerformed(ActionEvent e)
769 findMenuItem_actionPerformed(e);
772 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
774 showSeqFeatures.setText(
775 MessageManager.getString("label.show_sequence_features"));
776 showSeqFeatures.addActionListener(new ActionListener()
779 public void actionPerformed(ActionEvent actionEvent)
781 showSeqFeatures_actionPerformed(actionEvent);
785 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
786 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
787 * void actionPerformed(ActionEvent actionEvent) {
788 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
791 .setText(MessageManager.getString("label.show_database_refs"));
792 showDbRefsMenuitem.addActionListener(new ActionListener()
796 public void actionPerformed(ActionEvent e)
798 showDbRefs_actionPerformed(e);
802 showNpFeatsMenuitem.setText(
803 MessageManager.getString("label.show_non_positional_features"));
804 showNpFeatsMenuitem.addActionListener(new ActionListener()
808 public void actionPerformed(ActionEvent e)
810 showNpFeats_actionPerformed(e);
814 showGroupConservation
815 .setText(MessageManager.getString("label.group_conservation"));
816 showGroupConservation.addActionListener(new ActionListener()
820 public void actionPerformed(ActionEvent e)
822 showGroupConservation_actionPerformed(e);
828 .setText(MessageManager.getString("label.group_consensus"));
829 showGroupConsensus.addActionListener(new ActionListener()
833 public void actionPerformed(ActionEvent e)
835 showGroupConsensus_actionPerformed(e);
839 showConsensusHistogram.setText(
840 MessageManager.getString("label.show_consensus_histogram"));
841 showConsensusHistogram.addActionListener(new ActionListener()
845 public void actionPerformed(ActionEvent e)
847 showConsensusHistogram_actionPerformed(e);
852 .setText(MessageManager.getString("label.show_consensus_logo"));
853 showSequenceLogo.addActionListener(new ActionListener()
857 public void actionPerformed(ActionEvent e)
859 showSequenceLogo_actionPerformed(e);
863 normaliseSequenceLogo
864 .setText(MessageManager.getString("label.norm_consensus_logo"));
865 normaliseSequenceLogo.addActionListener(new ActionListener()
869 public void actionPerformed(ActionEvent e)
871 normaliseSequenceLogo_actionPerformed(e);
875 applyAutoAnnotationSettings
876 .setText(MessageManager.getString("label.apply_all_groups"));
877 applyAutoAnnotationSettings.setState(false);
878 applyAutoAnnotationSettings.setVisible(true);
879 applyAutoAnnotationSettings.addActionListener(new ActionListener()
882 public void actionPerformed(ActionEvent e)
884 applyAutoAnnotationSettings_actionPerformed(e);
888 ButtonGroup buttonGroup = new ButtonGroup();
889 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
890 MessageManager.getString("label.show_first"));
891 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
892 MessageManager.getString("label.show_last"));
893 buttonGroup.add(showAutoFirst);
894 buttonGroup.add(showAutoLast);
895 final boolean autoFirst = Cache
896 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
897 showAutoFirst.setSelected(autoFirst);
898 setShowAutoCalculatedAbove(autoFirst);
899 showAutoFirst.addActionListener(new ActionListener()
902 public void actionPerformed(ActionEvent e)
904 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
905 sortAnnotations_actionPerformed();
908 showAutoLast.setSelected(!showAutoFirst.isSelected());
909 showAutoLast.addActionListener(new ActionListener()
912 public void actionPerformed(ActionEvent e)
914 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
915 sortAnnotations_actionPerformed();
919 JMenuItem deleteGroups = new JMenuItem(
920 MessageManager.getString("action.undefine_groups"));
921 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
922 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
923 al = new ActionListener()
926 public void actionPerformed(ActionEvent e)
928 deleteGroups_actionPerformed(e);
931 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
933 JMenuItem annotationColumn = new JMenuItem(
934 MessageManager.getString("action.select_by_annotation"));
935 annotationColumn.addActionListener(new ActionListener()
938 public void actionPerformed(ActionEvent e)
940 annotationColumn_actionPerformed(e);
944 JMenuItem createGroup = new JMenuItem(
945 MessageManager.getString("action.create_group"));
946 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
947 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
948 al = new ActionListener()
951 public void actionPerformed(ActionEvent e)
953 createGroup_actionPerformed(e);
956 addMenuActionAndAccelerator(keyStroke, createGroup, al);
958 JMenuItem unGroup = new JMenuItem(
959 MessageManager.getString("action.remove_group"));
960 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
961 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
962 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
964 al = new ActionListener()
967 public void actionPerformed(ActionEvent e)
969 unGroup_actionPerformed(e);
972 addMenuActionAndAccelerator(keyStroke, unGroup, al);
974 copy.setText(MessageManager.getString("action.copy"));
975 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
976 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
978 al = new ActionListener()
981 public void actionPerformed(ActionEvent e)
983 copy_actionPerformed(e);
986 addMenuActionAndAccelerator(keyStroke, copy, al);
988 cut.setText(MessageManager.getString("action.cut"));
989 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
990 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
991 al = new ActionListener()
994 public void actionPerformed(ActionEvent e)
996 cut_actionPerformed(e);
999 addMenuActionAndAccelerator(keyStroke, cut, al);
1001 JMenuItem delete = new JMenuItem(
1002 MessageManager.getString("action.delete"));
1003 delete.addActionListener(new ActionListener()
1006 public void actionPerformed(ActionEvent e)
1008 delete_actionPerformed(e);
1012 pasteMenu.setText(MessageManager.getString("action.paste"));
1013 JMenuItem pasteNew = new JMenuItem(
1014 MessageManager.getString("label.to_new_alignment"));
1015 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1016 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1017 | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1019 al = new ActionListener()
1022 public void actionPerformed(ActionEvent e)
1024 pasteNew_actionPerformed(e);
1027 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1029 JMenuItem pasteThis = new JMenuItem(
1030 MessageManager.getString("label.to_this_alignment"));
1031 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1032 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1033 al = new ActionListener()
1036 public void actionPerformed(ActionEvent e)
1038 pasteThis_actionPerformed(e);
1041 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1043 JMenuItem createPNG = new JMenuItem("PNG");
1044 createPNG.addActionListener(new ActionListener()
1047 public void actionPerformed(ActionEvent e)
1052 createPNG.setActionCommand(
1053 MessageManager.getString("label.save_png_image"));
1055 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1056 font.addActionListener(new ActionListener()
1059 public void actionPerformed(ActionEvent e)
1061 font_actionPerformed(e);
1065 MessageManager.getString("label.show_sequence_limits"));
1066 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1067 seqLimits.addActionListener(new ActionListener()
1070 public void actionPerformed(ActionEvent e)
1072 seqLimit_actionPerformed(e);
1075 JMenuItem epsFile = new JMenuItem("EPS");
1076 epsFile.addActionListener(new ActionListener()
1079 public void actionPerformed(ActionEvent e)
1085 JMenuItem createSVG = new JMenuItem("SVG");
1086 createSVG.addActionListener(new ActionListener()
1089 public void actionPerformed(ActionEvent e)
1095 JMenuItem loadTreeMenuItem = new JMenuItem(
1096 MessageManager.getString("label.load_associated_tree"));
1097 loadTreeMenuItem.setActionCommand(
1098 MessageManager.getString("label.load_tree_for_sequence_set"));
1099 loadTreeMenuItem.addActionListener(new ActionListener()
1102 public void actionPerformed(ActionEvent e)
1104 loadTreeMenuItem_actionPerformed(e);
1108 scaleAbove.setVisible(false);
1109 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1110 scaleAbove.addActionListener(new ActionListener()
1113 public void actionPerformed(ActionEvent e)
1115 scaleAbove_actionPerformed(e);
1118 scaleLeft.setVisible(false);
1119 scaleLeft.setSelected(true);
1120 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1121 scaleLeft.addActionListener(new ActionListener()
1124 public void actionPerformed(ActionEvent e)
1126 scaleLeft_actionPerformed(e);
1129 scaleRight.setVisible(false);
1130 scaleRight.setSelected(true);
1131 scaleRight.setText(MessageManager.getString("action.scale_right"));
1132 scaleRight.addActionListener(new ActionListener()
1135 public void actionPerformed(ActionEvent e)
1137 scaleRight_actionPerformed(e);
1140 centreColumnLabelsMenuItem.setVisible(true);
1141 centreColumnLabelsMenuItem.setState(false);
1142 centreColumnLabelsMenuItem.setText(
1143 MessageManager.getString("label.centre_column_labels"));
1144 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1147 public void actionPerformed(ActionEvent e)
1149 centreColumnLabels_actionPerformed(e);
1152 followHighlightMenuItem.setVisible(true);
1153 followHighlightMenuItem.setState(true);
1154 followHighlightMenuItem
1155 .setText(MessageManager.getString("label.automatic_scrolling"));
1156 followHighlightMenuItem.addActionListener(new ActionListener()
1160 public void actionPerformed(ActionEvent e)
1162 followHighlight_actionPerformed();
1168 .setText(MessageManager.getString("action.by_tree_order"));
1169 sort.setText(MessageManager.getString("action.sort"));
1170 sort.addMenuListener(new MenuListener()
1173 public void menuSelected(MenuEvent e)
1175 buildTreeSortMenu();
1179 public void menuDeselected(MenuEvent e)
1184 public void menuCanceled(MenuEvent e)
1189 .setText(MessageManager.getString("label.sort_by_score"));
1190 sort.add(sortByAnnotScore);
1191 sort.addMenuListener(new javax.swing.event.MenuListener()
1195 public void menuCanceled(MenuEvent e)
1200 public void menuDeselected(MenuEvent e)
1205 public void menuSelected(MenuEvent e)
1207 buildSortByAnnotationScoresMenu();
1210 sortByAnnotScore.setVisible(false);
1213 .setText(MessageManager.getString("action.calculate_tree_pca"));
1215 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1217 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1218 padGapsMenuitem.addActionListener(new ActionListener()
1221 public void actionPerformed(ActionEvent e)
1223 padGapsMenuitem_actionPerformed(e);
1226 JMenuItem vamsasStore = new JMenuItem(
1227 MessageManager.getString("label.vamsas_store"));
1228 vamsasStore.setVisible(false);
1229 vamsasStore.addActionListener(new ActionListener()
1232 public void actionPerformed(ActionEvent e)
1234 vamsasStore_actionPerformed(e);
1239 * Translate as cDNA with sub-menu of translation tables
1241 showTranslation.setText(MessageManager
1242 .getString("label.translate_cDNA"));
1243 boolean first = true;
1244 for (final GeneticCodeI table : GeneticCodes.getInstance()
1247 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1248 showTranslation.add(item);
1249 item.addActionListener(new ActionListener()
1252 public void actionPerformed(ActionEvent e)
1254 showTranslation_actionPerformed(table);
1259 showTranslation.addSeparator();
1264 showReverse.setText(MessageManager.getString("label.reverse"));
1265 showReverse.addActionListener(new ActionListener()
1268 public void actionPerformed(ActionEvent e)
1270 showReverse_actionPerformed(false);
1273 showReverseComplement
1274 .setText(MessageManager.getString("label.reverse_complement"));
1275 showReverseComplement.addActionListener(new ActionListener()
1278 public void actionPerformed(ActionEvent e)
1280 showReverse_actionPerformed(true);
1284 JMenuItem extractScores = new JMenuItem(
1285 MessageManager.getString("label.extract_scores"));
1286 extractScores.addActionListener(new ActionListener()
1289 public void actionPerformed(ActionEvent e)
1291 extractScores_actionPerformed(e);
1294 extractScores.setVisible(true);
1295 // JBPNote: TODO: make gui for regex based score extraction
1297 // for show products actions see AlignFrame.canShowProducts
1298 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1300 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1301 runGroovy.setToolTipText(
1302 MessageManager.getString("label.run_groovy_tip"));
1303 runGroovy.addActionListener(new ActionListener()
1306 public void actionPerformed(ActionEvent e)
1308 runGroovy_actionPerformed();
1312 JMenuItem openFeatureSettings = new JMenuItem(
1313 MessageManager.getString("action.feature_settings"));
1314 openFeatureSettings.addActionListener(new ActionListener()
1317 public void actionPerformed(ActionEvent e)
1319 featureSettings_actionPerformed(e);
1322 JMenuItem fetchSequence = new JMenuItem(
1323 MessageManager.getString("label.fetch_sequences"));
1324 fetchSequence.addActionListener(new ActionListener()
1327 public void actionPerformed(ActionEvent e)
1329 fetchSequence_actionPerformed(e);
1333 JMenuItem associatedData = new JMenuItem(
1334 MessageManager.getString("label.load_features_annotations"));
1335 associatedData.addActionListener(new ActionListener()
1338 public void actionPerformed(ActionEvent e)
1340 associatedData_actionPerformed(e);
1343 loadVcf = new JMenuItem(MessageManager.getString("label.load_vcf_file"));
1344 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1345 loadVcf.addActionListener(new ActionListener()
1348 public void actionPerformed(ActionEvent e)
1350 loadVcf_actionPerformed();
1353 autoCalculate.setText(
1354 MessageManager.getString("label.autocalculate_consensus"));
1355 autoCalculate.setState(
1356 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1357 autoCalculate.addActionListener(new ActionListener()
1360 public void actionPerformed(ActionEvent e)
1362 autoCalculate_actionPerformed(e);
1366 MessageManager.getString("label.sort_alignment_new_tree"));
1367 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1368 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1370 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1371 sortByTree.addActionListener(new ActionListener()
1374 public void actionPerformed(ActionEvent e)
1376 sortByTreeOption_actionPerformed(e);
1380 listenToViewSelections.setText(
1381 MessageManager.getString("label.listen_for_selections"));
1382 listenToViewSelections
1383 .setToolTipText("<html>" + MessageManager.getString(
1384 "label.selections_mirror_selections_made_same_sequences_other_views"));
1385 listenToViewSelections.setState(false);
1386 listenToViewSelections.addActionListener(new ActionListener()
1389 public void actionPerformed(ActionEvent e)
1391 listenToViewSelections_actionPerformed(e);
1395 JMenu addSequenceMenu = new JMenu(
1396 MessageManager.getString("label.add_sequences"));
1397 JMenuItem addFromFile = new JMenuItem(
1398 MessageManager.getString("label.from_file"));
1399 addFromFile.addActionListener(new ActionListener()
1402 public void actionPerformed(ActionEvent e)
1404 addFromFile_actionPerformed(e);
1407 JMenuItem addFromText = new JMenuItem(
1408 MessageManager.getString("label.from_textbox"));
1409 addFromText.addActionListener(new ActionListener()
1412 public void actionPerformed(ActionEvent e)
1414 addFromText_actionPerformed(e);
1417 JMenuItem addFromURL = new JMenuItem(
1418 MessageManager.getString("label.from_url"));
1419 addFromURL.addActionListener(new ActionListener()
1422 public void actionPerformed(ActionEvent e)
1424 addFromURL_actionPerformed(e);
1427 JMenuItem exportFeatures = new JMenuItem(
1428 MessageManager.getString("label.export_features"));
1429 exportFeatures.addActionListener(new ActionListener()
1432 public void actionPerformed(ActionEvent e)
1434 exportFeatures_actionPerformed(e);
1437 JMenuItem exportAnnotations = new JMenuItem(
1438 MessageManager.getString("label.export_annotations"));
1439 exportAnnotations.addActionListener(new ActionListener()
1442 public void actionPerformed(ActionEvent e)
1444 exportAnnotations_actionPerformed(e);
1447 statusPanel.setLayout(new GridLayout());
1448 JMenuItem showAllSeqs = new JMenuItem(
1449 MessageManager.getString("label.all_sequences"));
1450 showAllSeqs.setToolTipText(
1451 MessageManager.getString("label.toggle_sequence_visibility"));
1452 showAllSeqs.addActionListener(new ActionListener()
1455 public void actionPerformed(ActionEvent e)
1457 showAllSeqs_actionPerformed(e);
1460 JMenuItem showAllColumns = new JMenuItem(
1461 MessageManager.getString("label.all_columns"));
1462 showAllColumns.setToolTipText(
1463 MessageManager.getString("label.toggle_columns_visibility"));
1464 showAllColumns.addActionListener(new ActionListener()
1467 public void actionPerformed(ActionEvent e)
1469 showAllColumns_actionPerformed(e);
1472 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1473 JMenuItem hideSelSequences = new JMenuItem(
1474 MessageManager.getString("label.selected_sequences"));
1475 hideSelSequences.setToolTipText(
1476 MessageManager.getString("label.toggle_sequence_visibility"));
1477 hideSelSequences.addActionListener(new ActionListener()
1480 public void actionPerformed(ActionEvent e)
1482 hideSelSequences_actionPerformed(e);
1485 JMenuItem hideSelColumns = new JMenuItem(
1486 MessageManager.getString("label.selected_columns"));
1487 hideSelColumns.setToolTipText(
1488 MessageManager.getString("label.toggle_columns_visibility"));
1489 hideSelColumns.addActionListener(new ActionListener()
1492 public void actionPerformed(ActionEvent e)
1494 hideSelColumns_actionPerformed(e);
1497 JMenuItem hideAllSelection = new JMenuItem(
1498 MessageManager.getString("label.selected_region"));
1499 hideAllSelection.addActionListener(new ActionListener()
1502 public void actionPerformed(ActionEvent e)
1504 hideAllSelection_actionPerformed(e);
1507 // TODO: should be hidden if no selection exists.
1508 JMenuItem hideAllButSelection = new JMenuItem(
1509 MessageManager.getString("label.all_but_selected_region"));
1510 hideAllButSelection.addActionListener(new ActionListener()
1513 public void actionPerformed(ActionEvent e)
1515 hideAllButSelection_actionPerformed(e);
1518 JMenuItem showAllhidden = new JMenuItem(
1519 MessageManager.getString("label.all_sequences_columns"));
1520 showAllhidden.setToolTipText(MessageManager
1521 .getString("label.toggles_visibility_hidden_selected_regions"));
1522 showAllhidden.addActionListener(new ActionListener()
1525 public void actionPerformed(ActionEvent e)
1527 showAllhidden_actionPerformed(e);
1530 hiddenMarkers.setText(
1531 MessageManager.getString("action.show_hidden_markers"));
1532 hiddenMarkers.addActionListener(new ActionListener()
1535 public void actionPerformed(ActionEvent e)
1537 hiddenMarkers_actionPerformed(e);
1541 JMenuItem invertColSel = new JMenuItem(
1542 MessageManager.getString("action.invert_column_selection"));
1543 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1544 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1545 | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1547 al = new ActionListener()
1550 public void actionPerformed(ActionEvent e)
1552 invertColSel_actionPerformed(e);
1555 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1557 showComplementMenuItem.setVisible(false);
1558 showComplementMenuItem.addActionListener(new ActionListener()
1561 public void actionPerformed(ActionEvent e)
1563 showComplement_actionPerformed(showComplementMenuItem.getState());
1567 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1570 public void stateChanged(ChangeEvent evt)
1572 JTabbedPane pane = (JTabbedPane) evt.getSource();
1573 int sel = pane.getSelectedIndex();
1574 tabSelectionChanged(sel);
1577 tabbedPane.addMouseListener(new MouseAdapter()
1580 public void mousePressed(MouseEvent e)
1582 if (e.isPopupTrigger()) // Mac
1584 tabbedPane_mousePressed(e);
1589 public void mouseReleased(MouseEvent e)
1591 if (e.isPopupTrigger()) // Windows
1593 tabbedPane_mousePressed(e);
1597 tabbedPane.addFocusListener(new FocusAdapter()
1600 public void focusGained(FocusEvent e)
1602 tabbedPane_focusGained(e);
1606 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1607 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1608 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1609 al = new ActionListener()
1612 public void actionPerformed(ActionEvent e)
1614 save_actionPerformed(e);
1617 addMenuActionAndAccelerator(keyStroke, save, al);
1619 reload.setEnabled(false);
1620 reload.setText(MessageManager.getString("action.reload"));
1621 reload.addActionListener(new ActionListener()
1624 public void actionPerformed(ActionEvent e)
1626 reload_actionPerformed(e);
1630 JMenuItem newView = new JMenuItem(
1631 MessageManager.getString("action.new_view"));
1632 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1633 jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
1634 al = new ActionListener()
1637 public void actionPerformed(ActionEvent e)
1639 newView_actionPerformed(e);
1642 addMenuActionAndAccelerator(keyStroke, newView, al);
1644 tabbedPane.setToolTipText("<html><i>"
1645 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1648 formatMenu.setText(MessageManager.getString("action.format"));
1649 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1651 idRightAlign.setText(
1652 MessageManager.getString("label.right_align_sequence_id"));
1653 idRightAlign.addActionListener(new ActionListener()
1656 public void actionPerformed(ActionEvent e)
1658 idRightAlign_actionPerformed(e);
1662 gatherViews.setEnabled(false);
1663 gatherViews.setText(MessageManager.getString("action.gather_views"));
1664 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1665 al = new ActionListener()
1668 public void actionPerformed(ActionEvent e)
1670 gatherViews_actionPerformed(e);
1673 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1675 expandViews.setEnabled(false);
1676 expandViews.setText(MessageManager.getString("action.expand_views"));
1677 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1678 al = new ActionListener()
1681 public void actionPerformed(ActionEvent e)
1683 expandViews_actionPerformed(e);
1686 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1688 JMenuItem pageSetup = new JMenuItem(
1689 MessageManager.getString("action.page_setup"));
1690 pageSetup.addActionListener(new ActionListener()
1693 public void actionPerformed(ActionEvent e)
1695 pageSetup_actionPerformed(e);
1698 JMenuItem alignmentProperties = new JMenuItem(
1699 MessageManager.getString("label.alignment_props"));
1700 alignmentProperties.addActionListener(new ActionListener()
1703 public void actionPerformed(ActionEvent actionEvent)
1705 alignmentProperties();
1708 JMenuItem selectHighlighted = new JMenuItem(
1709 MessageManager.getString("action.select_highlighted_columns"));
1710 selectHighlighted.setToolTipText(
1711 MessageManager.getString("tooltip.select_highlighted_columns"));
1712 al = new ActionListener()
1715 public void actionPerformed(ActionEvent actionEvent)
1717 selectHighlightedColumns_actionPerformed(actionEvent);
1720 selectHighlighted.addActionListener(al);
1721 JMenu tooltipSettingsMenu = new JMenu(
1722 MessageManager.getString("label.sequence_id_tooltip"));
1723 JMenu autoAnnMenu = new JMenu(
1724 MessageManager.getString("label.autocalculated_annotation"));
1726 JMenu exportImageMenu = new JMenu(
1727 MessageManager.getString("label.export_image"));
1728 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1729 alignFrameMenuBar.add(fileMenu);
1730 alignFrameMenuBar.add(editMenu);
1731 alignFrameMenuBar.add(selectMenu);
1732 alignFrameMenuBar.add(viewMenu);
1733 alignFrameMenuBar.add(annotationsMenu);
1734 alignFrameMenuBar.add(formatMenu);
1735 alignFrameMenuBar.add(colourMenu);
1736 alignFrameMenuBar.add(calculateMenu);
1737 alignFrameMenuBar.add(webService);
1739 fileMenu.add(fetchSequence);
1740 fileMenu.add(addSequenceMenu);
1741 fileMenu.add(reload);
1742 fileMenu.addSeparator();
1743 fileMenu.add(vamsasStore);
1745 fileMenu.add(saveAs);
1746 fileMenu.add(outputTextboxMenu);
1747 fileMenu.add(pageSetup);
1748 fileMenu.add(printMenuItem);
1749 fileMenu.addSeparator();
1750 fileMenu.add(exportImageMenu);
1751 fileMenu.add(exportFeatures);
1752 fileMenu.add(exportAnnotations);
1753 fileMenu.add(loadTreeMenuItem);
1754 fileMenu.add(associatedData);
1755 fileMenu.add(loadVcf);
1756 fileMenu.addSeparator();
1757 fileMenu.add(closeMenuItem);
1759 pasteMenu.add(pasteNew);
1760 pasteMenu.add(pasteThis);
1761 editMenu.add(undoMenuItem);
1762 editMenu.add(redoMenuItem);
1765 editMenu.add(pasteMenu);
1766 editMenu.add(delete);
1767 editMenu.addSeparator();
1768 editMenu.add(remove2LeftMenuItem);
1769 editMenu.add(remove2RightMenuItem);
1770 editMenu.add(removeGappedColumnMenuItem);
1771 editMenu.add(removeAllGapsMenuItem);
1772 editMenu.add(removeRedundancyMenuItem);
1773 editMenu.addSeparator();
1774 // dont add these yet in the CVS build - they cannot be undone!
1775 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1776 // editMenu.add(justifyLeftMenuItem);
1777 // editMenu.add(justifyRightMenuItem);
1778 // editMenu.addSeparator();
1779 editMenu.add(padGapsMenuitem);
1781 showMenu.add(showAllColumns);
1782 showMenu.add(showAllSeqs);
1783 showMenu.add(showAllhidden);
1784 hideMenu.add(hideSelColumns);
1785 hideMenu.add(hideSelSequences);
1786 hideMenu.add(hideAllSelection);
1787 hideMenu.add(hideAllButSelection);
1788 viewMenu.add(newView);
1789 viewMenu.add(expandViews);
1790 viewMenu.add(gatherViews);
1791 viewMenu.addSeparator();
1792 viewMenu.add(showMenu);
1793 viewMenu.add(hideMenu);
1794 viewMenu.add(showComplementMenuItem);
1795 viewMenu.addSeparator();
1796 viewMenu.add(followHighlightMenuItem);
1797 viewMenu.addSeparator();
1798 viewMenu.add(showSeqFeatures);
1799 // viewMenu.add(showSeqFeaturesHeight);
1800 viewMenu.add(openFeatureSettings);
1801 tooltipSettingsMenu.add(showDbRefsMenuitem);
1802 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1803 viewMenu.add(tooltipSettingsMenu);
1804 viewMenu.addSeparator();
1805 viewMenu.add(alignmentProperties);
1806 viewMenu.addSeparator();
1807 viewMenu.add(overviewMenuItem);
1809 annotationsMenu.add(annotationPanelMenuItem);
1810 annotationsMenu.addSeparator();
1811 annotationsMenu.add(showAllAlAnnotations);
1812 annotationsMenu.add(hideAllAlAnnotations);
1813 annotationsMenu.addSeparator();
1814 annotationsMenu.add(showAllSeqAnnotations);
1815 annotationsMenu.add(hideAllSeqAnnotations);
1816 annotationsMenu.add(sortAnnBySequence);
1817 annotationsMenu.add(sortAnnByLabel);
1818 annotationsMenu.addSeparator();
1819 autoAnnMenu.add(showAutoFirst);
1820 autoAnnMenu.add(showAutoLast);
1821 autoAnnMenu.addSeparator();
1822 autoAnnMenu.add(applyAutoAnnotationSettings);
1823 autoAnnMenu.add(showConsensusHistogram);
1824 autoAnnMenu.add(showSequenceLogo);
1825 autoAnnMenu.add(normaliseSequenceLogo);
1826 autoAnnMenu.addSeparator();
1827 autoAnnMenu.add(showGroupConservation);
1828 autoAnnMenu.add(showGroupConsensus);
1829 annotationsMenu.add(autoAnnMenu);
1831 sort.add(sortIDMenuItem);
1832 sort.add(sortLengthMenuItem);
1833 sort.add(sortGroupMenuItem);
1834 sort.add(sortPairwiseMenuItem);
1835 sort.add(sortByTreeMenu);
1836 calculateMenu.add(sort);
1837 calculateMenu.add(calculateTree);
1838 calculateMenu.addSeparator();
1839 calculateMenu.add(pairwiseAlignmentMenuItem);
1840 calculateMenu.addSeparator();
1841 calculateMenu.add(showTranslation);
1842 calculateMenu.add(showReverse);
1843 calculateMenu.add(showReverseComplement);
1844 calculateMenu.add(showProducts);
1845 calculateMenu.add(autoCalculate);
1846 calculateMenu.add(sortByTree);
1847 calculateMenu.addSeparator();
1848 calculateMenu.add(expandAlignment);
1849 calculateMenu.add(extractScores);
1850 calculateMenu.addSeparator();
1851 calculateMenu.add(runGroovy);
1853 webServiceNoServices = new JMenuItem(
1854 MessageManager.getString("label.no_services"));
1855 webService.add(webServiceNoServices);
1856 exportImageMenu.add(htmlMenuItem);
1857 exportImageMenu.add(epsFile);
1858 exportImageMenu.add(createPNG);
1859 exportImageMenu.add(createBioJS);
1860 exportImageMenu.add(createSVG);
1861 addSequenceMenu.add(addFromFile);
1862 addSequenceMenu.add(addFromText);
1863 addSequenceMenu.add(addFromURL);
1864 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1865 statusPanel.add(statusBar, null);
1866 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1868 formatMenu.add(font);
1869 formatMenu.addSeparator();
1870 formatMenu.add(wrapMenuItem);
1871 formatMenu.add(scaleAbove);
1872 formatMenu.add(scaleLeft);
1873 formatMenu.add(scaleRight);
1874 formatMenu.add(seqLimits);
1875 formatMenu.add(idRightAlign);
1876 formatMenu.add(hiddenMarkers);
1877 formatMenu.add(viewBoxesMenuItem);
1878 formatMenu.add(viewTextMenuItem);
1879 formatMenu.add(colourTextMenuItem);
1880 formatMenu.add(renderGapsMenuItem);
1881 formatMenu.add(colourGapsMenuItem);
1882 formatMenu.add(centreColumnLabelsMenuItem);
1883 formatMenu.add(showNonconservedMenuItem);
1884 selectMenu.add(findMenuItem);
1885 selectMenu.addSeparator();
1886 selectMenu.add(selectAllSequenceMenuItem);
1887 selectMenu.add(deselectAllSequenceMenuItem);
1888 selectMenu.add(invertSequenceMenuItem);
1889 selectMenu.add(invertColSel);
1890 selectMenu.add(createGroup);
1891 selectMenu.add(unGroup);
1892 selectMenu.add(grpsFromSelection);
1893 selectMenu.add(deleteGroups);
1894 selectMenu.add(annotationColumn);
1895 selectMenu.add(selectHighlighted);
1896 // TODO - determine if the listenToViewSelections button is needed : see bug
1898 // selectMenu.addSeparator();
1899 // selectMenu.add(listenToViewSelections);
1902 protected void colourGapsMenuItem_actionPerformed(ActionEvent e)
1904 // TODO Auto-generated method stub
1908 protected void loadVcf_actionPerformed()
1913 * Constructs the entries on the Colour menu (but does not add them to the
1916 protected void initColourMenu()
1918 applyToAllGroups = new JCheckBoxMenuItem(
1919 MessageManager.getString("label.apply_colour_to_all_groups"));
1920 applyToAllGroups.addActionListener(new ActionListener()
1923 public void actionPerformed(ActionEvent e)
1925 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1929 textColour = new JMenuItem(
1930 MessageManager.getString("label.text_colour"));
1931 textColour.addActionListener(new ActionListener()
1934 public void actionPerformed(ActionEvent e)
1936 textColour_actionPerformed();
1940 conservationMenuItem = new JCheckBoxMenuItem(
1941 MessageManager.getString("action.by_conservation"));
1942 conservationMenuItem.addActionListener(new ActionListener()
1945 public void actionPerformed(ActionEvent e)
1947 conservationMenuItem_actionPerformed(
1948 conservationMenuItem.isSelected());
1952 abovePIDThreshold = new JCheckBoxMenuItem(
1953 MessageManager.getString("label.above_identity_threshold"));
1954 abovePIDThreshold.addActionListener(new ActionListener()
1957 public void actionPerformed(ActionEvent e)
1959 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1962 modifyPID = new JMenuItem(
1963 MessageManager.getString("label.modify_identity_threshold"));
1964 modifyPID.addActionListener(new ActionListener()
1967 public void actionPerformed(ActionEvent e)
1969 modifyPID_actionPerformed();
1972 modifyConservation = new JMenuItem(MessageManager
1973 .getString("label.modify_conservation_threshold"));
1974 modifyConservation.addActionListener(new ActionListener()
1977 public void actionPerformed(ActionEvent e)
1979 modifyConservation_actionPerformed();
1983 annotationColour = new JRadioButtonMenuItem(
1984 MessageManager.getString("action.by_annotation"));
1985 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
1986 annotationColour.addActionListener(new ActionListener()
1989 public void actionPerformed(ActionEvent e)
1991 annotationColour_actionPerformed();
1996 protected void selectHighlightedColumns_actionPerformed(
1997 ActionEvent actionEvent)
1999 // TODO Auto-generated method stub
2004 * Generate the reverse sequence (or reverse complement if the flag is true)
2005 * and add it to the alignment
2009 protected void showReverse_actionPerformed(boolean complement)
2014 * Try to run script in a Groovy console, having first ensured that this
2015 * alignframe is set as currentAlignFrame in Desktop
2017 protected void runGroovy_actionPerformed()
2023 * Adds the given action listener and key accelerator to the given menu item.
2024 * Also saves in a lookup table to support lookup of action by key stroke.
2028 * @param actionListener
2030 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2031 JMenuItem menuItem, ActionListener actionListener)
2033 menuItem.setAccelerator(keyStroke);
2034 accelerators.put(keyStroke, menuItem);
2035 menuItem.addActionListener(actionListener);
2039 * Action on clicking sort annotations by type.
2043 protected void sortAnnotations_actionPerformed()
2048 * Action on clicking Show all annotations.
2050 * @param forSequences
2051 * update sequence-related annotations
2052 * @param forAlignment
2053 * update non-sequence-related annotations
2055 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2056 boolean forAlignment)
2058 setAnnotationsVisibility(true, forSequences, forAlignment);
2062 * Action on clicking Hide all annotations.
2064 * @param forSequences
2065 * update sequence-related annotations
2066 * @param forAlignment
2067 * update non-sequence-related annotations
2069 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2070 boolean forAlignment)
2072 setAnnotationsVisibility(false, forSequences, forAlignment);
2076 * Set the visibility of annotations to true or false. Can act on
2077 * sequence-related annotations, or alignment-related, or both.
2080 * @param forSequences
2081 * update sequence-related annotations
2082 * @param forAlignment
2083 * update non-sequence-related annotations
2085 protected void setAnnotationsVisibility(boolean visible,
2086 boolean forSequences, boolean forAlignment)
2091 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2093 // TODO Auto-generated method stub
2097 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2099 // TODO Auto-generated method stub
2103 protected void showAllhidden_actionPerformed(ActionEvent e)
2105 // TODO Auto-generated method stub
2109 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2111 // TODO Auto-generated method stub
2115 protected void hideAllSelection_actionPerformed(ActionEvent e)
2117 // TODO Auto-generated method stub
2121 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2123 // TODO Auto-generated method stub
2127 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2129 // TODO Auto-generated method stub
2133 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2135 // TODO Auto-generated method stub
2139 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2141 // TODO Auto-generated method stub
2145 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2147 // TODO Auto-generated method stub
2151 protected void showGroupConservation_actionPerformed(ActionEvent e)
2153 // TODO Auto-generated method stub
2157 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2159 // TODO Auto-generated method stub
2163 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2165 // TODO Auto-generated method stub
2169 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2171 // TODO Auto-generated method stub
2175 protected void followHighlight_actionPerformed()
2177 // TODO Auto-generated method stub
2181 protected void showNpFeats_actionPerformed(ActionEvent e)
2183 // TODO Auto-generated method stub
2187 protected void showDbRefs_actionPerformed(ActionEvent e)
2189 // TODO Auto-generated method stub
2193 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2197 protected void buildSortByAnnotationScoresMenu()
2201 protected void extractScores_actionPerformed(ActionEvent e)
2205 protected void outputText_actionPerformed(ActionEvent e)
2209 public void addFromFile_actionPerformed(ActionEvent e)
2214 public void addFromText_actionPerformed(ActionEvent e)
2219 public void addFromURL_actionPerformed(ActionEvent e)
2224 public void exportFeatures_actionPerformed(ActionEvent e)
2229 public void exportAnnotations_actionPerformed(ActionEvent e)
2234 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2238 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2243 protected void closeMenuItem_actionPerformed(boolean b)
2247 protected void redoMenuItem_actionPerformed(ActionEvent e)
2251 protected void undoMenuItem_actionPerformed(ActionEvent e)
2255 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2259 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2263 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2267 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2271 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2275 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2279 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2283 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2287 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2291 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2295 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2299 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2303 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2307 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2311 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2315 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2319 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2323 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2327 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2331 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2335 protected void conservationMenuItem_actionPerformed(boolean selected)
2339 protected void printMenuItem_actionPerformed(ActionEvent e)
2343 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2347 protected void findMenuItem_actionPerformed(ActionEvent e)
2351 protected void abovePIDThreshold_actionPerformed(boolean selected)
2355 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2359 protected void deleteGroups_actionPerformed(ActionEvent e)
2363 protected void createGroup_actionPerformed(ActionEvent e)
2367 protected void unGroup_actionPerformed(ActionEvent e)
2371 protected void copy_actionPerformed(ActionEvent e)
2375 protected void cut_actionPerformed(ActionEvent e)
2379 protected void delete_actionPerformed(ActionEvent e)
2383 protected void pasteNew_actionPerformed(ActionEvent e)
2387 protected void pasteThis_actionPerformed(ActionEvent e)
2391 protected void applyToAllGroups_actionPerformed(boolean selected)
2395 public void createPNG(java.io.File f)
2399 protected void font_actionPerformed(ActionEvent e)
2403 protected void seqLimit_actionPerformed(ActionEvent e)
2407 public void seqDBRef_actionPerformed(ActionEvent e)
2412 public void createEPS(java.io.File f)
2416 public void createSVG(java.io.File f)
2421 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2427 * Template method to handle the 'load T-Coffee scores' menu event.
2429 * Subclasses override this method to provide a custom action.
2434 protected void loadScores_actionPerformed(ActionEvent event)
2439 protected void jpred_actionPerformed(ActionEvent e)
2443 protected void scaleAbove_actionPerformed(ActionEvent e)
2447 protected void scaleLeft_actionPerformed(ActionEvent e)
2451 protected void scaleRight_actionPerformed(ActionEvent e)
2455 protected void modifyPID_actionPerformed()
2459 protected void modifyConservation_actionPerformed()
2463 protected void saveAs_actionPerformed(ActionEvent e)
2467 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2471 public void vamsasStore_actionPerformed(ActionEvent e)
2476 public void vamsasLoad_actionPerformed(ActionEvent e)
2481 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2486 public void featureSettings_actionPerformed(ActionEvent e)
2491 public void fetchSequence_actionPerformed(ActionEvent e)
2496 public void smoothFont_actionPerformed(ActionEvent e)
2501 public void annotationColour_actionPerformed()
2505 public void annotationColumn_actionPerformed(ActionEvent e)
2509 public void associatedData_actionPerformed(ActionEvent e)
2514 public void autoCalculate_actionPerformed(ActionEvent e)
2519 public void sortByTreeOption_actionPerformed(ActionEvent e)
2524 public void showAllSeqs_actionPerformed(ActionEvent e)
2529 public void showAllColumns_actionPerformed(ActionEvent e)
2534 public void hideSelSequences_actionPerformed(ActionEvent e)
2539 public void hideSelColumns_actionPerformed(ActionEvent e)
2544 public void hiddenMarkers_actionPerformed(ActionEvent e)
2549 public void findPdbId_actionPerformed(ActionEvent e)
2554 public void enterPdbId_actionPerformed(ActionEvent e)
2559 public void pdbFile_actionPerformed(ActionEvent e)
2564 public void invertColSel_actionPerformed(ActionEvent e)
2569 public void tabSelectionChanged(int sel)
2574 public void tabbedPane_mousePressed(MouseEvent e)
2579 public void tabbedPane_focusGained(FocusEvent e)
2584 public void save_actionPerformed(ActionEvent e)
2589 public void reload_actionPerformed(ActionEvent e)
2594 public void newView_actionPerformed(ActionEvent e)
2599 public void textColour_actionPerformed()
2604 public void idRightAlign_actionPerformed(ActionEvent e)
2609 public void expandViews_actionPerformed(ActionEvent e)
2614 public void gatherViews_actionPerformed(ActionEvent e)
2619 public void buildTreeSortMenu()
2624 public void pageSetup_actionPerformed(ActionEvent e)
2629 public void alignmentProperties()
2634 protected void expand_newalign(ActionEvent e)
2636 // TODO Auto-generated method stub
2640 protected boolean isShowAutoCalculatedAbove()
2642 return showAutoCalculatedAbove;
2645 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2647 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2650 protected SequenceAnnotationOrder getAnnotationSortOrder()
2652 return annotationSortOrder;
2655 protected void setAnnotationSortOrder(
2656 SequenceAnnotationOrder annotationSortOrder)
2658 this.annotationSortOrder = annotationSortOrder;
2661 public Map<KeyStroke, JMenuItem> getAccelerators()
2663 return this.accelerators;
2667 * Returns the selected index of the tabbed pane, or -1 if none selected
2668 * (including the case where the tabbed pane has not been made visible).
2672 public int getTabIndex()
2674 return tabbedPane.getSelectedIndex();
2677 public JPanel getStatusPanel()
2683 * Sets a reference to the containing split frame. Also makes the 'toggle
2684 * split view' menu item visible and checked.
2688 public void setSplitFrame(SplitContainerI sf)
2690 this.splitFrame = sf;
2693 this.showComplementMenuItem.setVisible(true);
2694 this.showComplementMenuItem.setState(true);
2698 public SplitContainerI getSplitViewContainer()
2700 return this.splitFrame;
2703 protected void showComplement_actionPerformed(boolean complement)