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.api.SplitContainerI;
25 import jalview.bin.Cache;
26 import jalview.gui.JvSwingUtils;
27 import jalview.gui.Preferences;
28 import jalview.io.FileFormats;
29 import jalview.util.MessageManager;
30 import jalview.util.Platform;
32 import java.awt.BorderLayout;
33 import java.awt.Color;
34 import java.awt.GridLayout;
35 import java.awt.Toolkit;
36 import java.awt.event.ActionEvent;
37 import java.awt.event.ActionListener;
38 import java.awt.event.FocusAdapter;
39 import java.awt.event.FocusEvent;
40 import java.awt.event.KeyEvent;
41 import java.awt.event.MouseAdapter;
42 import java.awt.event.MouseEvent;
43 import java.io.IOException;
44 import java.util.HashMap;
47 import javax.swing.BorderFactory;
48 import javax.swing.ButtonGroup;
49 import javax.swing.JCheckBoxMenuItem;
50 import javax.swing.JInternalFrame;
51 import javax.swing.JLabel;
52 import javax.swing.JMenu;
53 import javax.swing.JMenuBar;
54 import javax.swing.JMenuItem;
55 import javax.swing.JPanel;
56 import javax.swing.JRadioButtonMenuItem;
57 import javax.swing.JTabbedPane;
58 import javax.swing.KeyStroke;
59 import javax.swing.event.ChangeEvent;
60 import javax.swing.event.MenuEvent;
61 import javax.swing.event.MenuListener;
63 public class GAlignFrame extends JInternalFrame
65 protected JMenuBar alignFrameMenuBar = new JMenuBar();
67 protected JMenuItem closeMenuItem = new JMenuItem();
69 protected JMenu webService = new JMenu();
71 protected JMenu hmmerMenu = new JMenu();
73 protected JMenuItem hmmAlign = new JMenuItem();
75 protected JMenuItem hmmSearch = new JMenuItem();
77 protected JMenuItem hmmBuild = new JCheckBoxMenuItem();
79 protected JMenuItem webServiceNoServices;
81 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
83 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
85 protected JMenu sortByAnnotScore = new JMenu();
87 public JLabel statusBar = new JLabel();
89 protected JMenu outputTextboxMenu = new JMenu();
91 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
93 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
95 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
97 protected JMenuItem undoMenuItem = new JMenuItem();
99 protected JMenuItem redoMenuItem = new JMenuItem();
101 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
103 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
105 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
107 JMenuItem copy = new JMenuItem();
109 JMenuItem cut = new JMenuItem();
111 JMenu pasteMenu = new JMenu();
113 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
115 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
117 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
119 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
121 protected JCheckBoxMenuItem applyToAllGroups;
123 protected JMenu colourMenu = new JMenu();
125 protected JMenuItem textColour;
127 protected JCheckBoxMenuItem conservationMenuItem;
129 protected JMenuItem modifyConservation;
131 protected JCheckBoxMenuItem abovePIDThreshold;
133 protected JMenuItem modifyPID;
135 protected JMenuItem annotationColour;
137 protected JMenu sortByTreeMenu = new JMenu();
139 protected JMenu sort = new JMenu();
141 protected JMenuItem calculateTree = new JMenuItem();
143 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
145 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
147 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
149 protected JMenuItem showTranslation = new JMenuItem();
151 protected JMenuItem showReverse = new JMenuItem();
153 protected JMenuItem showReverseComplement = new JMenuItem();
155 protected JMenu showProducts = new JMenu();
157 protected JMenuItem runGroovy = new JMenuItem();
159 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
161 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
163 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
165 protected JPanel statusPanel = new JPanel();
167 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
169 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
171 protected JMenuItem showAllAlAnnotations = new JMenuItem();
173 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
175 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
177 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
179 protected JTabbedPane tabbedPane = new JTabbedPane();
181 protected JMenuItem reload = new JMenuItem();
183 protected JMenu formatMenu = new JMenu();
185 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
187 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
189 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
191 protected JMenuItem gatherViews = new JMenuItem();
193 protected JMenuItem expandViews = new JMenuItem();
195 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
197 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
201 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem showInformationHistogram = new JCheckBoxMenuItem();
207 protected JCheckBoxMenuItem showHMMSequenceLogo = new JCheckBoxMenuItem();
209 protected JCheckBoxMenuItem normaliseHMMSequenceLogo = new JCheckBoxMenuItem();
211 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
213 private SequenceAnnotationOrder annotationSortOrder;
215 private boolean showAutoCalculatedAbove = false;
217 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
219 private SplitContainerI splitFrame;
226 setJMenuBar(alignFrameMenuBar);
228 // dynamically fill save as menu with available formats
229 for (String ff : FileFormats.getInstance().getWritableFormats(true))
231 JMenuItem item = new JMenuItem(ff);
233 item.addActionListener(new ActionListener()
236 public void actionPerformed(ActionEvent e)
238 outputText_actionPerformed(e);
242 outputTextboxMenu.add(item);
244 } catch (Exception e)
246 System.err.println(e.toString());
249 if (!Platform.isAMac())
251 closeMenuItem.setMnemonic('C');
252 outputTextboxMenu.setMnemonic('T');
253 undoMenuItem.setMnemonic('Z');
254 redoMenuItem.setMnemonic('0');
255 copy.setMnemonic('C');
256 cut.setMnemonic('U');
257 pasteMenu.setMnemonic('P');
258 reload.setMnemonic('R');
262 private void jbInit() throws Exception
267 JMenuItem saveAs = new JMenuItem(
268 MessageManager.getString("action.save_as"));
269 ActionListener al = new ActionListener()
272 public void actionPerformed(ActionEvent e)
274 saveAs_actionPerformed(e);
278 // FIXME getDefaultToolkit throws an exception in Headless mode
279 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
280 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
281 | KeyEvent.SHIFT_MASK,
283 addMenuActionAndAccelerator(keyStroke, saveAs, al);
285 closeMenuItem.setText(MessageManager.getString("action.close"));
286 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
287 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
288 al = new ActionListener()
291 public void actionPerformed(ActionEvent e)
293 closeMenuItem_actionPerformed(false);
296 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
298 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
299 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
300 JMenu annotationsMenu = new JMenu(
301 MessageManager.getString("action.annotations"));
302 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
303 colourMenu.setText(MessageManager.getString("action.colour"));
304 JMenu calculateMenu = new JMenu(
305 MessageManager.getString("action.calculate"));
306 webService.setText(MessageManager.getString("action.web_service"));
307 hmmerMenu.setText(MessageManager.getString("action.hmmer"));
308 String status = Cache.getProperty("HMMER_FUNCTIONING");
309 if ("false".equals(status) || status == null)
311 hmmerMenu.setEnabled(false);
315 hmmerMenu.setEnabled(true);
317 hmmerMenu.addActionListener(new ActionListener()
320 public void actionPerformed(ActionEvent e)
322 hmmerMenu_actionPerformed(e);
325 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
326 MessageManager.getString("action.select_all"));
327 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
328 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
329 al = new ActionListener()
332 public void actionPerformed(ActionEvent e)
334 selectAllSequenceMenuItem_actionPerformed(e);
337 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
339 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
340 MessageManager.getString("action.deselect_all"));
341 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
342 al = new ActionListener()
345 public void actionPerformed(ActionEvent e)
347 deselectAllSequenceMenuItem_actionPerformed(e);
350 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
352 JMenuItem invertSequenceMenuItem = new JMenuItem(
353 MessageManager.getString("action.invert_sequence_selection"));
354 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
355 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
356 al = new ActionListener()
359 public void actionPerformed(ActionEvent e)
361 invertSequenceMenuItem_actionPerformed(e);
364 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
366 JMenuItem grpsFromSelection = new JMenuItem(
367 MessageManager.getString("action.make_groups_selection"));
368 grpsFromSelection.addActionListener(new ActionListener()
371 public void actionPerformed(ActionEvent e)
373 makeGrpsFromSelection_actionPerformed(e);
376 JMenuItem expandAlignment = new JMenuItem(
377 MessageManager.getString("action.view_flanking_regions"));
378 expandAlignment.setToolTipText(
379 MessageManager.getString("label.view_flanking_regions"));
380 expandAlignment.addActionListener(new ActionListener()
383 public void actionPerformed(ActionEvent e)
388 JMenuItem remove2LeftMenuItem = new JMenuItem(
389 MessageManager.getString("action.remove_left"));
390 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
391 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
392 al = new ActionListener()
395 public void actionPerformed(ActionEvent e)
397 remove2LeftMenuItem_actionPerformed(e);
400 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
402 JMenuItem remove2RightMenuItem = new JMenuItem(
403 MessageManager.getString("action.remove_right"));
404 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
405 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
406 al = new ActionListener()
409 public void actionPerformed(ActionEvent e)
411 remove2RightMenuItem_actionPerformed(e);
414 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
416 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
417 MessageManager.getString("action.remove_empty_columns"));
418 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
419 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
420 al = new ActionListener()
423 public void actionPerformed(ActionEvent e)
425 removeGappedColumnMenuItem_actionPerformed(e);
428 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
430 JMenuItem removeAllGapsMenuItem = new JMenuItem(
431 MessageManager.getString("action.remove_all_gaps"));
432 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
433 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
434 | KeyEvent.SHIFT_MASK,
436 al = new ActionListener()
439 public void actionPerformed(ActionEvent e)
441 removeAllGapsMenuItem_actionPerformed(e);
444 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
446 JMenuItem justifyLeftMenuItem = new JMenuItem(
447 MessageManager.getString("action.left_justify_alignment"));
448 justifyLeftMenuItem.addActionListener(new ActionListener()
451 public void actionPerformed(ActionEvent e)
453 justifyLeftMenuItem_actionPerformed(e);
456 JMenuItem justifyRightMenuItem = new JMenuItem(
457 MessageManager.getString("action.right_justify_alignment"));
458 justifyRightMenuItem.addActionListener(new ActionListener()
461 public void actionPerformed(ActionEvent e)
463 justifyRightMenuItem_actionPerformed(e);
466 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
467 viewBoxesMenuItem.setState(true);
468 viewBoxesMenuItem.addActionListener(new ActionListener()
471 public void actionPerformed(ActionEvent e)
473 viewBoxesMenuItem_actionPerformed(e);
476 viewTextMenuItem.setText(MessageManager.getString("action.text"));
477 viewTextMenuItem.setState(true);
478 viewTextMenuItem.addActionListener(new ActionListener()
481 public void actionPerformed(ActionEvent e)
483 viewTextMenuItem_actionPerformed(e);
486 showNonconservedMenuItem
487 .setText(MessageManager.getString("label.show_non_conserved"));
488 showNonconservedMenuItem.setState(false);
489 showNonconservedMenuItem.addActionListener(new ActionListener()
492 public void actionPerformed(ActionEvent e)
494 showUnconservedMenuItem_actionPerformed(e);
497 JMenuItem sortPairwiseMenuItem = new JMenuItem(
498 MessageManager.getString("action.by_pairwise_id"));
499 sortPairwiseMenuItem.addActionListener(new ActionListener()
502 public void actionPerformed(ActionEvent e)
504 sortPairwiseMenuItem_actionPerformed(e);
507 JMenuItem sortIDMenuItem = new JMenuItem(
508 MessageManager.getString("action.by_id"));
509 sortIDMenuItem.addActionListener(new ActionListener()
512 public void actionPerformed(ActionEvent e)
514 sortIDMenuItem_actionPerformed(e);
517 JMenuItem sortLengthMenuItem = new JMenuItem(
518 MessageManager.getString("action.by_length"));
519 sortLengthMenuItem.addActionListener(new ActionListener()
522 public void actionPerformed(ActionEvent e)
524 sortLengthMenuItem_actionPerformed(e);
527 JMenuItem sortGroupMenuItem = new JMenuItem(
528 MessageManager.getString("action.by_group"));
529 sortGroupMenuItem.addActionListener(new ActionListener()
532 public void actionPerformed(ActionEvent e)
534 sortGroupMenuItem_actionPerformed(e);
538 JMenuItem removeRedundancyMenuItem = new JMenuItem(
539 MessageManager.getString("action.remove_redundancy"));
540 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
541 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
542 al = new ActionListener()
545 public void actionPerformed(ActionEvent e)
547 removeRedundancyMenuItem_actionPerformed(e);
550 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
552 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
553 MessageManager.getString("action.pairwise_alignment"));
554 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
557 public void actionPerformed(ActionEvent e)
559 pairwiseAlignmentMenuItem_actionPerformed(e);
563 this.getContentPane().setLayout(new BorderLayout());
564 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
565 statusBar.setBackground(Color.white);
566 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
567 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
568 statusBar.setText(MessageManager.getString("label.status_bar"));
571 .setText(MessageManager.getString("label.out_to_textbox"));
574 annotationPanelMenuItem.setActionCommand("");
575 annotationPanelMenuItem
576 .setText(MessageManager.getString("label.show_annotations"));
577 annotationPanelMenuItem
578 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
579 annotationPanelMenuItem.addActionListener(new ActionListener()
582 public void actionPerformed(ActionEvent e)
584 annotationPanelMenuItem_actionPerformed(e);
587 showAllAlAnnotations.setText(
588 MessageManager.getString("label.show_all_al_annotations"));
589 final boolean isAnnotationPanelShown = annotationPanelMenuItem
591 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
592 showAllAlAnnotations.addActionListener(new ActionListener()
595 public void actionPerformed(ActionEvent e)
597 showAllAnnotations_actionPerformed(false, true);
600 hideAllAlAnnotations.setText(
601 MessageManager.getString("label.hide_all_al_annotations"));
602 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
603 hideAllAlAnnotations.addActionListener(new ActionListener()
606 public void actionPerformed(ActionEvent e)
608 hideAllAnnotations_actionPerformed(false, true);
611 showAllSeqAnnotations.setText(
612 MessageManager.getString("label.show_all_seq_annotations"));
613 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
614 showAllSeqAnnotations.addActionListener(new ActionListener()
617 public void actionPerformed(ActionEvent e)
619 showAllAnnotations_actionPerformed(true, false);
622 hideAllSeqAnnotations.setText(
623 MessageManager.getString("label.hide_all_seq_annotations"));
624 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
625 hideAllSeqAnnotations.addActionListener(new ActionListener()
628 public void actionPerformed(ActionEvent e)
630 hideAllAnnotations_actionPerformed(true, false);
633 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
634 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
635 SequenceAnnotationOrder.NONE.name()));
636 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
637 MessageManager.getString("label.sort_annotations_by_sequence"));
638 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
639 MessageManager.getString("label.sort_annotations_by_label"));
642 sortAnnBySequence.setSelected(
643 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
644 sortAnnBySequence.addActionListener(new ActionListener()
647 public void actionPerformed(ActionEvent e)
649 boolean newState = sortAnnBySequence.getState();
650 sortAnnByLabel.setSelected(false);
651 setAnnotationSortOrder(
652 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
653 : SequenceAnnotationOrder.NONE);
654 sortAnnotations_actionPerformed();
657 sortAnnByLabel.setSelected(
658 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
659 sortAnnByLabel.addActionListener(new ActionListener()
662 public void actionPerformed(ActionEvent e)
664 boolean newState = sortAnnByLabel.getState();
665 sortAnnBySequence.setSelected(false);
666 setAnnotationSortOrder(
667 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
668 : SequenceAnnotationOrder.NONE);
669 sortAnnotations_actionPerformed();
672 colourTextMenuItem = new JCheckBoxMenuItem(
673 MessageManager.getString("label.colour_text"));
674 colourTextMenuItem.addActionListener(new ActionListener()
677 public void actionPerformed(ActionEvent e)
679 colourTextMenuItem_actionPerformed(e);
683 JMenuItem htmlMenuItem = new JMenuItem(
684 MessageManager.getString("label.html"));
685 htmlMenuItem.addActionListener(new ActionListener()
688 public void actionPerformed(ActionEvent e)
690 htmlMenuItem_actionPerformed(e);
694 JMenuItem createBioJS = new JMenuItem(
695 MessageManager.getString("label.biojs_html_export"));
696 createBioJS.addActionListener(new java.awt.event.ActionListener()
699 public void actionPerformed(ActionEvent e)
701 bioJSMenuItem_actionPerformed(e);
705 JMenuItem overviewMenuItem = new JMenuItem(
706 MessageManager.getString("label.overview_window"));
707 overviewMenuItem.addActionListener(new ActionListener()
710 public void actionPerformed(ActionEvent e)
712 overviewMenuItem_actionPerformed(e);
716 undoMenuItem.setEnabled(false);
717 undoMenuItem.setText(MessageManager.getString("action.undo"));
718 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
719 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
720 al = new ActionListener()
723 public void actionPerformed(ActionEvent e)
725 undoMenuItem_actionPerformed(e);
728 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
730 redoMenuItem.setEnabled(false);
731 redoMenuItem.setText(MessageManager.getString("action.redo"));
732 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
733 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
734 al = new ActionListener()
737 public void actionPerformed(ActionEvent e)
739 redoMenuItem_actionPerformed(e);
742 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
744 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
745 wrapMenuItem.addActionListener(new ActionListener()
748 public void actionPerformed(ActionEvent e)
750 wrapMenuItem_actionPerformed(e);
754 JMenuItem printMenuItem = new JMenuItem(
755 MessageManager.getString("action.print"));
756 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
757 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
758 al = new ActionListener()
761 public void actionPerformed(ActionEvent e)
763 printMenuItem_actionPerformed(e);
766 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
769 .setText(MessageManager.getString("action.show_gaps"));
770 renderGapsMenuItem.setState(true);
771 renderGapsMenuItem.addActionListener(new ActionListener()
774 public void actionPerformed(ActionEvent e)
776 renderGapsMenuItem_actionPerformed(e);
780 JMenuItem findMenuItem = new JMenuItem(
781 MessageManager.getString("action.find"));
782 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
783 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
784 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
785 MessageManager.getString("label.find_tip")));
786 al = new ActionListener()
789 public void actionPerformed(ActionEvent e)
791 findMenuItem_actionPerformed(e);
794 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
796 showSeqFeatures.setText(
797 MessageManager.getString("label.show_sequence_features"));
799 showSeqFeatures.addActionListener(new ActionListener()
802 public void actionPerformed(ActionEvent actionEvent)
804 showSeqFeatures_actionPerformed(actionEvent);
808 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
809 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
810 * void actionPerformed(ActionEvent actionEvent) {
811 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
814 .setText(MessageManager.getString("label.show_database_refs"));
815 showDbRefsMenuitem.addActionListener(new ActionListener()
819 public void actionPerformed(ActionEvent e)
821 showDbRefs_actionPerformed(e);
825 showNpFeatsMenuitem.setText(
826 MessageManager.getString("label.show_non_positional_features"));
827 showNpFeatsMenuitem.addActionListener(new ActionListener()
831 public void actionPerformed(ActionEvent e)
833 showNpFeats_actionPerformed(e);
837 showGroupConservation
838 .setText(MessageManager.getString("label.group_conservation"));
839 showGroupConservation.addActionListener(new ActionListener()
843 public void actionPerformed(ActionEvent e)
845 showGroupConservation_actionPerformed(e);
851 .setText(MessageManager.getString("label.group_consensus"));
852 showGroupConsensus.addActionListener(new ActionListener()
856 public void actionPerformed(ActionEvent e)
858 showGroupConsensus_actionPerformed(e);
862 showConsensusHistogram.setText(
863 MessageManager.getString("label.show_consensus_histogram"));
864 showConsensusHistogram.addActionListener(new ActionListener()
868 public void actionPerformed(ActionEvent e)
870 showConsensusHistogram_actionPerformed(e);
875 .setText(MessageManager.getString("label.show_consensus_logo"));
876 showSequenceLogo.addActionListener(new ActionListener()
880 public void actionPerformed(ActionEvent e)
882 showSequenceLogo_actionPerformed(e);
886 normaliseSequenceLogo
887 .setText(MessageManager.getString("label.norm_consensus_logo"));
888 normaliseSequenceLogo.addActionListener(new ActionListener()
892 public void actionPerformed(ActionEvent e)
894 normaliseSequenceLogo_actionPerformed(e);
898 applyAutoAnnotationSettings
899 .setText(MessageManager.getString("label.apply_all_groups"));
900 applyAutoAnnotationSettings.setState(false);
901 applyAutoAnnotationSettings.setVisible(true);
902 applyAutoAnnotationSettings.addActionListener(new ActionListener()
905 public void actionPerformed(ActionEvent e)
907 applyAutoAnnotationSettings_actionPerformed(e);
911 ButtonGroup buttonGroup = new ButtonGroup();
912 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
913 MessageManager.getString("label.show_first"));
914 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
915 MessageManager.getString("label.show_last"));
916 buttonGroup.add(showAutoFirst);
917 buttonGroup.add(showAutoLast);
918 final boolean autoFirst = Cache
919 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
920 showAutoFirst.setSelected(autoFirst);
921 setShowAutoCalculatedAbove(autoFirst);
922 showAutoFirst.addActionListener(new ActionListener()
925 public void actionPerformed(ActionEvent e)
927 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
928 sortAnnotations_actionPerformed();
931 showAutoLast.setSelected(!showAutoFirst.isSelected());
932 showAutoLast.addActionListener(new ActionListener()
935 public void actionPerformed(ActionEvent e)
937 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
938 sortAnnotations_actionPerformed();
942 JMenuItem deleteGroups = new JMenuItem(
943 MessageManager.getString("action.undefine_groups"));
944 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
945 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
946 al = new ActionListener()
949 public void actionPerformed(ActionEvent e)
951 deleteGroups_actionPerformed(e);
954 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
956 JMenuItem annotationColumn = new JMenuItem(
957 MessageManager.getString("action.select_by_annotation"));
958 annotationColumn.addActionListener(new ActionListener()
961 public void actionPerformed(ActionEvent e)
963 annotationColumn_actionPerformed(e);
967 JMenuItem createGroup = new JMenuItem(
968 MessageManager.getString("action.create_group"));
969 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
970 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
971 al = new ActionListener()
974 public void actionPerformed(ActionEvent e)
976 createGroup_actionPerformed(e);
979 addMenuActionAndAccelerator(keyStroke, createGroup, al);
981 JMenuItem unGroup = new JMenuItem(
982 MessageManager.getString("action.remove_group"));
983 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
984 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
985 | KeyEvent.SHIFT_MASK,
987 al = new ActionListener()
990 public void actionPerformed(ActionEvent e)
992 unGroup_actionPerformed(e);
995 addMenuActionAndAccelerator(keyStroke, unGroup, al);
997 copy.setText(MessageManager.getString("action.copy"));
998 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
999 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1001 al = new ActionListener()
1004 public void actionPerformed(ActionEvent e)
1006 copy_actionPerformed(e);
1009 addMenuActionAndAccelerator(keyStroke, copy, al);
1011 cut.setText(MessageManager.getString("action.cut"));
1012 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1013 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1014 al = new ActionListener()
1017 public void actionPerformed(ActionEvent e)
1019 cut_actionPerformed(e);
1022 addMenuActionAndAccelerator(keyStroke, cut, al);
1024 JMenuItem delete = new JMenuItem(
1025 MessageManager.getString("action.delete"));
1026 delete.addActionListener(new ActionListener()
1029 public void actionPerformed(ActionEvent e)
1031 delete_actionPerformed(e);
1035 pasteMenu.setText(MessageManager.getString("action.paste"));
1036 JMenuItem pasteNew = new JMenuItem(
1037 MessageManager.getString("label.to_new_alignment"));
1038 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1039 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1040 | KeyEvent.SHIFT_MASK,
1042 al = new ActionListener()
1045 public void actionPerformed(ActionEvent e)
1049 pasteNew_actionPerformed(e);
1050 } catch (IOException | InterruptedException e1)
1052 // TODO Auto-generated catch block
1053 e1.printStackTrace();
1057 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1059 JMenuItem pasteThis = new JMenuItem(
1060 MessageManager.getString("label.to_this_alignment"));
1061 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1062 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1063 al = new ActionListener()
1066 public void actionPerformed(ActionEvent e)
1070 pasteThis_actionPerformed(e);
1071 } catch (IOException | InterruptedException e1)
1073 // TODO Auto-generated catch block
1074 e1.printStackTrace();
1078 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1080 JMenuItem createPNG = new JMenuItem("PNG");
1081 createPNG.addActionListener(new ActionListener()
1084 public void actionPerformed(ActionEvent e)
1089 createPNG.setActionCommand(
1090 MessageManager.getString("label.save_png_image"));
1091 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1092 font.addActionListener(new ActionListener()
1095 public void actionPerformed(ActionEvent e)
1097 font_actionPerformed(e);
1101 MessageManager.getString("label.show_sequence_limits"));
1102 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1103 seqLimits.addActionListener(new ActionListener()
1106 public void actionPerformed(ActionEvent e)
1108 seqLimit_actionPerformed(e);
1111 JMenuItem epsFile = new JMenuItem("EPS");
1112 epsFile.addActionListener(new ActionListener()
1115 public void actionPerformed(ActionEvent e)
1121 JMenuItem createSVG = new JMenuItem("SVG");
1122 createSVG.addActionListener(new ActionListener()
1125 public void actionPerformed(ActionEvent e)
1131 JMenuItem loadTreeMenuItem = new JMenuItem(
1132 MessageManager.getString("label.load_associated_tree"));
1133 loadTreeMenuItem.setActionCommand(
1134 MessageManager.getString("label.load_tree_for_sequence_set"));
1135 loadTreeMenuItem.addActionListener(new ActionListener()
1138 public void actionPerformed(ActionEvent e)
1140 loadTreeMenuItem_actionPerformed(e);
1144 scaleAbove.setVisible(false);
1145 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1146 scaleAbove.addActionListener(new ActionListener()
1149 public void actionPerformed(ActionEvent e)
1151 scaleAbove_actionPerformed(e);
1154 scaleLeft.setVisible(false);
1155 scaleLeft.setSelected(true);
1156 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1157 scaleLeft.addActionListener(new ActionListener()
1160 public void actionPerformed(ActionEvent e)
1162 scaleLeft_actionPerformed(e);
1165 scaleRight.setVisible(false);
1166 scaleRight.setSelected(true);
1167 scaleRight.setText(MessageManager.getString("action.scale_right"));
1168 scaleRight.addActionListener(new ActionListener()
1171 public void actionPerformed(ActionEvent e)
1173 scaleRight_actionPerformed(e);
1176 centreColumnLabelsMenuItem.setVisible(true);
1177 centreColumnLabelsMenuItem.setState(false);
1178 centreColumnLabelsMenuItem.setText(
1179 MessageManager.getString("label.centre_column_labels"));
1180 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1183 public void actionPerformed(ActionEvent e)
1185 centreColumnLabels_actionPerformed(e);
1188 followHighlightMenuItem.setVisible(true);
1189 followHighlightMenuItem.setState(true);
1190 followHighlightMenuItem
1191 .setText(MessageManager.getString("label.automatic_scrolling"));
1192 followHighlightMenuItem.addActionListener(new ActionListener()
1196 public void actionPerformed(ActionEvent e)
1198 followHighlight_actionPerformed();
1204 .setText(MessageManager.getString("action.by_tree_order"));
1205 sort.setText(MessageManager.getString("action.sort"));
1206 sort.addMenuListener(new MenuListener()
1209 public void menuSelected(MenuEvent e)
1211 buildTreeSortMenu();
1215 public void menuDeselected(MenuEvent e)
1220 public void menuCanceled(MenuEvent e)
1225 .setText(MessageManager.getString("label.sort_by_score"));
1226 sort.add(sortByAnnotScore);
1227 sort.addMenuListener(new javax.swing.event.MenuListener()
1231 public void menuCanceled(MenuEvent e)
1236 public void menuDeselected(MenuEvent e)
1241 public void menuSelected(MenuEvent e)
1243 buildSortByAnnotationScoresMenu();
1246 sortByAnnotScore.setVisible(false);
1249 .setText(MessageManager.getString("action.calculate_tree_pca"));
1251 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1253 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1254 padGapsMenuitem.addActionListener(new ActionListener()
1257 public void actionPerformed(ActionEvent e)
1259 padGapsMenuitem_actionPerformed(e);
1262 JMenuItem vamsasStore = new JMenuItem(
1263 MessageManager.getString("label.vamsas_store"));
1264 vamsasStore.setVisible(false);
1265 vamsasStore.addActionListener(new ActionListener()
1268 public void actionPerformed(ActionEvent e)
1270 vamsasStore_actionPerformed(e);
1274 .setText(MessageManager.getString("label.translate_cDNA"));
1275 showTranslation.addActionListener(new ActionListener()
1278 public void actionPerformed(ActionEvent e)
1280 showTranslation_actionPerformed(e);
1283 showReverse.setText(MessageManager.getString("label.reverse"));
1284 showReverse.addActionListener(new ActionListener()
1287 public void actionPerformed(ActionEvent e)
1289 showReverse_actionPerformed(false);
1292 showReverseComplement
1293 .setText(MessageManager.getString("label.reverse_complement"));
1294 showReverseComplement.addActionListener(new ActionListener()
1297 public void actionPerformed(ActionEvent e)
1299 showReverse_actionPerformed(true);
1303 JMenuItem extractScores = new JMenuItem(
1304 MessageManager.getString("label.extract_scores"));
1305 extractScores.addActionListener(new ActionListener()
1308 public void actionPerformed(ActionEvent e)
1310 extractScores_actionPerformed(e);
1313 extractScores.setVisible(true);
1314 // JBPNote: TODO: make gui for regex based score extraction
1316 // for show products actions see AlignFrame.canShowProducts
1317 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1319 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1320 runGroovy.setToolTipText(
1321 MessageManager.getString("label.run_groovy_tip"));
1322 runGroovy.addActionListener(new ActionListener()
1325 public void actionPerformed(ActionEvent e)
1327 runGroovy_actionPerformed();
1331 JMenuItem openFeatureSettings = new JMenuItem(
1332 MessageManager.getString("action.feature_settings"));
1333 openFeatureSettings.addActionListener(new ActionListener()
1336 public void actionPerformed(ActionEvent e)
1338 featureSettings_actionPerformed(e);
1341 JMenuItem fetchSequence = new JMenuItem(
1342 MessageManager.getString("label.fetch_sequences"));
1343 fetchSequence.addActionListener(new ActionListener()
1346 public void actionPerformed(ActionEvent e)
1348 fetchSequence_actionPerformed(e);
1352 JMenuItem associatedData = new JMenuItem(
1353 MessageManager.getString("label.load_features_annotations"));
1354 associatedData.addActionListener(new ActionListener()
1357 public void actionPerformed(ActionEvent e)
1361 associatedData_actionPerformed(e);
1362 } catch (IOException | InterruptedException e1)
1364 // TODO Auto-generated catch block
1365 e1.printStackTrace();
1369 autoCalculate.setText(
1370 MessageManager.getString("label.autocalculate_consensus"));
1371 autoCalculate.setState(
1372 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1373 autoCalculate.addActionListener(new ActionListener()
1376 public void actionPerformed(ActionEvent e)
1378 autoCalculate_actionPerformed(e);
1382 MessageManager.getString("label.sort_alignment_new_tree"));
1383 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1384 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1386 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1387 sortByTree.addActionListener(new ActionListener()
1390 public void actionPerformed(ActionEvent e)
1392 sortByTreeOption_actionPerformed(e);
1396 listenToViewSelections.setText(
1397 MessageManager.getString("label.listen_for_selections"));
1398 listenToViewSelections
1399 .setToolTipText("<html>" + MessageManager.getString(
1400 "label.selections_mirror_selections_made_same_sequences_other_views"));
1401 listenToViewSelections.setState(false);
1402 listenToViewSelections.addActionListener(new ActionListener()
1405 public void actionPerformed(ActionEvent e)
1407 listenToViewSelections_actionPerformed(e);
1411 JMenu addSequenceMenu = new JMenu(
1412 MessageManager.getString("label.add_sequences"));
1413 JMenuItem addFromFile = new JMenuItem(
1414 MessageManager.getString("label.from_file"));
1415 addFromFile.addActionListener(new ActionListener()
1418 public void actionPerformed(ActionEvent e)
1420 addFromFile_actionPerformed(e);
1423 JMenuItem addFromText = new JMenuItem(
1424 MessageManager.getString("label.from_textbox"));
1425 addFromText.addActionListener(new ActionListener()
1428 public void actionPerformed(ActionEvent e)
1430 addFromText_actionPerformed(e);
1433 JMenuItem addFromURL = new JMenuItem(
1434 MessageManager.getString("label.from_url"));
1435 addFromURL.addActionListener(new ActionListener()
1438 public void actionPerformed(ActionEvent e)
1440 addFromURL_actionPerformed(e);
1443 JMenuItem exportFeatures = new JMenuItem(
1444 MessageManager.getString("label.export_features"));
1445 exportFeatures.addActionListener(new ActionListener()
1448 public void actionPerformed(ActionEvent e)
1450 exportFeatures_actionPerformed(e);
1453 JMenuItem exportAnnotations = new JMenuItem(
1454 MessageManager.getString("label.export_annotations"));
1455 exportAnnotations.addActionListener(new ActionListener()
1458 public void actionPerformed(ActionEvent e)
1460 exportAnnotations_actionPerformed(e);
1463 statusPanel.setLayout(new GridLayout());
1464 JMenuItem showAllSeqs = new JMenuItem(
1465 MessageManager.getString("label.all_sequences"));
1466 showAllSeqs.setToolTipText(
1467 MessageManager.getString("label.toggle_sequence_visibility"));
1468 showAllSeqs.addActionListener(new ActionListener()
1471 public void actionPerformed(ActionEvent e)
1473 showAllSeqs_actionPerformed(e);
1476 JMenuItem showAllColumns = new JMenuItem(
1477 MessageManager.getString("label.all_columns"));
1478 showAllColumns.setToolTipText(
1479 MessageManager.getString("label.toggle_columns_visibility"));
1480 showAllColumns.addActionListener(new ActionListener()
1483 public void actionPerformed(ActionEvent e)
1485 showAllColumns_actionPerformed(e);
1488 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1489 JMenuItem hideSelSequences = new JMenuItem(
1490 MessageManager.getString("label.selected_sequences"));
1491 hideSelSequences.setToolTipText(
1492 MessageManager.getString("label.toggle_sequence_visibility"));
1493 hideSelSequences.addActionListener(new ActionListener()
1496 public void actionPerformed(ActionEvent e)
1498 hideSelSequences_actionPerformed(e);
1501 JMenuItem hideSelColumns = new JMenuItem(
1502 MessageManager.getString("label.selected_columns"));
1503 hideSelColumns.setToolTipText(
1504 MessageManager.getString("label.toggle_columns_visibility"));
1505 hideSelColumns.addActionListener(new ActionListener()
1508 public void actionPerformed(ActionEvent e)
1510 hideSelColumns_actionPerformed(e);
1513 JMenuItem hideAllSelection = new JMenuItem(
1514 MessageManager.getString("label.selected_region"));
1515 hideAllSelection.addActionListener(new ActionListener()
1518 public void actionPerformed(ActionEvent e)
1520 hideAllSelection_actionPerformed(e);
1523 // TODO: should be hidden if no selection exists.
1524 JMenuItem hideAllButSelection = new JMenuItem(
1525 MessageManager.getString("label.all_but_selected_region"));
1526 hideAllButSelection.addActionListener(new ActionListener()
1529 public void actionPerformed(ActionEvent e)
1531 hideAllButSelection_actionPerformed(e);
1534 JMenuItem showAllhidden = new JMenuItem(
1535 MessageManager.getString("label.all_sequences_columns"));
1536 showAllhidden.setToolTipText(MessageManager
1537 .getString("label.toggles_visibility_hidden_selected_regions"));
1538 showAllhidden.addActionListener(new ActionListener()
1541 public void actionPerformed(ActionEvent e)
1543 showAllhidden_actionPerformed(e);
1546 hiddenMarkers.setText(
1547 MessageManager.getString("action.show_hidden_markers"));
1548 hiddenMarkers.addActionListener(new ActionListener()
1551 public void actionPerformed(ActionEvent e)
1553 hiddenMarkers_actionPerformed(e);
1557 JMenuItem invertColSel = new JMenuItem(
1558 MessageManager.getString("action.invert_column_selection"));
1559 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1560 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1561 | KeyEvent.ALT_MASK,
1563 al = new ActionListener()
1566 public void actionPerformed(ActionEvent e)
1568 invertColSel_actionPerformed(e);
1571 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1573 showComplementMenuItem.setVisible(false);
1574 showComplementMenuItem.addActionListener(new ActionListener()
1577 public void actionPerformed(ActionEvent e)
1579 showComplement_actionPerformed(showComplementMenuItem.getState());
1583 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1586 public void stateChanged(ChangeEvent evt)
1588 JTabbedPane pane = (JTabbedPane) evt.getSource();
1589 int sel = pane.getSelectedIndex();
1590 tabSelectionChanged(sel);
1593 tabbedPane.addMouseListener(new MouseAdapter()
1596 public void mousePressed(MouseEvent e)
1598 if (e.isPopupTrigger()) // Mac
1600 tabbedPane_mousePressed(e);
1605 public void mouseReleased(MouseEvent e)
1607 if (e.isPopupTrigger()) // Windows
1609 tabbedPane_mousePressed(e);
1613 tabbedPane.addFocusListener(new FocusAdapter()
1616 public void focusGained(FocusEvent e)
1618 tabbedPane_focusGained(e);
1622 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1623 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1624 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1625 al = new ActionListener()
1628 public void actionPerformed(ActionEvent e)
1630 save_actionPerformed(e);
1633 addMenuActionAndAccelerator(keyStroke, save, al);
1635 reload.setEnabled(false);
1636 reload.setText(MessageManager.getString("action.reload"));
1637 reload.addActionListener(new ActionListener()
1640 public void actionPerformed(ActionEvent e)
1642 reload_actionPerformed(e);
1646 JMenuItem newView = new JMenuItem(
1647 MessageManager.getString("action.new_view"));
1648 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1649 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1650 al = new ActionListener()
1653 public void actionPerformed(ActionEvent e)
1655 newView_actionPerformed(e);
1658 addMenuActionAndAccelerator(keyStroke, newView, al);
1660 tabbedPane.setToolTipText("<html><i>"
1661 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1664 formatMenu.setText(MessageManager.getString("action.format"));
1665 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1667 idRightAlign.setText(
1668 MessageManager.getString("label.right_align_sequence_id"));
1669 idRightAlign.addActionListener(new ActionListener()
1672 public void actionPerformed(ActionEvent e)
1674 idRightAlign_actionPerformed(e);
1678 gatherViews.setEnabled(false);
1679 gatherViews.setText(MessageManager.getString("action.gather_views"));
1680 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1681 al = new ActionListener()
1684 public void actionPerformed(ActionEvent e)
1686 gatherViews_actionPerformed(e);
1689 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1691 expandViews.setEnabled(false);
1692 expandViews.setText(MessageManager.getString("action.expand_views"));
1693 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1694 al = new ActionListener()
1697 public void actionPerformed(ActionEvent e)
1699 expandViews_actionPerformed(e);
1702 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1704 JMenuItem pageSetup = new JMenuItem(
1705 MessageManager.getString("action.page_setup"));
1706 pageSetup.addActionListener(new ActionListener()
1709 public void actionPerformed(ActionEvent e)
1711 pageSetup_actionPerformed(e);
1714 JMenuItem alignmentProperties = new JMenuItem(
1715 MessageManager.getString("label.alignment_props"));
1716 alignmentProperties.addActionListener(new ActionListener()
1719 public void actionPerformed(ActionEvent actionEvent)
1721 alignmentProperties();
1724 JMenuItem selectHighlighted = new JMenuItem(
1725 MessageManager.getString("action.select_highlighted_columns"));
1726 selectHighlighted.setToolTipText(
1727 MessageManager.getString("tooltip.select_highlighted_columns"));
1728 al = new ActionListener()
1731 public void actionPerformed(ActionEvent actionEvent)
1733 selectHighlightedColumns_actionPerformed(actionEvent);
1736 hmmBuild.setText(MessageManager.getString("label.hmmbuild"));
1737 hmmBuild.addActionListener(new ActionListener()
1741 public void actionPerformed(ActionEvent e)
1745 hmmBuild_actionPerformed(e);
1746 } catch (IOException e1)
1748 // TODO Auto-generated catch block
1749 e1.printStackTrace();
1750 } catch (InterruptedException e1)
1752 // TODO Auto-generated catch block
1753 e1.printStackTrace();
1758 hmmAlign.setText(MessageManager.getString("label.hmmalign"));
1759 hmmAlign.addActionListener(new ActionListener()
1763 public void actionPerformed(ActionEvent e)
1767 hmmAlign_actionPerformed(e);
1768 } catch (IOException e1)
1770 // TODO Auto-generated catch block
1771 e1.printStackTrace();
1772 } catch (InterruptedException e1)
1774 // TODO Auto-generated catch block
1775 e1.printStackTrace();
1780 selectHighlighted.addActionListener(al);
1781 JMenu tooltipSettingsMenu = new JMenu(
1782 MessageManager.getString("label.sequence_id_tooltip"));
1783 JMenu autoAnnMenu = new JMenu(
1784 MessageManager.getString("label.autocalculated_annotation"));
1786 JMenu exportImageMenu = new JMenu(
1787 MessageManager.getString("label.export_image"));
1788 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1789 alignFrameMenuBar.add(fileMenu);
1790 alignFrameMenuBar.add(editMenu);
1791 alignFrameMenuBar.add(selectMenu);
1792 alignFrameMenuBar.add(viewMenu);
1793 alignFrameMenuBar.add(annotationsMenu);
1794 alignFrameMenuBar.add(formatMenu);
1795 alignFrameMenuBar.add(colourMenu);
1796 alignFrameMenuBar.add(calculateMenu);
1797 alignFrameMenuBar.add(webService);
1798 alignFrameMenuBar.add(hmmerMenu);
1800 fileMenu.add(fetchSequence);
1801 fileMenu.add(addSequenceMenu);
1802 fileMenu.add(reload);
1803 fileMenu.addSeparator();
1804 fileMenu.add(vamsasStore);
1806 fileMenu.add(saveAs);
1807 fileMenu.add(outputTextboxMenu);
1808 fileMenu.add(pageSetup);
1809 fileMenu.add(printMenuItem);
1810 fileMenu.addSeparator();
1811 fileMenu.add(exportImageMenu);
1812 fileMenu.add(exportFeatures);
1813 fileMenu.add(exportAnnotations);
1814 fileMenu.add(loadTreeMenuItem);
1815 fileMenu.add(associatedData);
1816 fileMenu.addSeparator();
1817 fileMenu.add(closeMenuItem);
1819 pasteMenu.add(pasteNew);
1820 pasteMenu.add(pasteThis);
1821 editMenu.add(undoMenuItem);
1822 editMenu.add(redoMenuItem);
1825 editMenu.add(pasteMenu);
1826 editMenu.add(delete);
1827 editMenu.addSeparator();
1828 editMenu.add(remove2LeftMenuItem);
1829 editMenu.add(remove2RightMenuItem);
1830 editMenu.add(removeGappedColumnMenuItem);
1831 editMenu.add(removeAllGapsMenuItem);
1832 editMenu.add(removeRedundancyMenuItem);
1833 editMenu.addSeparator();
1834 // dont add these yet in the CVS build - they cannot be undone!
1835 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1836 // editMenu.add(justifyLeftMenuItem);
1837 // editMenu.add(justifyRightMenuItem);
1838 // editMenu.addSeparator();
1839 editMenu.add(padGapsMenuitem);
1841 showMenu.add(showAllColumns);
1842 showMenu.add(showAllSeqs);
1843 showMenu.add(showAllhidden);
1844 hideMenu.add(hideSelColumns);
1845 hideMenu.add(hideSelSequences);
1846 hideMenu.add(hideAllSelection);
1847 hideMenu.add(hideAllButSelection);
1848 viewMenu.add(newView);
1849 viewMenu.add(expandViews);
1850 viewMenu.add(gatherViews);
1851 viewMenu.addSeparator();
1852 viewMenu.add(showMenu);
1853 viewMenu.add(hideMenu);
1854 viewMenu.add(showComplementMenuItem);
1855 viewMenu.addSeparator();
1856 viewMenu.add(followHighlightMenuItem);
1857 viewMenu.addSeparator();
1858 viewMenu.add(showSeqFeatures);
1859 // viewMenu.add(showSeqFeaturesHeight);
1860 viewMenu.add(openFeatureSettings);
1861 tooltipSettingsMenu.add(showDbRefsMenuitem);
1862 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1863 viewMenu.add(tooltipSettingsMenu);
1864 viewMenu.addSeparator();
1865 viewMenu.add(alignmentProperties);
1866 viewMenu.addSeparator();
1867 viewMenu.add(overviewMenuItem);
1869 annotationsMenu.add(annotationPanelMenuItem);
1870 annotationsMenu.addSeparator();
1871 annotationsMenu.add(showAllAlAnnotations);
1872 annotationsMenu.add(hideAllAlAnnotations);
1873 annotationsMenu.addSeparator();
1874 annotationsMenu.add(showAllSeqAnnotations);
1875 annotationsMenu.add(hideAllSeqAnnotations);
1876 annotationsMenu.add(sortAnnBySequence);
1877 annotationsMenu.add(sortAnnByLabel);
1878 annotationsMenu.addSeparator();
1879 autoAnnMenu.add(showAutoFirst);
1880 autoAnnMenu.add(showAutoLast);
1881 autoAnnMenu.addSeparator();
1882 autoAnnMenu.add(applyAutoAnnotationSettings);
1883 autoAnnMenu.add(showConsensusHistogram);
1884 autoAnnMenu.add(showSequenceLogo);
1885 autoAnnMenu.add(normaliseSequenceLogo);
1886 autoAnnMenu.addSeparator();
1887 autoAnnMenu.add(showGroupConservation);
1888 autoAnnMenu.add(showGroupConsensus);
1889 annotationsMenu.add(autoAnnMenu);
1891 sort.add(sortIDMenuItem);
1892 sort.add(sortLengthMenuItem);
1893 sort.add(sortGroupMenuItem);
1894 sort.add(sortPairwiseMenuItem);
1895 sort.add(sortByTreeMenu);
1896 calculateMenu.add(sort);
1897 calculateMenu.add(calculateTree);
1898 calculateMenu.addSeparator();
1899 calculateMenu.add(pairwiseAlignmentMenuItem);
1900 calculateMenu.addSeparator();
1901 calculateMenu.add(showTranslation);
1902 calculateMenu.add(showReverse);
1903 calculateMenu.add(showReverseComplement);
1904 calculateMenu.add(showProducts);
1905 calculateMenu.add(autoCalculate);
1906 calculateMenu.add(sortByTree);
1907 calculateMenu.addSeparator();
1908 calculateMenu.add(expandAlignment);
1909 calculateMenu.add(extractScores);
1910 calculateMenu.addSeparator();
1911 calculateMenu.add(runGroovy);
1913 webServiceNoServices = new JMenuItem(
1914 MessageManager.getString("label.no_services"));
1915 webService.add(webServiceNoServices);
1916 exportImageMenu.add(htmlMenuItem);
1917 exportImageMenu.add(epsFile);
1918 exportImageMenu.add(createPNG);
1919 exportImageMenu.add(createBioJS);
1920 exportImageMenu.add(createSVG);
1921 addSequenceMenu.add(addFromFile);
1922 addSequenceMenu.add(addFromText);
1923 addSequenceMenu.add(addFromURL);
1924 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1925 statusPanel.add(statusBar, null);
1926 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1928 formatMenu.add(font);
1929 formatMenu.addSeparator();
1930 formatMenu.add(wrapMenuItem);
1931 formatMenu.add(scaleAbove);
1932 formatMenu.add(scaleLeft);
1933 formatMenu.add(scaleRight);
1934 formatMenu.add(seqLimits);
1935 formatMenu.add(idRightAlign);
1936 formatMenu.add(hiddenMarkers);
1937 formatMenu.add(viewBoxesMenuItem);
1938 formatMenu.add(viewTextMenuItem);
1939 formatMenu.add(colourTextMenuItem);
1940 formatMenu.add(renderGapsMenuItem);
1941 formatMenu.add(centreColumnLabelsMenuItem);
1942 formatMenu.add(showNonconservedMenuItem);
1943 selectMenu.add(findMenuItem);
1944 selectMenu.addSeparator();
1945 selectMenu.add(selectAllSequenceMenuItem);
1946 selectMenu.add(deselectAllSequenceMenuItem);
1947 selectMenu.add(invertSequenceMenuItem);
1948 selectMenu.add(invertColSel);
1949 selectMenu.add(createGroup);
1950 selectMenu.add(unGroup);
1951 selectMenu.add(grpsFromSelection);
1952 selectMenu.add(deleteGroups);
1953 selectMenu.add(annotationColumn);
1954 selectMenu.add(selectHighlighted);
1955 // TODO - determine if the listenToViewSelections button is needed : see bug
1957 // selectMenu.addSeparator();
1958 // selectMenu.add(listenToViewSelections);
1961 public void hmmerMenu_actionPerformed(ActionEvent e)
1967 * Constructs the entries on the HMMER menu (does not add them to the menu).
1969 protected void initHMMERMenu()
1971 hmmAlign = new JMenuItem(MessageManager.getString("label.hmmalign"));
1972 hmmBuild = new JMenuItem(MessageManager.getString("label.hmmbuild"));
1973 hmmSearch = new JMenuItem(MessageManager.getString("label.hmmsearch"));
1977 * Constructs the entries on the Colour menu (but does not add them to the
1980 protected void initColourMenu()
1982 applyToAllGroups = new JCheckBoxMenuItem(
1983 MessageManager.getString("label.apply_colour_to_all_groups"));
1984 applyToAllGroups.addActionListener(new ActionListener()
1987 public void actionPerformed(ActionEvent e)
1989 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1993 textColour = new JMenuItem(
1994 MessageManager.getString("label.text_colour"));
1995 textColour.addActionListener(new ActionListener()
1998 public void actionPerformed(ActionEvent e)
2000 textColour_actionPerformed();
2004 conservationMenuItem = new JCheckBoxMenuItem(
2005 MessageManager.getString("action.by_conservation"));
2006 conservationMenuItem.addActionListener(new ActionListener()
2009 public void actionPerformed(ActionEvent e)
2011 conservationMenuItem_actionPerformed(
2012 conservationMenuItem.isSelected());
2016 abovePIDThreshold = new JCheckBoxMenuItem(
2017 MessageManager.getString("label.above_identity_threshold"));
2018 abovePIDThreshold.addActionListener(new ActionListener()
2021 public void actionPerformed(ActionEvent e)
2023 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2026 modifyPID = new JMenuItem(
2027 MessageManager.getString("label.modify_identity_threshold"));
2028 modifyPID.addActionListener(new ActionListener()
2031 public void actionPerformed(ActionEvent e)
2033 modifyPID_actionPerformed();
2036 modifyConservation = new JMenuItem(MessageManager
2037 .getString("label.modify_conservation_threshold"));
2038 modifyConservation.addActionListener(new ActionListener()
2041 public void actionPerformed(ActionEvent e)
2043 modifyConservation_actionPerformed();
2047 annotationColour = new JMenuItem(
2048 MessageManager.getString("action.by_annotation"));
2049 annotationColour.addActionListener(new ActionListener()
2052 public void actionPerformed(ActionEvent e)
2054 annotationColour_actionPerformed();
2059 protected void selectHighlightedColumns_actionPerformed(
2060 ActionEvent actionEvent)
2062 // TODO Auto-generated method stub
2067 * Generate the reverse sequence (or reverse complement if the flag is true)
2068 * and add it to the alignment
2072 protected void showReverse_actionPerformed(boolean complement)
2077 * Try to run script in a Groovy console, having first ensured that this
2078 * alignframe is set as currentAlignFrame in Desktop
2080 protected void runGroovy_actionPerformed()
2086 * Adds the given action listener and key accelerator to the given menu item.
2087 * Also saves in a lookup table to support lookup of action by key stroke.
2091 * @param actionListener
2093 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2094 JMenuItem menuItem, ActionListener actionListener)
2096 menuItem.setAccelerator(keyStroke);
2097 accelerators.put(keyStroke, menuItem);
2098 menuItem.addActionListener(actionListener);
2102 * Action on clicking sort annotations by type.
2106 protected void sortAnnotations_actionPerformed()
2111 * Action on clicking Show all annotations.
2113 * @param forSequences
2114 * update sequence-related annotations
2115 * @param forAlignment
2116 * update non-sequence-related annotations
2118 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2119 boolean forAlignment)
2121 setAnnotationsVisibility(true, forSequences, forAlignment);
2125 * Action on clicking Hide all annotations.
2127 * @param forSequences
2128 * update sequence-related annotations
2129 * @param forAlignment
2130 * update non-sequence-related annotations
2132 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2133 boolean forAlignment)
2135 setAnnotationsVisibility(false, forSequences, forAlignment);
2139 * Set the visibility of annotations to true or false. Can act on
2140 * sequence-related annotations, or alignment-related, or both.
2143 * @param forSequences
2144 * update sequence-related annotations
2145 * @param forAlignment
2146 * update non-sequence-related annotations
2148 protected void setAnnotationsVisibility(boolean visible,
2149 boolean forSequences, boolean forAlignment)
2154 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2156 // TODO Auto-generated method stub
2160 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2162 // TODO Auto-generated method stub
2166 protected void showAllhidden_actionPerformed(ActionEvent e)
2168 // TODO Auto-generated method stub
2172 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2174 // TODO Auto-generated method stub
2178 protected void hideAllSelection_actionPerformed(ActionEvent e)
2180 // TODO Auto-generated method stub
2184 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2186 // TODO Auto-generated method stub
2190 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2192 // TODO Auto-generated method stub
2196 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2198 // TODO Auto-generated method stub
2202 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2204 // TODO Auto-generated method stub
2208 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2210 // TODO Auto-generated method stub
2214 protected void showGroupConservation_actionPerformed(ActionEvent e)
2216 // TODO Auto-generated method stub
2220 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2222 // TODO Auto-generated method stub
2226 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2228 // TODO Auto-generated method stub
2232 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2234 // TODO Auto-generated method stub
2238 protected void followHighlight_actionPerformed()
2240 // TODO Auto-generated method stub
2244 protected void showNpFeats_actionPerformed(ActionEvent e)
2246 // TODO Auto-generated method stub
2250 protected void showDbRefs_actionPerformed(ActionEvent e)
2252 // TODO Auto-generated method stub
2256 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2260 protected void buildSortByAnnotationScoresMenu()
2264 protected void extractScores_actionPerformed(ActionEvent e)
2268 protected void outputText_actionPerformed(ActionEvent e)
2272 public void addFromFile_actionPerformed(ActionEvent e)
2277 public void addFromText_actionPerformed(ActionEvent e)
2282 public void addFromURL_actionPerformed(ActionEvent e)
2287 public void exportFeatures_actionPerformed(ActionEvent e)
2292 public void exportAnnotations_actionPerformed(ActionEvent e)
2297 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2301 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2306 protected void closeMenuItem_actionPerformed(boolean b)
2310 protected void redoMenuItem_actionPerformed(ActionEvent e)
2314 protected void undoMenuItem_actionPerformed(ActionEvent e)
2318 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2322 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2326 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2330 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2334 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2338 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2342 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2346 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2350 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2354 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2358 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2362 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2366 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2370 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2374 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2378 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2382 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2386 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2390 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2394 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2398 protected void conservationMenuItem_actionPerformed(boolean selected)
2402 protected void printMenuItem_actionPerformed(ActionEvent e)
2406 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2410 protected void findMenuItem_actionPerformed(ActionEvent e)
2414 protected void abovePIDThreshold_actionPerformed(boolean selected)
2418 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2422 protected void deleteGroups_actionPerformed(ActionEvent e)
2426 protected void createGroup_actionPerformed(ActionEvent e)
2430 protected void unGroup_actionPerformed(ActionEvent e)
2434 protected void copy_actionPerformed(ActionEvent e)
2438 protected void cut_actionPerformed(ActionEvent e)
2442 protected void delete_actionPerformed(ActionEvent e)
2446 protected void pasteNew_actionPerformed(ActionEvent e)
2447 throws IOException, InterruptedException
2451 protected void pasteThis_actionPerformed(ActionEvent e)
2452 throws IOException, InterruptedException
2456 protected void applyToAllGroups_actionPerformed(boolean selected)
2460 protected void autoAlignSeqs_actionPerformed(boolean selected)
2464 protected void hmmAlign_actionPerformed(ActionEvent e)
2465 throws IOException, InterruptedException
2469 protected void changeHMMERLocation_actionPerformed(ActionEvent e)
2473 protected void hmmBuild_actionPerformed(ActionEvent e)
2474 throws IOException, InterruptedException
2478 protected void hmmSearch_actionPerformed(ActionEvent e)
2482 public void createPNG(java.io.File f)
2486 protected void font_actionPerformed(ActionEvent e)
2490 protected void seqLimit_actionPerformed(ActionEvent e)
2494 public void seqDBRef_actionPerformed(ActionEvent e)
2499 public void createEPS(java.io.File f)
2503 public void createSVG(java.io.File f)
2508 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2514 * Template method to handle the 'load T-Coffee scores' menu event.
2516 * Subclasses override this method to provide a custom action.
2521 protected void loadScores_actionPerformed(ActionEvent event)
2526 protected void jpred_actionPerformed(ActionEvent e)
2530 protected void scaleAbove_actionPerformed(ActionEvent e)
2534 protected void scaleLeft_actionPerformed(ActionEvent e)
2538 protected void scaleRight_actionPerformed(ActionEvent e)
2542 protected void modifyPID_actionPerformed()
2546 protected void modifyConservation_actionPerformed()
2550 protected void saveAs_actionPerformed(ActionEvent e)
2554 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2558 public void vamsasStore_actionPerformed(ActionEvent e)
2563 public void vamsasLoad_actionPerformed(ActionEvent e)
2568 public void showTranslation_actionPerformed(ActionEvent e)
2573 public void featureSettings_actionPerformed(ActionEvent e)
2578 public void fetchSequence_actionPerformed(ActionEvent e)
2583 public void smoothFont_actionPerformed(ActionEvent e)
2588 public void annotationColour_actionPerformed()
2592 public void annotationColumn_actionPerformed(ActionEvent e)
2596 public void associatedData_actionPerformed(ActionEvent e)
2597 throws IOException, InterruptedException
2602 public void autoCalculate_actionPerformed(ActionEvent e)
2607 public void sortByTreeOption_actionPerformed(ActionEvent e)
2612 public void showAllSeqs_actionPerformed(ActionEvent e)
2617 public void showAllColumns_actionPerformed(ActionEvent e)
2622 public void hideSelSequences_actionPerformed(ActionEvent e)
2627 public void hideSelColumns_actionPerformed(ActionEvent e)
2632 public void hiddenMarkers_actionPerformed(ActionEvent e)
2637 public void findPdbId_actionPerformed(ActionEvent e)
2642 public void enterPdbId_actionPerformed(ActionEvent e)
2647 public void pdbFile_actionPerformed(ActionEvent e)
2652 public void invertColSel_actionPerformed(ActionEvent e)
2657 public void tabSelectionChanged(int sel)
2662 public void tabbedPane_mousePressed(MouseEvent e)
2667 public void tabbedPane_focusGained(FocusEvent e)
2672 public void save_actionPerformed(ActionEvent e)
2677 public void reload_actionPerformed(ActionEvent e)
2682 public void newView_actionPerformed(ActionEvent e)
2687 public void textColour_actionPerformed()
2692 public void idRightAlign_actionPerformed(ActionEvent e)
2697 public void expandViews_actionPerformed(ActionEvent e)
2702 public void gatherViews_actionPerformed(ActionEvent e)
2707 public void buildTreeSortMenu()
2712 public void pageSetup_actionPerformed(ActionEvent e)
2717 public void alignmentProperties()
2722 protected void expand_newalign(ActionEvent e)
2724 // TODO Auto-generated method stub
2728 protected boolean isShowAutoCalculatedAbove()
2730 return showAutoCalculatedAbove;
2733 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2735 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2738 protected SequenceAnnotationOrder getAnnotationSortOrder()
2740 return annotationSortOrder;
2743 protected void setAnnotationSortOrder(
2744 SequenceAnnotationOrder annotationSortOrder)
2746 this.annotationSortOrder = annotationSortOrder;
2749 public Map<KeyStroke, JMenuItem> getAccelerators()
2751 return this.accelerators;
2755 * Returns the selected index of the tabbed pane, or -1 if none selected
2756 * (including the case where the tabbed pane has not been made visible).
2760 public int getTabIndex()
2762 return tabbedPane.getSelectedIndex();
2765 public JPanel getStatusPanel()
2771 * Sets a reference to the containing split frame. Also makes the 'toggle
2772 * split view' menu item visible and checked.
2776 public void setSplitFrame(SplitContainerI sf)
2778 this.splitFrame = sf;
2781 this.showComplementMenuItem.setVisible(true);
2782 this.showComplementMenuItem.setState(true);
2786 public SplitContainerI getSplitViewContainer()
2788 return this.splitFrame;
2791 protected void showComplement_actionPerformed(boolean complement)
2795 protected void showInformationHistogram_actionPerformed(ActionEvent e)
2797 // TODO Auto-generated method stub
2801 protected void showHMMSequenceLogo_actionPerformed(ActionEvent e)
2806 protected void normaliseHMMSequenceLogo_actionPerformed(ActionEvent e)